Files
talk/src/core/server/models/settings.ts
T
Wyatt JohnsonandGitHub 4c65d43954 [CORL-404] Recent Comment History (#2354)
* feat: initial support for auto pre-moderation

* chore: refactor collection access

* fix: linting

* fix: rebasing issue

* fix: exported helpers

* feat: added extensions, lintd

* fix: rebase fix

* feat: renamed automaticPreModeration to recentCommentHistory

* feat: initial implementation of admin config

* feat: support recent history markers

* feat: rename visible to published

* feat: reworked history drawer

* chore: extracted tooltip

* feat: implemented user drawer

* fix: fixed translation key

* fix: resolved issue with NaN
2019-08-08 18:18:18 +00:00

116 lines
2.8 KiB
TypeScript

import { Omit } from "coral-common/types";
import {
GQLAuth,
GQLEmailConfiguration,
GQLFacebookAuthIntegration,
GQLGoogleAuthIntegration,
GQLLiveConfiguration,
GQLLocalAuthIntegration,
GQLMODERATION_MODE,
GQLOIDCAuthIntegration,
GQLSettings,
GQLSSOAuthIntegration,
} from "coral-server/graph/tenant/schema/__generated__/types";
export type LiveConfiguration = Omit<GQLLiveConfiguration, "configurable">;
export type EmailConfiguration = GQLEmailConfiguration;
export interface GlobalModerationSettings {
live: LiveConfiguration;
moderation: GQLMODERATION_MODE;
premodLinksEnable: boolean;
}
export type OIDCAuthIntegration = Omit<
GQLOIDCAuthIntegration,
"callbackURL" | "redirectURL"
>;
export type GoogleAuthIntegration = Omit<
GQLGoogleAuthIntegration,
"callbackURL" | "redirectURL"
>;
export type FacebookAuthIntegration = Omit<
GQLFacebookAuthIntegration,
"callbackURL" | "redirectURL"
>;
/**
* AuthIntegrations are the set of configurations for the variations of
* authentication solutions.
*/
export interface AuthIntegrations {
local: GQLLocalAuthIntegration;
sso: GQLSSOAuthIntegration;
oidc: OIDCAuthIntegration;
google: GoogleAuthIntegration;
facebook: FacebookAuthIntegration;
}
/**
* Auth is the set of configured authentication integrations.
*/
export type Auth = Omit<GQLAuth, "integrations"> & {
/**
* integrations are the set of configurations for the variations of
* authentication solutions.
*/
integrations: AuthIntegrations;
};
/**
* CloseCommenting contains settings related to the automatic closing of commenting on
* Stories.
*/
export type CloseCommenting = Omit<GQLSettings["closeCommenting"], "message"> &
Partial<Pick<GQLSettings["closeCommenting"], "message">>;
/**
* DisableCommenting will disable commenting site-wide.
*/
export type DisableCommenting = Omit<
GQLSettings["disableCommenting"],
"message"
> &
Partial<Pick<GQLSettings["disableCommenting"], "message">>;
export type Settings = GlobalModerationSettings &
Pick<
GQLSettings,
| "charCount"
| "email"
| "recentCommentHistory"
| "wordList"
| "integrations"
| "reaction"
| "editCommentWindowLength"
| "customCSSURL"
| "communityGuidelines"
| "stories"
| "createdAt"
> & {
/**
* auth is the set of configured authentication integrations.
*/
auth: Auth;
/**
* email is the set of credentials and settings associated with the
* organization.
*/
email: EmailConfiguration;
/**
* closeCommenting contains settings related to the automatic closing of commenting on
* Stories.
*/
closeCommenting: CloseCommenting;
/**
* disableCommenting will disable commenting site-wide.
*/
disableCommenting: DisableCommenting;
};