mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 02:13:00 +08:00
feat(server): support lifetime subscription (#7405)
closes CLOUD-48 - [x] lifetime subscription quota - [ ] tests
This commit is contained in:
@@ -259,6 +259,7 @@ export enum ErrorNames {
|
||||
BLOB_NOT_FOUND = 'BLOB_NOT_FOUND',
|
||||
BLOB_QUOTA_EXCEEDED = 'BLOB_QUOTA_EXCEEDED',
|
||||
CANT_CHANGE_WORKSPACE_OWNER = 'CANT_CHANGE_WORKSPACE_OWNER',
|
||||
CANT_UPDATE_LIFETIME_SUBSCRIPTION = 'CANT_UPDATE_LIFETIME_SUBSCRIPTION',
|
||||
COPILOT_ACTION_TAKEN = 'COPILOT_ACTION_TAKEN',
|
||||
COPILOT_FAILED_TO_CREATE_MESSAGE = 'COPILOT_FAILED_TO_CREATE_MESSAGE',
|
||||
COPILOT_FAILED_TO_GENERATE_TEXT = 'COPILOT_FAILED_TO_GENERATE_TEXT',
|
||||
@@ -950,12 +951,14 @@ export interface SubscriptionPrice {
|
||||
__typename?: 'SubscriptionPrice';
|
||||
amount: Maybe<Scalars['Int']['output']>;
|
||||
currency: Scalars['String']['output'];
|
||||
lifetimeAmount: Maybe<Scalars['Int']['output']>;
|
||||
plan: SubscriptionPlan;
|
||||
type: Scalars['String']['output'];
|
||||
yearlyAmount: Maybe<Scalars['Int']['output']>;
|
||||
}
|
||||
|
||||
export enum SubscriptionRecurring {
|
||||
Lifetime = 'Lifetime',
|
||||
Monthly = 'Monthly',
|
||||
Yearly = 'Yearly',
|
||||
}
|
||||
@@ -1027,8 +1030,8 @@ export interface UserSubscription {
|
||||
__typename?: 'UserSubscription';
|
||||
canceledAt: Maybe<Scalars['DateTime']['output']>;
|
||||
createdAt: Scalars['DateTime']['output'];
|
||||
end: Scalars['DateTime']['output'];
|
||||
id: Scalars['String']['output'];
|
||||
end: Maybe<Scalars['DateTime']['output']>;
|
||||
id: Maybe<Scalars['String']['output']>;
|
||||
nextBillAt: Maybe<Scalars['DateTime']['output']>;
|
||||
/**
|
||||
* The 'Free' plan just exists to be a placeholder and for the type convenience of frontend.
|
||||
@@ -1213,7 +1216,7 @@ export type CancelSubscriptionMutation = {
|
||||
__typename?: 'Mutation';
|
||||
cancelSubscription: {
|
||||
__typename?: 'UserSubscription';
|
||||
id: string;
|
||||
id: string | null;
|
||||
status: SubscriptionStatus;
|
||||
nextBillAt: string | null;
|
||||
canceledAt: string | null;
|
||||
@@ -1347,7 +1350,7 @@ export type EarlyAccessUsersQuery = {
|
||||
recurring: SubscriptionRecurring;
|
||||
status: SubscriptionStatus;
|
||||
start: string;
|
||||
end: string;
|
||||
end: string | null;
|
||||
} | null;
|
||||
}>;
|
||||
};
|
||||
@@ -1834,11 +1837,11 @@ export type ResumeSubscriptionMutation = {
|
||||
__typename?: 'Mutation';
|
||||
resumeSubscription: {
|
||||
__typename?: 'UserSubscription';
|
||||
id: string;
|
||||
id: string | null;
|
||||
status: SubscriptionStatus;
|
||||
nextBillAt: string | null;
|
||||
start: string;
|
||||
end: string;
|
||||
end: string | null;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1955,12 +1958,12 @@ export type SubscriptionQuery = {
|
||||
id: string;
|
||||
subscriptions: Array<{
|
||||
__typename?: 'UserSubscription';
|
||||
id: string;
|
||||
id: string | null;
|
||||
status: SubscriptionStatus;
|
||||
plan: SubscriptionPlan;
|
||||
recurring: SubscriptionRecurring;
|
||||
start: string;
|
||||
end: string;
|
||||
end: string | null;
|
||||
nextBillAt: string | null;
|
||||
canceledAt: string | null;
|
||||
}>;
|
||||
@@ -1990,7 +1993,7 @@ export type UpdateSubscriptionMutation = {
|
||||
__typename?: 'Mutation';
|
||||
updateSubscriptionRecurring: {
|
||||
__typename?: 'UserSubscription';
|
||||
id: string;
|
||||
id: string | null;
|
||||
plan: SubscriptionPlan;
|
||||
recurring: SubscriptionRecurring;
|
||||
nextBillAt: string | null;
|
||||
|
||||
Reference in New Issue
Block a user