@sixtyninecommerce/client 0.21.1 → 0.22.1

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.
Files changed (112) hide show
  1. package/README.md +28 -1
  2. package/dist/client.d.ts.map +1 -1
  3. package/dist/client.js +7 -1
  4. package/dist/client.js.map +1 -1
  5. package/dist/commerce/cart.d.ts.map +1 -1
  6. package/dist/commerce/cart.js +13 -5
  7. package/dist/commerce/cart.js.map +1 -1
  8. package/dist/commerce/checkout.d.ts +3 -2
  9. package/dist/commerce/checkout.d.ts.map +1 -1
  10. package/dist/commerce/checkout.js +11 -7
  11. package/dist/commerce/checkout.js.map +1 -1
  12. package/dist/commerce/index.d.ts +158 -2
  13. package/dist/commerce/index.d.ts.map +1 -1
  14. package/dist/commerce/index.js +1 -1
  15. package/dist/commerce/index.js.map +1 -1
  16. package/dist/commerce/placement-error.d.ts +6 -0
  17. package/dist/commerce/placement-error.d.ts.map +1 -0
  18. package/dist/commerce/placement-error.js +84 -0
  19. package/dist/commerce/placement-error.js.map +1 -0
  20. package/dist/commerce/queries.d.ts +16 -11
  21. package/dist/commerce/queries.d.ts.map +1 -1
  22. package/dist/commerce/queries.js +83 -19
  23. package/dist/commerce/queries.js.map +1 -1
  24. package/dist/commerce/quotes.d.ts.map +1 -1
  25. package/dist/commerce/quotes.js +27 -12
  26. package/dist/commerce/quotes.js.map +1 -1
  27. package/dist/constants.d.ts +1 -0
  28. package/dist/constants.d.ts.map +1 -1
  29. package/dist/constants.js +1 -0
  30. package/dist/constants.js.map +1 -1
  31. package/dist/content/asset-urls.d.ts +7 -0
  32. package/dist/content/asset-urls.d.ts.map +1 -0
  33. package/dist/content/asset-urls.js +96 -0
  34. package/dist/content/asset-urls.js.map +1 -0
  35. package/dist/content/collection-pages.d.ts +2 -2
  36. package/dist/content/collection-pages.d.ts.map +1 -1
  37. package/dist/content/collection-pages.js +8 -2
  38. package/dist/content/collection-pages.js.map +1 -1
  39. package/dist/content/collections.d.ts +2 -2
  40. package/dist/content/collections.d.ts.map +1 -1
  41. package/dist/content/collections.js +10 -3
  42. package/dist/content/collections.js.map +1 -1
  43. package/dist/content/index.d.ts +26 -2
  44. package/dist/content/index.d.ts.map +1 -1
  45. package/dist/content/index.js +4 -4
  46. package/dist/content/index.js.map +1 -1
  47. package/dist/content/items.d.ts +2 -2
  48. package/dist/content/items.d.ts.map +1 -1
  49. package/dist/content/items.js +18 -4
  50. package/dist/content/items.js.map +1 -1
  51. package/dist/content/resolve.d.ts +2 -2
  52. package/dist/content/resolve.d.ts.map +1 -1
  53. package/dist/content/resolve.js +8 -2
  54. package/dist/content/resolve.js.map +1 -1
  55. package/dist/core/context.d.ts.map +1 -1
  56. package/dist/core/context.js +1 -0
  57. package/dist/core/context.js.map +1 -1
  58. package/dist/core/headers.d.ts.map +1 -1
  59. package/dist/core/headers.js +4 -0
  60. package/dist/core/headers.js.map +1 -1
  61. package/dist/core/http.d.ts.map +1 -1
  62. package/dist/core/http.js +4 -1
  63. package/dist/core/http.js.map +1 -1
  64. package/dist/credit/index.d.ts +4 -2
  65. package/dist/credit/index.d.ts.map +1 -1
  66. package/dist/credit/index.js.map +1 -1
  67. package/dist/errors.d.ts +10 -1
  68. package/dist/errors.d.ts.map +1 -1
  69. package/dist/errors.js +7 -1
  70. package/dist/errors.js.map +1 -1
  71. package/dist/events/envelope.d.ts +24 -0
  72. package/dist/events/envelope.d.ts.map +1 -0
  73. package/dist/events/envelope.js +2 -0
  74. package/dist/events/envelope.js.map +1 -0
  75. package/dist/events/index.d.ts +3 -0
  76. package/dist/events/index.d.ts.map +1 -0
  77. package/dist/events/index.js +2 -0
  78. package/dist/events/index.js.map +1 -0
  79. package/dist/index.d.ts +4 -2
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +3 -1
  82. package/dist/index.js.map +1 -1
  83. package/dist/order-scope.d.ts +3 -0
  84. package/dist/order-scope.d.ts.map +1 -0
  85. package/dist/order-scope.js +6 -0
  86. package/dist/order-scope.js.map +1 -0
  87. package/dist/pricing/index.d.ts +3 -1
  88. package/dist/pricing/index.d.ts.map +1 -1
  89. package/dist/pricing/index.js +35 -2
  90. package/dist/pricing/index.js.map +1 -1
  91. package/dist/pricing/tax-display.d.ts +9 -0
  92. package/dist/pricing/tax-display.d.ts.map +1 -0
  93. package/dist/pricing/tax-display.js +81 -0
  94. package/dist/pricing/tax-display.js.map +1 -0
  95. package/dist/seo/alternates.d.ts.map +1 -1
  96. package/dist/seo/alternates.js +3 -1
  97. package/dist/seo/alternates.js.map +1 -1
  98. package/dist/seo/locale-tag.d.ts +4 -0
  99. package/dist/seo/locale-tag.d.ts.map +1 -0
  100. package/dist/seo/locale-tag.js +10 -0
  101. package/dist/seo/locale-tag.js.map +1 -0
  102. package/dist/seo/meta-tags.d.ts.map +1 -1
  103. package/dist/seo/meta-tags.js +15 -12
  104. package/dist/seo/meta-tags.js.map +1 -1
  105. package/dist/seo/types.d.ts +1 -0
  106. package/dist/seo/types.d.ts.map +1 -1
  107. package/dist/seo/url-builder.d.ts.map +1 -1
  108. package/dist/seo/url-builder.js +6 -4
  109. package/dist/seo/url-builder.js.map +1 -1
  110. package/dist/types.d.ts +76 -1
  111. package/dist/types.d.ts.map +1 -1
  112. package/package.json +5 -1
@@ -6,13 +6,13 @@ export declare const LIST_COLLECTIONS = "\n query ListCollections($options: Col
6
6
  export declare const GET_COLLECTION = "\n query GetCollection($slug: String!) {\n collection(slug: $slug) {\n id name slug description position\n featuredAsset {\n source width height\n presets { l { url webpUrl } xl { url webpUrl } }\n }\n breadcrumbs { id name slug }\n parent { id }\n children { id name slug }\n customFields {\n isRoutable\n isCanonical\n noindex\n nofollow\n metaRobotsMaxImagePreview\n socialImageId\n socialOgType\n twitterCardType\n }\n translations {\n languageCode\n name\n slug\n customFields {\n seoTitle\n seoDescription\n canonicalUrl\n socialTitle\n socialDescription\n socialImageAlt\n }\n }\n productVariants(options: { take: 20 }) {\n items {\n id\n product {\n id name slug\n featuredAsset { source width height presets { m { url webpUrl } } }\n }\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n totalItems\n }\n }\n }\n";
