working on get api cus feature

This commit is contained in:
John Yeo
2025-10-06 14:16:51 +01:00
parent a997947db8
commit feca672fab
84 changed files with 2591 additions and 1984 deletions

View File

@@ -1,5 +1,5 @@
import { APIProductSchema } from "@api/products/apiProduct.js";
import { APIProductItemSchema } from "@api/products/apiProductItem.js";
import { ApiProductSchema } from "@api/products/apiProduct.js";
import { ApiProductItemSchema } from "@api/products/apiProductItem.js";
import { FeatureOptionsSchema } from "@models/cusProductModels/cusProductModels.js";
import { z } from "zod/v4";
import { AttachBodySchema, ExtAttachBodySchema } from "./attachModels.js";
@@ -17,15 +17,15 @@ export const CheckoutParamsSchema = AttachBodySchema.extend({
export const CheckoutLineSchema = z.object({
description: z.string(),
amount: z.number(),
item: APIProductItemSchema.nullish(),
item: ApiProductItemSchema.nullish(),
});
export const CheckoutResponseSchema = z.object({
url: z.string().nullish(),
customer_id: z.string(),
lines: z.array(CheckoutLineSchema),
product: APIProductSchema.nullish(),
current_product: APIProductSchema.nullish(),
product: ApiProductSchema.nullish(),
current_product: ApiProductSchema.nullish(),
options: z.array(FeatureOptionsSchema).nullish(),
total: z.number().nullish(),
currency: z.string().nullish(),