* GH-2829 pass sentry dsn key from backend in ClientConfig * GH-2829 add Sentry library on frontend * GH-2829 fetch dsnKey in GQL and add a state * GH-2829 initialize Sentry on frontend * GH-2829 fix linting issues * Update yarn.lock * GH-2829 update graphql schema for clientConfig * GH-2829 remove Sentry comments * GH-2829 rename sentry state * GH-2829 rename dsnKey to dsn * GH-2829 refactor to use componentEffect for sentry initialization * GH-2829 fix linting issues * GH-2829 update Graphql types --------- Co-authored-by: Charles Bochet <charles@twenty.com>
71 lines
1.2 KiB
TypeScript
71 lines
1.2 KiB
TypeScript
import { Field, ObjectType } from '@nestjs/graphql';
|
|
|
|
@ObjectType()
|
|
class AuthProviders {
|
|
@Field(() => Boolean)
|
|
google: boolean;
|
|
|
|
@Field(() => Boolean)
|
|
magicLink: boolean;
|
|
|
|
@Field(() => Boolean)
|
|
password: boolean;
|
|
}
|
|
|
|
@ObjectType()
|
|
class Telemetry {
|
|
@Field(() => Boolean)
|
|
enabled: boolean;
|
|
|
|
@Field(() => Boolean)
|
|
anonymizationEnabled: boolean;
|
|
}
|
|
|
|
@ObjectType()
|
|
class Billing {
|
|
@Field(() => Boolean)
|
|
isBillingEnabled: boolean;
|
|
|
|
@Field(() => String)
|
|
billingUrl: string;
|
|
}
|
|
|
|
@ObjectType()
|
|
class Support {
|
|
@Field(() => String)
|
|
supportDriver: string;
|
|
|
|
@Field(() => String, { nullable: true })
|
|
supportFrontChatId: string | undefined;
|
|
}
|
|
|
|
@ObjectType()
|
|
class Sentry {
|
|
@Field(() => String)
|
|
dsn: string | undefined;
|
|
}
|
|
|
|
@ObjectType()
|
|
export class ClientConfig {
|
|
@Field(() => AuthProviders, { nullable: false })
|
|
authProviders: AuthProviders;
|
|
|
|
@Field(() => Telemetry, { nullable: false })
|
|
telemetry: Telemetry;
|
|
|
|
@Field(() => Billing, { nullable: false })
|
|
billing: Billing;
|
|
|
|
@Field(() => Boolean)
|
|
signInPrefilled: boolean;
|
|
|
|
@Field(() => Boolean)
|
|
debugMode: boolean;
|
|
|
|
@Field(() => Support)
|
|
support: Support;
|
|
|
|
@Field(() => Sentry)
|
|
sentry: Sentry;
|
|
}
|