@liquidcommerce/elements-sdk 2.6.0-beta.4 → 2.6.0-beta.40

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 (172) hide show
  1. package/README.md +156 -2500
  2. package/dist/index.checkout.esm.js +16087 -0
  3. package/dist/index.esm.js +16301 -14189
  4. package/dist/types/auto-initialize/checkout.d.ts +2 -0
  5. package/dist/types/auto-initialize/shared-utils.d.ts +22 -0
  6. package/dist/types/{elements-base-client.d.ts → clients/base.d.ts} +11 -1
  7. package/dist/types/clients/checkout.d.ts +13 -0
  8. package/dist/types/constants/core.constant.d.ts +5 -3
  9. package/dist/types/core/api/api-client.service.d.ts +10 -12
  10. package/dist/types/core/api/auth-client.service.d.ts +31 -9
  11. package/dist/types/core/api/http-client.service.d.ts +0 -1
  12. package/dist/types/core/client/actions/base-action.service.d.ts +15 -0
  13. package/dist/types/core/client/actions/client-address-action.service.d.ts +18 -0
  14. package/dist/types/core/client/actions/client-cart-action.service.d.ts +37 -0
  15. package/dist/types/core/client/actions/client-checkout-action.service.d.ts +50 -0
  16. package/dist/types/core/client/actions/client-product-action.service.d.ts +12 -0
  17. package/dist/types/core/client/client-action.service.d.ts +6 -70
  18. package/dist/types/core/client/client-config.service.d.ts +3 -2
  19. package/dist/types/core/command/common-command.service.d.ts +2 -1
  20. package/dist/types/core/google-tag-manager.service.d.ts +4 -1
  21. package/dist/types/core/logger/logger.service.d.ts +1 -1
  22. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +27 -64
  23. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +44 -50
  24. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +5 -4
  25. package/dist/types/core/pubsub/interfaces/product.interface.d.ts +16 -75
  26. package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -56
  27. package/dist/types/core/store/interfaces/checkout.interface.d.ts +17 -108
  28. package/dist/types/core/store/interfaces/core.interface.d.ts +18 -3
  29. package/dist/types/core/store/interfaces/metadata.interface.d.ts +11 -0
  30. package/dist/types/core/store/interfaces/product-list.interface.d.ts +45 -0
  31. package/dist/types/core/store/interfaces/product.interface.d.ts +3 -1
  32. package/dist/types/core/store/store.constant.d.ts +4 -0
  33. package/dist/types/enums/core.enum.d.ts +38 -1
  34. package/dist/types/enums/index.d.ts +0 -1
  35. package/dist/types/index.checkout.d.ts +7 -0
  36. package/dist/types/index.checkout.umd.d.ts +4 -0
  37. package/dist/types/index.d.ts +2 -2
  38. package/dist/types/interfaces/api/cart.interface.d.ts +95 -0
  39. package/dist/types/interfaces/api/checkout.interface.d.ts +217 -0
  40. package/dist/types/interfaces/api/product-list.interface.d.ts +38 -0
  41. package/dist/types/interfaces/api/product.interface.d.ts +5 -7
  42. package/dist/types/interfaces/configs/checkout.interface.d.ts +1 -0
  43. package/dist/types/interfaces/configs/global.interface.d.ts +4 -2
  44. package/dist/types/interfaces/configs/index.d.ts +1 -0
  45. package/dist/types/interfaces/configs/product-list.interface.d.ts +28 -0
  46. package/dist/types/interfaces/configs/product.interface.d.ts +1 -0
  47. package/dist/types/interfaces/core.interface.d.ts +34 -6
  48. package/dist/types/modules/address/address-input.component.d.ts +11 -0
  49. package/dist/types/modules/address/address.command.d.ts +1 -0
  50. package/dist/types/modules/address/styles/register-styles.d.ts +1 -0
  51. package/dist/types/modules/cart/cart.commands.d.ts +4 -5
  52. package/dist/types/modules/cart/components/cart-body.component.d.ts +2 -1
  53. package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
  54. package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
  55. package/dist/types/modules/cart/styles/register-styles.d.ts +1 -0
  56. package/dist/types/modules/checkout/checkout.commands.d.ts +22 -9
  57. package/dist/types/modules/checkout/checkout.component.d.ts +2 -0
  58. package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
  59. package/dist/types/modules/checkout/components/checkout-completed.component.d.ts +2 -0
  60. package/dist/types/modules/checkout/components/checkout-header.component.d.ts +1 -0
  61. package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
  62. package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +14 -1
  63. package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
  64. package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +2 -2
  65. package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
  66. package/dist/types/modules/checkout/constant.d.ts +3 -0
  67. package/dist/types/modules/checkout/styles/register-styles.d.ts +1 -0
  68. package/dist/types/modules/product/product.commands.d.ts +1 -0
  69. package/dist/types/modules/product/styles/register-styles.d.ts +1 -0
  70. package/dist/types/modules/product-list/components/card-components/index.d.ts +7 -0
  71. package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +8 -0
  72. package/dist/types/modules/product-list/components/card-components/product-button.d.ts +11 -0
  73. package/dist/types/modules/product-list/components/card-components/product-fulfillments.d.ts +12 -0
  74. package/dist/types/modules/product-list/components/card-components/product-price-and-personalization.d.ts +13 -0
  75. package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +10 -0
  76. package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +9 -0
  77. package/dist/types/modules/product-list/components/card-components/product-title.d.ts +6 -0
  78. package/dist/types/modules/product-list/components/filter-components/index.d.ts +7 -0
  79. package/dist/types/modules/product-list/components/filter-components/product-list-apply-filter-button.d.ts +1 -0
  80. package/dist/types/modules/product-list/components/filter-components/product-list-chip.d.ts +5 -0
  81. package/dist/types/modules/product-list/components/filter-components/product-list-filters-chips.d.ts +13 -0
  82. package/dist/types/modules/product-list/components/filter-components/product-list-fulfillment-filter.d.ts +14 -0
  83. package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-price-filter.components.d.ts → filter-components/product-list-price-filter.d.ts} +1 -1
  84. package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +13 -0
  85. package/dist/types/modules/product-list/components/index.d.ts +7 -3
  86. package/dist/types/modules/product-list/components/product-list-card-loading.component.d.ts +2 -1
  87. package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +10 -0
  88. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +58 -37
  89. package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +28 -0
  90. package/dist/types/modules/product-list/components/product-list-retailers.component.d.ts +26 -0
  91. package/dist/types/modules/product-list/components/product-list-search.component.d.ts +22 -0
  92. package/dist/types/modules/product-list/product-list-card.component.d.ts +30 -0
  93. package/dist/types/modules/product-list/product-list.commands.d.ts +64 -4
  94. package/dist/types/modules/product-list/product-list.component.d.ts +16 -44
  95. package/dist/types/modules/product-list/product-list.constants.d.ts +39 -0
  96. package/dist/types/modules/product-list/product-list.interface.d.ts +37 -31
  97. package/dist/types/modules/product-list/styles/product-list-card.style.d.ts +1 -0
  98. package/dist/types/modules/product-list/styles/product-list-filters.style.d.ts +1 -0
  99. package/dist/types/modules/product-list/styles/register-styles.d.ts +1 -0
  100. package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
  101. package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
  102. package/dist/types/modules/theme-provider/services/style-registry.service.d.ts +16 -0
  103. package/dist/types/modules/theme-provider/services/stylesheet-generator.service.d.ts +0 -1
  104. package/dist/types/modules/theme-provider/styles/register-styles.d.ts +1 -0
  105. package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -1
  106. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +14 -1
  107. package/dist/types/modules/ui-components/input/index.d.ts +0 -1
  108. package/dist/types/modules/ui-components/input/input.component.d.ts +8 -1
  109. package/dist/types/modules/ui-components/modal/modal.component.d.ts +23 -0
  110. package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
  111. package/dist/types/modules/ui-components/styles/modal.style.d.ts +1 -0
  112. package/dist/types/modules/ui-components/ui.commands.d.ts +3 -1
  113. package/dist/types/static/icon/check.icon.d.ts +2 -0
  114. package/dist/types/static/icon/index.d.ts +1 -0
  115. package/dist/types/utils/format.d.ts +0 -14
  116. package/docs/actions.md +320 -0
  117. package/docs/address.md +242 -0
  118. package/docs/cart.md +387 -0
  119. package/docs/checkout.md +420 -0
  120. package/docs/{CONFIGURATION.md → configuration.md} +212 -48
  121. package/docs/events.md +181 -0
  122. package/docs/product-list.md +311 -0
  123. package/docs/product.md +250 -0
  124. package/docs/{THEMING.md → theming.md} +110 -20
  125. package/docs/{TROUBLESHOOTING.md → troubleshooting.md} +6 -6
  126. package/package.json +20 -13
  127. package/dist/types/enums/cloud.enum.d.ts +0 -403
  128. package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
  129. package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -43
  130. package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -211
  131. package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
  132. package/dist/types/interfaces/cloud/index.d.ts +0 -5
  133. package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
  134. package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
  135. package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -9
  136. package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
  137. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +0 -37
  138. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +0 -6
  139. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +0 -1
  140. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +0 -16
  141. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.d.ts +0 -16
  142. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +0 -18
  143. package/dist/types/modules/theme-provider/styles/address/index.d.ts +0 -1
  144. package/dist/types/modules/theme-provider/styles/cart/index.d.ts +0 -1
  145. package/dist/types/modules/theme-provider/styles/checkout/index.d.ts +0 -1
  146. package/dist/types/modules/theme-provider/styles/product/index.d.ts +0 -3
  147. package/dist/types/modules/theme-provider/styles/product-list/index.d.ts +0 -1
  148. package/dist/types/modules/theme-provider/styles/ui/index.d.ts +0 -3
  149. package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +0 -53
  150. package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
  151. package/dist/types/utils/helper.d.ts +0 -27
  152. package/docs/ACTIONS.md +0 -1300
  153. package/docs/DOCUMENTATION_INDEX.md +0 -311
  154. package/docs/EVENTS.md +0 -798
  155. package/umd/elements.js +0 -1
  156. /package/dist/types/{auto-initialize.d.ts → auto-initialize/main.d.ts} +0 -0
  157. /package/dist/types/{elements-builder-client.d.ts → clients/builder.d.ts} +0 -0
  158. /package/dist/types/{elements-client-helper.d.ts → clients/helpers.d.ts} +0 -0
  159. /package/dist/types/{elements-client.d.ts → clients/main.d.ts} +0 -0
  160. /package/dist/types/modules/{theme-provider/styles/address → address/styles}/address.style.d.ts +0 -0
  161. /package/dist/types/modules/{theme-provider/styles/cart → cart/styles}/cart.style.d.ts +0 -0
  162. /package/dist/types/modules/{theme-provider/styles/checkout → checkout/styles}/checkout.style.d.ts +0 -0
  163. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/image-carousel.style.d.ts +0 -0
  164. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/product.style.d.ts +0 -0
  165. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/retailers.style.d.ts +0 -0
  166. /package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-checkbox-filter.components.d.ts → filter-components/product-list-checkbox-filter.d.ts} +0 -0
  167. /package/dist/types/modules/{theme-provider/styles/product-list → product-list/styles}/product-list.style.d.ts +0 -0
  168. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/drawer.style.d.ts +0 -0
  169. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/loading.style.d.ts +0 -0
  170. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/promo-code-ticker.style.d.ts +0 -0
  171. /package/docs/{BROWSER_SUPPORT.md → browser-support.md} +0 -0
  172. /package/docs/{PROXY.md → proxy.md} +0 -0
