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; 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 & { /** * 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 & Partial>; /** * DisableCommenting will disable commenting site-wide. */ export type DisableCommenting = Omit< GQLSettings["disableCommenting"], "message" > & Partial>; 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; };