@liquidcommerce/elements-sdk 2.5.11 → 2.6.0-beta.10

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 (75) hide show
  1. package/README.md +1 -0
  2. package/dist/index.esm.js +10852 -10205
  3. package/dist/types/constants/core.constant.d.ts +11 -0
  4. package/dist/types/core/{api-client.service.d.ts → api/api-client.service.d.ts} +13 -13
  5. package/dist/types/core/{auth.service.d.ts → api/auth-client.service.d.ts} +5 -16
  6. package/dist/types/core/api/http-client.service.d.ts +45 -0
  7. package/dist/types/core/client/client-action.service.d.ts +18 -11
  8. package/dist/types/core/client/client-config.service.d.ts +3 -0
  9. package/dist/types/core/command/base-command.service.d.ts +3 -3
  10. package/dist/types/core/command/common-command.service.d.ts +2 -1
  11. package/dist/types/core/debug-panel/debug-panel.styles.d.ts +1 -1
  12. package/dist/types/core/google-tag-manager.service.d.ts +12 -10
  13. package/dist/types/core/pubsub/interfaces/address.interface.d.ts +3 -12
  14. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +26 -63
  15. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +11 -1
  16. package/dist/types/core/pubsub/interfaces/product.interface.d.ts +16 -81
  17. package/dist/types/core/store/interfaces/address.interface.d.ts +3 -12
  18. package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -54
  19. package/dist/types/core/store/interfaces/checkout.interface.d.ts +4 -2
  20. package/dist/types/core/store/interfaces/core.interface.d.ts +5 -4
  21. package/dist/types/core/store/interfaces/product.interface.d.ts +12 -66
  22. package/dist/types/core/store/store.constant.d.ts +1 -1
  23. package/dist/types/core/telemetry/telemetry.interface.d.ts +0 -1
  24. package/dist/types/elements-base-client.d.ts +4 -4
  25. package/dist/types/enums/cloud.enum.d.ts +20 -0
  26. package/dist/types/enums/core.enum.d.ts +1 -0
  27. package/dist/types/interfaces/api/address.interface.d.ts +28 -0
  28. package/dist/types/interfaces/api/cart.interface.d.ts +91 -0
  29. package/dist/types/interfaces/api/product-list.interface.d.ts +30 -0
  30. package/dist/types/interfaces/api/product.interface.d.ts +106 -0
  31. package/dist/types/interfaces/cloud/checkout.interface.d.ts +14 -10
  32. package/dist/types/interfaces/cloud/index.d.ts +0 -4
  33. package/dist/types/interfaces/cloud/retailer.interface.d.ts +2 -2
  34. package/dist/types/interfaces/configs/configurations.interface.d.ts +5 -5
  35. package/dist/types/interfaces/configs/global.interface.d.ts +1 -0
  36. package/dist/types/interfaces/configs/product.interface.d.ts +1 -0
  37. package/dist/types/interfaces/core.interface.d.ts +1 -0
  38. package/dist/types/modules/address/address.command.d.ts +2 -3
  39. package/dist/types/modules/address/address.interface.d.ts +0 -7
  40. package/dist/types/modules/cart/cart.commands.d.ts +0 -1
  41. package/dist/types/modules/cart/components/cart-body.component.d.ts +2 -1
  42. package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
  43. package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
  44. package/dist/types/modules/product/components/components.d.ts +2 -4
  45. package/dist/types/modules/product/product.commands.d.ts +2 -2
  46. package/dist/types/modules/product-list/components/index.d.ts +2 -0
  47. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +3 -2
  48. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +6 -0
  49. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +1 -0
  50. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-checkbox-filter.components.d.ts +7 -0
  51. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +16 -0
  52. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-price-filter.components.d.ts +22 -0
  53. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.d.ts +16 -0
  54. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +18 -0
  55. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +27 -5
  56. package/dist/types/modules/product-list/product-list.commands.d.ts +3 -2
  57. package/dist/types/modules/product-list/product-list.component.d.ts +13 -5
  58. package/dist/types/modules/product-list/product-list.interface.d.ts +77 -0
  59. package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
  60. package/dist/types/static/icon/chevron-up.icon.d.ts +2 -0
  61. package/dist/types/static/icon/filter.icon.d.ts +2 -0
  62. package/dist/types/static/icon/index.d.ts +1 -0
  63. package/dist/types/utils/helper.d.ts +2 -1
  64. package/docs/THEMING.md +3 -0
  65. package/package.json +5 -6
  66. package/umd/elements.js +1 -1
  67. package/dist/types/core/utils.d.ts +0 -23
  68. package/dist/types/interfaces/cloud/address.interface.d.ts +0 -36
  69. package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
  70. package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -43
  71. package/dist/types/interfaces/cloud/product.interface.d.ts +0 -158
  72. package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -9
  73. package/dist/types/modules/product/utils/helpers.d.ts +0 -3
  74. package/dist/types/modules/product/utils/retailer-hours.d.ts +0 -9
  75. package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
