@liquidcommerce/elements-sdk 2.6.0-beta.1 → 2.6.0-beta.100

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 (274) hide show
  1. package/README.md +99 -2517
  2. package/dist/index.checkout.esm.js +17794 -0
  3. package/dist/index.esm.js +26010 -20601
  4. package/dist/ssr-stub.checkout.esm.js +18 -0
  5. package/dist/ssr-stub.esm.js +270 -0
  6. package/dist/types/auto-initialize/checkout.d.ts +2 -0
  7. package/dist/types/auto-initialize/shared-utils.d.ts +50 -0
  8. package/dist/types/{elements-base-client.d.ts → clients/base.d.ts} +15 -2
  9. package/dist/types/clients/builder.d.ts +3 -0
  10. package/dist/types/clients/checkout.d.ts +6 -0
  11. package/dist/types/{elements-client-helper.d.ts → clients/helpers.d.ts} +2 -1
  12. package/dist/types/clients/main.d.ts +3 -0
  13. package/dist/types/constants/core.constant.d.ts +13 -6
  14. package/dist/types/core/a11y/announcer.service.d.ts +16 -0
  15. package/dist/types/core/a11y/focus-manager.service.d.ts +21 -0
  16. package/dist/types/core/a11y/focusable.d.ts +5 -0
  17. package/dist/types/core/a11y/glyph-button.d.ts +8 -0
  18. package/dist/types/core/a11y/index.d.ts +5 -0
  19. package/dist/types/core/a11y/single-select.d.ts +16 -0
  20. package/dist/types/core/api/api-client.service.d.ts +23 -22
  21. package/dist/types/core/api/api-result.d.ts +19 -0
  22. package/dist/types/core/api/auth-client.service.d.ts +39 -26
  23. package/dist/types/core/api/http-client.service.d.ts +0 -8
  24. package/dist/types/core/base-component.service.d.ts +4 -1
  25. package/dist/types/core/client/actions/base-action.service.d.ts +22 -0
  26. package/dist/types/core/client/actions/client-address-action.service.d.ts +18 -0
  27. package/dist/types/core/client/actions/client-cart-action.service.d.ts +38 -0
  28. package/dist/types/core/client/actions/client-checkout-action.service.d.ts +69 -0
  29. package/dist/types/core/client/actions/client-product-action.service.d.ts +15 -0
  30. package/dist/types/core/client/client-action.service.d.ts +6 -67
  31. package/dist/types/core/client/client-config.service.d.ts +9 -5
  32. package/dist/types/core/command/base-command.service.d.ts +2 -2
  33. package/dist/types/core/command/common-command.service.d.ts +2 -1
  34. package/dist/types/core/google-tag-manager.service.d.ts +15 -11
  35. package/dist/types/core/logger/logger.service.d.ts +1 -1
  36. package/dist/types/core/pubsub/interfaces/address.interface.d.ts +6 -12
  37. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +27 -64
  38. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +45 -50
  39. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +11 -6
  40. package/dist/types/core/pubsub/interfaces/product.interface.d.ts +16 -81
  41. package/dist/types/core/pubsub/pubsub.service.d.ts +1 -2
  42. package/dist/types/core/singleton-manager.service.d.ts +12 -8
  43. package/dist/types/core/store/interfaces/address.interface.d.ts +3 -12
  44. package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -55
  45. package/dist/types/core/store/interfaces/checkout.interface.d.ts +18 -108
  46. package/dist/types/core/store/interfaces/core.interface.d.ts +16 -5
  47. package/dist/types/core/store/interfaces/metadata.interface.d.ts +11 -0
  48. package/dist/types/core/store/interfaces/product-list.interface.d.ts +30 -0
  49. package/dist/types/core/store/interfaces/product.interface.d.ts +13 -66
  50. package/dist/types/core/store/store.constant.d.ts +6 -1
  51. package/dist/types/core/store/store.service.d.ts +1 -0
  52. package/dist/types/core/telemetry/telemetry.interface.d.ts +0 -1
  53. package/dist/types/core/telemetry/telemetry.service.d.ts +1 -0
  54. package/dist/types/enums/core.enum.d.ts +40 -1
  55. package/dist/types/enums/index.d.ts +0 -1
  56. package/dist/types/index.checkout.d.ts +8 -0
  57. package/dist/types/index.checkout.umd.d.ts +4 -0
  58. package/dist/types/index.d.ts +8 -3
  59. package/dist/types/interfaces/api/address.interface.d.ts +28 -0
  60. package/dist/types/interfaces/api/cart.interface.d.ts +96 -0
  61. package/dist/types/interfaces/api/checkout.interface.d.ts +239 -0
  62. package/dist/types/interfaces/{cloud → api}/index.d.ts +1 -3
  63. package/dist/types/interfaces/api/product-list.interface.d.ts +39 -0
  64. package/dist/types/interfaces/api/product.interface.d.ts +112 -0
  65. package/dist/types/interfaces/client.interface.d.ts +72 -0
  66. package/dist/types/interfaces/component.interface.d.ts +7 -0
  67. package/dist/types/interfaces/config.interface.d.ts +40 -0
  68. package/dist/types/interfaces/configs/address.interface.d.ts +1 -1
  69. package/dist/types/interfaces/configs/cart.interface.d.ts +1 -1
  70. package/dist/types/interfaces/configs/checkout.interface.d.ts +2 -1
  71. package/dist/types/interfaces/configs/configurations.interface.d.ts +5 -5
  72. package/dist/types/interfaces/configs/global.interface.d.ts +10 -3
  73. package/dist/types/interfaces/configs/index.d.ts +1 -0
  74. package/dist/types/interfaces/configs/product-list.interface.d.ts +49 -0
  75. package/dist/types/interfaces/configs/product.interface.d.ts +4 -1
  76. package/dist/types/interfaces/injection.interface.d.ts +49 -0
  77. package/dist/types/modules/address/address-display.component.d.ts +3 -1
  78. package/dist/types/modules/address/address-input.component.d.ts +10 -1
  79. package/dist/types/modules/address/address.command.d.ts +4 -4
  80. package/dist/types/modules/address/address.interface.d.ts +0 -7
  81. package/dist/types/modules/address/styles/register-styles.d.ts +1 -0
  82. package/dist/types/modules/cart/cart.commands.d.ts +4 -5
  83. package/dist/types/modules/cart/components/cart-body.component.d.ts +3 -1
  84. package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
  85. package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
  86. package/dist/types/modules/cart/components/cart-item-quantity-price.component.d.ts +5 -0
  87. package/dist/types/modules/cart/components/cart-item.component.d.ts +6 -0
  88. package/dist/types/modules/cart/styles/register-styles.d.ts +1 -0
  89. package/dist/types/modules/checkout/checkout.commands.d.ts +27 -10
  90. package/dist/types/modules/checkout/checkout.component.d.ts +2 -0
  91. package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
  92. package/dist/types/modules/checkout/components/checkout-completed.component.d.ts +5 -0
  93. package/dist/types/modules/checkout/components/checkout-header.component.d.ts +1 -0
  94. package/dist/types/modules/checkout/components/checkout-item-quantity.component.d.ts +4 -0
  95. package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
  96. package/dist/types/modules/checkout/components/checkout-payment.component.d.ts +2 -1
  97. package/dist/types/modules/checkout/components/checkout-place-order-button.component.d.ts +2 -0
  98. package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +14 -1
  99. package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
  100. package/dist/types/modules/checkout/components/checkout-stripe-form.component.d.ts +2 -1
  101. package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +2 -2
  102. package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
  103. package/dist/types/modules/checkout/constant.d.ts +3 -0
  104. package/dist/types/modules/checkout/styles/register-styles.d.ts +1 -0
  105. package/dist/types/modules/product/components/components.d.ts +7 -4
  106. package/dist/types/modules/product/components/product-add-to-cart-section.component.d.ts +7 -1
  107. package/dist/types/modules/product/components/product-description.component.d.ts +1 -0
  108. package/dist/types/modules/product/components/product-drawer.component.d.ts +6 -0
  109. package/dist/types/modules/product/components/product-image-carousel.component.d.ts +5 -0
  110. package/dist/types/modules/product/components/product-options.component.d.ts +2 -1
  111. package/dist/types/modules/product/components/product-retailers-carousel.component.d.ts +4 -0
  112. package/dist/types/modules/product/components/product-retailers-popup-list.component.d.ts +10 -2
  113. package/dist/types/modules/product/product.commands.d.ts +7 -7
  114. package/dist/types/modules/product/styles/register-styles.d.ts +1 -0
  115. package/dist/types/modules/product-list/components/card-components/index.d.ts +5 -0
  116. package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +9 -0
  117. package/dist/types/modules/product-list/components/card-components/product-button.d.ts +11 -0
  118. package/dist/types/modules/product-list/components/card-components/product-price-and-personalization.d.ts +14 -0
  119. package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +11 -0
  120. package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +14 -0
  121. package/dist/types/modules/product-list/components/filter-components/index.d.ts +7 -0
  122. package/dist/types/modules/product-list/components/filter-components/product-list-apply-filter-button.d.ts +1 -0
  123. package/dist/types/modules/product-list/components/filter-components/product-list-checkbox-filter.d.ts +7 -0
  124. package/dist/types/modules/product-list/components/filter-components/product-list-chip.d.ts +5 -0
  125. package/dist/types/modules/product-list/components/filter-components/product-list-filters-chips.d.ts +13 -0
  126. package/dist/types/modules/product-list/components/filter-components/product-list-fulfillment-filter.d.ts +15 -0
  127. package/dist/types/modules/product-list/components/filter-components/product-list-price-filter.d.ts +22 -0
  128. package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +7 -0
  129. package/dist/types/modules/product-list/components/index.d.ts +6 -0
  130. package/dist/types/modules/product-list/components/product-list-card-loading.component.d.ts +3 -1
  131. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +36 -30
  132. package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +12 -0
  133. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +56 -14
  134. package/dist/types/modules/product-list/components/product-list-product-engraving-lines.component.d.ts +22 -0
  135. package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +53 -0
  136. package/dist/types/modules/product-list/components/product-list-search.component.d.ts +25 -0
  137. package/dist/types/modules/product-list/product-list-filter.utils.d.ts +8 -0
  138. package/dist/types/modules/product-list/product-list-query-params.utils.d.ts +3 -0
  139. package/dist/types/modules/product-list/product-list.commands.d.ts +23 -7
  140. package/dist/types/modules/product-list/product-list.component.d.ts +17 -39
  141. package/dist/types/modules/product-list/product-list.constants.d.ts +38 -0
  142. package/dist/types/modules/product-list/product-list.interface.d.ts +65 -0
  143. package/dist/types/modules/product-list/styles/product-list-card.style.d.ts +1 -0
  144. package/dist/types/modules/product-list/styles/product-list-filters.style.d.ts +1 -0
  145. package/dist/types/modules/product-list/styles/register-styles.d.ts +1 -0
  146. package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
  147. package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
  148. package/dist/types/modules/theme-provider/services/style-registry.service.d.ts +16 -0
  149. package/dist/types/modules/theme-provider/services/stylesheet-generator.service.d.ts +0 -1
  150. package/dist/types/modules/theme-provider/styles/register-styles.d.ts +1 -0
  151. package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -2
  152. package/dist/types/modules/ui-components/alert/alert.component.d.ts +1 -1
  153. package/dist/types/modules/ui-components/buttons/buttons-open-cart.component.d.ts +5 -0
  154. package/dist/types/modules/ui-components/drawer/drawer.component.d.ts +15 -0
  155. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +8 -1
  156. package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +7 -1
  157. package/dist/types/modules/ui-components/input/index.d.ts +0 -1
  158. package/dist/types/modules/ui-components/input/input.component.d.ts +14 -1
  159. package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +2 -1
  160. package/dist/types/modules/ui-components/promo-code-ticker/promo-code-ticker.component.d.ts +1 -1
  161. package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
  162. package/dist/types/modules/ui-components/ui.commands.d.ts +7 -1
  163. package/dist/types/ssr/stub.checkout.d.ts +6 -0
  164. package/dist/types/ssr/stub.d.ts +10 -0
  165. package/dist/types/static/icon/arrow-right.icon.d.ts +1 -1
  166. package/dist/types/static/icon/bag.icon.d.ts +1 -1
  167. package/dist/types/static/icon/check.icon.d.ts +2 -0
  168. package/dist/types/static/icon/checkbox.icon.d.ts +1 -1
  169. package/dist/types/static/icon/chevron-down.icon.d.ts +1 -1
  170. package/dist/types/static/icon/chevron-left.icon.d.ts +1 -1
  171. package/dist/types/static/icon/chevron-up.icon.d.ts +2 -0
  172. package/dist/types/static/icon/close.icon.d.ts +1 -1
  173. package/dist/types/static/icon/error-info.icon.d.ts +1 -1
  174. package/dist/types/static/icon/filter.icon.d.ts +2 -0
  175. package/dist/types/static/icon/icon.a11y.d.ts +1 -0
  176. package/dist/types/static/icon/icon.types.d.ts +1 -0
  177. package/dist/types/static/icon/index.d.ts +3 -0
  178. package/dist/types/static/icon/info.icon.d.ts +1 -1
  179. package/dist/types/static/icon/loading-spinner.icon.d.ts +1 -1
  180. package/dist/types/static/icon/search.icon.d.ts +1 -1
  181. package/dist/types/static/icon/success.icon.d.ts +1 -1
  182. package/dist/types/static/icon/trash.icon.d.ts +1 -1
  183. package/dist/types/static/icon/warning.icon.d.ts +1 -1
  184. package/dist/types/utils/dom-compat.d.ts +2 -0
  185. package/dist/types/utils/format.d.ts +4 -14
  186. package/dist/types/utils/image-bg-removal.d.ts +3 -0
  187. package/dist/types/utils/product-selection.d.ts +16 -0
  188. package/dist/types/utils/product.d.ts +15 -0
  189. package/docs/v1/README.md +213 -0
  190. package/docs/v1/api/actions/address-actions.md +286 -0
  191. package/docs/v1/api/actions/cart-actions.md +364 -0
  192. package/docs/v1/api/actions/checkout-actions.md +527 -0
  193. package/docs/v1/api/actions/product-actions.md +204 -0
  194. package/docs/v1/api/client.md +596 -0
  195. package/docs/v1/api/configuration.md +555 -0
  196. package/docs/v1/api/injection-methods.md +292 -0
  197. package/docs/v1/api/typescript-types.md +423 -0
  198. package/docs/v1/api/ui-helpers.md +200 -0
  199. package/docs/v1/examples/advanced-patterns.md +199 -0
  200. package/docs/v1/examples/checkout-flow.md +90 -0
  201. package/docs/v1/examples/custom-theming.md +63 -0
  202. package/docs/v1/examples/multi-product-page.md +90 -0
  203. package/docs/v1/examples/simple-product-page.md +89 -0
  204. package/docs/v1/getting-started/concepts.md +521 -0
  205. package/docs/v1/getting-started/installation.md +349 -0
  206. package/docs/v1/getting-started/quick-start.md +410 -0
  207. package/docs/v1/guides/accessibility.md +173 -0
  208. package/docs/v1/guides/address-component.md +435 -0
  209. package/docs/v1/guides/best-practices.md +365 -0
  210. package/docs/v1/guides/cart-component.md +757 -0
  211. package/docs/v1/guides/checkout-component.md +670 -0
  212. package/docs/v1/guides/events.md +939 -0
  213. package/docs/v1/guides/product-component.md +735 -0
  214. package/docs/v1/guides/product-list-component.md +630 -0
  215. package/docs/v1/guides/theming.md +228 -0
  216. package/docs/v1/integration/angular.md +39 -0
  217. package/docs/v1/integration/laravel.md +41 -0
  218. package/docs/v1/integration/nextjs.md +69 -0
  219. package/docs/v1/integration/proxy-setup.md +106 -0
  220. package/docs/v1/integration/react.md +64 -0
  221. package/docs/v1/integration/vanilla-js.md +84 -0
  222. package/docs/v1/integration/vue.md +58 -0
  223. package/docs/v1/reference/analytics.md +108 -0
  224. package/docs/v1/reference/browser-support.md +47 -0
  225. package/docs/v1/reference/error-handling.md +83 -0
  226. package/docs/v1/reference/performance.md +52 -0
  227. package/docs/v1/reference/telemetry.md +85 -0
  228. package/docs/v1/reference/troubleshooting.md +135 -0
  229. package/package.json +69 -45
  230. package/dist/types/elements-builder-client.d.ts +0 -2
  231. package/dist/types/elements-client.d.ts +0 -2
  232. package/dist/types/enums/cloud.enum.d.ts +0 -77
  233. package/dist/types/interfaces/cloud/address.interface.d.ts +0 -36
  234. package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
  235. package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -43
  236. package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -214
  237. package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
  238. package/dist/types/interfaces/cloud/product.interface.d.ts +0 -158
  239. package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
  240. package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
  241. package/dist/types/interfaces/core.interface.d.ts +0 -111
  242. package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -9
  243. package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
  244. package/dist/types/modules/product/utils/helpers.d.ts +0 -3
  245. package/dist/types/modules/product/utils/retailer-hours.d.ts +0 -9
  246. package/dist/types/modules/theme-provider/styles/address/index.d.ts +0 -1
  247. package/dist/types/modules/theme-provider/styles/cart/index.d.ts +0 -1
  248. package/dist/types/modules/theme-provider/styles/checkout/index.d.ts +0 -1
  249. package/dist/types/modules/theme-provider/styles/product/index.d.ts +0 -3
  250. package/dist/types/modules/theme-provider/styles/product-list/index.d.ts +0 -1
  251. package/dist/types/modules/theme-provider/styles/ui/index.d.ts +0 -3
  252. package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +0 -53
  253. package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
  254. package/dist/types/utils/helper.d.ts +0 -27
  255. package/docs/ACTIONS.md +0 -1300
  256. package/docs/BROWSER_SUPPORT.md +0 -279
  257. package/docs/CONFIGURATION.md +0 -853
  258. package/docs/DOCUMENTATION_INDEX.md +0 -311
  259. package/docs/EVENTS.md +0 -798
  260. package/docs/PROXY.md +0 -228
  261. package/docs/THEMING.md +0 -589
  262. package/docs/TROUBLESHOOTING.md +0 -793
  263. package/umd/elements.js +0 -1
  264. /package/dist/types/{auto-initialize.d.ts → auto-initialize/main.d.ts} +0 -0
  265. /package/dist/types/modules/{theme-provider/styles/address → address/styles}/address.style.d.ts +0 -0
  266. /package/dist/types/modules/{theme-provider/styles/cart → cart/styles}/cart.style.d.ts +0 -0
  267. /package/dist/types/modules/{theme-provider/styles/checkout → checkout/styles}/checkout.style.d.ts +0 -0
  268. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/image-carousel.style.d.ts +0 -0
  269. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/product.style.d.ts +0 -0
  270. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/retailers.style.d.ts +0 -0
  271. /package/dist/types/modules/{theme-provider/styles/product-list → product-list/styles}/product-list.style.d.ts +0 -0
  272. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/drawer.style.d.ts +0 -0
  273. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/loading.style.d.ts +0 -0
  274. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/promo-code-ticker.style.d.ts +0 -0
