@zonos/elements 1.3.157 → 1.3.159
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/dist/cjs/{cart-79deb872.js → cart-d9aa5af3.js} +287 -4
- package/dist/cjs/{getBorderRadius-d3032bda.js → getBorderRadius-d184b623.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{isDarkColor-9f6c3601.js → isDarkColor-08d92ed7.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{paypal-e79ca280.js → paypal-9908b383.js} +3 -3
- package/dist/cjs/zonos-address_8.cjs.entry.js +4 -4
- package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +9 -7
- package/dist/cjs/zonos-card.cjs.entry.js +2 -2
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +33 -15
- package/dist/cjs/zonos-checkout.cjs.entry.js +56 -6
- package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +12 -7
- package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -4
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +4 -4
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello.cjs.entry.js +4 -4
- package/dist/cjs/zonos-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +2 -2
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-toggle.cjs.entry.js +1 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-0b1d27df.js → zonosStore-7975e4b6.js} +4 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +24 -5
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +54 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +1 -1
- package/dist/collection/components/common/zonos-button/zonos-button.css +3 -9
- package/dist/collection/components/common/zonos-button/zonos-button.js +25 -3
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +2 -2
- package/dist/collection/components/main/zonos-controller.js +8 -3
- package/dist/collection/components/store/checkout/cart.js +13 -1
- package/dist/collection/components/store/checkout/stripe.js +32 -1
- package/dist/collection/components/store/translationStore/strings.arabic.js +12 -0
- package/dist/collection/components/store/translationStore/strings.base.js +12 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +12 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +12 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +12 -0
- package/dist/collection/components/store/translationStore/strings.french.js +12 -0
- package/dist/collection/components/store/translationStore/strings.german.js +12 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +12 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +12 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +12 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +12 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +12 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +12 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +12 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +12 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +12 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +12 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +12 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +12 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +12 -0
- package/dist/collection/components/store/zonosStore.js +4 -0
- package/dist/collection/types/generated/graphql.internal.types.js +70 -4
- package/dist/collection/types/index.js +1 -0
- package/dist/collection/types/utils/ZonosSettings.js +1 -0
- package/dist/esm/{cart-aee97bf4.js → cart-8afb3277.js} +287 -5
- package/dist/esm/{getBorderRadius-9e3ea1de.js → getBorderRadius-740610fb.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{isDarkColor-95f3ef90.js → isDarkColor-2f59d721.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{paypal-4ed46f2f.js → paypal-02c4e5d3.js} +3 -3
- package/dist/esm/zonos-address_8.entry.js +4 -4
- package/dist/esm/zonos-badge.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +9 -7
- package/dist/esm/zonos-card.entry.js +2 -2
- package/dist/esm/zonos-cart-items_13.entry.js +33 -15
- package/dist/esm/zonos-checkout.entry.js +56 -6
- package/dist/esm/zonos-collapse.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +12 -7
- package/dist/esm/zonos-country-flag.entry.js +4 -4
- package/dist/esm/zonos-country-select_4.entry.js +4 -4
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-empty-state-payment_4.entry.js +5 -5
- package/dist/esm/zonos-hello-dialog.entry.js +4 -4
- package/dist/esm/zonos-hello.entry.js +4 -4
- package/dist/esm/zonos-input.entry.js +2 -2
- package/dist/esm/zonos-language-select_2.entry.js +4 -4
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/zonos-shipping-rich-radio.entry.js +2 -2
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-toggle.entry.js +1 -1
- package/dist/esm/zonos-v-stack.entry.js +1 -1
- package/dist/esm/{zonosStore-82bb17e6.js → zonosStore-71d7e02f.js} +4 -0
- package/dist/esm-es5/cart-8afb3277.js +1 -0
- package/dist/esm-es5/{getBorderRadius-9e3ea1de.js → getBorderRadius-740610fb.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-95f3ef90.js → isDarkColor-2f59d721.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-4ed46f2f.js → paypal-02c4e5d3.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-82bb17e6.js → zonosStore-71d7e02f.js} +1 -1
- package/dist/scripts/index.d.ts +665 -644
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +5 -0
- package/dist/types/components/common/zonos-button/zonos-button.d.ts +4 -0
- package/dist/types/components/store/checkout/stripe.d.ts +9 -2
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +12 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +12 -0
- package/dist/types/components/store/zonosStore.d.ts +4 -2
- package/dist/types/components/utils/api/getZonosSettings.d.ts +3 -3
- package/dist/types/components.d.ts +8 -0
- package/dist/types/types/checkout/CheckoutConfig.d.ts +6 -1
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +6 -1
- package/dist/types/types/generated/graphql.internal.types.d.ts +109 -16
- package/dist/types/types/generated/graphql.internal.types.ts +147 -21
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/utils/ZonosSettings.d.ts +10 -0
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-194bb37a.system.entry.js → p-04122105.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c071a4ca.entry.js → p-047b3313.entry.js} +1 -1
- package/dist/zonos-elements/p-062c81c9.js +1 -0
- package/dist/zonos-elements/{p-822600bd.entry.js → p-073bc210.entry.js} +1 -1
- package/dist/zonos-elements/{p-5e867a64.system.entry.js → p-09e4f412.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-9c845327.system.entry.js → p-0b178c5a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-30852c16.system.entry.js → p-0febd074.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-77026d4a.entry.js → p-1570b95c.entry.js} +1 -1
- package/dist/zonos-elements/{p-88fc9989.entry.js → p-15971b78.entry.js} +1 -1
- package/dist/zonos-elements/{p-28c3f736.system.entry.js → p-1f720612.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-75311708.system.entry.js → p-20ca31fd.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2297c165.system.js → p-3a531aec.system.js} +1 -1
- package/dist/zonos-elements/{p-5892ce43.system.js → p-3e6e4646.system.js} +1 -1
- package/dist/zonos-elements/{p-7fe8c97d.entry.js → p-417b2afd.entry.js} +1 -1
- package/dist/zonos-elements/p-46f6e5e9.system.js +1 -1
- package/dist/zonos-elements/{p-78ea3d1e.system.entry.js → p-57281d6c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c8fa08b8.entry.js → p-6549915d.entry.js} +1 -1
- package/dist/zonos-elements/p-6658cc02.system.js +1 -0
- package/dist/zonos-elements/{p-9fcf4d8c.js → p-672707ce.js} +1 -1
- package/dist/zonos-elements/{p-eefadc0d.system.entry.js → p-6b8b5fc5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-683d1598.entry.js → p-72319b4d.entry.js} +1 -1
- package/dist/zonos-elements/{p-d3be144d.entry.js → p-73e9a8f5.entry.js} +1 -1
- package/dist/zonos-elements/{p-3cbac6c3.system.entry.js → p-748c7aca.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-bd1a2003.entry.js → p-75a8e67d.entry.js} +1 -1
- package/dist/zonos-elements/p-77581c1c.entry.js +1 -0
- package/dist/zonos-elements/{p-e1e17979.entry.js → p-7c028742.entry.js} +1 -1
- package/dist/zonos-elements/{p-75b44616.entry.js → p-8213ee19.entry.js} +1 -1
- package/dist/zonos-elements/p-82166888.system.entry.js +1 -0
- package/dist/zonos-elements/{p-1262ad56.entry.js → p-83645bb4.entry.js} +1 -1
- package/dist/zonos-elements/{p-5f761f09.system.entry.js → p-85235fa0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b4d04d26.system.entry.js → p-8addb07b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4bbf8931.entry.js → p-8f4bf7e6.entry.js} +1 -1
- package/dist/zonos-elements/p-98d0ff1b.system.entry.js +1 -0
- package/dist/zonos-elements/{p-86da894d.js → p-98e9c9cf.js} +1 -1
- package/dist/zonos-elements/{p-5b6c5d04.js → p-a349636e.js} +2 -2
- package/dist/zonos-elements/{p-baa22bb3.entry.js → p-a62d60d1.entry.js} +1 -1
- package/dist/zonos-elements/p-a9a95fae.system.js +1 -0
- package/dist/zonos-elements/{p-3a3a2f51.system.entry.js → p-aa5e39e8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-da404f8f.entry.js → p-acabfba5.entry.js} +1 -1
- package/dist/zonos-elements/{p-84f71520.system.entry.js → p-aced2fc6.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b336b4ec.entry.js +1 -0
- package/dist/zonos-elements/{p-972261dc.system.js → p-b6fdbbf4.system.js} +1 -1
- package/dist/zonos-elements/{p-84b2efef.entry.js → p-c1f1818a.entry.js} +1 -1
- package/dist/zonos-elements/{p-d3a452d4.system.entry.js → p-c5808c2d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c901ef48.system.entry.js → p-c7219337.system.entry.js} +1 -1
- package/dist/zonos-elements/p-d696a3c2.system.js +1 -0
- package/dist/zonos-elements/{p-c285d20c.js → p-dd999b44.js} +1 -1
- package/dist/zonos-elements/{p-e47ed595.entry.js → p-de23f355.entry.js} +1 -1
- package/dist/zonos-elements/{p-38967d3a.system.entry.js → p-e174b37b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2c45f733.system.entry.js → p-eb5835d1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7448f4a6.system.entry.js → p-ed74742d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-673d24f9.system.entry.js → p-f84593ad.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f9789c28.entry.js +1 -0
- package/dist/zonos-elements/{p-0160281f.entry.js → p-fa15b9b5.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-aee97bf4.js +0 -1
- package/dist/zonos-elements/p-130a047c.entry.js +0 -1
- package/dist/zonos-elements/p-13579dba.entry.js +0 -1
- package/dist/zonos-elements/p-43b922bf.js +0 -1
- package/dist/zonos-elements/p-532afee0.system.js +0 -1
- package/dist/zonos-elements/p-6d7dc2a2.system.entry.js +0 -1
- package/dist/zonos-elements/p-bba01622.system.js +0 -1
- package/dist/zonos-elements/p-d1a57d82.system.entry.js +0 -1
- package/dist/zonos-elements/p-e477f1b1.entry.js +0 -1
- package/dist/zonos-elements/p-fb2a884f.system.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CheckoutSessionPaymentIntentCreateMutation, CountryCode, GetCheckoutSessionQuery } from "../../generated/graphql.internal.types";
|
|
1
|
+
import type { CheckoutSessionBaseCurrencyUpdateMutation, CheckoutSessionPaymentIntentCreateMutation, CountryCode, CurrencyCode, GetCheckoutSessionQuery } from "../../generated/graphql.internal.types";
|
|
2
2
|
export type GetCheckoutSessionRequest = {
|
|
3
3
|
checkoutSessionId: string;
|
|
4
4
|
};
|
|
@@ -38,3 +38,8 @@ export type PaymentIntentCreateRequest = {
|
|
|
38
38
|
checkoutSessionId: string;
|
|
39
39
|
};
|
|
40
40
|
export type PaymentIntentCreateResponse = CheckoutSessionPaymentIntentCreateMutation;
|
|
41
|
+
export type CheckoutSessionBaseCurrencyUpdatePayload = {
|
|
42
|
+
checkoutSessionId: string;
|
|
43
|
+
currencyCode: CurrencyCode;
|
|
44
|
+
};
|
|
45
|
+
export type CheckoutSessionBaseCurrencyUpdateResponse = CheckoutSessionBaseCurrencyUpdateMutation;
|
|
@@ -1257,11 +1257,6 @@ export declare const currencySymbolLocation: {
|
|
|
1257
1257
|
readonly Before: "BEFORE";
|
|
1258
1258
|
};
|
|
1259
1259
|
export type CurrencySymbolLocation = (typeof currencySymbolLocation)[keyof typeof currencySymbolLocation];
|
|
1260
|
-
export declare const currencyVisibilityStatus: {
|
|
1261
|
-
readonly All: "ALL";
|
|
1262
|
-
readonly Destination: "DESTINATION";
|
|
1263
|
-
};
|
|
1264
|
-
export type CurrencyVisibilityStatus = (typeof currencyVisibilityStatus)[keyof typeof currencyVisibilityStatus];
|
|
1265
1260
|
export declare const customsDocumentCarrier: {
|
|
1266
1261
|
readonly Dhl: "DHL";
|
|
1267
1262
|
readonly Fedex: "FEDEX";
|
|
@@ -1858,28 +1853,101 @@ export declare const itemValueSource: {
|
|
|
1858
1853
|
readonly UserProvided: "USER_PROVIDED";
|
|
1859
1854
|
};
|
|
1860
1855
|
export type ItemValueSource = (typeof itemValueSource)[keyof typeof itemValueSource];
|
|
1856
|
+
export declare const labelAlcoholRecipientType: {
|
|
1857
|
+
readonly Consumer: "CONSUMER";
|
|
1858
|
+
readonly Licensee: "LICENSEE";
|
|
1859
|
+
};
|
|
1860
|
+
export type LabelAlcoholRecipientType = (typeof labelAlcoholRecipientType)[keyof typeof labelAlcoholRecipientType];
|
|
1861
1861
|
export declare const labelAmountType: {
|
|
1862
|
+
readonly Discount: "DISCOUNT";
|
|
1862
1863
|
readonly Fee: "FEE";
|
|
1863
1864
|
readonly Insurance: "INSURANCE";
|
|
1864
1865
|
readonly Quote: "QUOTE";
|
|
1865
1866
|
};
|
|
1866
1867
|
export type LabelAmountType = (typeof labelAmountType)[keyof typeof labelAmountType];
|
|
1868
|
+
export declare const labelBatteryMaterialType: {
|
|
1869
|
+
readonly LithiumIon: "LITHIUM_ION";
|
|
1870
|
+
readonly LithiumMetal: "LITHIUM_METAL";
|
|
1871
|
+
};
|
|
1872
|
+
export type LabelBatteryMaterialType = (typeof labelBatteryMaterialType)[keyof typeof labelBatteryMaterialType];
|
|
1873
|
+
export declare const labelBatteryPackingType: {
|
|
1874
|
+
readonly BatteryInsideEquipment: "BATTERY_INSIDE_EQUIPMENT";
|
|
1875
|
+
readonly BatteryOnly: "BATTERY_ONLY";
|
|
1876
|
+
readonly BatteryPackagedWithEquipment: "BATTERY_PACKAGED_WITH_EQUIPMENT";
|
|
1877
|
+
};
|
|
1878
|
+
export type LabelBatteryPackingType = (typeof labelBatteryPackingType)[keyof typeof labelBatteryPackingType];
|
|
1879
|
+
export declare const labelCarrierCode: {
|
|
1880
|
+
readonly Apc: "APC";
|
|
1881
|
+
readonly Dhl: "DHL";
|
|
1882
|
+
readonly DirectLink: "DIRECT_LINK";
|
|
1883
|
+
readonly Fedex: "FEDEX";
|
|
1884
|
+
readonly Fedexxb: "FEDEXXB";
|
|
1885
|
+
readonly Ups: "UPS";
|
|
1886
|
+
readonly Usps: "USPS";
|
|
1887
|
+
};
|
|
1888
|
+
export type LabelCarrierCode = (typeof labelCarrierCode)[keyof typeof labelCarrierCode];
|
|
1867
1889
|
export declare const labelFileType: {
|
|
1868
1890
|
readonly Pdf: "PDF";
|
|
1869
1891
|
readonly Zpl: "ZPL";
|
|
1870
1892
|
};
|
|
1871
1893
|
export type LabelFileType = (typeof labelFileType)[keyof typeof labelFileType];
|
|
1894
|
+
export declare const labelGuaranteeCode: {
|
|
1895
|
+
readonly Lcg: "LCG";
|
|
1896
|
+
readonly NotApplicable: "NOT_APPLICABLE";
|
|
1897
|
+
};
|
|
1898
|
+
export type LabelGuaranteeCode = (typeof labelGuaranteeCode)[keyof typeof labelGuaranteeCode];
|
|
1899
|
+
export declare const labelSignatureOptionType: {
|
|
1900
|
+
readonly Adult: "ADULT";
|
|
1901
|
+
readonly Default: "DEFAULT";
|
|
1902
|
+
readonly Direct: "DIRECT";
|
|
1903
|
+
readonly Indirect: "INDIRECT";
|
|
1904
|
+
readonly None: "NONE";
|
|
1905
|
+
};
|
|
1906
|
+
export type LabelSignatureOptionType = (typeof labelSignatureOptionType)[keyof typeof labelSignatureOptionType];
|
|
1872
1907
|
export declare const labelSize: {
|
|
1873
1908
|
readonly EightByEleven: "EIGHT_BY_ELEVEN";
|
|
1874
1909
|
readonly FourByEight: "FOUR_BY_EIGHT";
|
|
1875
1910
|
readonly FourBySix: "FOUR_BY_SIX";
|
|
1876
1911
|
};
|
|
1877
1912
|
export type LabelSize = (typeof labelSize)[keyof typeof labelSize];
|
|
1913
|
+
export declare const labelSpecialServiceType: {
|
|
1914
|
+
readonly Alcohol: "ALCOHOL";
|
|
1915
|
+
readonly Battery: "BATTERY";
|
|
1916
|
+
readonly DangerousGoods: "DANGEROUS_GOODS";
|
|
1917
|
+
readonly DryIce: "DRY_ICE";
|
|
1918
|
+
readonly SignatureOption: "SIGNATURE_OPTION";
|
|
1919
|
+
};
|
|
1920
|
+
export type LabelSpecialServiceType = (typeof labelSpecialServiceType)[keyof typeof labelSpecialServiceType];
|
|
1878
1921
|
export declare const labelStatusType: {
|
|
1879
1922
|
readonly Created: "CREATED";
|
|
1880
1923
|
readonly Voided: "VOIDED";
|
|
1881
1924
|
};
|
|
1882
1925
|
export type LabelStatusType = (typeof labelStatusType)[keyof typeof labelStatusType];
|
|
1926
|
+
export declare const labelTaxIdType: {
|
|
1927
|
+
readonly Cnp: "CNP";
|
|
1928
|
+
readonly Dan: "DAN";
|
|
1929
|
+
readonly Dtf: "DTF";
|
|
1930
|
+
readonly Dun: "DUN";
|
|
1931
|
+
readonly Ein: "EIN";
|
|
1932
|
+
readonly Eori: "EORI";
|
|
1933
|
+
readonly Fed: "FED";
|
|
1934
|
+
readonly Ftz: "FTZ";
|
|
1935
|
+
readonly Gst: "GST";
|
|
1936
|
+
readonly Hmrc: "HMRC";
|
|
1937
|
+
readonly Ioss: "IOSS";
|
|
1938
|
+
readonly Lvg: "LVG";
|
|
1939
|
+
readonly Osr: "OSR";
|
|
1940
|
+
readonly Ssn: "SSN";
|
|
1941
|
+
readonly Sta: "STA";
|
|
1942
|
+
readonly Tan: "TAN";
|
|
1943
|
+
readonly Voec: "VOEC";
|
|
1944
|
+
};
|
|
1945
|
+
export type LabelTaxIdType = (typeof labelTaxIdType)[keyof typeof labelTaxIdType];
|
|
1946
|
+
export declare const labelTermType: {
|
|
1947
|
+
readonly Dap: "DAP";
|
|
1948
|
+
readonly Ddp: "DDP";
|
|
1949
|
+
};
|
|
1950
|
+
export type LabelTermType = (typeof labelTermType)[keyof typeof labelTermType];
|
|
1883
1951
|
export declare const landedCostAdjustmentType: {
|
|
1884
1952
|
readonly CartTotal: "CART_TOTAL";
|
|
1885
1953
|
readonly Item: "ITEM";
|
|
@@ -2181,7 +2249,9 @@ export declare const orderBillingAdjustmentFeeType: {
|
|
|
2181
2249
|
readonly Country: "COUNTRY";
|
|
2182
2250
|
readonly CurrencyConversionFee: "CURRENCY_CONVERSION_FEE";
|
|
2183
2251
|
readonly DdpServiceFee: "DDP_SERVICE_FEE";
|
|
2252
|
+
readonly Discount: "DISCOUNT";
|
|
2184
2253
|
readonly Duty: "DUTY";
|
|
2254
|
+
readonly DutyTaxFee: "DUTY_TAX_FEE";
|
|
2185
2255
|
readonly FxFee: "FX_FEE";
|
|
2186
2256
|
readonly FxFeeNonRefundedAmounts: "FX_FEE_NON_REFUNDED_AMOUNTS";
|
|
2187
2257
|
readonly InclusivePriceAdjustment: "INCLUSIVE_PRICE_ADJUSTMENT";
|
|
@@ -2326,6 +2396,7 @@ export type PartyType = (typeof partyType)[keyof typeof partyType];
|
|
|
2326
2396
|
export declare const paymentProcessorCode: {
|
|
2327
2397
|
readonly Paypal: "PAYPAL";
|
|
2328
2398
|
readonly Stripe: "STRIPE";
|
|
2399
|
+
readonly StripeTransfer: "STRIPE_TRANSFER";
|
|
2329
2400
|
};
|
|
2330
2401
|
export type PaymentProcessorCode = (typeof paymentProcessorCode)[keyof typeof paymentProcessorCode];
|
|
2331
2402
|
export declare const paymentType: {
|
|
@@ -2977,7 +3048,10 @@ export type CartCalculateLandedCostMutation = {
|
|
|
2977
3048
|
}> | null;
|
|
2978
3049
|
landedCostCalculateWorkflow: Array<{
|
|
2979
3050
|
amountSubtotals: {
|
|
3051
|
+
discounts: number | null;
|
|
3052
|
+
items: number;
|
|
2980
3053
|
landedCostTotal: number;
|
|
3054
|
+
shipping: number;
|
|
2981
3055
|
} | null;
|
|
2982
3056
|
landedCostGuaranteeCode: LandedCostGuaranteeCode;
|
|
2983
3057
|
deMinimis: Array<{
|
|
@@ -3087,7 +3161,10 @@ export type CalculateLandedCostMutation = {
|
|
|
3087
3161
|
}>;
|
|
3088
3162
|
landedCostCalculateWorkflow: Array<{
|
|
3089
3163
|
amountSubtotals: {
|
|
3164
|
+
discounts: number | null;
|
|
3165
|
+
items: number;
|
|
3090
3166
|
landedCostTotal: number;
|
|
3167
|
+
shipping: number;
|
|
3091
3168
|
} | null;
|
|
3092
3169
|
appliedAdjustments: Array<{
|
|
3093
3170
|
adjustment: {
|
|
@@ -3187,7 +3264,10 @@ export type CheckoutPresentmentFragment = {
|
|
|
3187
3264
|
};
|
|
3188
3265
|
export type LandedCostFragment = {
|
|
3189
3266
|
amountSubtotals: {
|
|
3267
|
+
discounts: number | null;
|
|
3268
|
+
items: number;
|
|
3190
3269
|
landedCostTotal: number;
|
|
3270
|
+
shipping: number;
|
|
3191
3271
|
} | null;
|
|
3192
3272
|
appliedAdjustments: Array<{
|
|
3193
3273
|
adjustment: {
|
|
@@ -3511,6 +3591,14 @@ export type ShippingZonesQuery = {
|
|
|
3511
3591
|
countryCodes: Array<CountryCode> | null;
|
|
3512
3592
|
} | null> | null;
|
|
3513
3593
|
};
|
|
3594
|
+
export type CheckoutSessionBaseCurrencyUpdateMutation = {
|
|
3595
|
+
checkoutSessionBaseCurrencyUpdate: {
|
|
3596
|
+
subtotals: {
|
|
3597
|
+
presentmentCurrencyCode: CurrencyCode;
|
|
3598
|
+
total: number;
|
|
3599
|
+
};
|
|
3600
|
+
};
|
|
3601
|
+
};
|
|
3514
3602
|
export type CheckoutSessionUpdateMetadataMutation = {
|
|
3515
3603
|
checkoutSessionUpdate: {
|
|
3516
3604
|
id: string;
|
|
@@ -3631,6 +3719,7 @@ export type ZonosSettingsQuery = {
|
|
|
3631
3719
|
} | null;
|
|
3632
3720
|
checkoutSettings: {
|
|
3633
3721
|
allowedCharacterSets: AllowedCharacterSets;
|
|
3722
|
+
allowedSettlementCurrencies: AllowedSettlementCurrencies;
|
|
3634
3723
|
analyticsProviders: Array<{
|
|
3635
3724
|
status: AnalyticsProviderStatus;
|
|
3636
3725
|
type: AnalyticsProviderType;
|
|
@@ -3640,13 +3729,16 @@ export type ZonosSettingsQuery = {
|
|
|
3640
3729
|
customHTML: string;
|
|
3641
3730
|
defaultCartExpiration: number;
|
|
3642
3731
|
disabledCountries: Array<CountryCode> | null;
|
|
3732
|
+
externalPaymentMethods: Array<{
|
|
3733
|
+
status: ExternalPaymentMethodStatus;
|
|
3734
|
+
type: ExternalPaymentMethodType;
|
|
3735
|
+
}> | null;
|
|
3643
3736
|
externalServiceTokens: Array<{
|
|
3644
3737
|
token: string;
|
|
3645
3738
|
type: ExternalServiceTokenType;
|
|
3646
3739
|
}>;
|
|
3647
|
-
mode: Mode;
|
|
3648
3740
|
id: string;
|
|
3649
|
-
|
|
3741
|
+
mode: Mode;
|
|
3650
3742
|
orderNotifications: {
|
|
3651
3743
|
abandonedCart: {
|
|
3652
3744
|
delay: number;
|
|
@@ -3670,10 +3762,7 @@ export type ZonosSettingsQuery = {
|
|
|
3670
3762
|
subscriptionStatus: CheckoutSubscriptionStatus;
|
|
3671
3763
|
successBehavior: CheckoutSuccessBehavior;
|
|
3672
3764
|
successRedirectUrl: string;
|
|
3673
|
-
|
|
3674
|
-
status: ExternalPaymentMethodStatus;
|
|
3675
|
-
type: ExternalPaymentMethodType;
|
|
3676
|
-
}> | null;
|
|
3765
|
+
updatedAt: string;
|
|
3677
3766
|
updatedBy: string;
|
|
3678
3767
|
visibilityStatus: CheckoutVisibilityStatus;
|
|
3679
3768
|
} | null;
|
|
@@ -3718,6 +3807,7 @@ export type ZonosSettingsQuery = {
|
|
|
3718
3807
|
};
|
|
3719
3808
|
export type CheckoutSettingFragment = {
|
|
3720
3809
|
allowedCharacterSets: AllowedCharacterSets;
|
|
3810
|
+
allowedSettlementCurrencies: AllowedSettlementCurrencies;
|
|
3721
3811
|
analyticsProviders: Array<{
|
|
3722
3812
|
status: AnalyticsProviderStatus;
|
|
3723
3813
|
type: AnalyticsProviderType;
|
|
@@ -3727,16 +3817,16 @@ export type CheckoutSettingFragment = {
|
|
|
3727
3817
|
customHTML: string;
|
|
3728
3818
|
defaultCartExpiration: number;
|
|
3729
3819
|
disabledCountries: Array<CountryCode> | null;
|
|
3730
|
-
|
|
3820
|
+
externalPaymentMethods: Array<{
|
|
3821
|
+
status: ExternalPaymentMethodStatus;
|
|
3822
|
+
type: ExternalPaymentMethodType;
|
|
3823
|
+
}> | null;
|
|
3731
3824
|
externalServiceTokens: Array<{
|
|
3732
3825
|
token: string;
|
|
3733
3826
|
type: ExternalServiceTokenType;
|
|
3734
3827
|
}>;
|
|
3735
3828
|
id: string;
|
|
3736
|
-
|
|
3737
|
-
status: ExternalPaymentMethodStatus;
|
|
3738
|
-
type: ExternalPaymentMethodType;
|
|
3739
|
-
}> | null;
|
|
3829
|
+
mode: Mode;
|
|
3740
3830
|
orderNotifications: {
|
|
3741
3831
|
abandonedCart: {
|
|
3742
3832
|
delay: number;
|
|
@@ -4115,6 +4205,9 @@ export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionW
|
|
|
4115
4205
|
checkItemRestrictions(variables?: {
|
|
4116
4206
|
[x: string]: never;
|
|
4117
4207
|
}, requestHeaders?: GraphQLClientRequestHeaders): Promise<CheckItemRestrictionsMutation>;
|
|
4208
|
+
checkoutSessionBaseCurrencyUpdate(variables?: {
|
|
4209
|
+
[x: string]: never;
|
|
4210
|
+
}, requestHeaders?: GraphQLClientRequestHeaders): Promise<CheckoutSessionBaseCurrencyUpdateMutation>;
|
|
4118
4211
|
checkoutSessionCreate(variables?: {
|
|
4119
4212
|
[x: string]: never;
|
|
4120
4213
|
}, requestHeaders?: GraphQLClientRequestHeaders): Promise<CheckoutSessionCreateMutation>;
|
|
@@ -1440,13 +1440,6 @@ export const currencySymbolLocation = {
|
|
|
1440
1440
|
|
|
1441
1441
|
export type CurrencySymbolLocation =
|
|
1442
1442
|
(typeof currencySymbolLocation)[keyof typeof currencySymbolLocation];
|
|
1443
|
-
export const currencyVisibilityStatus = {
|
|
1444
|
-
All: 'ALL',
|
|
1445
|
-
Destination: 'DESTINATION',
|
|
1446
|
-
} as const;
|
|
1447
|
-
|
|
1448
|
-
export type CurrencyVisibilityStatus =
|
|
1449
|
-
(typeof currencyVisibilityStatus)[keyof typeof currencyVisibilityStatus];
|
|
1450
1443
|
|
|
1451
1444
|
export const customsDocumentCarrier = {
|
|
1452
1445
|
Dhl: 'DHL',
|
|
@@ -2224,7 +2217,15 @@ export const itemValueSource = {
|
|
|
2224
2217
|
export type ItemValueSource =
|
|
2225
2218
|
(typeof itemValueSource)[keyof typeof itemValueSource];
|
|
2226
2219
|
|
|
2220
|
+
export const labelAlcoholRecipientType = {
|
|
2221
|
+
Consumer: 'CONSUMER',
|
|
2222
|
+
Licensee: 'LICENSEE',
|
|
2223
|
+
} as const;
|
|
2224
|
+
|
|
2225
|
+
export type LabelAlcoholRecipientType =
|
|
2226
|
+
(typeof labelAlcoholRecipientType)[keyof typeof labelAlcoholRecipientType];
|
|
2227
2227
|
export const labelAmountType = {
|
|
2228
|
+
Discount: 'DISCOUNT',
|
|
2228
2229
|
Fee: 'FEE',
|
|
2229
2230
|
Insurance: 'INSURANCE',
|
|
2230
2231
|
Quote: 'QUOTE',
|
|
@@ -2233,6 +2234,34 @@ export const labelAmountType = {
|
|
|
2233
2234
|
export type LabelAmountType =
|
|
2234
2235
|
(typeof labelAmountType)[keyof typeof labelAmountType];
|
|
2235
2236
|
|
|
2237
|
+
export const labelBatteryMaterialType = {
|
|
2238
|
+
LithiumIon: 'LITHIUM_ION',
|
|
2239
|
+
LithiumMetal: 'LITHIUM_METAL',
|
|
2240
|
+
} as const;
|
|
2241
|
+
|
|
2242
|
+
export type LabelBatteryMaterialType =
|
|
2243
|
+
(typeof labelBatteryMaterialType)[keyof typeof labelBatteryMaterialType];
|
|
2244
|
+
export const labelBatteryPackingType = {
|
|
2245
|
+
BatteryInsideEquipment: 'BATTERY_INSIDE_EQUIPMENT',
|
|
2246
|
+
BatteryOnly: 'BATTERY_ONLY',
|
|
2247
|
+
BatteryPackagedWithEquipment: 'BATTERY_PACKAGED_WITH_EQUIPMENT',
|
|
2248
|
+
} as const;
|
|
2249
|
+
|
|
2250
|
+
export type LabelBatteryPackingType =
|
|
2251
|
+
(typeof labelBatteryPackingType)[keyof typeof labelBatteryPackingType];
|
|
2252
|
+
export const labelCarrierCode = {
|
|
2253
|
+
Apc: 'APC',
|
|
2254
|
+
Dhl: 'DHL',
|
|
2255
|
+
DirectLink: 'DIRECT_LINK',
|
|
2256
|
+
Fedex: 'FEDEX',
|
|
2257
|
+
Fedexxb: 'FEDEXXB',
|
|
2258
|
+
Ups: 'UPS',
|
|
2259
|
+
Usps: 'USPS',
|
|
2260
|
+
} as const;
|
|
2261
|
+
|
|
2262
|
+
export type LabelCarrierCode =
|
|
2263
|
+
(typeof labelCarrierCode)[keyof typeof labelCarrierCode];
|
|
2264
|
+
|
|
2236
2265
|
export const labelFileType = {
|
|
2237
2266
|
Pdf: 'PDF',
|
|
2238
2267
|
Zpl: 'ZPL',
|
|
@@ -2240,6 +2269,24 @@ export const labelFileType = {
|
|
|
2240
2269
|
|
|
2241
2270
|
export type LabelFileType = (typeof labelFileType)[keyof typeof labelFileType];
|
|
2242
2271
|
|
|
2272
|
+
export const labelGuaranteeCode = {
|
|
2273
|
+
Lcg: 'LCG',
|
|
2274
|
+
NotApplicable: 'NOT_APPLICABLE',
|
|
2275
|
+
} as const;
|
|
2276
|
+
|
|
2277
|
+
export type LabelGuaranteeCode =
|
|
2278
|
+
(typeof labelGuaranteeCode)[keyof typeof labelGuaranteeCode];
|
|
2279
|
+
|
|
2280
|
+
export const labelSignatureOptionType = {
|
|
2281
|
+
Adult: 'ADULT',
|
|
2282
|
+
Default: 'DEFAULT',
|
|
2283
|
+
Direct: 'DIRECT',
|
|
2284
|
+
Indirect: 'INDIRECT',
|
|
2285
|
+
None: 'NONE',
|
|
2286
|
+
} as const;
|
|
2287
|
+
|
|
2288
|
+
export type LabelSignatureOptionType =
|
|
2289
|
+
(typeof labelSignatureOptionType)[keyof typeof labelSignatureOptionType];
|
|
2243
2290
|
export const labelSize = {
|
|
2244
2291
|
EightByEleven: 'EIGHT_BY_ELEVEN',
|
|
2245
2292
|
FourByEight: 'FOUR_BY_EIGHT',
|
|
@@ -2248,6 +2295,16 @@ export const labelSize = {
|
|
|
2248
2295
|
|
|
2249
2296
|
export type LabelSize = (typeof labelSize)[keyof typeof labelSize];
|
|
2250
2297
|
|
|
2298
|
+
export const labelSpecialServiceType = {
|
|
2299
|
+
Alcohol: 'ALCOHOL',
|
|
2300
|
+
Battery: 'BATTERY',
|
|
2301
|
+
DangerousGoods: 'DANGEROUS_GOODS',
|
|
2302
|
+
DryIce: 'DRY_ICE',
|
|
2303
|
+
SignatureOption: 'SIGNATURE_OPTION',
|
|
2304
|
+
} as const;
|
|
2305
|
+
|
|
2306
|
+
export type LabelSpecialServiceType =
|
|
2307
|
+
(typeof labelSpecialServiceType)[keyof typeof labelSpecialServiceType];
|
|
2251
2308
|
export const labelStatusType = {
|
|
2252
2309
|
Created: 'CREATED',
|
|
2253
2310
|
Voided: 'VOIDED',
|
|
@@ -2255,6 +2312,34 @@ export const labelStatusType = {
|
|
|
2255
2312
|
|
|
2256
2313
|
export type LabelStatusType =
|
|
2257
2314
|
(typeof labelStatusType)[keyof typeof labelStatusType];
|
|
2315
|
+
export const labelTaxIdType = {
|
|
2316
|
+
Cnp: 'CNP',
|
|
2317
|
+
Dan: 'DAN',
|
|
2318
|
+
Dtf: 'DTF',
|
|
2319
|
+
Dun: 'DUN',
|
|
2320
|
+
Ein: 'EIN',
|
|
2321
|
+
Eori: 'EORI',
|
|
2322
|
+
Fed: 'FED',
|
|
2323
|
+
Ftz: 'FTZ',
|
|
2324
|
+
Gst: 'GST',
|
|
2325
|
+
Hmrc: 'HMRC',
|
|
2326
|
+
Ioss: 'IOSS',
|
|
2327
|
+
Lvg: 'LVG',
|
|
2328
|
+
Osr: 'OSR',
|
|
2329
|
+
Ssn: 'SSN',
|
|
2330
|
+
Sta: 'STA',
|
|
2331
|
+
Tan: 'TAN',
|
|
2332
|
+
Voec: 'VOEC',
|
|
2333
|
+
} as const;
|
|
2334
|
+
|
|
2335
|
+
export type LabelTaxIdType =
|
|
2336
|
+
(typeof labelTaxIdType)[keyof typeof labelTaxIdType];
|
|
2337
|
+
export const labelTermType = {
|
|
2338
|
+
Dap: 'DAP',
|
|
2339
|
+
Ddp: 'DDP',
|
|
2340
|
+
} as const;
|
|
2341
|
+
|
|
2342
|
+
export type LabelTermType = (typeof labelTermType)[keyof typeof labelTermType];
|
|
2258
2343
|
|
|
2259
2344
|
export const landedCostAdjustmentType = {
|
|
2260
2345
|
CartTotal: 'CART_TOTAL',
|
|
@@ -2620,7 +2705,9 @@ export const orderBillingAdjustmentFeeType = {
|
|
|
2620
2705
|
Country: 'COUNTRY',
|
|
2621
2706
|
CurrencyConversionFee: 'CURRENCY_CONVERSION_FEE',
|
|
2622
2707
|
DdpServiceFee: 'DDP_SERVICE_FEE',
|
|
2708
|
+
Discount: 'DISCOUNT',
|
|
2623
2709
|
Duty: 'DUTY',
|
|
2710
|
+
DutyTaxFee: 'DUTY_TAX_FEE',
|
|
2624
2711
|
FxFee: 'FX_FEE',
|
|
2625
2712
|
FxFeeNonRefundedAmounts: 'FX_FEE_NON_REFUNDED_AMOUNTS',
|
|
2626
2713
|
InclusivePriceAdjustment: 'INCLUSIVE_PRICE_ADJUSTMENT',
|
|
@@ -2813,6 +2900,7 @@ export type PartyType = (typeof partyType)[keyof typeof partyType];
|
|
|
2813
2900
|
export const paymentProcessorCode = {
|
|
2814
2901
|
Paypal: 'PAYPAL',
|
|
2815
2902
|
Stripe: 'STRIPE',
|
|
2903
|
+
StripeTransfer: 'STRIPE_TRANSFER',
|
|
2816
2904
|
} as const;
|
|
2817
2905
|
|
|
2818
2906
|
export type PaymentProcessorCode =
|
|
@@ -3631,7 +3719,12 @@ export type CartCalculateLandedCostMutation = {
|
|
|
3631
3719
|
};
|
|
3632
3720
|
}> | null;
|
|
3633
3721
|
landedCostCalculateWorkflow: Array<{
|
|
3634
|
-
amountSubtotals: {
|
|
3722
|
+
amountSubtotals: {
|
|
3723
|
+
discounts: number | null;
|
|
3724
|
+
items: number;
|
|
3725
|
+
landedCostTotal: number;
|
|
3726
|
+
shipping: number;
|
|
3727
|
+
} | null;
|
|
3635
3728
|
landedCostGuaranteeCode: LandedCostGuaranteeCode;
|
|
3636
3729
|
deMinimis: Array<{
|
|
3637
3730
|
formula: string;
|
|
@@ -3720,7 +3813,12 @@ export type CalculateLandedCostMutation = {
|
|
|
3720
3813
|
sku: string | null;
|
|
3721
3814
|
}>;
|
|
3722
3815
|
landedCostCalculateWorkflow: Array<{
|
|
3723
|
-
amountSubtotals: {
|
|
3816
|
+
amountSubtotals: {
|
|
3817
|
+
discounts: number | null;
|
|
3818
|
+
items: number;
|
|
3819
|
+
landedCostTotal: number;
|
|
3820
|
+
shipping: number;
|
|
3821
|
+
} | null;
|
|
3724
3822
|
appliedAdjustments: Array<{
|
|
3725
3823
|
adjustment: {
|
|
3726
3824
|
name: string | null;
|
|
@@ -3802,7 +3900,12 @@ export type CheckoutPresentmentFragment = {
|
|
|
3802
3900
|
};
|
|
3803
3901
|
|
|
3804
3902
|
export type LandedCostFragment = {
|
|
3805
|
-
amountSubtotals: {
|
|
3903
|
+
amountSubtotals: {
|
|
3904
|
+
discounts: number | null;
|
|
3905
|
+
items: number;
|
|
3906
|
+
landedCostTotal: number;
|
|
3907
|
+
shipping: number;
|
|
3908
|
+
} | null;
|
|
3806
3909
|
appliedAdjustments: Array<{
|
|
3807
3910
|
adjustment: { name: string | null; source: AdjustmentSource | null } | null;
|
|
3808
3911
|
amount: number;
|
|
@@ -4078,6 +4181,12 @@ export type ShippingZonesQuery = {
|
|
|
4078
4181
|
} | null> | null;
|
|
4079
4182
|
};
|
|
4080
4183
|
|
|
4184
|
+
export type CheckoutSessionBaseCurrencyUpdateMutation = {
|
|
4185
|
+
checkoutSessionBaseCurrencyUpdate: {
|
|
4186
|
+
subtotals: { presentmentCurrencyCode: CurrencyCode; total: number };
|
|
4187
|
+
};
|
|
4188
|
+
};
|
|
4189
|
+
|
|
4081
4190
|
export type CheckoutSessionUpdateMetadataMutation = {
|
|
4082
4191
|
checkoutSessionUpdate: {
|
|
4083
4192
|
id: string;
|
|
@@ -4188,6 +4297,7 @@ export type ZonosSettingsQuery = {
|
|
|
4188
4297
|
} | null;
|
|
4189
4298
|
checkoutSettings: {
|
|
4190
4299
|
allowedCharacterSets: AllowedCharacterSets;
|
|
4300
|
+
allowedSettlementCurrencies: AllowedSettlementCurrencies;
|
|
4191
4301
|
analyticsProviders: Array<{
|
|
4192
4302
|
status: AnalyticsProviderStatus;
|
|
4193
4303
|
type: AnalyticsProviderType;
|
|
@@ -4197,13 +4307,16 @@ export type ZonosSettingsQuery = {
|
|
|
4197
4307
|
customHTML: string;
|
|
4198
4308
|
defaultCartExpiration: number;
|
|
4199
4309
|
disabledCountries: Array<CountryCode> | null;
|
|
4310
|
+
externalPaymentMethods: Array<{
|
|
4311
|
+
status: ExternalPaymentMethodStatus;
|
|
4312
|
+
type: ExternalPaymentMethodType;
|
|
4313
|
+
}> | null;
|
|
4200
4314
|
externalServiceTokens: Array<{
|
|
4201
4315
|
token: string;
|
|
4202
4316
|
type: ExternalServiceTokenType;
|
|
4203
4317
|
}>;
|
|
4204
|
-
mode: Mode;
|
|
4205
4318
|
id: string;
|
|
4206
|
-
|
|
4319
|
+
mode: Mode;
|
|
4207
4320
|
orderNotifications: {
|
|
4208
4321
|
abandonedCart: {
|
|
4209
4322
|
delay: number;
|
|
@@ -4227,10 +4340,7 @@ export type ZonosSettingsQuery = {
|
|
|
4227
4340
|
subscriptionStatus: CheckoutSubscriptionStatus;
|
|
4228
4341
|
successBehavior: CheckoutSuccessBehavior;
|
|
4229
4342
|
successRedirectUrl: string;
|
|
4230
|
-
|
|
4231
|
-
status: ExternalPaymentMethodStatus;
|
|
4232
|
-
type: ExternalPaymentMethodType;
|
|
4233
|
-
}> | null;
|
|
4343
|
+
updatedAt: string;
|
|
4234
4344
|
updatedBy: string;
|
|
4235
4345
|
visibilityStatus: CheckoutVisibilityStatus;
|
|
4236
4346
|
} | null;
|
|
@@ -4271,6 +4381,7 @@ export type ZonosSettingsQuery = {
|
|
|
4271
4381
|
|
|
4272
4382
|
export type CheckoutSettingFragment = {
|
|
4273
4383
|
allowedCharacterSets: AllowedCharacterSets;
|
|
4384
|
+
allowedSettlementCurrencies: AllowedSettlementCurrencies;
|
|
4274
4385
|
analyticsProviders: Array<{
|
|
4275
4386
|
status: AnalyticsProviderStatus;
|
|
4276
4387
|
type: AnalyticsProviderType;
|
|
@@ -4280,16 +4391,16 @@ export type CheckoutSettingFragment = {
|
|
|
4280
4391
|
customHTML: string;
|
|
4281
4392
|
defaultCartExpiration: number;
|
|
4282
4393
|
disabledCountries: Array<CountryCode> | null;
|
|
4283
|
-
|
|
4394
|
+
externalPaymentMethods: Array<{
|
|
4395
|
+
status: ExternalPaymentMethodStatus;
|
|
4396
|
+
type: ExternalPaymentMethodType;
|
|
4397
|
+
}> | null;
|
|
4284
4398
|
externalServiceTokens: Array<{
|
|
4285
4399
|
token: string;
|
|
4286
4400
|
type: ExternalServiceTokenType;
|
|
4287
4401
|
}>;
|
|
4288
4402
|
id: string;
|
|
4289
|
-
|
|
4290
|
-
status: ExternalPaymentMethodStatus;
|
|
4291
|
-
type: ExternalPaymentMethodType;
|
|
4292
|
-
}> | null;
|
|
4403
|
+
mode: Mode;
|
|
4293
4404
|
orderNotifications: {
|
|
4294
4405
|
abandonedCart: {
|
|
4295
4406
|
delay: number;
|
|
@@ -4750,6 +4861,21 @@ export function getSdk(
|
|
|
4750
4861
|
'mutation',
|
|
4751
4862
|
);
|
|
4752
4863
|
},
|
|
4864
|
+
checkoutSessionBaseCurrencyUpdate(
|
|
4865
|
+
variables?: { [x: string]: never },
|
|
4866
|
+
requestHeaders?: GraphQLClientRequestHeaders,
|
|
4867
|
+
): Promise<CheckoutSessionBaseCurrencyUpdateMutation> {
|
|
4868
|
+
return withWrapper(
|
|
4869
|
+
wrappedRequestHeaders =>
|
|
4870
|
+
client.request<CheckoutSessionBaseCurrencyUpdateMutation>(
|
|
4871
|
+
'',
|
|
4872
|
+
variables,
|
|
4873
|
+
{ ...requestHeaders, ...wrappedRequestHeaders },
|
|
4874
|
+
),
|
|
4875
|
+
'checkoutSessionBaseCurrencyUpdate',
|
|
4876
|
+
'mutation',
|
|
4877
|
+
);
|
|
4878
|
+
},
|
|
4753
4879
|
checkoutSessionCreate(
|
|
4754
4880
|
variables?: { [x: string]: never },
|
|
4755
4881
|
requestHeaders?: GraphQLClientRequestHeaders,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CountryCode, ZonosSettingsQuery } from "../generated/graphql.internal.types";
|
|
2
|
+
export type GenericZonosSettings = {
|
|
3
|
+
/**
|
|
4
|
+
* List of countries that are allowed to use USD denominated cards for settlement.
|
|
5
|
+
*/
|
|
6
|
+
usdSettlementCountryEnabled?: CountryCode[];
|
|
7
|
+
};
|
|
8
|
+
export type ZonosSettings = ZonosSettingsQuery & {
|
|
9
|
+
genericSettings?: GenericZonosSettings;
|
|
10
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg color="var(--zonos-elements-
|
|
1
|
+
<svg color="var(--zonos-elements-red-800)" fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="https://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z" data-is-secondary-color="true" fill="var(--zonos-elements-red-200)" fill-rule="evenodd"></path><path clip-rule="evenodd" d="M8.293 8.293a1 1 0 0 1 1.414 0L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414-1.414L10.586 12 8.293 9.707a1 1 0 0 1 0-1.414Z" fill="currentColor" fill-rule="evenodd"></path></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,a as n,l as t,h as o,b as r}from"./p-f0c8150e.js";import{s as i,c as l}from"./p-c9035262.js";export{c as checkoutHiddenBtnSelector,d as domesticRedirectedBtnSelector}from"./p-c9035262.js";export{c as countryRequireTaxId,s as shipToTaxIdLabels}from"./p-5bd927f2.js";const a=["jsdelivr","cdnjs","unpkg","vercel"],u="jsdelivr",m=e=>{const n=a.indexOf(e);return a[n+1]||null},p=()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)return null;const n=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),o="https://v1.3.157.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-")))return o;if(!n&&["dev.demo.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!n)return null;if("dev-elements"===n)return"https://dev.elements.zonos.com";const s=`https://${n}.preview.js.zonos.com`;return t(`[ZONOS-WARNING] using '${s}' for loading elements script`,"warn"),fetch(s).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${s}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,t=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",t),window.location.reload(),null})),s},w="https://js.stripe.com/v3",f=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,h="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let v=null;const y=Promise.resolve().then((()=>{return e=null,null!==v||(v=new Promise(((n,t)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(h),window.Stripe)n(window.Stripe);else try{let o=(()=>{const e=document.querySelectorAll(`script[src^="${w}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&f.test(t.src))return t}return null})();o&&e?console.warn(h):o||(o=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",t=document.createElement("script");t.src=`${w}${n}`;const o=document.head||document.body;return o?(o.appendChild(t),t):(r("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==o||o.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):t(new Error("Stripe.js not available"))})),null==o||o.addEventListener("error",(()=>{t(new Error("Failed to load Stripe.js"))}))}catch(e){return void t(e)}else n(null)}))),v;var e}));let z=!1;var g;y.catch((e=>{z||console.warn(e)}));const j=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:t}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,t=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),o=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:o,isWhiteListed:t}})({loadScriptSrc:null==e?void 0:e.src});return t?n:null})(),S="https://v1.3.157.js.zonos.com",O=j||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.157",k="https://fonts.googleapis.com",b=/^https:\/\/fonts\.googleapis\.com/;class ${}g=$,$.doneInit=!1,$.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),$.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),$._paypalMockResponse=null,$.isBigCommerce=!1,$.releaseDate="1738619048344",$.isLegacyCheckout=!1,$.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",$.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),$.isNpm=!0,$.zonosQaUrl=null,$.zonosQaUrlApi=null,$.version="v1.3.157",$.modeAlerted=!1,$.cartData=null,$.paypal=null,$.getCurrentTimestamp=()=>(new Date).getTime(),$.zonosController=null,$.init=async s=>{const{appearance:c,checkoutSettings:d,currencyConverter:a,helloSettings:u,onCountryChange:m,overrideCurrencyFormat:w,storeId:f,zonosApiKey:h}=s;if(g.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),g.doneInit)return;if(t(`====== ZONOS DEBUG MODE: on (${g.version}) ======`),g.zonosApiKey=h,g.storeId=f,g.isNpm){t("====== ZONOS LOADING FROM NPM ======");const c=p();if(c&&!window.isZonosPreview){t(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${c} ======`,"info");const e=document.createElement("script");return e.src=`${c}/dist/scripts/zonos.js`,document.head.appendChild(e),e.addEventListener("load",(()=>{window.Zonos.isNpm=g.isNpm,window.Zonos.isBigCommerce=g.isBigCommerce,window.Zonos.isLegacyCheckout=g.isLegacyCheckout,window.Zonos.init(s)})),e.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${c}`)})),void(window.isZonosPreview=!0)}if(!h&&!g.cartId)return void r("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!g.cartData&&g.cartId){t("Initialize cart data");const e=await i(g.cartId);if(!e)return void r("Failed to get cart data");g.cartData=e.cartData,g.zonosApiKey=e.zonosApiKey}const d=await(async()=>{const s=e(),i=n();if(!s&&!i||!window.Zonos.zonosApiKey)return null;if(t("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return t("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:c,json:d}=await o("/api/get-test-public-credential");if(c.length||!d)return r("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",c),null;const l=d.publicCredential;return l?(t(`[ZONOS - loadZonos] Retrieve new test public token ${l}`,"info"),l):(r("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();d&&(g.zonosApiKey=d)}const v=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(g.cartId&&g.cartData||v){t("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const e=document.createElement("button");e.style.display="none",e.id=`${l}`,document.body.appendChild(e)}t("init zonos"),g.injectCustomScriptForHostedCheckout(),g.injectZonosCdn(),g.injectZonosCss(),g.injectFonts(),g.injectController({config:{appearance:c,checkoutSettings:d,currencyConverter:a,helloSettings:u,onCountryChange:m,overrideCurrencyFormat:w}}),g.doneInit=!0},$.injectCustomScriptForHostedCheckout=()=>{const e=g.cartData,n=(null==e?void 0:e.metadata)||[],o=n.find((e=>"customHeaderScript"===e.key)),s=n.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(o||s)){if(o){t("Injecting custom header script");const e=document.createElement("script");e.textContent=o.value,document.head.appendChild(e)}if(s){t("Injecting custom footer script");const e=document.createElement("script");e.textContent=s.value,document.body.appendChild(e)}}else t("Skip injecting custom script for hosted checkout","info",{footerScript:s,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout})},$.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},$.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},$.showNotification=e=>{var n;null===(n=g.zonosController)||void 0===n||n.showNotification(e)},$.updateOrganizationName=e=>{var n;null===(n=g.zonosController)||void 0===n||n.updateOrganizationName(e)},$.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:t,placeOrderButtonSelector:o})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&o){const n=document.querySelectorAll(o),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&t&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},$.injectController=({config:e})=>{var n;if(document.querySelector("zonos-controller"))return;if(null===(n=e.checkoutSettings)||void 0===n?void 0:n.placeOrderButtonSelector){const n=e.checkoutSettings.placeOrderButtonSelector;g.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{g.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}const o=document.createElement("zonos-controller");o.config=e,o.zonosApiKey=g.zonosApiKey||"",o.addEventListener("stripeInitEvent",(async e=>{const{detail:n}=e;t("loading Stripe");const s=await(async(...e)=>{z=!0;const n=Date.now();return y.then((t=>((e,n,t)=>{if(null===e)return null;const o=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(o,t),o})(t,e,n)))})(n.publishableKey);s?(window.Zonos.stripe=s,o.initCheckoutElement(s)):r("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(o),g.zonosController=o,t("Zonos controller injected!")},$.injectScript=({cdnType:e,isModule:n,theRestUrl:o})=>{const s=`${g.getZonosUrl(e)}/${o}`;if(document.querySelector(`script[src="${s}"]`))return void t(`Zonos script "${s}" already exists in the document`,"warn");const i=document.head||document.body,c=document.createElement("script");n?c.type="module":c.noModule=!0,c.src=s,c.crossOrigin="anonymous",c.onerror=()=>{r(`Failed to load ${c.src}`);const t=m(e);t&&g.injectScript({cdnType:t,isModule:n,theRestUrl:o})},i.appendChild(c)},$.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return O;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.157";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.157";case"vercel":return S}};return g.isNpm&&p()||n()},$.injectZonosCdn=()=>{g.injectScript({cdnType:u,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),g.injectScript({cdnType:u,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),t("Zonos cdn script injected!")},$.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const t=g.getZonosUrl(e),o=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${S}/`,o.appendChild(s);const i=document.createElement("link");i.rel="stylesheet",i.href=`${t}/${n}`,i.onerror=()=>{r(`Failed to load ${i.href}`);const t=m(e);t&&g.injectStylesheet({cdnType:t,theRestUrl:n})},o.appendChild(i)},$.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?t("Zonos style links already injected","warn"):(g.injectStylesheet({cdnType:u,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),t("Zonos style css injected!"))},$.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void t("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${k}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&!b.test(t.href))return t}return null})())return void t("Inter font already injected","warn");const e=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=k,e.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${k}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(o),t("Zonos font injected!")},$.setupGoogleFont=e=>{var n;null===(n=g.zonosController)||void 0===n||n.setupGoogleFont(e)},$.injectSupportGoogleFont=e=>{var n;t(`[FONT] injecting ${e}`);const o=null===(n=e.match(/family=(.*?):/))||void 0===n?void 0:n[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${k}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=k,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t(`[FONT] ${o} font already injected`,"warn");const r=document.createElement("link");r.rel="stylesheet",r.href=e,s.appendChild(r),t(`[FONT] ${o} font injected!`)};export{$ as Zonos}
|
|
1
|
+
import{g as e,a as n,l as t,h as o,b as r}from"./p-f0c8150e.js";import{s as i,c as l}from"./p-c9035262.js";export{c as checkoutHiddenBtnSelector,d as domesticRedirectedBtnSelector}from"./p-c9035262.js";export{c as countryRequireTaxId,s as shipToTaxIdLabels}from"./p-5bd927f2.js";const a=["jsdelivr","cdnjs","unpkg","vercel"],u="jsdelivr",m=e=>{const n=a.indexOf(e);return a[n+1]||null},p=()=>{const e=window&&window.location.href.includes("forceLoadCdn");if("undefined"==typeof window||e)return null;const n=(e=>{if(!e)return null;const n=new URL(e).searchParams.get("zonosQaUrl");return n?/[^a-zA-Z0-9-_]+/.test(n)?null:n:null})(window.location.href),o="https://v1.3.159.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-")))return o;if(!n&&["dev.demo.elements.zonos.com"].includes(window.location.hostname))return"https://dev.elements.zonos.com";if(!n)return null;if("dev-elements"===n)return"https://dev.elements.zonos.com";const s=`https://${n}.preview.js.zonos.com`;return t(`[ZONOS-WARNING] using '${s}' for loading elements script`,"warn"),fetch(s).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${s}' IS NO LONGER AVAILABLE. REMOVING zonosQaUrl PARAM AND RELOADING THE PAGE`);const e=new URLSearchParams(window.location.search);e.delete("zonosQaUrl");const{pathname:n}=window.location,t=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",t),window.location.reload(),null})),s},w="https://js.stripe.com/v3",f=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,h="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let v=null;const y=Promise.resolve().then((()=>{return e=null,null!==v||(v=new Promise(((n,t)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(h),window.Stripe)n(window.Stripe);else try{let o=(()=>{const e=document.querySelectorAll(`script[src^="${w}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&f.test(t.src))return t}return null})();o&&e?console.warn(h):o||(o=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",t=document.createElement("script");t.src=`${w}${n}`;const o=document.head||document.body;return o?(o.appendChild(t),t):(r("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==o||o.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):t(new Error("Stripe.js not available"))})),null==o||o.addEventListener("error",(()=>{t(new Error("Failed to load Stripe.js"))}))}catch(e){return void t(e)}else n(null)}))),v;var e}));let z=!1;var g;y.catch((e=>{z||console.warn(e)}));const j=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:t}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,t=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),o=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:o,isWhiteListed:t}})({loadScriptSrc:null==e?void 0:e.src});return t?n:null})(),S="https://v1.3.159.js.zonos.com",O=j||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.159",k="https://fonts.googleapis.com",b=/^https:\/\/fonts\.googleapis\.com/;class ${}g=$,$.doneInit=!1,$.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),$.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),$._paypalMockResponse=null,$.isBigCommerce=!1,$.releaseDate="1739308202396",$.isLegacyCheckout=!1,$.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",$.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),$.isNpm=!0,$.zonosQaUrl=null,$.zonosQaUrlApi=null,$.version="v1.3.159",$.modeAlerted=!1,$.cartData=null,$.paypal=null,$.getCurrentTimestamp=()=>(new Date).getTime(),$.zonosController=null,$.init=async s=>{const{appearance:c,checkoutSettings:d,currencyConverter:a,helloSettings:u,onCountryChange:m,overrideCurrencyFormat:w,storeId:f,zonosApiKey:h}=s;if(g.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),g.doneInit)return;if(t(`====== ZONOS DEBUG MODE: on (${g.version}) ======`),g.zonosApiKey=h,g.storeId=f,g.isNpm){t("====== ZONOS LOADING FROM NPM ======");const c=p();if(c&&!window.isZonosPreview){t(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${c} ======`,"info");const e=document.createElement("script");return e.src=`${c}/dist/scripts/zonos.js`,document.head.appendChild(e),e.addEventListener("load",(()=>{window.Zonos.isNpm=g.isNpm,window.Zonos.isBigCommerce=g.isBigCommerce,window.Zonos.isLegacyCheckout=g.isLegacyCheckout,window.Zonos.init(s)})),e.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${c}`)})),void(window.isZonosPreview=!0)}if(!h&&!g.cartId)return void r("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!g.cartData&&g.cartId){t("Initialize cart data");const e=await i(g.cartId);if(!e)return void r("Failed to get cart data");g.cartData=e.cartData,g.zonosApiKey=e.zonosApiKey}const d=await(async()=>{const s=e(),i=n();if(!s&&!i||!window.Zonos.zonosApiKey)return null;if(t("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return t("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:c,json:d}=await o("/api/get-test-public-credential");if(c.length||!d)return r("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",c),null;const l=d.publicCredential;return l?(t(`[ZONOS - loadZonos] Retrieve new test public token ${l}`,"info"),l):(r("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();d&&(g.zonosApiKey=d)}const v=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(g.cartId&&g.cartData||v){t("Cart data or stripe client secret is available, inject hidden button and trigger checkout");const e=document.createElement("button");e.style.display="none",e.id=`${l}`,document.body.appendChild(e)}t("init zonos"),g.injectCustomScriptForHostedCheckout(),g.injectZonosCdn(),g.injectZonosCss(),g.injectFonts(),g.injectController({config:{appearance:c,checkoutSettings:d,currencyConverter:a,helloSettings:u,onCountryChange:m,overrideCurrencyFormat:w}}),g.doneInit=!0},$.injectCustomScriptForHostedCheckout=()=>{const e=g.cartData,n=(null==e?void 0:e.metadata)||[],o=n.find((e=>"customHeaderScript"===e.key)),s=n.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(o||s)){if(o){t("Injecting custom header script");const e=document.createElement("script");e.textContent=o.value,document.head.appendChild(e)}if(s){t("Injecting custom footer script");const e=document.createElement("script");e.textContent=s.value,document.body.appendChild(e)}}else t("Skip injecting custom script for hosted checkout","info",{footerScript:s,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout})},$.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},$.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},$.showNotification=e=>{var n;null===(n=g.zonosController)||void 0===n||n.showNotification(e)},$.updateOrganizationName=e=>{var n;null===(n=g.zonosController)||void 0===n||n.updateOrganizationName(e)},$.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:t,placeOrderButtonSelector:o})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&o){const n=document.querySelectorAll(o),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(t?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&t&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},$.injectController=({config:e})=>{var n;if(document.querySelector("zonos-controller"))return;if(null===(n=e.checkoutSettings)||void 0===n?void 0:n.placeOrderButtonSelector){const n=e.checkoutSettings.placeOrderButtonSelector;g.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{g.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}const o=document.createElement("zonos-controller");o.config=e,o.zonosApiKey=g.zonosApiKey||"",o.addEventListener("stripeInitEvent",(async e=>{const{detail:n}=e;t("loading Stripe");const s=await(async(...e)=>{z=!0;const n=Date.now();return y.then((t=>((e,n,t)=>{if(null===e)return null;const o=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(o,t),o})(t,e,n)))})(n.publishableKey);s?(window.Zonos.stripe=s,o.initCheckoutElement(s)):r("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(o),g.zonosController=o,t("Zonos controller injected!")},$.injectScript=({cdnType:e,isModule:n,theRestUrl:o})=>{const s=`${g.getZonosUrl(e)}/${o}`;if(document.querySelector(`script[src="${s}"]`))return void t(`Zonos script "${s}" already exists in the document`,"warn");const i=document.head||document.body,c=document.createElement("script");n?c.type="module":c.noModule=!0,c.src=s,c.crossOrigin="anonymous",c.onerror=()=>{r(`Failed to load ${c.src}`);const t=m(e);t&&g.injectScript({cdnType:t,isModule:n,theRestUrl:o})},i.appendChild(c)},$.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return O;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.159";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.159";case"vercel":return S}};return g.isNpm&&p()||n()},$.injectZonosCdn=()=>{g.injectScript({cdnType:u,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),g.injectScript({cdnType:u,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),t("Zonos cdn script injected!")},$.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const t=g.getZonosUrl(e),o=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${S}/`,o.appendChild(s);const i=document.createElement("link");i.rel="stylesheet",i.href=`${t}/${n}`,i.onerror=()=>{r(`Failed to load ${i.href}`);const t=m(e);t&&g.injectStylesheet({cdnType:t,theRestUrl:n})},o.appendChild(i)},$.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?t("Zonos style links already injected","warn"):(g.injectStylesheet({cdnType:u,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),t("Zonos style css injected!"))},$.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void t("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${k}"]`);for(let n=0;n<e.length;n++){const t=e[n];if(t&&!b.test(t.href))return t}return null})())return void t("Inter font already injected","warn");const e=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=k,e.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${k}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(o),t("Zonos font injected!")},$.setupGoogleFont=e=>{var n;null===(n=g.zonosController)||void 0===n||n.setupGoogleFont(e)},$.injectSupportGoogleFont=e=>{var n;t(`[FONT] injecting ${e}`);const o=null===(n=e.match(/family=(.*?):/))||void 0===n?void 0:n[1],s=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${k}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=k,s.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void t(`[FONT] ${o} font already injected`,"warn");const r=document.createElement("link");r.rel="stylesheet",r.href=e,s.appendChild(r),t(`[FONT] ${o} font injected!`)};export{$ as Zonos}
|