@vendure-platform/create 0.5.0 → 1.0.0-major.202609091053.0.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/CHANGELOG.md +4 -0
- package/README.md +53 -41
- package/dist/add-to-existing.d.ts +19 -13
- package/dist/add-to-existing.js +1 -1
- package/dist/assets/demo-data/assets/branding/logo.svg +4 -0
- package/dist/assets/demo-data/assets/images/absorbent-pad.webp +0 -0
- package/dist/assets/demo-data/assets/images/adjustable-wrench.webp +0 -0
- package/dist/assets/demo-data/assets/images/anchor-bolt.webp +0 -0
- package/dist/assets/demo-data/assets/images/angle-grinder.webp +0 -0
- package/dist/assets/demo-data/assets/images/barrier-tape.webp +0 -0
- package/dist/assets/demo-data/assets/images/bench-grinder.webp +0 -0
- package/dist/assets/demo-data/assets/images/bracket.webp +0 -0
- package/dist/assets/demo-data/assets/images/broom.webp +0 -0
- package/dist/assets/demo-data/assets/images/bucket.webp +0 -0
- package/dist/assets/demo-data/assets/images/cable-gland.webp +0 -0
- package/dist/assets/demo-data/assets/images/cable-tie.webp +0 -0
- package/dist/assets/demo-data/assets/images/cable-tray.webp +0 -0
- package/dist/assets/demo-data/assets/images/cable.webp +0 -0
- package/dist/assets/demo-data/assets/images/chimney-base-kit.webp +0 -0
- package/dist/assets/demo-data/assets/images/chimney-cowl-bird-guard.webp +0 -0
- package/dist/assets/demo-data/assets/images/chimney-cowl-open.webp +0 -0
- package/dist/assets/demo-data/assets/images/chimney-storm-collar.webp +0 -0
- package/dist/assets/demo-data/assets/images/chimney-wall-bracket.webp +0 -0
- package/dist/assets/demo-data/assets/images/circular-saw.webp +0 -0
- package/dist/assets/demo-data/assets/images/cleaning-spray.webp +0 -0
- package/dist/assets/demo-data/assets/images/conduit.webp +0 -0
- package/dist/assets/demo-data/assets/images/cordless-drill.webp +0 -0
- package/dist/assets/demo-data/assets/images/drill-bits.webp +0 -0
- package/dist/assets/demo-data/assets/images/dust-mask.webp +0 -0
- package/dist/assets/demo-data/assets/images/ear-defenders.webp +0 -0
- package/dist/assets/demo-data/assets/images/ear-plugs.webp +0 -0
- package/dist/assets/demo-data/assets/images/extension-lead.webp +0 -0
- package/dist/assets/demo-data/assets/images/eye-wash-station.webp +0 -0
- package/dist/assets/demo-data/assets/images/face-shield.webp +0 -0
- package/dist/assets/demo-data/assets/images/file-set.webp +0 -0
- package/dist/assets/demo-data/assets/images/first-aid-kit.webp +0 -0
- package/dist/assets/demo-data/assets/images/floor-sign.webp +0 -0
- package/dist/assets/demo-data/assets/images/flue-bend-45.webp +0 -0
- package/dist/assets/demo-data/assets/images/flue-bend-90.webp +0 -0
- package/dist/assets/demo-data/assets/images/flue-section-1000mm.webp +0 -0
- package/dist/assets/demo-data/assets/images/flue-section-250mm.webp +0 -0
- package/dist/assets/demo-data/assets/images/flue-section-500mm.webp +0 -0
- package/dist/assets/demo-data/assets/images/fuse.webp +0 -0
- package/dist/assets/demo-data/assets/images/glove-dispenser.webp +0 -0
- package/dist/assets/demo-data/assets/images/grinding-disc.webp +0 -0
- package/dist/assets/demo-data/assets/images/hacksaw.webp +0 -0
- package/dist/assets/demo-data/assets/images/hammer.webp +0 -0
- package/dist/assets/demo-data/assets/images/hand-sanitiser.webp +0 -0
- package/dist/assets/demo-data/assets/images/head-torch.webp +0 -0
- package/dist/assets/demo-data/assets/images/heat-gun.webp +0 -0
- package/dist/assets/demo-data/assets/images/hex-bolt.webp +0 -0
- package/dist/assets/demo-data/assets/images/hex-key-set.webp +0 -0
- package/dist/assets/demo-data/assets/images/hex-nut.webp +0 -0
- package/dist/assets/demo-data/assets/images/hi-vis-jacket.webp +0 -0
- package/dist/assets/demo-data/assets/images/hi-vis-vest.webp +0 -0
- package/dist/assets/demo-data/assets/images/hose-clamp.webp +0 -0
- package/dist/assets/demo-data/assets/images/impact-driver.webp +0 -0
- package/dist/assets/demo-data/assets/images/jigsaw.webp +0 -0
- package/dist/assets/demo-data/assets/images/junction-box.webp +0 -0
- package/dist/assets/demo-data/assets/images/knee-pads.webp +0 -0
- package/dist/assets/demo-data/assets/images/machine-screw.webp +0 -0
- package/dist/assets/demo-data/assets/images/made-to-order-configurable-chimney.webp +0 -0
- package/dist/assets/demo-data/assets/images/mallet.webp +0 -0
- package/dist/assets/demo-data/assets/images/mcb.webp +0 -0
- package/dist/assets/demo-data/assets/images/mop.webp +0 -0
- package/dist/assets/demo-data/assets/images/paper-towels.webp +0 -0
- package/dist/assets/demo-data/assets/images/pipe-wrench.webp +0 -0
- package/dist/assets/demo-data/assets/images/pliers-set.webp +0 -0
- package/dist/assets/demo-data/assets/images/pry-bar.webp +0 -0
- package/dist/assets/demo-data/assets/images/rcd.webp +0 -0
- package/dist/assets/demo-data/assets/images/reciprocating-saw.webp +0 -0
- package/dist/assets/demo-data/assets/images/rivet.webp +0 -0
- package/dist/assets/demo-data/assets/images/roof-flashing-high-pitch.webp +0 -0
- package/dist/assets/demo-data/assets/images/roof-flashing-low-pitch.webp +0 -0
- package/dist/assets/demo-data/assets/images/safety-boots.webp +0 -0
- package/dist/assets/demo-data/assets/images/safety-glasses.webp +0 -0
- package/dist/assets/demo-data/assets/images/safety-harness.webp +0 -0
- package/dist/assets/demo-data/assets/images/safety-helmet.webp +0 -0
- package/dist/assets/demo-data/assets/images/safety-sign.webp +0 -0
- package/dist/assets/demo-data/assets/images/sanding-disc.webp +0 -0
- package/dist/assets/demo-data/assets/images/saw-blade.webp +0 -0
- package/dist/assets/demo-data/assets/images/screwdriver-set.webp +0 -0
- package/dist/assets/demo-data/assets/images/screwdriver.webp +0 -0
- package/dist/assets/demo-data/assets/images/self-tapping-screw.webp +0 -0
- package/dist/assets/demo-data/assets/images/socket-set.webp +0 -0
- package/dist/assets/demo-data/assets/images/socket.webp +0 -0
- package/dist/assets/demo-data/assets/images/spanner-set.webp +0 -0
- package/dist/assets/demo-data/assets/images/spanner.webp +0 -0
- package/dist/assets/demo-data/assets/images/spill-kit.webp +0 -0
- package/dist/assets/demo-data/assets/images/spirit-level.webp +0 -0
- package/dist/assets/demo-data/assets/images/switch.webp +0 -0
- package/dist/assets/demo-data/assets/images/tape-measure.webp +0 -0
- package/dist/assets/demo-data/assets/images/terminal-block.webp +0 -0
- package/dist/assets/demo-data/assets/images/threaded-rod.webp +0 -0
- package/dist/assets/demo-data/assets/images/torque-wrench.webp +0 -0
- package/dist/assets/demo-data/assets/images/utility-knife.webp +0 -0
- package/dist/assets/demo-data/assets/images/wall-pass-sleeve.webp +0 -0
- package/dist/assets/demo-data/assets/images/wall-plug.webp +0 -0
- package/dist/assets/demo-data/assets/images/washer.webp +0 -0
- package/dist/assets/demo-data/assets/images/waste-bin.webp +0 -0
- package/dist/assets/demo-data/assets/images/wire-connector.webp +0 -0
- package/dist/assets/demo-data/assets/images/wire-cutters.webp +0 -0
- package/dist/assets/demo-data/assets/images/wood-screw.webp +0 -0
- package/dist/assets/demo-data/assets/images/work-gloves.webp +0 -0
- package/dist/assets/demo-data/assets/images/work-light.webp +0 -0
- package/dist/assets/demo-data/assets/initial-data.json +667 -0
- package/dist/assets/demo-data/assets/products.csv +779 -0
- package/dist/assets/demo-data/initial-data.json +663 -663
- package/dist/assets/storefront/components.json +20 -20
- package/dist/assets/storefront/eslint.config.mjs +10 -10
- package/dist/assets/storefront/graphql.config.yml +1 -1
- package/dist/assets/storefront/next-env.d.ts +2 -1
- package/dist/assets/storefront/next.config.ts +19 -17
- package/dist/assets/storefront/package.json +3 -2
- package/dist/assets/storefront/postcss.config.mjs +1 -1
- package/dist/assets/storefront/src/app/[locale]/(catalog)/catalog/page.tsx +17 -21
- package/dist/assets/storefront/src/app/[locale]/(catalog)/collection/[slug]/page.tsx +64 -42
- package/dist/assets/storefront/src/app/[locale]/(catalog)/layout.tsx +1 -5
- package/dist/assets/storefront/src/app/[locale]/(catalog)/product/[slug]/actions.ts +69 -65
- package/dist/assets/storefront/src/app/[locale]/(catalog)/product/[slug]/page.tsx +64 -38
- package/dist/assets/storefront/src/app/[locale]/(catalog)/search/page.tsx +24 -27
- package/dist/assets/storefront/src/app/[locale]/(catalog)/search/search-results.tsx +11 -9
- package/dist/assets/storefront/src/app/[locale]/(catalog)/search/search-term.tsx +4 -4
- package/dist/assets/storefront/src/app/[locale]/(scenario)/[...path]/page.tsx +1 -1
- package/dist/assets/storefront/src/app/[locale]/accept-invitation/[token]/accept-invitation-client.tsx +8 -13
- package/dist/assets/storefront/src/app/[locale]/accept-invitation/[token]/actions.ts +11 -14
- package/dist/assets/storefront/src/app/[locale]/accept-invitation/[token]/page.tsx +30 -33
- package/dist/assets/storefront/src/app/[locale]/accept-invitation/[token]/sign-out-and-retry.tsx +6 -6
- package/dist/assets/storefront/src/app/[locale]/account/addresses/actions.ts +30 -45
- package/dist/assets/storefront/src/app/[locale]/account/addresses/address-form.tsx +166 -159
- package/dist/assets/storefront/src/app/[locale]/account/addresses/addresses-client.tsx +35 -26
- package/dist/assets/storefront/src/app/[locale]/account/addresses/loading.tsx +1 -3
- package/dist/assets/storefront/src/app/[locale]/account/addresses/page.tsx +18 -18
- package/dist/assets/storefront/src/app/[locale]/account/approvals/actions.ts +5 -8
- package/dist/assets/storefront/src/app/[locale]/account/approvals/page.tsx +79 -69
- package/dist/assets/storefront/src/app/[locale]/account/company/actions.ts +10 -11
- package/dist/assets/storefront/src/app/[locale]/account/company/addresses/actions.ts +6 -15
- package/dist/assets/storefront/src/app/[locale]/account/company/addresses/address-form.tsx +57 -49
- package/dist/assets/storefront/src/app/[locale]/account/company/addresses/addresses-client.tsx +23 -25
- package/dist/assets/storefront/src/app/[locale]/account/company/addresses/page.tsx +30 -30
- package/dist/assets/storefront/src/app/[locale]/account/company/business-units/actions.ts +20 -29
- package/dist/assets/storefront/src/app/[locale]/account/company/business-units/business-unit-form.tsx +32 -37
- package/dist/assets/storefront/src/app/[locale]/account/company/business-units/business-units-client.tsx +32 -25
- package/dist/assets/storefront/src/app/[locale]/account/company/business-units/page.tsx +26 -24
- package/dist/assets/storefront/src/app/[locale]/account/company/business-units/types.ts +7 -4
- package/dist/assets/storefront/src/app/[locale]/account/company/edit-company-form.tsx +11 -21
- package/dist/assets/storefront/src/app/[locale]/account/company/page.tsx +25 -28
- package/dist/assets/storefront/src/app/[locale]/account/company/payment-methods/page.tsx +26 -24
- package/dist/assets/storefront/src/app/[locale]/account/company/payment-methods/payment-methods-client.tsx +5 -7
- package/dist/assets/storefront/src/app/[locale]/account/company/roles/page.tsx +24 -25
- package/dist/assets/storefront/src/app/[locale]/account/company/roles/roles-client.tsx +11 -26
- package/dist/assets/storefront/src/app/[locale]/account/company/tax-ids/actions.ts +6 -10
- package/dist/assets/storefront/src/app/[locale]/account/company/tax-ids/page.tsx +18 -16
- package/dist/assets/storefront/src/app/[locale]/account/company/tax-ids/tax-ids-client.tsx +74 -67
- package/dist/assets/storefront/src/app/[locale]/account/company/users/actions.ts +16 -25
- package/dist/assets/storefront/src/app/[locale]/account/company/users/edit-user-form.tsx +27 -25
- package/dist/assets/storefront/src/app/[locale]/account/company/users/invite-user-form.tsx +27 -19
- package/dist/assets/storefront/src/app/[locale]/account/company/users/page.tsx +34 -29
- package/dist/assets/storefront/src/app/[locale]/account/company/users/users-client.tsx +35 -38
- package/dist/assets/storefront/src/app/[locale]/account/error.tsx +1 -3
- package/dist/assets/storefront/src/app/[locale]/account/layout.tsx +16 -22
- package/dist/assets/storefront/src/app/[locale]/account/orders/[code]/page.tsx +151 -103
- package/dist/assets/storefront/src/app/[locale]/account/orders/[code]/reorder-actions.ts +6 -7
- package/dist/assets/storefront/src/app/[locale]/account/orders/[code]/reorder-dialog.tsx +22 -48
- package/dist/assets/storefront/src/app/[locale]/account/orders/loading.tsx +8 -8
- package/dist/assets/storefront/src/app/[locale]/account/orders/page.tsx +101 -61
- package/dist/assets/storefront/src/app/[locale]/account/profile/actions.ts +32 -23
- package/dist/assets/storefront/src/app/[locale]/account/profile/change-password-form.tsx +6 -16
- package/dist/assets/storefront/src/app/[locale]/account/profile/edit-email-form.tsx +7 -17
- package/dist/assets/storefront/src/app/[locale]/account/profile/edit-profile-form.tsx +6 -16
- package/dist/assets/storefront/src/app/[locale]/account/profile/loading.tsx +12 -18
- package/dist/assets/storefront/src/app/[locale]/account/profile/page.tsx +17 -15
- package/dist/assets/storefront/src/app/[locale]/account/quick-order/file-upload-tab.tsx +2 -6
- package/dist/assets/storefront/src/app/[locale]/account/quick-order/manual-entry-tab.tsx +18 -15
- package/dist/assets/storefront/src/app/[locale]/account/quick-order/page.tsx +5 -6
- package/dist/assets/storefront/src/app/[locale]/account/quick-order/preview-table.tsx +10 -2
- package/dist/assets/storefront/src/app/[locale]/account/quick-order/save-to-list-dialog.tsx +24 -26
- package/dist/assets/storefront/src/app/[locale]/account/quick-order/sku-autocomplete.tsx +19 -10
- package/dist/assets/storefront/src/app/[locale]/account/quick-order/text-input-tab.tsx +3 -8
- package/dist/assets/storefront/src/app/[locale]/account/quotes/[id]/page.tsx +93 -62
- package/dist/assets/storefront/src/app/[locale]/account/quotes/actions.ts +38 -45
- package/dist/assets/storefront/src/app/[locale]/account/quotes/new/new-quote-form.tsx +3 -5
- package/dist/assets/storefront/src/app/[locale]/account/quotes/new/page.tsx +6 -6
- package/dist/assets/storefront/src/app/[locale]/account/quotes/page.tsx +92 -59
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/add-item-search.tsx +11 -9
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/add-member-form.tsx +31 -15
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/members-panel.tsx +52 -33
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/page.tsx +22 -14
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/rename-dialog.tsx +34 -13
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/actions.ts +117 -72
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/new/new-shared-cart-form.tsx +21 -14
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/new/page.tsx +10 -10
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/page.tsx +54 -41
- package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/[id]/page.tsx +22 -8
- package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/[id]/shopping-list-detail-client.tsx +62 -49
- package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/actions.ts +9 -4
- package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/create-shopping-list-form.tsx +5 -11
- package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/loading.tsx +1 -1
- package/dist/assets/storefront/src/app/[locale]/account/shopping-lists/page.tsx +32 -42
- package/dist/assets/storefront/src/app/[locale]/account/store-credits/actions.ts +8 -8
- package/dist/assets/storefront/src/app/[locale]/account/store-credits/claim-form.tsx +6 -10
- package/dist/assets/storefront/src/app/[locale]/account/store-credits/page.tsx +76 -55
- package/dist/assets/storefront/src/app/[locale]/account/store-credits/reveal-code.tsx +10 -6
- package/dist/assets/storefront/src/app/[locale]/account/verify-email/page.tsx +32 -39
- package/dist/assets/storefront/src/app/[locale]/cart/actions.ts +29 -23
- package/dist/assets/storefront/src/app/[locale]/cart/cart-items.tsx +111 -40
- package/dist/assets/storefront/src/app/[locale]/cart/cart-line-actions.tsx +9 -9
- package/dist/assets/storefront/src/app/[locale]/cart/cart-quantity-control.tsx +61 -48
- package/dist/assets/storefront/src/app/[locale]/cart/cart-remove-button.tsx +15 -9
- package/dist/assets/storefront/src/app/[locale]/cart/cart.tsx +38 -41
- package/dist/assets/storefront/src/app/[locale]/cart/code-input.tsx +8 -8
- package/dist/assets/storefront/src/app/[locale]/cart/order-summary.tsx +56 -35
- package/dist/assets/storefront/src/app/[locale]/cart/page.tsx +11 -11
- package/dist/assets/storefront/src/app/[locale]/cart/promotion-code.tsx +56 -47
- package/dist/assets/storefront/src/app/[locale]/cart/reapproval-confirm.tsx +22 -20
- package/dist/assets/storefront/src/app/[locale]/cart/request-quote-button.tsx +7 -16
- package/dist/assets/storefront/src/app/[locale]/checkout/actions.ts +39 -65
- package/dist/assets/storefront/src/app/[locale]/checkout/cancel-quote-checkout-button.tsx +5 -5
- package/dist/assets/storefront/src/app/[locale]/checkout/checkout-flow.tsx +202 -202
- package/dist/assets/storefront/src/app/[locale]/checkout/checkout-provider.tsx +142 -142
- package/dist/assets/storefront/src/app/[locale]/checkout/order-summary.tsx +158 -139
- package/dist/assets/storefront/src/app/[locale]/checkout/page.tsx +58 -47
- package/dist/assets/storefront/src/app/[locale]/checkout/steps/delivery-step.tsx +86 -88
- package/dist/assets/storefront/src/app/[locale]/checkout/steps/payment-step.tsx +90 -91
- package/dist/assets/storefront/src/app/[locale]/checkout/steps/review-step.tsx +166 -161
- package/dist/assets/storefront/src/app/[locale]/checkout/steps/shipping-address-step.tsx +573 -494
- package/dist/assets/storefront/src/app/[locale]/error.tsx +3 -5
- package/dist/assets/storefront/src/app/[locale]/forgot-password/actions.ts +10 -7
- package/dist/assets/storefront/src/app/[locale]/forgot-password/forgot-password-form.tsx +10 -25
- package/dist/assets/storefront/src/app/[locale]/forgot-password/page.tsx +5 -5
- package/dist/assets/storefront/src/app/[locale]/globals.css +48 -48
- package/dist/assets/storefront/src/app/[locale]/layout.tsx +56 -50
- package/dist/assets/storefront/src/app/[locale]/not-found.tsx +3 -5
- package/dist/assets/storefront/src/app/[locale]/order-confirmation/[code]/order-confirmation.tsx +71 -102
- package/dist/assets/storefront/src/app/[locale]/order-confirmation/[code]/page.tsx +7 -5
- package/dist/assets/storefront/src/app/[locale]/page.tsx +33 -35
- package/dist/assets/storefront/src/app/[locale]/register/actions.ts +7 -7
- package/dist/assets/storefront/src/app/[locale]/register/page.tsx +22 -16
- package/dist/assets/storefront/src/app/[locale]/register/registration-form.tsx +22 -34
- package/dist/assets/storefront/src/app/[locale]/register-company/actions.ts +15 -19
- package/dist/assets/storefront/src/app/[locale]/register-company/page.tsx +17 -15
- package/dist/assets/storefront/src/app/[locale]/register-company/registration-form.tsx +9 -15
- package/dist/assets/storefront/src/app/[locale]/reset-password/actions.ts +7 -8
- package/dist/assets/storefront/src/app/[locale]/reset-password/page.tsx +18 -12
- package/dist/assets/storefront/src/app/[locale]/reset-password/reset-password-form.tsx +8 -16
- package/dist/assets/storefront/src/app/[locale]/shopping-list/[code]/add-to-cart-button.tsx +10 -4
- package/dist/assets/storefront/src/app/[locale]/shopping-list/[code]/page.tsx +62 -30
- package/dist/assets/storefront/src/app/[locale]/sign-in/actions.ts +14 -16
- package/dist/assets/storefront/src/app/[locale]/sign-in/login-form.tsx +17 -30
- package/dist/assets/storefront/src/app/[locale]/sign-in/page.tsx +35 -30
- package/dist/assets/storefront/src/app/[locale]/verify/actions.ts +8 -8
- package/dist/assets/storefront/src/app/[locale]/verify/page.tsx +18 -14
- package/dist/assets/storefront/src/app/[locale]/verify/verify-content.tsx +25 -27
- package/dist/assets/storefront/src/app/[locale]/verify-pending/page.tsx +23 -23
- package/dist/assets/storefront/src/app/api/clear-company-context/route.ts +6 -3
- package/dist/assets/storefront/src/app/api/revalidate/route.ts +19 -28
- package/dist/assets/storefront/src/app/api/search-analytics/route.ts +1 -1
- package/dist/assets/storefront/src/components/commerce/account-nav-items.ts +43 -18
- package/dist/assets/storefront/src/components/commerce/account-sidebar.tsx +30 -22
- package/dist/assets/storefront/src/components/commerce/active-filters.tsx +1 -1
- package/dist/assets/storefront/src/components/commerce/add-to-shared-cart.tsx +49 -27
- package/dist/assets/storefront/src/components/commerce/approval-decision-form.tsx +9 -13
- package/dist/assets/storefront/src/components/commerce/approval-status-badge.tsx +23 -15
- package/dist/assets/storefront/src/components/commerce/business-unit-switcher.tsx +11 -11
- package/dist/assets/storefront/src/components/commerce/catalog-search-bar.tsx +2 -2
- package/dist/assets/storefront/src/components/commerce/category-product-section.tsx +28 -16
- package/dist/assets/storefront/src/components/commerce/category-sidebar.tsx +31 -18
- package/dist/assets/storefront/src/components/commerce/collection-hero-banner.tsx +2 -4
- package/dist/assets/storefront/src/components/commerce/company-state-badge.tsx +10 -16
- package/dist/assets/storefront/src/components/commerce/company-switcher.tsx +12 -12
- package/dist/assets/storefront/src/components/commerce/configurator-form.tsx +188 -79
- package/dist/assets/storefront/src/components/commerce/facet-filters.tsx +29 -49
- package/dist/assets/storefront/src/components/commerce/gift-card-pdp.tsx +4 -4
- package/dist/assets/storefront/src/components/commerce/gift-card-product-info.tsx +20 -30
- package/dist/assets/storefront/src/components/commerce/instant-search-dropdown.tsx +258 -227
- package/dist/assets/storefront/src/components/commerce/order-status-badge.tsx +27 -19
- package/dist/assets/storefront/src/components/commerce/packaging-unit-selector.tsx +27 -26
- package/dist/assets/storefront/src/components/commerce/permission-gate.tsx +4 -4
- package/dist/assets/storefront/src/components/commerce/price-range-filter.tsx +5 -5
- package/dist/assets/storefront/src/components/commerce/price-tiers.tsx +38 -21
- package/dist/assets/storefront/src/components/commerce/price.tsx +3 -3
- package/dist/assets/storefront/src/components/commerce/product-card-list.tsx +39 -16
- package/dist/assets/storefront/src/components/commerce/product-card.tsx +35 -18
- package/dist/assets/storefront/src/components/commerce/product-carousel.tsx +20 -12
- package/dist/assets/storefront/src/components/commerce/product-grid.tsx +14 -13
- package/dist/assets/storefront/src/components/commerce/product-image-carousel.tsx +10 -8
- package/dist/assets/storefront/src/components/commerce/product-info.tsx +118 -74
- package/dist/assets/storefront/src/components/commerce/product-list-expansion.tsx +102 -74
- package/dist/assets/storefront/src/components/commerce/product-list-view.tsx +1 -1
- package/dist/assets/storefront/src/components/commerce/product-sidebar.tsx +36 -11
- package/dist/assets/storefront/src/components/commerce/product-view-switcher.tsx +33 -21
- package/dist/assets/storefront/src/components/commerce/quote-action-buttons.tsx +80 -45
- package/dist/assets/storefront/src/components/commerce/quote-activity-timeline.tsx +126 -50
- package/dist/assets/storefront/src/components/commerce/quote-comment-form.tsx +9 -13
- package/dist/assets/storefront/src/components/commerce/quote-csv-export-button.tsx +6 -6
- package/dist/assets/storefront/src/components/commerce/quote-product-search.tsx +22 -18
- package/dist/assets/storefront/src/components/commerce/quote-request-form.tsx +28 -27
- package/dist/assets/storefront/src/components/commerce/quote-status-badge.tsx +26 -18
- package/dist/assets/storefront/src/components/commerce/quote-validity-indicator.tsx +7 -7
- package/dist/assets/storefront/src/components/commerce/quote-version-comparison.tsx +50 -30
- package/dist/assets/storefront/src/components/commerce/related-products.tsx +37 -28
- package/dist/assets/storefront/src/components/commerce/shared-cart-status-badge.tsx +12 -8
- package/dist/assets/storefront/src/components/commerce/shop-by-category.tsx +8 -7
- package/dist/assets/storefront/src/components/commerce/shopping-list-toggle.tsx +14 -20
- package/dist/assets/storefront/src/components/commerce/sort-dropdown.tsx +9 -16
- package/dist/assets/storefront/src/components/commerce/store-credit-summary.tsx +30 -32
- package/dist/assets/storefront/src/components/commerce/subcollection-tiles.tsx +11 -13
- package/dist/assets/storefront/src/components/layout/auth-page-shell.tsx +2 -2
- package/dist/assets/storefront/src/components/layout/draft-mode-indicator.tsx +2 -7
- package/dist/assets/storefront/src/components/layout/draft-mode-link.tsx +4 -2
- package/dist/assets/storefront/src/components/layout/footer.tsx +70 -28
- package/dist/assets/storefront/src/components/layout/navbar/actions.ts +9 -12
- package/dist/assets/storefront/src/components/layout/navbar/cart-icon.tsx +9 -9
- package/dist/assets/storefront/src/components/layout/navbar/channel-picker-wrapper.tsx +4 -9
- package/dist/assets/storefront/src/components/layout/navbar/channel-picker.tsx +13 -8
- package/dist/assets/storefront/src/components/layout/navbar/currency-picker-wrapper.tsx +4 -4
- package/dist/assets/storefront/src/components/layout/navbar/currency-picker.tsx +11 -6
- package/dist/assets/storefront/src/components/layout/navbar/language-picker.tsx +7 -7
- package/dist/assets/storefront/src/components/layout/navbar/login-button.tsx +24 -21
- package/dist/assets/storefront/src/components/layout/navbar/mobile-nav.tsx +8 -8
- package/dist/assets/storefront/src/components/layout/navbar/nav-menu-items.tsx +4 -6
- package/dist/assets/storefront/src/components/layout/navbar/navbar-cart.tsx +1 -1
- package/dist/assets/storefront/src/components/layout/navbar/navbar-collections.tsx +41 -42
- package/dist/assets/storefront/src/components/layout/navbar/navbar-link.tsx +7 -10
- package/dist/assets/storefront/src/components/layout/navbar/navbar-user.tsx +18 -23
- package/dist/assets/storefront/src/components/layout/navbar/theme-switcher.tsx +9 -9
- package/dist/assets/storefront/src/components/layout/navbar.tsx +36 -31
- package/dist/assets/storefront/src/components/layout/search-input.tsx +35 -32
- package/dist/assets/storefront/src/components/providers/awaiting-approval-banner.tsx +12 -10
- package/dist/assets/storefront/src/components/providers/cart-count-server.tsx +14 -12
- package/dist/assets/storefront/src/components/providers/company-context-guard.tsx +4 -4
- package/dist/assets/storefront/src/components/providers/company-permissions-server.tsx +2 -6
- package/dist/assets/storefront/src/components/providers/theme-provider.tsx +3 -3
- package/dist/assets/storefront/src/components/shared/breadcrumbs.tsx +4 -1
- package/dist/assets/storefront/src/components/shared/country-select.tsx +63 -67
- package/dist/assets/storefront/src/components/shared/pagination.tsx +15 -28
- package/dist/assets/storefront/src/components/shared/prefetch-link.tsx +1 -1
- package/dist/assets/storefront/src/components/shared/skeletons/search-input-skeleton.tsx +1 -3
- package/dist/assets/storefront/src/components/ui/accordion.tsx +46 -51
- package/dist/assets/storefront/src/components/ui/alert-dialog.tsx +94 -121
- package/dist/assets/storefront/src/components/ui/alert.tsx +48 -54
- package/dist/assets/storefront/src/components/ui/aspect-ratio.tsx +5 -7
- package/dist/assets/storefront/src/components/ui/avatar.tsx +29 -44
- package/dist/assets/storefront/src/components/ui/badge.tsx +28 -37
- package/dist/assets/storefront/src/components/ui/breadcrumb.tsx +82 -89
- package/dist/assets/storefront/src/components/ui/button.tsx +43 -49
- package/dist/assets/storefront/src/components/ui/calendar.tsx +157 -198
- package/dist/assets/storefront/src/components/ui/card.tsx +53 -76
- package/dist/assets/storefront/src/components/ui/carousel.tsx +194 -212
- package/dist/assets/storefront/src/components/ui/chart.tsx +274 -317
- package/dist/assets/storefront/src/components/ui/checkbox.tsx +24 -27
- package/dist/assets/storefront/src/components/ui/collapsible.tsx +9 -21
- package/dist/assets/storefront/src/components/ui/command.tsx +114 -159
- package/dist/assets/storefront/src/components/ui/context-menu.tsx +167 -199
- package/dist/assets/storefront/src/components/ui/dialog.tsx +97 -114
- package/dist/assets/storefront/src/components/ui/drawer.tsx +93 -107
- package/dist/assets/storefront/src/components/ui/dropdown-menu.tsx +171 -206
- package/dist/assets/storefront/src/components/ui/empty-state.tsx +5 -5
- package/dist/assets/storefront/src/components/ui/field.tsx +196 -208
- package/dist/assets/storefront/src/components/ui/form.tsx +115 -139
- package/dist/assets/storefront/src/components/ui/hover-card.tsx +27 -33
- package/dist/assets/storefront/src/components/ui/input-otp.tsx +50 -59
- package/dist/assets/storefront/src/components/ui/input.tsx +17 -17
- package/dist/assets/storefront/src/components/ui/kbd-shortcut.tsx +3 -1
- package/dist/assets/storefront/src/components/ui/label.tsx +16 -19
- package/dist/assets/storefront/src/components/ui/menubar.tsx +193 -223
- package/dist/assets/storefront/src/components/ui/navigation-menu.tsx +123 -130
- package/dist/assets/storefront/src/components/ui/pagination.tsx +87 -108
- package/dist/assets/storefront/src/components/ui/popover.tsx +29 -35
- package/dist/assets/storefront/src/components/ui/progress.tsx +19 -26
- package/dist/assets/storefront/src/components/ui/radio-group.tsx +32 -38
- package/dist/assets/storefront/src/components/ui/resizable.tsx +37 -42
- package/dist/assets/storefront/src/components/ui/scroll-area.tsx +41 -47
- package/dist/assets/storefront/src/components/ui/select.tsx +130 -152
- package/dist/assets/storefront/src/components/ui/separator.tsx +21 -21
- package/dist/assets/storefront/src/components/ui/sheet.tsx +90 -111
- package/dist/assets/storefront/src/components/ui/sidebar.tsx +611 -649
- package/dist/assets/storefront/src/components/ui/skeleton.tsx +10 -10
- package/dist/assets/storefront/src/components/ui/slider.tsx +50 -55
- package/dist/assets/storefront/src/components/ui/sonner.tsx +20 -20
- package/dist/assets/storefront/src/components/ui/switch.tsx +23 -26
- package/dist/assets/storefront/src/components/ui/table.tsx +65 -97
- package/dist/assets/storefront/src/components/ui/tabs.tsx +39 -55
- package/dist/assets/storefront/src/components/ui/textarea.tsx +14 -14
- package/dist/assets/storefront/src/components/ui/toggle-group.tsx +56 -62
- package/dist/assets/storefront/src/components/ui/toggle.tsx +37 -38
- package/dist/assets/storefront/src/components/ui/tooltip.tsx +38 -46
- package/dist/assets/storefront/src/config/capabilities.ts +41 -0
- package/dist/assets/storefront/src/config/scenario-meta.ts +2 -2
- package/dist/assets/storefront/src/config/scenario.ts +24 -16
- package/dist/assets/storefront/src/contexts/auth-context.tsx +5 -6
- package/dist/assets/storefront/src/graphql-env.d.ts +47 -41
- package/dist/assets/storefront/src/graphql.ts +5 -5
- package/dist/assets/storefront/src/hooks/use-mobile.ts +13 -13
- package/dist/assets/storefront/src/i18n/locale-utils.ts +3 -3
- package/dist/assets/storefront/src/i18n/navigation.ts +4 -4
- package/dist/assets/storefront/src/i18n/request.ts +4 -4
- package/dist/assets/storefront/src/i18n/routing.ts +5 -5
- package/dist/assets/storefront/src/i18n/server.ts +35 -7
- package/dist/assets/storefront/src/lib/actions/switch-channel.ts +9 -9
- package/dist/assets/storefront/src/lib/actions/switch-currency.ts +7 -7
- package/dist/assets/storefront/src/lib/auth.ts +1 -1
- package/dist/assets/storefront/src/lib/backend-health.ts +14 -6
- package/dist/assets/storefront/src/lib/cart-count-context.tsx +10 -4
- package/dist/assets/storefront/src/lib/cart-guard-utils.ts +2 -1
- package/dist/assets/storefront/src/lib/cart-guard.ts +7 -6
- package/dist/assets/storefront/src/lib/channel-server.ts +4 -4
- package/dist/assets/storefront/src/lib/company-context.ts +1 -1
- package/dist/assets/storefront/src/lib/company-permissions-context.tsx +1 -5
- package/dist/assets/storefront/src/lib/currency-server.ts +4 -4
- package/dist/assets/storefront/src/lib/format.ts +16 -7
- package/dist/assets/storefront/src/lib/metadata.ts +39 -44
- package/dist/assets/storefront/src/lib/quantity.ts +2 -4
- package/dist/assets/storefront/src/lib/search-bar-context.tsx +7 -4
- package/dist/assets/storefront/src/lib/use-recent-searches.ts +8 -6
- package/dist/assets/storefront/src/lib/utils.ts +3 -3
- package/dist/assets/storefront/src/lib/vendure/actions.ts +18 -16
- package/dist/assets/storefront/src/lib/vendure/api.ts +36 -23
- package/dist/assets/storefront/src/lib/vendure/approval-utils.ts +9 -8
- package/dist/assets/storefront/src/lib/vendure/cached.ts +20 -15
- package/dist/assets/storefront/src/lib/vendure/capability-documents.ts +246 -0
- package/dist/assets/storefront/src/lib/vendure/capability-schema.ts +358 -0
- package/dist/assets/storefront/src/lib/vendure/capability-ui.ts +15 -0
- package/dist/assets/storefront/src/lib/vendure/mutations.ts +835 -532
- package/dist/assets/storefront/src/lib/vendure/queries.ts +877 -524
- package/dist/assets/storefront/src/proxy.ts +11 -0
- package/dist/assets/storefront/src/scenarios/customer/hero.tsx +2 -2
- package/dist/assets/storefront/src/scenarios/customer/meta.ts +1 -1
- package/dist/assets/storefront/src/schema.graphql +337 -243
- package/dist/assets/templates/README.md.hbs +25 -1
- package/dist/assets/templates/docker-compose.yml.hbs +4 -0
- package/dist/assets/templates/env.hbs +34 -9
- package/dist/assets/templates/environment.d.ts.hbs +1 -0
- package/dist/assets/templates/gitignore.hbs +7 -4
- package/dist/assets/templates/migrate.ts.hbs +55 -0
- package/dist/assets/templates/npmrc.hbs +7 -2
- package/dist/assets/templates/platform-edition.ts.hbs +21 -0
- package/dist/assets/templates/server-package.json.hbs +15 -8
- package/dist/assets/templates/vendure-config.ts.hbs +18 -0
- package/dist/bin/run.js +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +1 -1
- package/dist/console-onboarding.d.ts +44 -0
- package/dist/console-onboarding.js +1 -0
- package/dist/hub-projects.d.ts +48 -0
- package/dist/hub-projects.js +1 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/plugin-registry.d.ts +61 -2
- package/dist/plugin-registry.js +1 -1
- package/dist/registry.d.ts +16 -13
- package/dist/registry.js +1 -1
- package/dist/scaffold-shared.js +1 -1
- package/dist/scaffold-storefront-only.js +1 -1
- package/dist/scaffolder.d.ts +11 -0
- package/dist/scaffolder.js +1 -1
- package/dist/storefront-copier.d.ts +7 -2
- package/dist/storefront-copier.js +1 -1
- package/dist/template-renderer.d.ts +26 -5
- package/dist/template-renderer.js +1 -1
- package/dist/types.d.ts +54 -23
- package/package.json +14 -2
- package/dist/assets/storefront/src/middleware.ts +0 -11
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { graphql, type ResultOf } from '@/graphql';
|
|
2
2
|
import type { VendureResponse } from '@vendure-platform/storefront-client';
|
|
3
|
+
import { composeCapabilityDocument, forCapability } from './capability-documents';
|
|
3
4
|
import {
|
|
4
5
|
ActiveCustomerFragment,
|
|
5
6
|
CompanyAddressFragment,
|
|
@@ -72,119 +73,162 @@ export const GetActiveCustomerQuery = graphql(
|
|
|
72
73
|
[ActiveCustomerFragment],
|
|
73
74
|
);
|
|
74
75
|
|
|
75
|
-
export const SearchProductsQuery =
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
facets {
|
|
85
|
-
facet {
|
|
86
|
-
id
|
|
87
|
-
code
|
|
88
|
-
name
|
|
76
|
+
export const SearchProductsQuery = composeCapabilityDocument(
|
|
77
|
+
graphql(
|
|
78
|
+
`
|
|
79
|
+
query SearchProducts($input: SearchInput!) {
|
|
80
|
+
search(input: $input) {
|
|
81
|
+
queryId
|
|
82
|
+
totalItems
|
|
83
|
+
items {
|
|
84
|
+
...ProductCard
|
|
89
85
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
facetValue {
|
|
86
|
+
facets {
|
|
87
|
+
facet {
|
|
93
88
|
id
|
|
94
89
|
code
|
|
95
90
|
name
|
|
96
91
|
}
|
|
92
|
+
facetValueCounts {
|
|
93
|
+
count
|
|
94
|
+
facetValue {
|
|
95
|
+
id
|
|
96
|
+
code
|
|
97
|
+
name
|
|
98
|
+
}
|
|
99
|
+
}
|
|
97
100
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
101
|
+
prices {
|
|
102
|
+
range {
|
|
103
|
+
min
|
|
104
|
+
max
|
|
105
|
+
}
|
|
106
|
+
rangeWithTax {
|
|
107
|
+
min
|
|
108
|
+
max
|
|
109
|
+
}
|
|
107
110
|
}
|
|
108
111
|
}
|
|
109
112
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
`,
|
|
114
|
+
[ProductCardFragment],
|
|
115
|
+
),
|
|
116
|
+
[
|
|
117
|
+
{
|
|
118
|
+
capability: 'search.foundation',
|
|
119
|
+
paths: [['highlights']],
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
capability: 'search.analytics.clickhouse',
|
|
123
|
+
paths: [['search', 'queryId']],
|
|
124
|
+
},
|
|
125
|
+
],
|
|
113
126
|
);
|
|
114
127
|
|
|
115
|
-
export const GetActiveUserShoppingListQuery =
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
128
|
+
export const GetActiveUserShoppingListQuery = composeCapabilityDocument(
|
|
129
|
+
graphql(
|
|
130
|
+
`
|
|
131
|
+
query GetActiveUserShoppingList($id: ID) {
|
|
132
|
+
activeUserShoppingList(id: $id) {
|
|
133
|
+
...ShoppingListFields
|
|
121
134
|
items {
|
|
122
|
-
|
|
135
|
+
items {
|
|
136
|
+
...ShoppingListItemFields
|
|
137
|
+
}
|
|
138
|
+
totalItems
|
|
123
139
|
}
|
|
124
|
-
totalItems
|
|
125
140
|
}
|
|
126
141
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
142
|
+
`,
|
|
143
|
+
[ShoppingListFragment, ShoppingListItemFragment],
|
|
144
|
+
),
|
|
145
|
+
[
|
|
146
|
+
{ capability: 'shopping-list.personal', paths: [['activeUserShoppingList']] },
|
|
147
|
+
{
|
|
148
|
+
capability: 'shopping-list.managed',
|
|
149
|
+
paths: [['isPublic'], ['publicCode'], ['customer'], ['purchased'], ['lastPurchasedAt']],
|
|
150
|
+
},
|
|
151
|
+
],
|
|
130
152
|
);
|
|
131
153
|
|
|
132
|
-
export const GetActiveUserShoppingListsQuery =
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
154
|
+
export const GetActiveUserShoppingListsQuery = composeCapabilityDocument(
|
|
155
|
+
graphql(
|
|
156
|
+
`
|
|
157
|
+
query GetActiveUserShoppingLists {
|
|
158
|
+
activeUserShoppingLists {
|
|
159
|
+
...ShoppingListFields
|
|
160
|
+
items {
|
|
161
|
+
totalItems
|
|
162
|
+
}
|
|
139
163
|
}
|
|
140
164
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
165
|
+
`,
|
|
166
|
+
[ShoppingListFragment],
|
|
167
|
+
),
|
|
168
|
+
[
|
|
169
|
+
{ capability: 'shopping-list.personal', paths: [['activeUserShoppingLists']] },
|
|
170
|
+
{
|
|
171
|
+
capability: 'shopping-list.managed',
|
|
172
|
+
paths: [['isPublic'], ['publicCode'], ['customer']],
|
|
173
|
+
},
|
|
174
|
+
],
|
|
144
175
|
);
|
|
145
176
|
|
|
146
|
-
export const GetShoppingListsWithItemVariantsQuery =
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
activeUserShoppingLists {
|
|
152
|
-
id
|
|
153
|
-
name
|
|
154
|
-
isDefault
|
|
155
|
-
customer {
|
|
177
|
+
export const GetShoppingListsWithItemVariantsQuery = composeCapabilityDocument(
|
|
178
|
+
graphql(`
|
|
179
|
+
query GetShoppingListsWithItemVariants {
|
|
180
|
+
activeCustomer {
|
|
156
181
|
id
|
|
157
182
|
}
|
|
158
|
-
|
|
159
|
-
|
|
183
|
+
activeUserShoppingLists {
|
|
184
|
+
id
|
|
185
|
+
name
|
|
186
|
+
isDefault
|
|
187
|
+
customer {
|
|
160
188
|
id
|
|
161
|
-
|
|
189
|
+
}
|
|
190
|
+
items(options: { take: 100 }) {
|
|
191
|
+
items {
|
|
192
|
+
id
|
|
193
|
+
productVariantId
|
|
194
|
+
}
|
|
162
195
|
}
|
|
163
196
|
}
|
|
164
197
|
}
|
|
165
|
-
|
|
166
|
-
|
|
198
|
+
`),
|
|
199
|
+
[
|
|
200
|
+
{ capability: 'shopping-list.personal', paths: [['activeUserShoppingLists']] },
|
|
201
|
+
{
|
|
202
|
+
capability: 'shopping-list.managed',
|
|
203
|
+
paths: [['activeUserShoppingLists', 'customer']],
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
);
|
|
167
207
|
|
|
168
|
-
export const GetPublicShoppingListQuery =
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
208
|
+
export const GetPublicShoppingListQuery = forCapability(
|
|
209
|
+
'shopping-list.managed',
|
|
210
|
+
graphql(
|
|
211
|
+
`
|
|
212
|
+
query GetPublicShoppingList($publicCode: String!) {
|
|
213
|
+
publicShoppingList(publicCode: $publicCode) {
|
|
214
|
+
...ShoppingListFields
|
|
174
215
|
items {
|
|
175
|
-
|
|
216
|
+
items {
|
|
217
|
+
...ShoppingListItemFields
|
|
218
|
+
}
|
|
219
|
+
totalItems
|
|
176
220
|
}
|
|
177
|
-
totalItems
|
|
178
221
|
}
|
|
179
222
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
223
|
+
`,
|
|
224
|
+
[ShoppingListFragment, ShoppingListItemFragment],
|
|
225
|
+
),
|
|
226
|
+
[['publicShoppingList']],
|
|
183
227
|
);
|
|
184
228
|
|
|
185
229
|
export type SearchProductsResult = Promise<VendureResponse<ResultOf<typeof SearchProductsQuery>>>;
|
|
186
230
|
|
|
187
|
-
|
|
231
|
+
const GetProductDetailDocument = graphql(`
|
|
188
232
|
query GetProductDetail($slug: String!) {
|
|
189
233
|
product(slug: $slug) {
|
|
190
234
|
id
|
|
@@ -273,23 +317,48 @@ export const GetProductDetailQuery = graphql(`
|
|
|
273
317
|
}
|
|
274
318
|
`);
|
|
275
319
|
|
|
320
|
+
/**
|
|
321
|
+
* `Product.customFields.configuratorSystemCode` is registered by
|
|
322
|
+
* `configurator.forms`, so it is absent from the schema of a deployment
|
|
323
|
+
* without that grant.
|
|
324
|
+
*/
|
|
325
|
+
export const GetProductDetailQuery = composeCapabilityDocument(GetProductDetailDocument, [
|
|
326
|
+
{
|
|
327
|
+
capability: 'pricing.contract',
|
|
328
|
+
paths: [
|
|
329
|
+
['product', 'variants', 'priceTiers'],
|
|
330
|
+
['product', 'variants', 'packagingUnits', 'priceTiers'],
|
|
331
|
+
],
|
|
332
|
+
},
|
|
333
|
+
{ capability: 'packaging-units', paths: [['product', 'variants', 'packagingUnits']] },
|
|
334
|
+
{ capability: 'store-credit.gift-cards', paths: [['product', 'customFields', 'isGiftCard']] },
|
|
335
|
+
{
|
|
336
|
+
capability: 'configurator.forms',
|
|
337
|
+
paths: [['product', 'customFields', 'configuratorSystemCode']],
|
|
338
|
+
},
|
|
339
|
+
]);
|
|
340
|
+
|
|
276
341
|
/** The full product object returned by GetProductDetailQuery. */
|
|
277
342
|
export type ProductDetail = NonNullable<ResultOf<typeof GetProductDetailQuery>['product']>;
|
|
278
343
|
|
|
279
344
|
/** A packaging unit option on a product variant. */
|
|
280
345
|
export type PackagingUnitOption = NonNullable<ProductDetail['variants'][number]['packagingUnits']>[number];
|
|
281
346
|
|
|
282
|
-
export const GetDraftVariantQuery =
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
347
|
+
export const GetDraftVariantQuery = forCapability(
|
|
348
|
+
'content.history',
|
|
349
|
+
graphql(`
|
|
350
|
+
query GetDraftVariant($id: ID!) {
|
|
351
|
+
contentVersioningProductVariant(id: $id) {
|
|
352
|
+
id
|
|
353
|
+
name
|
|
354
|
+
sku
|
|
355
|
+
}
|
|
288
356
|
}
|
|
289
|
-
|
|
290
|
-
|
|
357
|
+
`),
|
|
358
|
+
[['contentVersioningProductVariant']],
|
|
359
|
+
);
|
|
291
360
|
|
|
292
|
-
|
|
361
|
+
const GetActiveOrderDocument = graphql(`
|
|
293
362
|
query GetActiveOrder {
|
|
294
363
|
activeOrder {
|
|
295
364
|
id
|
|
@@ -380,10 +449,42 @@ export const GetActiveOrderQuery = graphql(`
|
|
|
380
449
|
}
|
|
381
450
|
`);
|
|
382
451
|
|
|
452
|
+
/**
|
|
453
|
+
* Configurator order-line links are absent from the schema without the
|
|
454
|
+
* `configurator.forms` grant.
|
|
455
|
+
*/
|
|
456
|
+
export const GetActiveOrderQuery = composeCapabilityDocument(GetActiveOrderDocument, [
|
|
457
|
+
{
|
|
458
|
+
capability: 'store-credit.balance',
|
|
459
|
+
paths: [
|
|
460
|
+
['activeOrder', 'storeCreditsApplied'],
|
|
461
|
+
['activeOrder', 'totalWithTaxAfterStoreCredit'],
|
|
462
|
+
],
|
|
463
|
+
},
|
|
464
|
+
{ capability: 'store-credit.gift-cards', paths: [['activeOrder', 'lines', 'giftCardInput']] },
|
|
465
|
+
{
|
|
466
|
+
capability: 'packaging-units',
|
|
467
|
+
paths: [
|
|
468
|
+
['activeOrder', 'lines', 'customFields', 'packagingUnit'],
|
|
469
|
+
['activeOrder', 'lines', 'customFields', 'packagingUnitConversionFactor'],
|
|
470
|
+
],
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
capability: 'configurator.forms',
|
|
474
|
+
paths: [
|
|
475
|
+
['activeOrder', 'lines', 'customFields', 'productConfiguration'],
|
|
476
|
+
['activeOrder', 'lines', 'customFields', 'productConfigurationLine'],
|
|
477
|
+
],
|
|
478
|
+
},
|
|
479
|
+
{ capability: 'quote.requests', paths: [['activeOrder', 'customFields', 'sourceQuoteId']] },
|
|
480
|
+
]);
|
|
481
|
+
|
|
383
482
|
/** A store credit applied to the active order. */
|
|
384
|
-
export type StoreCredit = NonNullable<
|
|
483
|
+
export type StoreCredit = NonNullable<
|
|
484
|
+
ResultOf<typeof GetActiveOrderQuery>['activeOrder']
|
|
485
|
+
>['storeCreditsApplied'][number];
|
|
385
486
|
|
|
386
|
-
|
|
487
|
+
const GetActiveOrderForCheckoutDocument = graphql(`
|
|
387
488
|
query GetActiveOrderForCheckout {
|
|
388
489
|
activeOrder {
|
|
389
490
|
id
|
|
@@ -480,6 +581,17 @@ export const GetActiveOrderForCheckoutQuery = graphql(`
|
|
|
480
581
|
}
|
|
481
582
|
`);
|
|
482
583
|
|
|
584
|
+
export const GetActiveOrderForCheckoutQuery = composeCapabilityDocument(GetActiveOrderForCheckoutDocument, [
|
|
585
|
+
{
|
|
586
|
+
capability: 'store-credit.balance',
|
|
587
|
+
paths: [
|
|
588
|
+
['activeOrder', 'storeCreditsApplied'],
|
|
589
|
+
['activeOrder', 'totalWithTaxAfterStoreCredit'],
|
|
590
|
+
],
|
|
591
|
+
},
|
|
592
|
+
{ capability: 'quote.requests', paths: [['activeOrder', 'customFields', 'sourceQuoteId']] },
|
|
593
|
+
]);
|
|
594
|
+
|
|
483
595
|
export const GetCustomerAddressesQuery = graphql(`
|
|
484
596
|
query GetCustomerAddresses {
|
|
485
597
|
activeCustomer {
|
|
@@ -607,7 +719,7 @@ export const GetOrderSummaryQuery = graphql(`
|
|
|
607
719
|
}
|
|
608
720
|
`);
|
|
609
721
|
|
|
610
|
-
|
|
722
|
+
const GetOrderDetailDocument = graphql(`
|
|
611
723
|
query GetOrderDetail($code: String!) {
|
|
612
724
|
orderByCode(code: $code) {
|
|
613
725
|
id
|
|
@@ -726,22 +838,134 @@ export const GetOrderDetailQuery = graphql(`
|
|
|
726
838
|
}
|
|
727
839
|
`);
|
|
728
840
|
|
|
729
|
-
export const
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
841
|
+
export const GetOrderDetailQuery = composeCapabilityDocument(GetOrderDetailDocument, [
|
|
842
|
+
{
|
|
843
|
+
capability: 'store-credit.balance',
|
|
844
|
+
paths: [
|
|
845
|
+
['orderByCode', 'storeCreditsApplied'],
|
|
846
|
+
['orderByCode', 'totalWithTaxAfterStoreCredit'],
|
|
847
|
+
],
|
|
848
|
+
},
|
|
849
|
+
{ capability: 'store-credit.gift-cards', paths: [['orderByCode', 'lines', 'giftCardInput']] },
|
|
850
|
+
]);
|
|
851
|
+
|
|
852
|
+
const GetOrderByCodeForConfirmationDocument = graphql(`
|
|
853
|
+
query GetOrderByCodeForConfirmation($code: String!) {
|
|
854
|
+
orderByCode(code: $code) {
|
|
855
|
+
id
|
|
856
|
+
code
|
|
857
|
+
state
|
|
858
|
+
subTotal
|
|
859
|
+
subTotalWithTax
|
|
860
|
+
shipping
|
|
861
|
+
shippingWithTax
|
|
862
|
+
total
|
|
863
|
+
totalWithTax
|
|
864
|
+
currencyCode
|
|
865
|
+
storeCreditsApplied {
|
|
866
|
+
code
|
|
867
|
+
balance
|
|
868
|
+
amountDeducted
|
|
869
|
+
}
|
|
870
|
+
totalWithTaxAfterStoreCredit
|
|
871
|
+
payments {
|
|
872
|
+
id
|
|
873
|
+
method
|
|
874
|
+
amount
|
|
875
|
+
state
|
|
876
|
+
metadata
|
|
877
|
+
}
|
|
878
|
+
lines {
|
|
879
|
+
id
|
|
880
|
+
productVariant {
|
|
881
|
+
id
|
|
882
|
+
name
|
|
883
|
+
product {
|
|
884
|
+
id
|
|
885
|
+
name
|
|
886
|
+
slug
|
|
887
|
+
featuredAsset {
|
|
888
|
+
id
|
|
889
|
+
preview
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
quantity
|
|
894
|
+
linePrice
|
|
895
|
+
linePriceWithTax
|
|
896
|
+
}
|
|
897
|
+
shippingAddress {
|
|
898
|
+
fullName
|
|
899
|
+
streetLine1
|
|
900
|
+
streetLine2
|
|
901
|
+
city
|
|
902
|
+
province
|
|
903
|
+
postalCode
|
|
904
|
+
country
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
`);
|
|
909
|
+
|
|
910
|
+
export const GetOrderByCodeForConfirmationQuery = composeCapabilityDocument(
|
|
911
|
+
GetOrderByCodeForConfirmationDocument,
|
|
912
|
+
[
|
|
913
|
+
{
|
|
914
|
+
capability: 'store-credit.balance',
|
|
915
|
+
paths: [
|
|
916
|
+
['orderByCode', 'storeCreditsApplied'],
|
|
917
|
+
['orderByCode', 'totalWithTaxAfterStoreCredit'],
|
|
918
|
+
],
|
|
919
|
+
},
|
|
920
|
+
],
|
|
921
|
+
);
|
|
922
|
+
|
|
923
|
+
export const GetMyApprovalRequestsQuery = forCapability(
|
|
924
|
+
'approval.orders',
|
|
925
|
+
graphql(`
|
|
926
|
+
query GetMyApprovalRequests($options: ApprovalRequestListOptions) {
|
|
927
|
+
myApprovalRequests(options: $options) {
|
|
928
|
+
totalItems
|
|
929
|
+
items {
|
|
930
|
+
id
|
|
931
|
+
createdAt
|
|
932
|
+
entityType
|
|
933
|
+
entityId
|
|
934
|
+
status
|
|
935
|
+
summary
|
|
936
|
+
requestedByCustomer {
|
|
937
|
+
id
|
|
938
|
+
firstName
|
|
939
|
+
lastName
|
|
940
|
+
}
|
|
941
|
+
decisions {
|
|
942
|
+
id
|
|
943
|
+
level
|
|
944
|
+
decision
|
|
945
|
+
comment
|
|
946
|
+
decidedAt
|
|
947
|
+
customer {
|
|
948
|
+
id
|
|
949
|
+
firstName
|
|
950
|
+
lastName
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
`),
|
|
957
|
+
[['myApprovalRequests']],
|
|
958
|
+
);
|
|
959
|
+
|
|
960
|
+
export const GetApprovalHistoryForEntityQuery = forCapability(
|
|
961
|
+
'approval.orders',
|
|
962
|
+
graphql(`
|
|
963
|
+
query GetApprovalHistoryForEntity($entityType: String!, $entityId: ID!) {
|
|
964
|
+
approvalHistoryForEntity(entityType: $entityType, entityId: $entityId) {
|
|
734
965
|
id
|
|
735
966
|
createdAt
|
|
736
|
-
entityType
|
|
737
|
-
entityId
|
|
738
967
|
status
|
|
739
968
|
summary
|
|
740
|
-
requestedByCustomer {
|
|
741
|
-
id
|
|
742
|
-
firstName
|
|
743
|
-
lastName
|
|
744
|
-
}
|
|
745
969
|
decisions {
|
|
746
970
|
id
|
|
747
971
|
level
|
|
@@ -756,52 +980,34 @@ export const GetMyApprovalRequestsQuery = graphql(`
|
|
|
756
980
|
}
|
|
757
981
|
}
|
|
758
982
|
}
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
export const GetApprovalHistoryForEntityQuery = graphql(`
|
|
763
|
-
query GetApprovalHistoryForEntity($entityType: String!, $entityId: ID!) {
|
|
764
|
-
approvalHistoryForEntity(entityType: $entityType, entityId: $entityId) {
|
|
765
|
-
id
|
|
766
|
-
createdAt
|
|
767
|
-
status
|
|
768
|
-
summary
|
|
769
|
-
decisions {
|
|
770
|
-
id
|
|
771
|
-
level
|
|
772
|
-
decision
|
|
773
|
-
comment
|
|
774
|
-
decidedAt
|
|
775
|
-
customer {
|
|
776
|
-
id
|
|
777
|
-
firstName
|
|
778
|
-
lastName
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
`);
|
|
983
|
+
`),
|
|
984
|
+
[['approvalHistoryForEntity']],
|
|
985
|
+
);
|
|
784
986
|
|
|
785
|
-
export const GetCompanyOrdersQuery =
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
createdAt
|
|
793
|
-
state
|
|
794
|
-
totalWithTax
|
|
795
|
-
currencyCode
|
|
796
|
-
customer {
|
|
987
|
+
export const GetCompanyOrdersQuery = forCapability(
|
|
988
|
+
'org.accounts',
|
|
989
|
+
graphql(`
|
|
990
|
+
query GetCompanyOrders($options: OrderListOptions) {
|
|
991
|
+
companyOrders(options: $options) {
|
|
992
|
+
totalItems
|
|
993
|
+
items {
|
|
797
994
|
id
|
|
798
|
-
|
|
799
|
-
|
|
995
|
+
code
|
|
996
|
+
createdAt
|
|
997
|
+
state
|
|
998
|
+
totalWithTax
|
|
999
|
+
currencyCode
|
|
1000
|
+
customer {
|
|
1001
|
+
id
|
|
1002
|
+
firstName
|
|
1003
|
+
lastName
|
|
1004
|
+
}
|
|
800
1005
|
}
|
|
801
1006
|
}
|
|
802
1007
|
}
|
|
803
|
-
|
|
804
|
-
|
|
1008
|
+
`),
|
|
1009
|
+
[['companyOrders']],
|
|
1010
|
+
);
|
|
805
1011
|
|
|
806
1012
|
export const GetActiveChannelQuery = graphql(`
|
|
807
1013
|
query GetActiveChannel {
|
|
@@ -816,166 +1022,221 @@ export const GetActiveChannelQuery = graphql(`
|
|
|
816
1022
|
}
|
|
817
1023
|
`);
|
|
818
1024
|
|
|
819
|
-
export const GetCollectionProductsQuery =
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
slug
|
|
826
|
-
description
|
|
827
|
-
featuredAsset {
|
|
828
|
-
id
|
|
829
|
-
preview
|
|
830
|
-
}
|
|
831
|
-
breadcrumbs {
|
|
832
|
-
id
|
|
833
|
-
name
|
|
834
|
-
slug
|
|
835
|
-
}
|
|
836
|
-
children {
|
|
1025
|
+
export const GetCollectionProductsQuery = forCapability(
|
|
1026
|
+
'search.foundation',
|
|
1027
|
+
graphql(
|
|
1028
|
+
`
|
|
1029
|
+
query GetCollectionProducts($slug: String!, $input: SearchInput!) {
|
|
1030
|
+
collection(slug: $slug) {
|
|
837
1031
|
id
|
|
838
1032
|
name
|
|
839
1033
|
slug
|
|
1034
|
+
description
|
|
840
1035
|
featuredAsset {
|
|
841
1036
|
id
|
|
842
1037
|
preview
|
|
843
1038
|
}
|
|
1039
|
+
breadcrumbs {
|
|
1040
|
+
id
|
|
1041
|
+
name
|
|
1042
|
+
slug
|
|
1043
|
+
}
|
|
1044
|
+
children {
|
|
1045
|
+
id
|
|
1046
|
+
name
|
|
1047
|
+
slug
|
|
1048
|
+
featuredAsset {
|
|
1049
|
+
id
|
|
1050
|
+
preview
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
844
1053
|
}
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
1054
|
+
search(input: $input) {
|
|
1055
|
+
totalItems
|
|
1056
|
+
items {
|
|
1057
|
+
...ProductCard
|
|
1058
|
+
}
|
|
850
1059
|
}
|
|
851
1060
|
}
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
1061
|
+
`,
|
|
1062
|
+
[ProductCardFragment],
|
|
1063
|
+
),
|
|
1064
|
+
[['highlights']],
|
|
855
1065
|
);
|
|
856
1066
|
|
|
857
|
-
export const GetMyCompaniesQuery =
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
1067
|
+
export const GetMyCompaniesQuery = forCapability(
|
|
1068
|
+
'org.accounts',
|
|
1069
|
+
graphql(`
|
|
1070
|
+
query GetMyCompanies {
|
|
1071
|
+
activeCustomer {
|
|
862
1072
|
id
|
|
863
|
-
|
|
864
|
-
company {
|
|
1073
|
+
companyUsers {
|
|
865
1074
|
id
|
|
866
|
-
name
|
|
867
1075
|
state
|
|
1076
|
+
company {
|
|
1077
|
+
id
|
|
1078
|
+
name
|
|
1079
|
+
state
|
|
1080
|
+
}
|
|
868
1081
|
}
|
|
869
1082
|
}
|
|
870
1083
|
}
|
|
871
|
-
|
|
872
|
-
|
|
1084
|
+
`),
|
|
1085
|
+
[['activeCustomer', 'companyUsers']],
|
|
1086
|
+
);
|
|
873
1087
|
|
|
874
|
-
export type CompanyUserCompany = NonNullable<
|
|
1088
|
+
export type CompanyUserCompany = NonNullable<
|
|
1089
|
+
ResultOf<typeof GetMyCompaniesQuery>['activeCustomer']
|
|
1090
|
+
>['companyUsers'][number]['company'];
|
|
875
1091
|
|
|
876
|
-
export const GetActiveCustomerCompanyQuery =
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
1092
|
+
export const GetActiveCustomerCompanyQuery = composeCapabilityDocument(
|
|
1093
|
+
graphql(
|
|
1094
|
+
`
|
|
1095
|
+
query GetActiveCustomerCompany {
|
|
1096
|
+
activeCustomer {
|
|
1097
|
+
id
|
|
1098
|
+
companyUsers {
|
|
1099
|
+
...CompanyUser
|
|
1100
|
+
}
|
|
883
1101
|
}
|
|
884
1102
|
}
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
1103
|
+
`,
|
|
1104
|
+
[CompanyUserFragment],
|
|
1105
|
+
),
|
|
1106
|
+
[
|
|
1107
|
+
{ capability: 'org.accounts', paths: [['activeCustomer', 'companyUsers']] },
|
|
1108
|
+
{ capability: 'org.hierarchy', paths: [['businessUnits']] },
|
|
1109
|
+
],
|
|
888
1110
|
);
|
|
889
1111
|
|
|
890
|
-
export const GetCompanyAccountQuery =
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
1112
|
+
export const GetCompanyAccountQuery = composeCapabilityDocument(
|
|
1113
|
+
graphql(
|
|
1114
|
+
`
|
|
1115
|
+
query GetCompanyAccount {
|
|
1116
|
+
companyAccount {
|
|
1117
|
+
company {
|
|
1118
|
+
...Company
|
|
1119
|
+
}
|
|
1120
|
+
companyUser {
|
|
1121
|
+
...CompanyUser
|
|
1122
|
+
}
|
|
1123
|
+
activeBusinessUnit {
|
|
1124
|
+
...CompanyBusinessUnit
|
|
1125
|
+
}
|
|
1126
|
+
permissions
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
`,
|
|
1130
|
+
[CompanyFragment, CompanyUserFragment, CompanyBusinessUnitFragment],
|
|
1131
|
+
),
|
|
1132
|
+
[
|
|
1133
|
+
{ capability: 'org.accounts', paths: [['companyAccount']] },
|
|
1134
|
+
{
|
|
1135
|
+
capability: 'org.hierarchy',
|
|
1136
|
+
paths: [['companyAccount', 'activeBusinessUnit'], ['businessUnits']],
|
|
1137
|
+
},
|
|
1138
|
+
],
|
|
908
1139
|
);
|
|
909
1140
|
|
|
910
|
-
export const GetCompanyBusinessUnitsQuery =
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
1141
|
+
export const GetCompanyBusinessUnitsQuery = forCapability(
|
|
1142
|
+
'org.hierarchy',
|
|
1143
|
+
graphql(
|
|
1144
|
+
`
|
|
1145
|
+
query GetCompanyBusinessUnits {
|
|
1146
|
+
companyBusinessUnits {
|
|
1147
|
+
...CompanyBusinessUnit
|
|
1148
|
+
}
|
|
915
1149
|
}
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
1150
|
+
`,
|
|
1151
|
+
[CompanyBusinessUnitFragment],
|
|
1152
|
+
),
|
|
1153
|
+
[['companyBusinessUnits']],
|
|
919
1154
|
);
|
|
920
1155
|
|
|
921
|
-
export const GetShopCompanyUsersQuery =
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
1156
|
+
export const GetShopCompanyUsersQuery = composeCapabilityDocument(
|
|
1157
|
+
graphql(
|
|
1158
|
+
`
|
|
1159
|
+
query GetShopCompanyUsers {
|
|
1160
|
+
shopCompanyUsers {
|
|
1161
|
+
...CompanyUser
|
|
1162
|
+
}
|
|
926
1163
|
}
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
1164
|
+
`,
|
|
1165
|
+
[CompanyUserFragment],
|
|
1166
|
+
),
|
|
1167
|
+
[
|
|
1168
|
+
{ capability: 'org.accounts', paths: [['shopCompanyUsers']] },
|
|
1169
|
+
{ capability: 'org.hierarchy', paths: [['businessUnits']] },
|
|
1170
|
+
],
|
|
930
1171
|
);
|
|
931
1172
|
|
|
932
|
-
export const GetCompanyRolesQuery =
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
1173
|
+
export const GetCompanyRolesQuery = forCapability(
|
|
1174
|
+
'org.accounts',
|
|
1175
|
+
graphql(
|
|
1176
|
+
`
|
|
1177
|
+
query GetCompanyRoles {
|
|
1178
|
+
companyRoles {
|
|
1179
|
+
...CompanyRole
|
|
1180
|
+
}
|
|
937
1181
|
}
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
1182
|
+
`,
|
|
1183
|
+
[CompanyRoleFragment],
|
|
1184
|
+
),
|
|
1185
|
+
[['companyRoles']],
|
|
941
1186
|
);
|
|
942
1187
|
|
|
943
|
-
export const GetCompanyAddressesQuery =
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
1188
|
+
export const GetCompanyAddressesQuery = composeCapabilityDocument(
|
|
1189
|
+
graphql(
|
|
1190
|
+
`
|
|
1191
|
+
query GetCompanyAddresses {
|
|
1192
|
+
companyAddresses {
|
|
1193
|
+
...CompanyAddress
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
`,
|
|
1197
|
+
[CompanyAddressFragment],
|
|
1198
|
+
),
|
|
1199
|
+
[
|
|
1200
|
+
{ capability: 'org.accounts', paths: [['companyAddresses']] },
|
|
1201
|
+
{ capability: 'org.hierarchy', paths: [['businessUnit']] },
|
|
1202
|
+
],
|
|
952
1203
|
);
|
|
953
1204
|
|
|
954
|
-
export const GetCompanyPaymentMethodsQuery =
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
1205
|
+
export const GetCompanyPaymentMethodsQuery = forCapability(
|
|
1206
|
+
'org.accounts',
|
|
1207
|
+
graphql(
|
|
1208
|
+
`
|
|
1209
|
+
query GetCompanyPaymentMethods {
|
|
1210
|
+
companyPaymentMethods {
|
|
1211
|
+
...CompanyPaymentMethod
|
|
1212
|
+
}
|
|
959
1213
|
}
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
1214
|
+
`,
|
|
1215
|
+
[CompanyPaymentMethodFragment],
|
|
1216
|
+
),
|
|
1217
|
+
[['companyPaymentMethods']],
|
|
963
1218
|
);
|
|
964
1219
|
|
|
965
|
-
export const GetCompanyInvitationQuery =
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
1220
|
+
export const GetCompanyInvitationQuery = composeCapabilityDocument(
|
|
1221
|
+
graphql(
|
|
1222
|
+
`
|
|
1223
|
+
query GetCompanyInvitation($token: String!) {
|
|
1224
|
+
companyInvitation(token: $token) {
|
|
1225
|
+
companyUser {
|
|
1226
|
+
...CompanyUser
|
|
1227
|
+
}
|
|
1228
|
+
company {
|
|
1229
|
+
...Company
|
|
1230
|
+
}
|
|
974
1231
|
}
|
|
975
1232
|
}
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
1233
|
+
`,
|
|
1234
|
+
[CompanyUserFragment, CompanyFragment],
|
|
1235
|
+
),
|
|
1236
|
+
[
|
|
1237
|
+
{ capability: 'org.accounts', paths: [['companyInvitation']] },
|
|
1238
|
+
{ capability: 'org.hierarchy', paths: [['businessUnits']] },
|
|
1239
|
+
],
|
|
979
1240
|
);
|
|
980
1241
|
|
|
981
1242
|
export const InstantSearchQuery = graphql(`
|
|
@@ -1018,20 +1279,24 @@ export const InstantSearchQuery = graphql(`
|
|
|
1018
1279
|
}
|
|
1019
1280
|
`);
|
|
1020
1281
|
|
|
1021
|
-
export const CollectionSearchQuery =
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1282
|
+
export const CollectionSearchQuery = forCapability(
|
|
1283
|
+
'search.foundation',
|
|
1284
|
+
graphql(`
|
|
1285
|
+
query CollectionSearch($input: ExternalSearchScopedInput!) {
|
|
1286
|
+
searchCollections(input: $input) {
|
|
1287
|
+
items {
|
|
1288
|
+
id
|
|
1289
|
+
name
|
|
1290
|
+
slug
|
|
1291
|
+
thumbnailUrl
|
|
1292
|
+
score
|
|
1293
|
+
}
|
|
1294
|
+
totalItems
|
|
1030
1295
|
}
|
|
1031
|
-
totalItems
|
|
1032
1296
|
}
|
|
1033
|
-
|
|
1034
|
-
|
|
1297
|
+
`),
|
|
1298
|
+
[['searchCollections']],
|
|
1299
|
+
);
|
|
1035
1300
|
|
|
1036
1301
|
export const SearchVariantsQuery = graphql(`
|
|
1037
1302
|
query SearchVariants($input: SearchInput!) {
|
|
@@ -1061,92 +1326,110 @@ export const SearchVariantsQuery = graphql(`
|
|
|
1061
1326
|
}
|
|
1062
1327
|
`);
|
|
1063
1328
|
|
|
1064
|
-
export const QuoteStockCheckQuery =
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1329
|
+
export const QuoteStockCheckQuery = forCapability(
|
|
1330
|
+
'quote.requests',
|
|
1331
|
+
graphql(`
|
|
1332
|
+
query QuoteStockCheck($quoteId: ID!) {
|
|
1333
|
+
quoteStockCheck(quoteId: $quoteId) {
|
|
1334
|
+
allInStock
|
|
1335
|
+
outOfStockItems {
|
|
1336
|
+
sku
|
|
1337
|
+
productName
|
|
1338
|
+
requestedQuantity
|
|
1339
|
+
availableStock
|
|
1340
|
+
}
|
|
1073
1341
|
}
|
|
1074
1342
|
}
|
|
1075
|
-
|
|
1076
|
-
|
|
1343
|
+
`),
|
|
1344
|
+
[['quoteStockCheck']],
|
|
1345
|
+
);
|
|
1077
1346
|
|
|
1078
|
-
export const GetMyQuotesQuery =
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
status
|
|
1086
|
-
validUntil
|
|
1087
|
-
createdAt
|
|
1088
|
-
customer {
|
|
1347
|
+
export const GetMyQuotesQuery = forCapability(
|
|
1348
|
+
'quote.requests',
|
|
1349
|
+
graphql(`
|
|
1350
|
+
query GetMyQuotes($options: QuoteListOptions) {
|
|
1351
|
+
myQuotes(options: $options) {
|
|
1352
|
+
totalItems
|
|
1353
|
+
items {
|
|
1089
1354
|
id
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1355
|
+
quoteNumber
|
|
1356
|
+
status
|
|
1357
|
+
validUntil
|
|
1358
|
+
createdAt
|
|
1359
|
+
customer {
|
|
1360
|
+
id
|
|
1361
|
+
firstName
|
|
1362
|
+
lastName
|
|
1363
|
+
}
|
|
1364
|
+
currentVersion {
|
|
1365
|
+
total
|
|
1366
|
+
lineItems {
|
|
1367
|
+
sku
|
|
1368
|
+
productName
|
|
1369
|
+
quantity
|
|
1370
|
+
unitPrice
|
|
1371
|
+
}
|
|
1100
1372
|
}
|
|
1101
1373
|
}
|
|
1102
1374
|
}
|
|
1103
1375
|
}
|
|
1104
|
-
|
|
1105
|
-
|
|
1376
|
+
`),
|
|
1377
|
+
[['myQuotes']],
|
|
1378
|
+
);
|
|
1106
1379
|
|
|
1107
|
-
export const GetMyStoreCreditsQuery =
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
type
|
|
1115
|
-
initialValue
|
|
1116
|
-
balance
|
|
1117
|
-
currencyCode
|
|
1118
|
-
expiryDate
|
|
1119
|
-
issuedTo {
|
|
1380
|
+
export const GetMyStoreCreditsQuery = forCapability(
|
|
1381
|
+
'store-credit.balance',
|
|
1382
|
+
graphql(`
|
|
1383
|
+
query GetMyStoreCredits($options: StoreCreditListOptions) {
|
|
1384
|
+
myStoreCredits(options: $options) {
|
|
1385
|
+
totalItems
|
|
1386
|
+
items {
|
|
1120
1387
|
id
|
|
1121
|
-
|
|
1122
|
-
|
|
1388
|
+
code
|
|
1389
|
+
type
|
|
1390
|
+
initialValue
|
|
1391
|
+
balance
|
|
1392
|
+
currencyCode
|
|
1393
|
+
expiryDate
|
|
1394
|
+
issuedTo {
|
|
1395
|
+
id
|
|
1396
|
+
firstName
|
|
1397
|
+
lastName
|
|
1398
|
+
}
|
|
1123
1399
|
}
|
|
1124
1400
|
}
|
|
1125
1401
|
}
|
|
1126
|
-
|
|
1127
|
-
|
|
1402
|
+
`),
|
|
1403
|
+
[['myStoreCredits']],
|
|
1404
|
+
);
|
|
1128
1405
|
|
|
1129
|
-
export const GetGiftCardTemplatesQuery =
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
image {
|
|
1406
|
+
export const GetGiftCardTemplatesQuery = forCapability(
|
|
1407
|
+
'store-credit.gift-cards',
|
|
1408
|
+
graphql(`
|
|
1409
|
+
query GetGiftCardTemplates {
|
|
1410
|
+
giftCardTemplates {
|
|
1411
|
+
items {
|
|
1136
1412
|
id
|
|
1137
|
-
|
|
1138
|
-
|
|
1413
|
+
name
|
|
1414
|
+
image {
|
|
1415
|
+
id
|
|
1416
|
+
preview
|
|
1417
|
+
source
|
|
1418
|
+
}
|
|
1139
1419
|
}
|
|
1420
|
+
totalItems
|
|
1140
1421
|
}
|
|
1141
|
-
totalItems
|
|
1142
1422
|
}
|
|
1143
|
-
|
|
1144
|
-
|
|
1423
|
+
`),
|
|
1424
|
+
[['giftCardTemplates']],
|
|
1425
|
+
);
|
|
1145
1426
|
|
|
1146
1427
|
/** A gift card template. */
|
|
1147
|
-
export type GiftCardTemplate = ResultOf<
|
|
1428
|
+
export type GiftCardTemplate = ResultOf<
|
|
1429
|
+
typeof GetGiftCardTemplatesQuery
|
|
1430
|
+
>['giftCardTemplates']['items'][number];
|
|
1148
1431
|
|
|
1149
|
-
|
|
1432
|
+
const GetMyQuoteDetailDocument = graphql(`
|
|
1150
1433
|
query GetMyQuoteDetail($id: ID!) {
|
|
1151
1434
|
myQuote(id: $id) {
|
|
1152
1435
|
id
|
|
@@ -1211,6 +1494,17 @@ export const GetMyQuoteDetailQuery = graphql(`
|
|
|
1211
1494
|
}
|
|
1212
1495
|
`);
|
|
1213
1496
|
|
|
1497
|
+
export const GetMyQuoteDetailQuery = composeCapabilityDocument(GetMyQuoteDetailDocument, [
|
|
1498
|
+
{ capability: 'quote.requests', paths: [['myQuote']] },
|
|
1499
|
+
{
|
|
1500
|
+
capability: 'quote.negotiation',
|
|
1501
|
+
paths: [
|
|
1502
|
+
['myQuote', 'versions'],
|
|
1503
|
+
['myQuote', 'comments'],
|
|
1504
|
+
],
|
|
1505
|
+
},
|
|
1506
|
+
]);
|
|
1507
|
+
|
|
1214
1508
|
/** A quote detail object. */
|
|
1215
1509
|
export type QuoteDetail = NonNullable<ResultOf<typeof GetMyQuoteDetailQuery>['myQuote']>;
|
|
1216
1510
|
/** A version in a quote. */
|
|
@@ -1232,60 +1526,70 @@ export const GetQuoteOrderEligibleShippingMethodsQuery = graphql(`
|
|
|
1232
1526
|
}
|
|
1233
1527
|
`);
|
|
1234
1528
|
|
|
1235
|
-
export const GetTaxIdsQuery =
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1529
|
+
export const GetTaxIdsQuery = forCapability(
|
|
1530
|
+
'tax-id.validation',
|
|
1531
|
+
graphql(
|
|
1532
|
+
`
|
|
1533
|
+
query GetTaxIds {
|
|
1534
|
+
taxIds {
|
|
1535
|
+
...TaxIdFields
|
|
1536
|
+
}
|
|
1240
1537
|
}
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1538
|
+
`,
|
|
1539
|
+
[TaxIdFragment],
|
|
1540
|
+
),
|
|
1541
|
+
[['taxIds']],
|
|
1244
1542
|
);
|
|
1245
1543
|
|
|
1246
1544
|
// ── Configurator ─────────────────────────────────────────
|
|
1247
1545
|
|
|
1248
|
-
export const GetConfiguratorSystemQuery =
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
code
|
|
1253
|
-
name
|
|
1254
|
-
description
|
|
1255
|
-
modules {
|
|
1546
|
+
export const GetConfiguratorSystemQuery = forCapability(
|
|
1547
|
+
'configurator.forms',
|
|
1548
|
+
graphql(`
|
|
1549
|
+
query GetConfiguratorSystem($code: String!) {
|
|
1550
|
+
configuratorSystem(code: $code) {
|
|
1256
1551
|
id
|
|
1257
1552
|
code
|
|
1258
1553
|
name
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
fields {
|
|
1554
|
+
description
|
|
1555
|
+
modules {
|
|
1262
1556
|
id
|
|
1263
1557
|
code
|
|
1264
|
-
fieldType
|
|
1265
1558
|
name
|
|
1266
|
-
|
|
1267
|
-
defaultValue
|
|
1268
|
-
required
|
|
1559
|
+
optional
|
|
1269
1560
|
sortOrder
|
|
1270
|
-
|
|
1271
|
-
max
|
|
1272
|
-
options {
|
|
1561
|
+
fields {
|
|
1273
1562
|
id
|
|
1274
1563
|
code
|
|
1275
|
-
|
|
1564
|
+
fieldType
|
|
1565
|
+
name
|
|
1566
|
+
unit
|
|
1567
|
+
defaultValue
|
|
1568
|
+
required
|
|
1569
|
+
sortOrder
|
|
1570
|
+
min
|
|
1571
|
+
max
|
|
1572
|
+
options {
|
|
1573
|
+
id
|
|
1574
|
+
code
|
|
1575
|
+
label
|
|
1576
|
+
}
|
|
1577
|
+
dynamicOptionsSource
|
|
1276
1578
|
}
|
|
1277
|
-
dynamicOptionsSource
|
|
1278
1579
|
}
|
|
1279
1580
|
}
|
|
1280
1581
|
}
|
|
1281
|
-
|
|
1282
|
-
|
|
1582
|
+
`),
|
|
1583
|
+
[['configuratorSystem']],
|
|
1584
|
+
);
|
|
1283
1585
|
|
|
1284
|
-
export type ConfiguratorSystem = NonNullable<
|
|
1586
|
+
export type ConfiguratorSystem = NonNullable<
|
|
1587
|
+
ResultOf<typeof GetConfiguratorSystemQuery>['configuratorSystem']
|
|
1588
|
+
>;
|
|
1285
1589
|
export type ConfiguratorModule = ConfiguratorSystem['modules'][number];
|
|
1286
1590
|
export type ConfiguratorField = ConfiguratorModule['fields'][number];
|
|
1287
1591
|
|
|
1288
|
-
|
|
1592
|
+
const EvaluateConfigurationDocument = graphql(`
|
|
1289
1593
|
query EvaluateProductConfiguration($input: EvaluateProductConfigurationInput!) {
|
|
1290
1594
|
evaluateProductConfiguration(input: $input) {
|
|
1291
1595
|
fields {
|
|
@@ -1350,32 +1654,46 @@ export const EvaluateConfigurationQuery = graphql(`
|
|
|
1350
1654
|
}
|
|
1351
1655
|
`);
|
|
1352
1656
|
|
|
1353
|
-
|
|
1657
|
+
/**
|
|
1658
|
+
* Configurator evaluation details only exist in the schema with
|
|
1659
|
+
* `configurator.forms`.
|
|
1660
|
+
*/
|
|
1661
|
+
export const EvaluateConfigurationQuery = forCapability('configurator.forms', EvaluateConfigurationDocument, [
|
|
1662
|
+
['evaluateProductConfiguration'],
|
|
1663
|
+
]);
|
|
1664
|
+
|
|
1665
|
+
export type ConfigurationEvaluation = ResultOf<
|
|
1666
|
+
typeof EvaluateConfigurationQuery
|
|
1667
|
+
>['evaluateProductConfiguration'];
|
|
1354
1668
|
export type EvaluatedField = ConfigurationEvaluation['fields'][number];
|
|
1355
1669
|
export type EvaluatedLine = ConfigurationEvaluation['lines'][number];
|
|
1356
1670
|
export type EvaluatedExecutedRule = ConfigurationEvaluation['executedRules'][number];
|
|
1357
1671
|
|
|
1358
|
-
export const GetActiveOrderConfigurationsQuery =
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1672
|
+
export const GetActiveOrderConfigurationsQuery = forCapability(
|
|
1673
|
+
'configurator.forms',
|
|
1674
|
+
graphql(`
|
|
1675
|
+
query GetActiveOrderConfigurations {
|
|
1676
|
+
activeOrder {
|
|
1363
1677
|
id
|
|
1364
|
-
|
|
1365
|
-
system {
|
|
1366
|
-
id
|
|
1367
|
-
code
|
|
1368
|
-
}
|
|
1369
|
-
fieldValues {
|
|
1678
|
+
productConfigurations {
|
|
1370
1679
|
id
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1680
|
+
name
|
|
1681
|
+
system {
|
|
1682
|
+
id
|
|
1683
|
+
code
|
|
1684
|
+
}
|
|
1685
|
+
fieldValues {
|
|
1686
|
+
id
|
|
1687
|
+
moduleCode
|
|
1688
|
+
fieldCode
|
|
1689
|
+
value
|
|
1690
|
+
}
|
|
1374
1691
|
}
|
|
1375
1692
|
}
|
|
1376
1693
|
}
|
|
1377
|
-
|
|
1378
|
-
|
|
1694
|
+
`),
|
|
1695
|
+
[['activeOrder', 'productConfigurations']],
|
|
1696
|
+
);
|
|
1379
1697
|
|
|
1380
1698
|
export type ActiveOrderConfiguration = NonNullable<
|
|
1381
1699
|
NonNullable<ResultOf<typeof GetActiveOrderConfigurationsQuery>['activeOrder']>['productConfigurations']
|
|
@@ -1383,59 +1701,67 @@ export type ActiveOrderConfiguration = NonNullable<
|
|
|
1383
1701
|
|
|
1384
1702
|
// ── Quick Order ──
|
|
1385
1703
|
|
|
1386
|
-
export const QuickOrderSearchQuery =
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1704
|
+
export const QuickOrderSearchQuery = forCapability(
|
|
1705
|
+
'quick-order',
|
|
1706
|
+
graphql(`
|
|
1707
|
+
query QuickOrderSearch($term: String!, $take: Int) {
|
|
1708
|
+
quickOrderSearch(term: $term, take: $take) {
|
|
1709
|
+
variantId
|
|
1710
|
+
sku
|
|
1711
|
+
productName
|
|
1712
|
+
variantName
|
|
1713
|
+
price
|
|
1714
|
+
priceWithTax
|
|
1715
|
+
currencyCode
|
|
1716
|
+
inStock
|
|
1717
|
+
}
|
|
1397
1718
|
}
|
|
1398
|
-
|
|
1399
|
-
|
|
1719
|
+
`),
|
|
1720
|
+
[['quickOrderSearch']],
|
|
1721
|
+
);
|
|
1400
1722
|
|
|
1401
|
-
export const PreviewReorderQuery =
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
product {
|
|
1723
|
+
export const PreviewReorderQuery = forCapability(
|
|
1724
|
+
'reorder',
|
|
1725
|
+
graphql(`
|
|
1726
|
+
query PreviewReorder($input: ReorderPreviewInput!) {
|
|
1727
|
+
previewReorder(input: $input) {
|
|
1728
|
+
lines {
|
|
1729
|
+
sourceLineId
|
|
1730
|
+
productVariant {
|
|
1731
|
+
id
|
|
1411
1732
|
name
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1733
|
+
sku
|
|
1734
|
+
product {
|
|
1735
|
+
name
|
|
1736
|
+
slug
|
|
1737
|
+
featuredAsset {
|
|
1738
|
+
id
|
|
1739
|
+
preview
|
|
1740
|
+
}
|
|
1416
1741
|
}
|
|
1417
1742
|
}
|
|
1743
|
+
quantity
|
|
1744
|
+
status
|
|
1745
|
+
originalUnitPrice
|
|
1746
|
+
originalUnitPriceWithTax
|
|
1747
|
+
currentCatalogUnitPrice
|
|
1748
|
+
currentCatalogUnitPriceWithTax
|
|
1749
|
+
messages {
|
|
1750
|
+
type
|
|
1751
|
+
message
|
|
1752
|
+
}
|
|
1418
1753
|
}
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
currentCatalogUnitPriceWithTax
|
|
1425
|
-
messages {
|
|
1426
|
-
type
|
|
1427
|
-
message
|
|
1754
|
+
summary {
|
|
1755
|
+
availableCount
|
|
1756
|
+
unavailableCount
|
|
1757
|
+
indicativeTotal
|
|
1758
|
+
currencyCode
|
|
1428
1759
|
}
|
|
1429
1760
|
}
|
|
1430
|
-
summary {
|
|
1431
|
-
availableCount
|
|
1432
|
-
unavailableCount
|
|
1433
|
-
indicativeTotal
|
|
1434
|
-
currencyCode
|
|
1435
|
-
}
|
|
1436
1761
|
}
|
|
1437
|
-
|
|
1438
|
-
|
|
1762
|
+
`),
|
|
1763
|
+
[['previewReorder']],
|
|
1764
|
+
);
|
|
1439
1765
|
|
|
1440
1766
|
// ---------------------------------------------------------------------------
|
|
1441
1767
|
// Shared Carts (EE-13)
|
|
@@ -1445,136 +1771,163 @@ export const PreviewReorderQuery = graphql(`
|
|
|
1445
1771
|
// fragments) to match the masking-on convention of the other list queries.
|
|
1446
1772
|
// ---------------------------------------------------------------------------
|
|
1447
1773
|
|
|
1448
|
-
export const GetMySharedCartsQuery =
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
status
|
|
1456
|
-
updatedAt
|
|
1457
|
-
owner {
|
|
1774
|
+
export const GetMySharedCartsQuery = forCapability(
|
|
1775
|
+
'shared-carts.collaboration',
|
|
1776
|
+
graphql(`
|
|
1777
|
+
query GetMySharedCarts($options: SharedCartListOptions) {
|
|
1778
|
+
mySharedCarts(options: $options) {
|
|
1779
|
+
totalItems
|
|
1780
|
+
items {
|
|
1458
1781
|
id
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
role
|
|
1464
|
-
customer {
|
|
1782
|
+
name
|
|
1783
|
+
status
|
|
1784
|
+
updatedAt
|
|
1785
|
+
owner {
|
|
1465
1786
|
id
|
|
1787
|
+
firstName
|
|
1788
|
+
lastName
|
|
1789
|
+
}
|
|
1790
|
+
members {
|
|
1791
|
+
role
|
|
1792
|
+
customer {
|
|
1793
|
+
id
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
order {
|
|
1797
|
+
id
|
|
1798
|
+
currencyCode
|
|
1799
|
+
totalWithTax
|
|
1800
|
+
totalQuantity
|
|
1466
1801
|
}
|
|
1467
|
-
}
|
|
1468
|
-
order {
|
|
1469
|
-
id
|
|
1470
|
-
currencyCode
|
|
1471
|
-
totalWithTax
|
|
1472
|
-
totalQuantity
|
|
1473
1802
|
}
|
|
1474
1803
|
}
|
|
1475
1804
|
}
|
|
1476
|
-
|
|
1477
|
-
|
|
1805
|
+
`),
|
|
1806
|
+
[['mySharedCarts']],
|
|
1807
|
+
);
|
|
1478
1808
|
|
|
1479
1809
|
// Company-wide list for company admins (ManageSharedCarts): every cart in the company, including
|
|
1480
1810
|
// ones the admin isn't a member of. Same shape as GetMySharedCarts so the list page can render
|
|
1481
1811
|
// either result interchangeably.
|
|
1482
|
-
export const GetCompanySharedCartsQuery =
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1812
|
+
export const GetCompanySharedCartsQuery = forCapability(
|
|
1813
|
+
'shared-carts.collaboration',
|
|
1814
|
+
graphql(`
|
|
1815
|
+
query GetCompanySharedCarts($options: SharedCartListOptions) {
|
|
1816
|
+
companySharedCarts(options: $options) {
|
|
1817
|
+
totalItems
|
|
1818
|
+
items {
|
|
1819
|
+
id
|
|
1820
|
+
name
|
|
1821
|
+
status
|
|
1822
|
+
updatedAt
|
|
1823
|
+
owner {
|
|
1824
|
+
id
|
|
1825
|
+
firstName
|
|
1826
|
+
lastName
|
|
1827
|
+
}
|
|
1828
|
+
members {
|
|
1829
|
+
role
|
|
1830
|
+
customer {
|
|
1831
|
+
id
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
order {
|
|
1835
|
+
id
|
|
1836
|
+
currencyCode
|
|
1837
|
+
totalWithTax
|
|
1838
|
+
totalQuantity
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1843
|
+
`),
|
|
1844
|
+
[['companySharedCarts']],
|
|
1845
|
+
);
|
|
1846
|
+
|
|
1847
|
+
export const GetSharedCartQuery = forCapability(
|
|
1848
|
+
'shared-carts.collaboration',
|
|
1849
|
+
graphql(`
|
|
1850
|
+
query GetSharedCart($id: ID!) {
|
|
1851
|
+
sharedCart(id: $id) {
|
|
1487
1852
|
id
|
|
1488
1853
|
name
|
|
1854
|
+
description
|
|
1489
1855
|
status
|
|
1856
|
+
createdAt
|
|
1490
1857
|
updatedAt
|
|
1858
|
+
companyId
|
|
1491
1859
|
owner {
|
|
1492
1860
|
id
|
|
1493
1861
|
firstName
|
|
1494
1862
|
lastName
|
|
1863
|
+
emailAddress
|
|
1495
1864
|
}
|
|
1496
1865
|
members {
|
|
1497
1866
|
role
|
|
1498
1867
|
customer {
|
|
1499
1868
|
id
|
|
1869
|
+
firstName
|
|
1870
|
+
lastName
|
|
1871
|
+
emailAddress
|
|
1500
1872
|
}
|
|
1501
1873
|
}
|
|
1502
1874
|
order {
|
|
1503
1875
|
id
|
|
1876
|
+
code
|
|
1504
1877
|
currencyCode
|
|
1878
|
+
subTotalWithTax
|
|
1505
1879
|
totalWithTax
|
|
1506
1880
|
totalQuantity
|
|
1881
|
+
customer {
|
|
1882
|
+
id
|
|
1883
|
+
firstName
|
|
1884
|
+
lastName
|
|
1885
|
+
}
|
|
1886
|
+
lines {
|
|
1887
|
+
id
|
|
1888
|
+
quantity
|
|
1889
|
+
unitPriceWithTax
|
|
1890
|
+
linePriceWithTax
|
|
1891
|
+
productVariant {
|
|
1892
|
+
id
|
|
1893
|
+
name
|
|
1894
|
+
sku
|
|
1895
|
+
}
|
|
1896
|
+
featuredAsset {
|
|
1897
|
+
preview
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1507
1900
|
}
|
|
1508
|
-
|
|
1509
|
-
}
|
|
1510
|
-
}
|
|
1511
|
-
`);
|
|
1512
|
-
|
|
1513
|
-
export const GetSharedCartQuery = graphql(`
|
|
1514
|
-
query GetSharedCart($id: ID!) {
|
|
1515
|
-
sharedCart(id: $id) {
|
|
1516
|
-
id
|
|
1517
|
-
name
|
|
1518
|
-
description
|
|
1519
|
-
status
|
|
1520
|
-
createdAt
|
|
1521
|
-
updatedAt
|
|
1522
|
-
companyId
|
|
1523
|
-
owner {
|
|
1524
|
-
id
|
|
1525
|
-
firstName
|
|
1526
|
-
lastName
|
|
1527
|
-
emailAddress
|
|
1528
|
-
}
|
|
1529
|
-
members {
|
|
1530
|
-
role
|
|
1531
|
-
customer {
|
|
1532
|
-
id
|
|
1533
|
-
firstName
|
|
1534
|
-
lastName
|
|
1535
|
-
emailAddress
|
|
1536
|
-
}
|
|
1537
|
-
}
|
|
1538
|
-
order {
|
|
1539
|
-
id
|
|
1540
|
-
code
|
|
1541
|
-
currencyCode
|
|
1542
|
-
subTotalWithTax
|
|
1543
|
-
totalWithTax
|
|
1544
|
-
totalQuantity
|
|
1545
|
-
customer {
|
|
1546
|
-
id
|
|
1547
|
-
firstName
|
|
1548
|
-
lastName
|
|
1549
|
-
}
|
|
1550
|
-
lines {
|
|
1901
|
+
activity {
|
|
1551
1902
|
id
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1903
|
+
createdAt
|
|
1904
|
+
action
|
|
1905
|
+
targetLineId
|
|
1906
|
+
detail
|
|
1907
|
+
actorLabel
|
|
1908
|
+
targetCustomer {
|
|
1556
1909
|
id
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
}
|
|
1560
|
-
featuredAsset {
|
|
1561
|
-
preview
|
|
1910
|
+
firstName
|
|
1911
|
+
lastName
|
|
1562
1912
|
}
|
|
1563
1913
|
}
|
|
1564
1914
|
}
|
|
1565
|
-
|
|
1915
|
+
}
|
|
1916
|
+
`),
|
|
1917
|
+
[['sharedCart']],
|
|
1918
|
+
);
|
|
1919
|
+
|
|
1920
|
+
export const GetActivePunchoutSessionQuery = forCapability(
|
|
1921
|
+
'punchout',
|
|
1922
|
+
graphql(`
|
|
1923
|
+
query GetActivePunchoutSession {
|
|
1924
|
+
activePunchoutSession {
|
|
1566
1925
|
id
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
detail
|
|
1571
|
-
actorLabel
|
|
1572
|
-
targetCustomer {
|
|
1573
|
-
id
|
|
1574
|
-
firstName
|
|
1575
|
-
lastName
|
|
1576
|
-
}
|
|
1926
|
+
buyerCookie
|
|
1927
|
+
tradingPartnerName
|
|
1928
|
+
expiresAt
|
|
1577
1929
|
}
|
|
1578
1930
|
}
|
|
1579
|
-
|
|
1580
|
-
|
|
1931
|
+
`),
|
|
1932
|
+
[['activePunchoutSession']],
|
|
1933
|
+
);
|