7
7
  export declare const SEARCH_PRODUCTS = "\n query SearchProducts($input: SearchInput!) {\n search(input: $input) {\n items {\n productId productVariantId productName slug description\n price { ... on SinglePrice { value } ... on PriceRange { min max } }\n priceWithTax { ... on SinglePrice { value } ... on PriceRange { min max } }\n currencyCode\n productAsset { preview focalPoint { x y } }\n collectionIds\n inStock\n }\n totalItems\n facetValues { facetValue { id name code facet { id name code } } count }\n }\n }\n";
8
8
  export declare const ACTIVE_ORDER = "\n query ActiveOrder {\n activeOrder { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n }\n";
9
- export declare const ADD_TO_CART = "\n mutation AddToCart($variantId: ID!, $quantity: Int!) {\n addItemToOrder(productVariantId: $variantId, quantity: $quantity) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { errorCode message quantityAvailable order { id } }\n }\n }\n";
10
- export declare const ADJUST_ORDER_LINE = "\n mutation AdjustOrderLine($lineId: ID!, $quantity: Int!) {\n adjustOrderLine(orderLineId: $lineId, quantity: $quantity) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { errorCode message quantityAvailable }\n }\n }\n";
9
+ export declare const ADD_TO_CART = "\n mutation AddToCart($variantId: ID!, $quantity: Int!) {\n addItemToOrder(productVariantId: $variantId, quantity: $quantity) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { \n errorCode message quantityAvailable\n productVariantId orderLineId sku productName productVariantName\n quantityRequested inputIndex\n order { id } }\n }\n }\n";
10
+ export declare const ADJUST_ORDER_LINE = "\n mutation AdjustOrderLine($lineId: ID!, $quantity: Int!) {\n adjustOrderLine(orderLineId: $lineId, quantity: $quantity) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { \n errorCode message quantityAvailable\n productVariantId orderLineId sku productName productVariantName\n quantityRequested inputIndex\n }\n }\n }\n";
11
11
  export declare const REMOVE_ORDER_LINE = "\n mutation RemoveOrderLine($lineId: ID!) {\n removeOrderLine(orderLineId: $lineId) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n }\n }\n";
12
12
  export declare const APPLY_COUPON = "\n mutation ApplyCoupon($code: String!) {\n applyCouponCode(couponCode: $code) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on CouponCodeExpiredError { errorCode message couponCode }\n ... on CouponCodeInvalidError { errorCode message couponCode }\n ... on CouponCodeLimitError { errorCode message couponCode limit }\n }\n }\n";
13
13
  export declare const REMOVE_COUPON = "\n mutation RemoveCoupon($code: String!) {\n removeCouponCode(couponCode: $code) { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n }\n";
14
14
  export declare const REMOVE_ALL_ORDER_LINES = "\n mutation RemoveAllOrderLines {\n removeAllOrderLines {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n }\n }\n";
15
- export declare const ADD_ITEMS_TO_CART = "\n mutation AddItemsToCart($inputs: [AddItemInput!]!) {\n addItemsToOrder(inputs: $inputs) {\n order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n errorResults {\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { errorCode message quantityAvailable }\n ... on OrderInterceptorError { errorCode message interceptorError }\n }\n }\n }\n";
15
+ export declare const ADD_ITEMS_TO_CART = "\n mutation AddItemsToCart($inputs: [AddItemInput!]!) {\n addItemsToOrder(inputs: $inputs) {\n order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n errorResults {\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { \n errorCode message quantityAvailable\n productVariantId orderLineId sku productName productVariantName\n quantityRequested inputIndex\n }\n ... on OrderInterceptorError { errorCode message interceptorError }\n }\n }\n }\n";
16
16
  export declare const SET_CUSTOMER = "\n mutation SetCustomer($input: CreateCustomerInput!) {\n setCustomerForOrder(input: $input) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on AlreadyLoggedInError { errorCode message }\n ... on EmailAddressConflictError { errorCode message }\n ... on GuestCheckoutError { errorCode message }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
17
17
  export declare const SET_SHIPPING_ADDRESS = "\n mutation SetShippingAddress($input: CreateAddressInput!) {\n setOrderShippingAddress(input: $input) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
18
18
  export declare const SET_BILLING_ADDRESS = "\n mutation SetBillingAddress($input: CreateAddressInput!) {\n setOrderBillingAddress(input: $input) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
@@ -21,8 +21,9 @@ export declare const MY_DELIVERY_TERMS = "\n query MyDeliveryTerms {\n myDel
21
21
  export declare const SET_SHIPPING_METHOD = "\n mutation SetShippingMethod($ids: [ID!]!) {\n selectOrderDeliveryMethod(shippingMethodIds: $ids) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on IneligibleShippingMethodError { errorCode message }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
22
22
  export declare const APPLY_PREFERRED_SHIPPING_METHOD = "\n mutation ApplyPreferredShippingMethod {\n applyPreferredDeliveryMethod {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on IneligibleShippingMethodError { errorCode message }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
23
23
  export declare const ELIGIBLE_PAYMENT_METHODS = "\n query PaymentMethods {\n eligiblePaymentMethods {\n id name code description isEligible eligibilityMessage\n }\n }\n";
