@dropins/storefront-checkout 2.0.1 → 2.1.0-alpha2

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 (206) hide show
  1. package/api/fragments.d.ts +4 -1
  2. package/api/getCompanyCredit/getCompanyCredit.d.ts +4 -0
  3. package/api/getCompanyCredit/graphql/getCompanyCredit.graphql.d.ts +18 -0
  4. package/api/getCompanyCredit/graphql/index.d.ts +18 -0
  5. package/{errors → api/getCompanyCredit}/index.d.ts +1 -1
  6. package/api/getNegotiableQuote/getNegotiableQuote.d.ts +22 -0
  7. package/api/getNegotiableQuote/graphql/getNegotiableQuote.graphql.d.ts +18 -0
  8. package/api/getNegotiableQuote/graphql/index.d.ts +18 -0
  9. package/{signals → api/getNegotiableQuote}/index.d.ts +2 -2
  10. package/api/getStoreConfig/getStoreConfig.d.ts +1 -0
  11. package/api/graphql/CartAddressFragment.graphql.d.ts +2 -2
  12. package/api/graphql/NegotiableQuoteAddressFragment.graphql.d.ts +19 -0
  13. package/api/graphql/NegotiableQuoteFragment.graphql.d.ts +18 -0
  14. package/api/graphql/{CartPaymentMethodFragment.graphql.d.ts → PaymentMethodFragment.graphql.d.ts} +2 -2
  15. package/api/graphql/ShippingMethodFragment.graphql.d.ts +19 -0
  16. package/api/index.d.ts +2 -2
  17. package/api/initialize/initialize.d.ts +21 -3
  18. package/api/initialize/listeners.d.ts +3 -17
  19. package/api/initializeCheckout/initializeCheckout.d.ts +2 -2
  20. package/api/setBillingAddress/graphql/index.d.ts +19 -0
  21. package/api/{setPaymentMethod/graphql/setPaymentMethod.graphql.d.ts → setBillingAddress/graphql/setBillingAddressOnCartMutation.graphql.d.ts} +2 -2
  22. package/api/setBillingAddress/graphql/setBillingAddressOnQuoteMutation.graphql.d.ts +18 -0
  23. package/api/setBillingAddress/setBillingAddress.d.ts +2 -2
  24. package/api/setPaymentMethod/graphql/index.d.ts +19 -0
  25. package/api/{setBillingAddress/graphql/setBillingAddress.graphql.d.ts → setPaymentMethod/graphql/setPaymentMethodOnCart.graphql.d.ts} +2 -2
  26. package/api/setPaymentMethod/graphql/setPaymentMethodOnQuote.graphql.d.ts +18 -0
  27. package/api/setPaymentMethod/setPaymentMethod.d.ts +2 -2
  28. package/api/setShippingAddress/graphql/index.d.ts +21 -0
  29. package/api/setShippingAddress/graphql/{setShippingAddressAndUseAsBilling.graphql.d.ts → setShippingAddressOnCartAndUseAsBillingMutation.graphql.d.ts} +2 -2
  30. package/api/setShippingAddress/graphql/{setShippingAddress.graphql.d.ts → setShippingAddressOnCartMutation.graphql.d.ts} +2 -2
  31. package/api/setShippingAddress/graphql/setShippingAddressOnQuote.graphql.d.ts +18 -0
  32. package/api/setShippingAddress/graphql/setShippingAddressOnQuoteAndUseAsBillingMutation.graphql.d.ts +18 -0
  33. package/api/setShippingAddress/setShippingAddress.d.ts +1 -1
  34. package/api/setShippingMethods/graphql/index.d.ts +19 -0
  35. package/api/setShippingMethods/graphql/setShippingMethodsOnCart.graphql.d.ts +1 -1
  36. package/api/setShippingMethods/graphql/setShippingMethodsOnQuote.graphql.d.ts +18 -0
  37. package/api/setShippingMethods/index.d.ts +1 -0
  38. package/api/setShippingMethods/setShippingMethods.d.ts +3 -17
  39. package/api/synchronizeCheckout/synchronizeCheckout.d.ts +2 -2
  40. package/api.js +2 -66
  41. package/api.js.map +1 -1
  42. package/chunks/ConditionalWrapper.js +1 -1
  43. package/chunks/ConditionalWrapper.js.map +1 -1
  44. package/chunks/PaymentOnAccount2.js +4 -0
  45. package/chunks/PaymentOnAccount2.js.map +1 -0
  46. package/chunks/PurchaseOrder.js +4 -0
  47. package/chunks/PurchaseOrder.js.map +1 -0
  48. package/chunks/checkout.js.map +1 -1
  49. package/chunks/classifiers.js +4 -0
  50. package/chunks/classifiers.js.map +1 -0
  51. package/chunks/dom.js.map +1 -1
  52. package/chunks/events.js +4 -0
  53. package/chunks/events.js.map +1 -0
  54. package/chunks/events2.js +4 -0
  55. package/chunks/events2.js.map +1 -0
  56. package/chunks/fetch-graphql.js +14 -0
  57. package/chunks/fetch-graphql.js.map +1 -0
  58. package/chunks/getCompanyCredit.js +15 -0
  59. package/chunks/getCompanyCredit.js.map +1 -0
  60. package/chunks/guards.js +4 -0
  61. package/chunks/guards.js.map +1 -0
  62. package/chunks/render.js +10 -0
  63. package/chunks/render.js.map +1 -0
  64. package/chunks/setBillingAddress.js +25 -5
  65. package/chunks/setBillingAddress.js.map +1 -1
  66. package/chunks/setGuestEmailOnCart.js +3 -3
  67. package/chunks/setGuestEmailOnCart.js.map +1 -1
  68. package/chunks/setPaymentMethod.js +21 -6
  69. package/chunks/setPaymentMethod.js.map +1 -1
  70. package/chunks/setShippingAddress.js +109 -0
  71. package/chunks/setShippingAddress.js.map +1 -0
  72. package/chunks/setShippingMethods.js +19 -4
  73. package/chunks/setShippingMethods.js.map +1 -1
  74. package/chunks/synchronizeCheckout.js +13 -5
  75. package/chunks/synchronizeCheckout.js.map +1 -1
  76. package/chunks/transform-shipping-estimate.js +4 -0
  77. package/chunks/transform-shipping-estimate.js.map +1 -0
  78. package/chunks/transform-shipping-methods.js +4 -0
  79. package/chunks/transform-shipping-methods.js.map +1 -0
  80. package/chunks/values.js +1 -1
  81. package/chunks/values.js.map +1 -1
  82. package/components/AddressValidation/AddressValidation.d.ts +14 -0
  83. package/components/AddressValidation/index.d.ts +19 -0
  84. package/components/PaymentMethods/PaymentMethods.d.ts +1 -1
  85. package/components/PaymentOnAccount/PaymentOnAccount.d.ts +17 -0
  86. package/components/PaymentOnAccount/PaymentOnAccountSkeleton.d.ts +4 -0
  87. package/components/PaymentOnAccount/index.d.ts +20 -0
  88. package/components/PurchaseOrder/PurchaseOrder.d.ts +10 -0
  89. package/components/PurchaseOrder/index.d.ts +19 -0
  90. package/components/ShippingMethods/ShippingMethods.d.ts +1 -1
  91. package/components/index.d.ts +4 -1
  92. package/containers/AddressValidation/AddressValidation.d.ts +12 -0
  93. package/containers/AddressValidation/index.d.ts +19 -0
  94. package/containers/AddressValidation.d.ts +3 -0
  95. package/containers/AddressValidation.js +4 -0
  96. package/containers/AddressValidation.js.map +1 -0
  97. package/containers/BillToShippingAddress.js +1 -1
  98. package/containers/BillToShippingAddress.js.map +1 -1
  99. package/containers/EstimateShipping.js +1 -1
  100. package/containers/EstimateShipping.js.map +1 -1
  101. package/containers/LoginForm/LoginForm.d.ts +1 -1
  102. package/containers/LoginForm.js +1 -1
  103. package/containers/LoginForm.js.map +1 -1
  104. package/containers/MergedCartBanner.js +1 -1
  105. package/containers/MergedCartBanner.js.map +1 -1
  106. package/containers/OutOfStock.js +1 -1
  107. package/containers/OutOfStock.js.map +1 -1
  108. package/containers/PaymentMethods/PaymentMethods.d.ts +9 -8
  109. package/containers/PaymentMethods/handlers.d.ts +11 -0
  110. package/containers/PaymentMethods.js +1 -1
  111. package/containers/PaymentMethods.js.map +1 -1
  112. package/containers/PaymentOnAccount/PaymentOnAccount.d.ts +10 -0
  113. package/containers/PaymentOnAccount/index.d.ts +11 -0
  114. package/containers/PaymentOnAccount.d.ts +3 -0
  115. package/containers/PaymentOnAccount.js +4 -0
  116. package/containers/PaymentOnAccount.js.map +1 -0
  117. package/containers/PlaceOrder/PlaceOrder.d.ts +2 -1
  118. package/containers/PlaceOrder.js +1 -1
  119. package/containers/PlaceOrder.js.map +1 -1
  120. package/containers/PurchaseOrder/PurchaseOrder.d.ts +10 -0
  121. package/containers/PurchaseOrder/index.d.ts +19 -0
  122. package/containers/PurchaseOrder.d.ts +3 -0
  123. package/containers/PurchaseOrder.js +4 -0
  124. package/containers/PurchaseOrder.js.map +1 -0
  125. package/containers/ServerError/ServerError.d.ts +2 -1
  126. package/containers/ServerError.js +1 -1
  127. package/containers/ServerError.js.map +1 -1
  128. package/containers/ShippingMethods/ShippingMethods.d.ts +2 -2
  129. package/containers/ShippingMethods.js +1 -1
  130. package/containers/ShippingMethods.js.map +1 -1
  131. package/containers/TermsAndConditions.js +1 -1
  132. package/containers/TermsAndConditions.js.map +1 -1
  133. package/containers/index.d.ts +3 -0
  134. package/data/models/address.d.ts +11 -6
  135. package/data/models/api.d.ts +23 -10
  136. package/data/models/cart.d.ts +7 -7
  137. package/data/models/checkout.d.ts +14 -0
  138. package/data/models/company-credit.d.ts +7 -0
  139. package/data/models/country.d.ts +1 -1
  140. package/data/models/index.d.ts +3 -1
  141. package/data/models/{price.d.ts → money.d.ts} +2 -2
  142. package/data/models/payment-method.d.ts +2 -0
  143. package/data/models/quote.d.ts +16 -0
  144. package/data/models/shipping-estimate.d.ts +4 -4
  145. package/data/models/shipping-method.d.ts +4 -4
  146. package/data/models/values.d.ts +1 -1
  147. package/data/transforms/index.d.ts +9 -1
  148. package/data/transforms/transform-api.d.ts +12 -0
  149. package/data/transforms/{transform-address.d.ts → transform-cart-address.d.ts} +41 -43
  150. package/data/transforms/transform-cart.d.ts +1 -1
  151. package/data/transforms/transform-company-credit.d.ts +7 -0
  152. package/data/transforms/transform-country.d.ts +8 -0
  153. package/data/transforms/transform-custom-attributes.d.ts +5 -0
  154. package/data/transforms/transform-negotiable-quote.d.ts +7 -0
  155. package/data/transforms/transform-payment-methods.d.ts +1 -1
  156. package/data/transforms/transform-quote-address.d.ts +90 -0
  157. package/data/transforms/transform-region.d.ts +8 -0
  158. package/fragments.js +180 -70
  159. package/fragments.js.map +1 -1
  160. package/i18n/en_US.json.d.ts +26 -0
  161. package/lib/enqueueRequest.d.ts +2 -2
  162. package/lib/errors/classifiers.d.ts +38 -0
  163. package/lib/errors/customErrors.d.ts +42 -0
  164. package/lib/errors/index.d.ts +20 -0
  165. package/lib/errors/mapErrorToCode.d.ts +4 -0
  166. package/lib/events.d.ts +3 -2
  167. package/lib/guards.d.ts +18 -0
  168. package/lib/index.d.ts +2 -2
  169. package/lib/state.d.ts +5 -3
  170. package/lib/utils/api.d.ts +16 -0
  171. package/lib/utils/events.d.ts +10 -0
  172. package/lib/utils/forms.d.ts +5 -0
  173. package/lib/utils/fragments.d.ts +19 -0
  174. package/lib/utils/index.d.ts +24 -0
  175. package/lib/utils/meta.d.ts +19 -0
  176. package/lib/utils/transformers.d.ts +6 -0
  177. package/lib/utils.d.ts +1 -0
  178. package/lib/utils.js +4 -0
  179. package/lib/utils.js.map +1 -0
  180. package/package.json +1 -1
  181. package/render.js +4 -4
  182. package/render.js.map +1 -1
  183. package/tests/constants.d.ts +1 -0
  184. package/tests/fixtures/fragments/cart.d.ts +47 -42
  185. package/tests/fixtures/fragments/shipping-address.d.ts +2 -1
  186. package/tests/fixtures/helpers/session-storage.d.ts +68 -0
  187. package/tests/fixtures/index.d.ts +1 -0
  188. package/tests/fixtures/models/index.d.ts +1 -1
  189. package/tests/fixtures/models/quote.d.ts +9 -0
  190. package/tests/fixtures/queries/get-company-credit.d.ts +14 -0
  191. package/tests/fixtures/queries/index.d.ts +1 -0
  192. package/types/api.d.ts +6 -0
  193. package/types/{TitleProps.d.ts → components.d.ts} +2 -1
  194. package/types/guards.d.ts +5 -0
  195. package/types/index.d.ts +22 -0
  196. package/types/storefront.d.ts +165 -0
  197. package/types/utils.d.ts +19 -0
  198. package/chunks/ServerErrorSignal.js +0 -4
  199. package/chunks/ServerErrorSignal.js.map +0 -1
  200. package/chunks/errors.js +0 -14
  201. package/chunks/errors.js.map +0 -1
  202. package/errors/errors.d.ts +0 -30
  203. package/lib/network-error.d.ts +0 -22
  204. package/signals/ServerErrorSignal.d.ts +0 -18
  205. package/types/ComponentTypes.d.ts +0 -18
  206. /package/lib/{dom.d.ts → utils/dom.d.ts} +0 -0
