@zonos/elements 1.3.201 → 1.3.203

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/dist/cjs/VarianceTest-0cb1e118.js +12 -0
  2. package/dist/cjs/cart-0d91ad0b.js +1955 -0
  3. package/dist/cjs/{debounce-d393fafe.js → debounce-94e1b7ff.js} +1 -1
  4. package/dist/cjs/{getBorderRadius-3d0a563e.js → getBorderRadius-8d3b1049.js} +1 -1
  5. package/dist/cjs/index.cjs.js +10 -8
  6. package/dist/cjs/{isDarkColor-92a10a85.js → isDarkColor-bcf49625.js} +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/{cart-e73cde62.js → localization-2f17c95f.js} +74 -1941
  9. package/dist/cjs/{paypal-39bbbd1a.js → paypal-9953115b.js} +10 -9
  10. package/dist/cjs/zonos-address_11.cjs.entry.js +98 -72
  11. package/dist/cjs/zonos-badge.cjs.entry.js +2 -1
  12. package/dist/cjs/zonos-banner.cjs.entry.js +2 -1
  13. package/dist/cjs/zonos-button_3.cjs.entry.js +4 -3
  14. package/dist/cjs/zonos-card.cjs.entry.js +3 -2
  15. package/dist/cjs/{zonos-cart-items_13.cjs.entry.js → zonos-cart-items_14.cjs.entry.js} +105 -82
  16. package/dist/cjs/zonos-checkout.cjs.entry.js +395 -50
  17. package/dist/cjs/zonos-collapse.cjs.entry.js +2 -1
  18. package/dist/cjs/zonos-component.cjs.entry.js +1 -1
  19. package/dist/cjs/zonos-controller.cjs.entry.js +13 -11
  20. package/dist/cjs/zonos-country-flag.cjs.entry.js +4 -5
  21. package/dist/cjs/zonos-country-select_4.cjs.entry.js +13 -13
  22. package/dist/cjs/zonos-elements.cjs.js +1 -1
  23. package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +10 -8
  24. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +41 -42
  25. package/dist/cjs/zonos-hello.cjs.entry.js +30 -31
  26. package/dist/cjs/zonos-input.cjs.entry.js +3 -2
  27. package/dist/cjs/zonos-language-select_2.cjs.entry.js +8 -9
  28. package/dist/cjs/zonos-logo.cjs.entry.js +4 -3
  29. package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -2
  30. package/dist/cjs/zonos-stripe-input.cjs.entry.js +8 -7
  31. package/dist/cjs/zonos-text.cjs.entry.js +2 -1
  32. package/dist/cjs/zonos-toggle.cjs.entry.js +4 -3
  33. package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
  34. package/dist/cjs/zonos-v-stack.cjs.entry.js +4 -3
  35. package/dist/cjs/{zonosStore-c466b127.js → zonosStore-9264749e.js} +15 -5
  36. package/dist/collection/collection-manifest.json +1 -0
  37. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +18 -17
  38. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +235 -15
  39. package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +3 -3
  40. package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +9 -4
  41. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.css +62 -0
  42. package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +90 -0
  43. package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
  44. package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
  45. package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
  46. package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +4 -4
  47. package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
  48. package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
  49. package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
  50. package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
  51. package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
  52. package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
  53. package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
  54. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
  55. package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
  56. package/dist/collection/components/main/zonos-controller.js +3 -3
  57. package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
  58. package/dist/collection/components/store/checkout/cart.js +28 -18
  59. package/dist/collection/components/store/checkout/paypal.js +2 -1
  60. package/dist/collection/components/store/checkout/stripe.js +16 -11
  61. package/dist/collection/components/store/hello/localization.js +5 -5
  62. package/dist/collection/components/store/storageStore.js +32 -0
  63. package/dist/collection/components/store/zonosStore.js +12 -6
  64. package/dist/collection/components/stripe/zonos-address/zonos-address.js +18 -6
  65. package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
  66. package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +19 -7
  67. package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +3 -3
  68. package/dist/collection/components/utils/api/getCheckoutSession.js +3 -3
  69. package/dist/collection/components/utils/api/placeTestOrder.js +2 -1
  70. package/dist/collection/components/utils/api/prepCalculateLandedCost.js +3 -2
  71. package/dist/collection/components/utils/api/selectVarianceTest.js +20 -0
  72. package/dist/collection/components/utils/buildCartUrl.js +44 -0
  73. package/dist/collection/components/utils/getLegacyQueryParams.js +42 -0
  74. package/dist/collection/components/utils/varianceTest/filterExpiredTests.js +6 -0
  75. package/dist/collection/components/utils/varianceTest/filterValidTests.js +23 -0
  76. package/dist/collection/components/utils/varianceTest/getSelectedTestVariant.js +6 -0
  77. package/dist/collection/components/utils/varianceTest/hasAtLeastOneAvailableTestKey.js +14 -0
  78. package/dist/collection/components/utils/varianceTest/isInAvailableTestKey.js +4 -0
  79. package/dist/collection/components/utils/varianceTest/isTestEnabled.js +4 -0
  80. package/dist/collection/components/utils/varianceTest/isTestKeysAllVariantSelected.js +6 -0
  81. package/dist/collection/components/utils/varianceTest/mergeTest.js +13 -0
  82. package/dist/collection/scripts/_getZonosQaUrl.js +2 -2
  83. package/dist/collection/types/checkout/api/VarianceTest.js +8 -0
  84. package/dist/collection/types/generated/graphql.internal.types.js +26 -7
  85. package/dist/collection/types/index.js +1 -0
  86. package/dist/esm/VarianceTest-fef2d958.js +10 -0
  87. package/dist/esm/cart-db61eb95.js +1918 -0
  88. package/dist/esm/{debounce-a2121722.js → debounce-3a9f27a0.js} +1 -1
  89. package/dist/esm/{getBorderRadius-413e97eb.js → getBorderRadius-78b28b4d.js} +1 -1
  90. package/dist/esm/index.js +9 -8
  91. package/dist/esm/{isDarkColor-4c7b2ffc.js → isDarkColor-31dd7dff.js} +1 -1
  92. package/dist/esm/loader.js +1 -1
  93. package/dist/esm/{cart-f79c8021.js → localization-bf7224aa.js} +70 -1907
  94. package/dist/esm/{paypal-6d4667d1.js → paypal-2e0ffb07.js} +5 -4
  95. package/dist/esm/zonos-address_11.entry.js +54 -28
  96. package/dist/esm/zonos-badge.entry.js +2 -1
  97. package/dist/esm/zonos-banner.entry.js +2 -1
  98. package/dist/esm/zonos-button_3.entry.js +4 -3
  99. package/dist/esm/zonos-card.entry.js +3 -2
  100. package/dist/esm/{zonos-cart-items_13.entry.js → zonos-cart-items_14.entry.js} +54 -32
  101. package/dist/esm/zonos-checkout.entry.js +363 -18
  102. package/dist/esm/zonos-collapse.entry.js +2 -1
  103. package/dist/esm/zonos-component.entry.js +1 -1
  104. package/dist/esm/zonos-controller.entry.js +8 -6
  105. package/dist/esm/zonos-country-flag.entry.js +3 -4
  106. package/dist/esm/zonos-country-select_4.entry.js +8 -8
  107. package/dist/esm/zonos-elements.js +1 -1
  108. package/dist/esm/zonos-empty-state-payment_4.entry.js +10 -8
  109. package/dist/esm/zonos-hello-dialog.entry.js +7 -8
  110. package/dist/esm/zonos-hello.entry.js +4 -5
  111. package/dist/esm/zonos-input.entry.js +3 -2
  112. package/dist/esm/zonos-language-select_2.entry.js +5 -6
  113. package/dist/esm/zonos-logo.entry.js +4 -3
  114. package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -2
  115. package/dist/esm/zonos-stripe-input.entry.js +8 -7
  116. package/dist/esm/zonos-text.entry.js +2 -1
  117. package/dist/esm/zonos-toggle.entry.js +4 -3
  118. package/dist/esm/zonos-tooltip.entry.js +2 -2
  119. package/dist/esm/zonos-v-stack.entry.js +4 -3
  120. package/dist/esm/{zonosStore-cdabc848.js → zonosStore-d10a829f.js} +15 -5
  121. package/dist/esm-es5/VarianceTest-fef2d958.js +1 -0
  122. package/dist/esm-es5/cart-db61eb95.js +1 -0
  123. package/dist/esm-es5/{debounce-a2121722.js → debounce-3a9f27a0.js} +1 -1
  124. package/dist/esm-es5/{getBorderRadius-413e97eb.js → getBorderRadius-78b28b4d.js} +1 -1
  125. package/dist/esm-es5/index.js +1 -1
  126. package/dist/esm-es5/{isDarkColor-4c7b2ffc.js → isDarkColor-31dd7dff.js} +1 -1
  127. package/dist/esm-es5/loader.js +1 -1
  128. package/dist/esm-es5/localization-bf7224aa.js +1 -0
  129. package/dist/esm-es5/{paypal-6d4667d1.js → paypal-2e0ffb07.js} +2 -2
  130. package/dist/esm-es5/zonos-address_11.entry.js +1 -1
  131. package/dist/esm-es5/zonos-badge.entry.js +1 -1
  132. package/dist/esm-es5/zonos-banner.entry.js +1 -1
  133. package/dist/esm-es5/zonos-button_3.entry.js +1 -1
  134. package/dist/esm-es5/zonos-card.entry.js +1 -1
  135. package/dist/esm-es5/zonos-cart-items_14.entry.js +1 -0
  136. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  137. package/dist/esm-es5/zonos-collapse.entry.js +1 -1
  138. package/dist/esm-es5/zonos-component.entry.js +1 -1
  139. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  140. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  141. package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
  142. package/dist/esm-es5/zonos-elements.js +1 -1
  143. package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +1 -1
  144. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  145. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  146. package/dist/esm-es5/zonos-input.entry.js +1 -1
  147. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  148. package/dist/esm-es5/zonos-logo.entry.js +1 -1
  149. package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
  150. package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
  151. package/dist/esm-es5/zonos-text.entry.js +1 -1
  152. package/dist/esm-es5/zonos-toggle.entry.js +1 -1
  153. package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
  154. package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
  155. package/dist/esm-es5/zonosStore-d10a829f.js +1 -0
  156. package/dist/scripts/index.d.ts +844 -766
  157. package/dist/scripts/index.js +1 -1
  158. package/dist/scripts/loadZonos.js +1 -1
  159. package/dist/scripts/zonos.js +1 -1
  160. package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +16 -0
  161. package/dist/types/components/common/zonos-loading-overlay/zonos-loading-overlay.d.ts +16 -0
  162. package/dist/types/components/store/checkout/cart.d.ts +5 -2
  163. package/dist/types/components/store/checkout/stripe.d.ts +2 -2
  164. package/dist/types/components/store/hello/localization.d.ts +2 -2
  165. package/dist/types/components/store/storageStore.d.ts +13 -0
  166. package/dist/types/components/store/zonosStore.d.ts +7 -2
  167. package/dist/types/components/stripe/zonos-address/zonos-address.d.ts +2 -0
  168. package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +2 -0
  169. package/dist/types/components/utils/api/selectVarianceTest.d.ts +6 -0
  170. package/dist/types/components/utils/buildCartUrl.d.ts +10 -0
  171. package/dist/types/components/utils/getLegacyQueryParams.d.ts +2 -0
  172. package/dist/types/components/utils/varianceTest/filterExpiredTests.d.ts +2 -0
  173. package/dist/types/components/utils/varianceTest/filterValidTests.d.ts +9 -0
  174. package/dist/types/components/utils/varianceTest/getSelectedTestVariant.d.ts +2 -0
  175. package/dist/types/components/utils/varianceTest/hasAtLeastOneAvailableTestKey.d.ts +8 -0
  176. package/dist/types/components/utils/varianceTest/isInAvailableTestKey.d.ts +2 -0
  177. package/dist/types/components/utils/varianceTest/isTestEnabled.d.ts +2 -0
  178. package/dist/types/components/utils/varianceTest/isTestKeysAllVariantSelected.d.ts +9 -0
  179. package/dist/types/components/utils/varianceTest/mergeTest.d.ts +5 -0
  180. package/dist/types/components.d.ts +51 -0
  181. package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +7 -0
  182. package/dist/types/types/checkout/CheckoutConfig.d.ts +13 -1
  183. package/dist/types/types/checkout/api/CheckoutSession.d.ts +7 -0
  184. package/dist/types/types/checkout/api/VarianceTest.d.ts +30 -0
  185. package/dist/types/types/generated/graphql.internal.types.d.ts +206 -22
  186. package/dist/types/types/generated/graphql.internal.types.ts +235 -19
  187. package/dist/types/types/index.d.ts +1 -0
  188. package/dist/types/types/utils/ZonosSettings.d.ts +7 -6
  189. package/dist/zonos-elements/index.esm.js +1 -1
  190. package/dist/zonos-elements/{p-609c32a3.system.entry.js → p-01987cb2.system.entry.js} +1 -1
  191. package/dist/zonos-elements/p-04a01cb1.js +1 -0
  192. package/dist/zonos-elements/p-04b43dd5.entry.js +1 -0
  193. package/dist/zonos-elements/{p-7d5d89f2.system.js → p-0693422b.system.js} +2 -2
  194. package/dist/zonos-elements/p-06f25f75.entry.js +1 -0
  195. package/dist/zonos-elements/p-0c62cfb3.entry.js +1 -0
  196. package/dist/zonos-elements/{p-7831b52c.system.entry.js → p-1dcdb65f.system.entry.js} +1 -1
  197. package/dist/zonos-elements/p-25970cb8.system.entry.js +1 -0
  198. package/dist/zonos-elements/p-26a634a5.system.entry.js +1 -0
  199. package/dist/zonos-elements/p-27987298.system.entry.js +1 -0
  200. package/dist/zonos-elements/p-2bb8ca7d.system.entry.js +1 -0
  201. package/dist/zonos-elements/p-2f70d0eb.entry.js +1 -0
  202. package/dist/zonos-elements/p-3284f459.system.entry.js +1 -0
  203. package/dist/zonos-elements/{p-13796f98.js → p-3d82a352.js} +1 -1
  204. package/dist/zonos-elements/p-411b8e10.entry.js +1 -0
  205. package/dist/zonos-elements/p-452070af.system.entry.js +1 -0
  206. package/dist/zonos-elements/p-45ebc788.entry.js +1 -0
  207. package/dist/zonos-elements/p-4c81112f.entry.js +1 -0
  208. package/dist/zonos-elements/p-4efa8187.js +1 -0
  209. package/dist/zonos-elements/p-5170bc41.entry.js +1 -0
  210. package/dist/zonos-elements/p-54cdc47f.system.entry.js +1 -0
  211. package/dist/zonos-elements/p-5a2dd041.system.js +1 -0
  212. package/dist/zonos-elements/p-5c74e5c9.system.entry.js +1 -0
  213. package/dist/zonos-elements/p-5d0f7364.system.js +1 -0
  214. package/dist/zonos-elements/p-6b6a9dd6.system.js +1 -0
  215. package/dist/zonos-elements/p-715d0f59.system.entry.js +1 -0
  216. package/dist/zonos-elements/{p-b8d87932.js → p-72f37935.js} +1 -1
  217. package/dist/zonos-elements/p-7ae5cd60.entry.js +1 -0
  218. package/dist/zonos-elements/p-7cd09f1f.system.js +1 -0
  219. package/dist/zonos-elements/p-80bbd9c0.system.entry.js +1 -0
  220. package/dist/zonos-elements/p-851c642e.system.entry.js +1 -0
  221. package/dist/zonos-elements/{p-4300d944.entry.js → p-8d870d4c.entry.js} +1 -1
  222. package/dist/zonos-elements/p-9af5e93a.entry.js +1 -0
  223. package/dist/zonos-elements/{p-5de59662.js → p-a9307caa.js} +2 -2
  224. package/dist/zonos-elements/p-aa1193bc.entry.js +1 -0
  225. package/dist/zonos-elements/p-ab176281.system.entry.js +1 -0
  226. package/dist/zonos-elements/p-bc8bda92.entry.js +1 -0
  227. package/dist/zonos-elements/p-be5afc91.system.entry.js +1 -0
  228. package/dist/zonos-elements/p-c291bac1.entry.js +1 -0
  229. package/dist/zonos-elements/p-c3d2422e.entry.js +1 -0
  230. package/dist/zonos-elements/{p-f28eb1dd.system.js → p-c50b3100.system.js} +1 -1
  231. package/dist/zonos-elements/p-c5fcbc92.system.entry.js +1 -0
  232. package/dist/zonos-elements/p-c767242b.entry.js +1 -0
  233. package/dist/zonos-elements/p-c9aa902e.system.entry.js +1 -0
  234. package/dist/zonos-elements/p-cb823c4d.system.js +1 -0
  235. package/dist/zonos-elements/p-cdd3087f.system.entry.js +1 -0
  236. package/dist/zonos-elements/p-d2165441.system.entry.js +1 -0
  237. package/dist/zonos-elements/{p-d422ad1d.system.js → p-d42dfd32.system.js} +1 -1
  238. package/dist/zonos-elements/p-d46349d3.system.entry.js +1 -0
  239. package/dist/zonos-elements/{p-b2241919.entry.js → p-d6a10007.entry.js} +1 -1
  240. package/dist/zonos-elements/p-d99d9e00.js +1 -0
  241. package/dist/zonos-elements/p-db025dfc.system.entry.js +1 -0
  242. package/dist/zonos-elements/p-dcd6acd4.system.entry.js +1 -0
  243. package/dist/zonos-elements/p-dd1cfa74.entry.js +1 -0
  244. package/dist/zonos-elements/p-df4c46a6.entry.js +1 -0
  245. package/dist/zonos-elements/p-dfd1ba1d.entry.js +1 -0
  246. package/dist/zonos-elements/{p-4593324c.js → p-e26c9e83.js} +1 -1
  247. package/dist/zonos-elements/p-e68d5219.entry.js +1 -0
  248. package/dist/zonos-elements/p-ea6d87a1.system.js +1 -1
  249. package/dist/zonos-elements/p-ef3e05e5.system.js +1 -0
  250. package/dist/zonos-elements/p-f255e822.js +1 -0
  251. package/dist/zonos-elements/p-f655ec36.entry.js +1 -0
  252. package/dist/zonos-elements/{p-e91b244c.entry.js → p-f891d470.entry.js} +1 -1
  253. package/dist/zonos-elements/p-f8d0d488.system.entry.js +1 -0
  254. package/dist/zonos-elements/{p-240ee490.system.entry.js → p-fbe36bc8.system.entry.js} +1 -1
  255. package/dist/zonos-elements/p-fcc2e712.entry.js +1 -0
  256. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  257. package/package.json +1 -1
  258. package/dist/esm-es5/cart-f79c8021.js +0 -1
  259. package/dist/esm-es5/zonos-cart-items_13.entry.js +0 -1
  260. package/dist/esm-es5/zonosStore-cdabc848.js +0 -1
  261. package/dist/zonos-elements/p-0302a254.entry.js +0 -1
  262. package/dist/zonos-elements/p-06ed3582.system.js +0 -1
  263. package/dist/zonos-elements/p-147ca395.entry.js +0 -1
  264. package/dist/zonos-elements/p-1998d8b3.entry.js +0 -1
  265. package/dist/zonos-elements/p-1eddec23.entry.js +0 -1
  266. package/dist/zonos-elements/p-20030bf5.system.js +0 -1
  267. package/dist/zonos-elements/p-24a2e899.system.entry.js +0 -1
  268. package/dist/zonos-elements/p-264f46a5.entry.js +0 -1
  269. package/dist/zonos-elements/p-2882b9f4.entry.js +0 -1
  270. package/dist/zonos-elements/p-2c915112.system.entry.js +0 -1
  271. package/dist/zonos-elements/p-327aebf5.entry.js +0 -1
  272. package/dist/zonos-elements/p-33488109.system.entry.js +0 -1
  273. package/dist/zonos-elements/p-337fab4e.js +0 -1
  274. package/dist/zonos-elements/p-3ddecaa4.system.entry.js +0 -1
  275. package/dist/zonos-elements/p-48f70043.system.entry.js +0 -1
  276. package/dist/zonos-elements/p-49a31b14.system.entry.js +0 -1
  277. package/dist/zonos-elements/p-4cd867d5.js +0 -1
  278. package/dist/zonos-elements/p-55711b80.system.entry.js +0 -1
  279. package/dist/zonos-elements/p-578bf5d7.entry.js +0 -1
  280. package/dist/zonos-elements/p-5c061a35.entry.js +0 -1
  281. package/dist/zonos-elements/p-6096c1c5.entry.js +0 -1
  282. package/dist/zonos-elements/p-65a8f19d.entry.js +0 -1
  283. package/dist/zonos-elements/p-6adc6e27.entry.js +0 -1
  284. package/dist/zonos-elements/p-6cd9b6a1.system.entry.js +0 -1
  285. package/dist/zonos-elements/p-79070ee6.entry.js +0 -1
  286. package/dist/zonos-elements/p-7bb9c330.entry.js +0 -1
  287. package/dist/zonos-elements/p-82aa4f9f.system.entry.js +0 -1
  288. package/dist/zonos-elements/p-8540f3e2.system.entry.js +0 -1
  289. package/dist/zonos-elements/p-8a9d4605.system.entry.js +0 -1
  290. package/dist/zonos-elements/p-932bed54.system.entry.js +0 -1
  291. package/dist/zonos-elements/p-94e3e50d.system.entry.js +0 -1
  292. package/dist/zonos-elements/p-9f6dd86a.entry.js +0 -1
  293. package/dist/zonos-elements/p-a64ab131.system.entry.js +0 -1
  294. package/dist/zonos-elements/p-aac95779.system.entry.js +0 -1
  295. package/dist/zonos-elements/p-ad3c5358.entry.js +0 -1
  296. package/dist/zonos-elements/p-af6af82e.system.js +0 -1
  297. package/dist/zonos-elements/p-b66b3306.system.entry.js +0 -1
  298. package/dist/zonos-elements/p-b6afcf3f.system.entry.js +0 -1
  299. package/dist/zonos-elements/p-b8d91f99.entry.js +0 -1
  300. package/dist/zonos-elements/p-c770044a.system.entry.js +0 -1
  301. package/dist/zonos-elements/p-d4842d10.system.entry.js +0 -1
  302. package/dist/zonos-elements/p-d6c3aec8.system.entry.js +0 -1
  303. package/dist/zonos-elements/p-daf73a4c.system.js +0 -1
  304. package/dist/zonos-elements/p-de388ea0.entry.js +0 -1
  305. package/dist/zonos-elements/p-e14d89de.entry.js +0 -1
  306. package/dist/zonos-elements/p-f6e587bb.entry.js +0 -1
  307. package/dist/zonos-elements/p-f818bdf5.entry.js +0 -1
  308. package/dist/zonos-elements/p-fce6bffe.system.entry.js +0 -1
