fix: bug
This commit is contained in:
29
lib/auth.ts
29
lib/auth.ts
@@ -107,9 +107,36 @@ export interface CheckoutResponse {
|
||||
url?: string
|
||||
}
|
||||
|
||||
|
||||
// Stripe Pricing Table API 接口定义
|
||||
export interface StripePricingTableItem {
|
||||
amount: string;
|
||||
currency: string;
|
||||
name: string;
|
||||
price_id: string;
|
||||
product_id: string;
|
||||
feature_list: string[];
|
||||
highlight_text?: string | null;
|
||||
is_highlight: boolean;
|
||||
call_to_action_link: string;
|
||||
recurring: {
|
||||
interval: string;
|
||||
interval_count: number;
|
||||
};
|
||||
metadata?: any;
|
||||
metered_price_id: string;
|
||||
}
|
||||
|
||||
export interface StripePricingTableResponse {
|
||||
id: string;
|
||||
object: string;
|
||||
active: boolean;
|
||||
pricing_table_items: StripePricingTableItem[];
|
||||
}
|
||||
|
||||
export interface ISubscription {
|
||||
list: (params?: SubscriptionListParams) => Promise<{ data?: SubscriptionListItem[]; error?: ApiError }>
|
||||
plans: (params: PlansParams) => Promise<{ data?: any; error?: ApiError }>
|
||||
plans: (params: PlansParams) => Promise<{ data?: StripePricingTableResponse; error?: ApiError }>
|
||||
create: (params: CreateSubscriptionParams) => Promise<{ data?: CheckoutResponse; error?: ApiError }>
|
||||
upgrade: (params: UpgradeSubscriptionParams) => Promise<{ data?: any; error?: ApiError }>
|
||||
cancel: (params: CancelSubscriptionParams) => Promise<{ data?: any; error?: ApiError }>
|
||||
|
||||
Reference in New Issue
Block a user