@dropins/storefront-checkout 2.0.1 → 2.1.0-beta2

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 (97) hide show
  1. package/api/fragments.d.ts +4 -1
  2. package/{lib/network-error.d.ts → api/getNegotiableQuote/getNegotiableQuote.d.ts} +7 -7
  3. package/{signals/ServerErrorSignal.d.ts → api/getNegotiableQuote/graphql/getNegotiableQuote.graphql.d.ts} +3 -3
  4. package/{errors → api/getNegotiableQuote/graphql}/index.d.ts +2 -2
  5. package/{signals → api/getNegotiableQuote}/index.d.ts +2 -2
  6. package/api/graphql/CartAddressFragment.graphql.d.ts +1 -1
  7. package/api/graphql/NegotiableQuoteAddressFragment.graphql.d.ts +19 -0
  8. package/api/graphql/NegotiableQuoteFragment.graphql.d.ts +18 -0
  9. package/api/graphql/{CartPaymentMethodFragment.graphql.d.ts → PaymentMethodFragment.graphql.d.ts} +1 -1
  10. package/api/graphql/ShippingMethodFragment.graphql.d.ts +19 -0
  11. package/api/index.d.ts +5 -1
  12. package/api/setNegotiableQuoteBillingAddress/graphql/index.d.ts +18 -0
  13. package/api/setNegotiableQuoteBillingAddress/graphql/setNegotiableQuoteBillingAddress.graphql.d.ts +18 -0
  14. package/api/setNegotiableQuoteBillingAddress/index.d.ts +18 -0
  15. package/api/setNegotiableQuoteBillingAddress/setNegotiableQuoteBillingAddress.d.ts +6 -0
  16. package/api/setNegotiableQuotePaymentMethod/graphql/index.d.ts +18 -0
  17. package/api/setNegotiableQuotePaymentMethod/graphql/setNegotiableQuotePaymentMethod.graphql.d.ts +18 -0
  18. package/api/setNegotiableQuotePaymentMethod/index.d.ts +18 -0
  19. package/api/setNegotiableQuotePaymentMethod/setNegotiableQuotePaymentMethod.d.ts +6 -0
  20. package/api/setNegotiableQuoteShippingAddress/graphql/index.d.ts +18 -0
  21. package/api/setNegotiableQuoteShippingAddress/graphql/setNegotiableQuoteShippingAddress.graphql.d.ts +18 -0
  22. package/api/setNegotiableQuoteShippingAddress/index.d.ts +18 -0
  23. package/api/setNegotiableQuoteShippingAddress/setNegotiableQuoteShippingAddress.d.ts +6 -0
  24. package/api/setNegotiableQuoteShippingMethods/graphql/index.d.ts +18 -0
  25. package/api/setNegotiableQuoteShippingMethods/graphql/setNegotiableQuoteShippingMethods.graphql.d.ts +18 -0
  26. package/api/setNegotiableQuoteShippingMethods/index.d.ts +18 -0
  27. package/api/setNegotiableQuoteShippingMethods/setNegotiableQuoteShippingMethods.d.ts +18 -0
  28. package/api.js +78 -7
  29. package/api.js.map +1 -1
  30. package/chunks/checkout.js.map +1 -1
  31. package/chunks/fetch-graphql.js +14 -0
  32. package/chunks/fetch-graphql.js.map +1 -0
  33. package/chunks/setBillingAddress.js +2 -2
  34. package/chunks/setBillingAddress.js.map +1 -1
  35. package/chunks/setGuestEmailOnCart.js +4 -4
  36. package/chunks/setGuestEmailOnCart.js.map +1 -1
  37. package/chunks/setPaymentMethod.js +2 -2
  38. package/chunks/setPaymentMethod.js.map +1 -1
  39. package/chunks/setShippingMethods.js +3 -3
  40. package/chunks/setShippingMethods.js.map +1 -1
  41. package/chunks/synchronizeCheckout.js +3 -3
  42. package/chunks/synchronizeCheckout.js.map +1 -1
  43. package/containers/BillToShippingAddress.js +1 -1
  44. package/containers/BillToShippingAddress.js.map +1 -1
  45. package/containers/EstimateShipping.js +1 -1
  46. package/containers/EstimateShipping.js.map +1 -1
  47. package/containers/LoginForm.js +1 -1
  48. package/containers/LoginForm.js.map +1 -1
  49. package/containers/OutOfStock.js +1 -1
  50. package/containers/OutOfStock.js.map +1 -1
  51. package/containers/PaymentMethods.js +1 -1
  52. package/containers/PaymentMethods.js.map +1 -1
  53. package/containers/PlaceOrder.js +1 -1
  54. package/containers/PlaceOrder.js.map +1 -1
  55. package/containers/ServerError.js +1 -1
  56. package/containers/ServerError.js.map +1 -1
  57. package/containers/ShippingMethods.js +1 -1
  58. package/containers/ShippingMethods.js.map +1 -1
  59. package/containers/TermsAndConditions.js +1 -1
  60. package/containers/TermsAndConditions.js.map +1 -1
  61. package/data/models/address.d.ts +5 -8
  62. package/data/models/api.d.ts +3 -3
  63. package/data/models/cart.d.ts +14 -7
  64. package/data/models/checkout.d.ts +14 -0
  65. package/data/models/country.d.ts +1 -1
  66. package/data/models/index.d.ts +2 -1
  67. package/data/models/{price.d.ts → money.d.ts} +2 -2
  68. package/data/models/quote.d.ts +15 -0
  69. package/data/models/shipping-estimate.d.ts +4 -4
  70. package/data/models/shipping-method.d.ts +4 -4
  71. package/data/transforms/index.d.ts +6 -1
  72. package/data/transforms/{transform-address.d.ts → transform-cart-address.d.ts} +12 -13
  73. package/data/transforms/transform-cart.d.ts +1 -1
  74. package/data/transforms/transform-country.d.ts +8 -0
  75. package/data/transforms/transform-negotiable-quote.d.ts +7 -0
  76. package/data/transforms/transform-payment-methods.d.ts +1 -1
  77. package/data/transforms/transform-quote-address.d.ts +75 -0
  78. package/data/transforms/transform-region.d.ts +8 -0
  79. package/fragments.js +126 -43
  80. package/fragments.js.map +1 -1
  81. package/lib/enqueueRequest.d.ts +1 -0
  82. package/lib/errors/classifiers.d.ts +36 -0
  83. package/lib/errors/customErrors.d.ts +39 -0
  84. package/lib/errors/index.d.ts +20 -0
  85. package/lib/errors/mapErrorToCode.d.ts +4 -0
  86. package/lib/index.d.ts +1 -1
  87. package/lib/state.d.ts +1 -0
  88. package/package.json +1 -1
  89. package/render.js +1 -1
  90. package/render.js.map +1 -1
  91. package/tests/constants.d.ts +1 -0
  92. package/tests/fixtures/fragments/cart.d.ts +1 -2
  93. package/chunks/ServerErrorSignal.js +0 -4
  94. package/chunks/ServerErrorSignal.js.map +0 -1
  95. package/chunks/errors.js +0 -14
  96. package/chunks/errors.js.map +0 -1
  97. package/errors/errors.d.ts +0 -30