@@ -68,6 +68,85 @@ declare class IframeService {
68
68
  }) => HTMLIFrameElement;
69
69
  }
70
70
 
71
+ type CustomEventMap = {
72
+ legacyCheckoutError: string;
73
+ 'zonos-checkout-success': {
74
+ message: string;
75
+ };
76
+ };
77
+
78
+ declare const _envClientSchema: z.ZodObject<{
79
+ NEXT_PUBLIC_FLAG_URL: z.ZodString;
80
+ NEXT_PUBLIC_RELEASE_DATE: z.ZodString;
81
+ NEXT_PUBLIC_ZONOS_API_KEY: z.ZodString;
82
+ NEXT_PUBLIC_ZONOS_CDNJS_CDN_URL: z.ZodString;
83
+ NEXT_PUBLIC_ZONOS_CDN_URL: z.ZodString;
84
+ NEXT_PUBLIC_ZONOS_CLOUDFLARE_URL: z.ZodString;
85
+ NEXT_PUBLIC_ZONOS_JS_DELIVR_CDN_URL: z.ZodString;
86
+ NEXT_PUBLIC_ZONOS_PACKAGE_VERSION: z.ZodString;
87
+ NEXT_PUBLIC_ZONOS_ROUTE_URL: z.ZodString;
88
+ NEXT_PUBLIC_ZONOS_UNPKG_CDN_URL: z.ZodString;
89
+ }, "strip", z.ZodTypeAny, {
90
+ NEXT_PUBLIC_FLAG_URL: string;
91
+ NEXT_PUBLIC_RELEASE_DATE: string;
92
+ NEXT_PUBLIC_ZONOS_API_KEY: string;
93
+ NEXT_PUBLIC_ZONOS_CDNJS_CDN_URL: string;
94
+ NEXT_PUBLIC_ZONOS_CDN_URL: string;
95
+ NEXT_PUBLIC_ZONOS_CLOUDFLARE_URL: string;
96
+ NEXT_PUBLIC_ZONOS_JS_DELIVR_CDN_URL: string;
97
+ NEXT_PUBLIC_ZONOS_PACKAGE_VERSION: string;
98
+ NEXT_PUBLIC_ZONOS_ROUTE_URL: string;
99
+ NEXT_PUBLIC_ZONOS_UNPKG_CDN_URL: string;
100
+ }, {
101
+ NEXT_PUBLIC_FLAG_URL: string;
102
+ NEXT_PUBLIC_RELEASE_DATE: string;
103
+ NEXT_PUBLIC_ZONOS_API_KEY: string;
104
+ NEXT_PUBLIC_ZONOS_CDNJS_CDN_URL: string;
105
+ NEXT_PUBLIC_ZONOS_CDN_URL: string;
106
+ NEXT_PUBLIC_ZONOS_CLOUDFLARE_URL: string;
107
+ NEXT_PUBLIC_ZONOS_JS_DELIVR_CDN_URL: string;
108
+ NEXT_PUBLIC_ZONOS_PACKAGE_VERSION: string;
109
+ NEXT_PUBLIC_ZONOS_ROUTE_URL: string;
110
+ NEXT_PUBLIC_ZONOS_UNPKG_CDN_URL: string;
111
+ }>;
112
+ interface Env extends z.infer<typeof _envClientSchema> {
113
+ }
114
+
115
+ /* eslint-disable no-relative-import-paths/no-relative-import-paths */
116
+
117
+ declare global {
118
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
119
+ interface Document {
120
+ addEventListener<K extends keyof CustomEventMap>(
121
+ type: K,
122
+ listener: (this: Document, ev: CustomEvent<CustomEventMap[K]>) => void,
123
+ ): void;
124
+ }
125
+
126
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
127
+ interface Window {
128
+ Stripe?: StripeConstructor;
129
+ Zonos: Zonos;
130
+ /**
131
+ * A flag to determine if the current page is a BigCommerce page
132
+ */
133
+ bcConfig?: unknown;
134
+ /**
135
+ * This flag would be set to true if zonosQaUrl is present in the query params and preview script loadZonos.js is injected to DOM
136
+ */
137
+ isZonosPreview?: boolean;
138
+ /**
139
+ * A flag to determine if the current page is a BigCommerce page
140
+ */
141
+ stencilBootstrap?: unknown;
142
+ }
143
+
144
+ namespace NodeJS {
145
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
146
+ interface ProcessEnv extends Env {}
147
+ }
148
+ }
149
+
71
150
  declare const adjustmentSource: {
72
151
  readonly ApiRequest: "API_REQUEST";
73
152
  readonly PromoCode: "PROMO_CODE";
@@ -836,8 +915,8 @@ type CalculateLandedCostMutation = {
836
915
  deMinimis: Array<{
837
916
  formula: string;
838
917
  method: IncotermCode;
839
- threshold: DeMinimisThreshold;
840
918
  note: string;
919
+ threshold: DeMinimisThreshold;
841
920
  type: DeMinimisType;
842
921
  }>;
843
922
  duties: Array<{
@@ -851,6 +930,10 @@ type CalculateLandedCostMutation = {
851
930
  id: string;
852
931
  landedCostGuaranteeCode: LandedCostGuaranteeCode;
853
932
  method: IncotermCode;
933
+ remittance: Array<{
934
+ amount: number;
935
+ description: string;
936
+ }>;
854
937
  shipmentRating: {
855
938
  id: string;
856
939
  };
@@ -1008,6 +1091,13 @@ type CartCheckoutWorkflowQuery = {
1008
1091
  }>;
1009
1092
  updatedAt: string;
1010
1093
  updatedBy: string;
1094
+ varianceTestRegistrations: Array<{
1095
+ testKey: string;
1096
+ varianceAllocation: Array<{
1097
+ percentage: number;
1098
+ variantKey: string;
1099
+ }>;
1100
+ }> | null;
1011
1101
  visibilityStatus: CheckoutVisibilityStatus;
1012
1102
  };
1013
1103
  credentialTokenId: string;
@@ -1109,6 +1199,10 @@ type CheckoutSessionDetailsFragment = {
1109
1199
  taxes: number;
1110
1200
  total: number;
1111
1201
  };
1202
+ varianceTestResults: Array<{
1203
+ selectedVariantKey: string;
1204
+ testKey: string;
1205
+ }> | null;
1112
1206
  };
1113
1207
  type GetOrderQuery = {
1114
1208
  order: {
@@ -1222,6 +1316,167 @@ type GetOrderQuery = {
1222
1316
  } | null;
1223
1317
  };
1224
1318
 
1319
+ type TranslatedText = {
1320
+ [key: string]: string;
1321
+ };
1322
+ type EnteredInfo = {
1323
+ city: string;
1324
+ country: CountryCode;
1325
+ email: string;
1326
+ line1: string;
1327
+ line2: string;
1328
+ name: string;
1329
+ phone: string;
1330
+ postal_code: string;
1331
+ state: string;
1332
+ };
1333
+ type ValidateAddressFields = Omit<StripeAddressElementChangeEvent['value']['address'], 'country'> & {
1334
+ name: string;
1335
+ };
1336
+ type TranslatedAddressObject = {
1337
+ [key in keyof ValidateAddressFields]?: TranslatedText;
1338
+ };
1339
+
1340
+ type SubmitEventData = {
1341
+ billingAddress: Record<keyof TranslatedAddressObject, string> | null;
1342
+ shippingAddress: Record<keyof TranslatedAddressObject, string>;
1343
+ };
1344
+
1345
+ declare const colorPrefixes: readonly ["blue", "cyan", "green", "orange", "purple", "red", "gray", "glass"];
1346
+ declare const colorContrasts: readonly ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "950"];
1347
+ type ColorContrast = (typeof colorContrasts)[number];
1348
+ type ColorPrefix = (typeof colorPrefixes)[number];
1349
+ type Color = 'gray-0' | 'gray-50' | 'glass-0' | 'glass-50' | `${ColorPrefix}-${ColorContrast}` | 'gray-1000' | 'glass-1100' | 'glass-1200';
1350
+ declare const checkboxColorPrefix: readonly ["blue", "cyan", "green", "orange", "purple", "red", "gray"];
1351
+ type CheckboxColorPrefix = (typeof checkboxColorPrefix)[number];
1352
+
1353
+ type BannerIntent = 'default' | 'error' | 'success' | 'warning' | 'info';
1354
+
1355
+ declare const textOptions: {
1356
+ readonly pageHeader: {
1357
+ readonly label: "Page Header (3XL) · 34px (2.125rem)";
1358
+ readonly size: "3xl";
1359
+ readonly tag: "h2";
1360
+ readonly weight: 900;
1361
+ };
1362
+ readonly secondaryPageHeader: {
1363
+ readonly label: "Secondary Page Header (3XL) • 34px, 500 \"Medium\"";
1364
+ readonly size: "3xl";
1365
+ readonly tag: "h2";
1366
+ readonly weight: 500;
1367
+ };
1368
+ readonly header: {
1369
+ readonly label: "Header (2XL) · 28px (1.75rem)";
1370
+ readonly size: "2xl";
1371
+ readonly tag: "h3";
1372
+ readonly weight: 700;
1373
+ };
1374
+ readonly descriptionHeader: {
1375
+ readonly label: "Description Header (2XL) · 28px (1.75rem)";
1376
+ readonly size: "2xl";
1377
+ readonly tag: "h3";
1378
+ readonly weight: 700;
1379
+ };
1380
+ readonly title: {
1381
+ readonly label: "Title (XL) • 22px (1.375rem)";
1382
+ readonly size: "xl";
1383
+ readonly tag: "h4";
1384
+ readonly weight: 600;
1385
+ };
1386
+ readonly boldSubheader: {
1387
+ readonly label: "Bold Subheader (L) • 18px (1.125rem)";
1388
+ readonly size: "l";
1389
+ readonly tag: "h5";
1390
+ readonly weight: 700;
1391
+ };
1392
+ readonly semiBoldSubheader: {
1393
+ readonly label: "Semi Bold Subheader (L / H4) • 18px (1.125rem)";
1394
+ readonly size: "l";
1395
+ readonly tag: "h5";
1396
+ readonly weight: 600;
1397
+ };
1398
+ readonly subheader: {
1399
+ readonly label: "Subheader (L) • 18px (1.125rem)";
1400
+ readonly size: "l";
1401
+ readonly tag: "h5";
1402
+ readonly weight: 500;
1403
+ };
1404
+ readonly boldLabel: {
1405
+ readonly label: "Bold Label (Base) • 14px (.875rem)";
1406
+ readonly size: "base";
1407
+ readonly tag: "span";
1408
+ readonly weight: 700;
1409
+ };
1410
+ readonly semiBoldLabel: {
1411
+ readonly label: "Semi Bold Label (Base) • 14px (.875rem)";
1412
+ readonly size: "base";
1413
+ readonly tag: "span";
1414
+ readonly weight: 600;
1415
+ };
1416
+ readonly label: {
1417
+ readonly label: "Label (Base) • 14px (.875rem)";
1418
+ readonly size: "base";
1419
+ readonly tag: "span";
1420
+ readonly weight: 500;
1421
+ };
1422
+ readonly body: {
1423
+ readonly label: "Body (Base) • 14px (.875rem)";
1424
+ readonly size: "base";
1425
+ readonly tag: "span";
1426
+ readonly weight: 400;
1427
+ };
1428
+ readonly smallHeader: {
1429
+ readonly label: "Small header (S) • 12px (.75rem)";
1430
+ readonly size: "s";
1431
+ readonly tag: "span";
1432
+ readonly weight: 600;
1433
+ };
1434
+ readonly caption: {
1435
+ readonly label: "Caption (S) • 12px (.75rem)";
1436
+ readonly size: "s";
1437
+ readonly tag: "span";
1438
+ readonly weight: 400;
1439
+ };
1440
+ readonly hintText: {
1441
+ readonly label: "Hint text (XS) • 10px (.625rem)";
1442
+ readonly size: "xs";
1443
+ readonly tag: "span";
1444
+ readonly weight: 400;
1445
+ };
1446
+ };
1447
+ type TextOptions = typeof textOptions;
1448
+ type Size = TextOptions[keyof TextOptions]['size'];
1449
+ type Type = keyof TextOptions;
1450
+ type FontWeight = TextOptions[keyof TextOptions]['weight'];
1451
+
1452
+ type CustomAddressErrors = {
1453
+ city: string;
1454
+ firstName: string;
1455
+ lastName: string;
1456
+ line1: string;
1457
+ phone: string;
1458
+ postalCode: string;
1459
+ /**
1460
+ * Toggle to indicate if the error message should be shown
1461
+ */
1462
+ showError: boolean;
1463
+ state: string;
1464
+ };
1465
+
1466
+ type StripeStoreContactOption = {
1467
+ address: {
1468
+ city: string;
1469
+ country: string;
1470
+ line1: string;
1471
+ line2?: string;
1472
+ postal_code: string;
1473
+ state: string;
1474
+ };
1475
+ email: string;
1476
+ name: string;
1477
+ phone?: string;
1478
+ };
1479
+
1225
1480
  type TabItem = {
1226
1481
  index: number;
1227
1482
  isDone: boolean;
@@ -1260,761 +1515,144 @@ type CartItem = {
1260
1515
  sku?: string;
1261
1516
  };
1262
1517
 
1263
- type CalculateLandedCostAdjustmentInput = {
1264
- amount: number;
1265
- name?: string | null;
1266
- productId: string | null;
1267
- promoCode?: string | null;
1268
- sku: string | null;
1269
- type: LandedCostAdjustmentType;
1270
- };
1271
- type Extensions = {
1272
- [key: string]: unknown;
1273
- } & {
1274
- rule?: {
1275
- description: string;
1276
- id: string;
1277
- name: string;
1278
- };
1279
- ruleMessageType?: 'CUSTOM' | 'DEFAULT';
1280
- };
1281
- type ApiError = {
1282
- extensions?: Extensions | null;
1518
+ type NotificationInit = {
1283
1519
  message: string;
1284
- };
1285
- type CalculateLandedCostRequest = {
1286
- billingAddress: {
1287
- addressLine1: string;
1288
- addressLine2?: string | undefined;
1289
- city: string;
1290
- country: CountryCode;
1291
- postalCode: string;
1292
- state: string;
1293
- };
1294
- billingContact: {
1295
- firstName: string;
1296
- lastName: string;
1297
- phone: string;
1298
- };
1299
- checkoutSessionId: string;
1300
- contact: {
1301
- companyName?: string;
1302
- email?: string;
1303
- firstName: string;
1304
- lastName: string;
1305
- phone: string;
1306
- };
1307
1520
  /**
1308
- * When this is set, the created quote will not be shown on the Quote List page in the Zonos Dashboard.
1521
+ * Time in milliseconds
1522
+ * @default 4000
1309
1523
  */
1310
- isTest?: boolean;
1311
- items: CartItem[];
1312
- landedCostAdjustments?: CalculateLandedCostAdjustmentInput[];
1313
- metadata?: {
1314
- key: string;
1315
- value: string;
1316
- }[];
1524
+ timeout?: number;
1317
1525
  /**
1318
- * TaxId that the some destination countries require for the shipment.
1526
+ * Type of notification
1527
+ * @default 'success'
1319
1528
  */
1320
- shipToTaxId?: string;
1321
- shippingAddress: {
1322
- addressLine1: string;
1323
- addressLine2?: string | undefined;
1324
- city: string;
1325
- country: CountryCode;
1326
- postalCode: string;
1327
- state: string;
1328
- };
1529
+ type?: 'error' | 'success' | 'warning';
1329
1530
  };
1330
1531
 
1331
- type BuildLandedCostParams = {
1332
- billingAddress: CalculateLandedCostRequest['billingAddress'];
1333
- billingContact: CalculateLandedCostRequest['billingContact'];
1334
- checkoutSessionId: string;
1335
- contact: CalculateLandedCostRequest['contact'];
1336
- landedCostAdjustments?: CalculateLandedCostRequest['landedCostAdjustments'];
1337
- publicCredential: string;
1338
- shippingAddress: CalculateLandedCostRequest['shippingAddress'];
1339
- zonosApiRoute: string;
1532
+ declare const localeElementsSupportedLocationCodeEnum: {
1533
+ readonly Ar: "ar";
1534
+ readonly Da: "da";
1535
+ readonly De: "de";
1536
+ readonly En: "en";
1537
+ readonly Es: "es";
1538
+ readonly Fr: "fr";
1539
+ readonly He: "he";
1540
+ readonly Id: "id";
1541
+ readonly It: "it";
1542
+ readonly Ja: "ja";
1543
+ readonly Ko: "ko";
1544
+ readonly Nl: "nl";
1545
+ readonly No: "no";
1546
+ readonly Pl: "pl";
1547
+ readonly Pt: "pt";
1548
+ readonly Ru: "ru";
1549
+ readonly Sv: "sv";
1550
+ readonly Tr: "tr";
1551
+ readonly Vi: "vi";
1552
+ readonly Zh: "zh";
1340
1553
  };
1341
- type BuildLandedCostResponse = (CalculateLandedCostMutation & {
1342
- errors: ApiError[];
1343
- }) | null;
1554
+ type Locale_ElementsSupportedLocationCode_Enum = (typeof localeElementsSupportedLocationCodeEnum)[keyof typeof localeElementsSupportedLocationCodeEnum];
1344
1555
 
1345
- type ZonosOrder = GetOrderQuery['order'];
1556
+ type ICountry = {
1557
+ bigcommerceDisplayName?: string;
1558
+ code: CountryCode;
1559
+ currencyCode: string;
1560
+ displayName: string;
1561
+ languageCode: Locale_ElementsSupportedLocationCode_Enum;
1562
+ };
1563
+ type ICountryJson = {
1564
+ [countryCode: string]: ICountry;
1565
+ };
1346
1566
 
1347
- type BuildCardDetailParams = {
1348
- countryCode: CountryCode;
1349
- currencyCode: CurrencyCode;
1567
+ type Items = CheckItemRestrictionsMutation['itemRestrictionApply']['items'];
1568
+ type RestrictedItem = Items[number] & {
1569
+ name?: string;
1350
1570
  };
1351
- type PromiseOrValue<T> = T | Promise<T>;
1352
- type PrefillAddress = {
1353
- customerAddress1: string;
1354
- customerAddress2?: string;
1355
- customerCity?: string;
1356
- /**
1357
- * If country is not provided, it will try to pull from query params `zCountry` or `country` or `customerCountry` in the URL or fallback to user's selected country
1358
- */
1359
- customerCountry?: string;
1360
- customerEmail: string;
1361
- customerName: string;
1362
- customerPhone: string;
1363
- customerState?: string;
1364
- customerZip: string;
1571
+
1572
+ declare const restStateType: readonly ["Boxes", "Earth", "EmptyBox", "Lock", "PigBank", "Scribble", "Search", "Settings", "ShoppingCart", "SpilledCup", "Switch", "TaxId", "Truck", "Warning"];
1573
+ type RestStateType = (typeof restStateType)[number];
1574
+
1575
+ type ShippingRichRadioItem = {
1576
+ amount: number;
1577
+ caption?: string;
1578
+ label: string;
1579
+ landedCostId: string;
1580
+ method: IncotermCode;
1581
+ price: string;
1582
+ shipmentRatingId: string;
1583
+ sublabel?: string;
1584
+ value: string | number;
1365
1585
  };
1366
- type CreateCartIdObject = {
1367
- cartId: string;
1368
- customerAuthenticationToken?: string;
1369
- shippingData?: PrefillAddress | null;
1586
+
1587
+ type SpinnerColor = 'primary' | 'info' | 'success' | 'danger' | 'warning' | 'black' | 'white';
1588
+
1589
+ type CountryFieldLabelStateLabel = 'Commune' | 'County' | 'County or sector' | 'Department' | 'Derzhava' | 'District' | 'Do/Si' | 'Island' | 'Municipality' | 'Oblast' | 'Parish' | 'Prefecture' | 'Province' | 'Region' | 'State' | 'State or Territory' | 'State or province' | 'Village';
1590
+ type CountryFieldLabelAddress1Label = 'Address line 1' | 'Address1' | 'Adresa vulytsi' | 'Street address' | 'Street or avenue' | 'Ulica';
1591
+ type CountryFieldLabelAddress2Label = '' | 'Address 2' | 'Address line 2' | 'Address2' | 'Sector' | 'Street address 2';
1592
+ type CountryFieldLabelAddress3Label = '' | 'Address line 3' | 'Address3' | 'CEDEX' | 'Street address 3';
1593
+ type CountryFieldLabelCityLabel = '' | 'Area' | 'City' | 'City/Town' | 'Emirate' | 'Gorod' | 'Locality' | 'Misto' | 'Town' | 'Town / City' | 'Town or city';
1594
+ type CountryFieldLabelZipLabel = '' | 'Code postal' | 'Indeks' | 'Kodepos' | 'Poshtovyy indeks' | 'Postal code' | 'Postcode' | 'ZIP code' | 'Zip';
1595
+ type ICountryFieldLabelRegion = {
1596
+ interpayCode: string;
1370
1597
  };
1371
- type CheckoutConfig = {
1372
- /**
1373
- * Validate address to allow specific character sets
1374
- * @default ALL
1375
- */
1376
- allowedCharacterSets?: 'ALL' | 'LATIN';
1377
- /**
1378
- * Enable settlement currencies to pay in USD
1379
- * @default LOCAL
1380
- */
1381
- allowedSettlementCurrencies: AllowedSettlementCurrencies;
1382
- /**
1383
- * Always trigger International Checkout with this selector regardless of shipping zone
1384
- */
1385
- alwaysTriggerInternationalCheckoutSelector?: string | null;
1386
- analyticsProviders: Array<{
1387
- status: AnalyticsProviderStatus;
1388
- type: AnalyticsProviderType;
1389
- }>;
1598
+ type CountryFields = {
1599
+ address1Label: CountryFieldLabelAddress1Label;
1600
+ address1Required: boolean;
1601
+ address1Show: boolean;
1602
+ address2Label: CountryFieldLabelAddress2Label;
1603
+ address2Required: boolean;
1604
+ address2Show: boolean;
1605
+ address3Label: CountryFieldLabelAddress3Label;
1606
+ address3Required: boolean;
1607
+ address3Show: boolean;
1608
+ cityLabel: CountryFieldLabelCityLabel;
1609
+ cityRequired: boolean;
1610
+ cityShow: boolean;
1611
+ countryCode: CountryCode;
1612
+ countryCodeLabel?: string;
1613
+ displayName: string;
1614
+ nameLabel: string;
1615
+ phoneCode: number;
1616
+ phoneFormat: string | null;
1617
+ phonePlaceholder: string | null;
1618
+ regions: Record<string, ICountryFieldLabelRegion> | null;
1619
+ stateLabel: CountryFieldLabelStateLabel;
1620
+ stateRequired: boolean;
1621
+ stateShow: boolean;
1622
+ zipFormat: string | null;
1623
+ zipLabel: CountryFieldLabelZipLabel;
1624
+ zipRegex: string | null;
1625
+ zipRequired: boolean;
1626
+ zipShow: boolean;
1627
+ };
1628
+
1629
+ type GenericZonosSettings = {
1390
1630
  /**
1391
- * Time that payment will be captured after the order is placed. Can't be overridden in Zonos.init
1631
+ * Country that should be enable the custom address fields in the checkout based on the country user is from.
1392
1632
  */
1393
- captureDelay?: number;
1633
+ countryCustomAddressEnabled?: CountryCode[];
1394
1634
  /**
1395
- * @default DISABLED - when false, company fields would not show up in the checkout form
1635
+ * List of countries and
1396
1636
  */
1397
- companyFieldsStatus: 'ENABLED' | 'DISABLED';
1637
+ countryFields?: Record<CountryCode, CountryFields>;
1398
1638
  /**
1399
- * Duration (in seconds) for which the cart remains valid for checkout in hosted checkout.
1400
- * @default 3_600 (1 hour)
1639
+ * URL of the hosted checkout.
1401
1640
  */
1402
- defaultCartExpiration?: number;
1641
+ hostedCheckoutUrl?: string;
1403
1642
  /**
1404
- * @default false - when false, the place order button will be disabled until the script is loaded
1405
- * @note if set to true, the place order button will not be enabled or disabled
1643
+ * Use custom address fields in the checkout based on the country user is from.
1406
1644
  */
1407
- disablePlaceOrderButtonActivation?: boolean;
1408
- externalPaymentMethods: Array<{
1409
- status: ExternalPaymentMethodStatus;
1410
- type: ExternalPaymentMethodType;
1411
- }> | null;
1412
- externalServiceTokens: {
1413
- token: string;
1414
- type: ExternalServiceTokenType;
1415
- }[];
1645
+ shouldEnabledCustomAddress?: boolean;
1416
1646
  /**
1417
- * Test mode for checkout (sandbox or production)
1418
- * @default TEST
1647
+ * Signed token for Google Places API iframe access.
1419
1648
  */
1420
- mode: Mode;
1421
- orderNotifications: {
1422
- abandonedCart: {
1423
- delay: number;
1424
- discountPercent: number;
1425
- status: {
1426
- active: NotificationActiveStatus;
1427
- sendCopiesTo: Array<string>;
1428
- };
1429
- };
1430
- orderCancelled: {
1431
- active: NotificationActiveStatus;
1432
- sendCopiesTo: Array<string>;
1433
- };
1434
- orderShipped: {
1435
- active: NotificationActiveStatus;
1436
- sendCopiesTo: Array<string>;
1437
- };
1438
- };
1439
- organization: string;
1649
+ signedTokenGooglePlaces?: string;
1440
1650
  /**
1441
- * Place order button selector that only trigger International Checkout when shopper is in merchant's shipping zones
1651
+ * List of countries that are allowed to use USD denominated cards for settlement.
1442
1652
  */
1443
- placeOrderButtonSelector: string | null;
1444
- /**
1445
- * @param subscriptionStatus subscription status for checkout, checkout only available if subscription status is ENABLED and visibility status is ENABLED
1446
- *
1447
- * **NOTE: this value can't be overridden in Zonos.init**
1448
- */
1449
- subscriptionStatus: CheckoutSubscriptionStatus;
1450
- successBehavior: CheckoutSuccessBehavior;
1451
- /**
1452
- * The success page action text for checkout.
1453
- * @note Default text supports translation automatically, but any custom text will not be translated.
1454
- */
1455
- successPageActionText?: string;
1456
- /**
1457
- * The success page subtitle text for checkout. Each item in the array will appear on a new line.
1458
- * @note Default text supports translation automatically, but any custom text will not be translated.
1459
- */
1460
- successPageSubtitleText?: string[];
1461
- /**
1462
- * The success page title text for checkout.
1463
- * @note Default text supports translation automatically, but any custom text will not be translated.
1464
- */
1465
- successPageTitleText?: string;
1466
- successRedirectUrl: string;
1467
- visibilityStatus: CheckoutVisibilityStatus;
1468
- /**
1469
- * Cart info callback for checkout (optional),
1470
- * @deprecated This is deprecated in favor of the new callback `createCartId`. The new API would only need the cart ID to retrieve cart data.
1471
- * @note will attempt to use cart data if available
1472
- * User can dispatch an event 'zonos--init-cart-info' to update the cart
1473
- * @example
1474
- * const initEvent = new CustomEvent<CartItem[]>('zonos--init-cart-info', {
1475
- * detail: cartItems,
1476
- * });
1477
- * document.body.dispatchEvent(initEvent);
1478
- * @returns {object[]} - object with the the item info to be added to cart:
1479
- * - amount: number;
1480
- * - countryOfOrigin?: string;
1481
- * - currencyCode: string;
1482
- * - description?: string;
1483
- * - hsCode?: string;
1484
- * - imageUrl?: string;
1485
- * - name: string;
1486
- * - productId?: string;
1487
- * - quantity: number;
1488
- */
1489
- buildCartDetail?: (params: BuildCardDetailParams) => Promise<CartItem[]>;
1490
- /**
1491
- * Calculate landed cost callback for checkout (optional)
1492
- * @deprecated This is deprecated in favor of the new callback `createCartId`. When using the new callback, the cart details will be retrieved using the cart ID, so this callback would no longer be needed.
1493
- * @note will attempt to use cart data if available
1494
- */
1495
- buildLandedCost?: (params: BuildLandedCostParams) => Promise<BuildLandedCostResponse>;
1496
- /**
1497
- * A callback that returns the cart id from `cartCreate` mutation. You would use your cart data to call the `cartCreate` mutation and return the cart ID that was created.
1498
- * @note
1499
- * The mutation `cartCreate` should be called on the server side
1500
- * @returns string - Cart ID
1501
- */
1502
- createCartId?: () => PromiseOrValue<string | CreateCartIdObject>;
1503
- /**
1504
- * Callback trigger when the checkout is closed
1505
- */
1506
- onClose?: () => void;
1507
- /**
1508
- * This callback is optional. If provided, it will be called right before the payment is processed.
1509
- * @param items - The cart items.
1510
- * @returns {string | null} - The error message to display to the user. If the message is empty or null, the payment will proceed.
1511
- * @example
1512
- * onInventoryCheck: async ({ items }) => {
1513
- * // Check if all items are available from the server. If the fetch is throwing an error, show a generic error message "Unable to check inventory. Please try again.".
1514
- * const itemsInfo = await fetch('https://yourserver.com/api/get-available-items', {
1515
- * method: 'POST',
1516
- * body: JSON.stringify({ items }),
1517
- * });
1518
- * const items = await itemsInfo.json();
1519
- * // Filter out unavailable items.
1520
- * const unavailableItems = items.filter(item => !item.available);
1521
- * if (unavailableItems.length) {
1522
- * // Display an error message to the user.
1523
- * return `The following items are not available: ${unavailableItems.map(item => item.name).join(', ')}`;
1524
- * }
1525
- * // Proceed with the payment if you return an empty string or null.
1526
- * return '';
1527
- * }
1528
- */
1529
- onInventoryCheck?: (params: {
1530
- items: CartItem[];
1531
- }) => Promise<string | null>;
1532
- /**
1533
- * Callback trigger when payment succeeds
1534
- */
1535
- onOrderSuccess?: (props: {
1536
- zonosApiRoute: string;
1537
- zonosOrder: ZonosOrder;
1538
- }) => Promise<void>;
1539
- };
1540
-
1541
- type CountryOverrideBehavior = 'URL_PARAM' | 'SESSION';
1542
- type ShowForCountries = 'ALL' | 'ONLY_SHIPPABLE' | CountryCode[];
1543
- type ShowCountryList = 'ALL' | 'ONLY_SHIPPABLE' | CountryCode[];
1544
- type HelloConfig = {
1545
- anchorElementSelector: string;
1546
- cartUrlPattern: string | null;
1547
- /**
1548
- * The behavior to use when determining the country to use for the user.
1549
- * @default 'URL_PARAM'
1550
- */
1551
- countryOverrideBehavior?: CountryOverrideBehavior;
1552
- currencyBehavior: HelloCurrencyBehavior;
1553
- currencyElementSelector: string;
1554
- desktopLocation?: HelloMobileLocation | null;
1555
- excludedUrlPatterns: Array<string>;
1556
- homepageUrlPattern: string | null;
1557
- mobileLocation: HelloMobileLocation | null;
1558
- mode: Mode;
1559
- /**
1560
- * Position of floating hello if `anchorElementSelector` is not found after 3 seconds
1561
- *
1562
- * null: don't render if not found
1563
- *
1564
- * @default null
1565
- */
1566
- notFoundElementFallback: HelloMobileLocation | null;
1567
- organization: string;
1568
- peekMessageBehavior: HelloPeekMessageBehavior;
1569
- peekMessageDelay: number;
1570
- productAddToCartElementSelector: string | null;
1571
- productDescriptionElementSelector: string | null;
1572
- productDetailUrlPattern: string | null;
1573
- productListUrlPattern: string | null;
1574
- productTitleElementSelector: string | null;
1575
- restrictionBehavior: HelloRestrictionBehavior;
1576
- /**
1577
- * The countries to include in the country list dropdown of the Hello widget.
1578
- * @default ONLY_SHIPPABLE
1579
- */
1580
- showCountryList?: ShowCountryList;
1581
- /**
1582
- * The countries to show the widget for.
1583
- * @default ONLY_SHIPPABLE
1584
- */
1585
- showForCountries?: ShowForCountries;
1586
- visibilityStatus?: 'ENABLED' | 'DISABLED';
1587
- /**
1588
- * Callback function to run after the Hello widget has been initialized. This should be triggered only once when hello is attached to the DOM.
1589
- * **Note**: If hello is detached from the DOM and reattached, this callback will be called again.
1590
- * @param params - The parameters containing the country code and currency code that hello is initialized with.
1591
- */
1592
- onInitSuccess?: (params: {
1593
- countryCode: CountryCode;
1594
- currencyCode: CurrencyCode;
1595
- }) => Promise<void>;
1596
- };
1597
-
1598
- type CountryFieldLabelStateLabel = 'Commune' | 'County' | 'County or sector' | 'Department' | 'Derzhava' | 'District' | 'Do/Si' | 'Island' | 'Municipality' | 'Oblast' | 'Parish' | 'Prefecture' | 'Province' | 'Region' | 'State' | 'State or Territory' | 'State or province' | 'Village';
1599
- type CountryFieldLabelAddress1Label = 'Address line 1' | 'Address1' | 'Adresa vulytsi' | 'Street address' | 'Street or avenue' | 'Ulica';
1600
- type CountryFieldLabelAddress2Label = '' | 'Address 2' | 'Address line 2' | 'Address2' | 'Sector' | 'Street address 2';
1601
- type CountryFieldLabelAddress3Label = '' | 'Address line 3' | 'Address3' | 'CEDEX' | 'Street address 3';
1602
- type CountryFieldLabelCityLabel = '' | 'Area' | 'City' | 'City/Town' | 'Emirate' | 'Gorod' | 'Locality' | 'Misto' | 'Town' | 'Town / City' | 'Town or city';
1603
- type CountryFieldLabelZipLabel = '' | 'Code postal' | 'Indeks' | 'Kodepos' | 'Poshtovyy indeks' | 'Postal code' | 'Postcode' | 'ZIP code' | 'Zip';
1604
- type ICountryFieldLabelRegion = {
1605
- interpayCode: string;
1606
- };
1607
- type CountryFields = {
1608
- address1Label: CountryFieldLabelAddress1Label;
1609
- address1Required: boolean;
1610
- address1Show: boolean;
1611
- address2Label: CountryFieldLabelAddress2Label;
1612
- address2Required: boolean;
1613
- address2Show: boolean;
1614
- address3Label: CountryFieldLabelAddress3Label;
1615
- address3Required: boolean;
1616
- address3Show: boolean;
1617
- cityLabel: CountryFieldLabelCityLabel;
1618
- cityRequired: boolean;
1619
- cityShow: boolean;
1620
- countryCode: CountryCode;
1621
- countryCodeLabel?: string;
1622
- displayName: string;
1623
- nameLabel: string;
1624
- phoneCode: number;
1625
- phoneFormat: string | null;
1626
- phonePlaceholder: string | null;
1627
- regions: Record<string, ICountryFieldLabelRegion> | null;
1628
- stateLabel: CountryFieldLabelStateLabel;
1629
- stateRequired: boolean;
1630
- stateShow: boolean;
1631
- zipFormat: string | null;
1632
- zipLabel: CountryFieldLabelZipLabel;
1633
- zipRegex: string | null;
1634
- zipRequired: boolean;
1635
- zipShow: boolean;
1636
- };
1637
-
1638
- type GenericZonosSettings = {
1639
- /**
1640
- * Whether to enable company name input in the checkout.
1641
- */
1642
- companyNameInputEnabled?: boolean;
1643
- /**
1644
- * Country that should be enable the custom address fields in the checkout based on the country user is from.
1645
- */
1646
- countryCustomAddressEnabled?: CountryCode[];
1647
- /**
1648
- * List of countries and
1649
- */
1650
- countryFields?: Record<CountryCode, CountryFields>;
1651
- /**
1652
- * Use custom address fields in the checkout based on the country user is from.
1653
- */
1654
- shouldEnabledCustomAddress?: boolean;
1655
- /**
1656
- * Signed token for Google Places API iframe access.
1657
- */
1658
- signedTokenGooglePlaces?: string;
1659
- /**
1660
- * List of countries that are allowed to use USD denominated cards for settlement.
1661
- */
1662
- usdSettlementCountryEnabled?: CountryCode[];
1663
- };
1664
-
1665
- type AppearanceConfig = {
1666
- colorPrimary?: string;
1667
- colorSecondary?: string;
1668
- fontFamily: string;
1669
- fontSize2XL?: number;
1670
- fontSize3XL?: number;
1671
- fontSizeBase?: number;
1672
- fontSizeInputLabel?: number;
1673
- fontSizeInputValue?: number;
1674
- fontSizeL?: number;
1675
- fontSizeS?: number;
1676
- fontSizeXL?: number;
1677
- fontSizeXS?: number;
1678
- logoUrl: string;
1679
- style: ElementsUiStyle;
1680
- theme: ElementsUiTheme;
1681
- zonosAttribution: ZonosAttribution | null;
1682
- };
1683
-
1684
- declare const fallbackApiType: readonly ["cloudflare", "vercel"];
1685
- type FallBackApiType = (typeof fallbackApiType)[number];
1686
-
1687
- type LogBulkLoadRequestPayload = {
1688
- data: {
1689
- apiType: FallBackApiType;
1690
- connectionType?: string;
1691
- href: string;
1692
- isHostedCheckout: boolean;
1693
- isMobile: boolean;
1694
- loadTimeBrowserApi: number;
1695
- loadTimeInternal: number;
1696
- loadTimeTotal: number;
1697
- metadata: Record<string, unknown>;
1698
- screenHeight: number;
1699
- screenWidth: number;
1700
- userAgent: string;
1701
- }[];
1702
- storeId: number;
1703
- };
1704
-
1705
- type LoadTimeApiLogInfo = LogBulkLoadRequestPayload['data'][number];
1706
-
1707
- type CustomEventMap = {
1708
- legacyCheckoutError: string;
1709
- 'zonos-checkout-success': {
1710
- message: string;
1711
- };
1712
- };
1713
-
1714
- declare const _envClientSchema: z.ZodObject<{
1715
- NEXT_PUBLIC_FLAG_URL: z.ZodString;
1716
- NEXT_PUBLIC_RELEASE_DATE: z.ZodString;
1717
- NEXT_PUBLIC_ZONOS_API_KEY: z.ZodString;
1718
- NEXT_PUBLIC_ZONOS_CDNJS_CDN_URL: z.ZodString;
1719
- NEXT_PUBLIC_ZONOS_CDN_URL: z.ZodString;
1720
- NEXT_PUBLIC_ZONOS_CLOUDFLARE_URL: z.ZodString;
1721
- NEXT_PUBLIC_ZONOS_JS_DELIVR_CDN_URL: z.ZodString;
1722
- NEXT_PUBLIC_ZONOS_PACKAGE_VERSION: z.ZodString;
1723
- NEXT_PUBLIC_ZONOS_ROUTE_URL: z.ZodString;
1724
- NEXT_PUBLIC_ZONOS_UNPKG_CDN_URL: z.ZodString;
1725
- }, "strip", z.ZodTypeAny, {
1726
- NEXT_PUBLIC_FLAG_URL: string;
1727
- NEXT_PUBLIC_RELEASE_DATE: string;
1728
- NEXT_PUBLIC_ZONOS_API_KEY: string;
1729
- NEXT_PUBLIC_ZONOS_CDNJS_CDN_URL: string;
1730
- NEXT_PUBLIC_ZONOS_CDN_URL: string;
1731
- NEXT_PUBLIC_ZONOS_CLOUDFLARE_URL: string;
1732
- NEXT_PUBLIC_ZONOS_JS_DELIVR_CDN_URL: string;
1733
- NEXT_PUBLIC_ZONOS_PACKAGE_VERSION: string;
1734
- NEXT_PUBLIC_ZONOS_ROUTE_URL: string;
1735
- NEXT_PUBLIC_ZONOS_UNPKG_CDN_URL: string;
1736
- }, {
1737
- NEXT_PUBLIC_FLAG_URL: string;
1738
- NEXT_PUBLIC_RELEASE_DATE: string;
1739
- NEXT_PUBLIC_ZONOS_API_KEY: string;
1740
- NEXT_PUBLIC_ZONOS_CDNJS_CDN_URL: string;
1741
- NEXT_PUBLIC_ZONOS_CDN_URL: string;
1742
- NEXT_PUBLIC_ZONOS_CLOUDFLARE_URL: string;
1743
- NEXT_PUBLIC_ZONOS_JS_DELIVR_CDN_URL: string;
1744
- NEXT_PUBLIC_ZONOS_PACKAGE_VERSION: string;
1745
- NEXT_PUBLIC_ZONOS_ROUTE_URL: string;
1746
- NEXT_PUBLIC_ZONOS_UNPKG_CDN_URL: string;
1747
- }>;
1748
- interface Env extends z.infer<typeof _envClientSchema> {
1749
- }
1750
-
1751
- /* eslint-disable no-relative-import-paths/no-relative-import-paths */
1752
-
1753
- declare global {
1754
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
1755
- interface Document {
1756
- addEventListener<K extends keyof CustomEventMap>(
1757
- type: K,
1758
- listener: (this: Document, ev: CustomEvent<CustomEventMap[K]>) => void,
1759
- ): void;
1760
- }
1761
-
1762
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
1763
- interface Window {
1764
- Stripe?: StripeConstructor;
1765
- Zonos: Zonos;
1766
- /**
1767
- * A flag to determine if the current page is a BigCommerce page
1768
- */
1769
- bcConfig?: unknown;
1770
- /**
1771
- * This flag would be set to true if zonosQaUrl is present in the query params and preview script loadZonos.js is injected to DOM
1772
- */
1773
- isZonosPreview?: boolean;
1774
- /**
1775
- * A flag to determine if the current page is a BigCommerce page
1776
- */
1777
- stencilBootstrap?: unknown;
1778
- }
1779
-
1780
- namespace NodeJS {
1781
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
1782
- interface ProcessEnv extends Env {}
1783
- }
1784
- }
1785
-
1786
- type TranslatedText = {
1787
- [key: string]: string;
1788
- };
1789
- type EnteredInfo = {
1790
- city: string;
1791
- country: CountryCode;
1792
- email: string;
1793
- line1: string;
1794
- line2: string;
1795
- name: string;
1796
- phone: string;
1797
- postal_code: string;
1798
- state: string;
1799
- };
1800
- type ValidateAddressFields = Omit<StripeAddressElementChangeEvent['value']['address'], 'country'> & {
1801
- name: string;
1802
- };
1803
- type TranslatedAddressObject = {
1804
- [key in keyof ValidateAddressFields]?: TranslatedText;
1805
- };
1806
-
1807
- type SubmitEventData = {
1808
- billingAddress: Record<keyof TranslatedAddressObject, string> | null;
1809
- shippingAddress: Record<keyof TranslatedAddressObject, string>;
1810
- };
1811
-
1812
- declare const colorPrefixes: readonly ["blue", "cyan", "green", "orange", "purple", "red", "gray", "glass"];
1813
- declare const colorContrasts: readonly ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "950"];
1814
- type ColorContrast = (typeof colorContrasts)[number];
1815
- type ColorPrefix = (typeof colorPrefixes)[number];
1816
- type Color = 'gray-0' | 'gray-50' | 'glass-0' | 'glass-50' | `${ColorPrefix}-${ColorContrast}` | 'gray-1000' | 'glass-1100' | 'glass-1200';
1817
- declare const checkboxColorPrefix: readonly ["blue", "cyan", "green", "orange", "purple", "red", "gray"];
1818
- type CheckboxColorPrefix = (typeof checkboxColorPrefix)[number];
1819
-
1820
- type BannerIntent = 'default' | 'error' | 'success' | 'warning' | 'info';
1821
-
1822
- declare const textOptions: {
1823
- readonly pageHeader: {
1824
- readonly label: "Page Header (3XL) · 34px (2.125rem)";
1825
- readonly size: "3xl";
1826
- readonly tag: "h2";
1827
- readonly weight: 900;
1828
- };
1829
- readonly secondaryPageHeader: {
1830
- readonly label: "Secondary Page Header (3XL) • 34px, 500 \"Medium\"";
1831
- readonly size: "3xl";
1832
- readonly tag: "h2";
1833
- readonly weight: 500;
1834
- };
1835
- readonly header: {
1836
- readonly label: "Header (2XL) · 28px (1.75rem)";
1837
- readonly size: "2xl";
1838
- readonly tag: "h3";
1839
- readonly weight: 700;
1840
- };
1841
- readonly descriptionHeader: {
1842
- readonly label: "Description Header (2XL) · 28px (1.75rem)";
1843
- readonly size: "2xl";
1844
- readonly tag: "h3";
1845
- readonly weight: 700;
1846
- };
1847
- readonly title: {
1848
- readonly label: "Title (XL) • 22px (1.375rem)";
1849
- readonly size: "xl";
1850
- readonly tag: "h4";
1851
- readonly weight: 600;
1852
- };
1853
- readonly boldSubheader: {
1854
- readonly label: "Bold Subheader (L) • 18px (1.125rem)";
1855
- readonly size: "l";
1856
- readonly tag: "h5";
1857
- readonly weight: 700;
1858
- };
1859
- readonly semiBoldSubheader: {
1860
- readonly label: "Semi Bold Subheader (L / H4) • 18px (1.125rem)";
1861
- readonly size: "l";
1862
- readonly tag: "h5";
1863
- readonly weight: 600;
1864
- };
1865
- readonly subheader: {
1866
- readonly label: "Subheader (L) • 18px (1.125rem)";
1867
- readonly size: "l";
1868
- readonly tag: "h5";
1869
- readonly weight: 500;
1870
- };
1871
- readonly boldLabel: {
1872
- readonly label: "Bold Label (Base) • 14px (.875rem)";
1873
- readonly size: "base";
1874
- readonly tag: "span";
1875
- readonly weight: 700;
1876
- };
1877
- readonly semiBoldLabel: {
1878
- readonly label: "Semi Bold Label (Base) • 14px (.875rem)";
1879
- readonly size: "base";
1880
- readonly tag: "span";
1881
- readonly weight: 600;
1882
- };
1883
- readonly label: {
1884
- readonly label: "Label (Base) • 14px (.875rem)";
1885
- readonly size: "base";
1886
- readonly tag: "span";
1887
- readonly weight: 500;
1888
- };
1889
- readonly body: {
1890
- readonly label: "Body (Base) • 14px (.875rem)";
1891
- readonly size: "base";
1892
- readonly tag: "span";
1893
- readonly weight: 400;
1894
- };
1895
- readonly smallHeader: {
1896
- readonly label: "Small header (S) • 12px (.75rem)";
1897
- readonly size: "s";
1898
- readonly tag: "span";
1899
- readonly weight: 600;
1900
- };
1901
- readonly caption: {
1902
- readonly label: "Caption (S) • 12px (.75rem)";
1903
- readonly size: "s";
1904
- readonly tag: "span";
1905
- readonly weight: 400;
1906
- };
1907
- readonly hintText: {
1908
- readonly label: "Hint text (XS) • 10px (.625rem)";
1909
- readonly size: "xs";
1910
- readonly tag: "span";
1911
- readonly weight: 400;
1912
- };
1913
- };
1914
- type TextOptions = typeof textOptions;
1915
- type Size = TextOptions[keyof TextOptions]['size'];
1916
- type Type = keyof TextOptions;
1917
- type FontWeight = TextOptions[keyof TextOptions]['weight'];
1918
-
1919
- type CustomAddressErrors = {
1920
- city: string;
1921
- firstName: string;
1922
- lastName: string;
1923
- line1: string;
1924
- phone: string;
1925
- postalCode: string;
1926
- /**
1927
- * Toggle to indicate if the error message should be shown
1928
- */
1929
- showError: boolean;
1930
- state: string;
1931
- };
1932
-
1933
- type StripeStoreContactOption = {
1934
- address: {
1935
- city: string;
1936
- country: string;
1937
- line1: string;
1938
- line2?: string;
1939
- postal_code: string;
1940
- state: string;
1941
- };
1942
- email: string;
1943
- name: string;
1944
- phone?: string;
1945
- };
1946
-
1947
- type NotificationInit = {
1948
- message: string;
1949
- /**
1950
- * Time in milliseconds
1951
- * @default 4000
1952
- */
1953
- timeout?: number;
1954
- /**
1955
- * Type of notification
1956
- * @default 'success'
1957
- */
1958
- type?: 'error' | 'success' | 'warning';
1959
- };
1960
-
1961
- declare const localeElementsSupportedLocationCodeEnum: {
1962
- readonly Ar: "ar";
1963
- readonly Da: "da";
1964
- readonly De: "de";
1965
- readonly En: "en";
1966
- readonly Es: "es";
1967
- readonly Fr: "fr";
1968
- readonly He: "he";
1969
- readonly Id: "id";
1970
- readonly It: "it";
1971
- readonly Ja: "ja";
1972
- readonly Ko: "ko";
1973
- readonly Nl: "nl";
1974
- readonly No: "no";
1975
- readonly Pl: "pl";
1976
- readonly Pt: "pt";
1977
- readonly Ru: "ru";
1978
- readonly Sv: "sv";
1979
- readonly Tr: "tr";
1980
- readonly Vi: "vi";
1981
- readonly Zh: "zh";
1982
- };
1983
- type Locale_ElementsSupportedLocationCode_Enum = (typeof localeElementsSupportedLocationCodeEnum)[keyof typeof localeElementsSupportedLocationCodeEnum];
1984
-
1985
- type ICountry = {
1986
- bigcommerceDisplayName?: string;
1987
- code: CountryCode;
1988
- currencyCode: string;
1989
- displayName: string;
1990
- languageCode: Locale_ElementsSupportedLocationCode_Enum;
1991
- };
1992
- type ICountryJson = {
1993
- [countryCode: string]: ICountry;
1994
- };
1995
-
1996
- type Items = CheckItemRestrictionsMutation['itemRestrictionApply']['items'];
1997
- type RestrictedItem = Items[number] & {
1998
- name?: string;
1999
- };
2000
-
2001
- declare const restStateType: readonly ["Boxes", "Earth", "EmptyBox", "Lock", "PigBank", "Scribble", "Search", "Settings", "ShoppingCart", "SpilledCup", "Switch", "TaxId", "Truck", "Warning"];
2002
- type RestStateType = (typeof restStateType)[number];
2003
-
2004
- type ShippingRichRadioItem = {
2005
- amount: number;
2006
- caption?: string;
2007
- label: string;
2008
- landedCostId: string;
2009
- method: IncotermCode;
2010
- price: string;
2011
- shipmentRatingId: string;
2012
- sublabel?: string;
2013
- value: string | number;
1653
+ usdSettlementCountryEnabled?: CountryCode[];
2014
1654
  };
2015
1655
 
2016
- type SpinnerColor = 'primary' | 'info' | 'success' | 'danger' | 'warning' | 'black' | 'white';
2017
-
2018
1656
  type ToggleItem<TValue> = {
2019
1657
  isDisabled?: boolean;
2020
1658
  label: string;
@@ -2908,6 +2546,27 @@ declare namespace Components {
2908
2546
  */
2909
2547
  "titleText": string;
2910
2548
  }
2549
+ interface ZonosLoadingOverlay {
2550
+ /**
2551
+ * Whether or not the overlay is open
2552
+ * @default false
2553
+ */
2554
+ "open": boolean;
2555
+ /**
2556
+ * Spinner size (optional, default 40)
2557
+ */
2558
+ "size": number;
2559
+ /**
2560
+ * Spinner color (optional)
2561
+ */
2562
+ "spinnerColor"?: | 'primary'
2563
+ | 'info'
2564
+ | 'success'
2565
+ | 'danger'
2566
+ | 'warning'
2567
+ | 'black'
2568
+ | 'white';
2569
+ }
2911
2570
  interface ZonosLogo {
2912
2571
  /**
2913
2572
  * Theme to change the color of the logo
@@ -3750,6 +3409,12 @@ declare global {
3750
3409
  prototype: HTMLZonosLinkAuthenticationElement;
3751
3410
  new (): HTMLZonosLinkAuthenticationElement;
3752
3411
  };
3412
+ interface HTMLZonosLoadingOverlayElement extends Components.ZonosLoadingOverlay, HTMLStencilElement {
3413
+ }
3414
+ var HTMLZonosLoadingOverlayElement: {
3415
+ prototype: HTMLZonosLoadingOverlayElement;
3416
+ new (): HTMLZonosLoadingOverlayElement;
3417
+ };
3753
3418
  interface HTMLZonosLogoElement extends Components.ZonosLogo, HTMLStencilElement {
3754
3419
  }
3755
3420
  var HTMLZonosLogoElement: {
@@ -3989,6 +3654,7 @@ declare global {
3989
3654
  "zonos-language-select": HTMLZonosLanguageSelectElement;
3990
3655
  "zonos-link": HTMLZonosLinkElement;
3991
3656
  "zonos-link-authentication": HTMLZonosLinkAuthenticationElement;
3657
+ "zonos-loading-overlay": HTMLZonosLoadingOverlayElement;
3992
3658
  "zonos-logo": HTMLZonosLogoElement;
3993
3659
  "zonos-notification": HTMLZonosNotificationElement;
3994
3660
  "zonos-payment": HTMLZonosPaymentElement;
@@ -4901,6 +4567,27 @@ declare namespace LocalJSX {
4901
4567
  */
4902
4568
  "titleText": string;
4903
4569
  }
4570
+ interface ZonosLoadingOverlay {
4571
+ /**
4572
+ * Whether or not the overlay is open
4573
+ * @default false
4574
+ */
4575
+ "open"?: boolean;
4576
+ /**
4577
+ * Spinner size (optional, default 40)
4578
+ */
4579
+ "size"?: number;
4580
+ /**
4581
+ * Spinner color (optional)
4582
+ */
4583
+ "spinnerColor"?: | 'primary'
4584
+ | 'info'
4585
+ | 'success'
4586
+ | 'danger'
4587
+ | 'warning'
4588
+ | 'black'
4589
+ | 'white';
4590
+ }
4904
4591
  interface ZonosLogo {
4905
4592
  /**
4906
4593
  * Theme to change the color of the logo
@@ -5313,6 +5000,7 @@ declare namespace LocalJSX {
5313
5000
  "zonos-language-select": ZonosLanguageSelect;
5314
5001
  "zonos-link": ZonosLink;
5315
5002
  "zonos-link-authentication": ZonosLinkAuthentication;
5003
+ "zonos-loading-overlay": ZonosLoadingOverlay;
5316
5004
  "zonos-logo": ZonosLogo;
5317
5005
  "zonos-notification": ZonosNotification;
5318
5006
  "zonos-payment": ZonosPayment;
@@ -5375,6 +5063,7 @@ declare module "@stencil/core" {
5375
5063
  "zonos-language-select": LocalJSX.ZonosLanguageSelect & JSXBase.HTMLAttributes<HTMLZonosLanguageSelectElement>;
5376
5064
  "zonos-link": LocalJSX.ZonosLink & JSXBase.HTMLAttributes<HTMLZonosLinkElement>;
5377
5065
  "zonos-link-authentication": LocalJSX.ZonosLinkAuthentication & JSXBase.HTMLAttributes<HTMLZonosLinkAuthenticationElement>;
5066
+ "zonos-loading-overlay": LocalJSX.ZonosLoadingOverlay & JSXBase.HTMLAttributes<HTMLZonosLoadingOverlayElement>;
5378
5067
  "zonos-logo": LocalJSX.ZonosLogo & JSXBase.HTMLAttributes<HTMLZonosLogoElement>;
5379
5068
  "zonos-notification": LocalJSX.ZonosNotification & JSXBase.HTMLAttributes<HTMLZonosNotificationElement>;
5380
5069
  "zonos-payment": LocalJSX.ZonosPayment & JSXBase.HTMLAttributes<HTMLZonosPaymentElement>;
@@ -5405,6 +5094,74 @@ declare module "@stencil/core" {
5405
5094
  }
5406
5095
  }
5407
5096
 
5097
+ type CalculateLandedCostAdjustmentInput = {
5098
+ amount: number;
5099
+ name?: string | null;
5100
+ productId: string | null;
5101
+ promoCode?: string | null;
5102
+ sku: string | null;
5103
+ type: LandedCostAdjustmentType;
5104
+ };
5105
+ type Extensions = {
5106
+ [key: string]: unknown;
5107
+ } & {
5108
+ rule?: {
5109
+ description: string;
5110
+ id: string;
5111
+ name: string;
5112
+ };
5113
+ ruleMessageType?: 'CUSTOM' | 'DEFAULT';
5114
+ };
5115
+ type ApiError = {
5116
+ extensions?: Extensions | null;
5117
+ message: string;
5118
+ };
5119
+ type CalculateLandedCostRequest = {
5120
+ billingAddress: {
5121
+ addressLine1: string;
5122
+ addressLine2?: string | undefined;
5123
+ city: string;
5124
+ country: CountryCode;
5125
+ postalCode: string;
5126
+ state: string;
5127
+ };
5128
+ billingContact: {
5129
+ firstName: string;
5130
+ lastName: string;
5131
+ phone: string;
5132
+ };
5133
+ checkoutSessionId: string;
5134
+ contact: {
5135
+ companyName?: string;
5136
+ email?: string;
5137
+ firstName: string;
5138
+ lastName: string;
5139
+ phone: string;
5140
+ };
5141
+ /**
5142
+ * When this is set, the created quote will not be shown on the Quote List page in the Zonos Dashboard.
5143
+ */
5144
+ isTest?: boolean;
5145
+ items: CartItem[];
5146
+ landedCostAdjustments?: CalculateLandedCostAdjustmentInput[];
5147
+ metadata?: {
5148
+ key: string;
5149
+ value: string;
5150
+ }[];
5151
+ /**
5152
+ * TaxId that the some destination countries require for the shipment.
5153
+ */
5154
+ shipToTaxId?: string;
5155
+ shippingAddress: {
5156
+ addressLine1: string;
5157
+ addressLine2?: string | undefined;
5158
+ city: string;
5159
+ country: CountryCode;
5160
+ postalCode: string;
5161
+ state: string;
5162
+ };
5163
+ };
5164
+
5408
5165
  type NormalizedItemAttribute = {
5409
5166
  key: string;
5410
5167
  value: string;
@@ -5423,50 +5180,371 @@ type NormalizedTempCartItem = {
5423
5180
  unitOfMeasure: ItemUnitOfMeasure;
5424
5181
  value: number;
5425
5182
  }[];
5426
- name: string | null;
5427
- productId: string | null;
5428
- quantity: number;
5429
- sku: string | null;
5183
+ name: string | null;
5184
+ productId: string | null;
5185
+ quantity: number;
5186
+ sku: string | null;
5187
+ };
5188
+ type NormalizedTempCart = {
5189
+ adjustments: {
5190
+ amount: number;
5191
+ currencyCode: CurrencyCode;
5192
+ description: string | null;
5193
+ productId: string | null;
5194
+ promoCode?: string | null;
5195
+ sku: string | null;
5196
+ type: CartAdjustmentType;
5197
+ }[];
5198
+ createdAt: string;
5199
+ credentialToken: string;
5200
+ id: string;
5201
+ items: NormalizedTempCartItem[];
5202
+ metadata: {
5203
+ key: string;
5204
+ value: string;
5205
+ }[];
5206
+ storeBaseUrl: string;
5207
+ storeId: number;
5208
+ };
5209
+ type Settings = Omit<CartCheckoutWorkflowQuery['cartCheckoutWorkflow'], 'cart'> & {
5210
+ genericSettings: GenericZonosSettings | null;
5211
+ };
5212
+ type CartCheckoutResult = {
5213
+ cartData: NormalizedTempCart;
5214
+ settings: Settings & {
5215
+ organization: {
5216
+ id: string;
5217
+ name: string;
5218
+ references: {
5219
+ storeId: number | null;
5220
+ } | null;
5221
+ };
5222
+ };
5223
+ storeFaviconUrl: string;
5224
+ storeLogoUrl: string;
5225
+ };
5226
+
5227
+ type BuildLandedCostParams = {
5228
+ billingAddress: CalculateLandedCostRequest['billingAddress'];
5229
+ billingContact: CalculateLandedCostRequest['billingContact'];
5230
+ checkoutSessionId: string;
5231
+ contact: CalculateLandedCostRequest['contact'];
5232
+ landedCostAdjustments?: CalculateLandedCostRequest['landedCostAdjustments'];
5233
+ publicCredential: string;
5234
+ shippingAddress: CalculateLandedCostRequest['shippingAddress'];
5235
+ zonosApiRoute: string;
5236
+ };
5237
+ type BuildLandedCostResponse = (CalculateLandedCostMutation & {
5238
+ errors: ApiError[];
5239
+ }) | null;
5240
+
5241
+ type ZonosOrder = GetOrderQuery['order'];
5242
+
5243
+ type BuildCardDetailParams = {
5244
+ countryCode: CountryCode;
5245
+ currencyCode: CurrencyCode;
5246
+ };
5247
+ type PromiseOrValue<T> = T | Promise<T>;
5248
+ type PrefillAddress = {
5249
+ customerAddress1: string;
5250
+ customerAddress2?: string;
5251
+ customerCity?: string;
5252
+ /**
5253
+ * If country is not provided, it will try to pull from query params `zCountry` or `country` or `customerCountry` in the URL or fallback to user's selected country
5254
+ */
5255
+ customerCountry?: string;
5256
+ customerEmail: string;
5257
+ /**
5258
+ * Will use this value to prefill the first name field in the checkout form instead of `customerName`
5259
+ */
5260
+ customerFirstName: string;
5261
+ /**
5262
+ * Will use this value to prefill the last name field in the checkout form instead of `customerName`
5263
+ */
5264
+ customerLastName: string;
5265
+ /**
5266
+ * Will use this value to prefill if customerFirstName and customerLastName are not provided
5267
+ * @deprecated Use `customerFirstName` and `customerLastName` since Checkout uses 2 inputs for first and last name, there is not a good way to split the name into first and last name for some countries.
5268
+ */
5269
+ customerName?: string;
5270
+ customerPhone: string;
5271
+ customerState?: string;
5272
+ customerZip: string;
5273
+ };
5274
+ type CreateCartIdObject = {
5275
+ cartId: string;
5276
+ customerAuthenticationToken?: string;
5277
+ shippingData?: PrefillAddress | null;
5278
+ };
5279
+ type CheckoutConfig = {
5280
+ /**
5281
+ * Validate address to allow specific character sets
5282
+ * @default ALL
5283
+ */
5284
+ allowedCharacterSets?: 'ALL' | 'LATIN';
5285
+ /**
5286
+ * Enable settlement currencies to pay in USD
5287
+ * @default LOCAL
5288
+ */
5289
+ allowedSettlementCurrencies: AllowedSettlementCurrencies;
5290
+ /**
5291
+ * Always trigger International Checkout with this selector regardless of shipping zone
5292
+ */
5293
+ alwaysTriggerInternationalCheckoutSelector?: string | null;
5294
+ analyticsProviders: Array<{
5295
+ status: AnalyticsProviderStatus;
5296
+ type: AnalyticsProviderType;
5297
+ }>;
5298
+ /**
5299
+ * Time that payment will be captured after the order is placed. Can't be overridden in Zonos.init
5300
+ */
5301
+ captureDelay?: number;
5302
+ /**
5303
+ * @default DISABLED - when false, company fields would not show up in the checkout form
5304
+ */
5305
+ companyFieldsStatus: 'ENABLED' | 'DISABLED';
5306
+ /**
5307
+ * Duration (in seconds) for which the cart remains valid for checkout in hosted checkout.
5308
+ * @default 3_600 (1 hour)
5309
+ */
5310
+ defaultCartExpiration?: number;
5311
+ /**
5312
+ * @default false - when false, the place order button will be disabled until the script is loaded
5313
+ * @note if set to true, the place order button will not be enabled or disabled
5314
+ */
5315
+ disablePlaceOrderButtonActivation?: boolean;
5316
+ externalPaymentMethods: Array<{
5317
+ status: ExternalPaymentMethodStatus;
5318
+ type: ExternalPaymentMethodType;
5319
+ }> | null;
5320
+ externalServiceTokens: {
5321
+ token: string;
5322
+ type: ExternalServiceTokenType;
5323
+ }[];
5324
+ /**
5325
+ * Test mode for checkout (sandbox or production)
5326
+ * @default TEST
5327
+ */
5328
+ mode: Mode;
5329
+ orderNotifications: {
5330
+ abandonedCart: {
5331
+ delay: number;
5332
+ discountPercent: number;
5333
+ status: {
5334
+ active: NotificationActiveStatus;
5335
+ sendCopiesTo: Array<string>;
5336
+ };
5337
+ };
5338
+ orderCancelled: {
5339
+ active: NotificationActiveStatus;
5340
+ sendCopiesTo: Array<string>;
5341
+ };
5342
+ orderShipped: {
5343
+ active: NotificationActiveStatus;
5344
+ sendCopiesTo: Array<string>;
5345
+ };
5346
+ };
5347
+ organization: string;
5348
+ /**
5349
+ * Place order button selector that only trigger International Checkout when shopper is in merchant's shipping zones
5350
+ */
5351
+ placeOrderButtonSelector: string | null;
5352
+ /**
5353
+ * @param subscriptionStatus subscription status for checkout, checkout only available if subscription status is ENABLED and visibility status is ENABLED
5354
+ *
5355
+ * **NOTE: this value can't be overridden in Zonos.init**
5356
+ */
5357
+ subscriptionStatus: CheckoutSubscriptionStatus;
5358
+ successBehavior: CheckoutSuccessBehavior;
5359
+ /**
5360
+ * The success page action text for checkout.
5361
+ * @note Default text supports translation automatically, but any custom text will not be translated.
5362
+ */
5363
+ successPageActionText?: string;
5364
+ /**
5365
+ * The success page subtitle text for checkout. Each item in the array will appear on a new line.
5366
+ * @note Default text supports translation automatically, but any custom text will not be translated.
5367
+ */
5368
+ successPageSubtitleText?: string[];
5369
+ /**
5370
+ * The success page title text for checkout.
5371
+ * @note Default text supports translation automatically, but any custom text will not be translated.
5372
+ */
5373
+ successPageTitleText?: string;
5374
+ successRedirectUrl: string;
5375
+ visibilityStatus: CheckoutVisibilityStatus;
5376
+ /**
5377
+ * Cart info callback for checkout (optional),
5378
+ * @deprecated This is deprecated in favor of the new callback `createCartId`. The new API would only need the cart ID to retrieve cart data.
5379
+ * @note will attempt to use cart data if available
5380
+ * User can dispatch an event 'zonos--init-cart-info' to update the cart
5381
+ * @example
5382
+ * const initEvent = new CustomEvent<CartItem[]>('zonos--init-cart-info', {
5383
+ * detail: cartItems,
5384
+ * });
5385
+ * document.body.dispatchEvent(initEvent);
5386
+ * @returns {object[]} - object with the the item info to be added to cart:
5387
+ * - amount: number;
5388
+ * - countryOfOrigin?: string;
5389
+ * - currencyCode: string;
5390
+ * - description?: string;
5391
+ * - hsCode?: string;
5392
+ * - imageUrl?: string;
5393
+ * - name: string;
5394
+ * - productId?: string;
5395
+ * - quantity: number;
5396
+ */
5397
+ buildCartDetail?: (params: BuildCardDetailParams) => Promise<CartItem[]>;
5398
+ /**
5399
+ * Calculate landed cost callback for checkout (optional)
5400
+ * @deprecated This is deprecated in favor of the new callback `createCartId`. When using the new callback, the cart details will be retrieved using the cart ID, so this callback would no longer be needed.
5401
+ * @note will attempt to use cart data if available
5402
+ */
5403
+ buildLandedCost?: (params: BuildLandedCostParams) => Promise<BuildLandedCostResponse>;
5404
+ /**
5405
+ * A callback that returns the cart id from `cartCreate` mutation. You would use your cart data to call the `cartCreate` mutation and return the cart ID that was created.
5406
+ * @note
5407
+ * The mutation `cartCreate` should be called on the server side
5408
+ * @returns string - Cart ID
5409
+ */
5410
+ createCartId?: () => PromiseOrValue<string | CreateCartIdObject>;
5411
+ /**
5412
+ * Callback trigger when the checkout is closed
5413
+ */
5414
+ onClose?: () => void;
5415
+ /**
5416
+ * This callback is optional. If provided, it will be called right before the payment is processed.
5417
+ * @param items - The cart items.
5418
+ * @returns {string | null} - The error message to display to the user. If the message is empty or null, the payment will proceed.
5419
+ * @example
5420
+ * onInventoryCheck: async ({ items }) => {
5421
+ * // Check if all items are available from the server. If the fetch is throwing an error, show a generic error message "Unable to check inventory. Please try again.".
5422
+ * const itemsInfo = await fetch('https://yourserver.com/api/get-available-items', {
5423
+ * method: 'POST',
5424
+ * body: JSON.stringify({ items }),
5425
+ * });
5426
+ * const items = await itemsInfo.json();
5427
+ * // Filter out unavailable items.
5428
+ * const unavailableItems = items.filter(item => !item.available);
5429
+ * if (unavailableItems.length) {
5430
+ * // Display an error message to the user.
5431
+ * return `The following items are not available: ${unavailableItems.map(item => item.name).join(', ')}`;
5432
+ * }
5433
+ * // Proceed with the payment if you return an empty string or null.
5434
+ * return '';
5435
+ * }
5436
+ */
5437
+ onInventoryCheck?: (params: {
5438
+ items: CartItem[];
5439
+ }) => Promise<string | null>;
5440
+ /**
5441
+ * Callback trigger when payment succeeds
5442
+ */
5443
+ onOrderSuccess?: (props: {
5444
+ zonosApiRoute: string;
5445
+ zonosOrder: ZonosOrder;
5446
+ }) => Promise<void>;
5430
5447
  };
5431
- type NormalizedTempCart = {
5432
- adjustments: {
5433
- amount: number;
5448
+
5449
+ type CountryOverrideBehavior = 'URL_PARAM' | 'SESSION';
5450
+ type ShowForCountries = 'ALL' | 'ONLY_SHIPPABLE' | CountryCode[];
5451
+ type ShowCountryList = 'ALL' | 'ONLY_SHIPPABLE' | CountryCode[];
5452
+ type HelloConfig = {
5453
+ anchorElementSelector: string;
5454
+ cartUrlPattern: string | null;
5455
+ /**
5456
+ * The behavior to use when determining the country to use for the user.
5457
+ * @default 'URL_PARAM'
5458
+ */
5459
+ countryOverrideBehavior?: CountryOverrideBehavior;
5460
+ currencyBehavior: HelloCurrencyBehavior;
5461
+ currencyElementSelector: string;
5462
+ desktopLocation?: HelloMobileLocation | null;
5463
+ excludedUrlPatterns: Array<string>;
5464
+ homepageUrlPattern: string | null;
5465
+ mobileLocation: HelloMobileLocation | null;
5466
+ mode: Mode;
5467
+ /**
5468
+ * Position of floating hello if `anchorElementSelector` is not found after 3 seconds
5469
+ *
5470
+ * null: don't render if not found
5471
+ *
5472
+ * @default null
5473
+ */
5474
+ notFoundElementFallback: HelloMobileLocation | null;
5475
+ organization: string;
5476
+ peekMessageBehavior: HelloPeekMessageBehavior;
5477
+ peekMessageDelay: number;
5478
+ productAddToCartElementSelector: string | null;
5479
+ productDescriptionElementSelector: string | null;
5480
+ productDetailUrlPattern: string | null;
5481
+ productListUrlPattern: string | null;
5482
+ productTitleElementSelector: string | null;
5483
+ restrictionBehavior: HelloRestrictionBehavior;
5484
+ /**
5485
+ * The countries to include in the country list dropdown of the Hello widget.
5486
+ * @default ONLY_SHIPPABLE
5487
+ */
5488
+ showCountryList?: ShowCountryList;
5489
+ /**
5490
+ * The countries to show the widget for.
5491
+ * @default ONLY_SHIPPABLE
5492
+ */
5493
+ showForCountries?: ShowForCountries;
5494
+ visibilityStatus?: 'ENABLED' | 'DISABLED';
5495
+ /**
5496
+ * Callback function to run after the Hello widget has been initialized. This should be triggered only once when hello is attached to the DOM.
5497
+ * **Note**: If hello is detached from the DOM and reattached, this callback will be called again.
5498
+ * @param params - The parameters containing the country code and currency code that hello is initialized with.
5499
+ */
5500
+ onInitSuccess?: (params: {
5501
+ countryCode: CountryCode;
5434
5502
  currencyCode: CurrencyCode;
5435
- description: string | null;
5436
- productId: string | null;
5437
- promoCode?: string | null;
5438
- sku: string | null;
5439
- type: CartAdjustmentType;
5440
- }[];
5441
- createdAt: string;
5442
- credentialToken: string;
5443
- id: string;
5444
- items: NormalizedTempCartItem[];
5445
- metadata: {
5446
- key: string;
5447
- value: string;
5503
+ }) => Promise<void>;
5504
+ };
5505
+
5506
+ declare const fallbackApiType: readonly ["cloudflare", "vercel"];
5507
+ type FallBackApiType = (typeof fallbackApiType)[number];
5508
+
5509
+ type LogBulkLoadRequestPayload = {
5510
+ data: {
5511
+ apiType: FallBackApiType;
5512
+ connectionType?: string;
5513
+ href: string;
5514
+ isHostedCheckout: boolean;
5515
+ isMobile: boolean;
5516
+ loadTimeBrowserApi: number;
5517
+ loadTimeInternal: number;
5518
+ loadTimeTotal: number;
5519
+ metadata: Record<string, unknown>;
5520
+ screenHeight: number;
5521
+ screenWidth: number;
5522
+ userAgent: string;
5448
5523
  }[];
5449
- storeBaseUrl: string;
5450
5524
  storeId: number;
5451
5525
  };
5452
- type Settings = Omit<CartCheckoutWorkflowQuery['cartCheckoutWorkflow'], 'cart'> & {
5453
- genericSettings: GenericZonosSettings | null;
5454
- };
5455
- type CartCheckoutResult = {
5456
- cartData: NormalizedTempCart;
5457
- settings: Settings & {
5458
- organization: {
5459
- id: string;
5460
- name: string;
5461
- references: {
5462
- storeId: number | null;
5463
- } | null;
5464
- };
5465
- };
5466
- storeFaviconUrl: string;
5467
- storeLogoUrl: string;
5526
+
5527
+ type AppearanceConfig = {
5528
+ colorPrimary?: string;
5529
+ colorSecondary?: string;
5530
+ fontFamily: string;
5531
+ fontSize2XL?: number;
5532
+ fontSize3XL?: number;
5533
+ fontSizeBase?: number;
5534
+ fontSizeInputLabel?: number;
5535
+ fontSizeInputValue?: number;
5536
+ fontSizeL?: number;
5537
+ fontSizeS?: number;
5538
+ fontSizeXL?: number;
5539
+ fontSizeXS?: number;
5540
+ logoUrl: string;
5541
+ style: ElementsUiStyle;
5542
+ theme: ElementsUiTheme;
5543
+ zonosAttribution: ZonosAttribution | null;
5468
5544
  };
5469
5545
 
5546
+ type LoadTimeApiLogInfo = LogBulkLoadRequestPayload['data'][number];
5547
+
5470
5548
  type TrackEventLog = {
5471
5549
  checkoutSessionId: string | null;
5472
5550
  eventCreated: number;