@liquidcommerce/elements-sdk 2.6.0-beta.3 → 2.6.0-beta.30

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 (118) hide show
  1. package/README.md +7 -7
  2. package/dist/index.esm.js +15191 -14530
  3. package/dist/types/constants/core.constant.d.ts +4 -3
  4. package/dist/types/core/api/api-client.service.d.ts +15 -17
  5. package/dist/types/core/api/auth-client.service.d.ts +34 -23
  6. package/dist/types/core/api/http-client.service.d.ts +0 -1
  7. package/dist/types/core/client/client-action.service.d.ts +18 -12
  8. package/dist/types/core/client/client-config.service.d.ts +3 -0
  9. package/dist/types/core/command/base-command.service.d.ts +2 -2
  10. package/dist/types/core/command/common-command.service.d.ts +2 -1
  11. package/dist/types/core/google-tag-manager.service.d.ts +14 -11
  12. package/dist/types/core/logger/logger.service.d.ts +1 -1
  13. package/dist/types/core/pubsub/interfaces/address.interface.d.ts +3 -12
  14. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +27 -64
  15. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +44 -50
  16. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +5 -4
  17. package/dist/types/core/pubsub/interfaces/product.interface.d.ts +16 -81
  18. package/dist/types/core/store/interfaces/address.interface.d.ts +3 -12
  19. package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -55
  20. package/dist/types/core/store/interfaces/checkout.interface.d.ts +17 -108
  21. package/dist/types/core/store/interfaces/core.interface.d.ts +18 -5
  22. package/dist/types/core/store/interfaces/product-list.interface.d.ts +47 -0
  23. package/dist/types/core/store/interfaces/product.interface.d.ts +13 -66
  24. package/dist/types/core/store/store.constant.d.ts +3 -1
  25. package/dist/types/core/telemetry/telemetry.interface.d.ts +0 -1
  26. package/dist/types/elements-base-client.d.ts +5 -1
  27. package/dist/types/enums/core.enum.d.ts +26 -1
  28. package/dist/types/enums/index.d.ts +0 -1
  29. package/dist/types/interfaces/api/address.interface.d.ts +28 -0
  30. package/dist/types/interfaces/api/cart.interface.d.ts +95 -0
  31. package/dist/types/interfaces/api/checkout.interface.d.ts +216 -0
  32. package/dist/types/interfaces/api/product-list.interface.d.ts +38 -0
  33. package/dist/types/interfaces/api/product.interface.d.ts +105 -0
  34. package/dist/types/interfaces/configs/configurations.interface.d.ts +5 -5
  35. package/dist/types/interfaces/configs/global.interface.d.ts +4 -2
  36. package/dist/types/interfaces/configs/index.d.ts +1 -0
  37. package/dist/types/interfaces/configs/product-list.interface.d.ts +25 -0
  38. package/dist/types/interfaces/configs/product.interface.d.ts +1 -0
  39. package/dist/types/interfaces/core.interface.d.ts +17 -5
  40. package/dist/types/modules/address/address.command.d.ts +3 -3
  41. package/dist/types/modules/address/address.interface.d.ts +0 -7
  42. package/dist/types/modules/cart/cart.commands.d.ts +4 -5
  43. package/dist/types/modules/cart/components/cart-body.component.d.ts +2 -1
  44. package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
  45. package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
  46. package/dist/types/modules/checkout/checkout.commands.d.ts +18 -9
  47. package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
  48. package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
  49. package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +14 -1
  50. package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
  51. package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +2 -2
  52. package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
  53. package/dist/types/modules/checkout/constant.d.ts +3 -0
  54. package/dist/types/modules/product/components/components.d.ts +2 -4
  55. package/dist/types/modules/product/product.commands.d.ts +3 -2
  56. package/dist/types/modules/product-list/components/card-components/index.d.ts +4 -0
  57. package/dist/types/modules/product-list/components/card-components/product-button.d.ts +11 -0
  58. package/dist/types/modules/product-list/components/card-components/product-fulfillments.d.ts +13 -0
  59. package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +10 -0
  60. package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +9 -0
  61. package/dist/types/modules/product-list/components/filter-components/index.d.ts +7 -0
  62. package/dist/types/modules/product-list/components/filter-components/product-list-apply-filter-button.d.ts +1 -0
  63. package/dist/types/modules/product-list/components/filter-components/product-list-chip.d.ts +5 -0
  64. package/dist/types/modules/product-list/components/filter-components/product-list-filters-chips.d.ts +13 -0
  65. package/dist/types/modules/product-list/components/filter-components/product-list-fulfillment-filter.d.ts +14 -0
  66. 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
  67. package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +13 -0
  68. package/dist/types/modules/product-list/components/index.d.ts +5 -3
  69. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +59 -37
  70. package/dist/types/modules/product-list/components/product-list-retailers.d.ts +17 -0
  71. package/dist/types/modules/product-list/components/product-list-search.component.d.ts +22 -0
  72. package/dist/types/modules/product-list/product-list-card.component.d.ts +35 -0
  73. package/dist/types/modules/product-list/product-list.commands.d.ts +55 -3
  74. package/dist/types/modules/product-list/product-list.component.d.ts +13 -42
  75. package/dist/types/modules/product-list/product-list.constants.d.ts +39 -0
  76. package/dist/types/modules/product-list/product-list.interface.d.ts +36 -31
  77. package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
  78. package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
  79. package/dist/types/modules/theme-provider/styles/ui/index.d.ts +1 -0
  80. package/dist/types/modules/theme-provider/styles/ui/modal.style.d.ts +1 -0
  81. package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -1
  82. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +1 -0
  83. package/dist/types/modules/ui-components/input/index.d.ts +0 -1
  84. package/dist/types/modules/ui-components/input/input.component.d.ts +8 -1
  85. package/dist/types/modules/ui-components/modal/modal.component.d.ts +21 -0
  86. package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
  87. package/dist/types/modules/ui-components/ui.commands.d.ts +3 -1
  88. package/dist/types/static/icon/check.icon.d.ts +2 -0
  89. package/dist/types/static/icon/index.d.ts +1 -0
  90. package/dist/types/utils/format.d.ts +0 -14
  91. package/docs/ACTIONS.md +13 -13
  92. package/docs/EVENTS.md +7 -7
  93. package/package.json +8 -9
  94. package/umd/elements.js +1 -1
  95. package/dist/types/enums/cloud.enum.d.ts +0 -403
  96. package/dist/types/interfaces/cloud/address.interface.d.ts +0 -36
  97. package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
  98. package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -43
  99. package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -214
  100. package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
  101. package/dist/types/interfaces/cloud/index.d.ts +0 -7
  102. package/dist/types/interfaces/cloud/product.interface.d.ts +0 -158
  103. package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
  104. package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
  105. package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -9
  106. package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
  107. package/dist/types/modules/product/utils/helpers.d.ts +0 -3
  108. package/dist/types/modules/product/utils/retailer-hours.d.ts +0 -9
  109. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +0 -36
  110. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +0 -6
  111. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +0 -1
  112. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +0 -16
  113. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.d.ts +0 -16
  114. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +0 -18
  115. package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +0 -53
  116. package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
  117. package/dist/types/utils/helper.d.ts +0 -27
  118. /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
