@liquidcommerce/elements-sdk 2.6.0-beta.2 → 2.6.0-beta.21

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 (88) hide show
  1. package/README.md +7 -7
  2. package/dist/index.esm.js +11602 -11122
  3. package/dist/types/constants/core.constant.d.ts +11 -0
  4. package/dist/types/core/api/api-client.service.d.ts +15 -15
  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/pubsub/interfaces/address.interface.d.ts +3 -12
  13. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +27 -64
  14. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +44 -50
  15. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +5 -4
  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 -55
  19. package/dist/types/core/store/interfaces/checkout.interface.d.ts +16 -107
  20. package/dist/types/core/store/interfaces/core.interface.d.ts +7 -5
  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 +1 -1
  25. package/dist/types/enums/cloud.enum.d.ts +19 -76
  26. package/dist/types/enums/core.enum.d.ts +25 -0
  27. package/dist/types/interfaces/api/address.interface.d.ts +28 -0
  28. package/dist/types/interfaces/api/cart.interface.d.ts +95 -0
  29. package/dist/types/interfaces/api/checkout.interface.d.ts +213 -0
  30. package/dist/types/interfaces/api/product-list.interface.d.ts +30 -0
  31. package/dist/types/interfaces/api/product.interface.d.ts +106 -0
  32. package/dist/types/interfaces/configs/configurations.interface.d.ts +5 -5
  33. package/dist/types/interfaces/configs/product.interface.d.ts +1 -0
  34. package/dist/types/interfaces/core.interface.d.ts +7 -1
  35. package/dist/types/modules/address/address.command.d.ts +3 -3
  36. package/dist/types/modules/address/address.interface.d.ts +0 -7
  37. package/dist/types/modules/cart/cart.commands.d.ts +4 -5
  38. package/dist/types/modules/cart/components/cart-body.component.d.ts +2 -1
  39. package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
  40. package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
  41. package/dist/types/modules/checkout/checkout.commands.d.ts +18 -9
  42. package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
  43. package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
  44. package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +14 -1
  45. package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
  46. package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +2 -2
  47. package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
  48. package/dist/types/modules/checkout/constant.d.ts +3 -0
  49. package/dist/types/modules/product/components/components.d.ts +2 -4
  50. package/dist/types/modules/product/product.commands.d.ts +3 -2
  51. package/dist/types/modules/product-list/components/index.d.ts +2 -0
  52. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +3 -2
  53. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +6 -0
  54. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +1 -0
  55. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-checkbox-filter.components.d.ts +7 -0
  56. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +16 -0
  57. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-price-filter.components.d.ts +22 -0
  58. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.d.ts +16 -0
  59. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +18 -0
  60. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +27 -5
  61. package/dist/types/modules/product-list/product-list.commands.d.ts +4 -2
  62. package/dist/types/modules/product-list/product-list.component.d.ts +13 -5
  63. package/dist/types/modules/product-list/product-list.interface.d.ts +77 -0
  64. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +1 -0
  65. package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
  66. package/dist/types/static/icon/chevron-up.icon.d.ts +2 -0
  67. package/dist/types/static/icon/filter.icon.d.ts +2 -0
  68. package/dist/types/static/icon/index.d.ts +1 -0
  69. package/dist/types/utils/format.d.ts +0 -13
  70. package/docs/ACTIONS.md +13 -13
  71. package/docs/EVENTS.md +7 -7
  72. package/package.json +8 -9
  73. package/umd/elements.js +1 -1
  74. package/dist/types/interfaces/cloud/address.interface.d.ts +0 -36
  75. package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
  76. package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -43
  77. package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -214
  78. package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
  79. package/dist/types/interfaces/cloud/index.d.ts +0 -7
  80. package/dist/types/interfaces/cloud/product.interface.d.ts +0 -158
  81. package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
  82. package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
  83. package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -9
  84. package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
  85. package/dist/types/modules/product/utils/helpers.d.ts +0 -3
  86. package/dist/types/modules/product/utils/retailer-hours.d.ts +0 -9
  87. package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
  88. package/dist/types/utils/helper.d.ts +0 -27
