feat(data): add paywall payment APIs
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* 创建支付订单请求
|
||||
*/
|
||||
import { z } from "zod";
|
||||
|
||||
export const PayChannelSchema = z.enum(["stripe", "ezpay"]);
|
||||
|
||||
export const CreatePaymentOrderRequestSchema = z.object({
|
||||
planId: z.string(),
|
||||
payChannel: PayChannelSchema,
|
||||
autoRenew: z.boolean(),
|
||||
});
|
||||
|
||||
export type PayChannel = z.output<typeof PayChannelSchema>;
|
||||
export type CreatePaymentOrderRequestInput = z.input<
|
||||
typeof CreatePaymentOrderRequestSchema
|
||||
>;
|
||||
export type CreatePaymentOrderRequestData = z.output<
|
||||
typeof CreatePaymentOrderRequestSchema
|
||||
>;
|
||||
Reference in New Issue
Block a user