@40rty/ams-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11918 -0
- package/dist/types/ecommerce/src/attribute-buckets.d.ts +79 -0
- package/dist/types/ecommerce/src/base-attributes.d.ts +42 -0
- package/dist/types/ecommerce/src/bucket-labels.d.ts +37 -0
- package/dist/types/ecommerce/src/cart-line-selections.d.ts +24 -0
- package/dist/types/ecommerce/src/commerce-schemas.d.ts +1813 -0
- package/dist/types/ecommerce/src/format-variant-value.d.ts +1 -0
- package/dist/types/ecommerce/src/index.d.ts +13 -0
- package/dist/types/ecommerce/src/locale.d.ts +31 -0
- package/dist/types/ecommerce/src/optimistic-cart-line.d.ts +38 -0
- package/dist/types/ecommerce/src/pdp-companions.d.ts +21 -0
- package/dist/types/ecommerce/src/pick-product-card-action.d.ts +38 -0
- package/dist/types/ecommerce/src/product-lookup.d.ts +34 -0
- package/dist/types/ecommerce/src/projection-spec.d.ts +38 -0
- package/dist/types/ecommerce/src/review-schemas.d.ts +425 -0
- package/dist/types/sdk/src/analytics/consent.d.ts +52 -0
- package/dist/types/sdk/src/analytics/drops.d.ts +98 -0
- package/dist/types/sdk/src/analytics/emitting-scope.d.ts +2 -0
- package/dist/types/sdk/src/analytics/index.d.ts +12 -0
- package/dist/types/sdk/src/analytics/inert-scope.d.ts +2 -0
- package/dist/types/sdk/src/analytics/notify.d.ts +41 -0
- package/dist/types/sdk/src/analytics/outbox.d.ts +118 -0
- package/dist/types/sdk/src/analytics/scope-context.d.ts +24 -0
- package/dist/types/sdk/src/analytics/scope.d.ts +149 -0
- package/dist/types/sdk/src/analytics/surface.d.ts +77 -0
- package/dist/types/sdk/src/analytics/transport.d.ts +91 -0
- package/dist/types/sdk/src/animation/index.d.ts +2 -0
- package/dist/types/sdk/src/animation/useListTransition.d.ts +16 -0
- package/dist/types/sdk/src/animation/useUpdateTransition.d.ts +16 -0
- package/dist/types/sdk/src/canvas/ElementIdContext.d.ts +13 -0
- package/dist/types/sdk/src/canvas/GenerationStyleContext.d.ts +13 -0
- package/dist/types/sdk/src/canvas/ShimmerSweep.d.ts +18 -0
- package/dist/types/sdk/src/canvas/TransitionContext.d.ts +52 -0
- package/dist/types/sdk/src/canvas/canvas-arrangement.d.ts +20 -0
- package/dist/types/sdk/src/canvas/canvas-motion-style.d.ts +18 -0
- package/dist/types/sdk/src/canvas/canvas-outlet.d.ts +14 -0
- package/dist/types/sdk/src/canvas/canvas-tail.d.ts +31 -0
- package/dist/types/sdk/src/canvas/dom-targets.d.ts +140 -0
- package/dist/types/sdk/src/canvas/generation-entrance.d.ts +26 -0
- package/dist/types/sdk/src/canvas/generation-style.d.ts +62 -0
- package/dist/types/sdk/src/canvas/index.d.ts +21 -0
- package/dist/types/sdk/src/canvas/item-motion/ItemTransitionGroup.d.ts +72 -0
- package/dist/types/sdk/src/canvas/item-motion/classify-items.d.ts +24 -0
- package/dist/types/sdk/src/canvas/item-motion/index.d.ts +5 -0
- package/dist/types/sdk/src/canvas/item-motion/plugins/wipe.d.ts +11 -0
- package/dist/types/sdk/src/canvas/item-motion/profile.d.ts +77 -0
- package/dist/types/sdk/src/canvas/item-motion/wipe.d.ts +57 -0
- package/dist/types/sdk/src/canvas/nav-direction.d.ts +22 -0
- package/dist/types/sdk/src/canvas/runtime-context.d.ts +15 -0
- package/dist/types/sdk/src/canvas/runtime-hooks.d.ts +106 -0
- package/dist/types/sdk/src/canvas/runtime-types.d.ts +183 -0
- package/dist/types/sdk/src/canvas/scroll-event-target.d.ts +21 -0
- package/dist/types/sdk/src/canvas/turn-change-anchor.d.ts +34 -0
- package/dist/types/sdk/src/canvas/turn-edit.d.ts +8 -0
- package/dist/types/sdk/src/canvas/use-canvas-actions.d.ts +41 -0
- package/dist/types/sdk/src/canvas/use-fourty-layout.d.ts +19 -0
- package/dist/types/sdk/src/catalog/CatalogContext.d.ts +7 -0
- package/dist/types/sdk/src/catalog/DebugContext.d.ts +5 -0
- package/dist/types/sdk/src/catalog/HydrationStateContext.d.ts +45 -0
- package/dist/types/sdk/src/catalog/HydratorContext.d.ts +7 -0
- package/dist/types/sdk/src/catalog/component-library.d.ts +32 -0
- package/dist/types/sdk/src/catalog/define.d.ts +149 -0
- package/dist/types/sdk/src/catalog/hydrator-registry.d.ts +91 -0
- package/dist/types/sdk/src/catalog/index.d.ts +14 -0
- package/dist/types/sdk/src/catalog/interaction-contract.d.ts +78 -0
- package/dist/types/sdk/src/catalog/normalize-components.d.ts +17 -0
- package/dist/types/sdk/src/catalog/prose-value.d.ts +22 -0
- package/dist/types/sdk/src/catalog/registration/index.d.ts +4 -0
- package/dist/types/sdk/src/catalog/registration/register-component.d.ts +35 -0
- package/dist/types/sdk/src/catalog/registration/registry.d.ts +27 -0
- package/dist/types/sdk/src/catalog/registration/types.d.ts +83 -0
- package/dist/types/sdk/src/catalog/registry.d.ts +22 -0
- package/dist/types/sdk/src/catalog/render-inline.d.ts +39 -0
- package/dist/types/sdk/src/catalog/resolve-hydrators.d.ts +27 -0
- package/dist/types/sdk/src/chat/chat-context.d.ts +40 -0
- package/dist/types/sdk/src/chat/index.d.ts +1 -0
- package/dist/types/sdk/src/client-state/index.d.ts +2 -0
- package/dist/types/sdk/src/client-state/server-store.d.ts +38 -0
- package/dist/types/sdk/src/client-state/store.d.ts +20 -0
- package/dist/types/sdk/src/commerce/commerce-context.d.ts +62 -0
- package/dist/types/sdk/src/commerce/commerce-shapes.d.ts +170 -0
- package/dist/types/sdk/src/commerce/ecommerce/agentic-overlay.d.ts +27 -0
- package/dist/types/sdk/src/commerce/ecommerce/buy-now-exit.d.ts +36 -0
- package/dist/types/sdk/src/commerce/ecommerce/cart-action-failures.d.ts +54 -0
- package/dist/types/sdk/src/commerce/ecommerce/cart-drawer-store.d.ts +18 -0
- package/dist/types/sdk/src/commerce/ecommerce/checkout-handoff-reasons.d.ts +54 -0
- package/dist/types/sdk/src/commerce/ecommerce/checkout-handoff-shape.d.ts +73 -0
- package/dist/types/sdk/src/commerce/ecommerce/checkout-handoff-store.d.ts +39 -0
- package/dist/types/sdk/src/commerce/ecommerce/comparison-rows.d.ts +30 -0
- package/dist/types/sdk/src/commerce/ecommerce/index.d.ts +21 -0
- package/dist/types/sdk/src/commerce/ecommerce/normalize-collection.d.ts +17 -0
- package/dist/types/sdk/src/commerce/ecommerce/preselect-from-facts.d.ts +25 -0
- package/dist/types/sdk/src/commerce/ecommerce/product-filters.d.ts +40 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-buy-now.d.ts +33 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-cart-drawer.d.ts +35 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-cart-line-row.d.ts +30 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-comparison-table.d.ts +22 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-look-card.d.ts +80 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-product-card.d.ts +62 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-product-carousel-scroll.d.ts +13 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-product-detail.d.ts +48 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-product-grid-filter.d.ts +17 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-selected-variants-state.d.ts +8 -0
- package/dist/types/sdk/src/commerce/ecommerce/use-wishlist-drawer.d.ts +34 -0
- package/dist/types/sdk/src/commerce/ecommerce/variant-option-axes.d.ts +56 -0
- package/dist/types/sdk/src/commerce/ecommerce/variant-resolution.d.ts +83 -0
- package/dist/types/sdk/src/commerce/ecommerce/variant-selection.d.ts +22 -0
- package/dist/types/sdk/src/commerce/external-navigation.d.ts +41 -0
- package/dist/types/sdk/src/commerce/index.d.ts +9 -0
- package/dist/types/sdk/src/commerce/option-selection-store.d.ts +8 -0
- package/dist/types/sdk/src/commerce/pending-variant-choice-store.d.ts +20 -0
- package/dist/types/sdk/src/commerce/variant-selection-store.d.ts +7 -0
- package/dist/types/sdk/src/content/index.d.ts +2 -0
- package/dist/types/sdk/src/content/use-faq-accordion.d.ts +11 -0
- package/dist/types/sdk/src/content/use-newsletter-form.d.ts +16 -0
- package/dist/types/sdk/src/host/Spacefront.d.ts +11 -0
- package/dist/types/sdk/src/host/engine-loader.d.ts +14 -0
- package/dist/types/sdk/src/host/host-modules.d.ts +5833 -0
- package/dist/types/sdk/src/host/index.d.ts +4 -0
- package/dist/types/sdk/src/host/types.d.ts +52 -0
- package/dist/types/sdk/src/index.d.ts +21 -0
- package/dist/types/sdk/src/interaction/haptics.d.ts +8 -0
- package/dist/types/sdk/src/interaction/index.d.ts +3 -0
- package/dist/types/sdk/src/interaction/normalize-signals.d.ts +8 -0
- package/dist/types/sdk/src/interaction/withInteractionTracking.d.ts +48 -0
- package/dist/types/sdk/src/npm.d.ts +3 -0
- package/dist/types/sdk/src/projection/ProjectionSignalBridge.d.ts +5 -0
- package/dist/types/sdk/src/projection/index.d.ts +1 -0
- package/dist/types/sdk/src/projection/preferences.d.ts +12 -0
- package/dist/types/sdk/src/projection/transform.d.ts +7 -0
- package/dist/types/sdk/src/provider/AgentAsk.d.ts +16 -0
- package/dist/types/sdk/src/provider/index.d.ts +4 -0
- package/dist/types/sdk/src/provider/providers/handler-registry.d.ts +11 -0
- package/dist/types/sdk/src/provider/use-clamp-toggle.d.ts +22 -0
- package/dist/types/sdk/src/provider/use-timed-flag.d.ts +16 -0
- package/dist/types/sdk/src/rendering/index.d.ts +1 -0
- package/dist/types/sdk/src/rendering/post-hydration.d.ts +37 -0
- package/dist/types/sdk/src/session/FourtySessionContext.d.ts +228 -0
- package/dist/types/sdk/src/session/clear-registry.d.ts +6 -0
- package/dist/types/sdk/src/session/index.d.ts +4 -0
- package/dist/types/sdk/src/session/use-action.d.ts +25 -0
- package/dist/types/sdk/src/session/visitor-locale.d.ts +2 -0
- package/dist/types/sdk/src/shared/index.d.ts +2 -0
- package/dist/types/sdk/src/shared/use-expandable.d.ts +9 -0
- package/dist/types/sdk/src/shared/use-image-hover.d.ts +13 -0
- package/dist/types/sdk/src/shell/ScrollContainerContext.d.ts +25 -0
- package/dist/types/sdk/src/shell/ShellRegistry.d.ts +25 -0
- package/dist/types/sdk/src/shell/ShellRootContext.d.ts +15 -0
- package/dist/types/sdk/src/shell/dock-persistence.d.ts +49 -0
- package/dist/types/sdk/src/shell/exclusive-overlay.d.ts +16 -0
- package/dist/types/sdk/src/shell/index.d.ts +12 -0
- package/dist/types/sdk/src/shell/thread-scroll/ThreadHeadroom.d.ts +11 -0
- package/dist/types/sdk/src/shell/thread-scroll/headroom.d.ts +4 -0
- package/dist/types/sdk/src/shell/thread-scroll/index.d.ts +6 -0
- package/dist/types/sdk/src/shell/thread-scroll/pin-turn-head.d.ts +12 -0
- package/dist/types/sdk/src/shell/thread-scroll/settle-thread-row.d.ts +23 -0
- package/dist/types/sdk/src/shell/thread-scroll/thread-geometry.d.ts +27 -0
- package/dist/types/sdk/src/shell/thread-scroll/thread-row-attr.d.ts +4 -0
- package/dist/types/sdk/src/shell/thread-scroll/use-pin-turn-to-top.d.ts +22 -0
- package/dist/types/sdk/src/shell/thread-scroll/use-scroll-has-more-below.d.ts +19 -0
- package/dist/types/sdk/src/shell/thread-scroll/use-thread-jump-marks.d.ts +28 -0
- package/dist/types/sdk/src/shell/thread-scroll/use-thread-landing.d.ts +1 -0
- package/dist/types/sdk/src/shell/use-composer-chip-select.d.ts +21 -0
- package/dist/types/sdk/src/shell/use-go-home.d.ts +11 -0
- package/dist/types/sdk/src/shell/use-hydrated.d.ts +19 -0
- package/dist/types/sdk/src/shell/use-menu-item-select.d.ts +13 -0
- package/dist/types/sdk/src/shell/use-overridable-toggle.d.ts +24 -0
- package/dist/types/sdk/src/shell/use-thread-rows.d.ts +41 -0
- package/dist/types/sdk/src/social/index.d.ts +2 -0
- package/dist/types/sdk/src/social/use-review-helpful.d.ts +10 -0
- package/dist/types/sdk/src/social/use-testimonials-carousel.d.ts +15 -0
- package/dist/types/sdk/src/utils/core-utils/format-distance.d.ts +6 -0
- package/dist/types/sdk/src/utils/core-utils/format-price.d.ts +7 -0
- package/dist/types/sdk/src/utils/core-utils/index.d.ts +10 -0
- package/dist/types/sdk/src/utils/core-utils/inject-google-fonts.d.ts +17 -0
- package/dist/types/sdk/src/utils/core-utils/is-on-sale.d.ts +6 -0
- package/dist/types/sdk/src/utils/core-utils/is-video-url.d.ts +6 -0
- package/dist/types/sdk/src/utils/core-utils/maps-directions-url.d.ts +5 -0
- package/dist/types/sdk/src/utils/core-utils/mint-id.d.ts +10 -0
- package/dist/types/sdk/src/utils/core-utils/resolve-swatch-color.d.ts +2 -0
- package/dist/types/sdk/src/utils/core-utils/validate-all.d.ts +13 -0
- package/dist/types/sdk/src/utils/index.d.ts +10 -0
- package/dist/types/sdk/src/utils/storage.d.ts +9 -0
- package/dist/types/sdk/src/utils/use-document-visible.d.ts +9 -0
- package/dist/types/sdk/src/utils/use-form-factor.d.ts +24 -0
- package/dist/types/sdk/src/utils/use-inline-completion.d.ts +48 -0
- package/dist/types/sdk/src/utils/use-interval.d.ts +7 -0
- package/dist/types/sdk/src/utils/use-success-flash.d.ts +35 -0
- package/dist/types/sdk/src/utils/use-wake-lock.d.ts +15 -0
- package/dist/types/sdk/src/utils/viewport-window.d.ts +39 -0
- package/dist/types/sdk/src/voice/index.d.ts +2 -0
- package/dist/types/sdk/src/voice/use-dictation.d.ts +80 -0
- package/dist/types/sdk/src/voice/use-voice-capture.d.ts +65 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/fact-form-registry.d.ts +43 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/fact-shape.d.ts +70 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/form-registry.d.ts +28 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/knowledge.d.ts +18 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/presence-restore.d.ts +13 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/presence-stream.d.ts +64 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/source-form-registry.d.ts +129 -0
- package/dist/types/sdk/src/widgets/presence/core-presence/standing-signal-store.d.ts +19 -0
- package/dist/types/sdk/src/widgets/presence/flows/flow-store.d.ts +22 -0
- package/dist/types/sdk/src/widgets/presence/index.d.ts +17 -0
- package/dist/types/sdk/src/widgets/presence/runtime-context.d.ts +109 -0
- package/dist/types/sdk/src/widgets/presence/use-layout-entity-ids.d.ts +12 -0
- package/dist/types/sdk/src/widgets/presence/use-optimistic-facts.d.ts +43 -0
- package/dist/types/sdk/src/widgets/presence/use-optimistic-flow-set.d.ts +24 -0
- package/dist/types/sdk/src/widgets/presence/use-presence-notch.d.ts +75 -0
- package/dist/types/sdk/src/widgets/presence/use-presence.d.ts +45 -0
- package/dist/types/sdk/src/widgets/presence/use-standing-signal.d.ts +12 -0
- package/dist/types/spacestation/src/analytics/catalog.d.ts +89 -0
- package/dist/types/spacestation/src/analytics/ecommerce/events.d.ts +183 -0
- package/dist/types/spacestation/src/analytics/ecommerce/funnel.d.ts +22 -0
- package/dist/types/spacestation/src/analytics/ecommerce/index.d.ts +14 -0
- package/dist/types/spacestation/src/analytics/ecommerce/surfacing.d.ts +42 -0
- package/dist/types/spacestation/src/analytics/envelope.d.ts +222 -0
- package/dist/types/spacestation/src/analytics/index.d.ts +28 -0
- package/dist/types/spacestation/src/analytics/kind.d.ts +155 -0
- package/dist/types/spacestation/src/analytics/session.d.ts +35 -0
- package/dist/types/spacestation/src/attachment/attachment.d.ts +83 -0
- package/dist/types/spacestation/src/catalog/attribute-registry.d.ts +148 -0
- package/dist/types/spacestation/src/catalog/attribute-scope.d.ts +41 -0
- package/dist/types/spacestation/src/catalog/canvas-arrangement.d.ts +43 -0
- package/dist/types/spacestation/src/catalog/catalog-schemas.d.ts +264 -0
- package/dist/types/spacestation/src/catalog/config.d.ts +13 -0
- package/dist/types/spacestation/src/catalog/derive-props-doc.d.ts +11 -0
- package/dist/types/spacestation/src/catalog/element-filled.d.ts +77 -0
- package/dist/types/spacestation/src/catalog/entity-refs.d.ts +14 -0
- package/dist/types/spacestation/src/catalog/function-props.d.ts +23 -0
- package/dist/types/spacestation/src/catalog/hydration-paths.d.ts +19 -0
- package/dist/types/spacestation/src/catalog/prose.d.ts +60 -0
- package/dist/types/spacestation/src/catalog/ref-sites.d.ts +45 -0
- package/dist/types/spacestation/src/catalog/required-props.d.ts +31 -0
- package/dist/types/spacestation/src/catalog/resolved.d.ts +145 -0
- package/dist/types/spacestation/src/catalog/structural-baseline.d.ts +7 -0
- package/dist/types/spacestation/src/catalog/wire/catalog-wire.d.ts +191 -0
- package/dist/types/spacestation/src/catalog/wire/index.d.ts +5 -0
- package/dist/types/spacestation/src/catalog/wire/package-release.d.ts +351 -0
- package/dist/types/spacestation/src/catalog/wire/schema-from-wire.d.ts +7 -0
- package/dist/types/spacestation/src/catalog/wire/schema-to-wire.d.ts +8 -0
- package/dist/types/spacestation/src/catalog/wire/wire-schema.d.ts +78 -0
- package/dist/types/spacestation/src/commerce/cart-add-signal.d.ts +125 -0
- package/dist/types/spacestation/src/commerce/cart-state.d.ts +87 -0
- package/dist/types/spacestation/src/commerce/cart-verb-signals.d.ts +80 -0
- package/dist/types/spacestation/src/commerce/page-kinds.d.ts +40 -0
- package/dist/types/spacestation/src/commerce/selection-signal.d.ts +25 -0
- package/dist/types/spacestation/src/contracts/entry-context.d.ts +35 -0
- package/dist/types/spacestation/src/contracts/knowledge/index.d.ts +12 -0
- package/dist/types/spacestation/src/contracts/knowledge/types.d.ts +238 -0
- package/dist/types/spacestation/src/contracts/retrieval/core/knowledge-source.d.ts +36 -0
- package/dist/types/spacestation/src/contracts/retrieval/core/platform-connector.d.ts +49 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/articles/source.d.ts +3 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/articles/types.d.ts +29 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/client.d.ts +238 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/collections/source.d.ts +3 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/collections/types.d.ts +23 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/connector.d.ts +11 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/domains.d.ts +27 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/faq/source.d.ts +3 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/faq/types.d.ts +21 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/option-values.d.ts +71 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/policies/source.d.ts +3 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/policies/types.d.ts +18 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/products/source.d.ts +5 -0
- package/dist/types/spacestation/src/contracts/retrieval/ecommerce/products/types.d.ts +47 -0
- package/dist/types/spacestation/src/contracts/retrieval/index.d.ts +25 -0
- package/dist/types/spacestation/src/contracts/session-arrival-params.d.ts +32 -0
- package/dist/types/spacestation/src/contracts/session-arrival.d.ts +215 -0
- package/dist/types/spacestation/src/contracts/tools/definitions.d.ts +139 -0
- package/dist/types/spacestation/src/contracts/tools/execution-context.d.ts +135 -0
- package/dist/types/spacestation/src/contracts/tools/index.d.ts +9 -0
- package/dist/types/spacestation/src/contracts/tools/types.d.ts +163 -0
- package/dist/types/spacestation/src/focus/focus.d.ts +12 -0
- package/dist/types/spacestation/src/hydration/hydration.d.ts +46 -0
- package/dist/types/spacestation/src/index.d.ts +71 -0
- package/dist/types/spacestation/src/layout/apply-patch.d.ts +17 -0
- package/dist/types/spacestation/src/layout/conversation.d.ts +136 -0
- package/dist/types/spacestation/src/layout/layout-diff.d.ts +17 -0
- package/dist/types/spacestation/src/layout/layout.d.ts +275 -0
- package/dist/types/spacestation/src/layout/page.d.ts +244 -0
- package/dist/types/spacestation/src/layout/patch.d.ts +92 -0
- package/dist/types/spacestation/src/layout/reduce-patch.d.ts +19 -0
- package/dist/types/spacestation/src/layout/reserved-ids.d.ts +13 -0
- package/dist/types/spacestation/src/projection/projection.d.ts +249 -0
- package/dist/types/spacestation/src/shell/shell.d.ts +109 -0
- package/dist/types/spacestation/src/signal/agent-signals.d.ts +539 -0
- package/dist/types/spacestation/src/space/connector.d.ts +61 -0
- package/dist/types/spacestation/src/space/generation-job.d.ts +4 -0
- package/dist/types/spacestation/src/space/hosting.d.ts +36 -0
- package/dist/types/spacestation/src/space/manifest.d.ts +8 -0
- package/dist/types/spacestation/src/space/package-version.d.ts +18 -0
- package/dist/types/spacestation/src/space/package.d.ts +35 -0
- package/dist/types/spacestation/src/space/prompt-config.d.ts +17 -0
- package/dist/types/spacestation/src/space/session-activity.d.ts +71 -0
- package/dist/types/spacestation/src/space/session-queue.d.ts +2147 -0
- package/dist/types/spacestation/src/space/space-config.d.ts +96 -0
- package/dist/types/spacestation/src/space/space-otp.d.ts +18 -0
- package/dist/types/spacestation/src/space/space.d.ts +104 -0
- package/dist/types/spacestation/src/space/tool-manifest.d.ts +8 -0
- package/dist/types/spacestation/src/space/trace.d.ts +555 -0
- package/dist/types/spacestation/src/space/workspace-catalog.d.ts +112 -0
- package/dist/types/spacestation/src/tool-compression/compress.d.ts +88 -0
- package/dist/types/spacestation/src/tool-compression/index.d.ts +11 -0
- package/dist/types/spacestation/src/tool-compression/scoring.d.ts +38 -0
- package/dist/types/spacestation/src/tool-compression/tokenize.d.ts +29 -0
- package/dist/types/spacestation/src/trace/trace-data.d.ts +126 -0
- package/dist/types/spacestation/src/trace/trace-diagnostics.d.ts +224 -0
- package/dist/types/spacestation/src/trace/trace-envelopes.d.ts +144 -0
- package/dist/types/spacestation/src/trace/trace-events.d.ts +450 -0
- package/dist/types/spacestation/src/types.d.ts +253 -0
- package/dist/types/spacestation/src/view/continuation.d.ts +45 -0
- package/dist/types/spacestation/src/widgets/presence/element.d.ts +241 -0
- package/dist/types/spacestation/src/widgets/presence/frame.d.ts +56 -0
- package/dist/types/spacestation/src/widgets/presence/index.d.ts +4 -0
- package/dist/types/spacestation/src/widgets/presence/profile.d.ts +75 -0
- package/dist/types/spacestation/src/widgets/presence/scan.d.ts +45 -0
- package/package.json +43 -0
|
@@ -0,0 +1,1813 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const MoneySchema: z.ZodObject<{
|
|
3
|
+
amount: z.ZodNumber;
|
|
4
|
+
currencyCode: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
currencyCode: string;
|
|
7
|
+
amount: number;
|
|
8
|
+
}, {
|
|
9
|
+
currencyCode: string;
|
|
10
|
+
amount: number;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const ImageSchema: z.ZodObject<{
|
|
13
|
+
url: z.ZodString;
|
|
14
|
+
altText: z.ZodString;
|
|
15
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
/** Responsive candidate set, resolved at the commerce-adapter boundary —
|
|
18
|
+
* never computed in a component. Renderers use it as `<img srcSet>` paired
|
|
19
|
+
* with a layout `sizes`. Absent for non-CDN / unsizable images. */
|
|
20
|
+
srcSet: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
url: string;
|
|
23
|
+
altText: string;
|
|
24
|
+
width?: number | undefined;
|
|
25
|
+
height?: number | undefined;
|
|
26
|
+
srcSet?: string | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
url: string;
|
|
29
|
+
altText: string;
|
|
30
|
+
width?: number | undefined;
|
|
31
|
+
height?: number | undefined;
|
|
32
|
+
srcSet?: string | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* A hydrated editorial / campaign asset — the resolved form of a
|
|
36
|
+
* `resolved('asset')` ref. The agent emits the `id`; the client asset hydrator
|
|
37
|
+
* resolves it to this shape (attaching `srcSet`). Distinct from a product image
|
|
38
|
+
* (`Image`): an asset is a standalone campaign photograph, not a product cutout.
|
|
39
|
+
*/
|
|
40
|
+
export declare const AssetSchema: z.ZodObject<{
|
|
41
|
+
/** Opaque asset id — the `resolved()` ref the agent emitted. */
|
|
42
|
+
id: z.ZodString;
|
|
43
|
+
url: z.ZodString;
|
|
44
|
+
altText: z.ZodString;
|
|
45
|
+
srcSet: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
id: string;
|
|
48
|
+
url: string;
|
|
49
|
+
altText: string;
|
|
50
|
+
srcSet?: string | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
id: string;
|
|
53
|
+
url: string;
|
|
54
|
+
altText: string;
|
|
55
|
+
srcSet?: string | undefined;
|
|
56
|
+
}>;
|
|
57
|
+
export declare const SelectedOptionSchema: z.ZodObject<{
|
|
58
|
+
name: z.ZodString;
|
|
59
|
+
value: z.ZodString;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
value: string;
|
|
62
|
+
name: string;
|
|
63
|
+
}, {
|
|
64
|
+
value: string;
|
|
65
|
+
name: string;
|
|
66
|
+
}>;
|
|
67
|
+
/** A playable source for a Shopify-hosted product video (`Video` media
|
|
68
|
+
* type) — mirrors Storefront `VideoSource`. Multiple sources are the
|
|
69
|
+
* same clip transcoded to different formats/resolutions; renderers pick
|
|
70
|
+
* the first the browser can play. */
|
|
71
|
+
export declare const VideoSourceSchema: z.ZodObject<{
|
|
72
|
+
url: z.ZodString;
|
|
73
|
+
mimeType: z.ZodString;
|
|
74
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
mimeType: string;
|
|
78
|
+
url: string;
|
|
79
|
+
width?: number | undefined;
|
|
80
|
+
height?: number | undefined;
|
|
81
|
+
}, {
|
|
82
|
+
mimeType: string;
|
|
83
|
+
url: string;
|
|
84
|
+
width?: number | undefined;
|
|
85
|
+
height?: number | undefined;
|
|
86
|
+
}>;
|
|
87
|
+
/**
|
|
88
|
+
* A product video. Shopify models two media kinds and they render
|
|
89
|
+
* differently, so the shape discriminates on `kind`:
|
|
90
|
+
* - `hosted` — Shopify-hosted file (`Video`). Playable `sources[]`.
|
|
91
|
+
* - `external` — YouTube/Vimeo embed (`ExternalVideo`). Iframe `embedUrl`.
|
|
92
|
+
* `previewImage` is the poster frame both kinds carry.
|
|
93
|
+
*/
|
|
94
|
+
export declare const ProductVideoSchema: z.ZodObject<{
|
|
95
|
+
kind: z.ZodEnum<["hosted", "external"]>;
|
|
96
|
+
previewImage: z.ZodOptional<z.ZodObject<{
|
|
97
|
+
url: z.ZodString;
|
|
98
|
+
altText: z.ZodString;
|
|
99
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
101
|
+
/** Responsive candidate set, resolved at the commerce-adapter boundary —
|
|
102
|
+
* never computed in a component. Renderers use it as `<img srcSet>` paired
|
|
103
|
+
* with a layout `sizes`. Absent for non-CDN / unsizable images. */
|
|
104
|
+
srcSet: z.ZodOptional<z.ZodString>;
|
|
105
|
+
}, "strip", z.ZodTypeAny, {
|
|
106
|
+
url: string;
|
|
107
|
+
altText: string;
|
|
108
|
+
width?: number | undefined;
|
|
109
|
+
height?: number | undefined;
|
|
110
|
+
srcSet?: string | undefined;
|
|
111
|
+
}, {
|
|
112
|
+
url: string;
|
|
113
|
+
altText: string;
|
|
114
|
+
width?: number | undefined;
|
|
115
|
+
height?: number | undefined;
|
|
116
|
+
srcSet?: string | undefined;
|
|
117
|
+
}>>;
|
|
118
|
+
altText: z.ZodDefault<z.ZodString>;
|
|
119
|
+
/** `kind: 'hosted'` only — empty for external embeds. */
|
|
120
|
+
sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
121
|
+
url: z.ZodString;
|
|
122
|
+
mimeType: z.ZodString;
|
|
123
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
124
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
125
|
+
}, "strip", z.ZodTypeAny, {
|
|
126
|
+
mimeType: string;
|
|
127
|
+
url: string;
|
|
128
|
+
width?: number | undefined;
|
|
129
|
+
height?: number | undefined;
|
|
130
|
+
}, {
|
|
131
|
+
mimeType: string;
|
|
132
|
+
url: string;
|
|
133
|
+
width?: number | undefined;
|
|
134
|
+
height?: number | undefined;
|
|
135
|
+
}>, "many">>;
|
|
136
|
+
/** `kind: 'external'` only — iframe embed URL. */
|
|
137
|
+
embedUrl: z.ZodOptional<z.ZodString>;
|
|
138
|
+
/** `kind: 'external'` only — e.g. `YOUTUBE` | `VIMEO`. */
|
|
139
|
+
host: z.ZodOptional<z.ZodString>;
|
|
140
|
+
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
kind: "hosted" | "external";
|
|
142
|
+
altText: string;
|
|
143
|
+
sources: {
|
|
144
|
+
mimeType: string;
|
|
145
|
+
url: string;
|
|
146
|
+
width?: number | undefined;
|
|
147
|
+
height?: number | undefined;
|
|
148
|
+
}[];
|
|
149
|
+
previewImage?: {
|
|
150
|
+
url: string;
|
|
151
|
+
altText: string;
|
|
152
|
+
width?: number | undefined;
|
|
153
|
+
height?: number | undefined;
|
|
154
|
+
srcSet?: string | undefined;
|
|
155
|
+
} | undefined;
|
|
156
|
+
embedUrl?: string | undefined;
|
|
157
|
+
host?: string | undefined;
|
|
158
|
+
}, {
|
|
159
|
+
kind: "hosted" | "external";
|
|
160
|
+
altText?: string | undefined;
|
|
161
|
+
previewImage?: {
|
|
162
|
+
url: string;
|
|
163
|
+
altText: string;
|
|
164
|
+
width?: number | undefined;
|
|
165
|
+
height?: number | undefined;
|
|
166
|
+
srcSet?: string | undefined;
|
|
167
|
+
} | undefined;
|
|
168
|
+
sources?: {
|
|
169
|
+
mimeType: string;
|
|
170
|
+
url: string;
|
|
171
|
+
width?: number | undefined;
|
|
172
|
+
height?: number | undefined;
|
|
173
|
+
}[] | undefined;
|
|
174
|
+
embedUrl?: string | undefined;
|
|
175
|
+
host?: string | undefined;
|
|
176
|
+
}>;
|
|
177
|
+
/**
|
|
178
|
+
* Why a variant can or cannot be bought right now — UCP's `availability.status`
|
|
179
|
+
* vocabulary (`shopping/types/variant.json` at spec release v2026-04-08).
|
|
180
|
+
*
|
|
181
|
+
* `available: boolean` alone cannot answer the question a shopper actually
|
|
182
|
+
* asks. "Sold out", "on backorder, ships later" and "discontinued" are three
|
|
183
|
+
* different answers, and flattening them to `false` is what left the agent
|
|
184
|
+
* saying a size was addable when the store would not sell it, and forced every
|
|
185
|
+
* refusal sentence to be hand-written with no idea which case it was in.
|
|
186
|
+
*
|
|
187
|
+
* Deliberately kept as a CLOSED set even though UCP calls these "well-known"
|
|
188
|
+
* (i.e. extensible): a status our code cannot branch on is worse than none, so
|
|
189
|
+
* an adapter that meets an unfamiliar value reports absence — unknown — rather
|
|
190
|
+
* than passing through a string nothing reads — UCP's own generated type has
|
|
191
|
+
* `status: string`, which our callers could not branch on. Borrowing the
|
|
192
|
+
* VOCABULARY inward while keeping this contract ours is the standing division;
|
|
193
|
+
* see `docs/research-commerce-contract-standards.md`.
|
|
194
|
+
*/
|
|
195
|
+
export declare const AvailabilityStatusSchema: z.ZodEnum<["in_stock", "backorder", "preorder", "out_of_stock", "discontinued"]>;
|
|
196
|
+
export type AvailabilityStatus = z.infer<typeof AvailabilityStatusSchema>;
|
|
197
|
+
export declare const ProductVariantSchema: z.ZodObject<{
|
|
198
|
+
id: z.ZodString;
|
|
199
|
+
title: z.ZodString;
|
|
200
|
+
available: z.ZodBoolean;
|
|
201
|
+
/**
|
|
202
|
+
* Qualifies `available` with the fulfillment state behind it. Absent means
|
|
203
|
+
* the backend did not say — which is NOT the same as in stock, and must not
|
|
204
|
+
* be narrated as either. `available` stays the buyability check; this is the
|
|
205
|
+
* reason, and it exists so a refusal can be specific.
|
|
206
|
+
*
|
|
207
|
+
* Additive on purpose: this is the expand half of the UCP convergence, not
|
|
208
|
+
* its final shape. UCP nests both under `availability: {available, status}`;
|
|
209
|
+
* collapsing to that is a breaking change for every `variant.available`
|
|
210
|
+
* reader and belongs in the same release as the rest of the shape work.
|
|
211
|
+
*/
|
|
212
|
+
availabilityStatus: z.ZodOptional<z.ZodEnum<["in_stock", "backorder", "preorder", "out_of_stock", "discontinued"]>>;
|
|
213
|
+
price: z.ZodObject<{
|
|
214
|
+
amount: z.ZodNumber;
|
|
215
|
+
currencyCode: z.ZodString;
|
|
216
|
+
}, "strip", z.ZodTypeAny, {
|
|
217
|
+
currencyCode: string;
|
|
218
|
+
amount: number;
|
|
219
|
+
}, {
|
|
220
|
+
currencyCode: string;
|
|
221
|
+
amount: number;
|
|
222
|
+
}>;
|
|
223
|
+
compareAtPrice: z.ZodOptional<z.ZodObject<{
|
|
224
|
+
amount: z.ZodNumber;
|
|
225
|
+
currencyCode: z.ZodString;
|
|
226
|
+
}, "strip", z.ZodTypeAny, {
|
|
227
|
+
currencyCode: string;
|
|
228
|
+
amount: number;
|
|
229
|
+
}, {
|
|
230
|
+
currencyCode: string;
|
|
231
|
+
amount: number;
|
|
232
|
+
}>>;
|
|
233
|
+
selectedOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
234
|
+
name: z.ZodString;
|
|
235
|
+
value: z.ZodString;
|
|
236
|
+
}, "strip", z.ZodTypeAny, {
|
|
237
|
+
value: string;
|
|
238
|
+
name: string;
|
|
239
|
+
}, {
|
|
240
|
+
value: string;
|
|
241
|
+
name: string;
|
|
242
|
+
}>, "many">>;
|
|
243
|
+
image: z.ZodOptional<z.ZodObject<{
|
|
244
|
+
url: z.ZodString;
|
|
245
|
+
altText: z.ZodString;
|
|
246
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
247
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
248
|
+
/** Responsive candidate set, resolved at the commerce-adapter boundary —
|
|
249
|
+
* never computed in a component. Renderers use it as `<img srcSet>` paired
|
|
250
|
+
* with a layout `sizes`. Absent for non-CDN / unsizable images. */
|
|
251
|
+
srcSet: z.ZodOptional<z.ZodString>;
|
|
252
|
+
}, "strip", z.ZodTypeAny, {
|
|
253
|
+
url: string;
|
|
254
|
+
altText: string;
|
|
255
|
+
width?: number | undefined;
|
|
256
|
+
height?: number | undefined;
|
|
257
|
+
srcSet?: string | undefined;
|
|
258
|
+
}, {
|
|
259
|
+
url: string;
|
|
260
|
+
altText: string;
|
|
261
|
+
width?: number | undefined;
|
|
262
|
+
height?: number | undefined;
|
|
263
|
+
srcSet?: string | undefined;
|
|
264
|
+
}>>;
|
|
265
|
+
}, "strip", z.ZodTypeAny, {
|
|
266
|
+
id: string;
|
|
267
|
+
title: string;
|
|
268
|
+
available: boolean;
|
|
269
|
+
price: {
|
|
270
|
+
currencyCode: string;
|
|
271
|
+
amount: number;
|
|
272
|
+
};
|
|
273
|
+
image?: {
|
|
274
|
+
url: string;
|
|
275
|
+
altText: string;
|
|
276
|
+
width?: number | undefined;
|
|
277
|
+
height?: number | undefined;
|
|
278
|
+
srcSet?: string | undefined;
|
|
279
|
+
} | undefined;
|
|
280
|
+
availabilityStatus?: "in_stock" | "backorder" | "preorder" | "out_of_stock" | "discontinued" | undefined;
|
|
281
|
+
compareAtPrice?: {
|
|
282
|
+
currencyCode: string;
|
|
283
|
+
amount: number;
|
|
284
|
+
} | undefined;
|
|
285
|
+
selectedOptions?: {
|
|
286
|
+
value: string;
|
|
287
|
+
name: string;
|
|
288
|
+
}[] | undefined;
|
|
289
|
+
}, {
|
|
290
|
+
id: string;
|
|
291
|
+
title: string;
|
|
292
|
+
available: boolean;
|
|
293
|
+
price: {
|
|
294
|
+
currencyCode: string;
|
|
295
|
+
amount: number;
|
|
296
|
+
};
|
|
297
|
+
image?: {
|
|
298
|
+
url: string;
|
|
299
|
+
altText: string;
|
|
300
|
+
width?: number | undefined;
|
|
301
|
+
height?: number | undefined;
|
|
302
|
+
srcSet?: string | undefined;
|
|
303
|
+
} | undefined;
|
|
304
|
+
availabilityStatus?: "in_stock" | "backorder" | "preorder" | "out_of_stock" | "discontinued" | undefined;
|
|
305
|
+
compareAtPrice?: {
|
|
306
|
+
currencyCode: string;
|
|
307
|
+
amount: number;
|
|
308
|
+
} | undefined;
|
|
309
|
+
selectedOptions?: {
|
|
310
|
+
value: string;
|
|
311
|
+
name: string;
|
|
312
|
+
}[] | undefined;
|
|
313
|
+
}>;
|
|
314
|
+
export type Money = z.infer<typeof MoneySchema>;
|
|
315
|
+
export type Image = z.infer<typeof ImageSchema>;
|
|
316
|
+
export type Asset = z.infer<typeof AssetSchema>;
|
|
317
|
+
export type SelectedOption = z.infer<typeof SelectedOptionSchema>;
|
|
318
|
+
export type ProductVariant = z.infer<typeof ProductVariantSchema>;
|
|
319
|
+
export type VideoSource = z.infer<typeof VideoSourceSchema>;
|
|
320
|
+
export type ProductVideo = z.infer<typeof ProductVideoSchema>;
|
|
321
|
+
/**
|
|
322
|
+
* Order a hosted video's sources best-first for a `<video>` element:
|
|
323
|
+
* MP4 by descending resolution (the browser plays the first `<source>` it
|
|
324
|
+
* supports), then the HLS manifest as a Safari-only fallback. External
|
|
325
|
+
* embeds carry no `sources` — returns `[]`. Shared by every renderer so
|
|
326
|
+
* the hosted-vs-external + codec preference lives in one place.
|
|
327
|
+
*/
|
|
328
|
+
export declare function orderedVideoSources(video: ProductVideo): VideoSource[];
|
|
329
|
+
/**
|
|
330
|
+
* Sibling products grouped by a shared parent (typically color). Many
|
|
331
|
+
* Shopify merchants (Steve Madden, Nordstrom, etc.) model each color as
|
|
332
|
+
* a standalone product joined to its siblings via a tag / metafield
|
|
333
|
+
* convention — so the "color picker" the visitor sees on a PDP is really
|
|
334
|
+
* a navigator across sibling products, not an in-product variant axis.
|
|
335
|
+
*
|
|
336
|
+
* Populated by the platform hydrator (Shopify provider parses
|
|
337
|
+
* `#sibling-handle` tags by default). Empty when the product has no
|
|
338
|
+
* declared siblings. The currently-displayed product appears in this
|
|
339
|
+
* list with `current: true` so the renderer doesn't have to fall back
|
|
340
|
+
* to identity-by-id at every render.
|
|
341
|
+
*/
|
|
342
|
+
export declare const SiblingProductSchema: z.ZodObject<{
|
|
343
|
+
id: z.ZodString;
|
|
344
|
+
handle: z.ZodString;
|
|
345
|
+
title: z.ZodString;
|
|
346
|
+
/** The differentiating value across siblings — typically the color
|
|
347
|
+
* label ("OLIVE", "STONE"). Rendered next to the swatch row. */
|
|
348
|
+
color: z.ZodString;
|
|
349
|
+
/** Swatch artwork. Hydrators populate from the sibling product's
|
|
350
|
+
* first image; renderers crop / fit to the swatch tile. */
|
|
351
|
+
swatchImage: z.ZodOptional<z.ZodObject<{
|
|
352
|
+
url: z.ZodString;
|
|
353
|
+
altText: z.ZodString;
|
|
354
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
355
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
356
|
+
/** Responsive candidate set, resolved at the commerce-adapter boundary —
|
|
357
|
+
* never computed in a component. Renderers use it as `<img srcSet>` paired
|
|
358
|
+
* with a layout `sizes`. Absent for non-CDN / unsizable images. */
|
|
359
|
+
srcSet: z.ZodOptional<z.ZodString>;
|
|
360
|
+
}, "strip", z.ZodTypeAny, {
|
|
361
|
+
url: string;
|
|
362
|
+
altText: string;
|
|
363
|
+
width?: number | undefined;
|
|
364
|
+
height?: number | undefined;
|
|
365
|
+
srcSet?: string | undefined;
|
|
366
|
+
}, {
|
|
367
|
+
url: string;
|
|
368
|
+
altText: string;
|
|
369
|
+
width?: number | undefined;
|
|
370
|
+
height?: number | undefined;
|
|
371
|
+
srcSet?: string | undefined;
|
|
372
|
+
}>>;
|
|
373
|
+
available: z.ZodDefault<z.ZodBoolean>;
|
|
374
|
+
/** Marks the sibling that IS the currently-rendered product. The
|
|
375
|
+
* picker uses this to highlight the active swatch without an
|
|
376
|
+
* external id comparison. */
|
|
377
|
+
current: z.ZodDefault<z.ZodBoolean>;
|
|
378
|
+
}, "strip", z.ZodTypeAny, {
|
|
379
|
+
id: string;
|
|
380
|
+
handle: string;
|
|
381
|
+
title: string;
|
|
382
|
+
available: boolean;
|
|
383
|
+
color: string;
|
|
384
|
+
current: boolean;
|
|
385
|
+
swatchImage?: {
|
|
386
|
+
url: string;
|
|
387
|
+
altText: string;
|
|
388
|
+
width?: number | undefined;
|
|
389
|
+
height?: number | undefined;
|
|
390
|
+
srcSet?: string | undefined;
|
|
391
|
+
} | undefined;
|
|
392
|
+
}, {
|
|
393
|
+
id: string;
|
|
394
|
+
handle: string;
|
|
395
|
+
title: string;
|
|
396
|
+
color: string;
|
|
397
|
+
available?: boolean | undefined;
|
|
398
|
+
swatchImage?: {
|
|
399
|
+
url: string;
|
|
400
|
+
altText: string;
|
|
401
|
+
width?: number | undefined;
|
|
402
|
+
height?: number | undefined;
|
|
403
|
+
srcSet?: string | undefined;
|
|
404
|
+
} | undefined;
|
|
405
|
+
current?: boolean | undefined;
|
|
406
|
+
}>;
|
|
407
|
+
export type SiblingProduct = z.infer<typeof SiblingProductSchema>;
|
|
408
|
+
export declare const ProductSchema: z.ZodObject<{
|
|
409
|
+
id: z.ZodString;
|
|
410
|
+
handle: z.ZodDefault<z.ZodString>;
|
|
411
|
+
title: z.ZodString;
|
|
412
|
+
description: z.ZodDefault<z.ZodString>;
|
|
413
|
+
descriptionHtml: z.ZodOptional<z.ZodString>;
|
|
414
|
+
vendor: z.ZodDefault<z.ZodString>;
|
|
415
|
+
productType: z.ZodOptional<z.ZodString>;
|
|
416
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
417
|
+
price: z.ZodDefault<z.ZodObject<{
|
|
418
|
+
amount: z.ZodNumber;
|
|
419
|
+
currencyCode: z.ZodString;
|
|
420
|
+
}, "strip", z.ZodTypeAny, {
|
|
421
|
+
currencyCode: string;
|
|
422
|
+
amount: number;
|
|
423
|
+
}, {
|
|
424
|
+
currencyCode: string;
|
|
425
|
+
amount: number;
|
|
426
|
+
}>>;
|
|
427
|
+
compareAtPrice: z.ZodOptional<z.ZodObject<{
|
|
428
|
+
amount: z.ZodNumber;
|
|
429
|
+
currencyCode: z.ZodString;
|
|
430
|
+
}, "strip", z.ZodTypeAny, {
|
|
431
|
+
currencyCode: string;
|
|
432
|
+
amount: number;
|
|
433
|
+
}, {
|
|
434
|
+
currencyCode: string;
|
|
435
|
+
amount: number;
|
|
436
|
+
}>>;
|
|
437
|
+
images: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
438
|
+
url: z.ZodString;
|
|
439
|
+
altText: z.ZodString;
|
|
440
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
441
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
442
|
+
/** Responsive candidate set, resolved at the commerce-adapter boundary —
|
|
443
|
+
* never computed in a component. Renderers use it as `<img srcSet>` paired
|
|
444
|
+
* with a layout `sizes`. Absent for non-CDN / unsizable images. */
|
|
445
|
+
srcSet: z.ZodOptional<z.ZodString>;
|
|
446
|
+
}, "strip", z.ZodTypeAny, {
|
|
447
|
+
url: string;
|
|
448
|
+
altText: string;
|
|
449
|
+
width?: number | undefined;
|
|
450
|
+
height?: number | undefined;
|
|
451
|
+
srcSet?: string | undefined;
|
|
452
|
+
}, {
|
|
453
|
+
url: string;
|
|
454
|
+
altText: string;
|
|
455
|
+
width?: number | undefined;
|
|
456
|
+
height?: number | undefined;
|
|
457
|
+
srcSet?: string | undefined;
|
|
458
|
+
}>, "many">>;
|
|
459
|
+
/**
|
|
460
|
+
* Product videos (`Video` + `ExternalVideo` media). Shopify's MCP
|
|
461
|
+
* catalog drops video media — it only surfaces through the Storefront
|
|
462
|
+
* API product fetch, so this populates exclusively via the hydration
|
|
463
|
+
* boundary. Default `[]` so renderers gate on `length > 0` without a
|
|
464
|
+
* presence guard.
|
|
465
|
+
*/
|
|
466
|
+
videos: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
467
|
+
kind: z.ZodEnum<["hosted", "external"]>;
|
|
468
|
+
previewImage: z.ZodOptional<z.ZodObject<{
|
|
469
|
+
url: z.ZodString;
|
|
470
|
+
altText: z.ZodString;
|
|
471
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
472
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
473
|
+
/** Responsive candidate set, resolved at the commerce-adapter boundary —
|
|
474
|
+
* never computed in a component. Renderers use it as `<img srcSet>` paired
|
|
475
|
+
* with a layout `sizes`. Absent for non-CDN / unsizable images. */
|
|
476
|
+
srcSet: z.ZodOptional<z.ZodString>;
|
|
477
|
+
}, "strip", z.ZodTypeAny, {
|
|
478
|
+
url: string;
|
|
479
|
+
altText: string;
|
|
480
|
+
width?: number | undefined;
|
|
481
|
+
height?: number | undefined;
|
|
482
|
+
srcSet?: string | undefined;
|
|
483
|
+
}, {
|
|
484
|
+
url: string;
|
|
485
|
+
altText: string;
|
|
486
|
+
width?: number | undefined;
|
|
487
|
+
height?: number | undefined;
|
|
488
|
+
srcSet?: string | undefined;
|
|
489
|
+
}>>;
|
|
490
|
+
altText: z.ZodDefault<z.ZodString>;
|
|
491
|
+
/** `kind: 'hosted'` only — empty for external embeds. */
|
|
492
|
+
sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
493
|
+
url: z.ZodString;
|
|
494
|
+
mimeType: z.ZodString;
|
|
495
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
496
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
497
|
+
}, "strip", z.ZodTypeAny, {
|
|
498
|
+
mimeType: string;
|
|
499
|
+
url: string;
|
|
500
|
+
width?: number | undefined;
|
|
501
|
+
height?: number | undefined;
|
|
502
|
+
}, {
|
|
503
|
+
mimeType: string;
|
|
504
|
+
url: string;
|
|
505
|
+
width?: number | undefined;
|
|
506
|
+
height?: number | undefined;
|
|
507
|
+
}>, "many">>;
|
|
508
|
+
/** `kind: 'external'` only — iframe embed URL. */
|
|
509
|
+
embedUrl: z.ZodOptional<z.ZodString>;
|
|
510
|
+
/** `kind: 'external'` only — e.g. `YOUTUBE` | `VIMEO`. */
|
|
511
|
+
host: z.ZodOptional<z.ZodString>;
|
|
512
|
+
}, "strip", z.ZodTypeAny, {
|
|
513
|
+
kind: "hosted" | "external";
|
|
514
|
+
altText: string;
|
|
515
|
+
sources: {
|
|
516
|
+
mimeType: string;
|
|
517
|
+
url: string;
|
|
518
|
+
width?: number | undefined;
|
|
519
|
+
height?: number | undefined;
|
|
520
|
+
}[];
|
|
521
|
+
previewImage?: {
|
|
522
|
+
url: string;
|
|
523
|
+
altText: string;
|
|
524
|
+
width?: number | undefined;
|
|
525
|
+
height?: number | undefined;
|
|
526
|
+
srcSet?: string | undefined;
|
|
527
|
+
} | undefined;
|
|
528
|
+
embedUrl?: string | undefined;
|
|
529
|
+
host?: string | undefined;
|
|
530
|
+
}, {
|
|
531
|
+
kind: "hosted" | "external";
|
|
532
|
+
altText?: string | undefined;
|
|
533
|
+
previewImage?: {
|
|
534
|
+
url: string;
|
|
535
|
+
altText: string;
|
|
536
|
+
width?: number | undefined;
|
|
537
|
+
height?: number | undefined;
|
|
538
|
+
srcSet?: string | undefined;
|
|
539
|
+
} | undefined;
|
|
540
|
+
sources?: {
|
|
541
|
+
mimeType: string;
|
|
542
|
+
url: string;
|
|
543
|
+
width?: number | undefined;
|
|
544
|
+
height?: number | undefined;
|
|
545
|
+
}[] | undefined;
|
|
546
|
+
embedUrl?: string | undefined;
|
|
547
|
+
host?: string | undefined;
|
|
548
|
+
}>, "many">>;
|
|
549
|
+
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
550
|
+
id: z.ZodString;
|
|
551
|
+
title: z.ZodString;
|
|
552
|
+
available: z.ZodBoolean;
|
|
553
|
+
/**
|
|
554
|
+
* Qualifies `available` with the fulfillment state behind it. Absent means
|
|
555
|
+
* the backend did not say — which is NOT the same as in stock, and must not
|
|
556
|
+
* be narrated as either. `available` stays the buyability check; this is the
|
|
557
|
+
* reason, and it exists so a refusal can be specific.
|
|
558
|
+
*
|
|
559
|
+
* Additive on purpose: this is the expand half of the UCP convergence, not
|
|
560
|
+
* its final shape. UCP nests both under `availability: {available, status}`;
|
|
561
|
+
* collapsing to that is a breaking change for every `variant.available`
|
|
562
|
+
* reader and belongs in the same release as the rest of the shape work.
|
|
563
|
+
*/
|
|
564
|
+
availabilityStatus: z.ZodOptional<z.ZodEnum<["in_stock", "backorder", "preorder", "out_of_stock", "discontinued"]>>;
|
|
565
|
+
price: z.ZodObject<{
|
|
566
|
+
amount: z.ZodNumber;
|
|
567
|
+
currencyCode: z.ZodString;
|
|
568
|
+
}, "strip", z.ZodTypeAny, {
|
|
569
|
+
currencyCode: string;
|
|
570
|
+
amount: number;
|
|
571
|
+
}, {
|
|
572
|
+
currencyCode: string;
|
|
573
|
+
amount: number;
|
|
574
|
+
}>;
|
|
575
|
+
compareAtPrice: z.ZodOptional<z.ZodObject<{
|
|
576
|
+
amount: z.ZodNumber;
|
|
577
|
+
currencyCode: z.ZodString;
|
|
578
|
+
}, "strip", z.ZodTypeAny, {
|
|
579
|
+
currencyCode: string;
|
|
580
|
+
amount: number;
|
|
581
|
+
}, {
|
|
582
|
+
currencyCode: string;
|
|
583
|
+
amount: number;
|
|
584
|
+
}>>;
|
|
585
|
+
selectedOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
586
|
+
name: z.ZodString;
|
|
587
|
+
value: z.ZodString;
|
|
588
|
+
}, "strip", z.ZodTypeAny, {
|
|
589
|
+
value: string;
|
|
590
|
+
name: string;
|
|
591
|
+
}, {
|
|
592
|
+
value: string;
|
|
593
|
+
name: string;
|
|
594
|
+
}>, "many">>;
|
|
595
|
+
image: z.ZodOptional<z.ZodObject<{
|
|
596
|
+
url: z.ZodString;
|
|
597
|
+
altText: z.ZodString;
|
|
598
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
599
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
600
|
+
/** Responsive candidate set, resolved at the commerce-adapter boundary —
|
|
601
|
+
* never computed in a component. Renderers use it as `<img srcSet>` paired
|
|
602
|
+
* with a layout `sizes`. Absent for non-CDN / unsizable images. */
|
|
603
|
+
srcSet: z.ZodOptional<z.ZodString>;
|
|
604
|
+
}, "strip", z.ZodTypeAny, {
|
|
605
|
+
url: string;
|
|
606
|
+
altText: string;
|
|
607
|
+
width?: number | undefined;
|
|
608
|
+
height?: number | undefined;
|
|
609
|
+
srcSet?: string | undefined;
|
|
610
|
+
}, {
|
|
611
|
+
url: string;
|
|
612
|
+
altText: string;
|
|
613
|
+
width?: number | undefined;
|
|
614
|
+
height?: number | undefined;
|
|
615
|
+
srcSet?: string | undefined;
|
|
616
|
+
}>>;
|
|
617
|
+
}, "strip", z.ZodTypeAny, {
|
|
618
|
+
id: string;
|
|
619
|
+
title: string;
|
|
620
|
+
available: boolean;
|
|
621
|
+
price: {
|
|
622
|
+
currencyCode: string;
|
|
623
|
+
amount: number;
|
|
624
|
+
};
|
|
625
|
+
image?: {
|
|
626
|
+
url: string;
|
|
627
|
+
altText: string;
|
|
628
|
+
width?: number | undefined;
|
|
629
|
+
height?: number | undefined;
|
|
630
|
+
srcSet?: string | undefined;
|
|
631
|
+
} | undefined;
|
|
632
|
+
availabilityStatus?: "in_stock" | "backorder" | "preorder" | "out_of_stock" | "discontinued" | undefined;
|
|
633
|
+
compareAtPrice?: {
|
|
634
|
+
currencyCode: string;
|
|
635
|
+
amount: number;
|
|
636
|
+
} | undefined;
|
|
637
|
+
selectedOptions?: {
|
|
638
|
+
value: string;
|
|
639
|
+
name: string;
|
|
640
|
+
}[] | undefined;
|
|
641
|
+
}, {
|
|
642
|
+
id: string;
|
|
643
|
+
title: string;
|
|
644
|
+
available: boolean;
|
|
645
|
+
price: {
|
|
646
|
+
currencyCode: string;
|
|
647
|
+
amount: number;
|
|
648
|
+
};
|
|
649
|
+
image?: {
|
|
650
|
+
url: string;
|
|
651
|
+
altText: string;
|
|
652
|
+
width?: number | undefined;
|
|
653
|
+
height?: number | undefined;
|
|
654
|
+
srcSet?: string | undefined;
|
|
655
|
+
} | undefined;
|
|
656
|
+
availabilityStatus?: "in_stock" | "backorder" | "preorder" | "out_of_stock" | "discontinued" | undefined;
|
|
657
|
+
compareAtPrice?: {
|
|
658
|
+
currencyCode: string;
|
|
659
|
+
amount: number;
|
|
660
|
+
} | undefined;
|
|
661
|
+
selectedOptions?: {
|
|
662
|
+
value: string;
|
|
663
|
+
name: string;
|
|
664
|
+
}[] | undefined;
|
|
665
|
+
}>, "many">>;
|
|
666
|
+
availableForSale: z.ZodDefault<z.ZodBoolean>;
|
|
667
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
668
|
+
name: z.ZodString;
|
|
669
|
+
values: z.ZodArray<z.ZodString, "many">;
|
|
670
|
+
}, "strip", z.ZodTypeAny, {
|
|
671
|
+
values: string[];
|
|
672
|
+
name: string;
|
|
673
|
+
}, {
|
|
674
|
+
values: string[];
|
|
675
|
+
name: string;
|
|
676
|
+
}>, "many">>;
|
|
677
|
+
collections: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
678
|
+
/** See `SiblingProductSchema`. Default `[]` so renderers can check
|
|
679
|
+
* `length > 1` to decide whether to draw the swatch row without a
|
|
680
|
+
* presence guard. */
|
|
681
|
+
colorVariants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
682
|
+
id: z.ZodString;
|
|
683
|
+
handle: z.ZodString;
|
|
684
|
+
title: z.ZodString;
|
|
685
|
+
/** The differentiating value across siblings — typically the color
|
|
686
|
+
* label ("OLIVE", "STONE"). Rendered next to the swatch row. */
|
|
687
|
+
color: z.ZodString;
|
|
688
|
+
/** Swatch artwork. Hydrators populate from the sibling product's
|
|
689
|
+
* first image; renderers crop / fit to the swatch tile. */
|
|
690
|
+
swatchImage: z.ZodOptional<z.ZodObject<{
|
|
691
|
+
url: z.ZodString;
|
|
692
|
+
altText: z.ZodString;
|
|
693
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
694
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
695
|
+
/** Responsive candidate set, resolved at the commerce-adapter boundary —
|
|
696
|
+
* never computed in a component. Renderers use it as `<img srcSet>` paired
|
|
697
|
+
* with a layout `sizes`. Absent for non-CDN / unsizable images. */
|
|
698
|
+
srcSet: z.ZodOptional<z.ZodString>;
|
|
699
|
+
}, "strip", z.ZodTypeAny, {
|
|
700
|
+
url: string;
|
|
701
|
+
altText: string;
|
|
702
|
+
width?: number | undefined;
|
|
703
|
+
height?: number | undefined;
|
|
704
|
+
srcSet?: string | undefined;
|
|
705
|
+
}, {
|
|
706
|
+
url: string;
|
|
707
|
+
altText: string;
|
|
708
|
+
width?: number | undefined;
|
|
709
|
+
height?: number | undefined;
|
|
710
|
+
srcSet?: string | undefined;
|
|
711
|
+
}>>;
|
|
712
|
+
available: z.ZodDefault<z.ZodBoolean>;
|
|
713
|
+
/** Marks the sibling that IS the currently-rendered product. The
|
|
714
|
+
* picker uses this to highlight the active swatch without an
|
|
715
|
+
* external id comparison. */
|
|
716
|
+
current: z.ZodDefault<z.ZodBoolean>;
|
|
717
|
+
}, "strip", z.ZodTypeAny, {
|
|
718
|
+
id: string;
|
|
719
|
+
handle: string;
|
|
720
|
+
title: string;
|
|
721
|
+
available: boolean;
|
|
722
|
+
color: string;
|
|
723
|
+
current: boolean;
|
|
724
|
+
swatchImage?: {
|
|
725
|
+
url: string;
|
|
726
|
+
altText: string;
|
|
727
|
+
width?: number | undefined;
|
|
728
|
+
height?: number | undefined;
|
|
729
|
+
srcSet?: string | undefined;
|
|
730
|
+
} | undefined;
|
|
731
|
+
}, {
|
|
732
|
+
id: string;
|
|
733
|
+
handle: string;
|
|
734
|
+
title: string;
|
|
735
|
+
color: string;
|
|
736
|
+
available?: boolean | undefined;
|
|
737
|
+
swatchImage?: {
|
|
738
|
+
url: string;
|
|
739
|
+
altText: string;
|
|
740
|
+
width?: number | undefined;
|
|
741
|
+
height?: number | undefined;
|
|
742
|
+
srcSet?: string | undefined;
|
|
743
|
+
} | undefined;
|
|
744
|
+
current?: boolean | undefined;
|
|
745
|
+
}>, "many">>;
|
|
746
|
+
rating: z.ZodOptional<z.ZodObject<{
|
|
747
|
+
value: z.ZodNumber;
|
|
748
|
+
count: z.ZodNumber;
|
|
749
|
+
}, "strip", z.ZodTypeAny, {
|
|
750
|
+
value: number;
|
|
751
|
+
count: number;
|
|
752
|
+
}, {
|
|
753
|
+
value: number;
|
|
754
|
+
count: number;
|
|
755
|
+
}>>;
|
|
756
|
+
/**
|
|
757
|
+
* Product reviews surfaced from the brand's review store. SDK
|
|
758
|
+
* providers (Shopify, etc.) populate this from the `agent_data.reviews`
|
|
759
|
+
* metafield (or equivalent) so the agent doesn't need to invent
|
|
760
|
+
* review bodies. Renderers (`Reviews` component, `ProductDetail`,
|
|
761
|
+
* etc.) consume directly.
|
|
762
|
+
*/
|
|
763
|
+
reviews: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
764
|
+
author: z.ZodString;
|
|
765
|
+
rating: z.ZodNumber;
|
|
766
|
+
content: z.ZodString;
|
|
767
|
+
date: z.ZodString;
|
|
768
|
+
verified: z.ZodOptional<z.ZodBoolean>;
|
|
769
|
+
}, "strip", z.ZodTypeAny, {
|
|
770
|
+
date: string;
|
|
771
|
+
content: string;
|
|
772
|
+
rating: number;
|
|
773
|
+
author: string;
|
|
774
|
+
verified?: boolean | undefined;
|
|
775
|
+
}, {
|
|
776
|
+
date: string;
|
|
777
|
+
content: string;
|
|
778
|
+
rating: number;
|
|
779
|
+
author: string;
|
|
780
|
+
verified?: boolean | undefined;
|
|
781
|
+
}>, "many">>;
|
|
782
|
+
/**
|
|
783
|
+
* Ghost-entity flag — `true` when the Storefront API could not hydrate
|
|
784
|
+
* the gid the agent emitted (archived, draft, wrong store, deleted).
|
|
785
|
+
* Default `false` so existing code is unaffected. Components can check
|
|
786
|
+
* `product.unavailable` to render a "not available" card or silently
|
|
787
|
+
* skip instead of crashing on missing data.
|
|
788
|
+
*
|
|
789
|
+
* Set exclusively by `createUnavailableProduct()` — never by the
|
|
790
|
+
* Storefront mapper.
|
|
791
|
+
*/
|
|
792
|
+
unavailable: z.ZodDefault<z.ZodBoolean>;
|
|
793
|
+
}, "strip", z.ZodTypeAny, {
|
|
794
|
+
id: string;
|
|
795
|
+
handle: string;
|
|
796
|
+
title: string;
|
|
797
|
+
unavailable: boolean;
|
|
798
|
+
description: string;
|
|
799
|
+
variants: {
|
|
800
|
+
id: string;
|
|
801
|
+
title: string;
|
|
802
|
+
available: boolean;
|
|
803
|
+
price: {
|
|
804
|
+
currencyCode: string;
|
|
805
|
+
amount: number;
|
|
806
|
+
};
|
|
807
|
+
image?: {
|
|
808
|
+
url: string;
|
|
809
|
+
altText: string;
|
|
810
|
+
width?: number | undefined;
|
|
811
|
+
height?: number | undefined;
|
|
812
|
+
srcSet?: string | undefined;
|
|
813
|
+
} | undefined;
|
|
814
|
+
availabilityStatus?: "in_stock" | "backorder" | "preorder" | "out_of_stock" | "discontinued" | undefined;
|
|
815
|
+
compareAtPrice?: {
|
|
816
|
+
currencyCode: string;
|
|
817
|
+
amount: number;
|
|
818
|
+
} | undefined;
|
|
819
|
+
selectedOptions?: {
|
|
820
|
+
value: string;
|
|
821
|
+
name: string;
|
|
822
|
+
}[] | undefined;
|
|
823
|
+
}[];
|
|
824
|
+
price: {
|
|
825
|
+
currencyCode: string;
|
|
826
|
+
amount: number;
|
|
827
|
+
};
|
|
828
|
+
vendor: string;
|
|
829
|
+
tags: string[];
|
|
830
|
+
images: {
|
|
831
|
+
url: string;
|
|
832
|
+
altText: string;
|
|
833
|
+
width?: number | undefined;
|
|
834
|
+
height?: number | undefined;
|
|
835
|
+
srcSet?: string | undefined;
|
|
836
|
+
}[];
|
|
837
|
+
videos: {
|
|
838
|
+
kind: "hosted" | "external";
|
|
839
|
+
altText: string;
|
|
840
|
+
sources: {
|
|
841
|
+
mimeType: string;
|
|
842
|
+
url: string;
|
|
843
|
+
width?: number | undefined;
|
|
844
|
+
height?: number | undefined;
|
|
845
|
+
}[];
|
|
846
|
+
previewImage?: {
|
|
847
|
+
url: string;
|
|
848
|
+
altText: string;
|
|
849
|
+
width?: number | undefined;
|
|
850
|
+
height?: number | undefined;
|
|
851
|
+
srcSet?: string | undefined;
|
|
852
|
+
} | undefined;
|
|
853
|
+
embedUrl?: string | undefined;
|
|
854
|
+
host?: string | undefined;
|
|
855
|
+
}[];
|
|
856
|
+
availableForSale: boolean;
|
|
857
|
+
colorVariants: {
|
|
858
|
+
id: string;
|
|
859
|
+
handle: string;
|
|
860
|
+
title: string;
|
|
861
|
+
available: boolean;
|
|
862
|
+
color: string;
|
|
863
|
+
current: boolean;
|
|
864
|
+
swatchImage?: {
|
|
865
|
+
url: string;
|
|
866
|
+
altText: string;
|
|
867
|
+
width?: number | undefined;
|
|
868
|
+
height?: number | undefined;
|
|
869
|
+
srcSet?: string | undefined;
|
|
870
|
+
} | undefined;
|
|
871
|
+
}[];
|
|
872
|
+
options?: {
|
|
873
|
+
values: string[];
|
|
874
|
+
name: string;
|
|
875
|
+
}[] | undefined;
|
|
876
|
+
reviews?: {
|
|
877
|
+
date: string;
|
|
878
|
+
content: string;
|
|
879
|
+
rating: number;
|
|
880
|
+
author: string;
|
|
881
|
+
verified?: boolean | undefined;
|
|
882
|
+
}[] | undefined;
|
|
883
|
+
compareAtPrice?: {
|
|
884
|
+
currencyCode: string;
|
|
885
|
+
amount: number;
|
|
886
|
+
} | undefined;
|
|
887
|
+
descriptionHtml?: string | undefined;
|
|
888
|
+
productType?: string | undefined;
|
|
889
|
+
collections?: string[] | undefined;
|
|
890
|
+
rating?: {
|
|
891
|
+
value: number;
|
|
892
|
+
count: number;
|
|
893
|
+
} | undefined;
|
|
894
|
+
}, {
|
|
895
|
+
id: string;
|
|
896
|
+
title: string;
|
|
897
|
+
options?: {
|
|
898
|
+
values: string[];
|
|
899
|
+
name: string;
|
|
900
|
+
}[] | undefined;
|
|
901
|
+
handle?: string | undefined;
|
|
902
|
+
unavailable?: boolean | undefined;
|
|
903
|
+
description?: string | undefined;
|
|
904
|
+
variants?: {
|
|
905
|
+
id: string;
|
|
906
|
+
title: string;
|
|
907
|
+
available: boolean;
|
|
908
|
+
price: {
|
|
909
|
+
currencyCode: string;
|
|
910
|
+
amount: number;
|
|
911
|
+
};
|
|
912
|
+
image?: {
|
|
913
|
+
url: string;
|
|
914
|
+
altText: string;
|
|
915
|
+
width?: number | undefined;
|
|
916
|
+
height?: number | undefined;
|
|
917
|
+
srcSet?: string | undefined;
|
|
918
|
+
} | undefined;
|
|
919
|
+
availabilityStatus?: "in_stock" | "backorder" | "preorder" | "out_of_stock" | "discontinued" | undefined;
|
|
920
|
+
compareAtPrice?: {
|
|
921
|
+
currencyCode: string;
|
|
922
|
+
amount: number;
|
|
923
|
+
} | undefined;
|
|
924
|
+
selectedOptions?: {
|
|
925
|
+
value: string;
|
|
926
|
+
name: string;
|
|
927
|
+
}[] | undefined;
|
|
928
|
+
}[] | undefined;
|
|
929
|
+
reviews?: {
|
|
930
|
+
date: string;
|
|
931
|
+
content: string;
|
|
932
|
+
rating: number;
|
|
933
|
+
author: string;
|
|
934
|
+
verified?: boolean | undefined;
|
|
935
|
+
}[] | undefined;
|
|
936
|
+
price?: {
|
|
937
|
+
currencyCode: string;
|
|
938
|
+
amount: number;
|
|
939
|
+
} | undefined;
|
|
940
|
+
compareAtPrice?: {
|
|
941
|
+
currencyCode: string;
|
|
942
|
+
amount: number;
|
|
943
|
+
} | undefined;
|
|
944
|
+
descriptionHtml?: string | undefined;
|
|
945
|
+
vendor?: string | undefined;
|
|
946
|
+
productType?: string | undefined;
|
|
947
|
+
tags?: string[] | undefined;
|
|
948
|
+
images?: {
|
|
949
|
+
url: string;
|
|
950
|
+
altText: string;
|
|
951
|
+
width?: number | undefined;
|
|
952
|
+
height?: number | undefined;
|
|
953
|
+
srcSet?: string | undefined;
|
|
954
|
+
}[] | undefined;
|
|
955
|
+
videos?: {
|
|
956
|
+
kind: "hosted" | "external";
|
|
957
|
+
altText?: string | undefined;
|
|
958
|
+
previewImage?: {
|
|
959
|
+
url: string;
|
|
960
|
+
altText: string;
|
|
961
|
+
width?: number | undefined;
|
|
962
|
+
height?: number | undefined;
|
|
963
|
+
srcSet?: string | undefined;
|
|
964
|
+
} | undefined;
|
|
965
|
+
sources?: {
|
|
966
|
+
mimeType: string;
|
|
967
|
+
url: string;
|
|
968
|
+
width?: number | undefined;
|
|
969
|
+
height?: number | undefined;
|
|
970
|
+
}[] | undefined;
|
|
971
|
+
embedUrl?: string | undefined;
|
|
972
|
+
host?: string | undefined;
|
|
973
|
+
}[] | undefined;
|
|
974
|
+
availableForSale?: boolean | undefined;
|
|
975
|
+
collections?: string[] | undefined;
|
|
976
|
+
colorVariants?: {
|
|
977
|
+
id: string;
|
|
978
|
+
handle: string;
|
|
979
|
+
title: string;
|
|
980
|
+
color: string;
|
|
981
|
+
available?: boolean | undefined;
|
|
982
|
+
swatchImage?: {
|
|
983
|
+
url: string;
|
|
984
|
+
altText: string;
|
|
985
|
+
width?: number | undefined;
|
|
986
|
+
height?: number | undefined;
|
|
987
|
+
srcSet?: string | undefined;
|
|
988
|
+
} | undefined;
|
|
989
|
+
current?: boolean | undefined;
|
|
990
|
+
}[] | undefined;
|
|
991
|
+
rating?: {
|
|
992
|
+
value: number;
|
|
993
|
+
count: number;
|
|
994
|
+
} | undefined;
|
|
995
|
+
}>;
|
|
996
|
+
export type Product = z.infer<typeof ProductSchema>;
|
|
997
|
+
/**
|
|
998
|
+
* Build a schema-valid ghost Product for a gid the Storefront API could
|
|
999
|
+
* not hydrate. The entity passes `ProductSchema.parse()` so every
|
|
1000
|
+
* downstream consumer — hydrators, scrub, leaf components — sees a
|
|
1001
|
+
* well-formed Product instead of `undefined`.
|
|
1002
|
+
*
|
|
1003
|
+
* `unavailable: true` distinguishes a ghost from a real out-of-stock
|
|
1004
|
+
* product (`availableForSale: false`). Components can filter or dim;
|
|
1005
|
+
* crash-on-undefined is eliminated.
|
|
1006
|
+
*/
|
|
1007
|
+
export declare function createUnavailableProduct(gid: string): Product;
|
|
1008
|
+
/**
|
|
1009
|
+
* True when a hydrated entity is a ghost — the placeholder
|
|
1010
|
+
* `createUnavailableProduct()` mints for a gid the connector could not
|
|
1011
|
+
* resolve (archived / draft / wrong-store / deleted). Sole reader of the
|
|
1012
|
+
* `unavailable` marker, so the ghost check lives once here beside the ghost
|
|
1013
|
+
* factory instead of scattered `entity.unavailable === true` guards.
|
|
1014
|
+
*
|
|
1015
|
+
* The hydration boundary uses this to DROP ghosts from resolved lists so a
|
|
1016
|
+
* leaf never renders a dead "Unavailable / $0.00" card. A real out-of-stock
|
|
1017
|
+
* product (`availableForSale: false`, `unavailable: false`) is NOT a ghost
|
|
1018
|
+
* and still renders. Accepts `unknown` so it doubles as a type guard at the
|
|
1019
|
+
* generic hydration boundary, where entities of any type flow through.
|
|
1020
|
+
*/
|
|
1021
|
+
export declare function isGhostEntity(value: unknown): boolean;
|
|
1022
|
+
/**
|
|
1023
|
+
* Standalone product review — the shape a brand's review store returns
|
|
1024
|
+
* for a single review record. Distinct from `ProductSchema.reviews`
|
|
1025
|
+
* (the inline summary embedded on a hydrated product): this is the
|
|
1026
|
+
* full record a `getReviews(productId)` provider call yields, and the
|
|
1027
|
+
* shape the standalone `Reviews` catalog component renders from its
|
|
1028
|
+
* `reviews` prop.
|
|
1029
|
+
*/
|
|
1030
|
+
export declare const ReviewSchema: z.ZodObject<{
|
|
1031
|
+
id: z.ZodString;
|
|
1032
|
+
productId: z.ZodString;
|
|
1033
|
+
author: z.ZodString;
|
|
1034
|
+
rating: z.ZodNumber;
|
|
1035
|
+
text: z.ZodString;
|
|
1036
|
+
date: z.ZodString;
|
|
1037
|
+
verified: z.ZodBoolean;
|
|
1038
|
+
}, "strip", z.ZodTypeAny, {
|
|
1039
|
+
date: string;
|
|
1040
|
+
id: string;
|
|
1041
|
+
text: string;
|
|
1042
|
+
productId: string;
|
|
1043
|
+
rating: number;
|
|
1044
|
+
author: string;
|
|
1045
|
+
verified: boolean;
|
|
1046
|
+
}, {
|
|
1047
|
+
date: string;
|
|
1048
|
+
id: string;
|
|
1049
|
+
text: string;
|
|
1050
|
+
productId: string;
|
|
1051
|
+
rating: number;
|
|
1052
|
+
author: string;
|
|
1053
|
+
verified: boolean;
|
|
1054
|
+
}>;
|
|
1055
|
+
export type Review = z.infer<typeof ReviewSchema>;
|
|
1056
|
+
export declare const ArticleSchema: z.ZodObject<{
|
|
1057
|
+
id: z.ZodString;
|
|
1058
|
+
handle: z.ZodDefault<z.ZodString>;
|
|
1059
|
+
title: z.ZodString;
|
|
1060
|
+
excerpt: z.ZodDefault<z.ZodString>;
|
|
1061
|
+
content: z.ZodDefault<z.ZodString>;
|
|
1062
|
+
contentHtml: z.ZodOptional<z.ZodString>;
|
|
1063
|
+
author: z.ZodDefault<z.ZodString>;
|
|
1064
|
+
publishedAt: z.ZodDefault<z.ZodString>;
|
|
1065
|
+
image: z.ZodOptional<z.ZodObject<{
|
|
1066
|
+
url: z.ZodString;
|
|
1067
|
+
altText: z.ZodString;
|
|
1068
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1069
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1070
|
+
/** Responsive candidate set, resolved at the commerce-adapter boundary —
|
|
1071
|
+
* never computed in a component. Renderers use it as `<img srcSet>` paired
|
|
1072
|
+
* with a layout `sizes`. Absent for non-CDN / unsizable images. */
|
|
1073
|
+
srcSet: z.ZodOptional<z.ZodString>;
|
|
1074
|
+
}, "strip", z.ZodTypeAny, {
|
|
1075
|
+
url: string;
|
|
1076
|
+
altText: string;
|
|
1077
|
+
width?: number | undefined;
|
|
1078
|
+
height?: number | undefined;
|
|
1079
|
+
srcSet?: string | undefined;
|
|
1080
|
+
}, {
|
|
1081
|
+
url: string;
|
|
1082
|
+
altText: string;
|
|
1083
|
+
width?: number | undefined;
|
|
1084
|
+
height?: number | undefined;
|
|
1085
|
+
srcSet?: string | undefined;
|
|
1086
|
+
}>>;
|
|
1087
|
+
blogHandle: z.ZodDefault<z.ZodString>;
|
|
1088
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1089
|
+
}, "strip", z.ZodTypeAny, {
|
|
1090
|
+
id: string;
|
|
1091
|
+
handle: string;
|
|
1092
|
+
title: string;
|
|
1093
|
+
content: string;
|
|
1094
|
+
tags: string[];
|
|
1095
|
+
author: string;
|
|
1096
|
+
excerpt: string;
|
|
1097
|
+
publishedAt: string;
|
|
1098
|
+
blogHandle: string;
|
|
1099
|
+
image?: {
|
|
1100
|
+
url: string;
|
|
1101
|
+
altText: string;
|
|
1102
|
+
width?: number | undefined;
|
|
1103
|
+
height?: number | undefined;
|
|
1104
|
+
srcSet?: string | undefined;
|
|
1105
|
+
} | undefined;
|
|
1106
|
+
contentHtml?: string | undefined;
|
|
1107
|
+
}, {
|
|
1108
|
+
id: string;
|
|
1109
|
+
title: string;
|
|
1110
|
+
handle?: string | undefined;
|
|
1111
|
+
image?: {
|
|
1112
|
+
url: string;
|
|
1113
|
+
altText: string;
|
|
1114
|
+
width?: number | undefined;
|
|
1115
|
+
height?: number | undefined;
|
|
1116
|
+
srcSet?: string | undefined;
|
|
1117
|
+
} | undefined;
|
|
1118
|
+
content?: string | undefined;
|
|
1119
|
+
tags?: string[] | undefined;
|
|
1120
|
+
author?: string | undefined;
|
|
1121
|
+
excerpt?: string | undefined;
|
|
1122
|
+
contentHtml?: string | undefined;
|
|
1123
|
+
publishedAt?: string | undefined;
|
|
1124
|
+
blogHandle?: string | undefined;
|
|
1125
|
+
}>;
|
|
1126
|
+
export type Article = z.infer<typeof ArticleSchema>;
|
|
1127
|
+
export declare const CmsPageSchema: z.ZodObject<{
|
|
1128
|
+
id: z.ZodString;
|
|
1129
|
+
handle: z.ZodDefault<z.ZodString>;
|
|
1130
|
+
title: z.ZodString;
|
|
1131
|
+
body: z.ZodDefault<z.ZodString>;
|
|
1132
|
+
bodyHtml: z.ZodOptional<z.ZodString>;
|
|
1133
|
+
bodySummary: z.ZodDefault<z.ZodString>;
|
|
1134
|
+
updatedAt: z.ZodDefault<z.ZodString>;
|
|
1135
|
+
seoTitle: z.ZodOptional<z.ZodString>;
|
|
1136
|
+
seoDescription: z.ZodOptional<z.ZodString>;
|
|
1137
|
+
}, "strip", z.ZodTypeAny, {
|
|
1138
|
+
id: string;
|
|
1139
|
+
handle: string;
|
|
1140
|
+
title: string;
|
|
1141
|
+
body: string;
|
|
1142
|
+
bodySummary: string;
|
|
1143
|
+
updatedAt: string;
|
|
1144
|
+
bodyHtml?: string | undefined;
|
|
1145
|
+
seoTitle?: string | undefined;
|
|
1146
|
+
seoDescription?: string | undefined;
|
|
1147
|
+
}, {
|
|
1148
|
+
id: string;
|
|
1149
|
+
title: string;
|
|
1150
|
+
handle?: string | undefined;
|
|
1151
|
+
body?: string | undefined;
|
|
1152
|
+
bodyHtml?: string | undefined;
|
|
1153
|
+
bodySummary?: string | undefined;
|
|
1154
|
+
updatedAt?: string | undefined;
|
|
1155
|
+
seoTitle?: string | undefined;
|
|
1156
|
+
seoDescription?: string | undefined;
|
|
1157
|
+
}>;
|
|
1158
|
+
export type CmsPage = z.infer<typeof CmsPageSchema>;
|
|
1159
|
+
/**
|
|
1160
|
+
* Shop policy — the platform-built-in legal/operational documents
|
|
1161
|
+
* (refund, privacy, terms, shipping, subscription, warranty). Distinct
|
|
1162
|
+
* from `CmsPage`: policies live at fixed slots on the shop entity in
|
|
1163
|
+
* Shopify (`shop { refundPolicy { ... } }`), not in the user-authored
|
|
1164
|
+
* CMS-page collection. Separate schema so `pageDetail` and
|
|
1165
|
+
* `policyDetail` can hydrate independently against the right backend
|
|
1166
|
+
* fetcher.
|
|
1167
|
+
*/
|
|
1168
|
+
export declare const CmsPolicySchema: z.ZodObject<{
|
|
1169
|
+
id: z.ZodString;
|
|
1170
|
+
/** Stable policy slot identifier: 'refund' | 'privacy' | 'terms' |
|
|
1171
|
+
* 'shipping' | 'subscription' | 'warranty' | custom string. Open so
|
|
1172
|
+
* platforms with custom policy types can extend. */
|
|
1173
|
+
kind: z.ZodString;
|
|
1174
|
+
/** Slug-shaped handle the platform exposes for storefront URLs
|
|
1175
|
+
* (e.g. `refund-policy`). Empty string when the backend doesn't
|
|
1176
|
+
* surface one. */
|
|
1177
|
+
handle: z.ZodDefault<z.ZodString>;
|
|
1178
|
+
title: z.ZodString;
|
|
1179
|
+
body: z.ZodDefault<z.ZodString>;
|
|
1180
|
+
bodyHtml: z.ZodOptional<z.ZodString>;
|
|
1181
|
+
url: z.ZodDefault<z.ZodString>;
|
|
1182
|
+
}, "strip", z.ZodTypeAny, {
|
|
1183
|
+
kind: string;
|
|
1184
|
+
id: string;
|
|
1185
|
+
handle: string;
|
|
1186
|
+
title: string;
|
|
1187
|
+
url: string;
|
|
1188
|
+
body: string;
|
|
1189
|
+
bodyHtml?: string | undefined;
|
|
1190
|
+
}, {
|
|
1191
|
+
kind: string;
|
|
1192
|
+
id: string;
|
|
1193
|
+
title: string;
|
|
1194
|
+
handle?: string | undefined;
|
|
1195
|
+
url?: string | undefined;
|
|
1196
|
+
body?: string | undefined;
|
|
1197
|
+
bodyHtml?: string | undefined;
|
|
1198
|
+
}>;
|
|
1199
|
+
export type CmsPolicy = z.infer<typeof CmsPolicySchema>;
|
|
1200
|
+
/**
|
|
1201
|
+
* Curated grouping of products — Shopify collection, Woo category,
|
|
1202
|
+
* BigCommerce category. Carries enough to render a tile (image, title,
|
|
1203
|
+
* count) plus the handle for navigation.
|
|
1204
|
+
*
|
|
1205
|
+
* Hydrated client-side via the `collection` resolver (see
|
|
1206
|
+
* `createShopifyHydrators` in `@fourty/shopify/client`). LLM emits the
|
|
1207
|
+
* collection handle or gid; SDK resolves to the full object.
|
|
1208
|
+
*/
|
|
1209
|
+
export declare const CollectionSchema: z.ZodObject<{
|
|
1210
|
+
id: z.ZodString;
|
|
1211
|
+
handle: z.ZodDefault<z.ZodString>;
|
|
1212
|
+
title: z.ZodString;
|
|
1213
|
+
description: z.ZodDefault<z.ZodString>;
|
|
1214
|
+
image: z.ZodOptional<z.ZodObject<{
|
|
1215
|
+
url: z.ZodString;
|
|
1216
|
+
altText: z.ZodString;
|
|
1217
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1218
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1219
|
+
/** Responsive candidate set, resolved at the commerce-adapter boundary —
|
|
1220
|
+
* never computed in a component. Renderers use it as `<img srcSet>` paired
|
|
1221
|
+
* with a layout `sizes`. Absent for non-CDN / unsizable images. */
|
|
1222
|
+
srcSet: z.ZodOptional<z.ZodString>;
|
|
1223
|
+
}, "strip", z.ZodTypeAny, {
|
|
1224
|
+
url: string;
|
|
1225
|
+
altText: string;
|
|
1226
|
+
width?: number | undefined;
|
|
1227
|
+
height?: number | undefined;
|
|
1228
|
+
srcSet?: string | undefined;
|
|
1229
|
+
}, {
|
|
1230
|
+
url: string;
|
|
1231
|
+
altText: string;
|
|
1232
|
+
width?: number | undefined;
|
|
1233
|
+
height?: number | undefined;
|
|
1234
|
+
srcSet?: string | undefined;
|
|
1235
|
+
}>>;
|
|
1236
|
+
productCount: z.ZodOptional<z.ZodNumber>;
|
|
1237
|
+
}, "strip", z.ZodTypeAny, {
|
|
1238
|
+
id: string;
|
|
1239
|
+
handle: string;
|
|
1240
|
+
title: string;
|
|
1241
|
+
description: string;
|
|
1242
|
+
image?: {
|
|
1243
|
+
url: string;
|
|
1244
|
+
altText: string;
|
|
1245
|
+
width?: number | undefined;
|
|
1246
|
+
height?: number | undefined;
|
|
1247
|
+
srcSet?: string | undefined;
|
|
1248
|
+
} | undefined;
|
|
1249
|
+
productCount?: number | undefined;
|
|
1250
|
+
}, {
|
|
1251
|
+
id: string;
|
|
1252
|
+
title: string;
|
|
1253
|
+
handle?: string | undefined;
|
|
1254
|
+
image?: {
|
|
1255
|
+
url: string;
|
|
1256
|
+
altText: string;
|
|
1257
|
+
width?: number | undefined;
|
|
1258
|
+
height?: number | undefined;
|
|
1259
|
+
srcSet?: string | undefined;
|
|
1260
|
+
} | undefined;
|
|
1261
|
+
description?: string | undefined;
|
|
1262
|
+
productCount?: number | undefined;
|
|
1263
|
+
}>;
|
|
1264
|
+
export type Collection = z.infer<typeof CollectionSchema>;
|
|
1265
|
+
/**
|
|
1266
|
+
* Cart line + cart — the visitor's live cart shape. A data contract
|
|
1267
|
+
* (platform-agnostic), so it lives in wire; the SDK owns the runtime
|
|
1268
|
+
* state that fills it.
|
|
1269
|
+
*/
|
|
1270
|
+
export declare const CartLineSchema: z.ZodObject<{
|
|
1271
|
+
id: z.ZodString;
|
|
1272
|
+
merchandiseId: z.ZodString;
|
|
1273
|
+
productId: z.ZodString;
|
|
1274
|
+
title: z.ZodString;
|
|
1275
|
+
variantTitle: z.ZodOptional<z.ZodString>;
|
|
1276
|
+
/**
|
|
1277
|
+
* The variant's option axes as structured pairs (e.g.
|
|
1278
|
+
* `[{name:'Size', value:'7'}]`). The machine-readable counterpart of
|
|
1279
|
+
* `variantTitle` — selection-aware cart verbs and the client-state
|
|
1280
|
+
* snapshot match on these, never on the display string. Absent for
|
|
1281
|
+
* single-variant products (the degenerate `Title: Default Title` axis
|
|
1282
|
+
* is normalized away at the adapter boundary).
|
|
1283
|
+
*/
|
|
1284
|
+
selectedOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1285
|
+
name: z.ZodString;
|
|
1286
|
+
value: z.ZodString;
|
|
1287
|
+
}, "strip", z.ZodTypeAny, {
|
|
1288
|
+
value: string;
|
|
1289
|
+
name: string;
|
|
1290
|
+
}, {
|
|
1291
|
+
value: string;
|
|
1292
|
+
name: string;
|
|
1293
|
+
}>, "many">>;
|
|
1294
|
+
vendor: z.ZodOptional<z.ZodString>;
|
|
1295
|
+
sku: z.ZodOptional<z.ZodString>;
|
|
1296
|
+
quantity: z.ZodNumber;
|
|
1297
|
+
unitPrice: z.ZodObject<{
|
|
1298
|
+
amount: z.ZodNumber;
|
|
1299
|
+
currencyCode: z.ZodString;
|
|
1300
|
+
}, "strip", z.ZodTypeAny, {
|
|
1301
|
+
currencyCode: string;
|
|
1302
|
+
amount: number;
|
|
1303
|
+
}, {
|
|
1304
|
+
currencyCode: string;
|
|
1305
|
+
amount: number;
|
|
1306
|
+
}>;
|
|
1307
|
+
totalPrice: z.ZodObject<{
|
|
1308
|
+
amount: z.ZodNumber;
|
|
1309
|
+
currencyCode: z.ZodString;
|
|
1310
|
+
}, "strip", z.ZodTypeAny, {
|
|
1311
|
+
currencyCode: string;
|
|
1312
|
+
amount: number;
|
|
1313
|
+
}, {
|
|
1314
|
+
currencyCode: string;
|
|
1315
|
+
amount: number;
|
|
1316
|
+
}>;
|
|
1317
|
+
image: z.ZodOptional<z.ZodObject<{
|
|
1318
|
+
url: z.ZodString;
|
|
1319
|
+
altText: z.ZodString;
|
|
1320
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1321
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1322
|
+
/** Responsive candidate set, resolved at the commerce-adapter boundary —
|
|
1323
|
+
* never computed in a component. Renderers use it as `<img srcSet>` paired
|
|
1324
|
+
* with a layout `sizes`. Absent for non-CDN / unsizable images. */
|
|
1325
|
+
srcSet: z.ZodOptional<z.ZodString>;
|
|
1326
|
+
}, "strip", z.ZodTypeAny, {
|
|
1327
|
+
url: string;
|
|
1328
|
+
altText: string;
|
|
1329
|
+
width?: number | undefined;
|
|
1330
|
+
height?: number | undefined;
|
|
1331
|
+
srcSet?: string | undefined;
|
|
1332
|
+
}, {
|
|
1333
|
+
url: string;
|
|
1334
|
+
altText: string;
|
|
1335
|
+
width?: number | undefined;
|
|
1336
|
+
height?: number | undefined;
|
|
1337
|
+
srcSet?: string | undefined;
|
|
1338
|
+
}>>;
|
|
1339
|
+
/**
|
|
1340
|
+
* True while this line exists only in the client's optimistic paint —
|
|
1341
|
+
* the backend has not accepted it yet, so its `id` is client-minted and
|
|
1342
|
+
* its money is a local estimate. The backend NEVER sets this: a line on
|
|
1343
|
+
* a cart the adapter returned is settled by definition.
|
|
1344
|
+
*
|
|
1345
|
+
* Every consumer that must behave differently for an unsettled line
|
|
1346
|
+
* reads THIS, never the shape of `id`. The `optimistic-` id prefix is an
|
|
1347
|
+
* implementation detail of the optimistic writer, and sniffing it forced
|
|
1348
|
+
* the same string check into the engine, `@fourty/ui`, and every brand
|
|
1349
|
+
* package — a downstream guard standing in for a missing field. The
|
|
1350
|
+
* things that key off it: the row renders as pending rather than as a
|
|
1351
|
+
* settled $0 line, quantity writes stay client-side instead of sending a
|
|
1352
|
+
* client-minted id the backend rejects, line-tap navigation is
|
|
1353
|
+
* suppressed, and the money never folds into a settled-looking total.
|
|
1354
|
+
*/
|
|
1355
|
+
pending: z.ZodOptional<z.ZodBoolean>;
|
|
1356
|
+
}, "strip", z.ZodTypeAny, {
|
|
1357
|
+
id: string;
|
|
1358
|
+
title: string;
|
|
1359
|
+
productId: string;
|
|
1360
|
+
quantity: number;
|
|
1361
|
+
merchandiseId: string;
|
|
1362
|
+
unitPrice: {
|
|
1363
|
+
currencyCode: string;
|
|
1364
|
+
amount: number;
|
|
1365
|
+
};
|
|
1366
|
+
totalPrice: {
|
|
1367
|
+
currencyCode: string;
|
|
1368
|
+
amount: number;
|
|
1369
|
+
};
|
|
1370
|
+
pending?: boolean | undefined;
|
|
1371
|
+
image?: {
|
|
1372
|
+
url: string;
|
|
1373
|
+
altText: string;
|
|
1374
|
+
width?: number | undefined;
|
|
1375
|
+
height?: number | undefined;
|
|
1376
|
+
srcSet?: string | undefined;
|
|
1377
|
+
} | undefined;
|
|
1378
|
+
selectedOptions?: {
|
|
1379
|
+
value: string;
|
|
1380
|
+
name: string;
|
|
1381
|
+
}[] | undefined;
|
|
1382
|
+
vendor?: string | undefined;
|
|
1383
|
+
variantTitle?: string | undefined;
|
|
1384
|
+
sku?: string | undefined;
|
|
1385
|
+
}, {
|
|
1386
|
+
id: string;
|
|
1387
|
+
title: string;
|
|
1388
|
+
productId: string;
|
|
1389
|
+
quantity: number;
|
|
1390
|
+
merchandiseId: string;
|
|
1391
|
+
unitPrice: {
|
|
1392
|
+
currencyCode: string;
|
|
1393
|
+
amount: number;
|
|
1394
|
+
};
|
|
1395
|
+
totalPrice: {
|
|
1396
|
+
currencyCode: string;
|
|
1397
|
+
amount: number;
|
|
1398
|
+
};
|
|
1399
|
+
pending?: boolean | undefined;
|
|
1400
|
+
image?: {
|
|
1401
|
+
url: string;
|
|
1402
|
+
altText: string;
|
|
1403
|
+
width?: number | undefined;
|
|
1404
|
+
height?: number | undefined;
|
|
1405
|
+
srcSet?: string | undefined;
|
|
1406
|
+
} | undefined;
|
|
1407
|
+
selectedOptions?: {
|
|
1408
|
+
value: string;
|
|
1409
|
+
name: string;
|
|
1410
|
+
}[] | undefined;
|
|
1411
|
+
vendor?: string | undefined;
|
|
1412
|
+
variantTitle?: string | undefined;
|
|
1413
|
+
sku?: string | undefined;
|
|
1414
|
+
}>;
|
|
1415
|
+
export type CartLine = z.infer<typeof CartLineSchema>;
|
|
1416
|
+
/** True when a cart line has not been accepted by the backend yet — the one
|
|
1417
|
+
* predicate every surface shares. See `CartLineSchema.pending`. */
|
|
1418
|
+
export declare function isPendingCartLine(line: Pick<CartLine, 'pending'>): boolean;
|
|
1419
|
+
/**
|
|
1420
|
+
* Applied discount code. `applicable: false` means the backend accepted
|
|
1421
|
+
* the code onto the cart but it doesn't qualify (minimum not met,
|
|
1422
|
+
* expired, wrong items) — UIs show it as invalid rather than silently
|
|
1423
|
+
* dropping it.
|
|
1424
|
+
*/
|
|
1425
|
+
export declare const CartDiscountCodeSchema: z.ZodObject<{
|
|
1426
|
+
code: z.ZodString;
|
|
1427
|
+
applicable: z.ZodBoolean;
|
|
1428
|
+
}, "strip", z.ZodTypeAny, {
|
|
1429
|
+
code: string;
|
|
1430
|
+
applicable: boolean;
|
|
1431
|
+
}, {
|
|
1432
|
+
code: string;
|
|
1433
|
+
applicable: boolean;
|
|
1434
|
+
}>;
|
|
1435
|
+
export type CartDiscountCode = z.infer<typeof CartDiscountCodeSchema>;
|
|
1436
|
+
/**
|
|
1437
|
+
* A notice the BACKEND attached to the cart — UCP's cart `messages[]`
|
|
1438
|
+
* (`shopping/cart.json` at spec release v2026-04-08): "Validation messages,
|
|
1439
|
+
* warnings, or informational notices."
|
|
1440
|
+
*
|
|
1441
|
+
* The protocol's own words for a warning's `content` are that it "MUST be
|
|
1442
|
+
* displayed", which is the contract we want: a cart the store has something to
|
|
1443
|
+
* say about should not look silently fine. Our client-side
|
|
1444
|
+
* `cart-action-failures` store covers writes that never reached the backend;
|
|
1445
|
+
* this covers what the backend says about the cart it returned. Both surface
|
|
1446
|
+
* through the same drawer list.
|
|
1447
|
+
*
|
|
1448
|
+
* Narrowed from UCP's shape to the three fields a renderer needs. `path`
|
|
1449
|
+
* (JSONPath to the line it concerns) and `presentation` are deliberately left
|
|
1450
|
+
* out until something reads them — the drawer shows cart-level notices today,
|
|
1451
|
+
* and a field nothing consumes is a promise we have not kept.
|
|
1452
|
+
*/
|
|
1453
|
+
export declare const CartMessageSchema: z.ZodObject<{
|
|
1454
|
+
kind: z.ZodEnum<["error", "warning", "info"]>;
|
|
1455
|
+
/** Machine code for branching; opaque and backend-defined. */
|
|
1456
|
+
code: z.ZodString;
|
|
1457
|
+
/** Human-readable text, meant to be shown as-is. */
|
|
1458
|
+
content: z.ZodString;
|
|
1459
|
+
}, "strip", z.ZodTypeAny, {
|
|
1460
|
+
code: string;
|
|
1461
|
+
kind: "error" | "warning" | "info";
|
|
1462
|
+
content: string;
|
|
1463
|
+
}, {
|
|
1464
|
+
code: string;
|
|
1465
|
+
kind: "error" | "warning" | "info";
|
|
1466
|
+
content: string;
|
|
1467
|
+
}>;
|
|
1468
|
+
export type CartMessage = z.infer<typeof CartMessageSchema>;
|
|
1469
|
+
export declare const CartSchema: z.ZodObject<{
|
|
1470
|
+
id: z.ZodString;
|
|
1471
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
1472
|
+
id: z.ZodString;
|
|
1473
|
+
merchandiseId: z.ZodString;
|
|
1474
|
+
productId: z.ZodString;
|
|
1475
|
+
title: z.ZodString;
|
|
1476
|
+
variantTitle: z.ZodOptional<z.ZodString>;
|
|
1477
|
+
/**
|
|
1478
|
+
* The variant's option axes as structured pairs (e.g.
|
|
1479
|
+
* `[{name:'Size', value:'7'}]`). The machine-readable counterpart of
|
|
1480
|
+
* `variantTitle` — selection-aware cart verbs and the client-state
|
|
1481
|
+
* snapshot match on these, never on the display string. Absent for
|
|
1482
|
+
* single-variant products (the degenerate `Title: Default Title` axis
|
|
1483
|
+
* is normalized away at the adapter boundary).
|
|
1484
|
+
*/
|
|
1485
|
+
selectedOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1486
|
+
name: z.ZodString;
|
|
1487
|
+
value: z.ZodString;
|
|
1488
|
+
}, "strip", z.ZodTypeAny, {
|
|
1489
|
+
value: string;
|
|
1490
|
+
name: string;
|
|
1491
|
+
}, {
|
|
1492
|
+
value: string;
|
|
1493
|
+
name: string;
|
|
1494
|
+
}>, "many">>;
|
|
1495
|
+
vendor: z.ZodOptional<z.ZodString>;
|
|
1496
|
+
sku: z.ZodOptional<z.ZodString>;
|
|
1497
|
+
quantity: z.ZodNumber;
|
|
1498
|
+
unitPrice: z.ZodObject<{
|
|
1499
|
+
amount: z.ZodNumber;
|
|
1500
|
+
currencyCode: z.ZodString;
|
|
1501
|
+
}, "strip", z.ZodTypeAny, {
|
|
1502
|
+
currencyCode: string;
|
|
1503
|
+
amount: number;
|
|
1504
|
+
}, {
|
|
1505
|
+
currencyCode: string;
|
|
1506
|
+
amount: number;
|
|
1507
|
+
}>;
|
|
1508
|
+
totalPrice: z.ZodObject<{
|
|
1509
|
+
amount: z.ZodNumber;
|
|
1510
|
+
currencyCode: z.ZodString;
|
|
1511
|
+
}, "strip", z.ZodTypeAny, {
|
|
1512
|
+
currencyCode: string;
|
|
1513
|
+
amount: number;
|
|
1514
|
+
}, {
|
|
1515
|
+
currencyCode: string;
|
|
1516
|
+
amount: number;
|
|
1517
|
+
}>;
|
|
1518
|
+
image: z.ZodOptional<z.ZodObject<{
|
|
1519
|
+
url: z.ZodString;
|
|
1520
|
+
altText: z.ZodString;
|
|
1521
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
1522
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
1523
|
+
/** Responsive candidate set, resolved at the commerce-adapter boundary —
|
|
1524
|
+
* never computed in a component. Renderers use it as `<img srcSet>` paired
|
|
1525
|
+
* with a layout `sizes`. Absent for non-CDN / unsizable images. */
|
|
1526
|
+
srcSet: z.ZodOptional<z.ZodString>;
|
|
1527
|
+
}, "strip", z.ZodTypeAny, {
|
|
1528
|
+
url: string;
|
|
1529
|
+
altText: string;
|
|
1530
|
+
width?: number | undefined;
|
|
1531
|
+
height?: number | undefined;
|
|
1532
|
+
srcSet?: string | undefined;
|
|
1533
|
+
}, {
|
|
1534
|
+
url: string;
|
|
1535
|
+
altText: string;
|
|
1536
|
+
width?: number | undefined;
|
|
1537
|
+
height?: number | undefined;
|
|
1538
|
+
srcSet?: string | undefined;
|
|
1539
|
+
}>>;
|
|
1540
|
+
/**
|
|
1541
|
+
* True while this line exists only in the client's optimistic paint —
|
|
1542
|
+
* the backend has not accepted it yet, so its `id` is client-minted and
|
|
1543
|
+
* its money is a local estimate. The backend NEVER sets this: a line on
|
|
1544
|
+
* a cart the adapter returned is settled by definition.
|
|
1545
|
+
*
|
|
1546
|
+
* Every consumer that must behave differently for an unsettled line
|
|
1547
|
+
* reads THIS, never the shape of `id`. The `optimistic-` id prefix is an
|
|
1548
|
+
* implementation detail of the optimistic writer, and sniffing it forced
|
|
1549
|
+
* the same string check into the engine, `@fourty/ui`, and every brand
|
|
1550
|
+
* package — a downstream guard standing in for a missing field. The
|
|
1551
|
+
* things that key off it: the row renders as pending rather than as a
|
|
1552
|
+
* settled $0 line, quantity writes stay client-side instead of sending a
|
|
1553
|
+
* client-minted id the backend rejects, line-tap navigation is
|
|
1554
|
+
* suppressed, and the money never folds into a settled-looking total.
|
|
1555
|
+
*/
|
|
1556
|
+
pending: z.ZodOptional<z.ZodBoolean>;
|
|
1557
|
+
}, "strip", z.ZodTypeAny, {
|
|
1558
|
+
id: string;
|
|
1559
|
+
title: string;
|
|
1560
|
+
productId: string;
|
|
1561
|
+
quantity: number;
|
|
1562
|
+
merchandiseId: string;
|
|
1563
|
+
unitPrice: {
|
|
1564
|
+
currencyCode: string;
|
|
1565
|
+
amount: number;
|
|
1566
|
+
};
|
|
1567
|
+
totalPrice: {
|
|
1568
|
+
currencyCode: string;
|
|
1569
|
+
amount: number;
|
|
1570
|
+
};
|
|
1571
|
+
pending?: boolean | undefined;
|
|
1572
|
+
image?: {
|
|
1573
|
+
url: string;
|
|
1574
|
+
altText: string;
|
|
1575
|
+
width?: number | undefined;
|
|
1576
|
+
height?: number | undefined;
|
|
1577
|
+
srcSet?: string | undefined;
|
|
1578
|
+
} | undefined;
|
|
1579
|
+
selectedOptions?: {
|
|
1580
|
+
value: string;
|
|
1581
|
+
name: string;
|
|
1582
|
+
}[] | undefined;
|
|
1583
|
+
vendor?: string | undefined;
|
|
1584
|
+
variantTitle?: string | undefined;
|
|
1585
|
+
sku?: string | undefined;
|
|
1586
|
+
}, {
|
|
1587
|
+
id: string;
|
|
1588
|
+
title: string;
|
|
1589
|
+
productId: string;
|
|
1590
|
+
quantity: number;
|
|
1591
|
+
merchandiseId: string;
|
|
1592
|
+
unitPrice: {
|
|
1593
|
+
currencyCode: string;
|
|
1594
|
+
amount: number;
|
|
1595
|
+
};
|
|
1596
|
+
totalPrice: {
|
|
1597
|
+
currencyCode: string;
|
|
1598
|
+
amount: number;
|
|
1599
|
+
};
|
|
1600
|
+
pending?: boolean | undefined;
|
|
1601
|
+
image?: {
|
|
1602
|
+
url: string;
|
|
1603
|
+
altText: string;
|
|
1604
|
+
width?: number | undefined;
|
|
1605
|
+
height?: number | undefined;
|
|
1606
|
+
srcSet?: string | undefined;
|
|
1607
|
+
} | undefined;
|
|
1608
|
+
selectedOptions?: {
|
|
1609
|
+
value: string;
|
|
1610
|
+
name: string;
|
|
1611
|
+
}[] | undefined;
|
|
1612
|
+
vendor?: string | undefined;
|
|
1613
|
+
variantTitle?: string | undefined;
|
|
1614
|
+
sku?: string | undefined;
|
|
1615
|
+
}>, "many">;
|
|
1616
|
+
totalQuantity: z.ZodNumber;
|
|
1617
|
+
subtotal: z.ZodObject<{
|
|
1618
|
+
amount: z.ZodNumber;
|
|
1619
|
+
currencyCode: z.ZodString;
|
|
1620
|
+
}, "strip", z.ZodTypeAny, {
|
|
1621
|
+
currencyCode: string;
|
|
1622
|
+
amount: number;
|
|
1623
|
+
}, {
|
|
1624
|
+
currencyCode: string;
|
|
1625
|
+
amount: number;
|
|
1626
|
+
}>;
|
|
1627
|
+
/**
|
|
1628
|
+
* Cart total after discounts (pre-shipping/tax). Absent when the
|
|
1629
|
+
* backend doesn't distinguish it — UIs then treat `subtotal` as the
|
|
1630
|
+
* best-known total. When present and lower than `subtotal`, the
|
|
1631
|
+
* difference is the applied discount.
|
|
1632
|
+
*/
|
|
1633
|
+
total: z.ZodOptional<z.ZodObject<{
|
|
1634
|
+
amount: z.ZodNumber;
|
|
1635
|
+
currencyCode: z.ZodString;
|
|
1636
|
+
}, "strip", z.ZodTypeAny, {
|
|
1637
|
+
currencyCode: string;
|
|
1638
|
+
amount: number;
|
|
1639
|
+
}, {
|
|
1640
|
+
currencyCode: string;
|
|
1641
|
+
amount: number;
|
|
1642
|
+
}>>;
|
|
1643
|
+
/** Discount codes currently attached to the cart. */
|
|
1644
|
+
discountCodes: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1645
|
+
code: z.ZodString;
|
|
1646
|
+
applicable: z.ZodBoolean;
|
|
1647
|
+
}, "strip", z.ZodTypeAny, {
|
|
1648
|
+
code: string;
|
|
1649
|
+
applicable: boolean;
|
|
1650
|
+
}, {
|
|
1651
|
+
code: string;
|
|
1652
|
+
applicable: boolean;
|
|
1653
|
+
}>, "many">>;
|
|
1654
|
+
/** Notices the backend attached to this cart — see `CartMessageSchema`.
|
|
1655
|
+
* Empty when the backend said nothing or does not report them. */
|
|
1656
|
+
messages: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1657
|
+
kind: z.ZodEnum<["error", "warning", "info"]>;
|
|
1658
|
+
/** Machine code for branching; opaque and backend-defined. */
|
|
1659
|
+
code: z.ZodString;
|
|
1660
|
+
/** Human-readable text, meant to be shown as-is. */
|
|
1661
|
+
content: z.ZodString;
|
|
1662
|
+
}, "strip", z.ZodTypeAny, {
|
|
1663
|
+
code: string;
|
|
1664
|
+
kind: "error" | "warning" | "info";
|
|
1665
|
+
content: string;
|
|
1666
|
+
}, {
|
|
1667
|
+
code: string;
|
|
1668
|
+
kind: "error" | "warning" | "info";
|
|
1669
|
+
content: string;
|
|
1670
|
+
}>, "many">>;
|
|
1671
|
+
checkoutUrl: z.ZodOptional<z.ZodString>;
|
|
1672
|
+
/**
|
|
1673
|
+
* Opaque handle this cart is known by in the connector's BACK OFFICE — the
|
|
1674
|
+
* value a space owner searches there to find the order this cart became.
|
|
1675
|
+
*
|
|
1676
|
+
* Set by the platform adapter and only by it: the handle is carved out of the
|
|
1677
|
+
* platform's own id format, which architecture-invariants §IV.4 says may be
|
|
1678
|
+
* parsed inside that platform's package and nowhere else. Everything above
|
|
1679
|
+
* this boundary passes the string through without reading it.
|
|
1680
|
+
*
|
|
1681
|
+
* Absent when the platform has no such handle, or while the cart is still the
|
|
1682
|
+
* client's optimistic paint and its id is client-minted.
|
|
1683
|
+
*/
|
|
1684
|
+
backOfficeRef: z.ZodOptional<z.ZodString>;
|
|
1685
|
+
/**
|
|
1686
|
+
* URL that recreates this cart on the merchant's own store website
|
|
1687
|
+
* (replace semantics — overwrites any cart the visitor already has
|
|
1688
|
+
* there). Populated by platform adapters that support it; absent when
|
|
1689
|
+
* the cart is empty or the URL cannot be built.
|
|
1690
|
+
*/
|
|
1691
|
+
storeCartUrl: z.ZodOptional<z.ZodString>;
|
|
1692
|
+
/**
|
|
1693
|
+
* True while this cart exists only in the client's optimistic paint —
|
|
1694
|
+
* no backend cart has been created yet, so its `id` is client-minted and
|
|
1695
|
+
* cannot be sent to the backend. Same contract as
|
|
1696
|
+
* `CartLineSchema.pending`: the adapter never sets it, and callers that
|
|
1697
|
+
* need a real cart id read THIS rather than sniffing the id's shape.
|
|
1698
|
+
*/
|
|
1699
|
+
pending: z.ZodOptional<z.ZodBoolean>;
|
|
1700
|
+
}, "strip", z.ZodTypeAny, {
|
|
1701
|
+
id: string;
|
|
1702
|
+
lines: {
|
|
1703
|
+
id: string;
|
|
1704
|
+
title: string;
|
|
1705
|
+
productId: string;
|
|
1706
|
+
quantity: number;
|
|
1707
|
+
merchandiseId: string;
|
|
1708
|
+
unitPrice: {
|
|
1709
|
+
currencyCode: string;
|
|
1710
|
+
amount: number;
|
|
1711
|
+
};
|
|
1712
|
+
totalPrice: {
|
|
1713
|
+
currencyCode: string;
|
|
1714
|
+
amount: number;
|
|
1715
|
+
};
|
|
1716
|
+
pending?: boolean | undefined;
|
|
1717
|
+
image?: {
|
|
1718
|
+
url: string;
|
|
1719
|
+
altText: string;
|
|
1720
|
+
width?: number | undefined;
|
|
1721
|
+
height?: number | undefined;
|
|
1722
|
+
srcSet?: string | undefined;
|
|
1723
|
+
} | undefined;
|
|
1724
|
+
selectedOptions?: {
|
|
1725
|
+
value: string;
|
|
1726
|
+
name: string;
|
|
1727
|
+
}[] | undefined;
|
|
1728
|
+
vendor?: string | undefined;
|
|
1729
|
+
variantTitle?: string | undefined;
|
|
1730
|
+
sku?: string | undefined;
|
|
1731
|
+
}[];
|
|
1732
|
+
totalQuantity: number;
|
|
1733
|
+
subtotal: {
|
|
1734
|
+
currencyCode: string;
|
|
1735
|
+
amount: number;
|
|
1736
|
+
};
|
|
1737
|
+
discountCodes: {
|
|
1738
|
+
code: string;
|
|
1739
|
+
applicable: boolean;
|
|
1740
|
+
}[];
|
|
1741
|
+
messages: {
|
|
1742
|
+
code: string;
|
|
1743
|
+
kind: "error" | "warning" | "info";
|
|
1744
|
+
content: string;
|
|
1745
|
+
}[];
|
|
1746
|
+
pending?: boolean | undefined;
|
|
1747
|
+
backOfficeRef?: string | undefined;
|
|
1748
|
+
total?: {
|
|
1749
|
+
currencyCode: string;
|
|
1750
|
+
amount: number;
|
|
1751
|
+
} | undefined;
|
|
1752
|
+
checkoutUrl?: string | undefined;
|
|
1753
|
+
storeCartUrl?: string | undefined;
|
|
1754
|
+
}, {
|
|
1755
|
+
id: string;
|
|
1756
|
+
lines: {
|
|
1757
|
+
id: string;
|
|
1758
|
+
title: string;
|
|
1759
|
+
productId: string;
|
|
1760
|
+
quantity: number;
|
|
1761
|
+
merchandiseId: string;
|
|
1762
|
+
unitPrice: {
|
|
1763
|
+
currencyCode: string;
|
|
1764
|
+
amount: number;
|
|
1765
|
+
};
|
|
1766
|
+
totalPrice: {
|
|
1767
|
+
currencyCode: string;
|
|
1768
|
+
amount: number;
|
|
1769
|
+
};
|
|
1770
|
+
pending?: boolean | undefined;
|
|
1771
|
+
image?: {
|
|
1772
|
+
url: string;
|
|
1773
|
+
altText: string;
|
|
1774
|
+
width?: number | undefined;
|
|
1775
|
+
height?: number | undefined;
|
|
1776
|
+
srcSet?: string | undefined;
|
|
1777
|
+
} | undefined;
|
|
1778
|
+
selectedOptions?: {
|
|
1779
|
+
value: string;
|
|
1780
|
+
name: string;
|
|
1781
|
+
}[] | undefined;
|
|
1782
|
+
vendor?: string | undefined;
|
|
1783
|
+
variantTitle?: string | undefined;
|
|
1784
|
+
sku?: string | undefined;
|
|
1785
|
+
}[];
|
|
1786
|
+
totalQuantity: number;
|
|
1787
|
+
subtotal: {
|
|
1788
|
+
currencyCode: string;
|
|
1789
|
+
amount: number;
|
|
1790
|
+
};
|
|
1791
|
+
pending?: boolean | undefined;
|
|
1792
|
+
backOfficeRef?: string | undefined;
|
|
1793
|
+
total?: {
|
|
1794
|
+
currencyCode: string;
|
|
1795
|
+
amount: number;
|
|
1796
|
+
} | undefined;
|
|
1797
|
+
discountCodes?: {
|
|
1798
|
+
code: string;
|
|
1799
|
+
applicable: boolean;
|
|
1800
|
+
}[] | undefined;
|
|
1801
|
+
messages?: {
|
|
1802
|
+
code: string;
|
|
1803
|
+
kind: "error" | "warning" | "info";
|
|
1804
|
+
content: string;
|
|
1805
|
+
}[] | undefined;
|
|
1806
|
+
checkoutUrl?: string | undefined;
|
|
1807
|
+
storeCartUrl?: string | undefined;
|
|
1808
|
+
}>;
|
|
1809
|
+
export type Cart = z.infer<typeof CartSchema>;
|
|
1810
|
+
/** The backend-accepted cart, or null when all we hold is an optimistic
|
|
1811
|
+
* paint. The single predicate for "is there a cart id the backend knows?" —
|
|
1812
|
+
* every cart mutation needs it before it can talk to the backend. */
|
|
1813
|
+
export declare function settledCart(cart: Cart | null | undefined): Cart | null;
|