mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-18 14:56:59 +08:00
feat(core): impl billing settings (#4652)
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
mutation createCustomerPortal {
|
||||
createCustomerPortal
|
||||
}
|
||||
@@ -138,6 +138,17 @@ mutation checkout($recurring: SubscriptionRecurring!) {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const createCustomerPortalMutation = {
|
||||
id: 'createCustomerPortalMutation' as const,
|
||||
operationName: 'createCustomerPortal',
|
||||
definitionName: 'createCustomerPortal',
|
||||
containsFile: false,
|
||||
query: `
|
||||
mutation createCustomerPortal {
|
||||
createCustomerPortal
|
||||
}`,
|
||||
};
|
||||
|
||||
export const createWorkspaceMutation = {
|
||||
id: 'createWorkspaceMutation' as const,
|
||||
operationName: 'createWorkspace',
|
||||
@@ -365,6 +376,7 @@ query invoices($take: Int!, $skip: Int!) {
|
||||
amount
|
||||
reason
|
||||
lastPaymentError
|
||||
link
|
||||
createdAt
|
||||
}
|
||||
}
|
||||
@@ -416,6 +428,23 @@ mutation removeAvatar {
|
||||
}`,
|
||||
};
|
||||
|
||||
export const resumeSubscriptionMutation = {
|
||||
id: 'resumeSubscriptionMutation' as const,
|
||||
operationName: 'resumeSubscription',
|
||||
definitionName: 'resumeSubscription',
|
||||
containsFile: false,
|
||||
query: `
|
||||
mutation resumeSubscription {
|
||||
resumeSubscription {
|
||||
id
|
||||
status
|
||||
nextBillAt
|
||||
start
|
||||
end
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
||||
export const revokeMemberPermissionMutation = {
|
||||
id: 'revokeMemberPermissionMutation' as const,
|
||||
operationName: 'revokeMemberPermission',
|
||||
|
||||
@@ -9,6 +9,7 @@ query invoices($take: Int!, $skip: Int!) {
|
||||
amount
|
||||
reason
|
||||
lastPaymentError
|
||||
link
|
||||
createdAt
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
mutation resumeSubscription {
|
||||
resumeSubscription {
|
||||
id
|
||||
status
|
||||
nextBillAt
|
||||
start
|
||||
end
|
||||
}
|
||||
}
|
||||
@@ -182,6 +182,15 @@ export type CheckoutMutationVariables = Exact<{
|
||||
|
||||
export type CheckoutMutation = { __typename?: 'Mutation'; checkout: string };
|
||||
|
||||
export type CreateCustomerPortalMutationVariables = Exact<{
|
||||
[key: string]: never;
|
||||
}>;
|
||||
|
||||
export type CreateCustomerPortalMutation = {
|
||||
__typename?: 'Mutation';
|
||||
createCustomerPortal: string;
|
||||
};
|
||||
|
||||
export type CreateWorkspaceMutationVariables = Exact<{
|
||||
init: Scalars['Upload']['input'];
|
||||
}>;
|
||||
@@ -368,6 +377,7 @@ export type InvoicesQuery = {
|
||||
amount: number;
|
||||
reason: string;
|
||||
lastPaymentError: string | null;
|
||||
link: string | null;
|
||||
createdAt: string;
|
||||
}>;
|
||||
} | null;
|
||||
@@ -405,6 +415,22 @@ export type RemoveAvatarMutation = {
|
||||
removeAvatar: { __typename?: 'RemoveAvatar'; success: boolean };
|
||||
};
|
||||
|
||||
export type ResumeSubscriptionMutationVariables = Exact<{
|
||||
[key: string]: never;
|
||||
}>;
|
||||
|
||||
export type ResumeSubscriptionMutation = {
|
||||
__typename?: 'Mutation';
|
||||
resumeSubscription: {
|
||||
__typename?: 'UserSubscription';
|
||||
id: string;
|
||||
status: SubscriptionStatus;
|
||||
nextBillAt: string | null;
|
||||
start: string;
|
||||
end: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type RevokeMemberPermissionMutationVariables = Exact<{
|
||||
workspaceId: Scalars['String']['input'];
|
||||
userId: Scalars['String']['input'];
|
||||
@@ -712,6 +738,11 @@ export type Mutations =
|
||||
variables: CheckoutMutationVariables;
|
||||
response: CheckoutMutation;
|
||||
}
|
||||
| {
|
||||
name: 'createCustomerPortalMutation';
|
||||
variables: CreateCustomerPortalMutationVariables;
|
||||
response: CreateCustomerPortalMutation;
|
||||
}
|
||||
| {
|
||||
name: 'createWorkspaceMutation';
|
||||
variables: CreateWorkspaceMutationVariables;
|
||||
@@ -737,6 +768,11 @@ export type Mutations =
|
||||
variables: RemoveAvatarMutationVariables;
|
||||
response: RemoveAvatarMutation;
|
||||
}
|
||||
| {
|
||||
name: 'resumeSubscriptionMutation';
|
||||
variables: ResumeSubscriptionMutationVariables;
|
||||
response: ResumeSubscriptionMutation;
|
||||
}
|
||||
| {
|
||||
name: 'revokeMemberPermissionMutation';
|
||||
variables: RevokeMemberPermissionMutationVariables;
|
||||
|
||||
Reference in New Issue
Block a user