mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
feat(server): support onetime payment subscription (#8369)
This commit is contained in:
@@ -59,6 +59,7 @@ export const AISubscribe = ({
|
||||
recurring: SubscriptionRecurring.Yearly,
|
||||
idempotencyKey,
|
||||
plan: SubscriptionPlan.AI,
|
||||
variant: null,
|
||||
coupon: null,
|
||||
successCallbackLink: generateSubscriptionCallbackLink(
|
||||
authService.session.account$.value,
|
||||
|
||||
@@ -282,6 +282,7 @@ export const Upgrade = ({
|
||||
recurring,
|
||||
idempotencyKey,
|
||||
plan: SubscriptionPlan.Pro, // Only support prod plan now.
|
||||
variant: null,
|
||||
coupon: null,
|
||||
successCallbackLink: generateSubscriptionCallbackLink(
|
||||
authService.session.account$.value,
|
||||
|
||||
@@ -100,6 +100,7 @@ export const Component = () => {
|
||||
plan: targetPlan,
|
||||
coupon: null,
|
||||
recurring: targetRecurring,
|
||||
variant: null,
|
||||
successCallbackLink: generateSubscriptionCallbackLink(
|
||||
account,
|
||||
targetPlan,
|
||||
|
||||
@@ -192,6 +192,7 @@ export interface CreateCheckoutSessionInput {
|
||||
plan: InputMaybe<SubscriptionPlan>;
|
||||
recurring: InputMaybe<SubscriptionRecurring>;
|
||||
successCallbackLink: Scalars['String']['input'];
|
||||
variant: InputMaybe<SubscriptionVariant>;
|
||||
}
|
||||
|
||||
export interface CreateCopilotPromptInput {
|
||||
@@ -291,7 +292,7 @@ export enum ErrorNames {
|
||||
CANNOT_DELETE_ALL_ADMIN_ACCOUNT = 'CANNOT_DELETE_ALL_ADMIN_ACCOUNT',
|
||||
CANNOT_DELETE_OWN_ACCOUNT = 'CANNOT_DELETE_OWN_ACCOUNT',
|
||||
CANT_CHANGE_SPACE_OWNER = 'CANT_CHANGE_SPACE_OWNER',
|
||||
CANT_UPDATE_LIFETIME_SUBSCRIPTION = 'CANT_UPDATE_LIFETIME_SUBSCRIPTION',
|
||||
CANT_UPDATE_ONETIME_PAYMENT_SUBSCRIPTION = 'CANT_UPDATE_ONETIME_PAYMENT_SUBSCRIPTION',
|
||||
CAPTCHA_VERIFICATION_FAILED = 'CAPTCHA_VERIFICATION_FAILED',
|
||||
COPILOT_ACTION_TAKEN = 'COPILOT_ACTION_TAKEN',
|
||||
COPILOT_FAILED_TO_CREATE_MESSAGE = 'COPILOT_FAILED_TO_CREATE_MESSAGE',
|
||||
@@ -1063,6 +1064,11 @@ export enum SubscriptionStatus {
|
||||
Unpaid = 'Unpaid',
|
||||
}
|
||||
|
||||
export enum SubscriptionVariant {
|
||||
EA = 'EA',
|
||||
Onetime = 'Onetime',
|
||||
}
|
||||
|
||||
export interface UnknownOauthProviderDataType {
|
||||
__typename?: 'UnknownOauthProviderDataType';
|
||||
name: Scalars['String']['output'];
|
||||
|
||||
Reference in New Issue
Block a user