@@ -10,7 +10,7 @@ import { LoggerFactory } from '@/core/logger/logger-factory';
10
10
  import { StoreService } from '@/core/store/store.service';
11
11
  import { TelemetryService } from '@/core/telemetry/telemetry.service';
12
12
  import { type ComponentType } from '@/enums';
13
- import type { IInjectedComponent, IInjectProductElement, IInjectProductListParams, ILiquidCommerceElementsActions, IProcessInjectElementParams } from '@/interfaces/core.interface';
13
+ import type { IInjectProductElement, IInjectProductListFiltersParams, IInjectProductListParams, IInjectProductListSearchParams, IInjectedComponent, ILiquidCommerceElementsActions, IProcessInjectElementParams } from '@/interfaces/core.interface';
14
14
  import { ThemeProviderService } from '@/modules/theme-provider/theme-provider.service';
15
15
  export declare abstract class ElementsBaseClient {
16
16
  protected readonly authClient: AuthClientService;
@@ -28,6 +28,7 @@ export declare abstract class ElementsBaseClient {
28
28
  protected clientPrepared: boolean;
29
29
  protected componentFactoryInitialized: boolean;
30
30
  protected cartDrawerCreated: boolean;
31
+ protected modalCreated: boolean;
31
32
  protected injectedComponents: Map<string, IInjectedComponent>;
32
33
  constructor(clientConfigs: IClientConfigs);
33
34
  prepare(): Promise<void>;
@@ -38,7 +39,10 @@ export declare abstract class ElementsBaseClient {
38
39
  protected processInjectElement(params: IProcessInjectElementParams): Promise<IInjectedComponent | null>;
39
40
  protected processInjectProduct(params: IInjectProductElement[]): Promise<IInjectedComponent[]>;
40
41
  injectProductList(params: IInjectProductListParams): Promise<void>;
42
+ injectProductListSearch(params: IInjectProductListSearchParams): Promise<void>;
43
+ injectProductListFilters(params: IInjectProductListFiltersParams): Promise<void>;
41
44
  protected ensureCartDrawerExists(): void;
45
+ protected ensureModalExists(): void;
42
46
  protected ensureAllComponentsRegistered(): void;
43
47
  protected createInjectedComponentWrapper(containerId: string, type: ComponentType, element: HTMLElement): IInjectedComponent;
44
48
  protected rerenderInjectedComponentsByType(type: ComponentType): void;
@@ -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";
@@ -76,6 +76,7 @@ export declare const COMPONENT_TYPE: {
76
76
  readonly PURCHASE_MIN_ALERT: "purchase-min-alert";
77
77
  readonly ALERT: "alert";
78
78
  readonly PROMO_CODE_TICKER: "promo-code-ticker";
79
+ readonly MODAL: "modal";
79
80
  readonly ADDRESS: "address";
80
81
  readonly ADDRESS_INPUT: "address-input";
81
82
  readonly ADDRESS_DISPLAY: "address-display";
@@ -97,6 +98,7 @@ export declare const COMPONENT_TYPE: {
97
98
  readonly PRODUCT_LIST_FILTERS: "product-list-filters";
98
99
  readonly PRODUCT_LIST_SEARCH: "product-list-search";
99
100
  readonly PRODUCT_LIST_CARD_LOADING: "product-list-card-loading";
101
+ readonly PRODUCT_LIST_RETAILERS: "product-list-retailers";
100
102
  readonly CART: "cart";
101
103
  readonly CART_RETAILER: "cart-retailer";
102
104
  readonly CART_ITEM: "cart-item";
@@ -146,3 +148,26 @@ export declare const DEBUG_MODE: {
146
148
  readonly PANEL: "panel";
147
149
  };
148
150
  export type DebugMode = (typeof DEBUG_MODE)[keyof typeof DEBUG_MODE];
151
+ export declare const CART_EVENT_TYPE: {
152
+ readonly GENERIC: "generic";
153
+ readonly PROMO_CODE: "promo-code";
154
+ };
155
+ export type CartEventType = (typeof CART_EVENT_TYPE)[keyof typeof CART_EVENT_TYPE];
156
+ export declare const CART_EVENT_LEVEL: {
157
+ readonly SUCCESS: "success";
158
+ readonly WARNING: "warning";
159
+ readonly ERROR: "error";
160
+ };
161
+ export type CartEventLevel = (typeof CART_EVENT_LEVEL)[keyof typeof CART_EVENT_LEVEL];
162
+ export declare const CHECKOUT_EVENT_TYPE: {
163
+ readonly GENERIC: "generic";
164
+ readonly PROMO_CODE: "promo-code";
165
+ readonly GIFT_CARD: "gift-card";
166
+ };
167
+ export type CheckoutEventType = (typeof CHECKOUT_EVENT_TYPE)[keyof typeof CHECKOUT_EVENT_TYPE];
168
+ export declare const CHECKOUT_EVENT_LEVEL: {
169
+ readonly SUCCESS: "success";
170
+ readonly WARNING: "warning";
171
+ readonly ERROR: "error";
172
+ };
173
+ export type CheckoutEventLevel = (typeof CHECKOUT_EVENT_LEVEL)[keyof typeof CHECKOUT_EVENT_LEVEL];
@@ -1,2 +1 @@
1
- export * from './cloud.enum';
2
1
  export * from './core.enum';
@@ -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,95 @@
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
+ hasEngraving: boolean;
90
+ fee: number;
91
+ maxCharsPerLine: number;
92
+ maxLines: number;
93
+ location: string;
94
+ lines: string[];
95
+ }
@@ -0,0 +1,216 @@
1
+ import type { CheckoutEventLevel, CheckoutEventType, FulfillmentType } from '@/enums';
2
+ import type { IAddressAddress, IAddressCoordinates, ILocation } from '@/interfaces/api/address.interface';
3
+ import type { ICart } from '@/interfaces/api/cart.interface';
4
+ import type { IProductPresale } from '@/interfaces/api/product.interface';
5
+ export interface ICheckoutComplete {
6
+ orderNumber: string;
7
+ }
8
+ export interface ICheckoutPaymentSession {
9
+ key: string;
10
+ secret: string;
11
+ }
12
+ export interface ICheckoutPaymentConfirmParams {
13
+ confirmationTokenId: string;
14
+ setupIntentId: string;
15
+ }
16
+ export interface ICheckoutPaymentConfirmCard {
17
+ brand: string;
18
+ expMonth: string;
19
+ expYear: string;
20
+ last4: string;
21
+ }
22
+ export interface ICheckoutPaymentConfirm {
23
+ id: string;
24
+ card: ICheckoutPaymentConfirmCard;
25
+ }
26
+ export interface ICheckoutCustomer {
27
+ email: string;
28
+ firstName: string;
29
+ lastName: string;
30
+ company: string;
31
+ phone: string;
32
+ birthDate: string;
33
+ }
34
+ export interface ICheckoutBilling {
35
+ firstName: string;
36
+ lastName: string;
37
+ email: string;
38
+ phone: string;
39
+ company: string;
40
+ one: string;
41
+ two: string;
42
+ city: string;
43
+ state: string;
44
+ zip: string;
45
+ }
46
+ export interface ICheckoutGiftRecipient {
47
+ firstName: string;
48
+ lastName: string;
49
+ email: string;
50
+ phone: string;
51
+ message: string;
52
+ }
53
+ export interface ICheckoutMarketingPreferences {
54
+ canEmail: boolean;
55
+ canSms: boolean;
56
+ }
57
+ export interface ICheckoutDeliveryTip {
58
+ fulfillmentId: string;
59
+ tip: number;
60
+ }
61
+ export interface ICheckoutDeliveryInstructions {
62
+ fulfillmentId: string;
63
+ instructions: string;
64
+ }
65
+ export interface ICheckoutPrepareParams {
66
+ cartId: string;
67
+ customer?: ICheckoutCustomer;
68
+ shippingAddressTwo?: string;
69
+ billingAddress?: ICheckoutBilling;
70
+ isGift?: boolean;
71
+ billingSameAsShipping?: boolean;
72
+ giftOptions?: ICheckoutGiftRecipient;
73
+ marketingPreferences?: ICheckoutMarketingPreferences;
74
+ deliveryTips?: ICheckoutDeliveryTip[];
75
+ deliveryInstructions?: ICheckoutDeliveryInstructions[];
76
+ payment?: string;
77
+ promoCode?: string;
78
+ giftCards?: string[];
79
+ }
80
+ export interface ICheckoutUpdateItem {
81
+ id?: string;
82
+ partNumber: string;
83
+ quantity: number;
84
+ fulfillmentId: string;
85
+ engravingLines?: string[];
86
+ }
87
+ export interface ICheckoutItemsUpdateParams {
88
+ cartId: string;
89
+ items: ICheckoutUpdateItem[];
90
+ location?: ILocation;
91
+ }
92
+ export interface ICheckoutItemsUpdateResponse {
93
+ cart: ICart;
94
+ checkout: ICheckoutPrepare;
95
+ }
96
+ export interface ICheckoutAmounts {
97
+ subtotal: number;
98
+ engraving: number;
99
+ service: number;
100
+ shipping: number;
101
+ delivery: number;
102
+ platform: number;
103
+ discounts: number;
104
+ giftCards: number;
105
+ tax: number;
106
+ tip: number;
107
+ total: number;
108
+ }
109
+ export interface ICheckoutPromoCode {
110
+ code: string;
111
+ discount: number;
112
+ freeDelivery: boolean;
113
+ freeServiceFee: boolean;
114
+ freeShipping: boolean;
115
+ }
116
+ export interface ICheckoutGiftCard {
117
+ code: string;
118
+ applied: number;
119
+ }
120
+ export interface ICheckoutShippingAddress {
121
+ formattedAddress: string;
122
+ address: IAddressAddress;
123
+ coordinates: IAddressCoordinates;
124
+ }
125
+ export interface ICheckoutItemEngraving {
126
+ isEngravable: boolean;
127
+ hasEngraving: boolean;
128
+ fee: number;
129
+ maxCharsPerLine: number;
130
+ maxLines: number;
131
+ location: string;
132
+ lines: string[];
133
+ }
134
+ export interface ICheckoutItemAttributes {
135
+ engraving: ICheckoutItemEngraving;
136
+ presale: IProductPresale;
137
+ }
138
+ export interface ICheckoutItem {
139
+ variantId: string;
140
+ cartItemId: string;
141
+ liquidId: string;
142
+ retailerId: string;
143
+ fulfillmentId: string;
144
+ salsifyPid?: string;
145
+ salsifyGrouping?: string;
146
+ name: string;
147
+ catPath: string;
148
+ volume: string;
149
+ uom: string;
150
+ proof: string;
151
+ abv: string;
152
+ containerType: string;
153
+ container: string;
154
+ size: string;
155
+ pack: boolean;
156
+ packDesc: string;
157
+ mainImage: string;
158
+ brand: string;
159
+ partNumber: string;
160
+ upc: string;
161
+ sku: string;
162
+ price: number;
163
+ unitPrice: number;
164
+ quantity: number;
165
+ tax: number;
166
+ unitTax: number;
167
+ bottleDeposits: number;
168
+ attributes: ICheckoutItemAttributes;
169
+ }
170
+ export interface ICheckoutFulfillment {
171
+ id: string;
172
+ deliveryInstructions: string;
173
+ type: FulfillmentType;
174
+ expectation: string;
175
+ engravingExpectation: string;
176
+ itemIds: string[];
177
+ doesAllowPromos: boolean;
178
+ doesAllowGiftCards: boolean;
179
+ amounts: ICheckoutAmounts;
180
+ itemsQuantity: number;
181
+ }
182
+ export interface ICheckoutRetailer {
183
+ id: string;
184
+ name: string;
185
+ fulfillments: Record<string, ICheckoutFulfillment>;
186
+ amounts: ICheckoutAmounts;
187
+ }
188
+ export interface ICheckoutPresale {
189
+ isLocked: boolean;
190
+ expiresAt: string;
191
+ }
192
+ export interface ICheckoutEvent {
193
+ type: CheckoutEventType;
194
+ message: string;
195
+ level: CheckoutEventLevel;
196
+ }
197
+ export interface ICheckoutPrepare {
198
+ token: string;
199
+ cartId: string;
200
+ customer: ICheckoutCustomer;
201
+ isGift: boolean;
202
+ billingSameAsShipping: boolean;
203
+ payment?: string;
204
+ giftOptions: ICheckoutGiftRecipient;
205
+ marketingPreferences: ICheckoutMarketingPreferences;
206
+ shippingAddress: ICheckoutShippingAddress;
207
+ billingAddress: ICheckoutBilling;
208
+ promoCode: ICheckoutPromoCode | null;
209
+ amounts: ICheckoutAmounts;
210
+ giftCards: ICheckoutGiftCard[];
211
+ presale: ICheckoutPresale | null;
212
+ itemsQuantity: number;
213
+ items: Record<string, ICheckoutItem>;
214
+ retailers: Record<string, ICheckoutRetailer>;
215
+ events: ICheckoutEvent[];
216
+ }
@@ -0,0 +1,38 @@
1
+ import type { FILTER_KEYS } from 'modules/product-list/product-list.constants';
2
+ import type { ILocation } from '@/interfaces/api/address.interface';
3
+ import type { IProductAvailabilityResponse } from '@/interfaces/api/product.interface';
4
+ export interface IProductSearchParams {
5
+ location?: ILocation;
6
+ search?: string;
7
+ pageToken?: string;
8
+ page?: number;
9
+ perPage?: number;
10
+ filters?: IFilterParams[];
11
+ }
12
+ export type IFilterParamsValue = string | string[] | {
13
+ min?: string | number;
14
+ max?: string | number;
15
+ } | boolean;
16
+ export interface IFilterParams {
17
+ key: string;
18
+ values: IFilterParamsValue;
19
+ }
20
+ export type FacetFilterKeys = typeof FILTER_KEYS.BRANDS | typeof FILTER_KEYS.CATEGORIES | typeof FILTER_KEYS.FLAVOR | typeof FILTER_KEYS.REGION | typeof FILTER_KEYS.VARIETY | typeof FILTER_KEYS.VINTAGE | typeof FILTER_KEYS.COUNTRY | typeof FILTER_KEYS.APPELLATION | typeof FILTER_KEYS.TAGS | typeof FILTER_KEYS.MATERIALS | typeof FILTER_KEYS.SIZES | typeof FILTER_KEYS.ENGRAVING | typeof FILTER_KEYS.PRESALE | typeof FILTER_KEYS.FULFILLMENT | typeof FILTER_KEYS.PRICE | typeof FILTER_KEYS.AVAILABILITY | typeof FILTER_KEYS.COLORS;
21
+ export interface IFilterSchema {
22
+ type: FacetFilterKeys;
23
+ values: IFilterValue[];
24
+ }
25
+ export interface IFilterValue {
26
+ value: string;
27
+ name: string;
28
+ count: number;
29
+ }
30
+ export interface INavigationResponse {
31
+ currentPage: number;
32
+ totalPages: number;
33
+ totalCount: number;
34
+ filters: IFilterSchema[];
35
+ }
36
+ export interface IProductSearchResponse extends IProductAvailabilityResponse {
37
+ navigation: INavigationResponse;
38
+ }
@@ -0,0 +1,105 @@
1
+ import type { FulfillmentType } from '@/enums';
2
+ import type { IAddressAddress, IAddressCoordinates, ILocation } from '@/interfaces/api/address.interface';
3
+ export interface IProductAvailabilityParams {
4
+ identifiers: string[];
5
+ location?: ILocation;
6
+ }
7
+ export interface IProductAvailabilityResponse {
8
+ products: IProduct[];
9
+ retailers: Record<string, IRetailer>;
10
+ }
11
+ export interface IProductVariant {
12
+ retailerId: string;
13
+ shippingFulfillmentId: string;
14
+ onDemandFulfillmentId: string;
15
+ isEngravable: boolean;
16
+ partNumber: string;
17
+ price: number;
18
+ stock: number;
19
+ }
20
+ export interface IProductSize {
21
+ id: string;
22
+ upc: string;
23
+ size: string;
24
+ pack: boolean;
25
+ packDesc: string;
26
+ container: string;
27
+ containerType: string;
28
+ image: string;
29
+ uom: string;
30
+ volume: string;
31
+ maxQuantityPerOrder: number;
32
+ attributes: IProductSizeAttributes;
33
+ shippingVariants: Record<string, IProductVariant>;
34
+ onDemandVariants: Record<string, IProductVariant>;
35
+ }
36
+ export interface IProductFulfillmentHourStatus {
37
+ isOpen: boolean;
38
+ openTime: string;
39
+ isClosed: boolean;
40
+ closeTime: string;
41
+ }
42
+ export interface IProduct {
43
+ id: string;
44
+ name: string;
45
+ description: string;
46
+ htmlDescription: string;
47
+ images: string[];
48
+ brand: string;
49
+ region: string;
50
+ country: string;
51
+ material: string;
52
+ abv: string;
53
+ proof: string;
54
+ age: string;
55
+ color: string;
56
+ flavor: string;
57
+ variety: string;
58
+ appellation: string;
59
+ vintage: string;
60
+ tastingNotes: string;
61
+ catPath: string;
62
+ category: string;
63
+ classification: string;
64
+ type: string;
65
+ subType: string;
66
+ salsifyGrouping: string;
67
+ noAvailabilityPrice: number;
68
+ sizes: Record<string, IProductSize>;
69
+ }
70
+ export interface IFulfillment {
71
+ id: string;
72
+ type: FulfillmentType;
73
+ doesAllowGiftCards: boolean;
74
+ doesAllowPromos: boolean;
75
+ expectation: string;
76
+ engravingExpectation: string;
77
+ fee: number;
78
+ timezone: string;
79
+ hourStatus: IProductFulfillmentHourStatus;
80
+ }
81
+ export type IRetailerAddress = IAddressAddress & IAddressCoordinates;
82
+ export interface IRetailer {
83
+ id: string;
84
+ name: string;
85
+ address: IRetailerAddress;
86
+ addressFormatted: string;
87
+ shippingFulfillment: IFulfillment | null;
88
+ onDemandFulfillment: IFulfillment | null;
89
+ }
90
+ export interface IProductSizeEngraving {
91
+ maxLines: number;
92
+ maxCharsPerLine: number;
93
+ fee: number;
94
+ location: string;
95
+ }
96
+ export interface IProductSizeAttributes {
97
+ presale: IProductPresale;
98
+ engraving: IProductSizeEngraving;
99
+ }
100
+ export interface IProductPresale {
101
+ canPurchaseOn: null | string;
102
+ estimatedShipBy: null | string;
103
+ isActive: boolean;
104
+ language: string;
105
+ }
@@ -1,11 +1,11 @@
1
1
  export interface IElementsConfigurations {
2
- googleTagManagerId: string;
3
- enablePartnerGaTracking: boolean;
4
- liquidCommerceGoogleTagManagerId: string;
5
- enableLiquidCommerceGaTracking: boolean;
2
+ isElementsEnabled: boolean;
3
+ enablePartnerGTM: boolean;
4
+ partnerGTMId: string;
5
+ enableLiquidCommerceGTM: boolean;
6
+ liquidCommerceGTMId: string;
6
7
  partnerCode: string;
7
8
  supportEmail: string;
8
9
  builderBackgroundColor: string;
9
10
  partnerName: string;
10
- isElementsEnabled: boolean;
11
11
  }
@@ -4,6 +4,7 @@ import type { IAddressComponent } from './address.interface';
4
4
  import type { ICartComponent } from './cart.interface';
5
5
  import type { ICheckoutComponent } from './checkout.interface';
6
6
  import type { IProductComponent } from './product.interface';
7
+ import type { IProductListComponent } from './product-list.interface';
7
8
  export interface IFontFamily {
8
9
  name: string;
9
10
  weights: number[];
@@ -55,6 +56,7 @@ export interface IAllConfigs {
55
56
  address: IAddressComponent;
56
57
  cart: ICartComponent;
57
58
  checkout: ICheckoutComponent;
59
+ productList: IProductListComponent;
58
60
  }
59
- export type ConfigsKeyType = 'all' | 'configurations' | 'global' | 'product' | 'address' | 'cart' | 'checkout';
60
- export type ConfigsType = IAllConfigs | IElementsConfigurations | IComponentGlobalConfigs | IProductComponent | IAddressComponent | ICartComponent | ICheckoutComponent;
61
+ export type ConfigsKeyType = 'all' | 'configurations' | 'global' | 'product' | 'address' | 'cart' | 'checkout' | 'productList';
62
+ export type ConfigsType = IAllConfigs | IElementsConfigurations | IComponentGlobalConfigs | IProductComponent | IAddressComponent | ICartComponent | ICheckoutComponent | IProductListComponent;
@@ -4,3 +4,4 @@ export * from './checkout.interface';
4
4
  export * from './configurations.interface';
5
5
  export * from './global.interface';
6
6
  export * from './product.interface';
7
+ export * from './product-list.interface';
@@ -0,0 +1,25 @@
1
+ import type { DeepPartial } from '@/interfaces/core.interface';
2
+ export type ProductListCardStyle = 'card' | 'ghost';
3
+ export type ProductListCardCornerRadius = 'rounded' | 'sharp';
4
+ export interface IProductListTheme {
5
+ backgroundColor: string;
6
+ }
7
+ export interface IProductListLayout {
8
+ productCard: {
9
+ style: ProductListCardStyle;
10
+ cornerRadius: ProductListCardCornerRadius;
11
+ showPrice: boolean;
12
+ showSizeSelector: boolean;
13
+ showFulfillment: boolean;
14
+ showQuantityCounter: boolean;
15
+ enableShippingFulfillment: boolean;
16
+ enableOnDemandFulfillment: boolean;
17
+ showCollections: boolean;
18
+ enablePersonalization: boolean;
19
+ };
20
+ }
21
+ export interface IProductListComponent {
22
+ theme: IProductListTheme;
23
+ layout: IProductListLayout;
24
+ }
25
+ export type UpdateProductListComponent = DeepPartial<IProductListComponent>;
@@ -2,6 +2,7 @@ import type { DeepPartial } from '@/interfaces/core.interface';
2
2
  export type FulfillmentDisplayType = 'carousel' | 'popup';
3
3
  export interface IProductLayout {
4
4
  showImages: boolean;
5
+ showOnlyMainImage: boolean;
5
6
  showTitle: boolean;
6
7
  showDescription: boolean;
7
8
  showQuantityCounter: boolean;