24
- export declare const TRANSITION_TO_ARRANGING_PAYMENT = "\n mutation TransitionToArrangingPayment {\n transitionOrderToState(state: \"ArrangingPayment\") {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderStateTransitionError { errorCode message transitionError }\n }\n }\n";
25
- export declare const ADD_PAYMENT = "\n mutation AddPayment($input: PaymentInput!) {\n addPaymentToOrder(input: $input) {\n ... on Order {\n \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n\n \n paymentTerms {\n source managedExternally status\n conditionCode conditionDescription summary classification\n paymentDays paymentEndOfMonths paymentMethod percentage\n discountPaymentDays discountPercentage paymentDiscountType\n stale syncedAt error\n resolvedAt remoteConditionCode remoteConfirmedAt remoteMismatch\n }\n\n \n deliveryTerms {\n source managedExternally status shippingMethodStatus policyStatus summary selectionSource\n selectedShippingMethodId selectedShippingMethodCode selectedShippingMethodName\n platformShippingMethodCode platformShippingMethodName platformShippingMethodDescription\n platformShippingPrice platformShippingPriceWithTax\n preferredShippingMethodId\n incotermStatus incotermCode incotermVersion incotermAddress incotermDescription\n shippingLeadDays deliveryAdvice stale syncedAt warning resolvedAt\n remoteShippingMethodCode remoteShippingMethodName\n remoteIncotermCode remoteIncotermVersion remoteIncotermAddress remoteDeliveryDate\n remoteConfirmedAt remoteMismatch\n }\n\n }\n ... on OrderPaymentStateError { errorCode message }\n ... on IneligiblePaymentMethodError { errorCode message }\n ... on PaymentFailedError { errorCode message paymentErrorMessage }\n ... on PaymentDeclinedError { errorCode message paymentErrorMessage }\n ... on OrderStateTransitionError { errorCode message transitionError }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
24
+ export declare const TRANSITION_TO_ARRANGING_PAYMENT = "\n mutation TransitionToArrangingPayment {\n transitionOrderToState(state: \"ArrangingPayment\") {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderStateTransitionError {\n errorCode message transitionError\n placement { \n code\n customerMessage\n linesTruncated\n requiredAmount\n currencyCode\n amountBasis\n requiredQuantity\n priceListName\n salesUnit\n minimumAge\n lines {\n orderLineId\n productVariantId\n sku\n productName\n productVariantName\n quantityRequested\n quantityAvailable\n }\n details { field code message }\n }\n }\n }\n }\n";
25
+ export declare const SET_PAYMENT_INTENT = "\n mutation SetOrderPaymentIntent($intent: OrderPaymentIntent!) {\n setOrderPaymentIntent(intent: $intent) {\n ... on Order {\n \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n\n customFields { paymentIntent }\n }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
26
+ export declare const ADD_PAYMENT = "\n mutation AddPayment($input: PaymentInput!) {\n addPaymentToOrder(input: $input) {\n ... on Order {\n \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n\n \n paymentTerms {\n source managedExternally status\n conditionCode conditionDescription summary classification\n paymentDays paymentEndOfMonths paymentMethod percentage\n discountPaymentDays discountPercentage paymentDiscountType\n stale syncedAt error\n resolvedAt remoteConditionCode remoteConfirmedAt remoteMismatch\n }\n\n \n deliveryTerms {\n source managedExternally status shippingMethodStatus policyStatus summary selectionSource\n selectedShippingMethodId selectedShippingMethodCode selectedShippingMethodName\n platformShippingMethodCode platformShippingMethodName platformShippingMethodDescription\n platformShippingPrice platformShippingPriceWithTax\n preferredShippingMethodId\n incotermStatus incotermCode incotermVersion incotermAddress incotermDescription\n shippingLeadDays deliveryAdvice stale syncedAt warning resolvedAt\n remoteShippingMethodCode remoteShippingMethodName\n remoteIncotermCode remoteIncotermVersion remoteIncotermAddress remoteDeliveryDate\n remoteConfirmedAt remoteMismatch\n }\n\n }\n ... on OrderPaymentStateError { errorCode message }\n ... on IneligiblePaymentMethodError { errorCode message }\n ... on PaymentFailedError {\n errorCode message paymentErrorMessage\n placement { \n code\n customerMessage\n linesTruncated\n requiredAmount\n currencyCode\n amountBasis\n requiredQuantity\n priceListName\n salesUnit\n minimumAge\n lines {\n orderLineId\n productVariantId\n sku\n productName\n productVariantName\n quantityRequested\n quantityAvailable\n }\n details { field code message }\n }\n }\n ... on PaymentDeclinedError {\n errorCode message paymentErrorMessage\n placement { \n code\n customerMessage\n linesTruncated\n requiredAmount\n currencyCode\n amountBasis\n requiredQuantity\n priceListName\n salesUnit\n minimumAge\n lines {\n orderLineId\n productVariantId\n sku\n productName\n productVariantName\n quantityRequested\n quantityAvailable\n }\n details { field code message }\n }\n }\n ... on OrderStateTransitionError {\n errorCode message transitionError\n placement { \n code\n customerMessage\n linesTruncated\n requiredAmount\n currencyCode\n amountBasis\n requiredQuantity\n priceListName\n salesUnit\n minimumAge\n lines {\n orderLineId\n productVariantId\n sku\n productName\n productVariantName\n quantityRequested\n quantityAvailable\n }\n details { field code message }\n }\n }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
26
27
  export declare const PICKUP_LOCATIONS = "\n query PickupLocations($input: PickupLocationSearchInput!) {\n pickupLocations(input: $input) {\n \n provider\n carrier\n locationCode\n name\n address {\n streetLine1\n number\n postalCode\n city\n countryCode\n region\n }\n openingHours {\n weekday\n open\n close\n }\n details\n\n }\n }\n";
27
28
  export declare const ACTIVE_ORDER_PICKUP_LOCATION = "\n query ActiveOrderPickupLocation {\n activeOrderPickupLocation {\n \n provider\n carrier\n locationCode\n name\n address {\n streetLine1\n number\n postalCode\n city\n countryCode\n region\n }\n openingHours {\n weekday\n open\n close\n }\n details\n\n }\n }\n";
28
29
  export declare const SET_ACTIVE_ORDER_PICKUP_LOCATION = "\n mutation SetActiveOrderPickupLocation($location: StoredPickupLocationInput!) {\n setActiveOrderPickupLocation(location: $location) {\n __typename\n ... on Order {\n id code state\n }\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n";
@@ -33,7 +34,7 @@ export declare const CREATE_MOLLIE_PAYMENT_INTENT = "\n mutation CreateMolliePa
33
34
  export declare const SYNC_MOLLIE_PAYMENT_STATUS = "\n mutation SyncMolliePaymentStatus($orderCode: String!) {\n syncMolliePaymentStatus(orderCode: $orderCode) {\n id\n code\n state\n }\n }\n";
34
35
  export declare const LOGIN = "\n mutation Login($email: String!, $password: String!) {\n login(username: $email, password: $password) {\n ... on CurrentUser { id identifier }\n ... on InvalidCredentialsError { errorCode message authenticationError }\n ... on NotVerifiedError { errorCode message }\n ... on NativeAuthStrategyError { errorCode message }\n }\n }\n";
35
36
  export declare const REGISTER = "\n mutation Register($input: RegisterCustomerInput!) {\n registerCustomerAccount(input: $input) {\n ... on Success { success }\n ... on MissingPasswordError { errorCode message }\n ... on PasswordValidationError { errorCode message validationErrorMessage }\n ... on NativeAuthStrategyError { errorCode message }\n }\n }\n";