@@ -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
@@ -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,9 +14,9 @@
14
14
  * is strictly forbidden unless prior written permission is obtained
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
- /**
18
- * A function which can be attached to fetchGraphQL to handle thrown errors in
19
- * a generic way.
20
- */
21
- export declare const handleNetworkError: (error: Error) => never;
22
- //# sourceMappingURL=network-error.d.ts.map
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
@@ -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 declare const serverErrorSignal: import('@preact/signals-core').Signal<string | undefined>;
18
- //# sourceMappingURL=ServerErrorSignal.d.ts.map
17
+ export declare const getNegotiableQuoteQuery: string;
18
+ //# sourceMappingURL=getNegotiableQuote.graphql.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 './errors';
17
+ export * from './getNegotiableQuote.graphql';
18
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
@@ -15,5 +15,5 @@
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
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";
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 country {\n code\n label\n }\n firstname\n lastname\n company\n postcode\n region {\n region_id\n code\n label\n }\n street\n telephone\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
@@ -16,4 +16,4 @@
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
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
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
@@ -20,6 +20,7 @@ export * from './fetch-graphql';
20
20
  export * from './getCart';
21
21
  export * from './getCheckoutAgreements';
22
22
  export * from './getCustomer';
23
+ export * from './getNegotiableQuote';
23
24
  export * from './getStoreConfig';
