@zonos/elements 1.3.229 → 1.3.231
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/{buildCartItemsByTempCart-309fcebf.js → buildCartItemsByTempCart-edddbf4b.js} +1 -0
- package/dist/cjs/{cart-ad82a680.js → cart-9b519566.js} +6 -2
- package/dist/cjs/hasInclusivePrice-12605be9.js +24 -0
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{localization-31e3dfe3.js → localization-38af974b.js} +118 -30
- package/dist/cjs/{paypal-88b5e878.js → paypal-e8fa2302.js} +3 -3
- package/dist/cjs/{placeTestOrder-6aefbf9c.js → placeTestOrder-6388881f.js} +11 -7
- package/dist/cjs/{renderFallback-87c908ad.js → renderFallback-bb2c4bce.js} +2 -2
- package/dist/cjs/{translationStore-b8b25e9d.js → translationStore-f2d5eae9.js} +420 -360
- package/dist/cjs/zonos-address_11.cjs.entry.js +21 -5
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +73 -13
- package/dist/cjs/zonos-checkout.cjs.entry.js +9 -6
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
- package/dist/cjs/zonos-collect.cjs.entry.js +6 -6
- package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +12 -5
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +9 -6
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +55 -45
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +68 -7
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +2 -1
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +7 -4
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +54 -43
- package/dist/collection/components/main/zonos-controller.js +5 -2
- package/dist/collection/components/store/hello/localization.js +47 -16
- package/dist/collection/components/store/translationStore/strings.arabic.js +21 -18
- package/dist/collection/components/store/translationStore/strings.base.js +21 -18
- package/dist/collection/components/store/translationStore/strings.chinese.js +21 -18
- package/dist/collection/components/store/translationStore/strings.danish.js +21 -18
- package/dist/collection/components/store/translationStore/strings.dutch.js +21 -18
- package/dist/collection/components/store/translationStore/strings.french.js +21 -18
- package/dist/collection/components/store/translationStore/strings.german.js +21 -18
- package/dist/collection/components/store/translationStore/strings.hebrew.js +21 -18
- package/dist/collection/components/store/translationStore/strings.indonesian.js +21 -18
- package/dist/collection/components/store/translationStore/strings.italian.js +21 -18
- package/dist/collection/components/store/translationStore/strings.japanese.js +21 -18
- package/dist/collection/components/store/translationStore/strings.korean.js +21 -18
- package/dist/collection/components/store/translationStore/strings.norwegian.js +21 -18
- package/dist/collection/components/store/translationStore/strings.polish.js +21 -18
- package/dist/collection/components/store/translationStore/strings.portuguese.js +21 -18
- package/dist/collection/components/store/translationStore/strings.russian.js +21 -18
- package/dist/collection/components/store/translationStore/strings.spanish.js +21 -18
- package/dist/collection/components/store/translationStore/strings.swedish.js +21 -18
- package/dist/collection/components/store/translationStore/strings.turkish.js +21 -18
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +21 -18
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +18 -2
- package/dist/collection/components/utils/api/buildCartItemsByTempCart.js +1 -0
- package/dist/collection/components/utils/api/{getInclusivePricing.js → getInclusivePriceConfigurations.js} +1 -1
- package/dist/collection/components/utils/api/getLocalization.js +2 -5
- package/dist/collection/components/utils/api/getZonosSettings.js +5 -0
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +6 -0
- package/dist/collection/components/utils/checkout/renderCheckoutCurrency.js +10 -5
- package/dist/collection/components/utils/checkout/watchBigcommerceDomesticCheckout.js +4 -1
- package/dist/collection/components/utils/getOverridenZCountry.js +11 -0
- package/dist/collection/components/utils/hasInclusivePrice.js +10 -0
- package/dist/collection/components/utils/hello/currencyConversion/applyInclusiveEffectiveRate.js +10 -0
- package/dist/collection/components/utils/hello/currencyConversion/applyInclusivePrice.js +39 -0
- package/dist/collection/components/utils/hello/currencyConversion/calculateInclusivePrice.js +32 -0
- package/dist/collection/components/utils/hello/currencyConversion/defaultCurrencyConverter.js +11 -6
- package/dist/collection/constants/key.js +9 -0
- package/dist/collection/types/InclusivePricing.js +1 -0
- package/dist/collection/types/generated/graphql.internal.types.js +87 -3
- package/dist/collection/types/index.js +1 -0
- package/dist/collection/utils/performBlurCurrency.js +38 -5
- package/dist/esm/{buildCartItemsByTempCart-c4488f73.js → buildCartItemsByTempCart-a117f75d.js} +1 -0
- package/dist/esm/{cart-c74f9aaa.js → cart-bc0e1598.js} +6 -2
- package/dist/esm/hasInclusivePrice-706cc09d.js +20 -0
- package/dist/esm/index.js +7 -7
- package/dist/esm/{localization-106476cb.js → localization-53f67640.js} +117 -31
- package/dist/esm/{paypal-bf3a2bdd.js → paypal-3a6a048d.js} +3 -3
- package/dist/esm/{placeTestOrder-891295e8.js → placeTestOrder-917731cf.js} +11 -7
- package/dist/esm/{renderFallback-ce0e238a.js → renderFallback-cd0e40d9.js} +2 -2
- package/dist/esm/{translationStore-766b7521.js → translationStore-d241dcf7.js} +420 -360
- package/dist/esm/zonos-address_11.entry.js +21 -5
- package/dist/esm/zonos-cart-items_13.entry.js +73 -13
- package/dist/esm/zonos-checkout.entry.js +9 -6
- package/dist/esm/zonos-collect-cart-items_3.entry.js +3 -3
- package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
- package/dist/esm/zonos-collect.entry.js +6 -6
- package/dist/esm/zonos-confirm-dialog_2.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +12 -5
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +9 -6
- package/dist/esm/zonos-empty-state-payment_4.entry.js +4 -4
- package/dist/esm/zonos-hello-dialog.entry.js +55 -45
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm-es5/buildCartItemsByTempCart-a117f75d.js +1 -0
- package/dist/esm-es5/cart-bc0e1598.js +1 -0
- package/dist/esm-es5/hasInclusivePrice-706cc09d.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/localization-53f67640.js +1 -0
- package/dist/esm-es5/{paypal-bf3a2bdd.js → paypal-3a6a048d.js} +1 -1
- package/dist/esm-es5/placeTestOrder-917731cf.js +1 -0
- package/dist/esm-es5/{renderFallback-ce0e238a.js → renderFallback-cd0e40d9.js} +1 -1
- package/dist/esm-es5/translationStore-d241dcf7.js +1 -0
- package/dist/esm-es5/zonos-address_11.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-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-confirm-dialog_2.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-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-language-select_2.entry.js +1 -1
- package/dist/scripts/blurCurrencyOnInit.js +1 -1
- package/dist/scripts/index.d.ts +39 -6
- 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-cart-subtotal/zonos-cart-subtotal.d.ts +2 -0
- package/dist/types/components/hello/zonos-hello-dialog/zonos-hello-dialog.d.ts +1 -1
- package/dist/types/components/store/checkout/cart.d.ts +3 -0
- package/dist/types/components/store/hello/localization.d.ts +14 -3
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.base.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.danish.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.french.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.german.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.italian.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.korean.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.polish.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.russian.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +18 -15
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +18 -15
- package/dist/types/components/utils/api/getInclusivePriceConfigurations.d.ts +2 -0
- package/dist/types/components/utils/getOverridenZCountry.d.ts +5 -0
- package/dist/types/components/utils/hasInclusivePrice.d.ts +1 -0
- package/dist/types/components/utils/hello/currencyConversion/applyInclusiveEffectiveRate.d.ts +1 -0
- package/dist/types/components/utils/hello/currencyConversion/applyInclusivePrice.d.ts +1 -0
- package/dist/types/components/utils/hello/currencyConversion/calculateInclusivePrice.d.ts +27 -0
- package/dist/types/constants/key.d.ts +9 -0
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +5 -0
- package/dist/types/types/InclusivePricing.d.ts +13 -0
- package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +1 -0
- package/dist/types/types/checkout/api/NormalizedTempCart.d.ts +6 -0
- package/dist/types/types/generated/graphql.internal.types.d.ts +192 -51
- package/dist/types/types/generated/graphql.internal.types.ts +229 -50
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/utils/ZonosSettings.d.ts +2 -0
- package/dist/types/utils/performBlurCurrency.d.ts +12 -0
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-c89e9d56.system.js → p-0047fecf.system.js} +1 -1
- package/dist/zonos-elements/{p-bd373de0.system.entry.js → p-0bc8e55c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-964a4d85.js → p-2008df67.js} +1 -1
- package/dist/zonos-elements/{p-2db90c99.system.entry.js → p-22338b4a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3d2925c5.system.entry.js → p-2eaa5013.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-288f5a5b.system.entry.js → p-304bdbc2.system.entry.js} +1 -1
- package/dist/zonos-elements/p-30981f80.entry.js +1 -0
- package/dist/zonos-elements/{p-69451a50.system.js → p-398d9022.system.js} +1 -1
- package/dist/zonos-elements/p-3a242dfc.system.js +1 -0
- package/dist/zonos-elements/{p-5608ac9d.entry.js → p-3eda5c2c.entry.js} +1 -1
- package/dist/zonos-elements/p-3f0ca5f9.js +1 -0
- package/dist/zonos-elements/{p-23f6a2fb.system.entry.js → p-3f35b8b1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-de984173.system.js → p-419c292c.system.js} +1 -1
- package/dist/zonos-elements/{p-7a97e1cf.system.entry.js → p-4697f061.system.entry.js} +1 -1
- package/dist/zonos-elements/p-4f5be8f0.entry.js +1 -0
- package/dist/zonos-elements/p-516a9666.system.js +1 -0
- package/dist/zonos-elements/p-55c6ff14.system.entry.js +1 -0
- package/dist/zonos-elements/p-6d563f33.system.entry.js +1 -0
- package/dist/zonos-elements/{p-9c728733.system.js → p-7730879e.system.js} +1 -1
- package/dist/zonos-elements/p-7920d79c.system.js +1 -0
- package/dist/zonos-elements/p-7c96a585.js +1 -0
- package/dist/zonos-elements/p-81b357f7.system.js +1 -1
- package/dist/zonos-elements/{p-29c80a34.js → p-83666056.js} +1 -1
- package/dist/zonos-elements/{p-2b84039a.entry.js → p-91fa43ef.entry.js} +1 -1
- package/dist/zonos-elements/p-9a444a82.system.entry.js +1 -0
- package/dist/zonos-elements/p-9bdad585.system.entry.js +1 -0
- package/dist/zonos-elements/p-abc0fb80.js +1 -0
- package/dist/zonos-elements/{p-b0a75761.entry.js → p-ac26a931.entry.js} +1 -1
- package/dist/zonos-elements/p-bb707dfd.system.js +1 -0
- package/dist/zonos-elements/{p-10894d36.entry.js → p-bc963b03.entry.js} +1 -1
- package/dist/zonos-elements/p-c0e080e3.js +1 -0
- package/dist/zonos-elements/p-c20429ea.entry.js +1 -0
- package/dist/zonos-elements/p-c28da00e.entry.js +1 -0
- package/dist/zonos-elements/p-c9be03e0.entry.js +1 -0
- package/dist/zonos-elements/{p-6c8e4f01.system.entry.js → p-cb70de13.system.entry.js} +1 -1
- package/dist/zonos-elements/p-cec35a21.entry.js +1 -0
- package/dist/zonos-elements/{p-cf56b990.entry.js → p-d15cd138.entry.js} +1 -1
- package/dist/zonos-elements/{p-6f1024de.system.entry.js → p-d852d6da.system.entry.js} +1 -1
- package/dist/zonos-elements/p-d9486c57.entry.js +1 -0
- package/dist/zonos-elements/p-db73c11a.entry.js +1 -0
- package/dist/zonos-elements/{p-203c7fda.js → p-e27a9450.js} +1 -1
- package/dist/zonos-elements/{p-76f924b3.entry.js → p-ede9e968.entry.js} +1 -1
- package/dist/zonos-elements/p-ee8fcde6.js +1 -0
- package/dist/zonos-elements/p-f688d7a4.system.js +1 -0
- package/dist/zonos-elements/{p-236e0144.system.entry.js → p-ff1722d0.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ff522088.system.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +3 -3
- package/dist/esm-es5/buildCartItemsByTempCart-c4488f73.js +0 -1
- package/dist/esm-es5/cart-c74f9aaa.js +0 -1
- package/dist/esm-es5/localization-106476cb.js +0 -1
- package/dist/esm-es5/placeTestOrder-891295e8.js +0 -1
- package/dist/esm-es5/translationStore-766b7521.js +0 -1
- package/dist/types/components/utils/api/getInclusivePricing.d.ts +0 -6
- package/dist/zonos-elements/p-053a042e.entry.js +0 -1
- package/dist/zonos-elements/p-0d3767ec.entry.js +0 -1
- package/dist/zonos-elements/p-1d15662c.js +0 -1
- package/dist/zonos-elements/p-21b251f0.system.entry.js +0 -1
- package/dist/zonos-elements/p-225a61c4.system.entry.js +0 -1
- package/dist/zonos-elements/p-462f8857.entry.js +0 -1
- package/dist/zonos-elements/p-57ee34aa.system.entry.js +0 -1
- package/dist/zonos-elements/p-595668d7.system.js +0 -1
- package/dist/zonos-elements/p-62803534.entry.js +0 -1
- package/dist/zonos-elements/p-6497ce22.entry.js +0 -1
- package/dist/zonos-elements/p-65db3219.entry.js +0 -1
- package/dist/zonos-elements/p-94853366.system.entry.js +0 -1
- package/dist/zonos-elements/p-9972941a.entry.js +0 -1
- package/dist/zonos-elements/p-ad7be556.system.entry.js +0 -1
- package/dist/zonos-elements/p-b4fe3604.system.js +0 -1
- package/dist/zonos-elements/p-b8293509.js +0 -1
- package/dist/zonos-elements/p-c3c3cd98.js +0 -1
- package/dist/zonos-elements/p-cdaf52f4.system.js +0 -1
- package/dist/zonos-elements/p-cef1e888.system.js +0 -1
- package/dist/zonos-elements/p-eea0d8af.js +0 -1
- package/dist/zonos-elements/p-f4085c23.entry.js +0 -1
|
@@ -1598,6 +1598,14 @@ export const customsSpecAttributeType = {
|
|
|
1598
1598
|
export type CustomsSpecAttributeType =
|
|
1599
1599
|
(typeof customsSpecAttributeType)[keyof typeof customsSpecAttributeType];
|
|
1600
1600
|
|
|
1601
|
+
export const customsSpecEndUseType = {
|
|
1602
|
+
ForResale: 'FOR_RESALE',
|
|
1603
|
+
NotForResale: 'NOT_FOR_RESALE',
|
|
1604
|
+
} as const;
|
|
1605
|
+
|
|
1606
|
+
export type CustomsSpecEndUseType =
|
|
1607
|
+
(typeof customsSpecEndUseType)[keyof typeof customsSpecEndUseType];
|
|
1608
|
+
|
|
1601
1609
|
export const customsSpecSourceType = {
|
|
1602
1610
|
ApiRequest: 'API_REQUEST',
|
|
1603
1611
|
Catalog: 'CATALOG',
|
|
@@ -1645,6 +1653,32 @@ export const deMinimisType = {
|
|
|
1645
1653
|
} as const;
|
|
1646
1654
|
|
|
1647
1655
|
export type DeMinimisType = (typeof deMinimisType)[keyof typeof deMinimisType];
|
|
1656
|
+
|
|
1657
|
+
export const declarationPaymentStatus = {
|
|
1658
|
+
Open: 'OPEN',
|
|
1659
|
+
Paid: 'PAID',
|
|
1660
|
+
} as const;
|
|
1661
|
+
|
|
1662
|
+
export type DeclarationPaymentStatus =
|
|
1663
|
+
(typeof declarationPaymentStatus)[keyof typeof declarationPaymentStatus];
|
|
1664
|
+
export const declarationSource = {
|
|
1665
|
+
Post: 'POST',
|
|
1666
|
+
Prepay: 'PREPAY',
|
|
1667
|
+
Zonos: 'ZONOS',
|
|
1668
|
+
} as const;
|
|
1669
|
+
|
|
1670
|
+
export type DeclarationSource =
|
|
1671
|
+
(typeof declarationSource)[keyof typeof declarationSource];
|
|
1672
|
+
export const declarationStatus = {
|
|
1673
|
+
ItmattReceived: 'ITMATT_RECEIVED',
|
|
1674
|
+
Open: 'OPEN',
|
|
1675
|
+
PartiallyShipped: 'PARTIALLY_SHIPPED',
|
|
1676
|
+
Shipped: 'SHIPPED',
|
|
1677
|
+
} as const;
|
|
1678
|
+
|
|
1679
|
+
export type DeclarationStatus =
|
|
1680
|
+
(typeof declarationStatus)[keyof typeof declarationStatus];
|
|
1681
|
+
|
|
1648
1682
|
export const deleteJobStatus = {
|
|
1649
1683
|
Completed: 'COMPLETED',
|
|
1650
1684
|
Error: 'ERROR',
|
|
@@ -2604,6 +2638,7 @@ export type LandedCostCalculationMethod =
|
|
|
2604
2638
|
|
|
2605
2639
|
export const landedCostEndUse = {
|
|
2606
2640
|
ForResale: 'FOR_RESALE',
|
|
2641
|
+
Gift: 'GIFT',
|
|
2607
2642
|
NotForResale: 'NOT_FOR_RESALE',
|
|
2608
2643
|
} as const;
|
|
2609
2644
|
|
|
@@ -3189,6 +3224,7 @@ export const partyType = {
|
|
|
3189
3224
|
export type PartyType = (typeof partyType)[keyof typeof partyType];
|
|
3190
3225
|
|
|
3191
3226
|
export const paymentProcessorCode = {
|
|
3227
|
+
Na: 'NA',
|
|
3192
3228
|
Paypal: 'PAYPAL',
|
|
3193
3229
|
Stripe: 'STRIPE',
|
|
3194
3230
|
StripeTransfer: 'STRIPE_TRANSFER',
|
|
@@ -3501,6 +3537,63 @@ export const shipmentConsolidationStatus = {
|
|
|
3501
3537
|
export type ShipmentConsolidationStatus =
|
|
3502
3538
|
(typeof shipmentConsolidationStatus)[keyof typeof shipmentConsolidationStatus];
|
|
3503
3539
|
|
|
3540
|
+
export const shipmentPackagingTypeCode = {
|
|
3541
|
+
Bpm: 'BPM',
|
|
3542
|
+
BpmFlat: 'BPM_FLAT',
|
|
3543
|
+
BpmParcel: 'BPM_PARCEL',
|
|
3544
|
+
CustomerSuppliedPackage: 'CUSTOMER_SUPPLIED_PACKAGE',
|
|
3545
|
+
DhlBottleBox_1: 'DHL_BOTTLE_BOX_1',
|
|
3546
|
+
DhlBottleBox_2: 'DHL_BOTTLE_BOX_2',
|
|
3547
|
+
DhlBottleBox_3: 'DHL_BOTTLE_BOX_3',
|
|
3548
|
+
DhlBottleBox_6: 'DHL_BOTTLE_BOX_6',
|
|
3549
|
+
DhlBox_2A: 'DHL_BOX_2A',
|
|
3550
|
+
DhlBox_2B: 'DHL_BOX_2B',
|
|
3551
|
+
DhlBox_2C: 'DHL_BOX_2C',
|
|
3552
|
+
DhlBox_3: 'DHL_BOX_3',
|
|
3553
|
+
DhlBox_4: 'DHL_BOX_4',
|
|
3554
|
+
DhlBox_5: 'DHL_BOX_5',
|
|
3555
|
+
DhlBox_6: 'DHL_BOX_6',
|
|
3556
|
+
DhlBox_7: 'DHL_BOX_7',
|
|
3557
|
+
DhlBox_8: 'DHL_BOX_8',
|
|
3558
|
+
DhlCardEnvelope: 'DHL_CARD_ENVELOPE',
|
|
3559
|
+
DhlCardEnvelopeImperial: 'DHL_CARD_ENVELOPE_IMPERIAL',
|
|
3560
|
+
DhlExpressEnvelope: 'DHL_EXPRESS_ENVELOPE',
|
|
3561
|
+
DhlTubeLarge: 'DHL_TUBE_LARGE',
|
|
3562
|
+
DhlTubeSmall: 'DHL_TUBE_SMALL',
|
|
3563
|
+
DhlWineBottleBox_2: 'DHL_WINE_BOTTLE_BOX_2',
|
|
3564
|
+
DhlWineBottleBox_3: 'DHL_WINE_BOTTLE_BOX_3',
|
|
3565
|
+
DhlWineBottleBox_4: 'DHL_WINE_BOTTLE_BOX_4',
|
|
3566
|
+
DhlWineBottleBox_5: 'DHL_WINE_BOTTLE_BOX_5',
|
|
3567
|
+
FedexBox: 'FEDEX_BOX',
|
|
3568
|
+
FedexEnvelope: 'FEDEX_ENVELOPE',
|
|
3569
|
+
FedexPak: 'FEDEX_PAK',
|
|
3570
|
+
FedexTube: 'FEDEX_TUBE',
|
|
3571
|
+
Fedex_10KgBox: 'FEDEX_10KG_BOX',
|
|
3572
|
+
Fedex_25KgBox: 'FEDEX_25KG_BOX',
|
|
3573
|
+
FirstClass: 'FIRST_CLASS',
|
|
3574
|
+
Flats: 'FLATS',
|
|
3575
|
+
Irregulars: 'IRREGULARS',
|
|
3576
|
+
LargeExpressBox: 'LARGE_EXPRESS_BOX',
|
|
3577
|
+
Machineables: 'MACHINEABLES',
|
|
3578
|
+
MediaMail: 'MEDIA_MAIL',
|
|
3579
|
+
MediumExpressBox: 'MEDIUM_EXPRESS_BOX',
|
|
3580
|
+
Pak: 'PAK',
|
|
3581
|
+
Pallet: 'PALLET',
|
|
3582
|
+
ParcelPost: 'PARCEL_POST',
|
|
3583
|
+
Parcels: 'PARCELS',
|
|
3584
|
+
Priority: 'PRIORITY',
|
|
3585
|
+
SmallExpressBox: 'SMALL_EXPRESS_BOX',
|
|
3586
|
+
StandardFlat: 'STANDARD_FLAT',
|
|
3587
|
+
Tube: 'TUBE',
|
|
3588
|
+
UpsExpressBox: 'UPS_EXPRESS_BOX',
|
|
3589
|
+
UpsLetter: 'UPS_LETTER',
|
|
3590
|
+
Ups_10KgBox: 'UPS_10KG_BOX',
|
|
3591
|
+
Ups_25KgBox: 'UPS_25KG_BOX',
|
|
3592
|
+
YourPackaging: 'YOUR_PACKAGING',
|
|
3593
|
+
} as const;
|
|
3594
|
+
|
|
3595
|
+
export type ShipmentPackagingTypeCode =
|
|
3596
|
+
(typeof shipmentPackagingTypeCode)[keyof typeof shipmentPackagingTypeCode];
|
|
3504
3597
|
export const shipmentRatingAmountTargetType = {
|
|
3505
3598
|
BillingCompany: 'BILLING_COMPANY',
|
|
3506
3599
|
MerchantBase: 'MERCHANT_BASE',
|
|
@@ -4380,6 +4473,14 @@ export type GetCartInfoQuery = {
|
|
|
4380
4473
|
};
|
|
4381
4474
|
};
|
|
4382
4475
|
|
|
4476
|
+
export type InclusivePriceConfigurationsSyncMutation = {
|
|
4477
|
+
inclusivePriceConfigurationsSync: Array<{
|
|
4478
|
+
dutyConfiguration: { status: InclusivePriceConfigurationStatus } | null;
|
|
4479
|
+
shipToCountry: CountryCode;
|
|
4480
|
+
taxConfiguration: { status: InclusivePriceConfigurationStatus };
|
|
4481
|
+
}>;
|
|
4482
|
+
};
|
|
4483
|
+
|
|
4383
4484
|
export type OrganizationByStoreIdQuery = {
|
|
4384
4485
|
organizations: {
|
|
4385
4486
|
edges: Array<{ node: { id: string; name: string } | null }>;
|
|
@@ -4414,6 +4515,9 @@ export type CartCalculateLandedCostMutation = {
|
|
|
4414
4515
|
productId: string;
|
|
4415
4516
|
quantity: number;
|
|
4416
4517
|
restriction: { action: RestrictedItemAction; reason: string } | null;
|
|
4518
|
+
reverseAmountDetail: Array<{
|
|
4519
|
+
inclusivePriceConfigurationId: string | null;
|
|
4520
|
+
}> | null;
|
|
4417
4521
|
sku: string | null;
|
|
4418
4522
|
}>;
|
|
4419
4523
|
};
|
|
@@ -4538,6 +4642,9 @@ export type CalculateLandedCostMutation = {
|
|
|
4538
4642
|
productId: string;
|
|
4539
4643
|
quantity: number;
|
|
4540
4644
|
restriction: { action: RestrictedItemAction; reason: string } | null;
|
|
4645
|
+
reverseAmountDetail: Array<{
|
|
4646
|
+
inclusivePriceConfigurationId: string | null;
|
|
4647
|
+
}> | null;
|
|
4541
4648
|
sku: string | null;
|
|
4542
4649
|
}>;
|
|
4543
4650
|
landedCostCalculateWorkflow: Array<{
|
|
@@ -4605,6 +4712,9 @@ export type CartItemFragmentFragment = {
|
|
|
4605
4712
|
productId: string;
|
|
4606
4713
|
quantity: number;
|
|
4607
4714
|
restriction: { action: RestrictedItemAction; reason: string } | null;
|
|
4715
|
+
reverseAmountDetail: Array<{
|
|
4716
|
+
inclusivePriceConfigurationId: string | null;
|
|
4717
|
+
}> | null;
|
|
4608
4718
|
sku: string | null;
|
|
4609
4719
|
};
|
|
4610
4720
|
|
|
@@ -4831,9 +4941,9 @@ export type CheckoutSessionCreateMutation = {
|
|
|
4831
4941
|
email: string | null;
|
|
4832
4942
|
line1: string;
|
|
4833
4943
|
line2: string | null;
|
|
4834
|
-
locality: string;
|
|
4835
|
-
name: string | null;
|
|
4836
4944
|
phone: string | null;
|
|
4945
|
+
name: string | null;
|
|
4946
|
+
locality: string;
|
|
4837
4947
|
postalCode: string;
|
|
4838
4948
|
}> | null;
|
|
4839
4949
|
name: string | null;
|
|
@@ -4856,21 +4966,21 @@ export type CheckoutSessionCreateMutation = {
|
|
|
4856
4966
|
source: AdjustmentSource | null;
|
|
4857
4967
|
} | null;
|
|
4858
4968
|
amount: number;
|
|
4859
|
-
item: { amount: number } | null;
|
|
4860
4969
|
type: LandedCostAdjustmentType | null;
|
|
4970
|
+
item: { amount: number } | null;
|
|
4861
4971
|
}> | null;
|
|
4862
4972
|
currencyCode: CurrencyCode;
|
|
4863
4973
|
deMinimis: Array<{
|
|
4864
|
-
|
|
4974
|
+
type: DeMinimisType;
|
|
4865
4975
|
threshold: DeMinimisThreshold;
|
|
4866
4976
|
method: IncotermCode;
|
|
4867
4977
|
note: string;
|
|
4868
|
-
|
|
4978
|
+
formula: string;
|
|
4869
4979
|
}>;
|
|
4870
4980
|
duties: Array<{ amount: number; currencyCode: CurrencyCode }>;
|
|
4871
4981
|
fees: Array<{ amount: number; currencyCode: CurrencyCode }>;
|
|
4872
|
-
id: string;
|
|
4873
4982
|
landedCostGuaranteeCode: LandedCostGuaranteeCode;
|
|
4983
|
+
id: string;
|
|
4874
4984
|
method: IncotermCode;
|
|
4875
4985
|
remittance: Array<{ amount: number; description: string }>;
|
|
4876
4986
|
rootId: string;
|
|
@@ -4893,6 +5003,7 @@ export type CheckoutSessionCreateMutation = {
|
|
|
4893
5003
|
} | null;
|
|
4894
5004
|
metadata: Array<{ key: string; value: string } | null> | null;
|
|
4895
5005
|
organizationId: string;
|
|
5006
|
+
references: { inclusivePriceConfigurationId: string | null } | null;
|
|
4896
5007
|
subtotals: {
|
|
4897
5008
|
adjustments: number;
|
|
4898
5009
|
duties: number;
|
|
@@ -4931,9 +5042,9 @@ export type CheckoutSessionPaymentIntentCreateMutation = {
|
|
|
4931
5042
|
email: string | null;
|
|
4932
5043
|
line1: string;
|
|
4933
5044
|
line2: string | null;
|
|
4934
|
-
locality: string;
|
|
4935
|
-
name: string | null;
|
|
4936
5045
|
phone: string | null;
|
|
5046
|
+
name: string | null;
|
|
5047
|
+
locality: string;
|
|
4937
5048
|
postalCode: string;
|
|
4938
5049
|
}> | null;
|
|
4939
5050
|
name: string | null;
|
|
@@ -4956,21 +5067,21 @@ export type CheckoutSessionPaymentIntentCreateMutation = {
|
|
|
4956
5067
|
source: AdjustmentSource | null;
|
|
4957
5068
|
} | null;
|
|
4958
5069
|
amount: number;
|
|
4959
|
-
item: { amount: number } | null;
|
|
4960
5070
|
type: LandedCostAdjustmentType | null;
|
|
5071
|
+
item: { amount: number } | null;
|
|
4961
5072
|
}> | null;
|
|
4962
5073
|
currencyCode: CurrencyCode;
|
|
4963
5074
|
deMinimis: Array<{
|
|
4964
|
-
|
|
5075
|
+
type: DeMinimisType;
|
|
4965
5076
|
threshold: DeMinimisThreshold;
|
|
4966
5077
|
method: IncotermCode;
|
|
4967
5078
|
note: string;
|
|
4968
|
-
|
|
5079
|
+
formula: string;
|
|
4969
5080
|
}>;
|
|
4970
5081
|
duties: Array<{ amount: number; currencyCode: CurrencyCode }>;
|
|
4971
5082
|
fees: Array<{ amount: number; currencyCode: CurrencyCode }>;
|
|
4972
|
-
id: string;
|
|
4973
5083
|
landedCostGuaranteeCode: LandedCostGuaranteeCode;
|
|
5084
|
+
id: string;
|
|
4974
5085
|
method: IncotermCode;
|
|
4975
5086
|
remittance: Array<{ amount: number; description: string }>;
|
|
4976
5087
|
rootId: string;
|
|
@@ -4993,6 +5104,7 @@ export type CheckoutSessionPaymentIntentCreateMutation = {
|
|
|
4993
5104
|
} | null;
|
|
4994
5105
|
metadata: Array<{ key: string; value: string } | null> | null;
|
|
4995
5106
|
organizationId: string;
|
|
5107
|
+
references: { inclusivePriceConfigurationId: string | null } | null;
|
|
4996
5108
|
subtotals: {
|
|
4997
5109
|
adjustments: number;
|
|
4998
5110
|
duties: number;
|
|
@@ -5103,6 +5215,10 @@ export type CartCheckoutWorkflowQuery = {
|
|
|
5103
5215
|
unitOfMeasure: ItemUnitOfMeasure;
|
|
5104
5216
|
value: number;
|
|
5105
5217
|
} | null> | null;
|
|
5218
|
+
metadata: Array<{
|
|
5219
|
+
key: string | null;
|
|
5220
|
+
value: string | null;
|
|
5221
|
+
} | null> | null;
|
|
5106
5222
|
name: string | null;
|
|
5107
5223
|
productId: string;
|
|
5108
5224
|
quantity: number;
|
|
@@ -5237,28 +5353,33 @@ export type PaypalOrderQuery = {
|
|
|
5237
5353
|
|
|
5238
5354
|
export type ActiveDiscountsQuery = { rules: { totalCount: number } | null };
|
|
5239
5355
|
|
|
5240
|
-
export type
|
|
5241
|
-
|
|
5242
|
-
fee: { status: InclusivePriceSettingAdjustmentStatus };
|
|
5243
|
-
id: string;
|
|
5244
|
-
status: InclusivePriceSettingStatus;
|
|
5245
|
-
tax: { status: InclusivePriceSettingAdjustmentStatus };
|
|
5246
|
-
};
|
|
5247
|
-
|
|
5248
|
-
export type GetInclusivePriceSettingByCountryQuery = {
|
|
5249
|
-
inclusivePriceSettings: {
|
|
5356
|
+
export type InclusivePriceConfigurationsQuery = {
|
|
5357
|
+
inclusivePriceConfigurations: {
|
|
5250
5358
|
edges: Array<{
|
|
5251
5359
|
node: {
|
|
5252
|
-
|
|
5253
|
-
|
|
5360
|
+
dutyConfiguration: {
|
|
5361
|
+
rate: number;
|
|
5362
|
+
status: InclusivePriceConfigurationStatus;
|
|
5363
|
+
} | null;
|
|
5364
|
+
effectiveRate: number;
|
|
5365
|
+
feeConfiguration: { externalRate: number; internalRate: number } | null;
|
|
5254
5366
|
id: string;
|
|
5255
|
-
|
|
5256
|
-
|
|
5367
|
+
shipToCountry: CountryCode;
|
|
5368
|
+
taxConfiguration: {
|
|
5369
|
+
rate: number;
|
|
5370
|
+
status: InclusivePriceConfigurationStatus;
|
|
5371
|
+
};
|
|
5257
5372
|
};
|
|
5258
5373
|
}>;
|
|
5259
5374
|
} | null;
|
|
5260
5375
|
};
|
|
5261
5376
|
|
|
5377
|
+
export type InclusivePriceConfigurationIdQuery = {
|
|
5378
|
+
inclusivePriceConfigurations: {
|
|
5379
|
+
edges: Array<{ node: { id: string } }>;
|
|
5380
|
+
} | null;
|
|
5381
|
+
};
|
|
5382
|
+
|
|
5262
5383
|
export type CheckoutSessionOrderCreateMutation = {
|
|
5263
5384
|
checkoutSessionOrderCreate: { order: { id: string } | null };
|
|
5264
5385
|
};
|
|
@@ -5438,6 +5559,16 @@ export type GetCheckoutSessionAttributesQuery = {
|
|
|
5438
5559
|
checkoutSession: { attributes: Array<{ key: string; value: string }> };
|
|
5439
5560
|
};
|
|
5440
5561
|
|
|
5562
|
+
export type GetCheckoutSessionReferencesQuery = {
|
|
5563
|
+
checkoutSession: {
|
|
5564
|
+
attributes: Array<{ key: string; value: string }>;
|
|
5565
|
+
references: {
|
|
5566
|
+
inclusivePriceConfigurationId: string | null;
|
|
5567
|
+
orderChargeId: string | null;
|
|
5568
|
+
} | null;
|
|
5569
|
+
};
|
|
5570
|
+
};
|
|
5571
|
+
|
|
5441
5572
|
export type CheckoutSessionUpdateAttributesMutation = {
|
|
5442
5573
|
checkoutSessionUpdate: {
|
|
5443
5574
|
attributes: Array<{ key: string; value: string }>;
|
|
@@ -5470,9 +5601,9 @@ export type CheckoutSessionDetailsFragment = {
|
|
|
5470
5601
|
email: string | null;
|
|
5471
5602
|
line1: string;
|
|
5472
5603
|
line2: string | null;
|
|
5473
|
-
locality: string;
|
|
5474
|
-
name: string | null;
|
|
5475
5604
|
phone: string | null;
|
|
5605
|
+
name: string | null;
|
|
5606
|
+
locality: string;
|
|
5476
5607
|
postalCode: string;
|
|
5477
5608
|
}> | null;
|
|
5478
5609
|
name: string | null;
|
|
@@ -5495,21 +5626,21 @@ export type CheckoutSessionDetailsFragment = {
|
|
|
5495
5626
|
source: AdjustmentSource | null;
|
|
5496
5627
|
} | null;
|
|
5497
5628
|
amount: number;
|
|
5498
|
-
item: { amount: number } | null;
|
|
5499
5629
|
type: LandedCostAdjustmentType | null;
|
|
5630
|
+
item: { amount: number } | null;
|
|
5500
5631
|
}> | null;
|
|
5501
5632
|
currencyCode: CurrencyCode;
|
|
5502
5633
|
deMinimis: Array<{
|
|
5503
|
-
|
|
5634
|
+
type: DeMinimisType;
|
|
5504
5635
|
threshold: DeMinimisThreshold;
|
|
5505
5636
|
method: IncotermCode;
|
|
5506
5637
|
note: string;
|
|
5507
|
-
|
|
5638
|
+
formula: string;
|
|
5508
5639
|
}>;
|
|
5509
5640
|
duties: Array<{ amount: number; currencyCode: CurrencyCode }>;
|
|
5510
5641
|
fees: Array<{ amount: number; currencyCode: CurrencyCode }>;
|
|
5511
|
-
id: string;
|
|
5512
5642
|
landedCostGuaranteeCode: LandedCostGuaranteeCode;
|
|
5643
|
+
id: string;
|
|
5513
5644
|
method: IncotermCode;
|
|
5514
5645
|
remittance: Array<{ amount: number; description: string }>;
|
|
5515
5646
|
rootId: string;
|
|
@@ -5532,6 +5663,7 @@ export type CheckoutSessionDetailsFragment = {
|
|
|
5532
5663
|
} | null;
|
|
5533
5664
|
metadata: Array<{ key: string; value: string } | null> | null;
|
|
5534
5665
|
organizationId: string;
|
|
5666
|
+
references: { inclusivePriceConfigurationId: string | null } | null;
|
|
5535
5667
|
subtotals: {
|
|
5536
5668
|
adjustments: number;
|
|
5537
5669
|
duties: number;
|
|
@@ -5569,9 +5701,9 @@ export type CheckoutSessionUpdateMutation = {
|
|
|
5569
5701
|
email: string | null;
|
|
5570
5702
|
line1: string;
|
|
5571
5703
|
line2: string | null;
|
|
5572
|
-
locality: string;
|
|
5573
|
-
name: string | null;
|
|
5574
5704
|
phone: string | null;
|
|
5705
|
+
name: string | null;
|
|
5706
|
+
locality: string;
|
|
5575
5707
|
postalCode: string;
|
|
5576
5708
|
}> | null;
|
|
5577
5709
|
name: string | null;
|
|
@@ -5594,21 +5726,21 @@ export type CheckoutSessionUpdateMutation = {
|
|
|
5594
5726
|
source: AdjustmentSource | null;
|
|
5595
5727
|
} | null;
|
|
5596
5728
|
amount: number;
|
|
5597
|
-
item: { amount: number } | null;
|
|
5598
5729
|
type: LandedCostAdjustmentType | null;
|
|
5730
|
+
item: { amount: number } | null;
|
|
5599
5731
|
}> | null;
|
|
5600
5732
|
currencyCode: CurrencyCode;
|
|
5601
5733
|
deMinimis: Array<{
|
|
5602
|
-
|
|
5734
|
+
type: DeMinimisType;
|
|
5603
5735
|
threshold: DeMinimisThreshold;
|
|
5604
5736
|
method: IncotermCode;
|
|
5605
5737
|
note: string;
|
|
5606
|
-
|
|
5738
|
+
formula: string;
|
|
5607
5739
|
}>;
|
|
5608
5740
|
duties: Array<{ amount: number; currencyCode: CurrencyCode }>;
|
|
5609
5741
|
fees: Array<{ amount: number; currencyCode: CurrencyCode }>;
|
|
5610
|
-
id: string;
|
|
5611
5742
|
landedCostGuaranteeCode: LandedCostGuaranteeCode;
|
|
5743
|
+
id: string;
|
|
5612
5744
|
method: IncotermCode;
|
|
5613
5745
|
remittance: Array<{ amount: number; description: string }>;
|
|
5614
5746
|
rootId: string;
|
|
@@ -5631,6 +5763,7 @@ export type CheckoutSessionUpdateMutation = {
|
|
|
5631
5763
|
} | null;
|
|
5632
5764
|
metadata: Array<{ key: string; value: string } | null> | null;
|
|
5633
5765
|
organizationId: string;
|
|
5766
|
+
references: { inclusivePriceConfigurationId: string | null } | null;
|
|
5634
5767
|
subtotals: {
|
|
5635
5768
|
adjustments: number;
|
|
5636
5769
|
duties: number;
|
|
@@ -6187,6 +6320,10 @@ export type CartQuery = {
|
|
|
6187
6320
|
unitOfMeasure: ItemUnitOfMeasure;
|
|
6188
6321
|
value: number;
|
|
6189
6322
|
} | null> | null;
|
|
6323
|
+
metadata: Array<{
|
|
6324
|
+
key: string | null;
|
|
6325
|
+
value: string | null;
|
|
6326
|
+
} | null> | null;
|
|
6190
6327
|
name: string | null;
|
|
6191
6328
|
productId: string;
|
|
6192
6329
|
quantity: number;
|
|
@@ -6694,32 +6831,31 @@ export function getSdk(
|
|
|
6694
6831
|
'query',
|
|
6695
6832
|
);
|
|
6696
6833
|
},
|
|
6697
|
-
|
|
6834
|
+
getCheckoutSessionReferences(
|
|
6698
6835
|
variables?: { [x: string]: never },
|
|
6699
6836
|
requestHeaders?: GraphQLClientRequestHeaders,
|
|
6700
|
-
): Promise<
|
|
6837
|
+
): Promise<GetCheckoutSessionReferencesQuery> {
|
|
6701
6838
|
return withWrapper(
|
|
6702
6839
|
wrappedRequestHeaders =>
|
|
6703
|
-
client.request<
|
|
6840
|
+
client.request<GetCheckoutSessionReferencesQuery>('', variables, {
|
|
6704
6841
|
...requestHeaders,
|
|
6705
6842
|
...wrappedRequestHeaders,
|
|
6706
6843
|
}),
|
|
6707
|
-
'
|
|
6844
|
+
'getCheckoutSessionReferences',
|
|
6708
6845
|
'query',
|
|
6709
6846
|
);
|
|
6710
6847
|
},
|
|
6711
|
-
|
|
6848
|
+
getCollectCheckoutSession(
|
|
6712
6849
|
variables?: { [x: string]: never },
|
|
6713
6850
|
requestHeaders?: GraphQLClientRequestHeaders,
|
|
6714
|
-
): Promise<
|
|
6851
|
+
): Promise<GetCollectCheckoutSessionQuery> {
|
|
6715
6852
|
return withWrapper(
|
|
6716
6853
|
wrappedRequestHeaders =>
|
|
6717
|
-
client.request<
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
'getInclusivePriceSettingByCountry',
|
|
6854
|
+
client.request<GetCollectCheckoutSessionQuery>('', variables, {
|
|
6855
|
+
...requestHeaders,
|
|
6856
|
+
...wrappedRequestHeaders,
|
|
6857
|
+
}),
|
|
6858
|
+
'getCollectCheckoutSession',
|
|
6723
6859
|
'query',
|
|
6724
6860
|
);
|
|
6725
6861
|
},
|
|
@@ -6835,6 +6971,49 @@ export function getSdk(
|
|
|
6835
6971
|
'query',
|
|
6836
6972
|
);
|
|
6837
6973
|
},
|
|
6974
|
+
inclusivePriceConfigurationId(
|
|
6975
|
+
variables?: { [x: string]: never },
|
|
6976
|
+
requestHeaders?: GraphQLClientRequestHeaders,
|
|
6977
|
+
): Promise<InclusivePriceConfigurationIdQuery> {
|
|
6978
|
+
return withWrapper(
|
|
6979
|
+
wrappedRequestHeaders =>
|
|
6980
|
+
client.request<InclusivePriceConfigurationIdQuery>('', variables, {
|
|
6981
|
+
...requestHeaders,
|
|
6982
|
+
...wrappedRequestHeaders,
|
|
6983
|
+
}),
|
|
6984
|
+
'inclusivePriceConfigurationId',
|
|
6985
|
+
'query',
|
|
6986
|
+
);
|
|
6987
|
+
},
|
|
6988
|
+
inclusivePriceConfigurations(
|
|
6989
|
+
variables?: { [x: string]: never },
|
|
6990
|
+
requestHeaders?: GraphQLClientRequestHeaders,
|
|
6991
|
+
): Promise<InclusivePriceConfigurationsQuery> {
|
|
6992
|
+
return withWrapper(
|
|
6993
|
+
wrappedRequestHeaders =>
|
|
6994
|
+
client.request<InclusivePriceConfigurationsQuery>('', variables, {
|
|
6995
|
+
...requestHeaders,
|
|
6996
|
+
...wrappedRequestHeaders,
|
|
6997
|
+
}),
|
|
6998
|
+
'inclusivePriceConfigurations',
|
|
6999
|
+
'query',
|
|
7000
|
+
);
|
|
7001
|
+
},
|
|
7002
|
+
inclusivePriceConfigurationsSync(
|
|
7003
|
+
variables?: { [x: string]: never },
|
|
7004
|
+
requestHeaders?: GraphQLClientRequestHeaders,
|
|
7005
|
+
): Promise<InclusivePriceConfigurationsSyncMutation> {
|
|
7006
|
+
return withWrapper(
|
|
7007
|
+
wrappedRequestHeaders =>
|
|
7008
|
+
client.request<InclusivePriceConfigurationsSyncMutation>(
|
|
7009
|
+
'',
|
|
7010
|
+
variables,
|
|
7011
|
+
{ ...requestHeaders, ...wrappedRequestHeaders },
|
|
7012
|
+
),
|
|
7013
|
+
'inclusivePriceConfigurationsSync',
|
|
7014
|
+
'mutation',
|
|
7015
|
+
);
|
|
7016
|
+
},
|
|
6838
7017
|
landedCostSettings(
|
|
6839
7018
|
variables?: { [x: string]: never },
|
|
6840
7019
|
requestHeaders?: GraphQLClientRequestHeaders,
|
|
@@ -17,6 +17,7 @@ export * from './checkout/CheckoutConfig';
|
|
|
17
17
|
export * from './checkout/TaxId';
|
|
18
18
|
export * from './ConversionEvent';
|
|
19
19
|
export * from './hello/HelloConfig';
|
|
20
|
+
export * from './InclusivePricing';
|
|
20
21
|
export * from './JsonError';
|
|
21
22
|
export * from './LogError';
|
|
22
23
|
export * from './LogLoadScript';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CountryFields } from "../CountryFields";
|
|
2
2
|
import type { AppearanceSettingsQuery, CheckoutSettingsQuery, CountryCode, HelloSettingsQuery, LandedCostSettingsQuery, OnlineStoreSettingsQuery, OrganizationQuery, ShippingZonesQuery } from "../generated/graphql.internal.types";
|
|
3
|
+
import type { InclusivePriceConfigurationResponse } from "../InclusivePricing";
|
|
3
4
|
export type GenericZonosSettings = {
|
|
4
5
|
/**
|
|
5
6
|
* Whether to blur the currency while initializing Zonos to avoid price flickering.
|
|
@@ -45,6 +46,7 @@ export type GenericZonosSettings = {
|
|
|
45
46
|
usdSettlementCountryEnabled?: CountryCode[];
|
|
46
47
|
};
|
|
47
48
|
export type ZonosSettingsBase = AppearanceSettingsQuery & CheckoutSettingsQuery & HelloSettingsQuery & OnlineStoreSettingsQuery & OrganizationQuery & ShippingZonesQuery & {
|
|
49
|
+
inclusivePriceConfigurations: InclusivePriceConfigurationResponse;
|
|
48
50
|
landedCostSettings: NonNullable<LandedCostSettingsQuery['landedCostSettings']>;
|
|
49
51
|
};
|
|
50
52
|
export type ZonosSettings = ZonosSettingsBase & {
|
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
export declare const removeBlurCurrency: () => Promise<void>;
|
|
2
|
+
/**
|
|
3
|
+
* This function is used to remove the blur effect from a specific element. (combined with performBlurSpecificElement)
|
|
4
|
+
* @returns void
|
|
5
|
+
*/
|
|
6
|
+
export declare const removeBlurSpecificElement: ({ specificSelector, timeoutId, }: {
|
|
7
|
+
specificSelector: HTMLElement;
|
|
8
|
+
/**
|
|
9
|
+
* Return timeout id from performBlurSpecificElement
|
|
10
|
+
*/
|
|
11
|
+
timeoutId: NodeJS.Timeout | undefined;
|
|
12
|
+
}) => Promise<void>;
|
|
13
|
+
export declare const performBlurSpecificElement: (specificSelector: HTMLElement) => NodeJS.Timeout | undefined;
|
|
2
14
|
export declare const performBlurCurrency: () => void;
|
|
@@ -1 +1 @@
|
|
|
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
|
+
<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>g>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as n}from"./p-595f5dd2.js";import{g as o,I as t}from"./p-e7b0c156.js";import{l as r}from"./p-0a377722.js";export{a as availableTestKeys}from"./p-0a377722.js";import{g as i,a as l,h as u,l as m}from"./p-41dd1cb8.js";import{g as p,_ as w,c as f,a as h}from"./p-b2d81c98.js";export{c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector,d as domesticRedirectedBtnSelector}from"./p-b2d81c98.js";export{c as countryRequireTaxId,e as euCountryCodes,s as shipToTaxIdLabels}from"./p-6b361d2b.js";const y=["jsdelivr","cdnjs","unpkg","vercel"],v="jsdelivr",O=e=>{const n=y.indexOf(e);return y[n+1]||null},S=()=>{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.229.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-")))return o;if(!n&&["dev.demo.elements.zonos.com","dev.checkout.elements.zonos.com","dev.storybook.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 t=`https://${n}.preview.js.zonos.com`;return r(`[ZONOS-WARNING] using '${t}' for loading elements script`,"warn"),fetch(t).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${t}' 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,o=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",o),window.location.reload(),null})),t},g="https://js.stripe.com/v3",z=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,j="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let b=null;const N=Promise.resolve().then((()=>{return e=null,null!==b||(b=new Promise(((n,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(j),window.Stripe)n(window.Stripe);else try{let t=(()=>{const e=document.querySelectorAll(`script[src^="${g}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&z.test(o.src))return o}return null})();t&&e?console.warn(j):t||(t=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${g}${n}`;const t=document.head||document.body;return t?(t.appendChild(o),o):(m("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==t||t.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):o(new Error("Stripe.js not available"))})),null==t||t.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else n(null)}))),b;var e}));let I=!1;N.catch((e=>{I||console.warn(e)}));const k=async({cartId:e,retries:n})=>{const t=i(),s=o(),c=p()||void 0,d=new URLSearchParams;s.overrideShouldEnabledCustomAddress&&d.set("overrideShouldEnabledCustomAddress",s.overrideShouldEnabledCustomAddress);const{errors:l,json:a,zonosMode:m}=await u(`/api/zonos-elements/get-cart?${d.toString()}`,{body:{isTestMode:t,renewCartExpirationToken:c,tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"}),w=!a||l.length;return w&&n?(r("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:n}),await new Promise((e=>setTimeout(e,500))),k({cartId:e,retries:n-1})):w?null:Object.assign(Object.assign({},a),{zonosMode:m})};var T;const R=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:o}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,o=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),t=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:t,isWhiteListed:o}})({loadScriptSrc:null==e?void 0:e.src});return o?n:null})(),$=Date.now(),Z="https://v1.3.229.js.zonos.com",L=R||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.229",U="https://fonts.googleapis.com",A=/^https:\/\/fonts\.googleapis\.com/;class C{}T=C,C.doneInit=!1,C.cartSettings=null,C.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),C.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),C._paypalMockResponse=null,C.iframeLogType="undefined"!=typeof window?new URLSearchParams(window.location.search).get("iframeLogType"):null,C.isBigCommerce=!1,C.releaseDate="1753890247225",C.isLegacyCheckout=!1,C.startLoadTime=$,C.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",C.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),C.overrideUseCustomAddressForm=!1,C.isCollect=!1,C.isNpm=!0,C.zonosQaUrl=null,C.zonosQaUrlApi=null,C.trackEventLogs=[],C.version="v1.3.229",C.modeAlerted=!1,C.cartData=null,C.paypal=null,C.zonosMode=null,C.IframeService=t,C.getCurrentTimestamp=()=>(new Date).getTime(),C.zonosController=null,C.loadTimeApiInfoList=[],C.logIntervalId=null,C.init=async e=>{const{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d,storeId:a,zonosApiKey:p}=e;if(T.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),T.doneInit)return;if(r(`====== ZONOS DEBUG MODE: on (${T.version}) ======`),T.zonosApiKey=p,T.storeId=a,T.isNpm){r("====== ZONOS LOADING FROM NPM ======");const n=S();if(n&&!window.isZonosPreview){r(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${n} ======`,"info");const o=document.createElement("script");return o.src=`${n}/dist/scripts/zonos.js`,document.head.appendChild(o),o.addEventListener("load",(()=>{window.Zonos.isNpm=T.isNpm,window.Zonos.isBigCommerce=T.isBigCommerce,window.Zonos.isLegacyCheckout=T.isLegacyCheckout,window.Zonos.zonosMode=T.zonosMode,window.Zonos.init(e)})),o.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${n}`)})),void(window.isZonosPreview=!0)}if(!p&&!T.cartId)return void m("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!T.cartData&&T.cartId){r("Initialize cart data");const e=await(async e=>{const{isDgsCartId:n,isLegacyCartId:o}=w(e);if(!o&&!n)return m("[ZONOS - loadZonos] invalid cart id"),null;const t=await k({cartId:e,retries:5});return r("[ZONOS - loadZonos] getting temp cart data","info",t),t?(window.Zonos.storeId=t.cartData.storeId,window.Zonos.zonosApiKey=t.cartData.credentialToken,window.Zonos.zonosMode=t.zonosMode,{cartData:t.cartData,settings:t.settings,storeFavicon:t.storeFaviconUrl,storeId:t.cartData.storeId,storeLogo:t.storeLogoUrl,zonosApiKey:t.cartData.credentialToken}):(m("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(T.cartId);if(!e)return void m("Failed to get cart data");T.cartData=e.cartData,T.zonosApiKey=e.zonosApiKey,T.cartSettings=e.settings}const o=await(async()=>{const e=i(),n=l();if(!e&&!n||!window.Zonos.zonosApiKey)return null;if(r("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return r("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:o,json:t}=await u("/api/get-test-public-credential");if(o.length||!t)return m("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",o),null;const s=t.publicCredential;return s?(r(`[ZONOS - loadZonos] Retrieve new test public token ${s}`,"info"),s):(m("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();o&&(T.zonosApiKey=o)}const h=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(T.cartId&&T.cartData||h){r("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=`${f}`,document.body.appendChild(e)}r("init zonos"),T.restoreNativeBrowserFunctions(),T.injectCustomScriptForHostedCheckout(),T.injectZonosCdn(),T.injectZonosCss(),T.injectFonts(),T.injectCheckoutInternationalButton(),T.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d}}),T.doneInit=!0},C.injectCheckoutInternationalButton=()=>{if(!document.querySelector(`#${h}`)){const e=document.createElement("button");e.id=h,e.style.display="none",document.body.appendChild(e)}},C.injectCustomScriptForHostedCheckout=()=>{const e=T.cartData,n=(null==e?void 0:e.metadata)||[],o=n.find((e=>"customHeaderScript"===e.key)),t=n.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(o||t)){if(o){r("Injecting custom header script");const e=document.createElement("script");e.textContent=o.value,document.head.appendChild(e)}if(t){r("Injecting custom footer script");const e=document.createElement("script");e.textContent=t.value,document.body.appendChild(e)}}else r("Skip injecting custom script for hosted checkout","info",{footerScript:t,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout})},C.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},C.triggerCheckoutInternational=async()=>{const e=document.querySelector(`#${h}`);setTimeout((()=>{e&&e.dispatchEvent(n("click"))}),10)},C.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},C.showNotification=e=>{var n;null===(n=T.zonosController)||void 0===n||n.showNotification(e)},C.updateOrganizationName=e=>{var n;null===(n=T.zonosController)||void 0===n||n.updateOrganizationName(e)},C.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:o,placeOrderButtonSelector:t})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&t){const n=document.querySelectorAll(t),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(o?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&o&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},C.restoreNativeBrowserFunctions=()=>{var e;if("1"===new URL(window.location.href).searchParams.get("useMerchantPolyfill"))return;const n="zonos---native-browser";let o=document.querySelector(`iframe#${n}`);o||(o=document.createElement("iframe"),o.id=n,o.style.display="none",o.style.opacity="0",o.style.position="absolute",o.style.top="-9999px",o.style.left="-9999px",o.style.width="1px",o.style.height="1px",o.style.border="none",o.style.overflow="hidden",o.style.visibility="hidden",document.body.appendChild(o));const t=(null===(e=o.contentWindow)||void 0===e?void 0:e.window.Array.from)||Array.from;Array.from=t,document.body.removeChild(o)},C.injectController=({config:e})=>{var n,o;if(document.querySelector("zonos-controller"))return;if(null===(n=e.checkoutSettings)||void 0===n?void 0:n.placeOrderButtonSelector){const n=e.checkoutSettings.placeOrderButtonSelector;T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}if(null===(o=e.checkoutSettings)||void 0===o?void 0:o.alwaysTriggerInternationalCheckoutSelector){const n=e.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}const t=document.createElement("zonos-controller");t.config=e,t.zonosApiKey=T.zonosApiKey||"",t.addEventListener("stripeInitEvent",(async e=>{const{detail:n}=e;r("loading Stripe");const o=await(async(...e)=>{I=!0;const n=Date.now();return N.then((o=>((e,n,o)=>{if(null===e)return null;const t=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(t,o),t})(o,e,n)))})(n.publishableKey);o?(window.Zonos.stripe=o,window.Zonos.isCollect?t.initCollectElement(o):t.initCheckoutElement(o)):m("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(t),T.zonosController=t,r("Zonos controller injected!")},C.injectScript=({cdnType:e,isModule:n,theRestUrl:o})=>{const t=`${T.getZonosUrl(e)}/${o}`;if(document.querySelector(`script[src="${t}"]`))return void r(`Zonos script "${t}" already exists in the document`,"warn");const s=document.head||document.body,i=document.createElement("script");n?i.type="module":i.noModule=!0,i.src=t,i.crossOrigin="anonymous",i.onerror=()=>{m(`Failed to load ${i.src}`);const t=O(e);t&&T.injectScript({cdnType:t,isModule:n,theRestUrl:o})},s.appendChild(i)},C.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return L;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.229";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.229";case"vercel":return Z}};return T.isNpm&&S()||n()},C.injectZonosCdn=()=>{T.injectScript({cdnType:v,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),T.injectScript({cdnType:v,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),r("Zonos cdn script injected!")},C.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const o=T.getZonosUrl(e),t=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${Z}/`,t.appendChild(s);const r=document.createElement("link");r.rel="stylesheet",r.href=`${o}/${n}`,r.onerror=()=>{m(`Failed to load ${r.href}`);const o=O(e);o&&T.injectStylesheet({cdnType:o,theRestUrl:n})},t.appendChild(r)},C.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?r("Zonos style links already injected","warn"):(T.injectStylesheet({cdnType:v,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),r("Zonos style css injected!"))},C.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void r("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${U}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!A.test(o.href))return o}return null})())return void r("Inter font already injected","warn");const e=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=U,e.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${U}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(o),r("Zonos font injected!")},C.setupGoogleFont=e=>{var n;null===(n=T.zonosController)||void 0===n||n.setupGoogleFont(e)},C.injectSupportGoogleFont=e=>{var n;r(`[FONT] injecting ${e}`);const o=null===(n=e.match(/family=(.*?):/))||void 0===n?void 0:n[1],t=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${U}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=U,t.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void r(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=e,t.appendChild(s),r(`[FONT] ${o} font injected!`)};const E=["ZONOS_FORM_TYPE_USING","APP_VERSION","APP_VERSION_NPM_INTEGRATION","LEGACY_CHECKOUT_FACADE"],P=["ORDER_DUPLICATION_CONSENT","WITH_ABANDONED_CART_TOKEN"],F=[...E,...P];export{C as Zonos,F as checkoutSessionAttributeKeys,P as checkoutSessionImmutableAttributeKeys,E as checkoutSessionMutableAttributeKeys}
|
|
1
|
+
import{c as n}from"./p-595f5dd2.js";import{g as o,I as t}from"./p-e7b0c156.js";import{l as r}from"./p-0a377722.js";export{a as availableTestKeys}from"./p-0a377722.js";import{g as i,a as l,h as u,l as m}from"./p-41dd1cb8.js";import{g as p,_ as w,c as f,a as h}from"./p-b2d81c98.js";export{c as checkoutHiddenBtnSelector,a as checkoutHiddenInternationalBtnSelector,d as domesticRedirectedBtnSelector}from"./p-b2d81c98.js";export{c as countryRequireTaxId,e as euCountryCodes,s as shipToTaxIdLabels}from"./p-6b361d2b.js";const y=["jsdelivr","cdnjs","unpkg","vercel"],v="jsdelivr",O=e=>{const n=y.indexOf(e);return y[n+1]||null},S=()=>{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.231.js.zonos.com";if(!n&&(o.includes("test.")||o.includes("test-")))return o;if(!n&&["dev.demo.elements.zonos.com","dev.checkout.elements.zonos.com","dev.storybook.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 t=`https://${n}.preview.js.zonos.com`;return r(`[ZONOS-WARNING] using '${t}' for loading elements script`,"warn"),fetch(t).then((()=>{window.sessionStorage.removeItem("zonos--checkout-session-id"),window.sessionStorage.removeItem("zonos--client-secret")})).catch((()=>{alert(`[ZONOS-WARNING] '${t}' 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,o=`${n}?${e.toString()}`;return window.history.replaceState(window.history.state,"",o),window.location.reload(),null})),t},g="https://js.stripe.com/v3",z=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,j="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used";let b=null;const N=Promise.resolve().then((()=>{return e=null,null!==b||(b=new Promise(((n,o)=>{if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(j),window.Stripe)n(window.Stripe);else try{let t=(()=>{const e=document.querySelectorAll(`script[src^="${g}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&z.test(o.src))return o}return null})();t&&e?console.warn(j):t||(t=(e=>{const n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",o=document.createElement("script");o.src=`${g}${n}`;const t=document.head||document.body;return t?(t.appendChild(o),o):(m("Expected document.body not to be null. Stripe.js requires a <body> element."),null)})(e)),null==t||t.addEventListener("load",(()=>{window.Stripe?n(window.Stripe):o(new Error("Stripe.js not available"))})),null==t||t.addEventListener("error",(()=>{o(new Error("Failed to load Stripe.js"))}))}catch(e){return void o(e)}else n(null)}))),b;var e}));let I=!1;N.catch((e=>{I||console.warn(e)}));const k=async({cartId:e,retries:n})=>{const t=i(),s=o(),c=p()||void 0,d=new URLSearchParams;s.overrideShouldEnabledCustomAddress&&d.set("overrideShouldEnabledCustomAddress",s.overrideShouldEnabledCustomAddress);const{errors:l,json:a,zonosMode:m}=await u(`/api/zonos-elements/get-cart?${d.toString()}`,{body:{isTestMode:t,renewCartExpirationToken:c,tempCartUUID:e},headers:{"Content-Type":"application/json"},method:"POST"}),w=!a||l.length;return w&&n?(r("[ZONOS - loadZonos] temp cart not ready, retrying in 1 second","info",{retries:n}),await new Promise((e=>setTimeout(e,500))),k({cartId:e,retries:n-1})):w?null:Object.assign(Object.assign({},a),{zonosMode:m})};var T;const R=(()=>{if("undefined"==typeof document)return null;const e=document.querySelector('script[src*="/zonos.js"]'),{currentLoadScriptUrl:n,isWhiteListed:o}=(({loadScriptSrc:e})=>{if(!e)return{currentLoadScriptUrl:"",isForceLoadVersionDomain:!1,isWhiteListed:!1};const n=new URL(e).origin,o=["dev.elements.zonos.com","dev.assets-checkout.zonos.com",".js.zonos.com","zonos-elements-test-git","zonos-elements-git"].some((e=>n.includes(e))),t=["qa.js.zonos.com"].some((e=>n.includes(e)));return{currentLoadScriptUrl:n,isForceLoadVersionDomain:t,isWhiteListed:o}})({loadScriptSrc:null==e?void 0:e.src});return o?n:null})(),$=Date.now(),Z="https://v1.3.231.js.zonos.com",L=R||"https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.231",U="https://fonts.googleapis.com",A=/^https:\/\/fonts\.googleapis\.com/;class C{}T=C,C.doneInit=!1,C.cartSettings=null,C.debug="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosDebug=1/),C.zonosConversionTest="undefined"!=typeof window&&!!window.location.search.match(/\?.*(&*)zonosConversionTest/),C._paypalMockResponse=null,C.iframeLogType="undefined"!=typeof window?new URLSearchParams(window.location.search).get("iframeLogType"):null,C.isBigCommerce=!1,C.releaseDate="1754944720824",C.isLegacyCheckout=!1,C.startLoadTime=$,C.domain="undefined"!=typeof window?window.location!=window.parent.location&&document.referrer||document.location.hostname:"",C.showBaseForeign="undefined"!=typeof window&&window.location.search.includes("zonosShowBaseForeign"),C.overrideUseCustomAddressForm=!1,C.isCollect=!1,C.isNpm=!0,C.zonosQaUrl=null,C.zonosQaUrlApi=null,C.trackEventLogs=[],C.version="v1.3.231",C.modeAlerted=!1,C.cartData=null,C.paypal=null,C.zonosMode=null,C.IframeService=t,C.getCurrentTimestamp=()=>(new Date).getTime(),C.zonosController=null,C.loadTimeApiInfoList=[],C.logIntervalId=null,C.init=async e=>{const{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d,storeId:a,zonosApiKey:p}=e;if(T.cartId=new URLSearchParams(window.location.search).get("tempCartUUID"),T.doneInit)return;if(r(`====== ZONOS DEBUG MODE: on (${T.version}) ======`),T.zonosApiKey=p,T.storeId=a,T.isNpm){r("====== ZONOS LOADING FROM NPM ======");const n=S();if(n&&!window.isZonosPreview){r(`====== RE-INJECT "zonos.js" FROM PRVIEW: ${n} ======`,"info");const o=document.createElement("script");return o.src=`${n}/dist/scripts/zonos.js`,document.head.appendChild(o),o.addEventListener("load",(()=>{window.Zonos.isNpm=T.isNpm,window.Zonos.isBigCommerce=T.isBigCommerce,window.Zonos.isLegacyCheckout=T.isLegacyCheckout,window.Zonos.zonosMode=T.zonosMode,window.Zonos.init(e)})),o.addEventListener("error",(()=>{alert(`[ZONOS - loadZonos] Failed to load "loadZonos.js" from zonosQaUrl: ${n}`)})),void(window.isZonosPreview=!0)}if(!p&&!T.cartId)return void m("Zonos API key is required unless `tempCartUUID` is provided in url query params.");if(!T.cartData&&T.cartId){r("Initialize cart data");const e=await(async e=>{const{isDgsCartId:n,isLegacyCartId:o}=w(e);if(!o&&!n)return m("[ZONOS - loadZonos] invalid cart id"),null;const t=await k({cartId:e,retries:5});return r("[ZONOS - loadZonos] getting temp cart data","info",t),t?(window.Zonos.storeId=t.cartData.storeId,window.Zonos.zonosApiKey=t.cartData.credentialToken,window.Zonos.zonosMode=t.zonosMode,{cartData:t.cartData,settings:t.settings,storeFavicon:t.storeFaviconUrl,storeId:t.cartData.storeId,storeLogo:t.storeLogoUrl,zonosApiKey:t.cartData.credentialToken}):(m("[ZONOS - loadZonos] Error getting temp cart data, stop checkout process."),null)})(T.cartId);if(!e)return void m("Failed to get cart data");T.cartData=e.cartData,T.zonosApiKey=e.zonosApiKey,T.cartSettings=e.settings}const o=await(async()=>{const e=i(),n=l();if(!e&&!n||!window.Zonos.zonosApiKey)return null;if(r("[ZONOS - loadZonos] Attempt test public credential","info"),window.Zonos.zonosApiKey.includes("credential_test"))return r("[ZONOS - loadZonos] Test mode is enabled but the API key is already a test key","info"),null;const{errors:o,json:t}=await u("/api/get-test-public-credential");if(o.length||!t)return m("[ZONOS - loadZonos] Failed to get test public credential. Keep using production key",o),null;const s=t.publicCredential;return s?(r(`[ZONOS - loadZonos] Retrieve new test public token ${s}`,"info"),s):(m("[ZONOS - loadZonos] No test public key credential. Keep using production key"),null)})();o&&(T.zonosApiKey=o)}const h=new URL(window.location.href).searchParams.get("payment_intent_client_secret")||sessionStorage.getItem("zonos--client-secret");if(T.cartId&&T.cartData||h){r("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=`${f}`,document.body.appendChild(e)}r("init zonos"),T.restoreNativeBrowserFunctions(),T.injectCustomScriptForHostedCheckout(),T.injectZonosCdn(),T.injectZonosCss(),T.injectFonts(),T.injectCheckoutInternationalButton(),T.injectController({config:{appearance:n,checkoutSettings:o,currencyConverter:t,helloSettings:s,onCountryChange:c,overrideCurrencyFormat:d}}),T.doneInit=!0},C.injectCheckoutInternationalButton=()=>{if(!document.querySelector(`#${h}`)){const e=document.createElement("button");e.id=h,e.style.display="none",document.body.appendChild(e)}},C.injectCustomScriptForHostedCheckout=()=>{const e=T.cartData,n=(null==e?void 0:e.metadata)||[],o=n.find((e=>"customHeaderScript"===e.key)),t=n.find((e=>"customFooterScript"===e.key));if(window.Zonos.isLegacyCheckout&&(o||t)){if(o){r("Injecting custom header script");const e=document.createElement("script");e.textContent=o.value,document.head.appendChild(e)}if(t){r("Injecting custom footer script");const e=document.createElement("script");e.textContent=t.value,document.body.appendChild(e)}}else r("Skip injecting custom script for hosted checkout","info",{footerScript:t,headerScript:o,isLegacyCheckout:window.Zonos.isLegacyCheckout})},C.displayCurrency=()=>{const e=document.querySelector("zonos-hello");e&&e.displayCurrency()},C.triggerCheckoutInternational=async()=>{const e=document.querySelector(`#${h}`);setTimeout((()=>{e&&e.dispatchEvent(n("click"))}),10)},C.openHelloDialog=e=>{const n=document.querySelector("zonos-hello");n&&n.openHelloDialog(null==e||e)},C.showNotification=e=>{var n;null===(n=T.zonosController)||void 0===n||n.showNotification(e)},C.updateOrganizationName=e=>{var n;null===(n=T.zonosController)||void 0===n||n.updateOrganizationName(e)},C.disablePlaceOrderButtons=({autoEnable:e=!0,config:n,disable:o,placeOrderButtonSelector:t})=>{var s;if(!(null===(s=n.checkoutSettings)||void 0===s?void 0:s.disablePlaceOrderButtonActivation)&&t){const n=document.querySelectorAll(t),s=e=>{e.target.getAttribute("disabled")&&(e.preventDefault(),e.stopPropagation())};n.forEach((e=>{e.getAttribute("data-zonos-checkout-attached")||(o?(e.setAttribute("disabled","true"),e.addEventListener("click",s)):(e.removeAttribute("disabled"),e.removeEventListener("click",s)))})),e&&o&&setTimeout((()=>{n.forEach((e=>{e.removeAttribute("disabled"),e.removeEventListener("click",s)}))}),5e3)}},C.restoreNativeBrowserFunctions=()=>{var e;if("1"===new URL(window.location.href).searchParams.get("useMerchantPolyfill"))return;const n="zonos---native-browser";let o=document.querySelector(`iframe#${n}`);o||(o=document.createElement("iframe"),o.id=n,o.style.display="none",o.style.opacity="0",o.style.position="absolute",o.style.top="-9999px",o.style.left="-9999px",o.style.width="1px",o.style.height="1px",o.style.border="none",o.style.overflow="hidden",o.style.visibility="hidden",document.body.appendChild(o));const t=(null===(e=o.contentWindow)||void 0===e?void 0:e.window.Array.from)||Array.from;Array.from=t,document.body.removeChild(o)},C.injectController=({config:e})=>{var n,o;if(document.querySelector("zonos-controller"))return;if(null===(n=e.checkoutSettings)||void 0===n?void 0:n.placeOrderButtonSelector){const n=e.checkoutSettings.placeOrderButtonSelector;T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}if(null===(o=e.checkoutSettings)||void 0===o?void 0:o.alwaysTriggerInternationalCheckoutSelector){const n=e.checkoutSettings.alwaysTriggerInternationalCheckoutSelector;T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n}),new MutationObserver((()=>{T.disablePlaceOrderButtons({config:e,disable:!0,placeOrderButtonSelector:n})})).observe(document.body,{childList:!0,subtree:!0})}const t=document.createElement("zonos-controller");t.config=e,t.zonosApiKey=T.zonosApiKey||"",t.addEventListener("stripeInitEvent",(async e=>{const{detail:n}=e;r("loading Stripe");const o=await(async(...e)=>{I=!0;const n=Date.now();return N.then((o=>((e,n,o)=>{if(null===e)return null;const t=e.apply(void 0,n);return((e,n)=>{e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",startTime:n})})(t,o),t})(o,e,n)))})(n.publishableKey);o?(window.Zonos.stripe=o,window.Zonos.isCollect?t.initCollectElement(o):t.initCheckoutElement(o)):m("API seems to be invalid or missing. Failed to load Stripe")})),document.body.appendChild(t),T.zonosController=t,r("Zonos controller injected!")},C.injectScript=({cdnType:e,isModule:n,theRestUrl:o})=>{const t=`${T.getZonosUrl(e)}/${o}`;if(document.querySelector(`script[src="${t}"]`))return void r(`Zonos script "${t}" already exists in the document`,"warn");const s=document.head||document.body,i=document.createElement("script");n?i.type="module":i.noModule=!0,i.src=t,i.crossOrigin="anonymous",i.onerror=()=>{m(`Failed to load ${i.src}`);const t=O(e);t&&T.injectScript({cdnType:t,isModule:n,theRestUrl:o})},s.appendChild(i)},C.getZonosUrl=e=>{const n=()=>{switch(e){case"jsdelivr":return L;case"unpkg":return"https://unpkg.com/@zonos/elements@1.3.231";case"cdnjs":return"https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.231";case"vercel":return Z}};return T.isNpm&&S()||n()},C.injectZonosCdn=()=>{T.injectScript({cdnType:v,isModule:!0,theRestUrl:"dist/zonos-elements/zonos-elements.esm.js"}),T.injectScript({cdnType:v,isModule:!1,theRestUrl:"dist/zonos-elements/zonos-elements.js"}),r("Zonos cdn script injected!")},C.injectStylesheet=({cdnType:e,theRestUrl:n})=>{const o=T.getZonosUrl(e),t=document.head||document.body,s=document.createElement("link");s.rel="preconnect",s.href=`${Z}/`,t.appendChild(s);const r=document.createElement("link");r.rel="stylesheet",r.href=`${o}/${n}`,r.onerror=()=>{m(`Failed to load ${r.href}`);const o=O(e);o&&T.injectStylesheet({cdnType:o,theRestUrl:n})},t.appendChild(r)},C.injectZonosCss=()=>{document.querySelector('link[rel="stylesheet"][href*="/dist/zonos-elements/zonos-elements.css"]')?r("Zonos style links already injected","warn"):(T.injectStylesheet({cdnType:v,theRestUrl:"dist/zonos-elements/zonos-elements.css"}),r("Zonos style css injected!"))},C.injectFonts=()=>{if((()=>{if(document.fonts.check("1em Inter"))return void r("Inter font already loaded","warn");const e=document.querySelectorAll(`link[rel="stylesheet"][href^="${U}"]`);for(let n=0;n<e.length;n++){const o=e[n];if(o&&!A.test(o.href))return o}return null})())return void r("Inter font already injected","warn");const e=document.head||document.body,n=document.createElement("link");n.rel="preconnect",n.href=U,e.appendChild(n);const o=document.createElement("link");o.rel="stylesheet",o.href=`${U}/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap`,e.appendChild(o),r("Zonos font injected!")},C.setupGoogleFont=e=>{var n;null===(n=T.zonosController)||void 0===n||n.setupGoogleFont(e)},C.injectSupportGoogleFont=e=>{var n;r(`[FONT] injecting ${e}`);const o=null===(n=e.match(/family=(.*?):/))||void 0===n?void 0:n[1],t=document.head||document.body;if(!document.querySelector(`link[rel="preconnect"][href^="${U}"]`)){const e=document.createElement("link");e.rel="preconnect",e.href=U,t.appendChild(e)}if(document.querySelector(`link[rel="stylesheet"][href="${e}"]`))return void r(`[FONT] ${o} font already injected`,"warn");const s=document.createElement("link");s.rel="stylesheet",s.href=e,t.appendChild(s),r(`[FONT] ${o} font injected!`)};const E=["ZONOS_FORM_TYPE_USING","APP_VERSION","APP_VERSION_NPM_INTEGRATION","LEGACY_CHECKOUT_FACADE"],P=["ORDER_DUPLICATION_CONSENT","WITH_ABANDONED_CART_TOKEN"],F=[...E,...P];export{C as Zonos,F as checkoutSessionAttributeKeys,P as checkoutSessionImmutableAttributeKeys,E as checkoutSessionMutableAttributeKeys}
|