36
- export declare const GET_CURRENT_CUSTOMER = "\n query Me {\n activeCustomer {\n id firstName lastName emailAddress phoneNumber\n groups { id name }\n addresses {\n id fullName streetLine1 streetLine2 city province postalCode\n country { code name }\n defaultShippingAddress defaultBillingAddress\n }\n orders(options: { take: 10, sort: { createdAt: DESC } }) {\n items {\n \n id code state total totalWithTax currencyCode createdAt\n lines {\n id quantity linePriceWithTax\n productVariant {\n id name sku\n product { slug featuredAsset { preview presets { xs { webpUrl } } } }\n }\n }\n \n fulfillments {\n id state method trackingCode createdAt updatedAt\n lines { orderLineId quantity }\n }\n externalShipments {\n carrier reference isLink shippedAt deliveryNumber\n }\n\n \n paymentTerms {\n source managedExternally status\n conditionCode conditionDescription summary classification\n paymentDays paymentEndOfMonths paymentMethod percentage\n discountPaymentDays discountPercentage paymentDiscountType\n stale syncedAt error\n resolvedAt remoteConditionCode remoteConfirmedAt remoteMismatch\n }\n\n \n deliveryTerms {\n source managedExternally status shippingMethodStatus policyStatus summary selectionSource\n selectedShippingMethodId selectedShippingMethodCode selectedShippingMethodName\n platformShippingMethodCode platformShippingMethodName platformShippingMethodDescription\n platformShippingPrice platformShippingPriceWithTax\n preferredShippingMethodId\n incotermStatus incotermCode incotermVersion incotermAddress incotermDescription\n shippingLeadDays deliveryAdvice stale syncedAt warning resolvedAt\n remoteShippingMethodCode remoteShippingMethodName\n remoteIncotermCode remoteIncotermVersion remoteIncotermAddress remoteDeliveryDate\n remoteConfirmedAt remoteMismatch\n }\n\n\n }\n totalItems\n }\n }\n }\n";
37
+ export declare const GET_CURRENT_CUSTOMER = "\n query Me {\n activeCustomer {\n id firstName lastName emailAddress phoneNumber\n groups { id name }\n isB2B\n addresses {\n id fullName streetLine1 streetLine2 city province postalCode\n country { code name }\n defaultShippingAddress defaultBillingAddress\n }\n orders(options: { take: 10, sort: { createdAt: DESC } }) {\n items {\n \n id code state total totalWithTax currencyCode createdAt\n lines {\n id quantity linePriceWithTax\n productVariant {\n id name sku\n product { slug featuredAsset { preview presets { xs { webpUrl } } } }\n }\n }\n \n fulfillments {\n id state method trackingCode createdAt updatedAt\n lines { orderLineId quantity }\n }\n externalShipments {\n carrier reference isLink shippedAt deliveryNumber\n }\n\n \n paymentTerms {\n source managedExternally status\n conditionCode conditionDescription summary classification\n paymentDays paymentEndOfMonths paymentMethod percentage\n discountPaymentDays discountPercentage paymentDiscountType\n stale syncedAt error\n resolvedAt remoteConditionCode remoteConfirmedAt remoteMismatch\n }\n\n \n deliveryTerms {\n source managedExternally status shippingMethodStatus policyStatus summary selectionSource\n selectedShippingMethodId selectedShippingMethodCode selectedShippingMethodName\n platformShippingMethodCode platformShippingMethodName platformShippingMethodDescription\n platformShippingPrice platformShippingPriceWithTax\n preferredShippingMethodId\n incotermStatus incotermCode incotermVersion incotermAddress incotermDescription\n shippingLeadDays deliveryAdvice stale syncedAt warning resolvedAt\n remoteShippingMethodCode remoteShippingMethodName\n remoteIncotermCode remoteIncotermVersion remoteIncotermAddress remoteDeliveryDate\n remoteConfirmedAt remoteMismatch\n }\n\n\n }\n totalItems\n }\n }\n }\n";
37
38
  export declare const ACTIVE_CUSTOMER_PRICE_LISTS = "\n query ActiveCustomerPriceLists {\n activeCustomerPriceLists { id name isContract }\n }\n";
38
39
  export declare const GET_CUSTOMER_ORDERS = "\n query CustomerOrders($options: OrderListOptions) {\n activeCustomer {\n orders(options: $options) {\n items {\n \n id code state total totalWithTax currencyCode createdAt\n lines {\n id quantity linePriceWithTax\n productVariant {\n id name sku\n product { slug featuredAsset { preview presets { xs { webpUrl } } } }\n }\n }\n \n fulfillments {\n id state method trackingCode createdAt updatedAt\n lines { orderLineId quantity }\n }\n externalShipments {\n carrier reference isLink shippedAt deliveryNumber\n }\n\n \n paymentTerms {\n source managedExternally status\n conditionCode conditionDescription summary classification\n paymentDays paymentEndOfMonths paymentMethod percentage\n discountPaymentDays discountPercentage paymentDiscountType\n stale syncedAt error\n resolvedAt remoteConditionCode remoteConfirmedAt remoteMismatch\n }\n\n \n deliveryTerms {\n source managedExternally status shippingMethodStatus policyStatus summary selectionSource\n selectedShippingMethodId selectedShippingMethodCode selectedShippingMethodName\n platformShippingMethodCode platformShippingMethodName platformShippingMethodDescription\n platformShippingPrice platformShippingPriceWithTax\n preferredShippingMethodId\n incotermStatus incotermCode incotermVersion incotermAddress incotermDescription\n shippingLeadDays deliveryAdvice stale syncedAt warning resolvedAt\n remoteShippingMethodCode remoteShippingMethodName\n remoteIncotermCode remoteIncotermVersion remoteIncotermAddress remoteDeliveryDate\n remoteConfirmedAt remoteMismatch\n }\n\n\n }\n totalItems\n }\n }\n }\n";
39
40
  export declare const LOGOUT = "\n mutation Logout {\n logout { success }\n }\n";
@@ -57,7 +58,7 @@ export declare const FAVORITE_VARIANT_IDS = "\n query FavoriteVariantIds {\n
57
58
  export declare const MY_FAVORITES = "\n query MyFavorites($options: FavoriteListOptions) {\n myFavorites(options: $options) {\n items {\n id\n productVariantId\n createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n product {\n id name slug\n featuredAsset {\n source width height\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n totalItems\n }\n }\n";
58
59
  export declare const TOGGLE_FAVORITE = "\n mutation ToggleFavorite($productVariantId: ID!) {\n toggleFavorite(productVariantId: $productVariantId)\n }\n";
59
60
  export declare const REMOVE_FAVORITE = "\n mutation RemoveFavorite($productVariantId: ID!) {\n removeFavorite(productVariantId: $productVariantId)\n }\n";
60
- export declare const GET_ACTIVE_CHANNEL = "\n query ActiveChannel {\n activeChannel {\n id code\n defaultLanguageCode\n availableLanguageCodes\n defaultCurrencyCode\n availableCurrencyCodes\n \n customFields {\n businessName businessDescription\n logoAssetId darkLogoAssetId coverAssetId faviconAssetId\n websiteUrl primaryColor\n contactEmail contactPhone\n legalName vatNumber registrationNumber\n addressLine1 addressLine2 city postalCode province country\n socialLinks\n commercePathPrefix commercePathPrefixTranslations productPathSegment\n cdnDomain maintenanceMode\n urlLocaleStrategy urlLocalePrefixDefault\n twitterHandle defaultOgImageId llmsTxtEnabled\n storefrontUrl quotesEnabled\n returnsEnabled returnWindowDays\n }\n\n }\n }\n";
61
+ export declare const GET_ACTIVE_CHANNEL = "\n query ActiveChannel {\n activeChannel {\n id code\n defaultLanguageCode\n availableLanguageCodes\n defaultCurrencyCode\n availableCurrencyCodes\n \n customFields {\n businessName businessDescription\n logoAssetId darkLogoAssetId coverAssetId faviconAssetId\n websiteUrl primaryColor\n contactEmail contactPhone\n legalName vatNumber registrationNumber\n addressLine1 addressLine2 city postalCode province country\n socialLinks\n commercePathPrefix commercePathPrefixTranslations productPathSegment\n cdnDomain maintenanceMode\n urlLocaleStrategy urlLocalePrefixDefault\n twitterHandle defaultOgImageId llmsTxtEnabled\n storefrontUrl quotesEnabled\n returnsEnabled returnWindowDays\n taxDisplayDefault taxDisplayB2b taxExclusiveCountries\n }\n\n }\n }\n";
61
62
  export declare const PROPERTY_GROUPS = "\n query PropertyGroups {\n productPropertyGroups {\n id position\n translations { id languageCode name }\n properties {\n id slug fieldType isFilterable isRequired position\n config { options { value label } min max maxLength allowedCollectionIds filterableFieldSlugs }\n facetId\n fieldFacets { fieldSlug fieldType facetId }\n translations { id languageCode name helpText }\n }\n }\n }\n";
