@dropins/storefront-checkout 2.0.1 → 2.1.0-alpha1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/fragments.d.ts +4 -1
- package/api/getNegotiableQuote/getNegotiableQuote.d.ts +22 -0
- package/api/getNegotiableQuote/graphql/getNegotiableQuote.graphql.d.ts +18 -0
- package/{errors → api/getNegotiableQuote/graphql}/index.d.ts +2 -2
- package/{signals → api/getNegotiableQuote}/index.d.ts +2 -2
- package/api/getStoreConfig/getStoreConfig.d.ts +1 -0
- package/api/graphql/CartAddressFragment.graphql.d.ts +2 -2
- package/api/graphql/NegotiableQuoteAddressFragment.graphql.d.ts +19 -0
- package/api/graphql/NegotiableQuoteFragment.graphql.d.ts +18 -0
- package/api/graphql/{CartPaymentMethodFragment.graphql.d.ts → PaymentMethodFragment.graphql.d.ts} +1 -1
- package/api/graphql/ShippingMethodFragment.graphql.d.ts +19 -0
- package/api/index.d.ts +1 -2
- package/api/initialize/initialize.d.ts +3 -0
- package/api/initializeCheckout/initializeCheckout.d.ts +2 -2
- package/api/setBillingAddress/graphql/index.d.ts +19 -0
- package/api/{setPaymentMethod/graphql/setPaymentMethod.graphql.d.ts → setBillingAddress/graphql/setBillingAddressOnCartMutation.graphql.d.ts} +2 -2
- package/api/setBillingAddress/graphql/setBillingAddressOnQuoteMutation.graphql.d.ts +18 -0
- package/api/setBillingAddress/setBillingAddress.d.ts +2 -2
- package/api/setPaymentMethod/graphql/index.d.ts +19 -0
- package/api/{setBillingAddress/graphql/setBillingAddress.graphql.d.ts → setPaymentMethod/graphql/setPaymentMethodOnCart.graphql.d.ts} +2 -2
- package/api/setPaymentMethod/graphql/setPaymentMethodOnQuote.graphql.d.ts +18 -0
- package/api/setPaymentMethod/setPaymentMethod.d.ts +2 -2
- package/api/setShippingAddress/graphql/index.d.ts +21 -0
- package/api/setShippingAddress/graphql/{setShippingAddressAndUseAsBilling.graphql.d.ts → setShippingAddressOnCartAndUseAsBillingMutation.graphql.d.ts} +2 -2
- package/api/setShippingAddress/graphql/{setShippingAddress.graphql.d.ts → setShippingAddressOnCartMutation.graphql.d.ts} +2 -2
- package/api/setShippingAddress/graphql/setShippingAddressOnQuote.graphql.d.ts +18 -0
- package/api/setShippingAddress/graphql/setShippingAddressOnQuoteAndUseAsBillingMutation.graphql.d.ts +18 -0
- package/api/setShippingAddress/setShippingAddress.d.ts +1 -1
- package/api/setShippingMethods/graphql/index.d.ts +19 -0
- package/api/setShippingMethods/graphql/setShippingMethodsOnCart.graphql.d.ts +1 -1
- package/api/setShippingMethods/graphql/setShippingMethodsOnQuote.graphql.d.ts +18 -0
- package/api/setShippingMethods/index.d.ts +1 -0
- package/api/setShippingMethods/setShippingMethods.d.ts +3 -17
- package/api/synchronizeCheckout/synchronizeCheckout.d.ts +2 -2
- package/api.js +2 -66
- package/api.js.map +1 -1
- package/chunks/ConditionalWrapper.js +1 -1
- package/chunks/ConditionalWrapper.js.map +1 -1
- package/chunks/checkout.js.map +1 -1
- package/chunks/dom.js.map +1 -1
- package/chunks/events.js +4 -0
- package/chunks/events.js.map +1 -0
- package/chunks/events2.js +4 -0
- package/chunks/events2.js.map +1 -0
- package/chunks/fetch-graphql.js +14 -0
- package/chunks/fetch-graphql.js.map +1 -0
- package/chunks/guards.js +4 -0
- package/chunks/guards.js.map +1 -0
- package/chunks/setBillingAddress.js +25 -5
- package/chunks/setBillingAddress.js.map +1 -1
- package/chunks/setGuestEmailOnCart.js +3 -3
- package/chunks/setGuestEmailOnCart.js.map +1 -1
- package/chunks/setPaymentMethod.js +21 -6
- package/chunks/setPaymentMethod.js.map +1 -1
- package/chunks/setShippingAddress.js +109 -0
- package/chunks/setShippingAddress.js.map +1 -0
- package/chunks/setShippingMethods.js +19 -4
- package/chunks/setShippingMethods.js.map +1 -1
- package/chunks/synchronizeCheckout.js +11 -3
- package/chunks/synchronizeCheckout.js.map +1 -1
- package/chunks/transform-shipping-estimate.js +4 -0
- package/chunks/transform-shipping-estimate.js.map +1 -0
- package/chunks/transform-shipping-methods.js +4 -0
- package/chunks/transform-shipping-methods.js.map +1 -0
- package/chunks/values.js +1 -1
- package/chunks/values.js.map +1 -1
- package/components/AddressValidation/AddressValidation.d.ts +14 -0
- package/components/AddressValidation/index.d.ts +19 -0
- package/components/PaymentMethods/PaymentMethods.d.ts +1 -1
- package/components/ShippingMethods/ShippingMethods.d.ts +1 -1
- package/components/index.d.ts +1 -0
- package/containers/AddressValidation/AddressValidation.d.ts +12 -0
- package/containers/AddressValidation/index.d.ts +19 -0
- package/containers/AddressValidation.d.ts +3 -0
- package/containers/AddressValidation.js +4 -0
- package/containers/AddressValidation.js.map +1 -0
- package/containers/BillToShippingAddress.js +1 -1
- package/containers/BillToShippingAddress.js.map +1 -1
- package/containers/EstimateShipping.js +1 -1
- package/containers/EstimateShipping.js.map +1 -1
- package/containers/LoginForm/LoginForm.d.ts +1 -1
- package/containers/LoginForm.js +1 -1
- package/containers/LoginForm.js.map +1 -1
- package/containers/OutOfStock.js +1 -1
- package/containers/OutOfStock.js.map +1 -1
- package/containers/PaymentMethods/PaymentMethods.d.ts +1 -2
- package/containers/PaymentMethods.js +1 -1
- package/containers/PaymentMethods.js.map +1 -1
- package/containers/PlaceOrder.js +1 -1
- package/containers/PlaceOrder.js.map +1 -1
- package/containers/ServerError.js +1 -1
- package/containers/ServerError.js.map +1 -1
- package/containers/ShippingMethods/ShippingMethods.d.ts +1 -2
- package/containers/ShippingMethods.js +1 -1
- package/containers/ShippingMethods.js.map +1 -1
- package/containers/TermsAndConditions.js +1 -1
- package/containers/TermsAndConditions.js.map +1 -1
- package/containers/index.d.ts +1 -0
- package/data/models/address.d.ts +11 -6
- package/data/models/api.d.ts +23 -10
- package/data/models/cart.d.ts +7 -7
- package/data/models/checkout.d.ts +14 -0
- package/data/models/country.d.ts +1 -1
- package/data/models/index.d.ts +2 -1
- package/data/models/{price.d.ts → money.d.ts} +2 -2
- package/data/models/quote.d.ts +16 -0
- package/data/models/shipping-estimate.d.ts +4 -4
- package/data/models/shipping-method.d.ts +4 -4
- package/data/models/values.d.ts +1 -1
- package/data/transforms/index.d.ts +8 -1
- package/data/transforms/transform-api.d.ts +12 -0
- package/data/transforms/{transform-address.d.ts → transform-cart-address.d.ts} +39 -43
- package/data/transforms/transform-cart.d.ts +1 -1
- package/data/transforms/transform-country.d.ts +8 -0
- package/data/transforms/transform-custom-attributes.d.ts +5 -0
- package/data/transforms/transform-negotiable-quote.d.ts +7 -0
- package/data/transforms/transform-payment-methods.d.ts +1 -1
- package/data/transforms/transform-quote-address.d.ts +88 -0
- package/data/transforms/transform-region.d.ts +8 -0
- package/fragments.js +180 -71
- package/fragments.js.map +1 -1
- package/i18n/en_US.json.d.ts +6 -0
- package/lib/enqueueRequest.d.ts +2 -2
- package/lib/errors/classifiers.d.ts +36 -0
- package/lib/errors/customErrors.d.ts +42 -0
- package/lib/errors/index.d.ts +20 -0
- package/lib/errors/mapErrorToCode.d.ts +4 -0
- package/lib/events.d.ts +3 -2
- package/lib/guards.d.ts +18 -0
- package/lib/index.d.ts +2 -2
- package/lib/state.d.ts +5 -3
- package/lib/utils/api.d.ts +16 -0
- package/lib/utils/events.d.ts +10 -0
- package/lib/utils/forms.d.ts +5 -0
- package/lib/utils/fragments.d.ts +19 -0
- package/lib/utils/index.d.ts +24 -0
- package/lib/utils/meta.d.ts +19 -0
- package/lib/utils/transformers.d.ts +6 -0
- package/lib/utils.d.ts +1 -0
- package/lib/utils.js +4 -0
- package/lib/utils.js.map +1 -0
- package/package.json +1 -1
- package/render.js +3 -3
- package/render.js.map +1 -1
- package/tests/constants.d.ts +1 -0
- package/tests/fixtures/fragments/cart.d.ts +43 -42
- package/tests/fixtures/fragments/shipping-address.d.ts +2 -1
- package/tests/fixtures/models/index.d.ts +1 -1
- package/tests/fixtures/models/quote.d.ts +9 -0
- package/types/api.d.ts +6 -0
- package/types/{TitleProps.d.ts → components.d.ts} +2 -1
- package/types/guards.d.ts +5 -0
- package/types/index.d.ts +21 -0
- package/types/storefront.d.ts +165 -0
- package/chunks/ServerErrorSignal.js +0 -4
- package/chunks/ServerErrorSignal.js.map +0 -1
- package/chunks/errors.js +0 -14
- package/chunks/errors.js.map +0 -1
- package/errors/errors.d.ts +0 -30
- package/lib/network-error.d.ts +0 -22
- package/signals/ServerErrorSignal.d.ts +0 -18
- package/types/ComponentTypes.d.ts +0 -18
- /package/lib/{dom.d.ts → utils/dom.d.ts} +0 -0
package/api/fragments.d.ts
CHANGED
|
@@ -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,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
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ADOBE CONFIDENTIAL
|
|
3
3
|
* __________________
|
|
4
4
|
*
|
|
5
|
-
* Copyright
|
|
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 './
|
|
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
|
|
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 './
|
|
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
|
|
18
|
-
export declare const SHIPPING_CART_ADDRESS_FRAGMENT
|
|
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
|
package/api/graphql/{CartPaymentMethodFragment.graphql.d.ts → PaymentMethodFragment.graphql.d.ts}
RENAMED
|
@@ -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=
|
|
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';
|
|
@@ -31,6 +32,4 @@ export * from './setPaymentMethod';
|
|
|
31
32
|
export * from './setShippingAddress';
|
|
32
33
|
export * from './setShippingMethods';
|
|
33
34
|
export * from './synchronizeCheckout';
|
|
34
|
-
export * from '../errors';
|
|
35
|
-
export { getStoreConfigCache } from '../lib/state';
|
|
36
35
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -3,6 +3,9 @@ import { Lang } from '@dropins/tools/types/elsie/src/i18n';
|
|
|
3
3
|
import { Initializer, Model } from '@dropins/tools/types/elsie/src/lib';
|
|
4
4
|
|
|
5
5
|
export type ConfigProps = {
|
|
6
|
+
defaults?: {
|
|
7
|
+
isBillToShipping?: boolean;
|
|
8
|
+
};
|
|
6
9
|
langDefinitions?: Lang;
|
|
7
10
|
models?: {
|
|
8
11
|
CartModel?: Model<CartModel>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InitializeInput } from '../../types';
|
|
2
2
|
|
|
3
|
-
export declare const initializeCheckout: (
|
|
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
|
|
18
|
-
//# sourceMappingURL=
|
|
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: (
|
|
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
|
|
18
|
-
//# sourceMappingURL=
|
|
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 {
|
|
1
|
+
import { PaymentMethodInput as PaymentMethodInputModel } from '../../data/models';
|
|
2
2
|
|
|
3
|
-
export declare const setPaymentMethod: (
|
|
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
|
|
18
|
-
//# sourceMappingURL=
|
|
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
|
|
18
|
-
//# sourceMappingURL=
|
|
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
|
package/api/setShippingAddress/graphql/setShippingAddressOnQuoteAndUseAsBillingMutation.graphql.d.ts
ADDED
|
@@ -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: (
|
|
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
|
|
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
|
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 {
|
|
1
|
+
import { SynchronizeInput } from '../../types';
|
|
2
2
|
|
|
3
|
-
export declare const synchronizeCheckout: (
|
|
3
|
+
export declare const synchronizeCheckout: (data: SynchronizeInput) => Promise<void>;
|
|
4
4
|
//# sourceMappingURL=synchronizeCheckout.d.ts.map
|
package/api.js
CHANGED
|
@@ -1,32 +1,6 @@
|
|
|
1
1
|
/*! Copyright 2025 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{
|
|
4
|
-
mutation estimateShippingMethods(
|
|
5
|
-
$cartId: String!
|
|
6
|
-
$address: EstimateAddressInput!
|
|
7
|
-
) {
|
|
8
|
-
estimateShippingMethods(input: { cart_id: $cartId, address: $address }) {
|
|
9
|
-
carrier_title
|
|
10
|
-
carrier_code
|
|
11
|
-
method_title
|
|
12
|
-
method_code
|
|
13
|
-
available
|
|
14
|
-
amount {
|
|
15
|
-
currency
|
|
16
|
-
value
|
|
17
|
-
}
|
|
18
|
-
price_excl_tax {
|
|
19
|
-
currency
|
|
20
|
-
value
|
|
21
|
-
}
|
|
22
|
-
price_incl_tax {
|
|
23
|
-
currency
|
|
24
|
-
value
|
|
25
|
-
}
|
|
26
|
-
error_message
|
|
27
|
-
}
|
|
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=`
|
|
3
|
+
import{a as A,c as x,g as G,b as S,i as T,d as k,r as O,s as y}from"./chunks/synchronizeCheckout.js";import{e as M,s as b}from"./chunks/setShippingAddress.js";import{d as s}from"./chunks/fetch-graphql.js";import{D as N,S as Q,f as U,g as R,i as q,j as v,r as z,b as D,c as K,e as L}from"./chunks/fetch-graphql.js";import"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";import{A as o}from"./chunks/checkout.js";import{g as w,i as B,s as I}from"./chunks/setGuestEmailOnCart.js";import{s as V}from"./chunks/setBillingAddress.js";import{s as J}from"./chunks/setPaymentMethod.js";import{s as X,s as Z}from"./chunks/setShippingMethods.js";import"./fragments.js";import"./chunks/transform-shipping-methods.js";import"./chunks/values.js";import"./chunks/transform-shipping-estimate.js";import"./chunks/guards.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";const r=t=>t?t.filter(e=>!!e).map(e=>({id:e.agreement_id,name:e.name,mode:o[e.mode],text:e.checkbox_text,content:{value:e.content,html:e.is_html,height:e.content_height??null}})):[],a=`
|
|
30
4
|
query GET_CHECKOUT_AGREEMENTS {
|
|
31
5
|
checkoutAgreements {
|
|
32
6
|
agreement_id
|
|
@@ -38,43 +12,5 @@ import{t as v,a as N,b as $}from"./chunks/synchronizeCheckout.js";import{d as se
|
|
|
38
12
|
name
|
|
39
13
|
}
|
|
40
14
|
}
|
|
41
|
-
`,
|
|
42
|
-
mutation setShippingAddress(
|
|
43
|
-
$cartId: String!
|
|
44
|
-
$shippingAddressInput: ShippingAddressInput!
|
|
45
|
-
) {
|
|
46
|
-
setShippingAddressesOnCart(
|
|
47
|
-
input: { cart_id: $cartId, shipping_addresses: [$shippingAddressInput] }
|
|
48
|
-
) {
|
|
49
|
-
cart {
|
|
50
|
-
...CHECKOUT_DATA_FRAGMENT
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
${T}
|
|
56
|
-
`,B=`
|
|
57
|
-
mutation SET_SHIPPING_ADDRESS_ON_CART_AND_USE_AS_BILLING_MUTATION(
|
|
58
|
-
$cartId: String!
|
|
59
|
-
$shippingAddressInput: ShippingAddressInput!
|
|
60
|
-
) {
|
|
61
|
-
setShippingAddressesOnCart(
|
|
62
|
-
input: { cart_id: $cartId, shipping_addresses: [$shippingAddressInput] }
|
|
63
|
-
) {
|
|
64
|
-
cart {
|
|
65
|
-
id
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
setBillingAddressOnCart(
|
|
70
|
-
input: { cart_id: $cartId, billing_address: { same_as_shipping: true } }
|
|
71
|
-
) {
|
|
72
|
-
cart {
|
|
73
|
-
...CHECKOUT_DATA_FRAGMENT
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
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};
|
|
15
|
+
`,f=async()=>await s({defaultValueOnFail:[],options:{method:"GET",cache:"no-cache"},path:"checkoutAgreements",query:a,transformer:r,type:"query"});export{N as DEFAULT_COUNTRY,Q as STORE_CONFIG_DEFAULTS,A as authenticateCustomer,x as config,M as estimateShippingMethods,U as fetchGraphQl,G as getCart,f as getCheckoutAgreements,R as getConfig,w as getCustomer,S as getNegotiableQuote,q as getStoreConfig,v as getStoreConfigCache,T as initialize,k as initializeCheckout,B as isEmailAvailable,z as removeFetchGraphQlHeader,O as resetCheckout,V as setBillingAddress,D as setEndpoint,K as setFetchGraphQlHeader,L as setFetchGraphQlHeaders,I as setGuestEmailOnCart,J as setPaymentMethod,b as setShippingAddress,X as setShippingMethods,Z as setShippingMethodsOnCart,y as synchronizeCheckout};
|
|
80
16
|
//# sourceMappingURL=api.js.map
|