Pass Billing Checkout var in url to bypass credit card (#9283)

This commit is contained in:
Félix Malfait
2024-12-31 14:48:00 +01:00
committed by GitHub
parent 45f14c8020
commit 97f5a5b8a5
123 changed files with 524 additions and 173 deletions

View File

@ -115,6 +115,13 @@ export type Billing = {
isBillingEnabled: Scalars['Boolean'];
};
/** The different billing plans available */
export enum BillingPlanKey {
Base = 'BASE',
Enterprise = 'ENTERPRISE',
Pro = 'PRO'
}
export type BillingSubscription = {
__typename?: 'BillingSubscription';
id: Scalars['UUID'];
@ -182,6 +189,30 @@ export type ComputeStepOutputSchemaInput = {
step: Scalars['JSON'];
};
export type CreateFieldInput = {
defaultValue?: InputMaybe<Scalars['JSON']>;
description?: InputMaybe<Scalars['String']>;
icon?: InputMaybe<Scalars['String']>;
isActive?: InputMaybe<Scalars['Boolean']>;
isCustom?: InputMaybe<Scalars['Boolean']>;
isLabelSyncedWithName?: InputMaybe<Scalars['Boolean']>;
isNullable?: InputMaybe<Scalars['Boolean']>;
isRemoteCreation?: InputMaybe<Scalars['Boolean']>;
isSystem?: InputMaybe<Scalars['Boolean']>;
isUnique?: InputMaybe<Scalars['Boolean']>;
label: Scalars['String'];
name: Scalars['String'];
objectMetadataId: Scalars['String'];
options?: InputMaybe<Scalars['JSON']>;
settings?: InputMaybe<Scalars['JSON']>;
type: FieldMetadataType;
};
export type CreateOneFieldMetadataInput = {
/** The record to create */
field: CreateFieldInput;
};
export type CreateServerlessFunctionInput = {
description?: InputMaybe<Scalars['String']>;
name: Scalars['String'];
@ -205,6 +236,11 @@ export type CursorPaging = {
last?: InputMaybe<Scalars['Int']>;
};
export type DeleteOneFieldInput = {
/** The id of the field to delete. */
id: Scalars['UUID'];
};
export type DeleteOneObjectInput = {
/** The id of the record to delete. */
id: Scalars['UUID'];
@ -447,12 +483,14 @@ export type Mutation = {
computeStepOutputSchema: Scalars['JSON'];
createOIDCIdentityProvider: SetupSsoOutput;
createOneAppToken: AppToken;
createOneField: Field;
createOneObject: Object;
createOneServerlessFunction: ServerlessFunction;
createSAMLIdentityProvider: SetupSsoOutput;
createWorkflowVersionStep: WorkflowAction;
deactivateWorkflowVersion: Scalars['Boolean'];
deleteCurrentWorkspace: Workspace;
deleteOneField: Field;
deleteOneObject: Object;
deleteOneServerlessFunction: ServerlessFunction;
deleteSSOIdentityProvider: DeleteSsoOutput;
@ -478,6 +516,7 @@ export type Mutation = {
switchWorkspace: PublicWorkspaceDataOutput;
track: Analytics;
updateBillingSubscription: UpdateBillingEntity;
updateOneField: Field;
updateOneObject: Object;
updateOneServerlessFunction: ServerlessFunction;
updatePasswordViaResetToken: InvalidatePassword;
@ -528,7 +567,9 @@ export type MutationChallengeArgs = {
export type MutationCheckoutSessionArgs = {
plan?: BillingPlanKey;
recurringInterval: SubscriptionInterval;
requirePaymentMethod?: Scalars['Boolean'];
successUrlPath?: InputMaybe<Scalars['String']>;
};
@ -543,6 +584,11 @@ export type MutationCreateOidcIdentityProviderArgs = {
};
export type MutationCreateOneFieldArgs = {
input: CreateOneFieldMetadataInput;
};
export type MutationCreateOneServerlessFunctionArgs = {
input: CreateServerlessFunctionInput;
};
@ -563,6 +609,11 @@ export type MutationDeactivateWorkflowVersionArgs = {
};
export type MutationDeleteOneFieldArgs = {
input: DeleteOneFieldInput;
};
export type MutationDeleteOneObjectArgs = {
input: DeleteOneObjectInput;
};
@ -665,6 +716,11 @@ export type MutationTrackArgs = {
};
export type MutationUpdateOneFieldArgs = {
input: UpdateOneFieldMetadataInput;
};
export type MutationUpdateOneObjectArgs = {
input: UpdateOneObjectInput;
};
@ -825,6 +881,8 @@ export type Query = {
clientConfig: ClientConfig;
currentUser: User;
currentWorkspace: Workspace;
field: Field;
fields: FieldConnection;
findAvailableWorkspacesByEmail: Array<AvailableWorkspaceOutput>;
findManyServerlessFunctions: Array<ServerlessFunction>;
findOneServerlessFunction: ServerlessFunction;
@ -1241,6 +1299,22 @@ export type UpdateBillingEntity = {
success: Scalars['Boolean'];
};
export type UpdateFieldInput = {
defaultValue?: InputMaybe<Scalars['JSON']>;
description?: InputMaybe<Scalars['String']>;
icon?: InputMaybe<Scalars['String']>;
isActive?: InputMaybe<Scalars['Boolean']>;
isCustom?: InputMaybe<Scalars['Boolean']>;
isLabelSyncedWithName?: InputMaybe<Scalars['Boolean']>;
isNullable?: InputMaybe<Scalars['Boolean']>;
isSystem?: InputMaybe<Scalars['Boolean']>;
isUnique?: InputMaybe<Scalars['Boolean']>;
label?: InputMaybe<Scalars['String']>;
name?: InputMaybe<Scalars['String']>;
options?: InputMaybe<Scalars['JSON']>;
settings?: InputMaybe<Scalars['JSON']>;
};
export type UpdateObjectPayload = {
description?: InputMaybe<Scalars['String']>;
icon?: InputMaybe<Scalars['String']>;
@ -1255,6 +1329,13 @@ export type UpdateObjectPayload = {
shortcut?: InputMaybe<Scalars['String']>;
};
export type UpdateOneFieldMetadataInput = {
/** The id of the record to update */
id: Scalars['UUID'];
/** The record to update */
update: UpdateFieldInput;
};
export type UpdateOneObjectInput = {
/** The id of the object to update */
id: Scalars['UUID'];
@ -1944,6 +2025,8 @@ export type BillingPortalSessionQuery = { __typename?: 'Query', billingPortalSes
export type CheckoutSessionMutationVariables = Exact<{
recurringInterval: SubscriptionInterval;
successUrlPath?: InputMaybe<Scalars['String']>;
plan: BillingPlanKey;
requirePaymentMethod: Scalars['Boolean'];
}>;
@ -3234,10 +3317,12 @@ export type BillingPortalSessionQueryHookResult = ReturnType<typeof useBillingPo
export type BillingPortalSessionLazyQueryHookResult = ReturnType<typeof useBillingPortalSessionLazyQuery>;
export type BillingPortalSessionQueryResult = Apollo.QueryResult<BillingPortalSessionQuery, BillingPortalSessionQueryVariables>;
export const CheckoutSessionDocument = gql`
mutation CheckoutSession($recurringInterval: SubscriptionInterval!, $successUrlPath: String) {
mutation CheckoutSession($recurringInterval: SubscriptionInterval!, $successUrlPath: String, $plan: BillingPlanKey!, $requirePaymentMethod: Boolean!) {
checkoutSession(
recurringInterval: $recurringInterval
successUrlPath: $successUrlPath
plan: $plan
requirePaymentMethod: $requirePaymentMethod
) {
url
}
@ -3260,6 +3345,8 @@ export type CheckoutSessionMutationFn = Apollo.MutationFunction<CheckoutSessionM
* variables: {
* recurringInterval: // value for 'recurringInterval'
* successUrlPath: // value for 'successUrlPath'
* plan: // value for 'plan'
* requirePaymentMethod: // value for 'requirePaymentMethod'
* },
* });
*/