62
63
  export declare const PRODUCT_PROPERTIES = "\n query ProductProperties($productId: ID!) {\n productPropertyValues(productId: $productId) {\n group {\n id position\n translations { id languageCode name }\n properties {\n id slug fieldType isFilterable isRequired position\n config { options { value label } min max maxLength }\n facetId\n fieldFacets { fieldSlug fieldType facetId }\n translations { id languageCode name helpText }\n }\n }\n values { id propertyId languageCode value }\n }\n }\n";
63
64
  export declare const GET_PRODUCT_RECOMMENDATIONS = "\n query ProductRecommendations($productId: ID!, $groupSlug: String) {\n productRecommendations(productId: $productId, groupSlug: $groupSlug) {\n groupName\n groupSlug\n products {\n id name slug description\n featuredAsset {\n source name width height\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
@@ -67,11 +68,15 @@ export declare const GET_EXCHANGE_RATE = "\n query ExchangeRate($targetCurrency
67
68
  export declare const CONVERT_FROM_BASE = "\n query ConvertFromBase($amount: String!, $targetCurrency: String!) {\n convertFromBase(amount: $amount, targetCurrency: $targetCurrency) {\n \n originalAmount originalCurrency convertedAmount targetCurrency rate rateDate\n\n }\n }\n";
68
69
  export declare const CONVERT_TO_BASE = "\n query ConvertToBase($amount: String!, $sourceCurrency: String!) {\n convertToBase(amount: $amount, sourceCurrency: $sourceCurrency) {\n \n originalAmount originalCurrency convertedAmount targetCurrency rate rateDate\n\n }\n }\n";
69
70
  export declare const CONVERT_TO_MULTIPLE = "\n query ConvertToMultiple($amount: String!, $from: String!, $to: [String!]!) {\n convertToMultiple(amount: $amount, fromCurrency: $from, toCurrencies: $to) {\n currency amount rate\n }\n }\n";
70
- export declare const MY_QUOTES = "\n query MyQuotes($options: QuoteListOptions) {\n myQuotes(options: $options) {\n items { \n id code channelId customerId currencyCode status\n expiresAt salesRepUserId customerNotes convertedOrderId\n createdAt updatedAt\n lines {\n id productVariantId quantity unitPrice discountType discountValue discountLabel position\n createdAt updatedAt\n }\n }\n totalItems\n }\n }\n";
71
- export declare const MY_QUOTE = "\n query MyQuote($id: ID!) {\n myQuote(id: $id) { \n id code channelId customerId currencyCode status\n expiresAt salesRepUserId customerNotes convertedOrderId\n createdAt updatedAt\n lines {\n id productVariantId quantity unitPrice discountType discountValue discountLabel position\n createdAt updatedAt\n }\n }\n }\n";
72
- export declare const CREATE_QUOTE_REQUEST = "\n mutation CreateQuoteRequest($input: CreateQuoteRequestInput!) {\n createQuoteRequest(input: $input) { \n id code channelId customerId currencyCode status\n expiresAt salesRepUserId customerNotes convertedOrderId\n createdAt updatedAt\n lines {\n id productVariantId quantity unitPrice discountType discountValue discountLabel position\n createdAt updatedAt\n }\n }\n }\n";
71
+ export declare const MY_QUOTES: string;
72
+ export declare const MY_QUOTES_LEGACY: string;
73
+ export declare const MY_QUOTE: string;
74
+ export declare const MY_QUOTE_LEGACY: string;
75
+ export declare const CREATE_QUOTE_REQUEST: string;
76
+ export declare const CREATE_QUOTE_REQUEST_LEGACY: string;
73
77
  export declare const ACCEPT_QUOTE = "\n mutation AcceptQuote($id: ID!) {\n acceptQuote(id: $id) { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n }\n";
74
- export declare const CANCEL_MY_QUOTE = "\n mutation CancelMyQuote($id: ID!, $reason: String) {\n cancelMyQuote(id: $id, reason: $reason) { \n id code channelId customerId currencyCode status\n expiresAt salesRepUserId customerNotes convertedOrderId\n createdAt updatedAt\n lines {\n id productVariantId quantity unitPrice discountType discountValue discountLabel position\n createdAt updatedAt\n }\n }\n }\n";
78
+ export declare const CANCEL_MY_QUOTE: string;
79
+ export declare const CANCEL_MY_QUOTE_LEGACY: string;
75
80
  export declare const GET_BRANDING = "\n query GetBranding($ids: [ID!]!) {\n activeChannel {\n id\n defaultLanguageCode\n availableLanguageCodes\n defaultCurrencyCode\n }\n fontResources {\n id\n identifier\n kind\n family\n weights\n files {\n id\n source\n preview\n mimeType\n }\n }\n brandingAssets(ids: $ids) {\n id\n source\n preview\n mimeType\n }\n }\n";
76
81
  export declare const ACTIVE_CHANNEL_ORDER_CONSTRAINTS = "\n query ActiveChannelOrderConstraints {\n activeChannelOrderConstraints {\n minOrderAmountGross\n minOrderAmountNet\n minOrderQuantity\n fulfillmentMinOrderNet\n currencyCode\n customerIsExempt\n }\n }\n";
77
82
  export declare const MY_ORDER_INVOICES = "\n query MyOrderInvoices($orderCode: String!) {\n myOrderInvoices(orderCode: $orderCode) {\n id invoiceNumber invoicedOn totalWithTax currencyCode languageCode createdAt\n }\n }\n";
