@ -119,7 +119,7 @@ export type Billing = {
|
|||||||
__typename?: 'Billing';
|
__typename?: 'Billing';
|
||||||
billingUrl?: Maybe<Scalars['String']['output']>;
|
billingUrl?: Maybe<Scalars['String']['output']>;
|
||||||
isBillingEnabled: Scalars['Boolean']['output'];
|
isBillingEnabled: Scalars['Boolean']['output'];
|
||||||
trialPeriods: Array<TrialPeriodDto>;
|
trialPeriods: Array<BillingTrialPeriodDto>;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** The different billing plans available */
|
/** The different billing plans available */
|
||||||
@ -128,6 +128,72 @@ export enum BillingPlanKey {
|
|||||||
PRO = 'PRO'
|
PRO = 'PRO'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type BillingPlanOutput = {
|
||||||
|
__typename?: 'BillingPlanOutput';
|
||||||
|
baseProduct: BillingProductDto;
|
||||||
|
meteredProducts: Array<BillingProductDto>;
|
||||||
|
otherLicensedProducts: Array<BillingProductDto>;
|
||||||
|
planKey: BillingPlanKey;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BillingPriceLicensedDto = {
|
||||||
|
__typename?: 'BillingPriceLicensedDTO';
|
||||||
|
recurringInterval: SubscriptionInterval;
|
||||||
|
stripePriceId: Scalars['String']['output'];
|
||||||
|
unitAmount: Scalars['Float']['output'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BillingPriceMeteredDto = {
|
||||||
|
__typename?: 'BillingPriceMeteredDTO';
|
||||||
|
recurringInterval: SubscriptionInterval;
|
||||||
|
stripePriceId: Scalars['String']['output'];
|
||||||
|
tiers?: Maybe<Array<BillingPriceTierDto>>;
|
||||||
|
tiersMode?: Maybe<BillingPriceTiersMode>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BillingPriceTierDto = {
|
||||||
|
__typename?: 'BillingPriceTierDTO';
|
||||||
|
flatAmount?: Maybe<Scalars['Float']['output']>;
|
||||||
|
unitAmount?: Maybe<Scalars['Float']['output']>;
|
||||||
|
upTo?: Maybe<Scalars['Float']['output']>;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** The different billing price tiers modes */
|
||||||
|
export enum BillingPriceTiersMode {
|
||||||
|
GRADUATED = 'GRADUATED',
|
||||||
|
VOLUME = 'VOLUME'
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BillingPriceUnionDto = BillingPriceLicensedDto | BillingPriceMeteredDto;
|
||||||
|
|
||||||
|
export type BillingProductDto = {
|
||||||
|
__typename?: 'BillingProductDTO';
|
||||||
|
description: Scalars['String']['output'];
|
||||||
|
images?: Maybe<Array<Scalars['String']['output']>>;
|
||||||
|
name: Scalars['String']['output'];
|
||||||
|
prices: Array<Maybe<BillingPriceUnionDto>>;
|
||||||
|
type: BillingUsageType;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BillingProductPriceDto = {
|
||||||
|
__typename?: 'BillingProductPriceDTO';
|
||||||
|
created: Scalars['Float']['output'];
|
||||||
|
recurringInterval: SubscriptionInterval;
|
||||||
|
stripePriceId: Scalars['String']['output'];
|
||||||
|
unitAmount: Scalars['Float']['output'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BillingProductPricesOutput = {
|
||||||
|
__typename?: 'BillingProductPricesOutput';
|
||||||
|
productPrices: Array<BillingProductPriceDto>;
|
||||||
|
totalNumberOfPrices: Scalars['Int']['output'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BillingSessionOutput = {
|
||||||
|
__typename?: 'BillingSessionOutput';
|
||||||
|
url?: Maybe<Scalars['String']['output']>;
|
||||||
|
};
|
||||||
|
|
||||||
export type BillingSubscription = {
|
export type BillingSubscription = {
|
||||||
__typename?: 'BillingSubscription';
|
__typename?: 'BillingSubscription';
|
||||||
id: Scalars['UUID']['output'];
|
id: Scalars['UUID']['output'];
|
||||||
@ -135,6 +201,23 @@ export type BillingSubscription = {
|
|||||||
status: SubscriptionStatus;
|
status: SubscriptionStatus;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type BillingTrialPeriodDto = {
|
||||||
|
__typename?: 'BillingTrialPeriodDTO';
|
||||||
|
duration: Scalars['Float']['output'];
|
||||||
|
isCreditCardRequired: Scalars['Boolean']['output'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BillingUpdateOutput = {
|
||||||
|
__typename?: 'BillingUpdateOutput';
|
||||||
|
/** Boolean that confirms query was successful */
|
||||||
|
success: Scalars['Boolean']['output'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export enum BillingUsageType {
|
||||||
|
LICENSED = 'LICENSED',
|
||||||
|
METERED = 'METERED'
|
||||||
|
}
|
||||||
|
|
||||||
export type BooleanFieldComparison = {
|
export type BooleanFieldComparison = {
|
||||||
is?: InputMaybe<Scalars['Boolean']['input']>;
|
is?: InputMaybe<Scalars['Boolean']['input']>;
|
||||||
isNot?: InputMaybe<Scalars['Boolean']['input']>;
|
isNot?: InputMaybe<Scalars['Boolean']['input']>;
|
||||||
@ -372,12 +455,12 @@ export enum FeatureFlagKey {
|
|||||||
IsAdvancedFiltersEnabled = 'IsAdvancedFiltersEnabled',
|
IsAdvancedFiltersEnabled = 'IsAdvancedFiltersEnabled',
|
||||||
IsAirtableIntegrationEnabled = 'IsAirtableIntegrationEnabled',
|
IsAirtableIntegrationEnabled = 'IsAirtableIntegrationEnabled',
|
||||||
IsAnalyticsV2Enabled = 'IsAnalyticsV2Enabled',
|
IsAnalyticsV2Enabled = 'IsAnalyticsV2Enabled',
|
||||||
|
IsBillingPlansEnabled = 'IsBillingPlansEnabled',
|
||||||
IsCommandMenuV2Enabled = 'IsCommandMenuV2Enabled',
|
IsCommandMenuV2Enabled = 'IsCommandMenuV2Enabled',
|
||||||
IsCopilotEnabled = 'IsCopilotEnabled',
|
IsCopilotEnabled = 'IsCopilotEnabled',
|
||||||
IsEventObjectEnabled = 'IsEventObjectEnabled',
|
IsEventObjectEnabled = 'IsEventObjectEnabled',
|
||||||
IsFreeAccessEnabled = 'IsFreeAccessEnabled',
|
IsFreeAccessEnabled = 'IsFreeAccessEnabled',
|
||||||
IsFunctionSettingsEnabled = 'IsFunctionSettingsEnabled',
|
IsFunctionSettingsEnabled = 'IsFunctionSettingsEnabled',
|
||||||
IsGmailSendEmailScopeEnabled = 'IsGmailSendEmailScopeEnabled',
|
|
||||||
IsJsonFilterEnabled = 'IsJsonFilterEnabled',
|
IsJsonFilterEnabled = 'IsJsonFilterEnabled',
|
||||||
IsLocalizationEnabled = 'IsLocalizationEnabled',
|
IsLocalizationEnabled = 'IsLocalizationEnabled',
|
||||||
IsMicrosoftSyncEnabled = 'IsMicrosoftSyncEnabled',
|
IsMicrosoftSyncEnabled = 'IsMicrosoftSyncEnabled',
|
||||||
@ -548,7 +631,7 @@ export type Mutation = {
|
|||||||
activateWorkspace: Workspace;
|
activateWorkspace: Workspace;
|
||||||
authorizeApp: AuthorizeApp;
|
authorizeApp: AuthorizeApp;
|
||||||
challenge: LoginToken;
|
challenge: LoginToken;
|
||||||
checkoutSession: SessionEntity;
|
checkoutSession: BillingSessionOutput;
|
||||||
computeStepOutputSchema: Scalars['JSON']['output'];
|
computeStepOutputSchema: Scalars['JSON']['output'];
|
||||||
createDraftFromWorkflowVersion: WorkflowVersion;
|
createDraftFromWorkflowVersion: WorkflowVersion;
|
||||||
createOIDCIdentityProvider: SetupSsoOutput;
|
createOIDCIdentityProvider: SetupSsoOutput;
|
||||||
@ -593,7 +676,7 @@ export type Mutation = {
|
|||||||
syncRemoteTableSchemaChanges: RemoteTable;
|
syncRemoteTableSchemaChanges: RemoteTable;
|
||||||
track: Analytics;
|
track: Analytics;
|
||||||
unsyncRemoteTable: RemoteTable;
|
unsyncRemoteTable: RemoteTable;
|
||||||
updateBillingSubscription: UpdateBillingEntity;
|
updateBillingSubscription: BillingUpdateOutput;
|
||||||
updateLabPublicFeatureFlag: Scalars['Boolean']['output'];
|
updateLabPublicFeatureFlag: Scalars['Boolean']['output'];
|
||||||
updateOneField: Field;
|
updateOneField: Field;
|
||||||
updateOneObject: Object;
|
updateOneObject: Object;
|
||||||
@ -982,20 +1065,6 @@ export type PostgresCredentials = {
|
|||||||
workspaceId: Scalars['String']['output'];
|
workspaceId: Scalars['String']['output'];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ProductPriceEntity = {
|
|
||||||
__typename?: 'ProductPriceEntity';
|
|
||||||
created: Scalars['Float']['output'];
|
|
||||||
recurringInterval: SubscriptionInterval;
|
|
||||||
stripePriceId: Scalars['String']['output'];
|
|
||||||
unitAmount: Scalars['Float']['output'];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type ProductPricesEntity = {
|
|
||||||
__typename?: 'ProductPricesEntity';
|
|
||||||
productPrices: Array<ProductPriceEntity>;
|
|
||||||
totalNumberOfPrices: Scalars['Int']['output'];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type PublicFeatureFlag = {
|
export type PublicFeatureFlag = {
|
||||||
__typename?: 'PublicFeatureFlag';
|
__typename?: 'PublicFeatureFlag';
|
||||||
key: FeatureFlagKey;
|
key: FeatureFlagKey;
|
||||||
@ -1025,7 +1094,7 @@ export type PublishServerlessFunctionInput = {
|
|||||||
|
|
||||||
export type Query = {
|
export type Query = {
|
||||||
__typename?: 'Query';
|
__typename?: 'Query';
|
||||||
billingPortalSession: SessionEntity;
|
billingPortalSession: BillingSessionOutput;
|
||||||
checkUserExists: UserExistsOutput;
|
checkUserExists: UserExistsOutput;
|
||||||
checkWorkspaceInviteHashIsValid: WorkspaceInviteHashValid;
|
checkWorkspaceInviteHashIsValid: WorkspaceInviteHashValid;
|
||||||
clientConfig: ClientConfig;
|
clientConfig: ClientConfig;
|
||||||
@ -1043,7 +1112,7 @@ export type Query = {
|
|||||||
findWorkspaceInvitations: Array<WorkspaceInvitation>;
|
findWorkspaceInvitations: Array<WorkspaceInvitation>;
|
||||||
getAvailablePackages: Scalars['JSON']['output'];
|
getAvailablePackages: Scalars['JSON']['output'];
|
||||||
getPostgresCredentials?: Maybe<PostgresCredentials>;
|
getPostgresCredentials?: Maybe<PostgresCredentials>;
|
||||||
getProductPrices: ProductPricesEntity;
|
getProductPrices: BillingProductPricesOutput;
|
||||||
getPublicWorkspaceDataBySubdomain: PublicWorkspaceDataOutput;
|
getPublicWorkspaceDataBySubdomain: PublicWorkspaceDataOutput;
|
||||||
getServerlessFunctionSourceCode?: Maybe<Scalars['JSON']['output']>;
|
getServerlessFunctionSourceCode?: Maybe<Scalars['JSON']['output']>;
|
||||||
getTimelineCalendarEventsFromCompanyId: TimelineCalendarEventsWithTotal;
|
getTimelineCalendarEventsFromCompanyId: TimelineCalendarEventsWithTotal;
|
||||||
@ -1055,6 +1124,7 @@ export type Query = {
|
|||||||
listSSOIdentityProvidersByWorkspaceId: Array<FindAvailableSsoidpOutput>;
|
listSSOIdentityProvidersByWorkspaceId: Array<FindAvailableSsoidpOutput>;
|
||||||
object: Object;
|
object: Object;
|
||||||
objects: ObjectConnection;
|
objects: ObjectConnection;
|
||||||
|
plans: Array<BillingPlanOutput>;
|
||||||
relation: Relation;
|
relation: Relation;
|
||||||
relations: RelationConnection;
|
relations: RelationConnection;
|
||||||
validatePasswordResetToken: ValidatePasswordResetToken;
|
validatePasswordResetToken: ValidatePasswordResetToken;
|
||||||
@ -1368,11 +1438,6 @@ export enum ServerlessFunctionSyncStatus {
|
|||||||
READY = 'READY'
|
READY = 'READY'
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SessionEntity = {
|
|
||||||
__typename?: 'SessionEntity';
|
|
||||||
url?: Maybe<Scalars['String']['output']>;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type SetupOidcSsoInput = {
|
export type SetupOidcSsoInput = {
|
||||||
clientID: Scalars['String']['input'];
|
clientID: Scalars['String']['input'];
|
||||||
clientSecret: Scalars['String']['input'];
|
clientSecret: Scalars['String']['input'];
|
||||||
@ -1497,12 +1562,6 @@ export type TransientToken = {
|
|||||||
transientToken: AuthToken;
|
transientToken: AuthToken;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TrialPeriodDto = {
|
|
||||||
__typename?: 'TrialPeriodDTO';
|
|
||||||
duration: Scalars['Float']['output'];
|
|
||||||
isCreditCardRequired: Scalars['Boolean']['output'];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type UuidFilterComparison = {
|
export type UuidFilterComparison = {
|
||||||
eq?: InputMaybe<Scalars['UUID']['input']>;
|
eq?: InputMaybe<Scalars['UUID']['input']>;
|
||||||
gt?: InputMaybe<Scalars['UUID']['input']>;
|
gt?: InputMaybe<Scalars['UUID']['input']>;
|
||||||
@ -1520,12 +1579,6 @@ export type UuidFilterComparison = {
|
|||||||
notLike?: InputMaybe<Scalars['UUID']['input']>;
|
notLike?: InputMaybe<Scalars['UUID']['input']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type UpdateBillingEntity = {
|
|
||||||
__typename?: 'UpdateBillingEntity';
|
|
||||||
/** Boolean that confirms query was successful */
|
|
||||||
success: Scalars['Boolean']['output'];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type UpdateFieldInput = {
|
export type UpdateFieldInput = {
|
||||||
defaultValue?: InputMaybe<Scalars['JSON']['input']>;
|
defaultValue?: InputMaybe<Scalars['JSON']['input']>;
|
||||||
description?: InputMaybe<Scalars['String']['input']>;
|
description?: InputMaybe<Scalars['String']['input']>;
|
||||||
|
|||||||
@ -112,7 +112,7 @@ export type Billing = {
|
|||||||
__typename?: 'Billing';
|
__typename?: 'Billing';
|
||||||
billingUrl?: Maybe<Scalars['String']>;
|
billingUrl?: Maybe<Scalars['String']>;
|
||||||
isBillingEnabled: Scalars['Boolean'];
|
isBillingEnabled: Scalars['Boolean'];
|
||||||
trialPeriods: Array<TrialPeriodDto>;
|
trialPeriods: Array<BillingTrialPeriodDto>;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** The different billing plans available */
|
/** The different billing plans available */
|
||||||
@ -121,6 +121,72 @@ export enum BillingPlanKey {
|
|||||||
PRO = 'PRO'
|
PRO = 'PRO'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type BillingPlanOutput = {
|
||||||
|
__typename?: 'BillingPlanOutput';
|
||||||
|
baseProduct: BillingProductDto;
|
||||||
|
meteredProducts: Array<BillingProductDto>;
|
||||||
|
otherLicensedProducts: Array<BillingProductDto>;
|
||||||
|
planKey: BillingPlanKey;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BillingPriceLicensedDto = {
|
||||||
|
__typename?: 'BillingPriceLicensedDTO';
|
||||||
|
recurringInterval: SubscriptionInterval;
|
||||||
|
stripePriceId: Scalars['String'];
|
||||||
|
unitAmount: Scalars['Float'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BillingPriceMeteredDto = {
|
||||||
|
__typename?: 'BillingPriceMeteredDTO';
|
||||||
|
recurringInterval: SubscriptionInterval;
|
||||||
|
stripePriceId: Scalars['String'];
|
||||||
|
tiers?: Maybe<Array<BillingPriceTierDto>>;
|
||||||
|
tiersMode?: Maybe<BillingPriceTiersMode>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BillingPriceTierDto = {
|
||||||
|
__typename?: 'BillingPriceTierDTO';
|
||||||
|
flatAmount?: Maybe<Scalars['Float']>;
|
||||||
|
unitAmount?: Maybe<Scalars['Float']>;
|
||||||
|
upTo?: Maybe<Scalars['Float']>;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** The different billing price tiers modes */
|
||||||
|
export enum BillingPriceTiersMode {
|
||||||
|
GRADUATED = 'GRADUATED',
|
||||||
|
VOLUME = 'VOLUME'
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BillingPriceUnionDto = BillingPriceLicensedDto | BillingPriceMeteredDto;
|
||||||
|
|
||||||
|
export type BillingProductDto = {
|
||||||
|
__typename?: 'BillingProductDTO';
|
||||||
|
description: Scalars['String'];
|
||||||
|
images?: Maybe<Array<Scalars['String']>>;
|
||||||
|
name: Scalars['String'];
|
||||||
|
prices: Array<Maybe<BillingPriceUnionDto>>;
|
||||||
|
type: BillingUsageType;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BillingProductPriceDto = {
|
||||||
|
__typename?: 'BillingProductPriceDTO';
|
||||||
|
created: Scalars['Float'];
|
||||||
|
recurringInterval: SubscriptionInterval;
|
||||||
|
stripePriceId: Scalars['String'];
|
||||||
|
unitAmount: Scalars['Float'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BillingProductPricesOutput = {
|
||||||
|
__typename?: 'BillingProductPricesOutput';
|
||||||
|
productPrices: Array<BillingProductPriceDto>;
|
||||||
|
totalNumberOfPrices: Scalars['Int'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BillingSessionOutput = {
|
||||||
|
__typename?: 'BillingSessionOutput';
|
||||||
|
url?: Maybe<Scalars['String']>;
|
||||||
|
};
|
||||||
|
|
||||||
export type BillingSubscription = {
|
export type BillingSubscription = {
|
||||||
__typename?: 'BillingSubscription';
|
__typename?: 'BillingSubscription';
|
||||||
id: Scalars['UUID'];
|
id: Scalars['UUID'];
|
||||||
@ -128,6 +194,23 @@ export type BillingSubscription = {
|
|||||||
status: SubscriptionStatus;
|
status: SubscriptionStatus;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type BillingTrialPeriodDto = {
|
||||||
|
__typename?: 'BillingTrialPeriodDTO';
|
||||||
|
duration: Scalars['Float'];
|
||||||
|
isCreditCardRequired: Scalars['Boolean'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type BillingUpdateOutput = {
|
||||||
|
__typename?: 'BillingUpdateOutput';
|
||||||
|
/** Boolean that confirms query was successful */
|
||||||
|
success: Scalars['Boolean'];
|
||||||
|
};
|
||||||
|
|
||||||
|
export enum BillingUsageType {
|
||||||
|
LICENSED = 'LICENSED',
|
||||||
|
METERED = 'METERED'
|
||||||
|
}
|
||||||
|
|
||||||
export type BooleanFieldComparison = {
|
export type BooleanFieldComparison = {
|
||||||
is?: InputMaybe<Scalars['Boolean']>;
|
is?: InputMaybe<Scalars['Boolean']>;
|
||||||
isNot?: InputMaybe<Scalars['Boolean']>;
|
isNot?: InputMaybe<Scalars['Boolean']>;
|
||||||
@ -304,12 +387,12 @@ export enum FeatureFlagKey {
|
|||||||
IsAdvancedFiltersEnabled = 'IsAdvancedFiltersEnabled',
|
IsAdvancedFiltersEnabled = 'IsAdvancedFiltersEnabled',
|
||||||
IsAirtableIntegrationEnabled = 'IsAirtableIntegrationEnabled',
|
IsAirtableIntegrationEnabled = 'IsAirtableIntegrationEnabled',
|
||||||
IsAnalyticsV2Enabled = 'IsAnalyticsV2Enabled',
|
IsAnalyticsV2Enabled = 'IsAnalyticsV2Enabled',
|
||||||
|
IsBillingPlansEnabled = 'IsBillingPlansEnabled',
|
||||||
IsCommandMenuV2Enabled = 'IsCommandMenuV2Enabled',
|
IsCommandMenuV2Enabled = 'IsCommandMenuV2Enabled',
|
||||||
IsCopilotEnabled = 'IsCopilotEnabled',
|
IsCopilotEnabled = 'IsCopilotEnabled',
|
||||||
IsEventObjectEnabled = 'IsEventObjectEnabled',
|
IsEventObjectEnabled = 'IsEventObjectEnabled',
|
||||||
IsFreeAccessEnabled = 'IsFreeAccessEnabled',
|
IsFreeAccessEnabled = 'IsFreeAccessEnabled',
|
||||||
IsFunctionSettingsEnabled = 'IsFunctionSettingsEnabled',
|
IsFunctionSettingsEnabled = 'IsFunctionSettingsEnabled',
|
||||||
IsGmailSendEmailScopeEnabled = 'IsGmailSendEmailScopeEnabled',
|
|
||||||
IsJsonFilterEnabled = 'IsJsonFilterEnabled',
|
IsJsonFilterEnabled = 'IsJsonFilterEnabled',
|
||||||
IsLocalizationEnabled = 'IsLocalizationEnabled',
|
IsLocalizationEnabled = 'IsLocalizationEnabled',
|
||||||
IsMicrosoftSyncEnabled = 'IsMicrosoftSyncEnabled',
|
IsMicrosoftSyncEnabled = 'IsMicrosoftSyncEnabled',
|
||||||
@ -473,7 +556,7 @@ export type Mutation = {
|
|||||||
activateWorkspace: Workspace;
|
activateWorkspace: Workspace;
|
||||||
authorizeApp: AuthorizeApp;
|
authorizeApp: AuthorizeApp;
|
||||||
challenge: LoginToken;
|
challenge: LoginToken;
|
||||||
checkoutSession: SessionEntity;
|
checkoutSession: BillingSessionOutput;
|
||||||
computeStepOutputSchema: Scalars['JSON'];
|
computeStepOutputSchema: Scalars['JSON'];
|
||||||
createDraftFromWorkflowVersion: WorkflowVersion;
|
createDraftFromWorkflowVersion: WorkflowVersion;
|
||||||
createOIDCIdentityProvider: SetupSsoOutput;
|
createOIDCIdentityProvider: SetupSsoOutput;
|
||||||
@ -511,7 +594,7 @@ export type Mutation = {
|
|||||||
signUp: SignUpOutput;
|
signUp: SignUpOutput;
|
||||||
skipSyncEmailOnboardingStep: OnboardingStepSuccess;
|
skipSyncEmailOnboardingStep: OnboardingStepSuccess;
|
||||||
track: Analytics;
|
track: Analytics;
|
||||||
updateBillingSubscription: UpdateBillingEntity;
|
updateBillingSubscription: BillingUpdateOutput;
|
||||||
updateLabPublicFeatureFlag: Scalars['Boolean'];
|
updateLabPublicFeatureFlag: Scalars['Boolean'];
|
||||||
updateOneField: Field;
|
updateOneField: Field;
|
||||||
updateOneObject: Object;
|
updateOneObject: Object;
|
||||||
@ -849,20 +932,6 @@ export type PostgresCredentials = {
|
|||||||
workspaceId: Scalars['String'];
|
workspaceId: Scalars['String'];
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ProductPriceEntity = {
|
|
||||||
__typename?: 'ProductPriceEntity';
|
|
||||||
created: Scalars['Float'];
|
|
||||||
recurringInterval: SubscriptionInterval;
|
|
||||||
stripePriceId: Scalars['String'];
|
|
||||||
unitAmount: Scalars['Float'];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type ProductPricesEntity = {
|
|
||||||
__typename?: 'ProductPricesEntity';
|
|
||||||
productPrices: Array<ProductPriceEntity>;
|
|
||||||
totalNumberOfPrices: Scalars['Int'];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type PublicFeatureFlag = {
|
export type PublicFeatureFlag = {
|
||||||
__typename?: 'PublicFeatureFlag';
|
__typename?: 'PublicFeatureFlag';
|
||||||
key: FeatureFlagKey;
|
key: FeatureFlagKey;
|
||||||
@ -892,7 +961,7 @@ export type PublishServerlessFunctionInput = {
|
|||||||
|
|
||||||
export type Query = {
|
export type Query = {
|
||||||
__typename?: 'Query';
|
__typename?: 'Query';
|
||||||
billingPortalSession: SessionEntity;
|
billingPortalSession: BillingSessionOutput;
|
||||||
checkUserExists: UserExistsOutput;
|
checkUserExists: UserExistsOutput;
|
||||||
checkWorkspaceInviteHashIsValid: WorkspaceInviteHashValid;
|
checkWorkspaceInviteHashIsValid: WorkspaceInviteHashValid;
|
||||||
clientConfig: ClientConfig;
|
clientConfig: ClientConfig;
|
||||||
@ -907,7 +976,7 @@ export type Query = {
|
|||||||
findWorkspaceInvitations: Array<WorkspaceInvitation>;
|
findWorkspaceInvitations: Array<WorkspaceInvitation>;
|
||||||
getAvailablePackages: Scalars['JSON'];
|
getAvailablePackages: Scalars['JSON'];
|
||||||
getPostgresCredentials?: Maybe<PostgresCredentials>;
|
getPostgresCredentials?: Maybe<PostgresCredentials>;
|
||||||
getProductPrices: ProductPricesEntity;
|
getProductPrices: BillingProductPricesOutput;
|
||||||
getPublicWorkspaceDataBySubdomain: PublicWorkspaceDataOutput;
|
getPublicWorkspaceDataBySubdomain: PublicWorkspaceDataOutput;
|
||||||
getServerlessFunctionSourceCode?: Maybe<Scalars['JSON']>;
|
getServerlessFunctionSourceCode?: Maybe<Scalars['JSON']>;
|
||||||
getTimelineCalendarEventsFromCompanyId: TimelineCalendarEventsWithTotal;
|
getTimelineCalendarEventsFromCompanyId: TimelineCalendarEventsWithTotal;
|
||||||
@ -919,6 +988,7 @@ export type Query = {
|
|||||||
listSSOIdentityProvidersByWorkspaceId: Array<FindAvailableSsoidpOutput>;
|
listSSOIdentityProvidersByWorkspaceId: Array<FindAvailableSsoidpOutput>;
|
||||||
object: Object;
|
object: Object;
|
||||||
objects: ObjectConnection;
|
objects: ObjectConnection;
|
||||||
|
plans: Array<BillingPlanOutput>;
|
||||||
validatePasswordResetToken: ValidatePasswordResetToken;
|
validatePasswordResetToken: ValidatePasswordResetToken;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1158,11 +1228,6 @@ export enum ServerlessFunctionSyncStatus {
|
|||||||
READY = 'READY'
|
READY = 'READY'
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SessionEntity = {
|
|
||||||
__typename?: 'SessionEntity';
|
|
||||||
url?: Maybe<Scalars['String']>;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type SetupOidcSsoInput = {
|
export type SetupOidcSsoInput = {
|
||||||
clientID: Scalars['String'];
|
clientID: Scalars['String'];
|
||||||
clientSecret: Scalars['String'];
|
clientSecret: Scalars['String'];
|
||||||
@ -1287,12 +1352,6 @@ export type TransientToken = {
|
|||||||
transientToken: AuthToken;
|
transientToken: AuthToken;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TrialPeriodDto = {
|
|
||||||
__typename?: 'TrialPeriodDTO';
|
|
||||||
duration: Scalars['Float'];
|
|
||||||
isCreditCardRequired: Scalars['Boolean'];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type UuidFilterComparison = {
|
export type UuidFilterComparison = {
|
||||||
eq?: InputMaybe<Scalars['UUID']>;
|
eq?: InputMaybe<Scalars['UUID']>;
|
||||||
gt?: InputMaybe<Scalars['UUID']>;
|
gt?: InputMaybe<Scalars['UUID']>;
|
||||||
@ -1310,12 +1369,6 @@ export type UuidFilterComparison = {
|
|||||||
notLike?: InputMaybe<Scalars['UUID']>;
|
notLike?: InputMaybe<Scalars['UUID']>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type UpdateBillingEntity = {
|
|
||||||
__typename?: 'UpdateBillingEntity';
|
|
||||||
/** Boolean that confirms query was successful */
|
|
||||||
success: Scalars['Boolean'];
|
|
||||||
};
|
|
||||||
|
|
||||||
export type UpdateFieldInput = {
|
export type UpdateFieldInput = {
|
||||||
defaultValue?: InputMaybe<Scalars['JSON']>;
|
defaultValue?: InputMaybe<Scalars['JSON']>;
|
||||||
description?: InputMaybe<Scalars['String']>;
|
description?: InputMaybe<Scalars['String']>;
|
||||||
@ -1988,7 +2041,7 @@ export type BillingPortalSessionQueryVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type BillingPortalSessionQuery = { __typename?: 'Query', billingPortalSession: { __typename?: 'SessionEntity', url?: string | null } };
|
export type BillingPortalSessionQuery = { __typename?: 'Query', billingPortalSession: { __typename?: 'BillingSessionOutput', url?: string | null } };
|
||||||
|
|
||||||
export type CheckoutSessionMutationVariables = Exact<{
|
export type CheckoutSessionMutationVariables = Exact<{
|
||||||
recurringInterval: SubscriptionInterval;
|
recurringInterval: SubscriptionInterval;
|
||||||
@ -1998,24 +2051,24 @@ export type CheckoutSessionMutationVariables = Exact<{
|
|||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type CheckoutSessionMutation = { __typename?: 'Mutation', checkoutSession: { __typename?: 'SessionEntity', url?: string | null } };
|
export type CheckoutSessionMutation = { __typename?: 'Mutation', checkoutSession: { __typename?: 'BillingSessionOutput', url?: string | null } };
|
||||||
|
|
||||||
export type GetProductPricesQueryVariables = Exact<{
|
export type GetProductPricesQueryVariables = Exact<{
|
||||||
product: Scalars['String'];
|
product: Scalars['String'];
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type GetProductPricesQuery = { __typename?: 'Query', getProductPrices: { __typename?: 'ProductPricesEntity', productPrices: Array<{ __typename?: 'ProductPriceEntity', created: number, recurringInterval: SubscriptionInterval, stripePriceId: string, unitAmount: number }> } };
|
export type GetProductPricesQuery = { __typename?: 'Query', getProductPrices: { __typename?: 'BillingProductPricesOutput', productPrices: Array<{ __typename?: 'BillingProductPriceDTO', created: number, recurringInterval: SubscriptionInterval, stripePriceId: string, unitAmount: number }> } };
|
||||||
|
|
||||||
export type UpdateBillingSubscriptionMutationVariables = Exact<{ [key: string]: never; }>;
|
export type UpdateBillingSubscriptionMutationVariables = Exact<{ [key: string]: never; }>;
|
||||||
|
|
||||||
|
|
||||||
export type UpdateBillingSubscriptionMutation = { __typename?: 'Mutation', updateBillingSubscription: { __typename?: 'UpdateBillingEntity', success: boolean } };
|
export type UpdateBillingSubscriptionMutation = { __typename?: 'Mutation', updateBillingSubscription: { __typename?: 'BillingUpdateOutput', success: boolean } };
|
||||||
|
|
||||||
export type GetClientConfigQueryVariables = Exact<{ [key: string]: never; }>;
|
export type GetClientConfigQueryVariables = Exact<{ [key: string]: never; }>;
|
||||||
|
|
||||||
|
|
||||||
export type GetClientConfigQuery = { __typename?: 'Query', clientConfig: { __typename?: 'ClientConfig', signInPrefilled: boolean, isMultiWorkspaceEnabled: boolean, isEmailVerificationRequired: boolean, defaultSubdomain?: string | null, frontDomain: string, debugMode: boolean, analyticsEnabled: boolean, chromeExtensionId?: string | null, canManageFeatureFlags: boolean, billing: { __typename?: 'Billing', isBillingEnabled: boolean, billingUrl?: string | null, trialPeriods: Array<{ __typename?: 'TrialPeriodDTO', duration: number, isCreditCardRequired: boolean }> }, authProviders: { __typename?: 'AuthProviders', google: boolean, password: boolean, microsoft: boolean, sso: Array<{ __typename?: 'SSOIdentityProvider', id: string, name: string, type: IdentityProviderType, status: SsoIdentityProviderStatus, issuer: string }> }, support: { __typename?: 'Support', supportDriver: string, supportFrontChatId?: string | null }, sentry: { __typename?: 'Sentry', dsn?: string | null, environment?: string | null, release?: string | null }, captcha: { __typename?: 'Captcha', provider?: CaptchaDriverType | null, siteKey?: string | null }, api: { __typename?: 'ApiConfig', mutationMaximumAffectedRecords: number }, publicFeatureFlags: Array<{ __typename?: 'PublicFeatureFlag', key: FeatureFlagKey, metadata: { __typename?: 'PublicFeatureFlagMetadata', label: string, description: string, imagePath: string } }> } };
|
export type GetClientConfigQuery = { __typename?: 'Query', clientConfig: { __typename?: 'ClientConfig', signInPrefilled: boolean, isMultiWorkspaceEnabled: boolean, isEmailVerificationRequired: boolean, defaultSubdomain?: string | null, frontDomain: string, debugMode: boolean, analyticsEnabled: boolean, chromeExtensionId?: string | null, canManageFeatureFlags: boolean, billing: { __typename?: 'Billing', isBillingEnabled: boolean, billingUrl?: string | null, trialPeriods: Array<{ __typename?: 'BillingTrialPeriodDTO', duration: number, isCreditCardRequired: boolean }> }, authProviders: { __typename?: 'AuthProviders', google: boolean, password: boolean, microsoft: boolean, sso: Array<{ __typename?: 'SSOIdentityProvider', id: string, name: string, type: IdentityProviderType, status: SsoIdentityProviderStatus, issuer: string }> }, support: { __typename?: 'Support', supportDriver: string, supportFrontChatId?: string | null }, sentry: { __typename?: 'Sentry', dsn?: string | null, environment?: string | null, release?: string | null }, captcha: { __typename?: 'Captcha', provider?: CaptchaDriverType | null, siteKey?: string | null }, api: { __typename?: 'ApiConfig', mutationMaximumAffectedRecords: number }, publicFeatureFlags: Array<{ __typename?: 'PublicFeatureFlag', key: FeatureFlagKey, metadata: { __typename?: 'PublicFeatureFlagMetadata', label: string, description: string, imagePath: string } }> } };
|
||||||
|
|
||||||
export type SkipSyncEmailOnboardingStepMutationVariables = Exact<{ [key: string]: never; }>;
|
export type SkipSyncEmailOnboardingStepMutationVariables = Exact<{ [key: string]: never; }>;
|
||||||
|
|
||||||
|
|||||||
@ -33,12 +33,12 @@ export const mockedClientConfig: ClientConfig = {
|
|||||||
billingUrl: '',
|
billingUrl: '',
|
||||||
trialPeriods: [
|
trialPeriods: [
|
||||||
{
|
{
|
||||||
__typename: 'TrialPeriodDTO',
|
__typename: 'BillingTrialPeriodDTO',
|
||||||
duration: 30,
|
duration: 30,
|
||||||
isCreditCardRequired: true,
|
isCreditCardRequired: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: 'TrialPeriodDTO',
|
__typename: 'BillingTrialPeriodDTO',
|
||||||
duration: 7,
|
duration: 7,
|
||||||
isCreditCardRequired: false,
|
isCreditCardRequired: false,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -55,11 +55,6 @@ export const seedFeatureFlags = async (
|
|||||||
workspaceId: workspaceId,
|
workspaceId: workspaceId,
|
||||||
value: true,
|
value: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: FeatureFlagKey.IsGmailSendEmailScopeEnabled,
|
|
||||||
workspaceId: workspaceId,
|
|
||||||
value: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
key: FeatureFlagKey.IsUniqueIndexesEnabled,
|
key: FeatureFlagKey.IsUniqueIndexesEnabled,
|
||||||
workspaceId: workspaceId,
|
workspaceId: workspaceId,
|
||||||
|
|||||||
@ -6,36 +6,20 @@ import {
|
|||||||
AuthExceptionCode,
|
AuthExceptionCode,
|
||||||
} from 'src/engine/core-modules/auth/auth.exception';
|
} from 'src/engine/core-modules/auth/auth.exception';
|
||||||
import { GoogleAPIsOauthExchangeCodeForTokenStrategy } from 'src/engine/core-modules/auth/strategies/google-apis-oauth-exchange-code-for-token.auth.strategy';
|
import { GoogleAPIsOauthExchangeCodeForTokenStrategy } from 'src/engine/core-modules/auth/strategies/google-apis-oauth-exchange-code-for-token.auth.strategy';
|
||||||
import { TransientTokenService } from 'src/engine/core-modules/auth/token/services/transient-token.service';
|
|
||||||
import { setRequestExtraParams } from 'src/engine/core-modules/auth/utils/google-apis-set-request-extra-params.util';
|
import { setRequestExtraParams } from 'src/engine/core-modules/auth/utils/google-apis-set-request-extra-params.util';
|
||||||
import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service';
|
import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service';
|
||||||
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
|
||||||
import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service';
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class GoogleAPIsOauthExchangeCodeForTokenGuard extends AuthGuard(
|
export class GoogleAPIsOauthExchangeCodeForTokenGuard extends AuthGuard(
|
||||||
'google-apis',
|
'google-apis',
|
||||||
) {
|
) {
|
||||||
constructor(
|
constructor(private readonly environmentService: EnvironmentService) {
|
||||||
private readonly environmentService: EnvironmentService,
|
|
||||||
private readonly featureFlagService: FeatureFlagService,
|
|
||||||
private readonly transientTokenService: TransientTokenService,
|
|
||||||
) {
|
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
async canActivate(context: ExecutionContext) {
|
async canActivate(context: ExecutionContext) {
|
||||||
const request = context.switchToHttp().getRequest();
|
const request = context.switchToHttp().getRequest();
|
||||||
const state = JSON.parse(request.query.state);
|
const state = JSON.parse(request.query.state);
|
||||||
const { workspaceId } =
|
|
||||||
await this.transientTokenService.verifyTransientToken(
|
|
||||||
state.transientToken,
|
|
||||||
);
|
|
||||||
const isGmailSendEmailScopeEnabled =
|
|
||||||
await this.featureFlagService.isFeatureEnabled(
|
|
||||||
FeatureFlagKey.IsGmailSendEmailScopeEnabled,
|
|
||||||
workspaceId,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!this.environmentService.get('MESSAGING_PROVIDER_GMAIL_ENABLED') &&
|
!this.environmentService.get('MESSAGING_PROVIDER_GMAIL_ENABLED') &&
|
||||||
@ -50,7 +34,6 @@ export class GoogleAPIsOauthExchangeCodeForTokenGuard extends AuthGuard(
|
|||||||
new GoogleAPIsOauthExchangeCodeForTokenStrategy(
|
new GoogleAPIsOauthExchangeCodeForTokenStrategy(
|
||||||
this.environmentService,
|
this.environmentService,
|
||||||
{},
|
{},
|
||||||
isGmailSendEmailScopeEnabled,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
setRequestExtraParams(request, {
|
setRequestExtraParams(request, {
|
||||||
|
|||||||
@ -9,7 +9,6 @@ import { GoogleAPIsOauthRequestCodeStrategy } from 'src/engine/core-modules/auth
|
|||||||
import { TransientTokenService } from 'src/engine/core-modules/auth/token/services/transient-token.service';
|
import { TransientTokenService } from 'src/engine/core-modules/auth/token/services/transient-token.service';
|
||||||
import { setRequestExtraParams } from 'src/engine/core-modules/auth/utils/google-apis-set-request-extra-params.util';
|
import { setRequestExtraParams } from 'src/engine/core-modules/auth/utils/google-apis-set-request-extra-params.util';
|
||||||
import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service';
|
import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service';
|
||||||
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
|
||||||
import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service';
|
import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@ -31,11 +30,6 @@ export class GoogleAPIsOauthRequestCodeGuard extends AuthGuard('google-apis') {
|
|||||||
await this.transientTokenService.verifyTransientToken(
|
await this.transientTokenService.verifyTransientToken(
|
||||||
request.query.transientToken,
|
request.query.transientToken,
|
||||||
);
|
);
|
||||||
const isGmailSendEmailScopeEnabled =
|
|
||||||
await this.featureFlagService.isFeatureEnabled(
|
|
||||||
FeatureFlagKey.IsGmailSendEmailScopeEnabled,
|
|
||||||
workspaceId,
|
|
||||||
);
|
|
||||||
|
|
||||||
setRequestExtraParams(request, {
|
setRequestExtraParams(request, {
|
||||||
transientToken: request.query.transientToken,
|
transientToken: request.query.transientToken,
|
||||||
@ -57,11 +51,7 @@ export class GoogleAPIsOauthRequestCodeGuard extends AuthGuard('google-apis') {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
new GoogleAPIsOauthRequestCodeStrategy(
|
new GoogleAPIsOauthRequestCodeStrategy(this.environmentService, {});
|
||||||
this.environmentService,
|
|
||||||
{},
|
|
||||||
isGmailSendEmailScopeEnabled,
|
|
||||||
);
|
|
||||||
|
|
||||||
const activate = (await super.canActivate(context)) as boolean;
|
const activate = (await super.canActivate(context)) as boolean;
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,6 @@ import { v4 } from 'uuid';
|
|||||||
|
|
||||||
import { getGoogleApisOauthScopes } from 'src/engine/core-modules/auth/utils/get-google-apis-oauth-scopes';
|
import { getGoogleApisOauthScopes } from 'src/engine/core-modules/auth/utils/get-google-apis-oauth-scopes';
|
||||||
import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service';
|
import { EnvironmentService } from 'src/engine/core-modules/environment/environment.service';
|
||||||
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
|
||||||
import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service';
|
|
||||||
import { InjectMessageQueue } from 'src/engine/core-modules/message-queue/decorators/message-queue.decorator';
|
import { InjectMessageQueue } from 'src/engine/core-modules/message-queue/decorators/message-queue.decorator';
|
||||||
import { MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants';
|
import { MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants';
|
||||||
import { MessageQueueService } from 'src/engine/core-modules/message-queue/services/message-queue.service';
|
import { MessageQueueService } from 'src/engine/core-modules/message-queue/services/message-queue.service';
|
||||||
@ -47,7 +45,6 @@ export class GoogleAPIsService {
|
|||||||
private readonly calendarQueueService: MessageQueueService,
|
private readonly calendarQueueService: MessageQueueService,
|
||||||
private readonly environmentService: EnvironmentService,
|
private readonly environmentService: EnvironmentService,
|
||||||
private readonly accountsToReconnectService: AccountsToReconnectService,
|
private readonly accountsToReconnectService: AccountsToReconnectService,
|
||||||
private readonly featureFlagService: FeatureFlagService,
|
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async refreshGoogleRefreshToken(input: {
|
async refreshGoogleRefreshToken(input: {
|
||||||
@ -99,12 +96,7 @@ export class GoogleAPIsService {
|
|||||||
const workspaceDataSource =
|
const workspaceDataSource =
|
||||||
await this.twentyORMGlobalManager.getDataSourceForWorkspace(workspaceId);
|
await this.twentyORMGlobalManager.getDataSourceForWorkspace(workspaceId);
|
||||||
|
|
||||||
const isGmailSendEmailScopeEnabled =
|
const scopes = getGoogleApisOauthScopes();
|
||||||
await this.featureFlagService.isFeatureEnabled(
|
|
||||||
FeatureFlagKey.IsGmailSendEmailScopeEnabled,
|
|
||||||
workspaceId,
|
|
||||||
);
|
|
||||||
const scopes = getGoogleApisOauthScopes(isGmailSendEmailScopeEnabled);
|
|
||||||
|
|
||||||
await workspaceDataSource.transaction(async (manager: EntityManager) => {
|
await workspaceDataSource.transaction(async (manager: EntityManager) => {
|
||||||
if (!existingAccountId) {
|
if (!existingAccountId) {
|
||||||
|
|||||||
@ -19,9 +19,8 @@ export class GoogleAPIsOauthCommonStrategy extends PassportStrategy(
|
|||||||
constructor(
|
constructor(
|
||||||
environmentService: EnvironmentService,
|
environmentService: EnvironmentService,
|
||||||
scopeConfig: GoogleAPIScopeConfig,
|
scopeConfig: GoogleAPIScopeConfig,
|
||||||
isGmailSendEmailScopeEnabled = false,
|
|
||||||
) {
|
) {
|
||||||
const scopes = getGoogleApisOauthScopes(isGmailSendEmailScopeEnabled);
|
const scopes = getGoogleApisOauthScopes();
|
||||||
|
|
||||||
super({
|
super({
|
||||||
clientID: environmentService.get('AUTH_GOOGLE_CLIENT_ID'),
|
clientID: environmentService.get('AUTH_GOOGLE_CLIENT_ID'),
|
||||||
|
|||||||
@ -15,9 +15,8 @@ export class GoogleAPIsOauthExchangeCodeForTokenStrategy extends GoogleAPIsOauth
|
|||||||
constructor(
|
constructor(
|
||||||
environmentService: EnvironmentService,
|
environmentService: EnvironmentService,
|
||||||
scopeConfig: GoogleAPIScopeConfig,
|
scopeConfig: GoogleAPIScopeConfig,
|
||||||
isGmailSendEmailScopeEnabled = false,
|
|
||||||
) {
|
) {
|
||||||
super(environmentService, scopeConfig, isGmailSendEmailScopeEnabled);
|
super(environmentService, scopeConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
async validate(
|
async validate(
|
||||||
|
|||||||
@ -13,9 +13,8 @@ export class GoogleAPIsOauthRequestCodeStrategy extends GoogleAPIsOauthCommonStr
|
|||||||
constructor(
|
constructor(
|
||||||
environmentService: EnvironmentService,
|
environmentService: EnvironmentService,
|
||||||
scopeConfig: GoogleAPIScopeConfig,
|
scopeConfig: GoogleAPIScopeConfig,
|
||||||
isGmailSendEmailScopeEnabled = false,
|
|
||||||
) {
|
) {
|
||||||
super(environmentService, scopeConfig, isGmailSendEmailScopeEnabled);
|
super(environmentService, scopeConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
authenticate(req: any, options: any) {
|
authenticate(req: any, options: any) {
|
||||||
|
|||||||
@ -1,17 +1,10 @@
|
|||||||
export const getGoogleApisOauthScopes = (
|
export const getGoogleApisOauthScopes = () => {
|
||||||
isGmailSendEmailScopeEnabled = false,
|
return [
|
||||||
) => {
|
|
||||||
const scopes = [
|
|
||||||
'email',
|
'email',
|
||||||
'profile',
|
'profile',
|
||||||
'https://www.googleapis.com/auth/gmail.readonly',
|
'https://www.googleapis.com/auth/gmail.readonly',
|
||||||
'https://www.googleapis.com/auth/calendar.events',
|
'https://www.googleapis.com/auth/calendar.events',
|
||||||
'https://www.googleapis.com/auth/profile.emails.read',
|
'https://www.googleapis.com/auth/profile.emails.read',
|
||||||
|
'https://www.googleapis.com/auth/gmail.send',
|
||||||
];
|
];
|
||||||
|
|
||||||
if (isGmailSendEmailScopeEnabled) {
|
|
||||||
scopes.push('https://www.googleapis.com/auth/gmail.send');
|
|
||||||
}
|
|
||||||
|
|
||||||
return scopes;
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -7,7 +7,6 @@ export enum FeatureFlagKey {
|
|||||||
IsFreeAccessEnabled = 'IS_FREE_ACCESS_ENABLED',
|
IsFreeAccessEnabled = 'IS_FREE_ACCESS_ENABLED',
|
||||||
IsFunctionSettingsEnabled = 'IS_FUNCTION_SETTINGS_ENABLED',
|
IsFunctionSettingsEnabled = 'IS_FUNCTION_SETTINGS_ENABLED',
|
||||||
IsWorkflowEnabled = 'IS_WORKFLOW_ENABLED',
|
IsWorkflowEnabled = 'IS_WORKFLOW_ENABLED',
|
||||||
IsGmailSendEmailScopeEnabled = 'IS_GMAIL_SEND_EMAIL_SCOPE_ENABLED',
|
|
||||||
IsAnalyticsV2Enabled = 'IS_ANALYTICS_V2_ENABLED',
|
IsAnalyticsV2Enabled = 'IS_ANALYTICS_V2_ENABLED',
|
||||||
IsUniqueIndexesEnabled = 'IS_UNIQUE_INDEXES_ENABLED',
|
IsUniqueIndexesEnabled = 'IS_UNIQUE_INDEXES_ENABLED',
|
||||||
IsMicrosoftSyncEnabled = 'IS_MICROSOFT_SYNC_ENABLED',
|
IsMicrosoftSyncEnabled = 'IS_MICROSOFT_SYNC_ENABLED',
|
||||||
|
|||||||
Reference in New Issue
Block a user