24
25
  export * from './initialize';
25
26
  export * from './initializeCheckout';
@@ -27,10 +28,13 @@ export * from './isEmailAvailable';
27
28
  export * from './resetCheckout';
28
29
  export * from './setBillingAddress';
29
30
  export * from './setGuestEmailOnCart';
31
+ export * from './setNegotiableQuoteBillingAddress';
32
+ export * from './setNegotiableQuotePaymentMethod';
33
+ export * from './setNegotiableQuoteShippingAddress';
34
+ export * from './setNegotiableQuoteShippingMethods';
30
35
  export * from './setPaymentMethod';
31
36
  export * from './setShippingAddress';
32
37
  export * from './setShippingMethods';
33
38
  export * from './synchronizeCheckout';
34
- export * from '../errors';
35
39
  export { getStoreConfigCache } from '../lib/state';
36
40
  //# sourceMappingURL=index.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 './setNegotiableQuoteBillingAddress.graphql';
18
+ //# sourceMappingURL=index.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 setNegotiableQuoteBillingAddressMutation: string;
18
+ //# sourceMappingURL=setNegotiableQuoteBillingAddress.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 './setNegotiableQuoteBillingAddress';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { SetNegotiableQuoteBillingAddressInput } from '../../__generated__/types';
2
+
3
+ type NegotiableQuoteBillingAddressInput = SetNegotiableQuoteBillingAddressInput['billing_address'];
4
+ export declare const setNegotiableQuoteBillingAddress: (billingAddressInput: NegotiableQuoteBillingAddressInput) => Promise<import('../../data/models/quote').NegotiableQuote | null>;
5
+ export {};
6
+ //# sourceMappingURL=setNegotiableQuoteBillingAddress.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 './setNegotiableQuotePaymentMethod.graphql';
18
+ //# sourceMappingURL=index.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 setNegotiableQuotePaymentMethodMutation: string;
18
+ //# sourceMappingURL=setNegotiableQuotePaymentMethod.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 { setNegotiableQuotePaymentMethod } from './setNegotiableQuotePaymentMethod';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { SetNegotiableQuotePaymentMethodInput } from '../../__generated__/types';
2
+
3
+ type PaymentMethodInput = SetNegotiableQuotePaymentMethodInput['payment_method'];
4
+ export declare const setNegotiableQuotePaymentMethod: (paymentMethodInput: PaymentMethodInput) => Promise<import('../../data/models/quote').NegotiableQuote | null>;
5
+ export {};
6
+ //# sourceMappingURL=setNegotiableQuotePaymentMethod.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 './setNegotiableQuoteShippingAddress.graphql';
18
+ //# sourceMappingURL=index.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 setNegotiableQuoteShippingAddressMutation: string;
18
+ //# sourceMappingURL=setNegotiableQuoteShippingAddress.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 './setNegotiableQuoteShippingAddress';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { SetNegotiableQuoteShippingAddressInput } from '../../__generated__/types';
2
+
3
+ type NegotiableQuoteShippingAddressInput = SetNegotiableQuoteShippingAddressInput['shipping_addresses'];
4
+ export declare const setNegotiableQuoteShippingAddress: (shippingAddressInput: NegotiableQuoteShippingAddressInput) => Promise<import('../../data/models/quote').NegotiableQuote | null>;
5
+ export {};
6
+ //# sourceMappingURL=setNegotiableQuoteShippingAddress.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 './setNegotiableQuoteShippingMethods.graphql';
18
+ //# sourceMappingURL=index.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 setNegotiableQuoteShippingMethodsMutation: string;
18
+ //# sourceMappingURL=setNegotiableQuoteShippingMethods.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 { setNegotiableQuoteShippingMethods } from './setNegotiableQuoteShippingMethods';
18
+ //# sourceMappingURL=index.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 setNegotiableQuoteShippingMethods: (shippingMethodsInput: import('../../__generated__/types').InputMaybe<import('../../__generated__/types').ShippingMethodInput>[]) => Promise<import('../../data/models/quote').NegotiableQuote | null>;
18
+ //# sourceMappingURL=setNegotiableQuoteShippingMethods.d.ts.map
package/api.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{t as v,a as N,b as $}from"./chunks/synchronizeCheckout.js";import{d as se,c as ie,g as re,i as ae,e as ne,r as oe,s as de}from"./chunks/synchronizeCheckout.js";import{s as h,M as E,b as U,d as g,Q as M,c as b}from"./chunks/errors.js";import{D as ce,F as he,I as ge,o as me,m as le,n as _e,S as ue,U as Ae,j as fe,k as Se,l as Ce,g as Ee,r as Me,e as Ie,f as Te,i as ye}from"./chunks/errors.js";import"@dropins/tools/lib.js";import{t as F,a as S}from"./chunks/setShippingMethods.js";import{s as xe}from"./chunks/setShippingMethods.js";import{events as C}from"@dropins/tools/event-bus.js";import{g as I}from"./chunks/values.js";import{A as w}from"./chunks/checkout.js";import{g as ve,i as Ne,s as $e}from"./chunks/setGuestEmailOnCart.js";import{s as be}from"./chunks/setBillingAddress.js";import{s as we}from"./chunks/setPaymentMethod.js";import{CHECKOUT_DATA_FRAGMENT as T}from"./fragments.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";const k=`
3
+ import{t as U,a as q,b as B,d as D,e as F,f as R,g as x,h as P}from"./chunks/synchronizeCheckout.js";import{i as qe,c as Qe,j as Te,k as Ce,l as we,r as $e,s as ve}from"./chunks/synchronizeCheckout.js";import{s as n,M as Q,b as k,d as r,Q as c,U as H,c as g,e as L,f as A,g as K}from"./chunks/fetch-graphql.js";import{D as Oe,S as Ue,m as Be,n as De,o as Fe,i as Re,r as xe,j as Pe,k as ke,l as He}from"./chunks/fetch-graphql.js";import{events as S}from"@dropins/tools/event-bus.js";import{g as T}from"./chunks/values.js";import"@dropins/tools/lib.js";import{t as z,a as E}from"./chunks/setShippingMethods.js";import{s as Ke}from"./chunks/setShippingMethods.js";import{A as V}from"./chunks/checkout.js";import{g as Ve,i as je,s as Ye}from"./chunks/setGuestEmailOnCart.js";import{NEGOTIABLE_QUOTE_FRAGMENT as l,CHECKOUT_DATA_FRAGMENT as C}from"./fragments.js";import{s as We}from"./chunks/setBillingAddress.js";import{s as Ze}from"./chunks/setPaymentMethod.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";const j=`
4
4
  mutation estimateShippingMethods(
5
5
  $cartId: String!
6
6
  $address: EstimateAddressInput!
@@ -26,7 +26,7 @@ import{t as v,a as N,b as $}from"./chunks/synchronizeCheckout.js";import{d as se
26
26
  error_message
27
27
  }
28
28
  }