@@ -1 +1 @@
1
- {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/commerce/queries.ts"],"names":[],"mappings":"AAoCA,eAAO,MAAM,WAAW,mqFAyDvB,CAAC;AAEF,eAAO,MAAM,iBAAiB,6pFAyD7B,CAAC;AAEF,eAAO,MAAM,aAAa,mrCAgCzB,CAAC;AAEF,eAAO,MAAM,WAAW,wJAUvB,CAAC;AAIF,eAAO,MAAM,gBAAgB,0aAgB5B,CAAC;AAEF,eAAO,MAAM,cAAc,u/CAqD1B,CAAC;AAIF,eAAO,MAAM,eAAe,ijBAgB3B,CAAC;AA8GF,eAAO,MAAM,YAAY,qsCAIxB,CAAC;AAEF,eAA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,QAAkD,CAAC;AAE3F,eAAO,MAAM,YAAY,2tCAIxB,CAAC;AAEF,eAAO,MAAM,eAAe,QAAsC,CAAC;AACnE,eAAO,MAAM,sBAAsB,QAA6C,CAAC;AAOjF,eAAO,MAAM,YAAY,kcA4BxB,CAAC;AAIF,eAAO,MAAM,gCAAgC,uPAW5C,CAAC;AAIF,eAAO,MAAM,iBAAiB,qMAM7B,CAAC;AAEF,eAAO,MAAM,cAAc,4IAM1B,CAAC;AAwBF,eAAO,MAAM,UAAU,8kBAOtB,CAAC;AAEF,eAAO,MAAM,SAAS,wfAIrB,CAAC;AAEF,eAAO,MAAM,cAAc,k0BAgB1B,CAAC;AAEF,eAAO,MAAM,gBAAgB,ugBAI5B,CAAC;AAEF,eAAO,MAAM,0BAA0B,oWAWtC,CAAC"}
@@ -350,6 +350,33 @@ const ORDER_SUMMARY_FIELDS = `
350
350
  ${ORDER_PAYMENT_TERMS_FRAGMENT}
351
351
  ${ORDER_DELIVERY_TERMS_FRAGMENT}
352
352
  `;
353
+ const PLACEMENT_FIELDS = `
354
+ code
355
+ customerMessage
356
+ linesTruncated
357
+ requiredAmount
358
+ currencyCode
359
+ amountBasis
360
+ requiredQuantity
361
+ priceListName
362
+ salesUnit
363
+ minimumAge
364
+ lines {
365
+ orderLineId
366
+ productVariantId
367
+ sku
368
+ productName
369
+ productVariantName
370
+ quantityRequested
371
+ quantityAvailable
372
+ }
373
+ details { field code message }
374
+ `;
375
+ const INSUFFICIENT_STOCK_FIELDS = `
376
+ errorCode message quantityAvailable
377
+ productVariantId orderLineId sku productName productVariantName
378
+ quantityRequested inputIndex
379
+ `;
353
380
  export const ACTIVE_ORDER = `
354
381
  query ActiveOrder {
355
382
  activeOrder { ${ORDER_FIELDS} }
@@ -362,7 +389,7 @@ export const ADD_TO_CART = `
362
389
  ... on OrderModificationError { errorCode message }
363
390
  ... on OrderLimitError { errorCode message maxItems }
364
391
  ... on NegativeQuantityError { errorCode message }
365
- ... on InsufficientStockError { errorCode message quantityAvailable order { id } }
392
+ ... on InsufficientStockError { ${INSUFFICIENT_STOCK_FIELDS} order { id } }
366
393
  }
367
394
  }
368
395
  `;
@@ -373,7 +400,7 @@ export const ADJUST_ORDER_LINE = `
373
400
  ... on OrderModificationError { errorCode message }
374
401
  ... on OrderLimitError { errorCode message maxItems }
375
402
  ... on NegativeQuantityError { errorCode message }
376
- ... on InsufficientStockError { errorCode message quantityAvailable }
403
+ ... on InsufficientStockError { ${INSUFFICIENT_STOCK_FIELDS} }
377
404
  }
378
405
  }
379
406
  `;
@@ -416,7 +443,7 @@ export const ADD_ITEMS_TO_CART = `
416
443
  ... on OrderModificationError { errorCode message }
417
444
  ... on OrderLimitError { errorCode message maxItems }
418
445
  ... on NegativeQuantityError { errorCode message }
419
- ... on InsufficientStockError { errorCode message quantityAvailable }
446
+ ... on InsufficientStockError { ${INSUFFICIENT_STOCK_FIELDS} }
420
447
  ... on OrderInterceptorError { errorCode message interceptorError }
421
448
  }
422
449
  }
@@ -499,7 +526,21 @@ export const TRANSITION_TO_ARRANGING_PAYMENT = `
499
526
  mutation TransitionToArrangingPayment {
500
527
  transitionOrderToState(state: "ArrangingPayment") {
501
528
  ... on Order { ${ORDER_FIELDS} }
502
- ... on OrderStateTransitionError { errorCode message transitionError }
529
+ ... on OrderStateTransitionError {
530
+ errorCode message transitionError
531
+ placement { ${PLACEMENT_FIELDS} }
532
+ }
533
+ }
534
+ }
535
+ `;
536
+ export const SET_PAYMENT_INTENT = `
537
+ mutation SetOrderPaymentIntent($intent: OrderPaymentIntent!) {
538
+ setOrderPaymentIntent(intent: $intent) {
539
+ ... on Order {
540
+ ${ORDER_FIELDS}
541
+ customFields { paymentIntent }
542
+ }
543
+ ... on NoActiveOrderError { errorCode message }
503
544
  }
504
545
  }
505
546
  `;
@@ -513,9 +554,18 @@ export const ADD_PAYMENT = `
513
554
  }
514
555
  ... on OrderPaymentStateError { errorCode message }
515
556
  ... on IneligiblePaymentMethodError { errorCode message }
516
- ... on PaymentFailedError { errorCode message paymentErrorMessage }
517
- ... on PaymentDeclinedError { errorCode message paymentErrorMessage }
518
- ... on OrderStateTransitionError { errorCode message transitionError }
557
+ ... on PaymentFailedError {
558
+ errorCode message paymentErrorMessage
559
+ placement { ${PLACEMENT_FIELDS} }
560
+ }
561
+ ... on PaymentDeclinedError {
562
+ errorCode message paymentErrorMessage
563
+ placement { ${PLACEMENT_FIELDS} }
564
+ }
565
+ ... on OrderStateTransitionError {
566
+ errorCode message transitionError
567
+ placement { ${PLACEMENT_FIELDS} }
568
+ }
519
569
  ... on NoActiveOrderError { errorCode message }
520
570
  }
521
571
  }
@@ -639,6 +689,7 @@ export const GET_CURRENT_CUSTOMER = `
639
689
  activeCustomer {
640
690
  id firstName lastName emailAddress phoneNumber
641
691
  groups { id name }
692
+ isB2B
642
693
  addresses {
643
694
  id fullName streetLine1 streetLine2 city province postalCode
644
695
  country { code name }
@@ -888,6 +939,7 @@ const CHANNEL_CUSTOM_FIELDS_FRAGMENT = `
888
939
  twitterHandle defaultOgImageId llmsTxtEnabled
889
940
  storefrontUrl quotesEnabled
890
941
  returnsEnabled returnWindowDays
942
+ taxDisplayDefault taxDisplayB2b taxExclusiveCountries
891
943
  }
892
944
  `;
893
945
  export const GET_ACTIVE_CHANNEL = `
@@ -1006,43 +1058,55 @@ export const CONVERT_TO_MULTIPLE = `
1006
1058
  }
1007
1059
  }