@@ -1,24 +1,55 @@
1
- import type { ICartItemAttributes, ICheckoutTotalAmounts } from '@/interfaces/cloud';
1
+ import type { ICheckoutAmounts, ICheckoutItem } from '@/interfaces/api/checkout.interface';
2
2
  export interface IBaseCheckoutEventData {
3
3
  cartId: string;
4
+ isGift: boolean;
5
+ billingSameAsShipping: boolean;
6
+ marketingPreferences: {
7
+ canEmail: boolean;
8
+ canSms: boolean;
9
+ };
10
+ hasPromoCode: boolean;
11
+ hasGiftCards: boolean;
12
+ amounts: ICheckoutAmounts;
13
+ itemCount: number;
14
+ items: Record<string, ICheckoutItem>;
4
15
  }
5
16
  export interface ICheckoutLoadedEventData extends IBaseCheckoutEventData {
6
17
  }
18
+ export interface ICheckoutDetailsEventData extends IBaseCheckoutEventData {
19
+ }
20
+ export interface ICheckoutCustomerInformationUpdatedEventData {
21
+ cartId: string;
22
+ }
23
+ export interface ICheckoutGiftInformationUpdatedEventData {
24
+ cartId: string;
25
+ }
26
+ export interface ICheckoutBillingInformationUpdatedEventData {
27
+ cartId: string;
28
+ }
7
29
  export interface ICheckoutTipUpdatedEventData {
30
+ cartId: string;
8
31
  deliveryTips: Array<{
9
- fulfillmentId?: string;
10
- tipAmount?: number;
32
+ fulfillmentId: string;
33
+ tip: number;
34
+ }>;
35
+ previousDeliveryTips: Array<{
36
+ fulfillmentId: string;
37
+ tip: number;
11
38
  }>;
12
39
  }
