Refactor code and simplify billing services

Code for billing services has been refactored for simplicity and improved organization. This includes updated locations for the 'loadTeamWorkspace' function and adjusted component imports. Redundant scripts have been eliminated and new schemas have been introduced for input data validation.
This commit is contained in:
giancarlo
2024-04-06 13:37:38 +08:00
parent 7112560efe
commit d3bd8fb033
13 changed files with 315 additions and 170 deletions

View File

@@ -9,4 +9,10 @@ export const CreateBillingCheckoutSchema = z.object({
trialDays: z.number().optional(),
customerId: z.string().optional(),
customerEmail: z.string().email().optional(),
variantQuantities: z.array(
z.object({
variantId: z.string().min(1),
quantity: z.number(),
}),
),
});