1008
1060
  `;
1009
- const QUOTE_FIELDS = `
1061
+ const QUOTE_LINE_TAX_FIELDS = 'productName sku taxRate unitPriceWithTax lineTotal lineTotalWithTax';
1062
+ const quoteFields = (lineTaxFields) => `
1010
1063
  id code channelId customerId currencyCode status
1011
1064
  expiresAt salesRepUserId customerNotes convertedOrderId
1012
1065
  createdAt updatedAt
1013
1066
  lines {
1014
1067
  id productVariantId quantity unitPrice discountType discountValue discountLabel position
1068
+ ${lineTaxFields}
1015
1069
  createdAt updatedAt
1016
1070
  }
1017
1071
  `;
1018
- export const MY_QUOTES = `
1072
+ const QUOTE_FIELDS = quoteFields(QUOTE_LINE_TAX_FIELDS);
1073
+ const QUOTE_FIELDS_LEGACY = quoteFields('');
1074
+ const myQuotesDocument = (fields) => `
1019
1075
  query MyQuotes($options: QuoteListOptions) {
1020
1076
  myQuotes(options: $options) {
1021
- items { ${QUOTE_FIELDS} }
1077
+ items { ${fields} }
1022
1078
  totalItems
1023
1079
  }
1024
1080
  }
1025
1081
  `;
1026
- export const MY_QUOTE = `
1082
+ const myQuoteDocument = (fields) => `
1027
1083
  query MyQuote($id: ID!) {
1028
- myQuote(id: $id) { ${QUOTE_FIELDS} }
1084
+ myQuote(id: $id) { ${fields} }
1029
1085
  }
1030
1086
  `;
1031
- export const CREATE_QUOTE_REQUEST = `
1087
+ const createQuoteRequestDocument = (fields) => `
1032
1088
  mutation CreateQuoteRequest($input: CreateQuoteRequestInput!) {
1033
- createQuoteRequest(input: $input) { ${QUOTE_FIELDS} }
1089
+ createQuoteRequest(input: $input) { ${fields} }
1034
1090
  }
1035
1091
  `;
1092
+ const cancelMyQuoteDocument = (fields) => `
1093
+ mutation CancelMyQuote($id: ID!, $reason: String) {
1094
+ cancelMyQuote(id: $id, reason: $reason) { ${fields} }
1095
+ }
1096
+ `;
1097
+ export const MY_QUOTES = myQuotesDocument(QUOTE_FIELDS);
1098
+ export const MY_QUOTES_LEGACY = myQuotesDocument(QUOTE_FIELDS_LEGACY);
1099
+ export const MY_QUOTE = myQuoteDocument(QUOTE_FIELDS);
1100
+ export const MY_QUOTE_LEGACY = myQuoteDocument(QUOTE_FIELDS_LEGACY);
1101
+ export const CREATE_QUOTE_REQUEST = createQuoteRequestDocument(QUOTE_FIELDS);
1102
+ export const CREATE_QUOTE_REQUEST_LEGACY = createQuoteRequestDocument(QUOTE_FIELDS_LEGACY);
1036
1103
  export const ACCEPT_QUOTE = `
1037
1104
  mutation AcceptQuote($id: ID!) {
1038
1105
  acceptQuote(id: $id) { ${ORDER_FIELDS} }
1039
1106
  }
1040
1107
  `;
1041
- export const CANCEL_MY_QUOTE = `
1042
- mutation CancelMyQuote($id: ID!, $reason: String) {
1043
- cancelMyQuote(id: $id, reason: $reason) { ${QUOTE_FIELDS} }
1044
- }
1045
- `;
1108
+ export const CANCEL_MY_QUOTE = cancelMyQuoteDocument(QUOTE_FIELDS);
1109
+ export const CANCEL_MY_QUOTE_LEGACY = cancelMyQuoteDocument(QUOTE_FIELDS_LEGACY);
1046
1110
  export const GET_BRANDING = `