@@ -15,7 +15,10 @@
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
17
  export { BILLING_CART_ADDRESS_FRAGMENT, SHIPPING_CART_ADDRESS_FRAGMENT, } from './graphql/CartAddressFragment.graphql';
18
- export { AVAILABLE_PAYMENT_METHOD_FRAGMENT, SELECTED_PAYMENT_METHOD_FRAGMENT, } from './graphql/CartPaymentMethodFragment.graphql';
19
18
  export { CHECKOUT_DATA_FRAGMENT } from './graphql/CheckoutDataFragment.graphql';
20
19
  export { CUSTOMER_FRAGMENT } from './graphql/CustomerFragment.graphql';
20
+ export { NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT, NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT, } from './graphql/NegotiableQuoteAddressFragment.graphql';
21
+ export { NEGOTIABLE_QUOTE_FRAGMENT } from './graphql/NegotiableQuoteFragment.graphql';
22
+ export { AVAILABLE_PAYMENT_METHOD_FRAGMENT, SELECTED_PAYMENT_METHOD_FRAGMENT, } from './graphql/PaymentMethodFragment.graphql';
23
+ export { AVAILABLE_SHIPPING_METHOD_FRAGMENT, SELECTED_SHIPPING_METHOD_FRAGMENT, } from './graphql/ShippingMethodFragment.graphql';
21
24
  //# sourceMappingURL=fragments.d.ts.map