@@ -1,36 +0,0 @@
1
- import type { ICoreParams } from './core.interface';
2
- export interface IAddress {
3
- id?: string;
4
- one: string;
5
- two: string;
6
- city: string;
7
- state: string;
8
- zip: string;
9
- country?: string;
10
- }
11
- export interface ICoords {
12
- lat: number;
13
- long: number;
14
- }
15
- export interface ILoc {
16
- address?: IAddress;
17
- coords?: ICoords;
18
- }
19
- export interface ILocBase extends ICoreParams {
20
- loc?: ILoc;
21
- }
22
- export interface IAddressAutocompleteParams extends ICoreParams {
23
- input: string;
24
- }
25
- export interface IAddressAutocompleteResult {
26
- id: string;
27
- description: string;
28
- }
29
- export interface IAddressDetailsParams extends ICoreParams {
30
- id: string;
31
- }
32
- export interface IAddressDetailsResult {
33
- formattedAddress: string;
34
- coords: ICoords;
35
- address: Omit<IAddress, 'id'>;
36
- }
@@ -1,132 +0,0 @@
1
- import type { CartEventEnum } from '@/enums';
2
- import type { ILoc, ILocBase } from './address.interface';
3
- import type { IProduct, IProductPresale } from './product.interface';
4
- import type { IRetailer } from './retailer.interface';
5
- export interface ICartItemEngraving {
6
- isEngravable: boolean;
7
- hasEngraving: boolean;
8
- fee: number;
9
- maxCharsPerLine: number;
10
- maxLines: number;
11
- location: string;
12
- lines: string[];
13
- }
14
- export interface ICartItemGiftCart {
15
- sender: string;
16
- message: string;
17
- recipients: string[];
18
- sendDate: string;
19
- }
20
- export interface ICartItemAttributes {
21
- engraving: ICartItemEngraving;
22
- presale: IProductPresale;
23
- giftCard: ICartItemGiftCart;
24
- }
25
- export interface ICartItem extends Partial<Omit<IProduct, 'attributes'>> {
26
- id: string;
27
- retailerId: string;
28
- fulfillmentId: string;
29
- variantId: string;
30
- liquidId: string;
31
- salsifyGrouping: string;
32
- salsifyPid?: string;
33
- partNumber: string;
34
- upc: string;
35
- sku: string;
36
- name: string;
37
- brand: string;
38
- size: string;
39
- volume: string;
40
- uom: string;
41
- abv: string;
42
- proof: string;
43
- catPath: string;
44
- pack: boolean;
45
- packDesc: string;
46
- container: string;
47
- containerType: string;
48
- quantity: number;
49
- maxQuantity: number;
50
- unitPrice: number;
51
- price: number;
52
- scheduledFor: string | Date;
53
- availableAt: string | Date;
54
- images: string[];
55
- mainImage: string;
56
- attributes: ICartItemAttributes;
57
- }
58
- export interface ICartAttributesPromoCode {
59
- value: string;
60
- discount: number;
61
- freeDelivery: boolean;
62
- freeServiceFee: boolean;
63
- freeShipping: boolean;
64
- }
65
- export interface ICartAttributesAmountsFees {
66
- shipping: number;
67
- onDemand: number;
68
- }
69
- export interface ICartAttributesAmountsDiscounts {
70
- shipping: number;
71
- onDemand: number;
72
- engraving: number;
73
- service: number;
74
- products: number;
75
- }
76
- export interface ICartAttributesAmounts {
77
- fees: ICartAttributesAmountsFees;
78
- discounts: ICartAttributesAmountsDiscounts;
79
- }
80
- export interface ICartAttributes {
81
- promoCode: ICartAttributesPromoCode;
82
- amounts: ICartAttributesAmounts;
83
- }
84
- export interface ICartRetailer extends IRetailer {
85
- platformFee: number;
86
- engravingFee: number;
87
- deliveryFee: number;
88
- shippingFee: number;
89
- subtotal: number;
90
- total: number;
91
- }
92
- export interface ICartEvent {
93
- type: CartEventEnum;
94
- message: string;
95
- items?: Array<Partial<ICartItem>>;
96
- }
97
- export interface ICart {
98
- id: string;
99
- quantity: number;
100
- platformFee: number;
101
- deliveryFee: number;
102
- engravingFee: number;
103
- shippingFee: number;
104
- discounts: number;
105
- giftCardTotal: number;
106
- subtotal: number;
107
- total: number;
108
- isPresaleLocked: boolean;
109
- presaleExpiresAt: string | null;
110
- createdAt: string | Date;
111
- updatedAt: string | Date;
112
- items: ICartItem[];
113
- loc: ILoc;
114
- retailers: ICartRetailer[];
115
- attributes: ICartAttributes;
116
- events: ICartEvent[];
117
- }
118
- export interface ICartUpdateItem {
119
- id?: string;
120
- upc?: string;
121
- partNumber: string;
122
- sku?: string;
123
- quantity: number;
124
- fulfillmentId: string;
125
- engravingLines?: string[];
126
- scheduledFor?: string | Date;
127
- }
128
- export interface ICartUpdateParams extends ILocBase {
129
- id: string;
130
- items: ICartUpdateItem[];
131
- promoCode?: string;
132
- }
@@ -1,43 +0,0 @@
1
- import type { IProduct } from '@/interfaces/cloud/product.interface';
2
- import type { ILocBase } from './address.interface';
3
- import type { IRetailer } from './retailer.interface';
4
- export declare enum ENUM_NAVIGATION_ORDER_DIRECTION_TYPE {
5
- ASC = "asc",
6
- DESC = "desc"
7
- }
8
- export declare enum ENUM_ORDER_BY {
9
- PRICE = "price"
10
- }
11
- export interface ICatalogParams extends ILocBase {
12
- search?: string;
13
- pageToken?: string;
14
- entity?: string;
15
- page?: number;
16
- perPage?: number;
17
- visitorId?: string;
18
- retailers?: string[];
19
- orderBy?: ENUM_ORDER_BY;
20
- orderDirection?: ENUM_NAVIGATION_ORDER_DIRECTION_TYPE;
21
- filters?: Array<Record<any, any>>;
22
- }
23
- export interface ICatalog {
24
- retailers?: IRetailer[];
25
- products?: IProduct[];
26
- navigation?: INavigationSchema;
27
- }
28
- export interface ICursorSchema {
29
- nextPageToken: string;
30
- previousPageToken: string;
31
- }
32
- export interface INavigationSchema {
33
- id: string;
34
- correctedQuery: string;
35
- attributionToken: string;
36
- currentPage: number;
37
- totalPages: number;
38
- totalCount: number;
39
- availableOrderBy: ENUM_ORDER_BY[];
40
- availableOrderDirection: ENUM_NAVIGATION_ORDER_DIRECTION_TYPE[];
41
- cursor: ICursorSchema;
42
- filters: any[];
43
- }
@@ -1,214 +0,0 @@
1
- import type { CheckoutEventEnum } from '@/enums';
2
- import type { ICoreParams } from '@/interfaces/cloud/core.interface';
3
- import type { IAddress } from './address.interface';
4
- import type { ICartAttributesPromoCode, ICartItemAttributes } from './cart.interface';
5
- import type { IRetailerExpectation } from './retailer.interface';
6
- export interface ICheckoutRecipient {
7
- firstName?: string;
8
- lastName?: string;
9
- email?: string;
10
- phone?: string;
11
- birthDate?: string;
12
- hasAgeVerify?: boolean;
13
- }
14
- export interface IBillingAddress {
15
- firstName?: string;
16
- lastName?: string;
17
- email?: string;
18
- phone?: string;
19
- one?: string;
20
- two?: string;
21
- city?: string;
22
- state?: string;
23
- zip?: string;
24
- country?: string;
25
- }
26
- export interface ICheckoutCustomer {
27
- id?: string;
28
- email?: string;
29
- firstName?: string;
30
- lastName?: string;
31
- company?: string;
32
- phone?: string;
33
- profileImage?: string;
34
- birthDate?: string;
35
- hasAgeVerify?: boolean;
36
- createdAt?: Date;
37
- updatedAt?: Date;
38
- }
39
- interface ICheckoutBaseAddress {
40
- id?: string;
41
- one?: string;
42
- two?: string;
43
- city?: string;
44
- state?: string;
45
- zip?: string;
46
- country?: string;
47
- }
48
- export type ICheckoutBillingAddress = ICheckoutBaseAddress & Omit<ICheckoutCustomer, 'birthDate' | 'id' | 'createdAt' | 'hasAgeVerify' | 'updatedAt' | 'profileImage'>;
49
- export interface ICheckoutGiftOptionsRecipient {
50
- name?: string;
51
- email?: string;
52
- phone?: string;
53
- }
54
- export interface ICheckoutGiftOptions {
55
- message?: string;
56
- recipient?: ICheckoutGiftOptionsRecipient;
57
- }
58
- export interface ICheckoutMarketingPreferences {
59
- canEmail?: boolean;
60
- canSms?: boolean;
61
- }
62
- export interface ICheckoutDeliveryTip {
63
- fulfillmentId: string;
64
- tip: number;
65
- }
66
- export interface ICheckoutDeliveryInstructions {
67
- fulfillmentId: string;
68
- instructions: string;
69
- }
70
- export interface ICheckoutPrepareParams extends ICoreParams {
71
- cartId: string;
72
- customer?: ICheckoutCustomer | string;
73
- recipient?: ICheckoutRecipient;
74
- hasAgeVerify?: boolean;
75
- shippingAddressTwo?: string;
76
- billingAddress?: ICheckoutBillingAddress | IBillingAddress;
77
- hasSubstitutionPolicy?: boolean;
78
- isGift?: boolean;
79
- billingSameAsShipping?: boolean;
80
- giftOptions?: ICheckoutGiftOptions;
81
- marketingPreferences?: ICheckoutMarketingPreferences;
82
- deliveryTips?: ICheckoutDeliveryTip[];
83
- deliveryInstructions?: ICheckoutDeliveryInstructions[];
84
- acceptedAccountCreation?: boolean;
85
- scheduledDelivery?: string;
86
- payment?: string;
87
- promoCode?: string;
88
- giftCards?: string[];
89
- }
90
- export interface ICheckoutTotalAmountsDiscounts {
91
- products: number;
92
- delivery: number;
93
- shipping: number;
94
- engraving: number;
95
- service: number;
96
- }
97
- export interface ICheckoutTotalAmountsTaxes {
98
- bag: number;
99
- bottleDeposits: number;
100
- retailDelivery: number;
101
- products: number;
102
- delivery: number;
103
- shipping: number;
104
- }
105
- export interface ICheckoutTotalAmountsDetails {
106
- taxes: ICheckoutTotalAmountsTaxes;
107
- discounts: ICheckoutTotalAmountsDiscounts;
108
- }
109
- export interface ICheckoutTotalAmounts {
110
- subtotal: number;
111
- engraving: number;
112
- service: number;
113
- shipping: number;
114
- delivery: number;
115
- platform: number;
116
- discounts: number;
117
- giftCards: number;
118
- tax: number;
119
- tip: number;
120
- total: number;
121
- details: ICheckoutTotalAmountsDetails;
122
- }
123
- export interface ICheckoutFulfillment extends ICheckoutTotalAmounts {
124
- id: string;
125
- scheduledFor?: string | Date;
126
- type: 'shipping' | 'onDemand';
127
- expectation: IRetailerExpectation;
128
- items: string[];
129
- }
130
- export interface ICheckoutRetailer extends ICheckoutTotalAmounts {
131
- id: string;
132
- name: string;
133
- address?: IAddress;
134
- fulfillments: ICheckoutFulfillment[];
135
- }
136
- export interface ICheckoutItem {
137
- variantId: string;
138
- cartItemId: string;
139
- liquidId: string;
140
- retailerId: string;
141
- fulfillmentId: string;
142
- salsifyPid?: string;
143
- salsifyGrouping: string;
144
- name: string;
145
- catPath: string;
146
- volume: string;
147
- uom: string;
148
- proof: string;
149
- abv: string;
150
- containerType: string;
151
- container: string;
152
- size: string;
153
- pack: boolean;
154
- packDesc: string;
155
- mainImage: string;
156
- image: string;
157
- brand: string;
158
- partNumber: string;
159
- upc: string;
160
- sku: string;
161
- price: number;
162
- unitPrice: number;
163
- quantity: number;
164
- tax: number;
165
- unitTax: number;
166
- bottleDeposits: number;
167
- attributes: ICartItemAttributes;
168
- }
169
- export interface ICheckoutGiftCard {
170
- code: string;
171
- applied: number;
172
- balance: number;
173
- }
174
- export interface ICheckoutEvents {
175
- type: CheckoutEventEnum;
176
- message: string;
177
- }
178
- export interface ICheckoutPrepareResponse {
179
- token: string;
180
- cartId: string;
181
- customer: ICheckoutCustomer;
182
- hasAgeVerify: boolean;
183
- hasSubstitutionPolicy: boolean;
184
- isGift: boolean;
185
- createdAt: string;
186
- updatedAt: string;
187
- billingSameAsShipping: boolean;
188
- acceptedAccountCreation?: boolean;
189
- giftOptions: ICheckoutGiftOptions;
190
- marketingPreferences: ICheckoutMarketingPreferences;
191
- shippingAddress: IAddress;
192
- billingAddress: ICheckoutBillingAddress;
193
- amounts: ICheckoutTotalAmounts;
194
- items: ICheckoutItem[];
195
- retailers: ICheckoutRetailer[];
196
- payment?: string;
197
- giftCards: ICheckoutGiftCard[];
198
- events: ICheckoutEvents[];
199
- promoCode: ICartAttributesPromoCode;
200
- isPresaleLocked: boolean;
201
- presaleExpiresAt: string | null;
202
- }
203
- export interface ICheckoutCompleteParams extends ICoreParams {
204
- token: string;
205
- payment: string;
206
- }
207
- export interface ICheckoutCompleteResponse {
208
- order: {
209
- number: string;
210
- legacyOrderNumber: string;
211
- referenceId: string;
212
- };
213
- }
214
- export {};
@@ -1,22 +0,0 @@
1
- export interface ICoreParams {
2
- refresh?: boolean;
3
- isLean?: boolean;
4
- isLegacy?: boolean;
5
- }
6
- export interface ILiquidPaymentToken {
7
- id?: string;
8
- type?: string;
9
- card?: {
10
- brand: string | null;
11
- country: string | null;
12
- expMonth: number | null;
13
- expYear: number | null;
14
- last4: string | null;
15
- funding: string | null;
16
- };
17
- created?: number;
18
- error?: {
19
- message: string;
20
- code?: string;
21
- };
22
- }
@@ -1,7 +0,0 @@
1
- export * from './address.interface';
2
- export * from './cart.interface';
3
- export * from './catalog.interface';
4
- export * from './checkout.interface';
5
- export * from './core.interface';
6
- export * from './product.interface';
7
- export * from './retailer.interface';
@@ -1,158 +0,0 @@
1
- import type { FulfillmentType } from '@/enums';
2
- import type { ILocBase } from './address.interface';
3
- import type { IRetailer } from './retailer.interface';
4
- export interface IAvailabilityParams extends ILocBase {
5
- upcs?: string[];
6
- grouping?: string[];
7
- ids?: string[];
8
- shouldShowOffHours?: boolean;
9
- }
10
- export interface IAvailabilityResponse {
11
- products: IProduct[];
12
- retailers: IRetailer[];
13
- }
14
- export interface IAttributesImage {
15
- backOfBottle: string;
16
- frontOfBottle: string;
17
- lifestyle: string[];
18
- }
19
- export interface IAttributesAward {
20
- image: string;
21
- statement: string;
22
- title: string;
23
- }
24
- export interface IAttributesRecipeIngredient {
25
- name: string;
26
- amount: string;
27
- }
28
- export interface IAttributesRecipe {
29
- image: string;
30
- ingredients: IAttributesRecipeIngredient[];
31
- steps: string[];
32
- title: string;
33
- }
34
- export interface IAttributesVideo {
35
- link: string;
36
- image: string;
37
- title: string;
38
- }
39
- export interface IAttributesTastingNote {
40
- statement: string;
41
- image: string;
42
- title: string;
43
- }
44
- export interface IAttributesPersonalization {
45
- type: string;
46
- engravingMaxLines: number;
47
- engravingMaxCharsPerLine: number;
48
- location: string[];
49
- width: number;
50
- height: number;
51
- image: string;
52
- fee: number;
53
- availableFrom: Date;
54
- availableTo: Date;
55
- }
56
- export interface IAttributes {
57
- brandOrigin: string;
58
- originStatement: string;
59
- ownershipType: string[];
60
- tags: string[];
61
- images: IAttributesImage;
62
- awards: IAttributesAward[];
63
- recipes: IAttributesRecipe[];
64
- video: IAttributesVideo[];
65
- tastingNotes: IAttributesTastingNote[];
66
- personalizations: IAttributesPersonalization[];
67
- }
68
- export interface IProductFulfillmentTypes {
69
- shipping: string;
70
- onDemand: string;
71
- }
72
- export interface IProductVariant {
73
- partNumber: string;
74
- retailerId: string;
75
- price: number;
76
- modalities?: FulfillmentType[];
77
- salePrice: number;
78
- isEngravable: boolean;
79
- stock: number;
80
- fulfillments: string[];
81
- fulfillmentTypes: IProductFulfillmentTypes;
82
- }
83
- export interface IProductSizeEngraving {
84
- status: boolean;
85
- validated?: boolean;
86
- maxLines: number;
87
- maxCharsPerLine: number;
88
- fee: number;
89
- location: string;
90
- }
91
- export interface IProductSizeAttributes {
92
- engraving?: IProductSizeEngraving;
93
- presale?: IProductPresale;
94
- maxQuantityPerOrder?: number;
95
- }
96
- export interface IProductSize {
97
- id: string;
98
- salsifyPid?: string;
99
- upc: string;
100
- size: string;
101
- volume: string;
102
- uom: string;
103
- image: string;
104
- pack: boolean;
105
- packDesc: string;
106
- container: string;
107
- maxQuantityPerOrder: number;
108
- containerType: string;
109
- attributes: IProductSizeAttributes;
110
- variants: IProductVariant[];
111
- }
112
- export interface IProductPriceInfo {
113
- currency: string;
114
- minimum: number;
115
- average: number;
116
- maximum: number;
117
- }
118
- export interface IProduct {
119
- id?: string;
120
- name: string;
121
- brand: string;
122
- catPath: string;
123
- category: string;
124
- classification: string;
125
- type: string;
126
- salsifyGrouping: string;
127
- subType: string;
128
- region: string;
129
- country: string;
130
- material: string;
131
- abv: string;
132
- proof: string;
133
- age: string;
134
- color: string;
135
- flavor: string;
136
- variety: string;
137
- appellation: string;
138
- vintage: string;
139
- description: string;
140
- htmlDescription: string;
141
- tastingNotes: string;
142
- images: string[];
143
- sizes: IProductSize[];
144
- attributes?: Partial<IAttributes>;
145
- priceInfo: IProductPriceInfo | null;
146
- }
147
- export interface IProductData {
148
- products: IProduct[];
149
- retailers: IRetailer[];
150
- }
151
- export interface IProductPresale {
152
- canPurchaseOn: null | string;
153
- estimatedShipBy: null | string;
154
- isActive: boolean;
155
- language: string;
156
- presaleLimit: number;
157
- price: number;
158
- }
@@ -1,67 +0,0 @@
1
- import type { FulfillmentType } from '@/enums';
2
- import type { DAYS_OF_WEEK } from '@/enums/cloud.enum';
3
- import type { IAddress, ICoords } from './address.interface';
4
- export interface IRetailerTimes {
5
- startsAt: string;
6
- endsAt: string;
7
- }
8
- export interface IRetailerHoursConfig {
9
- active: boolean;
10
- times: IRetailerTimes[];
11
- }
12
- export type RetailerHours = {
13
- [day in DAYS_OF_WEEK]: IRetailerHoursConfig;
14
- };
15
- export interface IRetailerExpectation {
16
- detail: string;
17
- short: string;
18
- engraving: string;
19
- }
20
- export interface IRetailerFreeDelivery {
21
- min: number;
22
- active: boolean;
23
- }
24
- export interface IFeeShippingConfig {
25
- maxQuantity: number;
26
- fee: number;
27
- active: boolean;
28
- min: number;
29
- }
30
- export interface IRetailerFeeShipping {
31
- individual: IFeeShippingConfig;
32
- pack: IFeeShippingConfig;
33
- free: IRetailerFreeDelivery;
34
- }
35
- export interface IRetailerFeeDelivery {
36
- min: number;
37
- fee: number;
38
- free: IRetailerFreeDelivery;
39
- }
40
- export type IRetailerFees = IRetailerFeeShipping | IRetailerFeeDelivery;
41
- export interface IRetailerFulfillments {
42
- id: string;
43
- type: FulfillmentType;
44
- deliveryFee?: number;
45
- shippingFee?: number;
46
- engravingFee?: number;
47
- subtotal?: number;
48
- timezone?: string;
49
- fees: IRetailerFees;
50
- expectation: IRetailerExpectation;
51
- canEngrave?: boolean;
52
- hours: RetailerHours;
53
- breaks: IRetailerTimes[];
54
- items: string[];
55
- }
56
- export interface IRetailer {
57
- name: string;
58
- id: string;
59
- platformFee?: number;
60
- deliveryFee?: number;
61
- shippingFee?: number;
62
- engravingFee?: number;
63
- subtotal?: number;
64
- total?: number;
65
- address?: IAddress & ICoords;
66
- fulfillments: IRetailerFulfillments[];
67
- }