1047
1111
  query GetBranding($ids: [ID!]!) {
1048
1112
  activeChannel {
@@ -1 +1 @@
1
- {"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/commerce/queries.ts"],"names":[],"mappings":"AAQA,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BjC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAsDnB,yBAAyB;;;CAGhC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAsDzB,yBAAyB;;;CAGhC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC5B,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;CAU1B,CAAC;AAIF,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;CAgB/B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqD7B,CAAC;AAIF,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;CAgB9B,CAAC;AAOF,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BpB,CAAC;AAeF,MAAM,2BAA2B,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AKnB,uBAAuB,GAAG,OAAO,CAAC,KAAK,CAAC;oBAOlD,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;sBAKrB,MAAM,WAAW,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;EAQnE"}
1
+ {"version":3,"file":"quotes.d.ts","sourceRoot":"","sources":["../../src/commerce/quotes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EACV,uBAAuB,EACvB,KAAK,EACL,KAAK,EACL,SAAS,EACT,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAqCrB,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU;0BAqCpB,gBAAgB,GAAG,OAAO,CAAC,SAAS,CAAC;mBAS5C,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;8BASnB,uBAAuB,GAAG,OAAO,CAAC,KAAK,CAAC;oBASlD,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;sBAKrB,MAAM,WAAW,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;EASnE"}
@@ -1,20 +1,38 @@
1
- import { ACCEPT_QUOTE, CANCEL_MY_QUOTE, CREATE_QUOTE_REQUEST, MY_QUOTE, MY_QUOTES, } from './queries.js';
1
+ import { StorefrontError } from '../errors.js';
2
+ import { ACCEPT_QUOTE, CANCEL_MY_QUOTE, CANCEL_MY_QUOTE_LEGACY, CREATE_QUOTE_REQUEST, CREATE_QUOTE_REQUEST_LEGACY, MY_QUOTE, MY_QUOTE_LEGACY, MY_QUOTES, MY_QUOTES_LEGACY, } from './queries.js';
3
+ function isUnknownFieldRejection(error) {
4
+ if (!(error instanceof StorefrontError))
5
+ return false;
6
+ return (error.message.includes('Vendure Shop API returned 400') ||
7
+ /Cannot query field/i.test(error.message));
8
+ }
2
9
  export function createQuotesMethods(http) {
10
+ let quoteFieldsUnsupported = false;
11
+ async function withQuoteFieldFallback(document, legacyDocument, variables) {
12
+ if (quoteFieldsUnsupported)
13
+ return http.graphql(legacyDocument, variables);
14
+ try {
15
+ return await http.graphql(document, variables);
16
+ }
17
+ catch (error) {
18
+ if (!isUnknownFieldRejection(error))
19
+ throw error;
20
+ const data = await http.graphql(legacyDocument, variables);
21
+ quoteFieldsUnsupported = true;
22
+ return data;
23
+ }
24
+ }
3
25
  return {
4
26
  async getMyQuotes(options) {
5
- const data = await http.graphql(MY_QUOTES, {
6
- options: options ?? null,
7
- });
27
+ const data = await withQuoteFieldFallback(MY_QUOTES, MY_QUOTES_LEGACY, { options: options ?? null });
8
28
  return data.myQuotes;
9
29
  },
10
30
  async getMyQuote(id) {
11
- const data = await http.graphql(MY_QUOTE, { id });
31
+ const data = await withQuoteFieldFallback(MY_QUOTE, MY_QUOTE_LEGACY, { id });
12
32
  return data.myQuote;
13
33
  },
14
34
  async createQuoteRequest(input) {
15
- const data = await http.graphql(CREATE_QUOTE_REQUEST, {
16
- input,
17
- });
35
+ const data = await withQuoteFieldFallback(CREATE_QUOTE_REQUEST, CREATE_QUOTE_REQUEST_LEGACY, { input });
18
36
  return data.createQuoteRequest;
19
37
  },
20
38
  async acceptQuote(id) {
@@ -22,10 +40,7 @@ export function createQuotesMethods(http) {
22
40
  return data.acceptQuote;
23
41
  },
24
42
  async cancelMyQuote(id, reason) {
25
- const data = await http.graphql(CANCEL_MY_QUOTE, {
26
- id,
27
- reason,
28
- });
43
+ const data = await withQuoteFieldFallback(CANCEL_MY_QUOTE, CANCEL_MY_QUOTE_LEGACY, { id, reason });
29
44
  return data.cancelMyQuote;
30
45
  },
31
46
  };
@@ -1 +1 @@
1
- {"version":3,"file":"quotes.js","sourceRoot":"","sources":["../../src/commerce/quotes.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,QAAQ,EACR,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,MAAM,UAAU,mBAAmB,CAAC,IAAgB;IAClD,OAAO;QACL,KA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AAC;YACF,OAAO,IAAI,CAAC,OAAO,CAAC;QACtB,CAAC;QAED,KAAK,CAAC,kBAAkB,CAAC,KAA8B;YACrD,MAAM,IAAI,GAAG,MAAM,sBAAsB,CACvC,oBAAoB,EACpB,2BAA2B,EAC3B,EAAE,KAAK,EAAE,CACV,CAAC;YACF,OAAO,IAAI,CAAC,kBAAkB,CAAC;QACjC,CAAC;QAED,KAAK,CAAC,WAAW,CAAC,EAAU;YAC1B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAyB,YAAY,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;YAC9E,OAAO,IAAI,CAAC,WAAW,CAAC;QAC1B,CAAC;QAED,KAAK,CAAC,aAAa,CAAC,EAAU,EAAE,MAAe;YAC7C,MAAM,IAAI,GAAG,MAAM,sBAAsB,CACvC,eAAe,EACf,sBAAsB,EACtB,EAAE,EAAE,EAAE,MAAM,EAAE,CACf,CAAC;YACF,OAAO,IAAI,CAAC,aAAa,CAAC;QAC5B,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -6,4 +6,5 @@ export declare const REQUEST_TIMEOUT_MS = 15000;
6
6
  export declare const INIT_TIMEOUT_MS = 10000;
7
7
  export declare const RESERVED_STOREFRONT_PATHS: readonly ["cart", "checkout", "account", "sign-in", "register", "forgot-password", "reset-password", "verify", "verify-pending", "api", "sitemaps"];
8
8
  export type ReservedStorefrontPath = (typeof RESERVED_STOREFRONT_PATHS)[number];
9
+ export declare const ORDER_SCOPE_HEADER = "x-order-scope";
9
10
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB,yCAAyC,CAAC;AAG1E,eAAO,MAAM,eAAe,sCAAsC,CAAC;AAGnE,eAAO,MAAM,mBAAmB,0CAA0C,CAAC;AAG3E,eAAO,MAAM,aAAa,cAAc,CAAC;AAGzC,eAAO,MAAM,kBAAkB,QAAS,CAAC;AAGzC,eAAO,MAAM,eAAe,QAAS,CAAC;AAatC,eAAO,MAAM,yBAAyB,qJAa5B,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB,yCAAyC,CAAC;AAG1E,eAAO,MAAM,eAAe,sCAAsC,CAAC;AAGnE,eAAO,MAAM,mBAAmB,0CAA0C,CAAC;AAG3E,eAAO,MAAM,aAAa,cAAc,CAAC;AAGzC,eAAO,MAAM,kBAAkB,QAAS,CAAC;AAGzC,eAAO,MAAM,eAAe,QAAS,CAAC;AAatC,eAAO,MAAM,yBAAyB,qJAa5B,CAAC;AAEX,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAgBhF,eAAO,MAAM,kBAAkB,kBAAkB,CAAC"}
package/dist/constants.js CHANGED
@@ -17,4 +17,5 @@ export const RESERVED_STOREFRONT_PATHS = [
17
17
  'api',
18
18
  'sitemaps',
19
19
  ];
20
+ export const ORDER_SCOPE_HEADER = 'x-order-scope';
20
21
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,mBAAmB,GAAG,sCAAsC,CAAC;AAG1E,MAAM,CAAC,MAAM,eAAe,GAAG,mCAAmC,CAAC;AAGnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,uCAAuC,CAAC;AAG3E,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;AAGzC,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAGzC,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;AAatC,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,MAAM;IACN,UAAU;IACV,SAAS;IACT,SAAS;IACT,UAAU;IACV,iBAAiB;IACjB,gBAAgB;IAChB,QAAQ;IACR,gBAAgB;IAChB,KAAK;IAEL,UAAU;CACF,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,mBAAmB,GAAG,sCAAsC,CAAC;AAG1E,MAAM,CAAC,MAAM,eAAe,GAAG,mCAAmC,CAAC;AAGnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,uCAAuC,CAAC;AAG3E,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;AAGzC,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAGzC,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;AAatC,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,MAAM;IACN,UAAU;IACV,SAAS;IACT,SAAS;IACT,UAAU;IACV,iBAAiB;IACjB,gBAAgB;IAChB,QAAQ;IACR,gBAAgB;IAChB,KAAK;IAEL,UAAU;CACF,CAAC;AAkBX,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { AssetUrlResolver } from '../media/urls.js';
2
+ export declare function isAssetReference(value: string): boolean;
3
+ export declare function resolveContentAssetUrls(value: string, resolve: AssetUrlResolver): string;
4
+ export declare function resolveContentFieldValues(fields: Record<string, unknown> | null | undefined, resolve: AssetUrlResolver): Record<string, unknown>;
5
+ export declare function resolveSearchHitValues<T extends Record<string, unknown>>(hit: T, resolve: AssetUrlResolver): T;
6
+ export declare function resolveSearchEnvelope(envelope: Record<string, unknown>, resolve: AssetUrlResolver): Record<string, unknown>;
7
+ //# sourceMappingURL=asset-urls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asset-urls.d.ts","sourceRoot":"","sources":["../../src/content/asset-urls.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAmDzD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAIvD;AASD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,MAAM,CAiBxF;AAmCD,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,EAClD,OAAO,EAAE,gBAAgB,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAUzB;AAiCD,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtE,GAAG,EAAE,CAAC,EACN,OAAO,EAAE,gBAAgB,GACxB,CAAC,CAQH;AAQD,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,OAAO,EAAE,gBAAgB,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAgBzB"}