@@ -0,0 +1,4 @@
1
+ import { CompanyCredit } from '../../data/models';
2
+
3
+ export declare const getCompanyCredit: () => Promise<CompanyCredit | null>;
4
+ //# sourceMappingURL=getCompanyCredit.d.ts.map
@@ -0,0 +1,18 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export declare const getCompanyCreditQuery = "\n query getCompanyCredit {\n company {\n credit {\n available_credit {\n value\n currency\n }\n }\n }\n }\n";
18
+ //# sourceMappingURL=getCompanyCredit.graphql.d.ts.map
@@ -0,0 +1,18 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export * from './getCompanyCredit.graphql';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -14,5 +14,5 @@
14
14
  * is strictly forbidden unless prior written permission is obtained
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
- export * from './errors';
17
+ export * from './getCompanyCredit';
18
18
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,22 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ type GetNegotiableQuoteInput = {
18
+ uid?: string;
19
+ };
20
+ export declare const getNegotiableQuote: (input?: GetNegotiableQuoteInput) => Promise<import('../../data/models/quote').NegotiableQuote | null>;
21
+ export {};
22
+ //# sourceMappingURL=getNegotiableQuote.d.ts.map
@@ -0,0 +1,18 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export declare const getNegotiableQuoteQuery: string;
18
+ //# sourceMappingURL=getNegotiableQuote.graphql.d.ts.map
@@ -0,0 +1,18 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export * from './getNegotiableQuote.graphql';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -2,7 +2,7 @@
2
2
  * ADOBE CONFIDENTIAL
