feat(payment): connect payment service flow
This commit is contained in:
@@ -10,10 +10,10 @@ export const ChatHistoryResponseSchema = z.object({
|
||||
total: z.number().default(0),
|
||||
limit: z.number(),
|
||||
offset: z.number(),
|
||||
isVip: z.boolean(),
|
||||
privateFreeLimit: z.number(),
|
||||
privateUsedToday: z.number(),
|
||||
privateCanViewFree: z.boolean(),
|
||||
isVip: z.boolean().default(false),
|
||||
privateFreeLimit: z.number().default(0),
|
||||
privateUsedToday: z.number().default(0),
|
||||
privateCanViewFree: z.boolean().default(false),
|
||||
});
|
||||
|
||||
export type ChatHistoryResponseInput = z.input<typeof ChatHistoryResponseSchema>;
|
||||
|
||||
@@ -26,8 +26,8 @@ export const ChatSendResponseSchema = z.object({
|
||||
blocked: z.boolean().nullable().default(null),
|
||||
blockReason: z.string().nullable().default(null),
|
||||
blockDetail: ChatBlockDetailSchema.nullable().default(null),
|
||||
paywallTriggered: z.boolean(),
|
||||
showUpgrade: z.boolean(),
|
||||
paywallTriggered: z.boolean().default(false),
|
||||
showUpgrade: z.boolean().default(false),
|
||||
imageType: z.string().nullable().default(null),
|
||||
imageUrl: z.string().nullable().default(null),
|
||||
});
|
||||
|
||||
@@ -27,12 +27,10 @@ export const UserSchema = z.object({
|
||||
avatarUrl: stringOrEmpty,
|
||||
loginProvider: stringOrEmpty,
|
||||
isGuest: booleanOrFalse,
|
||||
/** 是否为 VIP 会员(订阅中或未过期) —— Stripe webhook 更新 */
|
||||
/** 是否为 VIP 会员(订阅中或未过期) */
|
||||
isVip: booleanOrFalse,
|
||||
/** 语音聊天剩余分钟数(订阅生效后每天补充;用完为 0 不变) */
|
||||
voiceMinutesRemaining: numberOrZero,
|
||||
/** Stripe Customer ID —— 首次 Checkout 完成后由 webhook 设置,用于 Customer Portal 自助管理 */
|
||||
stripeCustomerId: z.string().nullable().default(null),
|
||||
});
|
||||
|
||||
export type UserInput = z.input<typeof UserSchema>;
|
||||
|
||||
Reference in New Issue
Block a user