Wocart

@wocart/storefront v3.1.0


@wocart/storefront / index / CartValidationSchema

Variable: CartValidationSchema

const CartValidationSchema: z.ZodObject<{ coupon: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{ applied: z.ZodLiteral<true>; code: z.ZodString; discount: z.ZodNumber; freeShipping: z.ZodBoolean; }, z.core.$strip>, z.ZodObject<{ applied: z.ZodLiteral<false>; code: z.ZodString; reason: z.ZodString; shortBy: z.ZodOptional<z.ZodNumber>; startsAt: z.ZodOptional<z.ZodString>; }, z.core.$strip>], "applied">>; delivery: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{ available: z.ZodLiteral<true>; fee: z.ZodNumber; total: z.ZodNumber; }, z.core.$strip>, z.ZodObject<{ available: z.ZodLiteral<false>; fee: z.ZodNull; total: z.ZodNull; }, z.core.$strip>], "available">>; freeDelivery: z.ZodObject<{ by: z.ZodNullable<z.ZodEnum<{ coupon: "coupon"; offer: "offer"; threshold: "threshold"; }>>; fromOffer: z.ZodBoolean; qualified: z.ZodBoolean; remaining: z.ZodNumber; threshold: z.ZodNullable<z.ZodNumber>; }, z.core.$strip>; lines: z.ZodArray<z.ZodObject<{ blocker: z.ZodNullable<z.ZodEnum<{ missing: "missing"; out_of_stock: "out_of_stock"; unlisted: "unlisted"; }>>; discount: z.ZodNumber; lineTotal: z.ZodNumber; maxQuantity: z.ZodNullable<z.ZodNumber>; offerId: z.ZodNullable<z.ZodString>; offerName: z.ZodNullable<z.ZodString>; productId: z.ZodString; productName: z.ZodString; quantity: z.ZodNumber; unitPrice: z.ZodNumber; variantId: z.ZodNullable<z.ZodString>; variantLabel: z.ZodNullable<z.ZodString>; }, z.core.$strip>>; rewards: z.ZodArray<z.ZodObject<{ offerId: z.ZodString; offerName: z.ZodNullable<z.ZodString>; productId: z.ZodNullable<z.ZodString>; productName: z.ZodNullable<z.ZodString>; quantity: z.ZodNumber; variantId: z.ZodNullable<z.ZodString>; variantLabel: z.ZodNullable<z.ZodString>; }, z.core.$strip>>; subtotal: z.ZodNumber; }, z.core.$strip>