Wocart

@wocart/storefront v3.1.0


@wocart/storefront / index / AbandonedBasketLineSchema

Variable: AbandonedBasketLineSchema

const AbandonedBasketLineSchema: z.ZodObject<{ productId: z.ZodString; productName: z.ZodString; quantity: z.ZodNumber; unitPrice: z.ZodNumber; variantId: z.ZodOptional<z.ZodNullable<z.ZodString>>; variantLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, z.core.$strip>

The basket-line projection used by abandoned-checkout tracking.

Variant fields are optional and nullable: a product-page payload has no variant at all and omits the key (the tracker strips it with ?? undefined), while a checkout-page payload can carry a selected variant — the proxy accepts both, so the schema must too.