24 lines
601 B
TypeScript
24 lines
601 B
TypeScript
import { object, string, url, minLength, optional, picklist } from "valibot";
|
|
|
|
export const CreateCheckoutSessionSchema = object({
|
|
priceId: string([minLength(1)]),
|
|
returnUrl: string([url()]),
|
|
});
|
|
|
|
export const CreatePortalSessionSchema = object({
|
|
returnUrl: string([url()]),
|
|
});
|
|
|
|
export const CancelSubscriptionSchema = object({
|
|
subscriptionId: string([minLength(1)]),
|
|
});
|
|
|
|
export const ReactivateSubscriptionSchema = object({
|
|
subscriptionId: string([minLength(1)]),
|
|
});
|
|
|
|
export const ListInvoicesSchema = object({
|
|
limit: optional(string(), "10"),
|
|
startingAfter: optional(string()),
|
|
});
|