@@ -1,87 +1,23 @@
1
1
  import type { FulfillmentType } from '@/enums';
2
- import type { IAddress, ICoords } from '@/interfaces/cloud';
3
- export interface IBaseProductFulfillmentEventData {
4
- price: number;
5
- partNumber: string;
6
- stock: number;
7
- isEngravable: boolean;
8
- fulfillmentId: string;
9
- fulfillmentType: FulfillmentType;
10
- modalities: FulfillmentType[];
11
- retailerId: string;
2
+ import type { IFulfillment, IProduct, IProductSize, IProductVariant, IRetailerAddress } from '@/interfaces/api/product.interface';
3
+ export type IProductFulfillmentEventData = IFulfillment & {
12
4
  retailerName: string;
13
- retailerAddress: (IAddress & ICoords) | null;
14
- retailerTimezone: string;
15
- }
16
- export interface IBaseProductSizeAttributesEventData {
17
- engraving?: {
18
- status: boolean;
19
- maxLines: number;
20
- maxCharsPerLine: number;
21
- fee: number;
22
- location: string;
23
- };
24
- presale?: {
25
- canPurchaseOn: null | string;
26
- estimatedShipBy: null | string;
27
- isActive: boolean;
28
- language: string;
29
- presaleLimit: number;
30
- price: number;
31
- };
32
- }
33
- export interface IBaseProductSizeEventData {
34
- id: string;
35
- upc: string;
36
- size: string;
37
- pack: boolean;
38
- packDesc: string;
39
- container: string;
40
- containerType: string;
41
- maxQuantityPerOrder: number;
42
- image: string;
43
- uom: string;
44
- volume: string;
45
- attributes: IBaseProductSizeAttributesEventData;
46
- shippingFulfillments: Record<string, IBaseProductFulfillmentEventData>;
47
- onDemandFulfillments: Record<string, IBaseProductFulfillmentEventData>;
48
- }
49
- 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'> {
50
14
  identifier: string;
51
15
  selectedSizeId: string | null;
52
- selectedFulfillmentId: string | null;
53
16
  selectedFulfillmentType: FulfillmentType;
54
- id: string;
55
- name: string;
56
- brand: string;
57
- catPath: string;
58
- category: string;
59
- classification: string;
60
- type: string;
61
- salsifyGrouping: string;
62
- subType: string;
63
- mainImage: string | null;
64
- images: string[];
65
- region: string;
66
- country: string;
67
- material: string;
68
- abv: string;
69
- proof: string;
70
- age: string;
71
- color: string;
72
- flavor: string;
73
- variety: string;
74
- appellation: string;
75
- vintage: string;
76
- description: string;
77
- htmlDescription: string;
78
- tastingNotes: string;
79
- priceInfo: {
80
- min: number;
81
- max: number;
82
- avg: number;
83
- } | null;
84
- sizes: Record<string, IBaseProductSizeEventData>;
17
+ selectedFulfillmentId: string | null;
18
+ productHasAvailability: boolean;
19
+ fulfillmentHasAvailability: boolean;
20
+ sizes: Record<string, IProductSizeEventData>;
85
21
  }
86
22
  export interface IProductLoadedEventData extends IBaseProductEventData {
87
23
  }