13
40
  export interface ICheckoutFailedEventData {
14
41
  message: string;
15
42
  }
16
43
  export interface ICheckoutToggleEventData {
44
+ cartId: string;
17
45
  isActive: boolean;
46
+ previousIsActive: boolean;
18
47
  }
19
48
  export interface ICheckoutMarketingPreferencesToggleEventData {
49
+ cartId: string;
20
50
  fieldName: 'canEmail' | 'canSms';
21
51
  isActive: boolean;
52
+ previousIsActive: boolean;
22
53
  }
23
54
  export interface ICheckoutSubmitStartedEventData {
24
55
  started: boolean;
@@ -31,84 +62,47 @@ export interface ICheckoutSubmitFailedEventData {
31
62
  message: string;
32
63
  }
33
64
  export interface ICheckoutItemQuantityChangedEventData {
65
+ cartId: string;
34
66
  cartItemId: string;
35
67
  quantity: number;
36
68
  previousQuantity: number;
37
69
  }
38
70
  export interface ICheckoutItemRemovedEventData {
71
+ cartId: string;
39
72
  cartItemId: string;
40
73
  }
41
74
  export interface ICheckoutItemEngravingUpdatedEventData {
75
+ cartId: string;
42
76
  cartItemId: string;
43
77
  engravingLines: string[];
44
78
  previousEngravingLines: string[];
45
79
  }
46
80
  export interface ICheckoutPromoCodeEventData {
47
- discountAmount?: number;
81
+ cartId: string;
82
+ discount?: number;
48
83
  newTotal?: number;
49
84
  }
50
85
  export interface ICheckoutPromoCodeFailedEventData {
86
+ cartId: string;
51
87
  error: string;
52
88
  }
53
89
  export interface ICheckoutGiftCardEventData {
90
+ cartId: string;
54
91
  newTotal?: number;
55
92
  }
56
93
  export interface ICheckoutGiftCardFailedEventData {
94
+ cartId: string;
57
95
  error: string;
58
96
  }
59
97
  export interface ICheckoutProductAddEventData {
98
+ cartId: string;
60
99
  itemsAdded: number;
61
100
  identifiers: string[];
62
101
  isPresale?: boolean;
63
102
  }
64
103
  export interface ICheckoutProductAddFailedEventData {
104
+ cartId: string;
65
105
  identifiers: string[];
66
106
  error: string;
67
107
  isPresale?: boolean;
68
108
  }
69
- export interface ICheckoutItemEventData {
70
- liquidId: string;
71
- variantId: string;
72
- cartItemId: string;
73
- retailerId: string;
74
- fulfillmentId: string;
75
- salsifyGrouping: string;
76
- name: string;
77
- catPath: string;
78
- volume: string;
79
- uom: string;
80
- proof: string;
81
- abv: string;
82
- containerType: string;
83
- container: string;
84
- size: string;
85
- pack: boolean;
86
- packDesc: string;
87
- mainImage: string;
88
- brand: string;
89
- partNumber: string;
90
- upc: string;
91
- sku: string;
92
- price: number;
93
- unitPrice: number;
94
- quantity: number;
95
- unitTax: number;
96
- bottleDeposits: number;
97
- attributes: ICartItemAttributes;
98
- retailerName: string;
99
- expectationDetail: string;
100
- }
101
- export interface ICheckoutDetailsEventData {
102
- cartId: string;
103
- isGift: boolean;
104
- billingSameAsShipping: boolean;
105
- marketingPreferences: {
106
- canEmail: boolean;
107
- canSms: boolean;
108
- };
109
- hasPromoCode: boolean;
110
- hasGiftCards: boolean;
111
- amounts: ICheckoutTotalAmounts;
112
- itemCount: number;
113
- items: Record<string, ICheckoutItemEventData>;
114
- }
@@ -1,6 +1,6 @@
1
1
  import type { IAddressActionEventData } from '@/core/pubsub/interfaces/address.interface';
2
2
  import type { ICartFailedEventData, ICartItemAddedEventData, ICartItemEngravingUpdatedEventData, ICartItemQuantityChangedEventData, ICartItemRemovedEventData, ICartLoadedEventData, ICartProductAddEventData, ICartProductAddFailedEventData, ICartPromoCodeEventData, ICartPromoCodeFailedEventData, ICartUpdatedEventData } from '@/core/pubsub/interfaces/cart.interface';
3
- import type { ICheckoutFailedEventData, ICheckoutGiftCardEventData, ICheckoutGiftCardFailedEventData, ICheckoutItemEngravingUpdatedEventData, ICheckoutItemQuantityChangedEventData, ICheckoutItemRemovedEventData, ICheckoutLoadedEventData, ICheckoutMarketingPreferencesToggleEventData, ICheckoutProductAddEventData, ICheckoutProductAddFailedEventData, ICheckoutPromoCodeEventData, ICheckoutPromoCodeFailedEventData, ICheckoutSubmitCompletedEventData, ICheckoutSubmitFailedEventData, ICheckoutSubmitStartedEventData, ICheckoutTipUpdatedEventData, ICheckoutToggleEventData } from '@/core/pubsub/interfaces/checkout.interface';
3
+ import type { ICheckoutBillingInformationUpdatedEventData, ICheckoutCustomerInformationUpdatedEventData, ICheckoutFailedEventData, ICheckoutGiftCardEventData, ICheckoutGiftCardFailedEventData, ICheckoutGiftInformationUpdatedEventData, ICheckoutItemEngravingUpdatedEventData, ICheckoutItemQuantityChangedEventData, ICheckoutItemRemovedEventData, ICheckoutLoadedEventData, ICheckoutMarketingPreferencesToggleEventData, ICheckoutProductAddEventData, ICheckoutProductAddFailedEventData, ICheckoutPromoCodeEventData, ICheckoutPromoCodeFailedEventData, ICheckoutSubmitCompletedEventData, ICheckoutSubmitFailedEventData, ICheckoutSubmitStartedEventData, ICheckoutTipUpdatedEventData, ICheckoutToggleEventData } from '@/core/pubsub/interfaces/checkout.interface';
4
4
  import type { IProductAddToCartEventData, IProductFulfillmentChangedEventData, IProductFulfillmentTypeChangedEventData, IProductLoadedEventData, IProductQuantityChangedEventData, IProductSizeChangedEventData } from '@/core/pubsub/interfaces/product.interface';
5
5
  import { ELEMENTS_ACTIONS_EVENT } from '@/enums';
6
6
  export interface IElementsClientIsReadyEventData {
@@ -49,6 +49,7 @@ export interface IElementsActionsEventsMap {
49
49
  [ELEMENTS_ACTIONS_EVENT.CART_PROMO_CODE_FAILED]: ICartPromoCodeFailedEventData;
50
50
  [ELEMENTS_ACTIONS_EVENT.CART_PRODUCT_ADD_SUCCESS]: ICartProductAddEventData;
51
51
  [ELEMENTS_ACTIONS_EVENT.CART_PRODUCT_ADD_FAILED]: ICartProductAddFailedEventData;
52
+ [ELEMENTS_ACTIONS_EVENT.INTERNAL_CART_TO_CHECKOUT]: object;
52
53
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_OPENED]: boolean;
53
54
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_CLOSED]: boolean;
54
55
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_LOADED]: ICheckoutLoadedEventData;
@@ -56,9 +57,9 @@ export interface IElementsActionsEventsMap {
56
57
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_IS_GIFT_TOGGLED]: ICheckoutToggleEventData;
57
58
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_BILLING_SAME_AS_SHIPPING_TOGGLED]: ICheckoutToggleEventData;
58
59
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_MARKETING_PREFERENCES_TOGGLED]: ICheckoutMarketingPreferencesToggleEventData;
59
- [ELEMENTS_ACTIONS_EVENT.CHECKOUT_CUSTOMER_INFORMATION_UPDATED]: boolean;
60
- [ELEMENTS_ACTIONS_EVENT.CHECKOUT_GIFT_INFORMATION_UPDATED]: boolean;
61
- [ELEMENTS_ACTIONS_EVENT.CHECKOUT_BILLING_INFORMATION_UPDATED]: boolean;
60
+ [ELEMENTS_ACTIONS_EVENT.CHECKOUT_CUSTOMER_INFORMATION_UPDATED]: ICheckoutCustomerInformationUpdatedEventData;
61
+ [ELEMENTS_ACTIONS_EVENT.CHECKOUT_GIFT_INFORMATION_UPDATED]: ICheckoutGiftInformationUpdatedEventData;
62
+ [ELEMENTS_ACTIONS_EVENT.CHECKOUT_BILLING_INFORMATION_UPDATED]: ICheckoutBillingInformationUpdatedEventData;
62
63
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_ITEM_REMOVED]: ICheckoutItemRemovedEventData;
63
64
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_ITEM_QUANTITY_INCREASE]: ICheckoutItemQuantityChangedEventData;
64
65
  [ELEMENTS_ACTIONS_EVENT.CHECKOUT_ITEM_QUANTITY_DECREASE]: ICheckoutItemQuantityChangedEventData;