29
- `,D=t=>t?t.filter(e=>!!e).map(e=>({id:e.agreement_id,name:e.name,mode:w[e.mode],text:e.checkbox_text,content:{value:e.content,html:e.is_html,height:e.content_height??null}})):[],W=async t=>{var m,l,_,u;const e=h.cartId,a=((m=t==null?void 0:t.criteria)==null?void 0:m.country_code)??((l=h.config)==null?void 0:l.defaultCountry);if(!e)throw new E;if(!a)throw new U;const{region_id:s,region_name:p,zip:n}=(t==null?void 0:t.criteria)??{},i=s||p?{region_id:typeof s=="string"?parseInt(s,10):s,region_code:p}:void 0,d={country_code:a,...n&&{postcode:n},...i&&{region:{...i.region_id&&{region_id:i.region_id},...i.region_code&&{region_code:i.region_code}}}},c={country_id:a,region:(_=d.region)==null?void 0:_.region_code,region_id:(u=d.region)==null?void 0:u.region_id,postcode:n},y=S(c);return g({options:{variables:{cartId:e,address:d}},path:"estimateShippingMethods",query:k,queueName:M.ShippingEstimate,transformer:v,type:"mutation"}).then(r=>{const O=r.length>0,x=S(c);let A=null;if(O){const o=I("selectedShippingMethod"),G=r.find(f=>f.code===(o==null?void 0:o.code)&&f.carrier.code===(o==null?void 0:o.carrier.code));A=F(G??r[0])}return C.emit("shipping/estimate",{address:x,availableShippingMethods:r,shippingMethod:A,success:!0}),r}).catch(r=>{throw C.emit("shipping/estimate",{address:y,shippingMethod:null,availableShippingMethods:[],success:!1}),r})},H=`
29
+ `,w=e=>{const t=e.street.filter(Boolean);return{city:e.city,company:e.company||void 0,country:D(e.country),firstName:e.firstname,lastName:e.lastname,postCode:e.postcode||void 0,region:B(e.region),street:t,telephone:e.telephone||void 0}},Y=e=>{if(e)return w(e)},J=e=>e.filter(t=>!!t).map(t=>{const{available_shipping_methods:s,selected_shipping_method:i,...o}=t;return{...w(o),availableShippingMethods:q(s),selectedShippingMethod:U(i)}}),W=e=>e?e.filter(t=>!!t).map(t=>({id:t.agreement_id,name:t.name,mode:V[t.mode],text:t.checkbox_text,content:{value:t.content,html:t.is_html,height:t.content_height??null}})):[],m=e=>e?{availablePaymentMethods:R(e.available_payment_methods),billingAddress:Y(e.billing_address),email:e.email??"",isVirtual:e.is_virtual,name:e.name,selectedPaymentMethod:F(e.selected_payment_method),shippingAddresses:J(e.shipping_addresses),status:e.status,uid:e.uid}:null,_e=async e=>{var f,y,I,M;const t=n.cartId,s=((f=e==null?void 0:e.criteria)==null?void 0:f.country_code)??((y=n.config)==null?void 0:y.defaultCountry);if(!t)throw new Q;if(!s)throw new k;const{region_id:i,region_name:o,zip:a}=(e==null?void 0:e.criteria)??{},d=i||o?{region_id:typeof i=="string"?parseInt(i,10):i,region_code:o}:void 0,h={country_code:s,...a&&{postcode:a},...d&&{region:{...d.region_id&&{region_id:d.region_id},...d.region_code&&{region_code:d.region_code}}}},_={country_id:s,region:(I=h.region)==null?void 0:I.region_code,region_id:(M=h.region)==null?void 0:M.region_id,postcode:a},$=E(_);return r({options:{variables:{cartId:t,address:h}},path:"estimateShippingMethods",query:j,queueName:c.ShippingEstimate,transformer:q,type:"mutation"}).then(p=>{const v=p.length>0,G=E(_);let b=null;if(v){const u=T("selectedShippingMethod"),O=p.find(N=>N.code===(u==null?void 0:u.code)&&N.carrier.code===(u==null?void 0:u.carrier.code));b=z(O??p[0])}return S.emit("shipping/estimate",{address:G,availableShippingMethods:p,shippingMethod:b,success:!0}),p}).catch(p=>{throw S.emit("shipping/estimate",{address:$,shippingMethod:null,availableShippingMethods:[],success:!1}),p})},X=`
30
30
  query GET_CHECKOUT_AGREEMENTS {
31
31
  checkoutAgreements {
32
32
  agreement_id
@@ -38,7 +38,78 @@ import{t as v,a as N,b as $}from"./chunks/synchronizeCheckout.js";import{d as se
38
38
  name
39
39
  }
40
40
  }
41
- `,X=async()=>await g({defaultValueOnFail:[],options:{method:"GET",cache:"no-cache"},path:"checkoutAgreements",query:H,transformer:D,type:"query"}),R=`
41
+ `,Ae=async()=>await r({defaultValueOnFail:[],options:{method:"GET",cache:"no-cache"},path:"checkoutAgreements",query:X,transformer:W,type:"query"}),Z=`
42
+ query getNegotiableQuote($quoteId: ID!) {
43
+ negotiableQuote(uid: $quoteId) {
44
+ ...NEGOTIABLE_QUOTE_FRAGMENT
45
+ }
46
+ }
47
+
48
+ ${l}
49
+ `,fe=async(e={})=>{const t=e.uid??n.quoteId;if(n.authenticated===!1)throw new H;if(!t)throw new g;return await r({type:"query",query:Z,options:{method:"GET",cache:"no-cache",variables:{quoteId:t||""}},path:"negotiableQuote",transformer:m})},ee=`
50
+ mutation setNegotiableQuoteBillingAddress(
51
+ $quoteId: ID!
52
+ $billingAddressInput: NegotiableQuoteBillingAddressInput!
53
+ ) {
54
+ setNegotiableQuoteBillingAddress(
55
+ input: { quote_uid: $quoteId, billing_address: $billingAddressInput }
56
+ ) {
57
+ quote {
58
+ ...NEGOTIABLE_QUOTE_FRAGMENT
59
+ }
60
+ }
61
+ }
62
+
63
+ ${l}
64
+ `,ye=async e=>{const t=n.quoteId;if(!t)throw new g;const{customer_address_uid:s,address:i}=e;if(!s&&!i)throw new L("Negotiable quote billing address");return await r({type:"mutation",query:ee,options:{variables:{quoteId:t,billingAddressInput:e}},path:"setNegotiableQuoteBillingAddress.quote",queueName:c.QuoteUpdates,transformer:m})},te=`
65
+ mutation setNegotiableQuotePaymentMethod(
66
+ $quoteId: ID!
67
+ $paymentMethodInput: NegotiableQuotePaymentMethodInput!
68
+ ) {
69
+ setNegotiableQuotePaymentMethod(
70
+ input: { quote_uid: $quoteId, payment_method: $paymentMethodInput }
71
+ ) {
72
+ quote {
73
+ ...NEGOTIABLE_QUOTE_FRAGMENT
74
+ }
75
+ }
76
+ }
77
+
78
+ ${l}
79
+ `,Ie=async e=>{const t=n.quoteId;if(!t)throw new g;return await r({type:"mutation",query:te,queueName:c.QuoteUpdates,options:{variables:{quoteId:t,paymentMethodInput:e}},path:"setNegotiableQuotePaymentMethod.quote",transformer:m})},se=`
80
+ mutation setNegotiableQuoteShippingAddress(
81
+ $quoteId: ID!
82
+ $shippingAddressInput: NegotiableQuoteShippingAddressInput!
83
+ ) {
84
+ setNegotiableQuoteShippingAddress(
85
+ input: {
86
+ quote_uid: $quoteId
87
+ shipping_addresses: [$shippingAddressInput]
88
+ }
89
+ ) {
90
+ quote {
91
+ ...NEGOTIABLE_QUOTE_FRAGMENT
92
+ }
93
+ }
94
+ }
95
+
96
+ ${l}
97
+ `,Me=async e=>{const t=n.quoteId;if(!t)throw new g;if(!e||e.length===0)throw new A;const s=Array.isArray(e)?e[0]:e;if(!s)throw new A;const{customer_address_uid:i,address:o}=s;if(!i&&!o)throw new A;return await r({type:"mutation",query:se,options:{variables:{quoteId:t,shippingAddressInput:e}},path:"setNegotiableQuoteShippingAddress.quote",queueName:c.QuoteUpdates,transformer:m})},ie=`
98
+ mutation setNegotiableQuoteShippingMethods(
99
+ $quoteId: ID!
100
+ $shippingMethodsInput: [ShippingMethodInput]!
101
+ ) {
102
+ setNegotiableQuoteShippingMethods(
103
+ input: { quote_uid: $quoteId, shipping_methods: $shippingMethodsInput }
104
+ ) {
105
+ quote {
106
+ ...NEGOTIABLE_QUOTE_FRAGMENT
107
+ }
108
+ }
109
+ }
110
+
111
+ ${l}
112
+ `,be=async e=>{const t=n.quoteId;if(!t)throw new g;if(!e||e.length===0)throw new K;return await r({type:"mutation",query:ie,queueName:c.QuoteUpdates,options:{variables:{quoteId:t,shippingMethodsInput:e}},path:"setNegotiableQuoteShippingMethods.quote",transformer:m})},oe=`
42
113
  mutation setShippingAddress(
43
114
  $cartId: String!
44
115
  $shippingAddressInput: ShippingAddressInput!
@@ -52,8 +123,8 @@ import{t as v,a as N,b as $}from"./chunks/synchronizeCheckout.js";import{d as se
52
123
  }
53
124
  }
54
125
 
55
- ${T}
56
- `,B=`
126
+ ${C}
127
+ `,ne=`
57
128
  mutation SET_SHIPPING_ADDRESS_ON_CART_AND_USE_AS_BILLING_MUTATION(
58
129
  $cartId: String!
59
130
  $shippingAddressInput: ShippingAddressInput!
@@ -75,6 +146,6 @@ import{t as v,a as N,b as $}from"./chunks/synchronizeCheckout.js";import{d as se
75
146
  }
76
147
  }
77
148
 
78
- ${T}
79
- `,Z=async({address:t,customerAddressId:e,pickupLocationCode:a})=>{const s=h.cartId;if(!s)throw new E;const p=()=>{if(e)return{customer_address_id:e};if(a)return{pickup_location_code:a};if(!t)throw new b;return{address:N(t)}},n=I("isBillToShipping"),i=n?B:R,d=n?"setBillingAddressOnCart.cart":"setShippingAddressesOnCart.cart",c={cartId:s,shippingAddressInput:p()};return await g({type:"mutation",query:i,options:{variables:c},path:d,queueName:M.CartUpdate,transformer:$})};export{ce as DEFAULT_COUNTRY,he as FetchError,ge as InvalidArgument,me as MissingBillingAddress,E as MissingCart,U as MissingCountry,le as MissingEmail,_e as MissingPaymentMethod,b as MissingShippinghAddress,ue as STORE_CONFIG_DEFAULTS,Ae as UnexpectedError,se as authenticateCustomer,ie as config,W as estimateShippingMethods,fe as fetchGraphQl,re as getCart,X as getCheckoutAgreements,Se as getConfig,ve as getCustomer,Ce as getStoreConfig,Ee as getStoreConfigCache,ae as initialize,ne as initializeCheckout,Ne as isEmailAvailable,Me as removeFetchGraphQlHeader,oe as resetCheckout,be as setBillingAddress,Ie as setEndpoint,Te as setFetchGraphQlHeader,ye as setFetchGraphQlHeaders,$e as setGuestEmailOnCart,we as setPaymentMethod,Z as setShippingAddress,xe as setShippingMethodsOnCart,de as synchronizeCheckout};
149
+ ${C}
150
+ `,Ne=async({address:e,customerAddressId:t,pickupLocationCode:s})=>{const i=n.cartId;if(!i)throw new Q;const o=()=>{if(t)return{customer_address_id:t};if(s)return{pickup_location_code:s};if(!e)throw new A;return{address:x(e)}},a=T("isBillToShipping"),d=a?ne:oe,h=a?"setBillingAddressOnCart.cart":"setShippingAddressesOnCart.cart",_={cartId:i,shippingAddressInput:o()};return await r({type:"mutation",query:d,options:{variables:_},path:h,queueName:c.CartUpdate,transformer:P})};export{Oe as DEFAULT_COUNTRY,Ue as STORE_CONFIG_DEFAULTS,qe as authenticateCustomer,Qe as config,_e as estimateShippingMethods,Be as fetchGraphQl,Te as getCart,Ae as getCheckoutAgreements,De as getConfig,Ve as getCustomer,fe as getNegotiableQuote,Fe as getStoreConfig,Re as getStoreConfigCache,Ce as initialize,we as initializeCheckout,je as isEmailAvailable,xe as removeFetchGraphQlHeader,$e as resetCheckout,We as setBillingAddress,Pe as setEndpoint,ke as setFetchGraphQlHeader,He as setFetchGraphQlHeaders,Ye as setGuestEmailOnCart,ye as setNegotiableQuoteBillingAddress,Ie as setNegotiableQuotePaymentMethod,Me as setNegotiableQuoteShippingAddress,be as setNegotiableQuoteShippingMethods,Ze as setPaymentMethod,Ne as setShippingAddress,Ke as setShippingMethodsOnCart,ve as synchronizeCheckout};
80
151
  //# sourceMappingURL=api.js.map