@@ -1,121 +1,29 @@
1
- import type { IElementsCheckoutEvents } from 'utils/helper';
2
- import type { ICartItemAttributes, ICheckoutTotalAmounts } from '@/interfaces/cloud';
3
- export interface ICheckoutMarketingPreferencesStore {
4
- canEmail: boolean;
5
- canSms: boolean;
6
- }
7
- export interface ICheckoutPromoCodeStore {
8
- code: string;
9
- discountAmount: number;
10
- }
11
- export interface ICheckoutGiftCardStore {
12
- code: string;
13
- discountAmount: number;
14
- }
15
- export interface ICheckoutItemStore {
16
- liquidId: string;
17
- variantId: string;
18
- cartItemId: string;
19
- retailerId: string;
20
- fulfillmentId: string;
21
- salsifyGrouping: string;
22
- name: string;
23
- catPath: string;
24
- volume: string;
25
- uom: string;
26
- proof: string;
27
- abv: string;
28
- containerType: string;
29
- container: string;
30
- size: string;
31
- pack: boolean;
32
- packDesc: string;
33
- mainImage: string;
34
- brand: string;
35
- partNumber: string;
36
- upc: string;
37
- sku: string;
38
- price: number;
39
- unitPrice: number;
40
- quantity: number;
41
- unitTax: number;
42
- bottleDeposits: number;
43
- attributes: ICartItemAttributes;
44
- retailerName: string;
45
- expectationDetail: string;
1
+ import type { ICheckoutAmounts, ICheckoutBilling, ICheckoutCustomer, ICheckoutEvent, ICheckoutFulfillment, ICheckoutGiftCard, ICheckoutGiftRecipient, ICheckoutItem, ICheckoutMarketingPreferences, ICheckoutPaymentConfirm, ICheckoutPaymentSession, ICheckoutPresale, ICheckoutPromoCode, ICheckoutRetailer, ICheckoutShippingAddress } from '@/interfaces/api/checkout.interface';
2
+ export interface ICheckoutItemStore extends ICheckoutItem {
46
3
  loading: boolean;
47
4
  updating: boolean;
48
5
  error: string | null;
49
6
  }
50
- export interface IOnDemandFulfillmentTipInfo {
51
- fulfillmentId: string;
52
- retailerId: string;
53
- retailerName: string;
54
- subtotal: number;
55
- tip: number;
56
- }
57
- export interface ICheckoutPresaleStore {
58
- isLocked: boolean;
59
- expiresAt: string | null;
60
- }
61
- export interface ICheckoutCustomerStore {
62
- id?: string;
63
- firstName: string;
64
- lastName: string;
65
- email: string;
66
- phone: string;
67
- birthDate: string;
68
- company: string;
69
- }
70
7
  export interface ICheckoutCustomerFormStore {
71
- data: ICheckoutCustomerStore;
8
+ data: ICheckoutCustomer;
72
9
  isEditing: boolean;
73
10
  isValid: boolean;
74
11
  isSaving: boolean;
75
12
  }
76
- export interface ICheckoutGiftRecipientStore {
77
- firstName: string;
78
- lastName: string;
79
- email: string;
80
- phone: string;
81
- message: string;
82
- }
83
13
  export interface ICheckoutGiftRecipientFormStore {
84
- data: ICheckoutGiftRecipientStore;
14
+ data: ICheckoutGiftRecipient;
85
15
  isEditing: boolean;
86
16
  isValid: boolean;
87
17
  isSaving: boolean;
88
18
  }
89
- export interface ICheckoutBillingStore {
90
- firstName: string;
91
- lastName: string;
92
- email: string;
93
- phone: string;
94
- company: string;
95
- addressOne: string;
96
- addressTwo: string;
97
- city: string;
98
- state: string;
99
- zipCode: string;
100
- }
101
- export interface ICheckoutPaymentCardStore {
102
- brand: string;
103
- last4: string;
104
- expMonth: string;
105
- expYear: string;
106
- }
107
- export interface ICheckoutPaymentMethodStore {
108
- id: string;
109
- card: ICheckoutPaymentCardStore;
19
+ export interface ICheckoutPaymentMethodStore extends ICheckoutPaymentConfirm {
110
20
  }
111
- export interface ICheckoutPaymentSessionStore {
112
- key: string;
113
- secret: string;
21
+ export interface ICheckoutPaymentSessionStore extends ICheckoutPaymentSession {
114
22
  }
115
23
  export interface ICheckoutPaymentFormStore {
116
24
  paymentSession: ICheckoutPaymentSessionStore | null;
117
25
  paymentMethod: ICheckoutPaymentMethodStore | null;
118
- data: ICheckoutBillingStore | null;
26
+ data: ICheckoutBilling | null;
119
27
  billingSameAsShipping: boolean;
120
28
  isEditing: boolean;
121
29
  isValid: boolean;
@@ -124,19 +32,22 @@ export interface ICheckoutPaymentFormStore {
124
32
  export interface ICheckoutStore {
125
33
  token: string;
126
34
  cartId: string;
127
- presale: ICheckoutPresaleStore | null;
35
+ presale: ICheckoutPresale | null;
128
36
  isGift: boolean;
129
- marketingPreferences: ICheckoutMarketingPreferencesStore;
37
+ marketingPreferences: ICheckoutMarketingPreferences;
130
38
  customerForm: ICheckoutCustomerFormStore;
131
39
  giftRecipientForm: ICheckoutGiftRecipientFormStore;
132
40
  paymentForm: ICheckoutPaymentFormStore;
133
- shippingAddressTwo: string;
134
- promoCode: ICheckoutPromoCodeStore | null;
135
- giftCards: ICheckoutGiftCardStore[];
41
+ injectedPaymentMethod: ICheckoutPaymentMethodStore | null;
42
+ shippingAddress: ICheckoutShippingAddress;
43
+ promoCode: ICheckoutPromoCode | null;
44
+ giftCards: ICheckoutGiftCard[];
45
+ itemsQuantity: number;
136
46
  items: Record<string, ICheckoutItemStore>;
137
- amounts: ICheckoutTotalAmounts;
47
+ fulfillments: Record<string, ICheckoutFulfillment>;
48
+ retailers: Record<string, ICheckoutRetailer>;
49
+ amounts: ICheckoutAmounts;
138
50
  orderNumber: string | null;
139
- onDemandFulfillmentTipInfo: Record<string, IOnDemandFulfillmentTipInfo>;
140
51
  tipSelection: number;
141
52
  deliveryInstructions: string;
142
53
  giftCardError: string | null;
@@ -145,6 +56,5 @@ export interface ICheckoutStore {
145
56
  loading: boolean;
146
57
  updating: boolean;
147
58
  error: string | null;
148
- warning: string[];
149
- events: IElementsCheckoutEvents[];
59
+ events: ICheckoutEvent[];
150
60
  }
@@ -1,31 +1,42 @@
1
1
  import type { IAddressStore } from '@/core/store/interfaces/address.interface';
2
- import type { ICheckoutCustomerFormStore, ICheckoutGiftRecipientFormStore, ICheckoutGiftRecipientStore, ICheckoutItemStore, ICheckoutMarketingPreferencesStore, ICheckoutPaymentFormStore, ICheckoutPaymentMethodStore, ICheckoutPaymentSessionStore, ICheckoutPresaleStore, ICheckoutPromoCodeStore, ICheckoutStore } from '@/core/store/interfaces/checkout.interface';
2
+ import type { ICartFulfillmentStore, ICartItemStore, ICartRetailerStore, ICartStore } from '@/core/store/interfaces/cart.interface';
3
+ import type { ICheckoutCustomerFormStore, ICheckoutGiftRecipientFormStore, ICheckoutItemStore, ICheckoutPaymentFormStore, ICheckoutPaymentMethodStore, ICheckoutPaymentSessionStore, ICheckoutStore } from '@/core/store/interfaces/checkout.interface';
4
+ import type { ICheckoutInjection, ICheckoutMetadata, IElementsMetadataStore } from '@/core/store/interfaces/metadata.interface';
3
5
  import type { IProductSizeStore, IProductStore } from '@/core/store/interfaces/product.interface';
6
+ import type { IPLProductStore, IProductListStore } from '@/core/store/interfaces/product-list.interface';
4
7
  import type { ComponentType } from '@/enums';
5
- import type { ICartItemStore, ICartPromoCodeStore, ICartStore, ICartTotalsStore, IRetailerFulfillmentStore, IRetailerStore } from './cart.interface';
8
+ import type { ICartPromoCode } from '@/interfaces/api/cart.interface';
9
+ import type { ICheckoutGiftRecipient, ICheckoutMarketingPreferences, ICheckoutPresale, ICheckoutPromoCode, ICheckoutRetailer } from '@/interfaces/api/checkout.interface';
6
10
  export interface IDrawerContentConfig {
7
11
  type: ComponentType;
8
12
  data?: Record<string, any>;
9
13
  }
14
+ export type UIDrawerMode = 'drawer' | 'modal';
10
15
  export interface IDrawerStore {
11
16
  isOpen: boolean;
12
17
  contentConfig: IDrawerContentConfig | null;
18
+ mode: UIDrawerMode;
13
19
  }
14
20
  export interface IUIStore {
15
21
  drawer: IDrawerStore;
16
22
  }
17
23
  export interface IGlobalStore {
18
- cart: ICartStore;
19
24
  address: IAddressStore;
25
+ products: Record<string, IProductStore>;
26
+ cart: ICartStore;
20
27
  checkout: ICheckoutStore;
28
+ productsList: Record<string, IProductListStore>;
21
29
  ui: IUIStore;
22
- products: Record<string, IProductStore>;
30
+ metadata: IElementsMetadataStore;
23
31
  }
24
32
  export interface IPersistedStore {
25
33
  p?: string;
26
34
  c?: string;
27
35
  }
28
- export type StorePaths = keyof IGlobalStore | `products.${string}` | `products.${string}.${keyof IProductStore}` | `products.${string}.sizes.${string}` | `products.${string}.sizes.${string}.${keyof IProductSizeStore}` | `address.${keyof IAddressStore}` | `cart.${keyof ICartStore}` | `cart.items.${string}` | `cart.items.${string}.${keyof ICartItemStore}` | `cart.totals.${keyof ICartTotalsStore}` | `cart.retailers.${string}` | `cart.items.${string}.${keyof IRetailerStore}` | `cart.fulfillments.${string}` | `cart.fulfillments.${string}.${keyof IRetailerFulfillmentStore}` | `cart.promoCode.${keyof ICartPromoCodeStore}` | `ui.${keyof IUIStore}` | `ui.drawer.${keyof IDrawerStore}` | `checkout.${keyof ICheckoutStore}` | `checkout.customerForm.${keyof ICheckoutCustomerFormStore}` | `checkout.giftRecipientForm.${keyof ICheckoutGiftRecipientFormStore}` | `checkout.paymentForm.${keyof ICheckoutPaymentFormStore}` | `checkout.paymentForm.paymentSession.${keyof ICheckoutPaymentSessionStore}` | `checkout.paymentForm.paymentMethod.${keyof ICheckoutPaymentMethodStore}` | `checkout.presale.${keyof ICheckoutPresaleStore}` | `checkout.marketingPreferences.${keyof ICheckoutMarketingPreferencesStore}` | `checkout.giftRecipient.${keyof ICheckoutGiftRecipientStore}` | `checkout.giftCards.${string}` | `checkout.promoCode.${keyof ICheckoutPromoCodeStore}` | `checkout.items.${string}` | `checkout.items.${string}.${keyof ICheckoutItemStore}` | `checkout.onDemandFulfillmentTipInfo.${string}`;
36
+ export interface IPersistedStoreAction {
37
+ success: boolean;
38
+ }
39
+ export type StorePaths = keyof IGlobalStore | `products.${string}` | `products.${string}.${keyof IProductStore}` | `products.${string}.sizes.${string}` | `products.${string}.sizes.${string}.${keyof IProductSizeStore}` | `address.${keyof IAddressStore}` | `cart.${keyof ICartStore}` | `cart.items.${string}` | `cart.items.${string}.${keyof ICartItemStore}` | `cart.retailers.${string}` | `cart.items.${string}.${keyof ICartRetailerStore}` | `cart.fulfillments.${string}` | `cart.fulfillments.${string}.${keyof ICartFulfillmentStore}` | `cart.promoCode.${keyof ICartPromoCode}` | `ui.${keyof IUIStore}` | `ui.drawer.${keyof IDrawerStore}` | `checkout.${keyof ICheckoutStore}` | `checkout.customerForm.${keyof ICheckoutCustomerFormStore}` | `checkout.giftRecipientForm.${keyof ICheckoutGiftRecipientFormStore}` | `checkout.paymentForm.${keyof ICheckoutPaymentFormStore}` | `checkout.paymentForm.paymentSession.${keyof ICheckoutPaymentSessionStore}` | `checkout.paymentForm.paymentMethod.${keyof ICheckoutPaymentMethodStore}` | `checkout.presale.${keyof ICheckoutPresale}` | `checkout.marketingPreferences.${keyof ICheckoutMarketingPreferences}` | `checkout.giftRecipient.${keyof ICheckoutGiftRecipient}` | `checkout.giftCards.${string}` | `checkout.promoCode.${keyof ICheckoutPromoCode}` | `checkout.items.${string}` | `checkout.items.${string}.${keyof ICheckoutItemStore}` | `checkout.retailers.${string}` | `checkout.retailers.${string}.${keyof ICheckoutRetailer}` | `checkout.fulfillments.${string}` | `productsList.${string}` | `productsList.${string}.${keyof IProductListStore}` | `productsList.${string}.products.${string}` | `productsList.${string}.products.${string}.${keyof IPLProductStore}` | `metadata.${keyof IElementsMetadataStore}` | `metadata.checkout.${keyof ICheckoutMetadata}` | `metadata.checkout.injection.${keyof ICheckoutInjection}`;
29
40
  interface MiddlewareContext {
30
41
  action: string;
31
42
  payload: any;
@@ -0,0 +1,11 @@
1
+ export interface ICheckoutInjection {
2
+ containerId: string;
3
+ injectedAt: number;
4
+ }
5
+ export interface ICheckoutMetadata {
6
+ injection: ICheckoutInjection | null;
7
+ returnUrl: string | null;
8
+ }
9
+ export interface IElementsMetadataStore {
10
+ checkout: ICheckoutMetadata;
11
+ }
@@ -0,0 +1,30 @@
1
+ import type { FulfillmentType } from '@/enums';
2
+ import type { IProduct } from '@/interfaces/api/product.interface';
3
+ import type { IFilterSchema } from '@/interfaces/api/product-list.interface';
4
+ import type { IPagination } from '@/modules/product-list/product-list.interface';
5
+ import type { IProductFulfillmentStore, IProductSizeStore } from './product.interface';
6
+ export interface IPLProductStore extends Omit<IProduct, 'sizes'> {
7
+ id: string;
8
+ sizes: Record<string, IProductSizeStore>;
9
+ quantity: number;
10
+ selectedSizeId: string | null;
11
+ selectedFulfillmentType: FulfillmentType;
12
+ selectedFulfillmentId: string | null;
13
+ selectedFulfillment: IProductFulfillmentStore | null;
14
+ engravingLines: string[];
15
+ productHasAvailability: boolean;
16
+ fulfillmentHasAvailability: boolean;
17
+ loading: boolean;
18
+ updating: boolean;
19
+ }
20
+ export interface IProductListStore {
21
+ products: Record<string, IPLProductStore>;
22
+ appliedFilters: Record<string, string[]>;
23
+ filters: IFilterSchema[];
24
+ pagination: IPagination;
25
+ searchTerm: string;
26
+ rows: number;
27
+ columns: number;
28
+ loading: boolean;
29
+ rerender: boolean;
30
+ }
@@ -1,5 +1,5 @@
1
1
  import type { ComponentType, FulfillmentType } from '@/enums';
2
- import type { IAddress, ICoords, IProductSizeAttributes, IRetailerExpectation, IRetailerFees, RetailerHours } from '@/interfaces/cloud';
2
+ import type { IFulfillment, IProduct, IProductSize, IProductVariant, IRetailerAddress } from '@/interfaces/api/product.interface';
3
3
  export interface IProductDrawerContentConfig {
4
4
  type: ComponentType;
5
5
  data?: Record<string, any>;
@@ -8,85 +8,32 @@ export interface IProductDrawerStore {
8
8
  isOpen: boolean;
9
9
  contentConfig: IProductDrawerContentConfig | null;
10
10
  }
11
- export interface IProductFulfillmentStore {
12
- isVariantEngravable: boolean;
13
- stock: number;
14
- price: number;
15
- retailerId: string;
16
- partNumber: string;
17
- fulfillmentId: string;
18
- fulfillmentType: FulfillmentType;
19
- modalities: FulfillmentType[];
11
+ export type IProductFulfillmentStore = IFulfillment & {
20
12
  retailerName: string;
21
- retailerAddress: (IAddress & ICoords) | null;
22
- type: FulfillmentType;
23
- timezone: string;
24
- canEngrave: boolean;
25
- expectation: IRetailerExpectation;
26
- fees: IRetailerFees;
27
- hours: RetailerHours;
28
- }
29
- export interface IProductSizeStore {
30
- id: string;
31
- upc: string;
32
- size: string;
33
- pack: boolean;
34
- packDesc: string | null;
35
- container: string;
36
- containerType: string;
37
- maxQuantityPerOrder: number;
38
- image: string;
39
- uom: string;
40
- volume: string;
41
- attributes: IProductSizeAttributes;
13
+ retailerAddress: IRetailerAddress;
14
+ retailerAddressFormatted: string;
15
+ variant: IProductVariant;
16
+ image?: string;
17
+ };
18
+ export interface IProductSizeStore extends Omit<IProductSize, 'shippingVariants' | 'onDemandVariants'> {
42
19
  onDemandFulfillments: Record<string, IProductFulfillmentStore>;
43
20
  shippingFulfillments: Record<string, IProductFulfillmentStore>;
44
21
  loading: boolean;
45
22
  error: string | null;
46
23
  }
47
- export interface IProductStore {
24
+ export interface IProductStore extends Omit<IProduct, 'sizes'> {
48
25
  identifier: string;
49
- id: string;
50
- name: string;
51
- brand: string;
52
- catPath: string;
53
- category: string;
54
- classification: string;
55
- type: string;
56
- salsifyGrouping: string;
57
- subType: string;
58
- mainImage: string | null;
59
- images: string[];
60
- region: string;
61
- country: string;
62
- material: string;
63
- abv: string;
64
- proof: string;
65
- age: string;
66
- color: string;
67
- flavor: string;
68
- variety: string;
69
- appellation: string;
70
- vintage: string;
71
- description: string;
72
- htmlDescription: string;
73
- tastingNotes: string;
74
- priceInfo?: {
75
- min: number;
76
- max: number;
77
- avg: number;
78
- };
79
- quantity: number;
80
26
  sizes: Record<string, IProductSizeStore>;
81
- productHasAvailability: boolean;
27
+ quantity: number;
82
28
  selectedSizeId: string | null;
83
29
  selectedFulfillmentType: FulfillmentType;
84
30
  selectedFulfillmentId: string | null;
85
31
  selectedFulfillment: IProductFulfillmentStore | null;
32
+ productHasAvailability: boolean;
86
33
  fulfillmentHasAvailability: boolean;
34
+ drawer: IProductDrawerStore;
87
35
  loading: boolean;
88
36
  updating: boolean;
89
- error: string | null;
90
- drawer: IProductDrawerStore;
91
37
  rerender: boolean;
38
+ error: string | null;
92
39
  }
@@ -2,11 +2,16 @@ import type { IAddressStore } from '@/core/store/interfaces/address.interface';
2
2
  import type { ICartStore } from '@/core/store/interfaces/cart.interface';
3
3
  import type { ICheckoutStore } from '@/core/store/interfaces/checkout.interface';
4
4
  import type { IGlobalStore, IUIStore } from '@/core/store/interfaces/core.interface';
5
+ import type { IElementsMetadataStore } from '@/core/store/interfaces/metadata.interface';
5
6
  import type { IProductStore } from '@/core/store/interfaces/product.interface';
7
+ import type { IProductListStore } from './interfaces/product-list.interface';
6
8
  export declare const LOCAL_STORAGE_PREFIX = "lce";
9
+ export declare const initialAddressState: IAddressStore;
7
10
  export declare const initialProductState: IProductStore;
8
11
  export declare const initialCartState: ICartStore;
9
12
  export declare const initialCheckoutState: ICheckoutStore;
10
13
  export declare const initialUIState: IUIStore;
11
- export declare const initialAddressState: IAddressStore;
14
+ export declare const initialMetadataState: IElementsMetadataStore;
15
+ export declare const initialProductsListState: Record<string, IProductListStore>;
16
+ export declare function createInitialProductListState(): IProductListStore;
12
17
  export declare const initialStoreState: IGlobalStore;
@@ -28,6 +28,7 @@ export declare class StoreService {
28
28
  createProductInstance(productId: string): boolean;
29
29
  removeProductInstance(productId: string): boolean;
30
30
  getProductInstances(): Record<string, IProductStore>;
31
+ destroy(): void;
31
32
  getState(): IGlobalStore;
32
33
  private setupMiddleware;
33
34
  private loggingMiddleware;
@@ -37,7 +37,6 @@ export interface ITelemetryError {
37
37
  message: string;
38
38
  stack?: string;
39
39
  code?: string | number;
40
- statusCode?: number;
41
40
  }
42
41
  export interface ITelemetrySDKContext {
43
42
  version: string;
@@ -10,6 +10,7 @@ export declare class TelemetryService {
10
10
  constructor();
11
11
  static getInstance(): TelemetryService;
12
12
  isEnabled(): boolean;
13
+ destroy(): void;
13
14
  captureEvent(level: TelemetryLevel, message: string, options?: ITelemetryEventOptions): void;
14
15
  private buildErrorContext;
15
16
  private buildSDKContext;
@@ -32,6 +32,7 @@ export declare const ELEMENTS_ACTIONS_EVENT: {
32
32
  readonly CART_PROMO_CODE_FAILED: "cart_promo_code_failed";
33
33
  readonly CART_PRODUCT_ADD_SUCCESS: "cart_product_add_success";
34
34
  readonly CART_PRODUCT_ADD_FAILED: "cart_product_add_failed";
35
+ readonly INTERNAL_CART_TO_CHECKOUT: "internal_cart_to_checkout";
35
36
  readonly CHECKOUT_LOADED: "checkout_loaded";
36
37
  readonly CHECKOUT_OPENED: "checkout_opened";
37
38
  readonly CHECKOUT_CLOSED: "checkout_closed";
@@ -67,7 +68,6 @@ export declare const ELEMENTS_FORM: {
67
68
  export declare const COMPONENT_TYPE: {
68
69
  readonly DRAWER: "drawer";
69
70
  readonly INPUT: "input";
70
- readonly BIRTHDATE_INPUT: "birthdate-input";
71
71
  readonly ENGRAVING_FORM: "engraving-form";
72
72
  readonly ENGRAVING_VIEW: "engraving-view";
73
73
  readonly BUTTONS_CART_OPEN: "buttons-cart-open";
@@ -95,7 +95,12 @@ export declare const COMPONENT_TYPE: {
95
95
  readonly PRODUCT_LIST: "product-list";
96
96
  readonly PRODUCT_LIST_CARD: "product-list-card";
97
97
  readonly PRODUCT_LIST_FILTERS: "product-list-filters";
98
+ readonly PRODUCT_LIST_SEARCH: "product-list-search";
98
99
  readonly PRODUCT_LIST_CARD_LOADING: "product-list-card-loading";
100
+ readonly PRODUCT_LIST_ENGRAVING_FORM: "product-list-engraving-form";
101
+ readonly PRODUCT_LIST_PRODUCT_PRE_CART: "product-list-product-pre-cart";
102
+ readonly PRODUCT_LIST_PRODUCT_ENGRAVING_LINES: "product-list-product-engraving-lines";
103
+ readonly PRODUCT_LIST_SIZE_SELECTOR: "product-list-size-selector";
99
104
  readonly CART: "cart";
100
105
  readonly CART_RETAILER: "cart-retailer";
101
106
  readonly CART_ITEM: "cart-item";
@@ -145,3 +150,37 @@ export declare const DEBUG_MODE: {
145
150
  readonly PANEL: "panel";
146
151
  };
147
152
  export type DebugMode = (typeof DEBUG_MODE)[keyof typeof DEBUG_MODE];
153
+ export declare const CART_EVENT_TYPE: {
154
+ readonly GENERIC: "generic";
155
+ readonly PROMO_CODE: "promo-code";
156
+ };
157
+ export type CartEventType = (typeof CART_EVENT_TYPE)[keyof typeof CART_EVENT_TYPE];
158
+ export declare const CART_EVENT_LEVEL: {
159
+ readonly SUCCESS: "success";
160
+ readonly WARNING: "warning";
161
+ readonly ERROR: "error";
162
+ };
163
+ export type CartEventLevel = (typeof CART_EVENT_LEVEL)[keyof typeof CART_EVENT_LEVEL];
164
+ export declare const CHECKOUT_EVENT_TYPE: {
165
+ readonly GENERIC: "generic";
166
+ readonly PROMO_CODE: "promo-code";
167
+ readonly GIFT_CARD: "gift-card";
168
+ };
169
+ export type CheckoutEventType = (typeof CHECKOUT_EVENT_TYPE)[keyof typeof CHECKOUT_EVENT_TYPE];
170
+ export declare const CHECKOUT_EVENT_LEVEL: {
171
+ readonly SUCCESS: "success";
172
+ readonly WARNING: "warning";
173
+ readonly ERROR: "error";
174
+ };
175
+ export type CheckoutEventLevel = (typeof CHECKOUT_EVENT_LEVEL)[keyof typeof CHECKOUT_EVENT_LEVEL];
176
+ export declare const DISPLAY_MODE: {
177
+ readonly MODAL: "modal";
178
+ readonly DRAWER: "drawer";
179
+ };
180
+ export type DisplayModeType = (typeof DISPLAY_MODE)[keyof typeof DISPLAY_MODE];
181
+ export declare const NAVIGATION_SOURCE: {
182
+ readonly PRODUCT: "product";
183
+ readonly PRODUCT_LIST_CARD: "product-list-card";
184
+ readonly PRE_CART: "pre-cart";
185
+ };
186
+ export type NavigationSourceType = (typeof NAVIGATION_SOURCE)[keyof typeof NAVIGATION_SOURCE];
@@ -1,2 +1 @@
1
- export * from './cloud.enum';
2
1
  export * from './core.enum';
@@ -0,0 +1,8 @@
1
+ import { ElementsCheckout } from '@/clients/checkout';
2
+ import type { DebugMode, ElementsEnv } from '@/enums';
3
+ import { DEBUG_MODE, ELEMENTS_ENV } from '@/enums';
4
+ import type { IElementsCheckoutActions, IElementsCheckoutClient } from '@/interfaces/client.interface';
5
+ import type { IInjectedComponent } from '@/interfaces/component.interface';
6
+ import type { ILiquidCommerceElementsCheckoutClientConfig } from '@/interfaces/config.interface';
7
+ export type { DebugMode, ElementsEnv, IElementsCheckoutActions, IElementsCheckoutClient, IInjectedComponent, ILiquidCommerceElementsCheckoutClientConfig, };
8
+ export { DEBUG_MODE, ELEMENTS_ENV, ElementsCheckout };
@@ -0,0 +1,4 @@
1
+ import type { IElementsCheckoutActions, IElementsCheckoutClient } from '@/interfaces/client.interface';
2
+ import { ElementsCheckout } from './clients/checkout';
3
+ export type { IElementsCheckoutActions, IElementsCheckoutClient };
4
+ export { ElementsCheckout };
@@ -1,6 +1,11 @@
1
+ export * from './clients/builder';
2
+ export * from './clients/main';
1
3
  export * from './core/sdk-error-handler';
2
- export * from './elements-builder-client';
3
- export * from './elements-client';
4
4
  export * from './enums';
5
+ export type { LiquidCommerceGlobal } from './global';
6
+ export * from './interfaces/api';
7
+ export * from './interfaces/client.interface';
8
+ export * from './interfaces/component.interface';
9
+ export * from './interfaces/config.interface';
5
10
  export * from './interfaces/configs';
6
- export * from './interfaces/core.interface';
11
+ export * from './interfaces/injection.interface';
@@ -0,0 +1,28 @@
1
+ import type { IAddressStore } from '@/core/store/interfaces/address.interface';
2
+ export interface IAddressAutocompleteResult {
3
+ id: string;
4
+ description: string;
5
+ }
6
+ export interface IAddressCoordinates {
7
+ latitude: number;
8
+ longitude: number;
9
+ }
10
+ export interface IAddressAddress {
11
+ one: string;
12
+ two: string;
13
+ city: string;
14
+ state: string;
15
+ zip: string;
16
+ country: string;
17
+ }
18
+ export interface IAddressDetailsResult {
19
+ formattedAddress: string;
20
+ address: IAddressAddress;
21
+ coordinates: IAddressCoordinates;
22
+ }
23
+ export interface ILocation {
24
+ address: IAddressAddress;
25
+ coordinates: IAddressCoordinates;
26
+ }
27
+ export interface IAddressData extends IAddressStore {
28
+ }
@@ -0,0 +1,96 @@
1
+ import type { CartEventLevel, CartEventType, FulfillmentType } from '@/enums';
2
+ import type { ILocation } from '@/interfaces/api/address.interface';
3
+ import type { IProductPresale } from '@/interfaces/api/product.interface';
4
+ export interface ICartUpdateItem {
5
+ id?: string;
6
+ partNumber: string;
7
+ quantity: number;
8
+ fulfillmentId: string;
9
+ engravingLines?: string[];
10
+ }
11
+ export interface ICartUpdateParams {
12
+ id: string;
13
+ items: ICartUpdateItem[];
14
+ promoCode?: string;
15
+ location?: ILocation;
16
+ }
17
+ export interface ICartFulfillment {
18
+ id: string;
19
+ canEngrave: boolean;
20
+ type: FulfillmentType;
21
+ expectation: string;
22
+ engravingExpectation: string;
23
+ itemIds: string[];
24
+ subtotal: number;
25
+ hasUnmetMinimumPurchaseAmount: boolean;
26
+ minimumPurchaseAmount: number;
27
+ }
28
+ export interface ICartRetailer {
29
+ id: string;
30
+ name: string;
31
+ subtotal: number;
32
+ itemsQuantity: number;
33
+ fulfillments: Record<string, ICartFulfillment>;
34
+ }
35
+ export interface ICartItemAttributes {
36
+ engraving: ICartItemEngraving;
37
+ presale: IProductPresale;
38
+ }
39
+ export interface ICartItem {
40
+ id: string;
41
+ variantId: string;
42
+ liquidId: string;
43
+ retailerId: string;
44
+ partNumber: string;
45
+ fulfillmentId: string;
46
+ upc: string;
47
+ sku: string;
48
+ salsifyGrouping: string;
49
+ catPath: string;
50
+ volume: string;
51
+ uom: string;
52
+ pack: boolean;
53
+ packDesc: string;
54
+ container: string;
55
+ containerType: string;
56
+ name: string;
57
+ brand: string;
58
+ size: string;
59
+ price: number;
60
+ quantity: number;
61
+ maxQuantity: number;
62
+ unitPrice: number;
63
+ mainImage: string;
64
+ attributes: ICartItemAttributes;
65
+ }
66
+ export interface ICartPromoCode {
67
+ code: string;
68
+ discount: number;
69
+ freeDelivery: boolean;
70
+ freeServiceFee: boolean;
71
+ freeShipping: boolean;
72
+ }
73
+ export interface ICartEvent {
74
+ type: CartEventType;
75
+ message: string;
76
+ level: CartEventLevel;
77
+ }
78
+ export interface ICart {
79
+ id: string;
80
+ subtotal: number;
81
+ itemsQuantity: number;
82
+ items: Record<string, ICartItem>;
83
+ retailers: Record<string, ICartRetailer>;
84
+ promoCode: ICartPromoCode | null;
85
+ events: ICartEvent[];
86
+ }
87
+ export interface ICartItemEngraving {
88
+ isEngravable: boolean;
89
+ isRequired: boolean;
90
+ hasEngraving: boolean;
91
+ fee: number;
92
+ maxCharsPerLine: number;
93
+ maxLines: number;
94
+ location: string;
95
+ lines: string[];
96
+ }