3
3
  * __________________
4
4
  *
5
- * Copyright 2024 Adobe
5
+ * Copyright 2025 Adobe
6
6
  * All Rights Reserved.
7
7
  *
8
8
  * NOTICE: All information contained herein is, and remains
@@ -14,5 +14,5 @@
14
14
  * is strictly forbidden unless prior written permission is obtained
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
- export * from './ServerErrorSignal';
17
+ export * from './getNegotiableQuote';
18
18
  //# sourceMappingURL=index.d.ts.map
@@ -3,4 +3,5 @@ import { StoreConfig } from '../../data/models';
3
3
  export declare const DEFAULT_COUNTRY = "US";
4
4
  export declare const STORE_CONFIG_DEFAULTS: StoreConfig;
5
5
  export declare const getStoreConfig: () => Promise<StoreConfig>;
6
+ export declare const getStoreConfigCache: () => StoreConfig | null;
6
7
  //# sourceMappingURL=getStoreConfig.d.ts.map
@@ -14,6 +14,6 @@
14
14
  * is strictly forbidden unless prior written permission is obtained
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
- export declare const BILLING_CART_ADDRESS_FRAGMENT = "\n fragment BILLING_CART_ADDRESS_FRAGMENT on BillingCartAddress {\n id\n city\n country {\n code\n label\n }\n firstname\n lastname\n company\n postcode\n vat_id\n region {\n region_id\n code\n label\n }\n street\n telephone\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n }\n prefix\n suffix\n middlename\n fax\n }\n";
18
- export declare const SHIPPING_CART_ADDRESS_FRAGMENT = "\n fragment SHIPPING_CART_ADDRESS_FRAGMENT on ShippingCartAddress {\n id\n firstname\n lastname\n company\n street\n city\n postcode\n vat_id\n region {\n region_id\n code\n label\n }\n country {\n code\n label\n }\n telephone\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n }\n available_shipping_methods {\n amount {\n currency\n value\n }\n available\n carrier_code\n carrier_title\n error_message\n method_code\n method_title\n price_excl_tax {\n value\n currency\n }\n price_incl_tax {\n value\n currency\n }\n }\n selected_shipping_method {\n amount {\n value\n currency\n }\n carrier_code\n carrier_title\n method_code\n method_title\n price_excl_tax {\n value\n currency\n }\n price_incl_tax {\n value\n currency\n }\n }\n same_as_billing\n prefix\n suffix\n middlename\n fax\n }\n";
17
+ export declare const BILLING_CART_ADDRESS_FRAGMENT = "\n fragment BILLING_CART_ADDRESS_FRAGMENT on BillingCartAddress {\n city\n company\n country {\n code\n label\n }\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n }\n fax\n firstname\n id\n lastname\n middlename\n postcode\n prefix\n region {\n region_id\n code\n label\n }\n street\n suffix\n telephone\n uid\n vat_id\n }\n";
18
+ export declare const SHIPPING_CART_ADDRESS_FRAGMENT: string;
19
19
  //# sourceMappingURL=CartAddressFragment.graphql.d.ts.map
