Wocart

@wocart/storefront v3.1.0


@wocart/storefront / index / PageDocumentPayloadSchema

Variable: PageDocumentPayloadSchema

const PageDocumentPayloadSchema: z.ZodObject<{ sections: z.ZodArray<z.ZodUnknown>; surface: z.ZodString; version: z.ZodNumber; }, z.core.$loose>

The persisted theme page document (PageData): the TRANSPORT shape only. sections stays unknown[] so instances of a newer document reach the theme verbatim; the theme SDK's parsePageData owns the semantics (version, component types, props).

Loose on purpose: unknown top-level keys must survive the transport, or a document's metadata would be destroyed before the theme SDK ever sees it.