feat(payment): connect payment service flow

This commit is contained in:
2026-06-18 15:40:59 +08:00
parent 35c30ac31e
commit a347b39001
34 changed files with 759 additions and 889 deletions
@@ -8,6 +8,8 @@ import {
type PaymentOrderStatusResponseInput,
} from "@/data/schemas/payment/payment_order_status_response";
export type { PaymentOrderStatus };
export class PaymentOrderStatusResponse {
declare readonly orderId: string;
declare readonly status: PaymentOrderStatus;
+2 -6
View File
@@ -24,14 +24,10 @@ export class User {
declare readonly avatarUrl: string;
declare readonly loginProvider: string;
declare readonly isGuest: boolean;
/** 是否为 VIP 会员Stripe webhook 更新) */
/** 是否为 VIP 会员 */
declare readonly isVip: boolean;
/** 语音聊天剩余分钟数Stripe webhook 更新) */
/** 语音聊天剩余分钟数 */
declare readonly voiceMinutesRemaining: number;
/** Stripe Customer ID —— 首次 Checkout 完成后由 webhook 设置 */
declare readonly stripeCustomerId: string | null;
private constructor(input: UserInput) {
const data = UserSchema.parse(input);
-1
View File
@@ -17,7 +17,6 @@ export const UserViewSchema = z.object({
isGuest: z.boolean(),
isVip: z.boolean(),
voiceMinutesRemaining: z.number(),
stripeCustomerId: z.string().nullable(),
});
export type UserView = z.infer<typeof UserViewSchema>;