@@ -0,0 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export declare const NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT = "\n fragment NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT on NegotiableQuoteBillingAddress {\n city\n company\n country {\n code\n label\n }\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n }\n fax\n firstname\n lastname\n middlename\n postcode\n prefix\n region {\n region_id\n code\n label\n }\n street\n suffix\n telephone\n uid\n vat_id\n }\n";
18
+ export declare const NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT: string;
19
+ //# sourceMappingURL=NegotiableQuoteAddressFragment.graphql.d.ts.map
@@ -0,0 +1,18 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export declare const NEGOTIABLE_QUOTE_FRAGMENT: string;
18
+ //# sourceMappingURL=NegotiableQuoteFragment.graphql.d.ts.map
@@ -15,5 +15,5 @@
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
17
  export declare const AVAILABLE_PAYMENT_METHOD_FRAGMENT = "\n fragment AVAILABLE_PAYMENT_METHOD_FRAGMENT on AvailablePaymentMethod {\n code\n title\n }\n";
18
- export declare const SELECTED_PAYMENT_METHOD_FRAGMENT = "\n fragment SELECTED_PAYMENT_METHOD_FRAGMENT on SelectedPaymentMethod {\n code\n title\n }\n";
19
- //# sourceMappingURL=CartPaymentMethodFragment.graphql.d.ts.map
18
+ export declare const SELECTED_PAYMENT_METHOD_FRAGMENT = "\n fragment SELECTED_PAYMENT_METHOD_FRAGMENT on SelectedPaymentMethod {\n code\n title\n purchase_order_number\n }\n";
19
+ //# sourceMappingURL=PaymentMethodFragment.graphql.d.ts.map
@@ -0,0 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export declare const AVAILABLE_SHIPPING_METHOD_FRAGMENT = "\n fragment AVAILABLE_SHIPPING_METHOD_FRAGMENT on AvailableShippingMethod {\n amount {\n currency\n value\n }\n carrier_code\n carrier_title\n error_message\n method_code\n method_title\n price_excl_tax {\n value\n currency\n }\n price_incl_tax {\n value\n currency\n }\n }\n";
18
+ export declare const SELECTED_SHIPPING_METHOD_FRAGMENT = "\n fragment SELECTED_SHIPPING_METHOD_FRAGMENT on SelectedShippingMethod {\n amount {\n currency\n value\n }\n carrier_code\n carrier_title\n method_code\n method_title\n price_excl_tax {\n value\n currency\n }\n price_incl_tax {\n value\n currency\n }\n }\n";
19
+ //# sourceMappingURL=ShippingMethodFragment.graphql.d.ts.map
package/api/index.d.ts CHANGED
@@ -19,7 +19,9 @@ export * from './estimateShippingMethods';
19
19
  export * from './fetch-graphql';