@@ -1,81 +1,23 @@
1
1
  import type { FulfillmentType } from '@/enums';
2
- import type { IAddressAddress, IAddressCoordinates } from '@/interfaces/api/address.interface';
3
- export interface IBaseProductFulfillmentEventData {
4
- price: number;
5
- partNumber: string;
6
- stock: number;
7
- isEngravable: boolean;
8
- fulfillmentId: string;
9
- fulfillmentType: FulfillmentType;
10
- retailerId: string;
2
+ import type { IFulfillment, IProduct, IProductSize, IProductVariant, IRetailerAddress } from '@/interfaces/api/product.interface';
3
+ export type IProductFulfillmentEventData = IFulfillment & {
11
4
  retailerName: string;
12
- retailerAddress: (IAddressAddress & IAddressCoordinates) | null;
13
- retailerTimezone: string;
14
- }
15
- export interface IBaseProductSizeAttributesEventData {
16
- engraving?: {
17
- status: boolean;
18
- maxLines: number;
19
- maxCharsPerLine: number;
20
- fee: number;
21
- location: string;
22
- };
23
- presale?: {
24
- canPurchaseOn: null | string;
25
- estimatedShipBy: null | string;
26
- isActive: boolean;
27
- language: string;
28
- presaleLimit: number;
29
- price: number;
30
- };
31
- }
32
- export interface IBaseProductSizeEventData {
33
- id: string;
34
- upc: string;
35
- size: string;
36
- pack: boolean;
37
- packDesc: string;
38
- container: string;
39
- containerType: string;
40
- maxQuantityPerOrder: number;
41
- image: string;
42
- uom: string;
43
- volume: string;
44
- attributes: IBaseProductSizeAttributesEventData;
45
- shippingFulfillments: Record<string, IBaseProductFulfillmentEventData>;
46
- onDemandFulfillments: Record<string, IBaseProductFulfillmentEventData>;
47
- }
48
- export interface IBaseProductEventData {
5
+ retailerAddress: IRetailerAddress;
6
+ retailerAddressFormatted: string;
7
+ variant: IProductVariant;
8
+ };
9
+ export interface IProductSizeEventData extends Omit<IProductSize, 'shippingVariants' | 'onDemandVariants'> {
10
+ onDemandFulfillments: Record<string, IProductFulfillmentEventData>;
11
+ shippingFulfillments: Record<string, IProductFulfillmentEventData>;
12
+ }
13
+ export interface IBaseProductEventData extends Omit<IProduct, 'sizes'> {
49
14
  identifier: string;
50
15
  selectedSizeId: string | null;
51
- selectedFulfillmentId: string | null;
52
16
  selectedFulfillmentType: FulfillmentType;
53
- id: string;
54
- name: string;
55
- brand: string;
56
- catPath: string;
57
- category: string;
58
- classification: string;
59
- type: string;
60
- salsifyGrouping: string;
61
- subType: string;
62
- images: string[];
63
- region: string;
64
- country: string;
65
- material: string;
66
- abv: string;
67
- proof: string;
68
- age: string;
69
- color: string;
70
- flavor: string;
71
- variety: string;
72
- appellation: string;
73
- vintage: string;
74
- description: string;
75
- htmlDescription: string;
76
- tastingNotes: string;
77
- noAvailabilityPrice: number;
78
- sizes: Record<string, IBaseProductSizeEventData>;
17
+ selectedFulfillmentId: string | null;
18
+ productHasAvailability: boolean;
19
+ fulfillmentHasAvailability: boolean;
20
+ sizes: Record<string, IProductSizeEventData>;
79
21
  }
80
22
  export interface IProductLoadedEventData extends IBaseProductEventData {
81
23
  }
@@ -86,7 +28,6 @@ export interface IProductQuantityChangedEventData {
86
28
  }
87
29
  export interface IProductAddToCartEventData {
88
30
  identifier: string;
89
- upc: string;
90
31
  fulfillmentId: string;
91
32
  partNumber: string;
92
33
  quantity: number;
@@ -95,7 +36,7 @@ export interface IProductAddToCartEventData {
95
36
  export interface IProductSizeChangedEventData {
96
37
  identifier: string;
97
38
  selectedSizeId: string;
98
- size: string;
39
+ selectedSize: string;
99
40
  previousSizeId: string;
100
41
  previousSize: string;
101
42
  }
@@ -1,7 +1,4 @@
1
- import type { IElementsCartEvent } from 'utils/helper';
2
- import type { FulfillmentType } from '@/enums';
3
- import type { IAddressAddress } from '@/interfaces/api/address.interface';
4
- import type { ICartItemAttributes, IRetailerExpectation, IRetailerFees } from '@/interfaces/cloud';
1
+ import type { ICartEvent, ICartFulfillment, ICartItemAttributes, ICartPromoCode, ICartRetailer } from '@/interfaces/api/cart.interface';
5
2
  export interface ICartItemStore {
6
3
  id: string;
7
4
  variantId: string;
@@ -32,64 +29,27 @@ export interface ICartItemStore {
32
29
  updating: boolean;
33
30
  error: string | null;
34
31
  }
35
- export interface ICartTotalsStore {
36
- subtotal: number;
37
- total: number;
38
- shippingFee: number;
39
- platformFee: number;
40
- giftCardTotal: number;
41
- engravingFee: number;
42
- deliveryFee: number;
43
- discounts: number;
44
- quantity: number;
32
+ export interface ICartFulfillmentStore extends ICartFulfillment {
33
+ loading: boolean;
34
+ error: string | null;
35
+ updating: boolean;
45
36
  }
46
- export interface IRetailerFulfillmentStore {
47
- id: string;
48
- canEngrave: boolean;
49
- type: FulfillmentType;
50
- fees: IRetailerFees;
51
- expectation: IRetailerExpectation;
52
- shippingFee: number;
53
- subtotal: number;
54
- items: string[];
55
- engravingFee: number;
56
- deliveryFee: number;
57
- retailerId: string;
58
- loading?: boolean;
59
- error?: string | null;
60
- updating?: boolean;
37
+ export interface ICartRetailerStore extends ICartRetailer {
38
+ loading: boolean;
39
+ error: string | null;
40
+ updating: boolean;
61
41
  }
62
- export interface IRetailerStore {
42
+ export interface ICartStore {
63
43
  id: string;
64
- name: string;
65
- platformFee: number;
66
- shippingFee: number;
67
44
  subtotal: number;
68
- address?: IAddressAddress;
69
- deliveryFee: number;
70
- engravingFee: number;
71
- total: number;
72
- fulfillments: string[];
73
- loading?: boolean;
74
- error?: string | null;
75
- updating?: boolean;
76
- }
77
- export interface ICartPromoCodeStore {
78
- code: string;
79
- discountAmount: number;
80
- }
81
- export interface ICartStore {
82
- id: string | null;
45
+ itemsQuantity: number;
46
+ items: Record<string, ICartItemStore>;
47
+ fulfillments: Record<string, ICartFulfillmentStore>;
48
+ retailers: Record<string, ICartRetailerStore>;
49
+ promoCode: ICartPromoCode | null;
50
+ events: ICartEvent[];
83
51
  loading: boolean;
84
52
  error: string | null;
85
- items: Record<string, ICartItemStore>;
86
- totals: ICartTotalsStore;
87
- retailers: Record<string, IRetailerStore>;
88
- promoCode: ICartPromoCodeStore | null;
89
- fulfillments: Record<string, IRetailerFulfillmentStore>;
90
53
  rerender: boolean;
91
54
  shouldReset: boolean;
92
- updatedAt: string;
93
- createdAt: string;
94
- events: IElementsCartEvent[];
95
55
  }
@@ -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,21 @@ 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
+ shippingAddress: ICheckoutShippingAddress;
42
+ promoCode: ICheckoutPromoCode | null;
43
+ giftCards: ICheckoutGiftCard[];
44
+ itemsQuantity: number;
136
45
  items: Record<string, ICheckoutItemStore>;
137
- amounts: ICheckoutTotalAmounts;
46
+ fulfillments: Record<string, ICheckoutFulfillment>;
47
+ retailers: Record<string, ICheckoutRetailer>;
48
+ amounts: ICheckoutAmounts;
138
49
  orderNumber: string | null;
139
- onDemandFulfillmentTipInfo: Record<string, IOnDemandFulfillmentTipInfo>;
140
50
  tipSelection: number;
141
51
  deliveryInstructions: string;
142
52
  giftCardError: string | null;
@@ -145,6 +55,5 @@ export interface ICheckoutStore {
145
55
  loading: boolean;
146
56
  updating: boolean;
147
57
  error: string | null;
148
- warning: string[];
149
- events: IElementsCheckoutEvents[];
58
+ events: ICheckoutEvent[];
150
59
  }
@@ -1,31 +1,46 @@
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 { 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 interface IModalContentConfig {
15
+ type: ComponentType;
16
+ data?: Record<string, any>;
17
+ }
10
18
  export interface IDrawerStore {
11
19
  isOpen: boolean;
12
20
  contentConfig: IDrawerContentConfig | null;
13
21
  }
14
22
  export interface IUIStore {
15
23
  drawer: IDrawerStore;
24
+ modal: IModalStore;
25
+ }
26
+ export interface IModalStore {
27
+ isOpen: boolean;
28
+ contentConfig: IModalContentConfig | null;
16
29
  }
17
30
  export interface IGlobalStore {
18
31
  address: IAddressStore;
19
32
  products: Record<string, IProductStore>;
20
33
  cart: ICartStore;
21
34
  checkout: ICheckoutStore;
35
+ productsList: IProductListStore;
22
36
  ui: IUIStore;
37
+ metadata: IElementsMetadataStore;
23
38
  }
24
39
  export interface IPersistedStore {
25
40
  p?: string;
26
41
  c?: string;
27
42
  }
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}`;
43
+ 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}` | `ui.modal.${keyof IModalStore}` | `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}` | `metadata.${keyof IElementsMetadataStore}` | `metadata.checkout.${keyof ICheckoutMetadata}` | `metadata.checkout.injection.${keyof ICheckoutInjection}` | `productsList.${string}`;
29
44
  interface MiddlewareContext {
30
45
  action: string;
31
46
  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,45 @@
1
+ import type { IPagination } from 'modules/product-list/product-list.interface';
2
+ import type { FulfillmentType } from '@/enums';
3
+ import type { IFulfillment, IProduct, IProductVariant, IRetailer, IRetailerAddress } from '@/interfaces/api/product.interface';
4
+ import type { IFilterSchema } from '@/interfaces/api/product-list.interface';
5
+ import type { IProductSizeStore } from './product.interface';
6
+ export type IProductFulfillmentStore = IFulfillment & {
7
+ retailerName: string;
8
+ retailerAddress: IRetailerAddress;
9
+ retailerAddressFormatted: string;
10
+ variant: IProductVariant;
11
+ image: string | null;
12
+ };
13
+ export interface IProductList extends IProduct {
14
+ quantity: number;
15
+ selectedSizeId: string | null;
16
+ selectedFulfillmentType: FulfillmentType;
17
+ selectedFulfillmentId: string | null;
18
+ selectedFulfillment: IProductFulfillmentStore | null;
19
+ productHasAvailability: boolean;
20
+ fulfillmentHasAvailability: boolean;
21
+ }
22
+ export interface IProductListProduct extends Omit<IProduct, 'sizes'> {
23
+ sizes: Record<string, IProductSizeStore>;
24
+ }
25
+ export interface IProductListStore {
26
+ products: IProductListProduct[];
27
+ retailers: Record<string, IRetailer>;
28
+ filters: IFilterSchema[];
29
+ pagination: IPagination;
30
+ appliedFilters: Record<string, string[]>;
31
+ searchTerm: string;
32
+ gridConfig?: {
33
+ rows: number;
34
+ columns: number;
35
+ };
36
+ userProducts: {
37
+ [productId: string]: {
38
+ selectedSizeId: string;
39
+ selectedFulfillmentType: FulfillmentType;
40
+ selectedFulfillment: IProductFulfillmentStore | null;
41
+ selectedQuantity: number;
42
+ };
43
+ };
44
+ loading: boolean;
45
+ }
@@ -8,10 +8,12 @@ export interface IProductDrawerStore {
8
8
  isOpen: boolean;
9
9
  contentConfig: IProductDrawerContentConfig | null;
10
10
  }
11
- export type IProductFulfillmentStore = IProductVariant & IFulfillment & {
11
+ export type IProductFulfillmentStore = IFulfillment & {
12
12
  retailerName: string;
13
13
  retailerAddress: IRetailerAddress;
14
14
  retailerAddressFormatted: string;
15
+ variant: IProductVariant;
16
+ image?: string;
15
17
  };
16
18
  export interface IProductSizeStore extends Omit<IProductSize, 'shippingVariants' | 'onDemandVariants'> {
17
19
  onDemandFulfillments: Record<string, IProductFulfillmentStore>;