@@ -92,7 +28,6 @@ export interface IProductQuantityChangedEventData {
92
28
  }
93
29
  export interface IProductAddToCartEventData {
94
30
  identifier: string;
95
- upc: string;
96
31
  fulfillmentId: string;
97
32
  partNumber: string;
98
33
  quantity: number;
@@ -101,7 +36,7 @@ export interface IProductAddToCartEventData {
101
36
  export interface IProductSizeChangedEventData {
102
37
  identifier: string;
103
38
  selectedSizeId: string;
104
- size: string;
39
+ selectedSize: string;
105
40
  previousSizeId: string;
106
41
  previousSize: string;
107
42
  }
@@ -1,16 +1,7 @@
1
+ import type { IAddressAddress, IAddressCoordinates } from '@/interfaces/api/address.interface';
1
2
  export interface IAddressStore {
2
3
  id: string;
3
4
  formattedAddress: string;
4
- address: {
5
- one: string;
6
- two: string;
7
- city: string;
8
- state: string;
9
- zip: string;
10
- country: string;
11
- };
12
- coordinates: {
13
- lat: number;
14
- long: number;
15
- };
5
+ address: IAddressAddress;
6
+ coordinates: IAddressCoordinates;
16
7
  }
@@ -1,6 +1,5 @@
1
1
  import type { IElementsCartEvent } from 'utils/helper';
2
- import type { FulfillmentType } from '@/enums';
3
- import type { IAddress, ICartItemAttributes, IRetailerExpectation, IRetailerFees } from '@/interfaces/cloud';
2
+ import type { ICartFulfillment, ICartItemAttributes, ICartPromoCode, ICartRetailer } from '@/interfaces/api/cart.interface';
4
3
  export interface ICartItemStore {
5
4
  id: string;
6
5
  variantId: string;
@@ -31,64 +30,27 @@ export interface ICartItemStore {
31
30
  updating: boolean;
32
31
  error: string | null;
33
32
  }
34
- export interface ICartTotalsStore {
35
- subtotal: number;
36
- total: number;
37
- shippingFee: number;
38
- platformFee: number;
39
- giftCardTotal: number;
40
- engravingFee: number;
41
- deliveryFee: number;
42
- discounts: number;
43
- quantity: number;
33
+ export interface ICartFulfillmentStore extends ICartFulfillment {
34
+ loading: boolean;
35
+ error: string | null;
36
+ updating: boolean;
44
37
  }
45
- export interface IRetailerFulfillmentStore {
46
- id: string;
47
- canEngrave: boolean;
48
- type: FulfillmentType;
49
- fees: IRetailerFees;
50
- expectation: IRetailerExpectation;
51
- shippingFee: number;
52
- subtotal: number;
53
- items: string[];
54
- engravingFee: number;
55
- deliveryFee: number;
56
- retailerId: string;
57
- loading?: boolean;
58
- error?: string | null;
59
- updating?: boolean;
38
+ export interface ICartRetailerStore extends ICartRetailer {
39
+ loading: boolean;
40
+ error: string | null;
41
+ updating: boolean;
60
42
  }
61
- export interface IRetailerStore {
43
+ export interface ICartStore {
62
44
  id: string;
63
- name: string;
64
- platformFee: number;
65
- shippingFee: number;
66
45
  subtotal: number;
67
- address?: IAddress;
68
- deliveryFee: number;
69
- engravingFee: number;
70
- total: number;
71
- fulfillments: string[];
72
- loading?: boolean;
73
- error?: string | null;
74
- updating?: boolean;
75
- }
76
- export interface ICartPromoCodeStore {
77
- code: string;
78
- discountAmount: number;
79
- }
80
- export interface ICartStore {
81
- id: string | null;
46
+ itemsQuantity: number;
47
+ items: Record<string, ICartItemStore>;
48
+ fulfillments: Record<string, ICartFulfillmentStore>;
49
+ retailers: Record<string, ICartRetailerStore>;
50
+ promoCode: ICartPromoCode | null;
51
+ events: IElementsCartEvent[];
82
52
  loading: boolean;
83
53
  error: string | null;
84
- items: Record<string, ICartItemStore>;
85
- totals: ICartTotalsStore;
86
- retailers: Record<string, IRetailerStore>;
87
- promoCode: ICartPromoCodeStore | null;
88
- fulfillments: Record<string, IRetailerFulfillmentStore>;
89
54
  rerender: boolean;
90
55
  shouldReset: boolean;
91
- updatedAt: string;
92
- createdAt: string;
93
- events: IElementsCartEvent[];
94
56
  }
@@ -1,5 +1,5 @@
1
1
  import type { IElementsCheckoutEvents } from 'utils/helper';
2
- import type { ICartItemAttributes, ICheckoutTotalAmounts } from '@/interfaces/cloud';
2
+ import type { ICartItemAttributes } from '@/interfaces/api/cart.interface';
3
3
  export interface ICheckoutMarketingPreferencesStore {
4
4
  canEmail: boolean;
5
5
  canSms: boolean;
@@ -101,6 +101,8 @@ export interface ICheckoutBillingStore {
101
101
  export interface ICheckoutPaymentCardStore {
102
102
  brand: string;
103
103
  last4: string;
104
+ expMonth: string;
105
+ expYear: string;
104
106
  }
105
107
  export interface ICheckoutPaymentMethodStore {
106
108
  id: string;
@@ -132,7 +134,7 @@ export interface ICheckoutStore {
132
134
  promoCode: ICheckoutPromoCodeStore | null;
133
135
  giftCards: ICheckoutGiftCardStore[];
134
136
  items: Record<string, ICheckoutItemStore>;
135
- amounts: ICheckoutTotalAmounts;
137
+ amounts: any;
136
138
  orderNumber: string | null;
137
139
  onDemandFulfillmentTipInfo: Record<string, IOnDemandFulfillmentTipInfo>;
138
140
  tipSelection: number;
@@ -1,8 +1,9 @@
1
1
  import type { IAddressStore } from '@/core/store/interfaces/address.interface';
2
+ import type { ICartFulfillmentStore, ICartItemStore, ICartRetailerStore, ICartStore } from '@/core/store/interfaces/cart.interface';
2
3
  import type { ICheckoutCustomerFormStore, ICheckoutGiftRecipientFormStore, ICheckoutGiftRecipientStore, ICheckoutItemStore, ICheckoutMarketingPreferencesStore, ICheckoutPaymentFormStore, ICheckoutPaymentMethodStore, ICheckoutPaymentSessionStore, ICheckoutPresaleStore, ICheckoutPromoCodeStore, ICheckoutStore } from '@/core/store/interfaces/checkout.interface';
3
4
  import type { IProductSizeStore, IProductStore } from '@/core/store/interfaces/product.interface';
4
5
  import type { ComponentType } from '@/enums';
5
- import type { ICartItemStore, ICartPromoCodeStore, ICartStore, ICartTotalsStore, IRetailerFulfillmentStore, IRetailerStore } from './cart.interface';
6
+ import type { ICartPromoCode } from '@/interfaces/api/cart.interface';
6
7
  export interface IDrawerContentConfig {
7
8
  type: ComponentType;
8
9
  data?: Record<string, any>;
@@ -15,17 +16,17 @@ export interface IUIStore {
15
16
  drawer: IDrawerStore;
16
17
  }
17
18
  export interface IGlobalStore {
18
- cart: ICartStore;
19
19
  address: IAddressStore;
20
+ products: Record<string, IProductStore>;
21
+ cart: ICartStore;
20
22
  checkout: ICheckoutStore;
21
23
  ui: IUIStore;
22
- products: Record<string, IProductStore>;
23
24
  }
24
25
  export interface IPersistedStore {
25
26
  p?: string;
26
27
  c?: string;
27
28
  }
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}`;
29
+ 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 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}`;
29
30
  interface MiddlewareContext {
30
31
  action: string;
31
32
  payload: any;
@@ -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,31 @@ 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
+ };
17
+ export interface IProductSizeStore extends Omit<IProductSize, 'shippingVariants' | 'onDemandVariants'> {
42
18
  onDemandFulfillments: Record<string, IProductFulfillmentStore>;
43
19
  shippingFulfillments: Record<string, IProductFulfillmentStore>;
44
20
  loading: boolean;
45
21
  error: string | null;
46
22
  }
47
- export interface IProductStore {
23
+ export interface IProductStore extends Omit<IProduct, 'sizes'> {
48
24
  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
25
  sizes: Record<string, IProductSizeStore>;
81
- productHasAvailability: boolean;
26
+ quantity: number;
82
27
  selectedSizeId: string | null;
83
28
  selectedFulfillmentType: FulfillmentType;
84
29
  selectedFulfillmentId: string | null;
85
30
  selectedFulfillment: IProductFulfillmentStore | null;
31
+ productHasAvailability: boolean;
86
32
  fulfillmentHasAvailability: boolean;
33
+ drawer: IProductDrawerStore;
87
34
  loading: boolean;
88
35
  updating: boolean;
89
- error: string | null;
90
- drawer: IProductDrawerStore;
91
36
  rerender: boolean;
37
+ error: string | null;
92
38
  }
@@ -4,9 +4,9 @@ import type { ICheckoutStore } from '@/core/store/interfaces/checkout.interface'
4
4
  import type { IGlobalStore, IUIStore } from '@/core/store/interfaces/core.interface';
5
5
  import type { IProductStore } from '@/core/store/interfaces/product.interface';
6
6
  export declare const LOCAL_STORAGE_PREFIX = "lce";
7
+ export declare const initialAddressState: IAddressStore;
7
8
  export declare const initialProductState: IProductStore;
8
9
  export declare const initialCartState: ICartStore;
9
10
  export declare const initialCheckoutState: ICheckoutStore;
10
11
  export declare const initialUIState: IUIStore;
11
- export declare const initialAddressState: IAddressStore;
12
12
  export declare const initialStoreState: IGlobalStore;
@@ -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;
@@ -1,5 +1,5 @@
1
- import { ApiClientService } from '@/core/api-client.service';
2
- import { AuthService } from '@/core/auth.service';
1
+ import { ApiClientService } from '@/core/api/api-client.service';
2
+ import { AuthClientService } from '@/core/api/auth-client.service';
3
3
  import { ClientActionService } from '@/core/client/client-action.service';
4
4
  import { ClientConfigService, type IClientConfigs } from '@/core/client/client-config.service';
5
5
  import { CommandService } from '@/core/command/command.service';
@@ -10,10 +10,10 @@ 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, IInjectProductListParams, 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
- protected readonly authService: AuthService;
16
+ protected readonly authClient: AuthClientService;
17
17
  protected readonly clientConfig: ClientConfigService;
18
18
  protected readonly store: StoreService;
19
19
  protected readonly commands: CommandService;
@@ -75,3 +75,23 @@ export declare const ENUM_ADDRESS_TYPE: {
75
75
  readonly BILLING: "billing";
76
76
  };
77
77
  export type AddressType = (typeof ENUM_ADDRESS_TYPE)[keyof typeof ENUM_ADDRESS_TYPE];
78
+ export declare const ENUM_FILTER_KEYS: {
79
+ readonly BRANDS: "brands";
80
+ readonly FLAVOR: "flavor";
81
+ readonly FULFILLMENT: "fulfillment";
82
+ readonly TAGS: "tags";
83
+ readonly REGION: "region";
84
+ readonly VARIETY: "variety";
85
+ readonly ENGRAVING: "engraving";
86
+ readonly PRICE: "price";
87
+ readonly PRESALE: "presale";
88
+ readonly AVAILABILITY: "availability";
89
+ readonly CATEGORIES: "categories";
90
+ readonly SIZES: "sizes";
91
+ readonly COLORS: "colors";
92
+ readonly APPELLATION: "appellation";
93
+ readonly COUNTRY: "country";
94
+ readonly VINTAGE: "vintage";
95
+ readonly MATERIALS: "materials";
96
+ readonly COLLECTION_TAGS: "collectionTags";
97
+ };
@@ -95,6 +95,7 @@ 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";
99
100
  readonly CART: "cart";
100
101
  readonly CART_RETAILER: "cart-retailer";
@@ -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,91 @@
1
+ import type { CartEventEnum, 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
+ itemIds: string[];
23
+ subtotal: number;
24
+ hasUnmetMinimumPurchaseAmount: boolean;
25
+ minimumPurchaseAmount: number;
26
+ }
27
+ export interface ICartRetailer {
28
+ id: string;
29
+ name: string;
30
+ subtotal: number;
31
+ itemsQuantity: number;
32
+ fulfillments: Record<string, ICartFulfillment>;
33
+ }
34
+ export interface ICartItemAttributes {
35
+ engraving: ICartItemEngraving;
36
+ presale: IProductPresale;
37
+ }
38
+ export interface ICartItem {
39
+ id: string;
40
+ variantId: string;
41
+ liquidId: string;
42
+ retailerId: string;
43
+ partNumber: string;
44
+ fulfillmentId: string;
45
+ upc: string;
46
+ sku: string;
47
+ salsifyGrouping: string;
48
+ catPath: string;
49
+ volume: string;
50
+ uom: string;
51
+ pack: boolean;
52
+ packDesc: string;
53
+ container: string;
54
+ containerType: string;
55
+ name: string;
56
+ brand: string;
57
+ size: string;
58
+ price: number;
59
+ quantity: number;
60
+ maxQuantity: number;
61
+ unitPrice: number;
62
+ mainImage: string;
63
+ attributes: ICartItemAttributes;
64
+ }
65
+ export interface ICartPromoCode {
66
+ code: string;
67
+ discountAmount: number;
68
+ }
69
+ export interface ICart {
70
+ id: string;
71
+ subtotal: number;
72
+ itemsQuantity: number;
73
+ items: Record<string, ICartItem>;
74
+ retailers: Record<string, ICartRetailer>;
75
+ promoCode: ICartPromoCode | null;
76
+ events: ICartEvent[];
77
+ }
78
+ export interface ICartItemEngraving {
79
+ isEngravable: boolean;
80
+ hasEngraving: boolean;
81
+ fee: number;
82
+ maxCharsPerLine: number;
83
+ maxLines: number;
84
+ location: string;
85
+ lines: string[];
86
+ }
87
+ export interface ICartEvent {
88
+ type: CartEventEnum;
89
+ message: string;
90
+ items?: Array<Partial<ICartItem>>;
91
+ }
@@ -0,0 +1,30 @@
1
+ import type { ENUM_FILTER_KEYS } from '@/enums';
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?: Array<Record<any, any>>;
11
+ }
12
+ export type FacetFilterKeys = typeof ENUM_FILTER_KEYS.BRANDS | typeof ENUM_FILTER_KEYS.FLAVOR | typeof ENUM_FILTER_KEYS.REGION | typeof ENUM_FILTER_KEYS.VARIETY | typeof ENUM_FILTER_KEYS.ENGRAVING | typeof ENUM_FILTER_KEYS.PRESALE | typeof ENUM_FILTER_KEYS.PRICE | typeof ENUM_FILTER_KEYS.AVAILABILITY | typeof ENUM_FILTER_KEYS.CATEGORIES | typeof ENUM_FILTER_KEYS.SIZES | typeof ENUM_FILTER_KEYS.COLORS | typeof ENUM_FILTER_KEYS.APPELLATION | typeof ENUM_FILTER_KEYS.COUNTRY | typeof ENUM_FILTER_KEYS.VINTAGE | typeof ENUM_FILTER_KEYS.MATERIALS | typeof ENUM_FILTER_KEYS.TAGS;
13
+ export interface IFilterSchema {
14
+ category: FacetFilterKeys;
15
+ values: IFilterValue[];
16
+ }
17
+ export interface IFilterValue {
18
+ value: string;
19
+ formattedValue: string;
20
+ count: number;
21
+ }
22
+ export interface INavigationResponse {
23
+ currentPage: number;
24
+ totalPages: number;
25
+ totalCount: number;
26
+ filters: IFilterSchema[];
27
+ }
28
+ export interface IProductSearchResponse extends IProductAvailabilityResponse {
29
+ navigation: INavigationResponse;
30
+ }