20
20
  export * from './getCart';
21
21
  export * from './getCheckoutAgreements';
22
+ export * from './getCompanyCredit';
22
23
  export * from './getCustomer';
24
+ export * from './getNegotiableQuote';
23
25
  export * from './getStoreConfig';
24
26
  export * from './initialize';
25
27
  export * from './initializeCheckout';
@@ -31,6 +33,4 @@ export * from './setPaymentMethod';
31
33
  export * from './setShippingAddress';
32
34
  export * from './setShippingMethods';
33
35
  export * from './synchronizeCheckout';
34
- export * from '../errors';
35
- export { getStoreConfigCache } from '../lib/state';
36
36
  //# sourceMappingURL=index.d.ts.map
@@ -1,9 +1,27 @@
1
- import { Cart as CartModel, Customer as CustomerModel } from '../../data/models';
2
- import { Lang } from '@dropins/tools/types/elsie/src/i18n';
1
+ import { Cart as CartModel, Customer as CustomerModel, ShippingMethod } from '../../data/models';
2
+ import { Filter, Selector } from '../../types/utils';
3
+ import { definition } from '@dropins/tools/types/elsie/src/i18n';
3
4
  import { Initializer, Model } from '@dropins/tools/types/elsie/src/lib';
4
5
 
5
6
  export type ConfigProps = {
6
- langDefinitions?: Lang;
7
+ defaults?: {
8
+ isBillToShipping?: boolean;
9
+ selectedShippingMethod?: Selector<ShippingMethod>;
10
+ };
11
+ shipping?: {
12
+ filterOptions?: Filter<ShippingMethod>;
13
+ };
14
+ features?: {
15
+ b2b?: {
16
+ quotes?: boolean;
17
+ routeLogin?: () => string | void;
18
+ };
19
+ };
20
+ langDefinitions?: typeof definition & {
21
+ default: {
22
+ Checkout: any;
23
+ };
24
+ };
7
25
  models?: {
8
26
  CartModel?: Model<CartModel>;
9
27
  CustomerModel?: Model<CustomerModel>;
@@ -1,20 +1,6 @@
1
- /********************************************************************
2
- * ADOBE CONFIDENTIAL
3
- * __________________
4
- *
5
- * Copyright 2024 Adobe
6
- * All Rights Reserved.
7
- *
8
- * NOTICE: All information contained herein is, and remains
9
- * the property of Adobe and its suppliers, if any. The intellectual
10
- * and technical concepts contained herein are proprietary to Adobe
11
- * and its suppliers and are protected by all applicable intellectual
12
- * property laws, including trade secret and copyright laws.
13
- * Dissemination of this information or reproduction of this material
14
- * is strictly forbidden unless prior written permission is obtained
15
- * from Adobe.
16
- *******************************************************************/
17
- export declare const addCheckoutEventListeners: () => ({
1
+ import { ConfigProps } from '..';
2
+
3
+ export declare const addCheckoutEventListeners: (config: ConfigProps | undefined) => ({
18
4
  off(): void;
19
5
  } | undefined)[];
20
6
  //# sourceMappingURL=listeners.d.ts.map
@@ -1,4 +1,4 @@
1
- import { Cart } from '@adobe-commerce/event-bus';
1
+ import { InitializeInput } from '../../types';
2
2
 
3
- export declare const initializeCheckout: (cart: Cart | null) => Promise<void>;
3
+ export declare const initializeCheckout: (input: InitializeInput) => Promise<void>;
4
4
  //# sourceMappingURL=initializeCheckout.d.ts.map
@@ -0,0 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export * from './setBillingAddressOnCartMutation.graphql';
18
+ export * from './setBillingAddressOnQuoteMutation.graphql';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -14,5 +14,5 @@
14
14
  * is strictly forbidden unless prior written permission is obtained
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
- export declare const setPaymentMethodMutation: string;
18
- //# sourceMappingURL=setPaymentMethod.graphql.d.ts.map
17
+ export declare const setBillingAddressOnCartMutation: string;
18
+ //# sourceMappingURL=setBillingAddressOnCartMutation.graphql.d.ts.map
@@ -0,0 +1,18 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export declare const setBillingAddressOnQuoteMutation: string;
18
+ //# sourceMappingURL=setBillingAddressOnQuoteMutation.graphql.d.ts.map
@@ -1,4 +1,4 @@
1
- import { BillingAddressInput } from '../../data/models';
1
+ import { BillingAddressInput as BillingAddressInputModel } from '../../data/models';
2
2
 
3
- export declare const setBillingAddress: ({ address, customerAddressId, sameAsShipping, useForShipping, }: BillingAddressInput) => Promise<import('../../data/models').Cart | undefined>;
3
+ export declare const setBillingAddress: (input: BillingAddressInputModel) => Promise<import('../../data/models').Cart | import('../../data/models').NegotiableQuote | null | undefined>;
4
4
  //# sourceMappingURL=setBillingAddress.d.ts.map
@@ -0,0 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export * from './setPaymentMethodOnCart.graphql';
18
+ export * from './setPaymentMethodOnQuote.graphql';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -14,5 +14,5 @@
14
14
  * is strictly forbidden unless prior written permission is obtained
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
- export declare const setBillingAddressMutation: string;
18
- //# sourceMappingURL=setBillingAddress.graphql.d.ts.map
17
+ export declare const setPaymentMethodOnCartMutation: string;
18
+ //# sourceMappingURL=setPaymentMethodOnCart.graphql.d.ts.map
@@ -0,0 +1,18 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export declare const setPaymentMethodOnQuoteMutation: string;
18
+ //# sourceMappingURL=setPaymentMethodOnQuote.graphql.d.ts.map
@@ -1,4 +1,4 @@
1
- import { SetPaymentMethodOnCartInput } from '../../__generated__/types';
1
+ import { PaymentMethodInput as PaymentMethodInputModel } from '../../data/models';
2
2
 
3
- export declare const setPaymentMethod: (paymentMethod: SetPaymentMethodOnCartInput['payment_method']) => Promise<import('../../data/models/cart').Cart | undefined>;
3
+ export declare const setPaymentMethod: (input: PaymentMethodInputModel) => Promise<import('../../data/models').Cart | import('../../data/models').NegotiableQuote | null | undefined>;
4
4
  //# sourceMappingURL=setPaymentMethod.d.ts.map
@@ -0,0 +1,21 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export * from './setShippingAddressOnCartAndUseAsBillingMutation.graphql';
18
+ export * from './setShippingAddressOnCartMutation.graphql';
19
+ export * from './setShippingAddressOnQuote.graphql';
20
+ export * from './setShippingAddressOnQuoteAndUseAsBillingMutation.graphql';
21
+ //# sourceMappingURL=index.d.ts.map
@@ -14,5 +14,5 @@
14
14
  * is strictly forbidden unless prior written permission is obtained
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
- export declare const setShippingAddressAndUseAsBillingMutation: string;
18
- //# sourceMappingURL=setShippingAddressAndUseAsBilling.graphql.d.ts.map
17
+ export declare const setShippingAddressOnCartAndUseAsBillingMutation: string;
18
+ //# sourceMappingURL=setShippingAddressOnCartAndUseAsBillingMutation.graphql.d.ts.map
@@ -14,5 +14,5 @@
14
14
  * is strictly forbidden unless prior written permission is obtained
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
- export declare const setShippingAddressMutation: string;
18
- //# sourceMappingURL=setShippingAddress.graphql.d.ts.map
17
+ export declare const setShippingAddressOnCartMutation: string;
18
+ //# sourceMappingURL=setShippingAddressOnCartMutation.graphql.d.ts.map
@@ -0,0 +1,18 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export declare const setShippingAddressOnQuoteMutation: string;
18
+ //# sourceMappingURL=setShippingAddressOnQuote.graphql.d.ts.map
@@ -0,0 +1,18 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export declare const setShippingAddressOnQuoteAndUseAsBillingMutation: string;
18
+ //# sourceMappingURL=setShippingAddressOnQuoteAndUseAsBillingMutation.graphql.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import { ShippingAddressInput as ShippingAddressInputModel } from '../../data/models';
2
2
 
3
- export declare const setShippingAddress: ({ address, customerAddressId, pickupLocationCode, }: ShippingAddressInputModel) => Promise<import('../../data/models').Cart | undefined>;
3
+ export declare const setShippingAddress: (input: ShippingAddressInputModel) => Promise<import('../../data/models').Cart | import('../../data/models').NegotiableQuote | null | undefined>;
4
4
  //# sourceMappingURL=setShippingAddress.d.ts.map
@@ -0,0 +1,19 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export * from './setShippingMethodsOnCart.graphql';
18
+ export * from './setShippingMethodsOnQuote.graphql';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -14,5 +14,5 @@
14
14
  * is strictly forbidden unless prior written permission is obtained
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
- export declare const setShippingMethodsMutation: string;
17
+ export declare const setShippingMethodsOnCartMutation: string;
18
18
  //# sourceMappingURL=setShippingMethodsOnCart.graphql.d.ts.map
@@ -0,0 +1,18 @@
1
+ /********************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2025 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
+ export declare const setShippingMethodsOnQuoteMutation: string;
18
+ //# sourceMappingURL=setShippingMethodsOnQuote.graphql.d.ts.map
@@ -15,4 +15,5 @@
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
17
  export * from './setShippingMethods';
18
+ export { setShippingMethods as setShippingMethodsOnCart } from './setShippingMethods';
18
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,18 +1,4 @@
1
- /********************************************************************
2
- * ADOBE CONFIDENTIAL
3
- * __________________
4
- *
5
- * Copyright 2024 Adobe
6
- * All Rights Reserved.
7
- *
8
- * NOTICE: All information contained herein is, and remains
9
- * the property of Adobe and its suppliers, if any. The intellectual
10
- * and technical concepts contained herein are proprietary to Adobe
11
- * and its suppliers and are protected by all applicable intellectual
12
- * property laws, including trade secret and copyright laws.
13
- * Dissemination of this information or reproduction of this material
14
- * is strictly forbidden unless prior written permission is obtained
15
- * from Adobe.
16
- *******************************************************************/
17
- export declare const setShippingMethodsOnCart: (shippingMethods: import('../../__generated__/types').InputMaybe<import('../../__generated__/types').ShippingMethodInput>[]) => Promise<import('../../data/models/cart').Cart | undefined>;
1
+ import { ShippingMethodInput as ShippingMethodInputModel } from '../../data/models/api';
2
+
3
+ export declare const setShippingMethods: (input: Array<ShippingMethodInputModel>) => Promise<import('../../data/models/cart').Cart | import('../../data/models/quote').NegotiableQuote | null | undefined>;
18
4
  //# sourceMappingURL=setShippingMethods.d.ts.map
@@ -1,4 +1,4 @@
1
- import { Cart } from '@adobe-commerce/event-bus';
1
+ import { SynchronizeInput } from '../../types';
2
2
 
3
- export declare const synchronizeCheckout: (cart: Cart | null) => Promise<void>;
3
+ export declare const synchronizeCheckout: (data: SynchronizeInput) => Promise<void>;
4
4
  //# sourceMappingURL=synchronizeCheckout.d.ts.map