@decocms/apps-vtex 8.0.0 → 8.1.0-next.1

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 (133) hide show
  1. package/package.json +7 -52
  2. package/src/index.ts +12 -15
  3. package/src/utils/constants.ts +2 -56
  4. package/src/utils/cookieSanitizer.ts +59 -59
  5. package/src/utils/operationRouter.ts +76 -72
  6. package/src/utils/types.ts +709 -1557
  7. package/src/vtexClient.ts +444 -0
  8. package/src/README.md +0 -6
  9. package/src/__tests__/client-segment-cookie.test.ts +0 -255
  10. package/src/__tests__/client-set-cookie-forward.test.ts +0 -257
  11. package/src/__tests__/schemas.test.ts +0 -71
  12. package/src/actions/address.ts +0 -250
  13. package/src/actions/analytics/sendEvent.ts +0 -86
  14. package/src/actions/auth.ts +0 -333
  15. package/src/actions/checkout.ts +0 -659
  16. package/src/actions/index.ts +0 -11
  17. package/src/actions/masterData.ts +0 -168
  18. package/src/actions/misc.ts +0 -188
  19. package/src/actions/newsletter.ts +0 -105
  20. package/src/actions/orders.ts +0 -34
  21. package/src/actions/profile.ts +0 -201
  22. package/src/actions/session.ts +0 -85
  23. package/src/actions/trigger.ts +0 -43
  24. package/src/actions/wishlist.ts +0 -114
  25. package/src/client.ts +0 -667
  26. package/src/commerceLoaders.ts +0 -267
  27. package/src/hooks/__tests__/createCart.render.test.ts +0 -114
  28. package/src/hooks/__tests__/createCart.test.ts +0 -92
  29. package/src/hooks/__tests__/createUseCart.test.ts +0 -184
  30. package/src/hooks/__tests__/createUseUser.test.ts +0 -48
  31. package/src/hooks/__tests__/createUseWishlist.test.ts +0 -87
  32. package/src/hooks/cartQuery.ts +0 -204
  33. package/src/hooks/createCart.ts +0 -427
  34. package/src/hooks/createUseCart.ts +0 -360
  35. package/src/hooks/createUseUser.ts +0 -153
  36. package/src/hooks/createUseWishlist.ts +0 -242
  37. package/src/hooks/index.ts +0 -25
  38. package/src/hooks/useAutocomplete.ts +0 -83
  39. package/src/hooks/useCart.ts +0 -243
  40. package/src/hooks/useUser.ts +0 -78
  41. package/src/hooks/useWishlist.ts +0 -119
  42. package/src/invoke.ts +0 -235
  43. package/src/loaders/ProductDetailsPage.ts +0 -1
  44. package/src/loaders/ProductList.ts +0 -1
  45. package/src/loaders/ProductListingPage.ts +0 -1
  46. package/src/loaders/address.ts +0 -115
  47. package/src/loaders/autocomplete.ts +0 -58
  48. package/src/loaders/brands.ts +0 -44
  49. package/src/loaders/cart/attachments.ts +0 -53
  50. package/src/loaders/cart/full.ts +0 -67
  51. package/src/loaders/cart/gifts.ts +0 -43
  52. package/src/loaders/cart/orderFormId.ts +0 -31
  53. package/src/loaders/cart/shipping.test.ts +0 -125
  54. package/src/loaders/cart/shipping.ts +0 -136
  55. package/src/loaders/cart/summary.ts +0 -36
  56. package/src/loaders/cart.ts +0 -52
  57. package/src/loaders/catalog.ts +0 -163
  58. package/src/loaders/collections.ts +0 -55
  59. package/src/loaders/index.ts +0 -20
  60. package/src/loaders/intelligentSearch/__tests__/productListingPage.test.ts +0 -51
  61. package/src/loaders/intelligentSearch/productDetailsPage.ts +0 -113
  62. package/src/loaders/intelligentSearch/productList.ts +0 -154
  63. package/src/loaders/intelligentSearch/productListingPage.ts +0 -526
  64. package/src/loaders/intelligentSearch/suggestions.ts +0 -46
  65. package/src/loaders/legacy/productDetailsPage.ts +0 -1
  66. package/src/loaders/legacy/productList.ts +0 -1
  67. package/src/loaders/legacy/relatedProductsLoader.ts +0 -81
  68. package/src/loaders/legacy.ts +0 -635
  69. package/src/loaders/logistics.ts +0 -111
  70. package/src/loaders/minicart.ts +0 -78
  71. package/src/loaders/navbar.ts +0 -26
  72. package/src/loaders/orders.ts +0 -92
  73. package/src/loaders/pageType.ts +0 -68
  74. package/src/loaders/paths/PDPDefaultPath.ts +0 -51
  75. package/src/loaders/payment.ts +0 -97
  76. package/src/loaders/productListFull.ts +0 -159
  77. package/src/loaders/profile.ts +0 -138
  78. package/src/loaders/promotion.ts +0 -30
  79. package/src/loaders/search.ts +0 -124
  80. package/src/loaders/session.ts +0 -83
  81. package/src/loaders/user.ts +0 -87
  82. package/src/loaders/wishlist.ts +0 -89
  83. package/src/loaders/wishlistProducts.ts +0 -69
  84. package/src/loaders/workflow/products.ts +0 -64
  85. package/src/loaders/workflow.ts +0 -316
  86. package/src/logo.png +0 -0
  87. package/src/manifest.gen.ts +0 -89
  88. package/src/middleware.ts +0 -240
  89. package/src/mod.ts +0 -157
  90. package/src/registry.ts +0 -9
  91. package/src/schemas.gen.ts +0 -3191
  92. package/src/schemas.ts +0 -30
  93. package/src/types.ts +0 -248
  94. package/src/utils/__tests__/cartProjection.test.ts +0 -118
  95. package/src/utils/__tests__/cookieSanitizer.test.ts +0 -162
  96. package/src/utils/__tests__/fetch.test.ts +0 -80
  97. package/src/utils/__tests__/fetchCache.test.ts +0 -155
  98. package/src/utils/__tests__/instrumentedFetch.test.ts +0 -158
  99. package/src/utils/__tests__/intelligentSearch.test.ts +0 -88
  100. package/src/utils/__tests__/minicart.test.ts +0 -184
  101. package/src/utils/__tests__/operationRouter.test.ts +0 -227
  102. package/src/utils/__tests__/resilience.test.ts +0 -205
  103. package/src/utils/__tests__/resourceRange.test.ts +0 -32
  104. package/src/utils/__tests__/simulationCache.test.ts +0 -40
  105. package/src/utils/__tests__/sitemap.test.ts +0 -185
  106. package/src/utils/__tests__/slugify.test.ts +0 -31
  107. package/src/utils/__tests__/transform.test.ts +0 -769
  108. package/src/utils/accountLoaders.ts +0 -203
  109. package/src/utils/authHelpers.ts +0 -85
  110. package/src/utils/batch.ts +0 -18
  111. package/src/utils/cartProjection.ts +0 -96
  112. package/src/utils/cookies.ts +0 -167
  113. package/src/utils/enrichment.ts +0 -560
  114. package/src/utils/fetch.ts +0 -107
  115. package/src/utils/fetchCache.ts +0 -199
  116. package/src/utils/index.ts +0 -19
  117. package/src/utils/instrumentedFetch.ts +0 -97
  118. package/src/utils/intelligentSearch.ts +0 -96
  119. package/src/utils/legacy.ts +0 -139
  120. package/src/utils/minicart.ts +0 -139
  121. package/src/utils/pickAndOmit.ts +0 -25
  122. package/src/utils/proxy.ts +0 -435
  123. package/src/utils/resilience.ts +0 -352
  124. package/src/utils/resourceRange.ts +0 -10
  125. package/src/utils/segment.ts +0 -152
  126. package/src/utils/similars.ts +0 -37
  127. package/src/utils/simulationCache.ts +0 -73
  128. package/src/utils/sitemap.ts +0 -282
  129. package/src/utils/slugCache.ts +0 -28
  130. package/src/utils/slugify.ts +0 -13
  131. package/src/utils/transform.ts +0 -1522
  132. package/src/utils/vtexId.ts +0 -138
  133. package/tsconfig.json +0 -7
@@ -1,1884 +1,1036 @@
1
- /**
2
- * @format dynamic-options
3
- * @options vtex/loaders/options/productIdByTerm.ts
4
- * @description Equivalent to sku ID in VTEX platform
5
- */
6
- export type ProductID = string;
7
-
8
1
  export interface OrderForm {
9
- orderFormId: string;
10
- salesChannel: string;
11
- loggedIn: boolean;
12
- isCheckedIn: boolean;
13
- storeId: null;
14
- checkedInPickupPointId: null;
15
- allowManualPrice: boolean;
16
- canEditData: boolean;
17
- userProfileId: null;
18
- userType: null;
19
- ignoreProfileData: boolean;
20
- value: number;
21
- messages: Message[];
22
- items: OrderFormItem[];
23
- selectableGifts: unknown[];
24
- totalizers: Totalizer[];
25
- shippingData: ShippingData;
26
- clientProfileData: ClientProfileData | null;
27
- paymentData: PaymentData;
28
- marketingData: MarketingData;
29
- sellers: Seller[];
30
- clientPreferencesData: ClientPreferencesData;
31
- commercialConditionData: null;
32
- storePreferencesData: StorePreferencesData;
33
- giftRegistryData: null;
34
- openTextField: null;
35
- invoiceData: null;
36
- customData: null;
37
- itemMetadata: ItemMetadata;
38
- hooksData: null;
39
- ratesAndBenefitsData: RatesAndBenefitsData;
40
- subscriptionData: null;
41
- merchantContextData: null;
42
- itemsOrdination: null;
2
+ orderFormId: string;
3
+ salesChannel: string;
4
+ loggedIn: boolean;
5
+ isCheckedIn: boolean;
6
+ storeId: null;
7
+ checkedInPickupPointId: null;
8
+ allowManualPrice: boolean;
9
+ canEditData: boolean;
10
+ userProfileId: null;
11
+ userType: null;
12
+ ignoreProfileData: boolean;
13
+ value: number;
14
+ messages: Message[];
15
+ items: OrderFormItem[];
16
+ selectableGifts: unknown[];
17
+ totalizers: Totalizer[];
18
+ shippingData: ShippingData;
19
+ clientProfileData: ClientProfileData | null;
20
+ paymentData: PaymentData;
21
+ marketingData: MarketingData;
22
+ sellers: Seller[];
23
+ clientPreferencesData: ClientPreferencesData;
24
+ commercialConditionData: null;
25
+ storePreferencesData: StorePreferencesData;
26
+ giftRegistryData: null;
27
+ openTextField: null;
28
+ invoiceData: null;
29
+ customData: null;
30
+ itemMetadata: ItemMetadata;
31
+ hooksData: null;
32
+ ratesAndBenefitsData: RatesAndBenefitsData;
33
+ subscriptionData: null;
34
+ merchantContextData: null;
35
+ itemsOrdination: null;
43
36
  }
44
37
 
45
38
  export interface ClientProfileData {
46
- email: string;
47
- firstName: null;
48
- lastName: null;
49
- document: null;
50
- documentType: null;
51
- phone: null;
52
- corporateName: null;
53
- tradeName: null;
54
- corporateDocument: null;
55
- stateInscription: null;
56
- corporatePhone: null;
57
- isCorporate: boolean;
58
- profileCompleteOnLoading: boolean;
59
- profileErrorOnLoading: boolean;
60
- customerClass: null;
39
+ email: string;
40
+ firstName: null;
41
+ lastName: null;
42
+ document: null;
43
+ documentType: null;
44
+ phone: null;
45
+ corporateName: null;
46
+ tradeName: null;
47
+ corporateDocument: null;
48
+ stateInscription: null;
49
+ corporatePhone: null;
50
+ isCorporate: boolean;
51
+ profileCompleteOnLoading: boolean;
52
+ profileErrorOnLoading: boolean;
53
+ customerClass: null;
61
54
  }
62
55
 
63
56
  export interface ClientPreferencesData {
64
- locale: string;
65
- optinNewsLetter: null;
57
+ locale: string;
58
+ optinNewsLetter: null;
66
59
  }
67
60
 
68
61
  export interface ItemMetadata {
69
- items: ItemMetadataItem[];
62
+ items: ItemMetadataItem[];
70
63
  }
71
64
 
72
65
  export interface ItemMetadataItem {
73
- id: string;
74
- seller: string;
75
- name: string;
76
- skuName: string;
77
- productId: string;
78
- refId: string;
79
- ean: null | string;
80
- imageUrl: string;
81
- detailUrl: string;
82
- assemblyOptions: AssemblyOption[];
66
+ id: string;
67
+ seller: string;
68
+ name: string;
69
+ skuName: string;
70
+ productId: string;
71
+ refId: string;
72
+ ean: null | string;
73
+ imageUrl: string;
74
+ detailUrl: string;
75
+ assemblyOptions: AssemblyOption[];
83
76
  }
84
77
 
85
78
  export interface AssemblyOption {
86
- id: Name;
87
- name: Name;
88
- required: boolean;
89
- inputValues: Schema;
90
- composition: null;
79
+ id: Name;
80
+ name: Name;
81
+ required: boolean;
82
+ inputValues: Schema;
83
+ composition: null;
91
84
  }
92
85
 
93
86
  export enum Name {
94
- AlternativeSubstitute = "ALTERNATIVE_SUBSTITUTE",
95
- Substituto = "Substituto",
87
+ AlternativeSubstitute = "ALTERNATIVE_SUBSTITUTE",
88
+ Substituto = "Substituto",
96
89
  }
97
90
 
98
91
  export interface Schema {
99
- Sku: Ean;
100
- Price: Ean;
101
- Qtde?: Ean;
102
- EAN: Ean;
103
- Measuremt_unit: Ean;
104
- Unit_multiplier: Ean;
105
- Quantity: Ean;
92
+ Sku: Ean;
93
+ Price: Ean;
94
+ Qtde?: Ean;
95
+ EAN: Ean;
96
+ Measuremt_unit: Ean;
97
+ Unit_multiplier: Ean;
98
+ Quantity: Ean;
106
99
  }
107
100
 
108
101
  export interface Ean {
109
- maximumNumberOfCharacters: number;
110
- domain: unknown[];
102
+ maximumNumberOfCharacters: number;
103
+ domain: unknown[];
111
104
  }
112
105
 
113
106
  export interface OrderFormItem {
114
- uniqueId: string;
115
- id: string;
116
- productId: string;
117
- productRefId: string;
118
- refId: string;
119
- ean: null | string;
120
- name: string;
121
- skuName: string;
122
- modalType: null | string;
123
- parentItemIndex: null;
124
- parentAssemblyBinding: null;
125
- assemblies: unknown[];
126
- priceValidUntil: Date;
127
- tax: number;
128
- price: number;
129
- listPrice: number;
130
- manualPrice: null;
131
- manualPriceAppliedBy: null;
132
- sellingPrice: number;
133
- rewardValue: number;
134
- isGift: boolean;
135
- additionalInfo: AdditionalInfo;
136
- preSaleDate: null;
137
- productCategoryIds: string;
138
- productCategories: { [key: string]: string };
139
- quantity: number;
140
- seller: string;
141
- sellerChain: string[];
142
- imageUrl: string;
143
- detailUrl: string;
144
- components: Component[];
145
- bundleItems: unknown[];
146
- attachments: unknown[];
147
- attachmentOfferings: AttachmentOffering[];
148
- offerings: Offering[];
149
- priceTags: PriceTag[];
150
- availability: string;
151
- measurementUnit: string;
152
- unitMultiplier: number;
153
- manufacturerCode: null;
154
- priceDefinition: PriceDefinition;
107
+ uniqueId: string;
108
+ id: string;
109
+ productId: string;
110
+ productRefId: string;
111
+ refId: string;
112
+ ean: null | string;
113
+ name: string;
114
+ skuName: string;
115
+ modalType: null | string;
116
+ parentItemIndex: null;
117
+ parentAssemblyBinding: null;
118
+ assemblies: unknown[];
119
+ priceValidUntil: Date;
120
+ tax: number;
121
+ price: number;
122
+ listPrice: number;
123
+ manualPrice: null;
124
+ manualPriceAppliedBy: null;
125
+ sellingPrice: number;
126
+ rewardValue: number;
127
+ isGift: boolean;
128
+ additionalInfo: AdditionalInfo;
129
+ preSaleDate: null;
130
+ productCategoryIds: string;
131
+ productCategories: { [key: string]: string };
132
+ quantity: number;
133
+ seller: string;
134
+ sellerChain: string[];
135
+ imageUrl: string;
136
+ detailUrl: string;
137
+ components: Component[];
138
+ bundleItems: unknown[];
139
+ attachments: unknown[];
140
+ attachmentOfferings: AttachmentOffering[];
141
+ offerings: Offering[];
142
+ priceTags: PriceTag[];
143
+ availability: string;
144
+ measurementUnit: string;
145
+ unitMultiplier: number;
146
+ manufacturerCode: null;
147
+ priceDefinition: PriceDefinition;
155
148
  }
156
149
 
157
150
  export interface AdditionalInfo {
158
- dimension: null;
159
- brandName: null | string;
160
- brandId: null | string;
161
- offeringInfo: null;
162
- offeringType: null;
163
- offeringTypeId: null;
151
+ dimension: null;
152
+ brandName: null | string;
153
+ brandId: null | string;
154
+ offeringInfo: null;
155
+ offeringType: null;
156
+ offeringTypeId: null;
164
157
  }
165
158
 
166
159
  export interface AttachmentOffering {
167
- name: Name;
168
- required: boolean;
169
- schema: Schema;
160
+ name: Name;
161
+ required: boolean;
162
+ schema: Schema;
170
163
  }
171
164
 
172
165
  export interface Component {
173
- uniqueId: string;
174
- id: string;
175
- productId: null;
176
- productRefId: null;
177
- refId: string;
178
- ean: string;
179
- name: string;
180
- skuName: null;
181
- modalType: null;
182
- parentItemIndex: null;
183
- parentAssemblyBinding: null;
184
- assemblies: unknown[];
185
- priceValidUntil: null;
186
- tax: number;
187
- price: number;
188
- listPrice: null;
189
- manualPrice: null;
190
- manualPriceAppliedBy: null;
191
- sellingPrice: number;
192
- rewardValue: number;
193
- isGift: boolean;
194
- additionalInfo: AdditionalInfo;
195
- preSaleDate: null;
196
- productCategoryIds: null;
197
- productCategories: AvailableAssociations;
198
- quantity: number;
199
- seller: null;
200
- sellerChain: null[];
201
- imageUrl: null;
202
- detailUrl: null;
203
- components: unknown[];
204
- bundleItems: unknown[];
205
- attachments: unknown[];
206
- attachmentOfferings: unknown[];
207
- offerings: unknown[];
208
- priceTags: PriceTag[];
209
- availability: null;
210
- measurementUnit: string;
211
- unitMultiplier: number;
212
- manufacturerCode: null;
213
- priceDefinition: PriceDefinition;
166
+ uniqueId: string;
167
+ id: string;
168
+ productId: null;
169
+ productRefId: null;
170
+ refId: string;
171
+ ean: string;
172
+ name: string;
173
+ skuName: null;
174
+ modalType: null;
175
+ parentItemIndex: null;
176
+ parentAssemblyBinding: null;
177
+ assemblies: unknown[];
178
+ priceValidUntil: null;
179
+ tax: number;
180
+ price: number;
181
+ listPrice: null;
182
+ manualPrice: null;
183
+ manualPriceAppliedBy: null;
184
+ sellingPrice: number;
185
+ rewardValue: number;
186
+ isGift: boolean;
187
+ additionalInfo: AdditionalInfo;
188
+ preSaleDate: null;
189
+ productCategoryIds: null;
190
+ productCategories: AvailableAssociations;
191
+ quantity: number;
192
+ seller: null;
193
+ sellerChain: null[];
194
+ imageUrl: null;
195
+ detailUrl: null;
196
+ components: unknown[];
197
+ bundleItems: unknown[];
198
+ attachments: unknown[];
199
+ attachmentOfferings: unknown[];
200
+ offerings: unknown[];
201
+ priceTags: PriceTag[];
202
+ availability: null;
203
+ measurementUnit: string;
204
+ unitMultiplier: number;
205
+ manufacturerCode: null;
206
+ priceDefinition: PriceDefinition;
214
207
  }
215
208
 
216
209
  export interface PriceDefinition {
217
- calculatedSellingPrice: number;
218
- total: number;
219
- sellingPrices: SellingPrice[];
210
+ calculatedSellingPrice: number;
211
+ total: number;
212
+ sellingPrices: SellingPrice[];
220
213
  }
221
214
 
222
215
  export interface SellingPrice {
223
- value: number;
224
- quantity: number;
216
+ value: number;
217
+ quantity: number;
225
218
  }
226
219
 
227
220
  export interface PriceTag {
228
- name: string;
229
- value: number;
230
- rawValue: number;
231
- isPercentual: boolean;
232
- identifier: string;
233
- owner: string;
221
+ name: string;
222
+ value: number;
223
+ rawValue: number;
224
+ isPercentual: boolean;
225
+ identifier: string;
226
+ owner: string;
234
227
  }
235
228
 
236
229
  export type AvailableAssociations = Record<string, string>;
237
230
 
238
231
  export interface MarketingData {
239
- utmSource: string | undefined;
240
- utmMedium: string | undefined;
241
- utmCampaign: string | undefined;
242
- utmiPage: string | undefined;
243
- utmiPart: string | undefined;
244
- utmiCampaign: string | undefined;
245
- coupon: string | undefined;
246
- marketingTags: string[] | undefined;
232
+ utmSource: string | undefined;
233
+ utmMedium: string | undefined;
234
+ utmCampaign: string | undefined;
235
+ utmiPage: string | undefined;
236
+ utmiPart: string | undefined;
237
+ utmiCampaign: string | undefined;
238
+ coupon: string | undefined;
239
+ marketingTags: string[] | undefined;
247
240
  }
248
241
 
249
242
  export interface Message {
250
- code: null | string;
251
- text: string;
252
- status: string;
253
- fields: Fields;
243
+ code: null | string;
244
+ text: string;
245
+ status: string;
246
+ fields: Fields;
254
247
  }
255
248
 
256
249
  export interface Fields {
257
- ean?: string;
258
- itemIndex?: string;
259
- skuName?: string;
250
+ ean?: string;
251
+ itemIndex?: string;
252
+ skuName?: string;
260
253
  }
261
254
 
262
255
  export interface PaymentData {
263
- updateStatus: string;
264
- installmentOptions: InstallmentOption[];
265
- paymentSystems: PaymentSystem[];
266
- payments: unknown[];
267
- giftCards: unknown[];
268
- giftCardMessages: unknown[];
269
- availableAccounts: unknown[];
270
- availableTokens: unknown[];
271
- availableAssociations: AvailableAssociations;
256
+ updateStatus: string;
257
+ installmentOptions: InstallmentOption[];
258
+ paymentSystems: PaymentSystem[];
259
+ payments: unknown[];
260
+ giftCards: unknown[];
261
+ giftCardMessages: unknown[];
262
+ availableAccounts: unknown[];
263
+ availableTokens: unknown[];
264
+ availableAssociations: AvailableAssociations;
272
265
  }
273
266
 
274
267
  export interface InstallmentOption {
275
- paymentSystem: string;
276
- bin: null;
277
- paymentName: null;
278
- paymentGroupName: null;
279
- value: number;
280
- installments: CartInstallment[];
268
+ paymentSystem: string;
269
+ bin: null;
270
+ paymentName: null;
271
+ paymentGroupName: null;
272
+ value: number;
273
+ installments: CartInstallment[];
281
274
  }
282
275
 
283
276
  export interface CartInstallment {
284
- count: number;
285
- hasInterestRate: boolean;
286
- interestRate: number;
287
- value: number;
288
- total: number;
289
- sellerMerchantInstallments?: Installment[];
290
- id?: ID;
277
+ count: number;
278
+ hasInterestRate: boolean;
279
+ interestRate: number;
280
+ value: number;
281
+ total: number;
282
+ sellerMerchantInstallments?: Installment[];
283
+ id?: ID;
291
284
  }
292
285
 
293
286
  export enum ID {
294
- Carrefourbrfood = "CARREFOURBRFOOD",
287
+ Carrefourbrfood = "CARREFOURBRFOOD",
295
288
  }
296
289
 
297
290
  export interface PaymentSystem {
298
- id: number;
299
- name: string;
300
- groupName: string;
301
- validator: Validator;
302
- stringId: string;
303
- template: string;
304
- requiresDocument: boolean;
305
- displayDocument: boolean;
306
- isCustom: boolean;
307
- description: null | string;
308
- requiresAuthentication: boolean;
309
- dueDate: Date;
310
- availablePayments: null;
291
+ id: number;
292
+ name: string;
293
+ groupName: string;
294
+ validator: Validator;
295
+ stringId: string;
296
+ template: string;
297
+ requiresDocument: boolean;
298
+ displayDocument: boolean;
299
+ isCustom: boolean;
300
+ description: null | string;
301
+ requiresAuthentication: boolean;
302
+ dueDate: Date;
303
+ availablePayments: null;
311
304
  }
312
305
 
313
306
  export interface Validator {
314
- regex: null | string;
315
- mask: null | string;
316
- cardCodeRegex: CardCodeRegex | null;
317
- cardCodeMask: null | string;
318
- weights: number[] | null;
319
- useCvv: boolean;
320
- useExpirationDate: boolean;
321
- useCardHolderName: boolean;
322
- useBillingAddress: boolean;
307
+ regex: null | string;
308
+ mask: null | string;
309
+ cardCodeRegex: CardCodeRegex | null;
310
+ cardCodeMask: null | string;
311
+ weights: number[] | null;
312
+ useCvv: boolean;
313
+ useExpirationDate: boolean;
314
+ useCardHolderName: boolean;
315
+ useBillingAddress: boolean;
323
316
  }
324
317
 
325
318
  export enum CardCodeRegex {
326
- The093$ = "^[0-9]{3}$",
327
- The094$ = "^[0-9]{4}$",
319
+ The093$ = "^[0-9]{3}$",
320
+ The094$ = "^[0-9]{4}$",
328
321
  }
329
322
 
330
323
  export interface RatesAndBenefitsData {
331
- rateAndBenefitsIdentifiers: RateAndBenefitsIdentifier[];
332
- teaser: unknown[];
324
+ rateAndBenefitsIdentifiers: RateAndBenefitsIdentifier[];
325
+ teaser: unknown[];
333
326
  }
334
327
 
335
328
  export interface RateAndBenefitsIdentifier {
336
- id: string;
337
- name: string;
338
- featured: boolean;
339
- description: string;
340
- matchedParameters: MatchedParameters;
341
- additionalInfo: null;
329
+ id: string;
330
+ name: string;
331
+ featured: boolean;
332
+ description: string;
333
+ matchedParameters: MatchedParameters;
334
+ additionalInfo: null;
342
335
  }
343
336
 
344
337
  export interface MatchedParameters {
345
- "Seller@CatalogSystem": string;
346
- "productCluster@CatalogSystem"?: string;
347
- "zipCode@Shipping"?: string;
348
- slaIds?: string;
338
+ "Seller@CatalogSystem": string;
339
+ "productCluster@CatalogSystem"?: string;
340
+ "zipCode@Shipping"?: string;
341
+ slaIds?: string;
349
342
  }
350
343
 
351
344
  export interface Seller {
352
- id: string;
353
- name: string;
354
- logo: string;
345
+ id: string;
346
+ name: string;
347
+ logo: string;
355
348
  }
356
349
 
357
350
  export interface ShippingData {
358
- address: Address;
359
- logisticsInfo: LogisticsInfo[];
360
- selectedAddresses: Address[];
361
- availableAddresses: Address[];
362
- pickupPoints: PickupPoint[];
351
+ address: Address;
352
+ logisticsInfo: LogisticsInfo[];
353
+ selectedAddresses: Address[];
354
+ availableAddresses: Address[];
355
+ pickupPoints: PickupPoint[];
363
356
  }
364
357
 
365
358
  export interface Address {
366
- addressType?: string;
367
- receiverName: string | null;
368
- addressId: string;
369
- isDisposable?: boolean;
370
- postalCode?: string;
371
- city?: string;
372
- state?: string;
373
- country?: string;
374
- street?: string;
375
- number?: string;
376
- neighborhood?: string;
377
- addressName?: string;
378
- complement: string | null;
379
- reference?: string;
380
- geoCoordinates?: number[];
381
- name?: string;
359
+ addressType?: string;
360
+ receiverName: string | null;
361
+ addressId: string;
362
+ isDisposable?: boolean;
363
+ postalCode?: string;
364
+ city?: string;
365
+ state?: string;
366
+ country?: string;
367
+ street?: string;
368
+ number?: string;
369
+ neighborhood?: string;
370
+ addressName?: string;
371
+ complement: string | null;
372
+ reference?: string;
373
+ geoCoordinates?: number[];
374
+ name?: string;
382
375
  }
383
376
 
384
377
  export interface LogisticsInfo {
385
- itemIndex: number;
386
- selectedSla: SelectedSla | null;
387
- selectedDeliveryChannel: SelectedDeliveryChannel;
388
- addressId: string;
389
- slas: Sla[];
390
- shipsTo: string[];
391
- itemId: string;
392
- deliveryChannels: DeliveryChannel[];
378
+ itemIndex: number;
379
+ selectedSla: SelectedSla | null;
380
+ selectedDeliveryChannel: SelectedDeliveryChannel;
381
+ addressId: string;
382
+ slas: Sla[];
383
+ shipsTo: string[];
384
+ itemId: string;
385
+ deliveryChannels: DeliveryChannel[];
393
386
  }
394
387
 
395
388
  export interface DeliveryChannel {
396
- id: SelectedDeliveryChannel;
389
+ id: SelectedDeliveryChannel;
397
390
  }
398
391
 
399
392
  export enum SelectedDeliveryChannel {
400
- Delivery = "delivery",
401
- PickupInPoint = "pickup-in-point",
393
+ Delivery = "delivery",
394
+ PickupInPoint = "pickup-in-point",
402
395
  }
403
396
 
404
397
  export enum SelectedSla {
405
- ClickRetireRJS = "Click & Retire (RJS)",
406
- Normal = "Normal",
398
+ ClickRetireRJS = "Click & Retire (RJS)",
399
+ Normal = "Normal",
407
400
  }
408
401
 
409
402
  export interface Sla {
410
- id: SelectedSla;
411
- deliveryChannel: SelectedDeliveryChannel;
412
- name: SelectedSla;
413
- deliveryIds: DeliveryID[];
414
- shippingEstimate: string;
415
- shippingEstimateDate: null;
416
- lockTTL: null;
417
- availableDeliveryWindows: AvailableDeliveryWindow[];
418
- deliveryWindow: null;
419
- price: number;
420
- listPrice: number;
421
- tax: number;
422
- pickupStoreInfo: PickupStoreInfo;
423
- pickupPointId: null | string;
424
- pickupDistance: number | null;
425
- polygonName: string;
426
- transitTime: string;
403
+ id: SelectedSla;
404
+ deliveryChannel: SelectedDeliveryChannel;
405
+ name: SelectedSla;
406
+ deliveryIds: DeliveryID[];
407
+ shippingEstimate: string;
408
+ shippingEstimateDate: null;
409
+ lockTTL: null;
410
+ availableDeliveryWindows: AvailableDeliveryWindow[];
411
+ deliveryWindow: null;
412
+ price: number;
413
+ listPrice: number;
414
+ tax: number;
415
+ pickupStoreInfo: PickupStoreInfo;
416
+ pickupPointId: null | string;
417
+ pickupDistance: number | null;
418
+ polygonName: string;
419
+ transitTime: string;
427
420
  }
428
421
 
429
422
  export interface AvailableDeliveryWindow {
430
- startDateUtc: Date;
431
- endDateUtc: Date;
432
- price: number;
433
- lisPrice: number;
434
- tax: number;
423
+ startDateUtc: Date;
424
+ endDateUtc: Date;
425
+ price: number;
426
+ lisPrice: number;
427
+ tax: number;
435
428
  }
436
429
 
437
430
  export interface DeliveryID {
438
- courierId: string;
439
- warehouseId: string;
440
- dockId: string;
441
- courierName: string;
442
- quantity: number;
443
- kitItemDetails: unknown[];
431
+ courierId: string;
432
+ warehouseId: string;
433
+ dockId: string;
434
+ courierName: string;
435
+ quantity: number;
436
+ kitItemDetails: unknown[];
444
437
  }
445
438
 
446
439
  export interface PickupStoreInfo {
447
- isPickupStore: boolean;
448
- friendlyName: null | string;
449
- address: Address | null;
450
- additionalInfo: null | string;
451
- dockId: null;
440
+ isPickupStore: boolean;
441
+ friendlyName: null | string;
442
+ address: Address | null;
443
+ additionalInfo: null | string;
444
+ dockId: null;
452
445
  }
453
446
 
454
447
  export interface PickupHolidays {
455
- date?: string;
456
- hourBegin?: string;
457
- hourEnd?: string;
448
+ date?: string;
449
+ hourBegin?: string;
450
+ hourEnd?: string;
458
451
  }
459
452
 
460
453
  export interface PickupPoint {
461
- friendlyName: string;
462
- address: Address;
463
- additionalInfo: string;
464
- id: string;
465
- businessHours: BusinessHour[];
466
- pickupHolidays?: PickupHolidays[];
454
+ friendlyName: string;
455
+ address: Address;
456
+ additionalInfo: string;
457
+ id: string;
458
+ businessHours: BusinessHour[];
459
+ pickupHolidays?: PickupHolidays[];
467
460
  }
468
461
 
469
462
  export interface BusinessHour {
470
- DayOfWeek: number;
471
- OpeningTime: string;
472
- ClosingTime: string;
463
+ DayOfWeek: number;
464
+ OpeningTime: string;
465
+ ClosingTime: string;
473
466
  }
474
467
 
475
468
  export interface StorePreferencesData {
476
- countryCode: string;
477
- saveUserData: boolean;
478
- timeZone: string;
479
- currencyCode: string;
480
- currencyLocale: number;
481
- currencySymbol: string;
482
- currencyFormatInfo: CurrencyFormatInfo;
469
+ countryCode: string;
470
+ saveUserData: boolean;
471
+ timeZone: string;
472
+ currencyCode: string;
473
+ currencyLocale: number;
474
+ currencySymbol: string;
475
+ currencyFormatInfo: CurrencyFormatInfo;
483
476
  }
484
477
 
485
478
  export interface CurrencyFormatInfo {
486
- currencyDecimalDigits: number;
487
- currencyDecimalSeparator: string;
488
- currencyGroupSeparator: string;
489
- currencyGroupSize: number;
490
- startsWithCurrencySymbol: boolean;
479
+ currencyDecimalDigits: number;
480
+ currencyDecimalSeparator: string;
481
+ currencyGroupSeparator: string;
482
+ currencyGroupSize: number;
483
+ startsWithCurrencySymbol: boolean;
491
484
  }
492
485
 
493
486
  export interface Totalizer {
494
- id: string;
495
- name: string;
496
- value: number;
497
- alternativeTotals?: Totalizer[];
487
+ id: string;
488
+ name: string;
489
+ value: number;
490
+ alternativeTotals?: Totalizer[];
498
491
  }
499
492
 
500
493
  export interface OrderFormItemInput {
501
- id?: number;
502
- index?: number;
503
- quantity?: number;
504
- seller?: string;
505
- uniqueId?: string;
506
- // options?: AssemblyOptionInput[]
507
- }
508
-
509
- export interface LegacySearchArgs {
510
- query?: string;
511
- page: number;
512
- count: number;
513
- type: "product_search" | "facets";
514
- selectedFacets?: SelectedFacet[];
515
- sort?: LegacySort;
494
+ id?: number;
495
+ index?: number;
496
+ quantity?: number;
497
+ seller?: string;
498
+ uniqueId?: string;
499
+ // options?: AssemblyOptionInput[]
516
500
  }
517
501
 
518
502
  export type LegacySort =
519
- | "OrderByPriceDESC"
520
- | "OrderByPriceASC"
521
- | "OrderByTopSaleDESC"
522
- | "OrderByReviewRateDESC"
523
- | "OrderByNameASC"
524
- | "OrderByNameDESC"
525
- | "OrderByReleaseDateDESC"
526
- | "OrderByBestDiscountDESC"
527
- | "OrderByScoreDESC"
528
- | "";
503
+ | "OrderByPriceDESC"
504
+ | "OrderByPriceASC"
505
+ | "OrderByTopSaleDESC"
506
+ | "OrderByReviewRateDESC"
507
+ | "OrderByNameASC"
508
+ | "OrderByNameDESC"
509
+ | "OrderByReleaseDateDESC"
510
+ | "OrderByBestDiscountDESC"
511
+ | "OrderByScoreDESC"
512
+ | "";
529
513
 
530
514
  export type Fuzzy = "0" | "1" | "auto";
531
515
 
532
- export interface SearchArgs {
533
- query?: string;
534
- page: number;
535
- count: number;
536
- type: "product_search" | "facets";
537
- sort?: Sort;
538
- selectedFacets?: SelectedFacet[];
539
- fuzzy?: Fuzzy;
540
- hideUnavailableItems?: boolean;
541
- locale?: string;
542
- segment?: Partial<Segment>;
543
- }
544
-
545
516
  export interface SelectedFacet {
546
- /**
547
- * @title Key
548
- * @description The key of the facet (e.g. "brand", "category-1", "productClusterIds")
549
- */
550
- key: string;
551
- /**
552
- * @title Value
553
- * @description The value of the facet
554
- */
555
- value: string;
517
+ /**
518
+ * @title Key
519
+ * @description The key of the facet (e.g. "brand", "category-1", "productClusterIds")
520
+ */
521
+ key: string;
522
+ /**
523
+ * @title Value
524
+ * @description The value of the facet
525
+ */
526
+ value: string;
556
527
  }
557
528
 
558
529
  export type Sort =
559
- | "price:desc"
560
- | "price:asc"
561
- | "orders:desc"
562
- | "name:desc"
563
- | "name:asc"
564
- | "release:desc"
565
- | "discount:desc"
566
- | "";
530
+ | "price:desc"
531
+ | "price:asc"
532
+ | "orders:desc"
533
+ | "name:desc"
534
+ | "name:asc"
535
+ | "release:desc"
536
+ | "discount:desc"
537
+ | "";
567
538
 
568
539
  export interface Suggestion {
569
- searches: Search[];
540
+ searches: Search[];
570
541
  }
571
542
 
572
543
  export interface Search {
573
- term: string;
574
- count: number;
544
+ term: string;
545
+ count: number;
575
546
  }
576
547
 
577
548
  export interface ProductSearchResult {
578
- /**
579
- * @description Total of products.
580
- */
581
- recordsFiltered: number;
582
- products: Product[];
583
- pagination: Pagination;
584
- sampling: boolean;
585
- options: Options;
586
- translated: boolean;
587
- locale: string;
588
- query: string;
589
- operator: "and" | "or";
590
- redirect: string;
591
- fuzzy: string;
592
- correction?: Correction;
549
+ /**
550
+ * @description Total of products.
551
+ */
552
+ recordsFiltered: number;
553
+ products: Product[];
554
+ pagination: Pagination;
555
+ sampling: boolean;
556
+ options: Options;
557
+ translated: boolean;
558
+ locale: string;
559
+ query: string;
560
+ operator: "and" | "or";
561
+ redirect: string;
562
+ fuzzy: string;
563
+ correction?: Correction;
593
564
  }
594
565
 
595
566
  export interface Correction {
596
- misspelled: boolean;
567
+ misspelled: boolean;
597
568
  }
598
569
 
599
570
  export interface Options {
600
- sorts: {
601
- field: string;
602
- order: string;
603
- active?: boolean;
604
- proxyURL: string;
605
- }[];
606
- counts: Count[];
571
+ sorts: {
572
+ field: string;
573
+ order: string;
574
+ active?: boolean;
575
+ proxyURL: string;
576
+ }[];
577
+ counts: Count[];
607
578
  }
608
579
 
609
580
  export interface Count {
610
- count: number;
611
- proxyURL: string;
581
+ count: number;
582
+ proxyURL: string;
612
583
  }
613
584
 
614
585
  export interface Pagination {
615
- count: number;
616
- current: Page;
617
- before: Page[];
618
- after: Page[];
619
- perPage: number;
620
- next: Page;
621
- previous: Page;
622
- first: Page;
623
- last: Page;
586
+ count: number;
587
+ current: Page;
588
+ before: Page[];
589
+ after: Page[];
590
+ perPage: number;
591
+ next: Page;
592
+ previous: Page;
593
+ first: Page;
594
+ last: Page;
624
595
  }
625
596
 
626
597
  export interface Page {
627
- index: number;
628
- proxyUrl: string;
629
- }
630
-
631
- export interface First {
632
- index: number;
598
+ index: number;
599
+ proxyUrl: string;
633
600
  }
634
601
 
635
602
  export interface Suggestion {
636
- searches: Search[];
603
+ searches: Search[];
637
604
  }
638
605
 
639
606
  export interface Search {
640
- term: string;
641
- count: number;
607
+ term: string;
608
+ count: number;
642
609
  }
643
610
 
644
611
  export interface IProduct {
645
- productId: string;
646
- productName: string;
647
- brand: string;
648
- brandId: number;
649
- brandImageUrl?: string;
650
- cacheId?: string;
651
- linkText: string;
652
- productReference: string;
653
- categoryId: string;
654
- clusterHighlights: Record<string, unknown>;
655
- productClusters: Record<string, string>;
656
- categories: string[];
657
- categoriesIds: string[];
658
- link: string;
659
- description: string;
660
- skuSpecifications?: SkuSpecification[];
661
- priceRange: PriceRange;
662
- specificationGroups: SpecificationGroup[];
663
- properties: Array<{ name: string; values: string[] }>;
664
- selectedProperties: Array<{ key: string; value: string }>;
665
- releaseDate: string;
666
- origin?: string;
612
+ productId: string;
613
+ productName: string;
614
+ brand: string;
615
+ brandId: number;
616
+ brandImageUrl?: string;
617
+ cacheId?: string;
618
+ linkText: string;
619
+ productReference: string;
620
+ categoryId: string;
621
+ clusterHighlights: Record<string, unknown>;
622
+ productClusters: Record<string, string>;
623
+ categories: string[];
624
+ categoriesIds: string[];
625
+ link: string;
626
+ description: string;
627
+ skuSpecifications?: SkuSpecification[];
628
+ priceRange: PriceRange;
629
+ specificationGroups: SpecificationGroup[];
630
+ properties: Array<{ name: string; values: string[] }>;
631
+ selectedProperties: Array<{ key: string; value: string }>;
632
+ releaseDate: string;
633
+ origin?: string;
667
634
  }
668
635
 
669
636
  export type Product = IProduct & {
670
- items: Item[];
671
- clusterHighlights: Array<{ id: string; name: string }>;
672
- productClusters: Array<{ id: string; name: string }>;
637
+ items: Item[];
638
+ clusterHighlights: Array<{ id: string; name: string }>;
639
+ productClusters: Array<{ id: string; name: string }>;
673
640
  };
674
641
 
675
642
  export type LegacyProduct = IProduct & {
676
- metaTagDescription: string;
677
- productTitle: string;
678
- items: LegacyItem[];
679
- allSpecifications: string[];
680
- allSpecificationsGroups?: string[];
681
- };
682
-
683
- export type LegacyFacets = {
684
- Departments: LegacyFacet[];
685
- CategoriesTrees: LegacyFacet[];
686
- Brands: LegacyFacet[];
687
- SpecificationFilters: Record<string, LegacyFacet[]>;
688
- PriceRanges: LegacyFacet[];
643
+ metaTagDescription: string;
644
+ productTitle: string;
645
+ items: LegacyItem[];
646
+ allSpecifications: string[];
647
+ allSpecificationsGroups?: string[];
689
648
  };
690
649
 
691
650
  export interface PageType {
692
- id: string | null;
693
- name: string | null;
694
- url: string | null;
695
- title: string | null;
696
- metaTagDescription: string | null;
697
- pageType:
698
- | "Brand"
699
- | "Category"
700
- | "Department"
701
- | "SubCategory"
702
- | "Product"
703
- | "Collection"
704
- | "Cluster"
705
- | "NotFound"
706
- | "FullText"
707
- | "Search";
651
+ id: string | null;
652
+ name: string | null;
653
+ url: string | null;
654
+ title: string | null;
655
+ metaTagDescription: string | null;
656
+ pageType:
657
+ | "Brand"
658
+ | "Category"
659
+ | "Department"
660
+ | "SubCategory"
661
+ | "Product"
662
+ | "Collection"
663
+ | "Cluster"
664
+ | "NotFound"
665
+ | "FullText"
666
+ | "Search";
708
667
  }
709
668
 
710
669
  export interface Category {
711
- id: number;
712
- name: string;
713
- hasChildren: boolean;
714
- children: Category[];
715
- url: string;
716
- Title?: string;
717
- MetaTagDescription?: string;
670
+ id: number;
671
+ name: string;
672
+ hasChildren: boolean;
673
+ children: Category[];
674
+ url: string;
675
+ Title?: string;
676
+ MetaTagDescription?: string;
718
677
  }
719
678
 
720
679
  export interface LegacyFacet {
721
- Id: number;
722
- Quantity: number;
723
- Name: string;
724
- Link: string;
725
- LinkEncoded: string;
726
- Map: string;
727
- Value: string;
728
- Slug?: string;
729
- Children: LegacyFacet[];
680
+ Id: number;
681
+ Quantity: number;
682
+ Name: string;
683
+ Link: string;
684
+ LinkEncoded: string;
685
+ Map: string;
686
+ Value: string;
687
+ Slug?: string;
688
+ Children: LegacyFacet[];
730
689
  }
731
690
 
732
691
  export interface Image {
733
- imageId: string;
734
- imageLabel: string | null;
735
- imageTag: string;
736
- imageUrl: string;
737
- imageText: string;
692
+ imageId: string;
693
+ imageLabel: string | null;
694
+ imageTag: string;
695
+ imageUrl: string;
696
+ imageText: string;
738
697
  }
739
698
 
740
699
  export interface Installment {
741
- Value: number;
742
- InterestRate: number;
743
- TotalValuePlusInterestRate: number;
744
- NumberOfInstallments: number;
745
- PaymentSystemName: string;
746
- PaymentSystemGroupName: string;
747
- Name: string;
700
+ Value: number;
701
+ InterestRate: number;
702
+ TotalValuePlusInterestRate: number;
703
+ NumberOfInstallments: number;
704
+ PaymentSystemName: string;
705
+ PaymentSystemGroupName: string;
706
+ Name: string;
748
707
  }
749
708
 
750
709
  export type LegacyItem = Omit<Item, "variations" | "videos"> & {
751
- variations: string[];
752
- Videos: string[];
710
+ variations: string[];
711
+ Videos: string[];
753
712
  } & Record<string, string[]>;
754
713
 
755
714
  export interface Item {
756
- itemId: string;
757
- name: string;
758
- nameComplete: string;
759
- complementName: string;
760
- ean: string;
761
- estimatedDateArrival: string;
762
- referenceId?: Array<{ Key: string; Value: string }>;
763
- measurementUnit: string;
764
- unitMultiplier: number;
765
- modalType: string | null;
766
- images: Image[];
767
- videos: string[];
768
- variations: Array<{
769
- name: string;
770
- values: string[];
771
- }>;
772
- sellers: Seller[];
773
- attachments: Array<{
774
- id: number;
775
- name: string;
776
- required: boolean;
777
- domainValues: string;
778
- }>;
779
- isKit: boolean;
780
- kitItems?: Array<{
781
- itemId: string;
782
- amount: number;
783
- }>;
715
+ itemId: string;
716
+ name: string;
717
+ nameComplete: string;
718
+ complementName: string;
719
+ ean: string;
720
+ estimatedDateArrival: string;
721
+ referenceId?: Array<{ Key: string; Value: string }>;
722
+ measurementUnit: string;
723
+ unitMultiplier: number;
724
+ modalType: string | null;
725
+ images: Image[];
726
+ videos: string[];
727
+ variations: Array<{
728
+ name: string;
729
+ values: string[];
730
+ }>;
731
+ sellers: Seller[];
732
+ attachments: Array<{
733
+ id: number;
734
+ name: string;
735
+ required: boolean;
736
+ domainValues: string;
737
+ }>;
738
+ isKit: boolean;
739
+ kitItems?: Array<{
740
+ itemId: string;
741
+ amount: number;
742
+ }>;
784
743
  }
785
744
 
786
745
  export interface TeasersParametersLegacy {
787
- "<Name>k__BackingField": string;
788
- "<Value>k__BackingField": string;
746
+ "<Name>k__BackingField": string;
747
+ "<Value>k__BackingField": string;
789
748
  }
790
749
 
791
750
  export interface TeasersConditionsLegacy {
792
- "<MinimumQuantity>k__BackingField": number;
793
- "<Parameters>k__BackingField": TeasersParametersLegacy[];
751
+ "<MinimumQuantity>k__BackingField": number;
752
+ "<Parameters>k__BackingField": TeasersParametersLegacy[];
794
753
  }
795
754
 
796
755
  export interface TeasersEffectLegacy {
797
- "<Parameters>k__BackingField": TeasersParametersLegacy[];
756
+ "<Parameters>k__BackingField": TeasersParametersLegacy[];
798
757
  }
799
758
 
800
759
  export interface TeasersLegacy {
801
- "<Name>k__BackingField": string;
802
- "<GeneralValues>k__BackingField": unknown;
803
- "<Conditions>k__BackingField": TeasersConditionsLegacy;
804
- "<Effects>k__BackingField": TeasersEffectLegacy;
760
+ "<Name>k__BackingField": string;
761
+ "<GeneralValues>k__BackingField": unknown;
762
+ "<Conditions>k__BackingField": TeasersConditionsLegacy;
763
+ "<Effects>k__BackingField": TeasersEffectLegacy;
805
764
  }
806
765
 
807
766
  export interface TeasersParameters {
808
- name: string;
809
- value: string;
767
+ name: string;
768
+ value: string;
810
769
  }
811
770
 
812
771
  export interface TeasersConditions {
813
- minimumQuantity: number;
814
- parameters: TeasersParameters[];
772
+ minimumQuantity: number;
773
+ parameters: TeasersParameters[];
815
774
  }
816
775
 
817
776
  export interface TeasersEffect {
818
- parameters: TeasersParameters[];
777
+ parameters: TeasersParameters[];
819
778
  }
820
779
 
821
780
  export interface Teasers {
822
- name: string;
823
- generalValues?: unknown;
824
- conditions: TeasersConditions;
825
- effects: TeasersEffect;
781
+ name: string;
782
+ generalValues?: unknown;
783
+ conditions: TeasersConditions;
784
+ effects: TeasersEffect;
826
785
  }
827
786
 
828
787
  export interface CommertialOffer {
829
- DeliverySlaSamplesPerRegion: Record<
830
- string,
831
- { DeliverySlaPerTypes: unknown[]; Region: unknown | null }
832
- >;
833
- Installments: Installment[];
834
- DiscountHighLight: unknown[];
835
- GiftSkuIds: string[];
836
- Teasers: TeasersLegacy[];
837
- teasers?: Teasers[];
838
- BuyTogether: unknown[];
839
- ItemMetadataAttachment: unknown[];
840
- Price: number;
841
- ListPrice: number;
842
- spotPrice: number;
843
- PriceWithoutDiscount: number;
844
- RewardValue: number;
845
- PriceValidUntil: string;
846
- AvailableQuantity: number;
847
- Tax: number;
848
- DeliverySlaSamples: Array<{
849
- DeliverySlaPerTypes: unknown[];
850
- Region: unknown | null;
851
- }>;
852
- GetInfoErrorMessage: unknown | null;
853
- CacheVersionUsedToCallCheckout: string;
788
+ DeliverySlaSamplesPerRegion: Record<
789
+ string,
790
+ { DeliverySlaPerTypes: unknown[]; Region: unknown | null }
791
+ >;
792
+ Installments: Installment[];
793
+ DiscountHighLight: unknown[];
794
+ GiftSkuIds: string[];
795
+ Teasers: TeasersLegacy[];
796
+ teasers?: Teasers[];
797
+ BuyTogether: unknown[];
798
+ ItemMetadataAttachment: unknown[];
799
+ Price: number;
800
+ ListPrice: number;
801
+ spotPrice: number;
802
+ PriceWithoutDiscount: number;
803
+ RewardValue: number;
804
+ PriceValidUntil: string;
805
+ AvailableQuantity: number;
806
+ Tax: number;
807
+ DeliverySlaSamples: Array<{
808
+ DeliverySlaPerTypes: unknown[];
809
+ Region: unknown | null;
810
+ }>;
811
+ GetInfoErrorMessage: unknown | null;
812
+ CacheVersionUsedToCallCheckout: string;
854
813
  }
855
814
 
856
815
  export interface Seller {
857
- sellerId: string;
858
- sellerName: string;
859
- addToCartLink: string;
860
- sellerDefault: boolean;
861
- commertialOffer: CommertialOffer;
816
+ sellerId: string;
817
+ sellerName: string;
818
+ addToCartLink: string;
819
+ sellerDefault: boolean;
820
+ commertialOffer: CommertialOffer;
862
821
  }
863
822
 
864
823
  export interface SkuSpecification {
865
- field: SKUSpecificationField;
866
- values: SKUSpecificationValue[];
824
+ field: SKUSpecificationField;
825
+ values: SKUSpecificationValue[];
867
826
  }
868
827
  export interface SKUSpecificationValue {
869
- name: string;
870
- id?: string;
871
- fieldId?: string;
872
- originalName?: string;
828
+ name: string;
829
+ id?: string;
830
+ fieldId?: string;
831
+ originalName?: string;
873
832
  }
874
833
 
875
834
  export interface SKUSpecificationField {
876
- name: string;
877
- originalName?: string;
878
- id?: string;
835
+ name: string;
836
+ originalName?: string;
837
+ id?: string;
879
838
  }
880
839
 
881
840
  export interface Price {
882
- highPrice: number | null;
883
- lowPrice: number | null;
841
+ highPrice: number | null;
842
+ lowPrice: number | null;
884
843
  }
885
844
 
886
845
  export interface PriceRange {
887
- sellingPrice: Price;
888
- listPrice: Price;
846
+ sellingPrice: Price;
847
+ listPrice: Price;
889
848
  }
890
849
 
891
850
  export interface SpecificationGroup {
892
- name: string;
893
- originalName: string;
894
- specifications: Array<{
895
- name: string;
896
- originalName: string;
897
- values: string[];
898
- }>;
851
+ name: string;
852
+ originalName: string;
853
+ specifications: Array<{
854
+ name: string;
855
+ originalName: string;
856
+ values: string[];
857
+ }>;
899
858
  }
900
859
 
901
- export type FilterType = RangeFacet["type"] | BooleanFacet["type"];
902
-
903
860
  export interface FacetSearchResult {
904
- facets: Facet[];
905
- breadcrumb: Breadcrumb[];
861
+ facets: Facet[];
862
+ breadcrumb: Breadcrumb[];
906
863
  }
907
864
 
908
865
  export interface BaseFacet {
909
- name: string;
910
- hidden: boolean;
911
- key: string;
912
- quantity: number;
866
+ name: string;
867
+ hidden: boolean;
868
+ key: string;
869
+ quantity: number;
913
870
  }
914
871
 
915
872
  export interface RangeFacet extends BaseFacet {
916
- type: "PRICERANGE";
917
- values: FacetValueRange[];
873
+ type: "PRICERANGE";
874
+ values: FacetValueRange[];
918
875
  }
919
876
 
920
877
  export interface BooleanFacet extends BaseFacet {
921
- type: "TEXT" | "NUMBER";
922
- values: FacetValueBoolean[];
878
+ type: "TEXT" | "NUMBER";
879
+ values: FacetValueBoolean[];
923
880
  }
924
881
 
925
882
  export type Facet = RangeFacet | BooleanFacet;
926
883
 
927
884
  export interface FacetValueBoolean {
928
- quantity: number;
929
- name: string;
930
- key: string;
931
- value: string;
932
- selected: boolean;
933
- href: string;
885
+ quantity: number;
886
+ name: string;
887
+ key: string;
888
+ value: string;
889
+ selected: boolean;
890
+ href: string;
934
891
  }
935
892
 
936
893
  export interface FacetValueRange {
937
- selected: boolean;
938
- quantity: number;
939
- range: {
940
- from: number;
941
- to: number;
942
- };
894
+ selected: boolean;
895
+ quantity: number;
896
+ range: {
897
+ from: number;
898
+ to: number;
899
+ };
943
900
  }
944
901
 
945
902
  export interface Breadcrumb {
946
- href: string;
947
- name: string;
948
- }
949
-
950
- export interface SKU {
951
- id: number;
952
- quantity: number;
953
- seller: string;
903
+ href: string;
904
+ name: string;
954
905
  }
955
906
 
956
907
  export interface SimulationOrderForm {
957
- items: Item[];
958
- ratesAndBenefitsData: RatesAndBenefitsData;
959
- paymentData: PaymentData;
960
- selectableGifts: unknown[];
961
- marketingData?: MarketingData;
962
- postalCode: string;
963
- country: string;
964
- logisticsInfo: LogisticsInfo[];
965
- messages: Message[];
966
- purchaseConditions: PurchaseConditions;
967
- pickupPoints: PickupPoint[];
968
- subscriptionData?: unknown;
969
- totals: Total[];
970
- itemMetadata?: ItemMetadata;
971
- allowMultipleDeliveries: boolean;
908
+ items: Item[];
909
+ ratesAndBenefitsData: RatesAndBenefitsData;
910
+ paymentData: PaymentData;
911
+ selectableGifts: unknown[];
912
+ marketingData?: MarketingData;
913
+ postalCode: string;
914
+ country: string;
915
+ logisticsInfo: LogisticsInfo[];
916
+ messages: Message[];
917
+ purchaseConditions: PurchaseConditions;
918
+ pickupPoints: PickupPoint[];
919
+ subscriptionData?: unknown;
920
+ totals: Total[];
921
+ itemMetadata?: ItemMetadata;
922
+ allowMultipleDeliveries: boolean;
972
923
  }
973
924
 
974
925
  export interface Total {
975
- id: string;
976
- name: string;
977
- value: number;
926
+ id: string;
927
+ name: string;
928
+ value: number;
978
929
  }
979
930
 
980
931
  export interface PurchaseConditions {
981
- itemPurchaseConditions: ItemPurchaseCondition[];
932
+ itemPurchaseConditions: ItemPurchaseCondition[];
982
933
  }
983
934
 
984
935
  export interface ItemPurchaseCondition {
985
- id: string;
986
- seller: string;
987
- sellerChain: string[];
988
- slas: Sla[];
989
- price: number;
990
- listPrice: number;
991
- }
992
-
993
- export interface DeliveryId {
994
- courierId: string;
995
- warehouseId: string;
996
- dockId: string;
997
- courierName: string;
998
- quantity: number;
999
- kitItemDetails: unknown[];
936
+ id: string;
937
+ seller: string;
938
+ sellerChain: string[];
939
+ slas: Sla[];
940
+ price: number;
941
+ listPrice: number;
1000
942
  }
1001
943
 
1002
944
  export interface Installment {
1003
- count: number;
1004
- hasInterestRate: boolean;
1005
- interestRate: number;
1006
- value: number;
1007
- total: number;
1008
- sellerMerchantInstallments: SellerMerchantInstallment[];
945
+ count: number;
946
+ hasInterestRate: boolean;
947
+ interestRate: number;
948
+ value: number;
949
+ total: number;
950
+ sellerMerchantInstallments: SellerMerchantInstallment[];
1009
951
  }
1010
952
 
1011
953
  export interface SellerMerchantInstallment {
1012
- id: string;
1013
- count: number;
1014
- hasInterestRate: boolean;
1015
- interestRate: number;
1016
- value: number;
1017
- total: number;
1018
- }
1019
-
1020
- export interface Teaser {
1021
- featured: boolean;
1022
- id: string;
1023
- name: string;
1024
- conditions: Conditions;
1025
- effects: Effects;
1026
- teaserType: string;
1027
- }
1028
-
1029
- export interface Effects {
1030
- parameters: Parameter[];
1031
- }
1032
-
1033
- export interface Conditions {
1034
- parameters: Parameter[];
1035
- minimumQuantity: number;
1036
- }
1037
-
1038
- export interface Parameter {
1039
- name: string;
1040
- value: string;
954
+ id: string;
955
+ count: number;
956
+ hasInterestRate: boolean;
957
+ interestRate: number;
958
+ value: number;
959
+ total: number;
1041
960
  }
1042
961
 
1043
962
  export interface PriceDefinition {
1044
- calculatedSellingPrice: number;
1045
- total: number;
1046
- sellingPrices: SellingPrice[];
963
+ calculatedSellingPrice: number;
964
+ total: number;
965
+ sellingPrices: SellingPrice[];
1047
966
  }
1048
967
 
1049
968
  export interface SellingPrice {
1050
- value: number;
1051
- quantity: number;
969
+ value: number;
970
+ quantity: number;
1052
971
  }
1053
972
 
1054
973
  export interface Offering {
1055
- type: string;
1056
- id: string;
1057
- name: string;
1058
- allowGiftMessage: boolean;
1059
- attachmentOfferings: unknown[];
1060
- price: number;
974
+ type: string;
975
+ id: string;
976
+ name: string;
977
+ allowGiftMessage: boolean;
978
+ attachmentOfferings: unknown[];
979
+ price: number;
1061
980
  }
1062
981
 
1063
982
  export type CrossSellingType =
1064
- | "whosawalsosaw"
1065
- | "whosawalsobought"
1066
- | "whoboughtalsobought"
1067
- | "showtogether"
1068
- | "accessories"
1069
- | "similars"
1070
- | "suggestions";
1071
-
1072
- export interface CrossSellingArgs {
1073
- productId: string;
1074
- type: CrossSellingType;
1075
- }
1076
-
1077
- export interface Segment {
1078
- campaigns: unknown | null;
1079
- /** @description 1,2,3 etc */
1080
- channel: string;
1081
- priceTables: string | null;
1082
- regionId: string | null;
1083
- utm_campaign: string | null;
1084
- utm_source: string | null;
1085
- utm_medium: string | null;
1086
- utmi_campaign: string | null;
1087
- utmi_page: string | null;
1088
- utmi_part: string | null;
1089
- /** @description BRL, USD stc */
1090
- currencyCode: string;
1091
- /** @description R$, $ etc */
1092
- currencySymbol: string;
1093
- /** @description BRA, USA etc */
1094
- countryCode: string;
1095
- /** @description pt-BR, en-US etc */
1096
- cultureInfo: string;
1097
- channelPrivacy: "public" | "private";
1098
- }
1099
-
1100
- export interface WishlistItem {
1101
- id: string;
1102
- productId: string;
1103
- sku: string;
1104
- title: string;
1105
- }
1106
-
1107
- export interface PortalSuggestion {
1108
- itemsReturned: ItemsReturned[];
1109
- }
1110
-
1111
- export interface ItemsReturned {
1112
- items: Item[];
1113
- thumb: string;
1114
- thumbUrl: null | string;
1115
- name: string;
1116
- href: string;
1117
- criteria: null | string;
1118
- }
983
+ | "whosawalsosaw"
984
+ | "whosawalsobought"
985
+ | "whoboughtalsobought"
986
+ | "showtogether"
987
+ | "accessories"
988
+ | "similars"
989
+ | "suggestions";
1119
990
 
1120
991
  export interface Item {
1121
- productId: string;
1122
- itemId: string;
1123
- name: string;
1124
- nameComplete: string;
1125
- imageUrl: string;
1126
- }
1127
-
1128
- export interface SimulationItem {
1129
- id: number;
1130
- quantity: number;
1131
- seller: string;
1132
- }
1133
-
1134
- export type SPEvent =
1135
- | {
1136
- type: "session.ping";
1137
- url: string;
1138
- }
1139
- | {
1140
- type: "page.cart";
1141
- products: {
1142
- productId: string;
1143
- quantity: number;
1144
- }[];
1145
- }
1146
- | {
1147
- type: "page.empty_cart";
1148
- // Empty array is converted to a invalid json schema... so, let it be anything.
1149
- // deno-lint-ignore ban-types
1150
- products: {};
1151
- }
1152
- | {
1153
- type: "page.confirmation";
1154
- order: string;
1155
- products: {
1156
- productId: string;
1157
- quantity: number;
1158
- price: number;
1159
- }[];
1160
- }
1161
- | {
1162
- type: "search.click";
1163
- position: number;
1164
- text: string;
1165
- productId: string;
1166
- url: string;
1167
- }
1168
- | {
1169
- type: "search.query";
1170
- url: string;
1171
- text: string;
1172
- misspelled: boolean;
1173
- match: number;
1174
- operator: string;
1175
- locale: string;
1176
- };
1177
-
1178
- export interface CreateNewDocument {
1179
- Id?: string;
1180
- Href?: string;
1181
- DocumentId?: string;
1182
- }
1183
-
1184
- export interface Document extends Record<string, unknown> {
1185
- additionalProperties?: string;
1186
- id?: string;
1187
- accountId?: string;
1188
- accountName?: string;
1189
- dataEntityId?: string;
1190
- }
1191
-
1192
- export interface SelectableGifts {
1193
- id: string;
1194
- selectedGifts: {
1195
- id: string;
1196
- seller: string;
1197
- index: number;
1198
- }[];
1199
- }
1200
-
1201
- export interface Brand {
1202
- id: number;
1203
- name: string;
1204
- isActive: boolean;
1205
- title: string;
1206
- metaTagDescription: string;
1207
- imageUrl: string | null;
1208
- }
1209
-
1210
- export interface Collection {
1211
- id: number;
1212
- name: "Live influencers";
1213
- searchable: boolean;
1214
- highlight: boolean;
1215
- dateFrom: string;
1216
- dateTo: string;
1217
- totalSku: number;
1218
- totalProducts: number;
1219
- type: "Manual" | "Automatic" | "Hybrid";
1220
- lastModifiedBy?: string;
1221
- }
1222
-
1223
- export interface CollectionList {
1224
- paging: {
1225
- page: number;
1226
- perPage: number;
1227
- total: number;
1228
- pages: number;
1229
- limit: number;
1230
- };
1231
- items?: Collection[];
1232
- }
1233
-
1234
- export interface ProductRatingAndReviews {
1235
- productRating?: ProductRating;
1236
- productReviews?: ProductReviewData;
1237
- }
1238
-
1239
- export interface ProductRating {
1240
- average?: number;
1241
- totalCount?: number;
1242
- }
1243
-
1244
- export interface ProductReview {
1245
- id?: string | undefined;
1246
- productId?: string | undefined;
1247
- rating?: number | undefined;
1248
- title?: string | undefined;
1249
- text?: string | undefined;
1250
- reviewerName?: string | undefined;
1251
- shopperId?: string | undefined;
1252
- reviewDateTime?: string | undefined;
1253
- searchDate?: string | undefined;
1254
- verifiedPurchaser?: boolean | undefined;
1255
- sku?: string | null;
1256
- approved?: boolean;
1257
- location?: string | null;
1258
- locale?: string | null;
1259
- pastReviews?: string | null;
1260
- }
1261
-
1262
- export interface ProductReviewRange {
1263
- total?: number;
1264
- from?: number;
1265
- to?: number;
1266
- }
1267
-
1268
- export interface ProductReviewData {
1269
- data?: ProductReview[] | undefined;
1270
- range?: ProductReviewRange;
1271
- }
1272
-
1273
- export interface ProductBalance {
1274
- hasUnlimitedQuantity?: boolean;
1275
- leadTime?: string;
1276
- reservedQuantity?: number;
1277
- totalQuantity?: number;
1278
- warehouseId?: string;
1279
- warehouseName?: string;
1280
- }
1281
-
1282
- export interface ProductInventoryData {
1283
- skuId?: string;
1284
- balance?: ProductBalance[];
1285
- }
1286
-
1287
- interface OrderPlacedSeller {
1288
- id: string;
1289
- name: string;
1290
- logo: string;
1291
- }
1292
-
1293
- export interface OrderPlaced {
1294
- sellers: OrderPlacedSeller[];
1295
- orderId: string;
1296
- orderGroup: string;
1297
- state: string;
1298
- isCheckedIn: boolean;
1299
- sellerOrderId: string;
1300
- storeId: string | null;
1301
- checkedInPickupPointId: string | null;
1302
- value: number;
1303
- items: OrderFormItem[];
1304
- totals: Total[];
1305
- clientProfileData: ClientProfileData;
1306
- ratesAndBenefitsData: RatesAndBenefitsData;
1307
- shippingData: ShippingData;
1308
- paymentData: PaymentData;
1309
- clientPreferencesData: ClientPreferencesData;
1310
- commercialConditionData: null;
1311
- giftRegistryData: null;
1312
- marketingData: MarketingData | null;
1313
- storePreferencesData: StorePreferencesData;
1314
- openTextField: null;
1315
- invoiceData: null;
1316
- itemMetadata: ItemMetadata;
1317
- taxData: null;
1318
- customData: null;
1319
- hooksData: null;
1320
- changeData: null;
1321
- subscriptionData: null;
1322
- merchantContextData: null;
1323
- purchaseAgentData: null;
1324
- salesChannel: string;
1325
- followUpEmail: string;
1326
- creationDate: string;
1327
- lastChange: string;
1328
- timeZoneCreationDate: string;
1329
- timeZoneLastChange: string;
1330
- isCompleted: boolean;
1331
- hostName: string;
1332
- merchantName: string | null;
1333
- userType: string;
1334
- roundingError: number;
1335
- allowEdition: boolean;
1336
- allowCancellation: boolean;
1337
- isUserDataVisible: boolean;
1338
- cancellationData: CancelattionData;
1339
- orderFormCreationDate: string;
1340
- marketplaceRequestedCancellationWindow: null;
1341
- }
1342
-
1343
- interface CancelattionData {
1344
- requestedByUser: true;
1345
- reason: string;
1346
- cancellationDate: string;
1347
- cancellationRequestId: string;
1348
- requestedBy: null;
1349
- cancellationSource: null;
1350
- }
1351
-
1352
- export interface Order {
1353
- ShippingEstimatedDate?: Date;
1354
- ShippingEstimatedDateMax: string;
1355
- ShippingEstimatedDateMin: string;
1356
- affiliateId: string;
1357
- authorizedDate: string;
1358
- callCenterOperatorName: string;
1359
- clientName: string;
1360
- creationDate: string;
1361
- currencyCode: string;
1362
- deliveryDates: Date[];
1363
- giftCardProviders: string[];
1364
- hostname: string;
1365
- invoiceInput: string;
1366
- invoiceOutput: string[];
1367
- isAllDelivered: boolean;
1368
- isAnyDelivered: boolean;
1369
- items: OrderFormItem[];
1370
- lastChange: string;
1371
- lastMessageUnread: string;
1372
- listId: string;
1373
- listType: string;
1374
- marketPlaceOrderId: string;
1375
- orderFormId: string;
1376
- orderId: string;
1377
- orderIsComplete: boolean;
1378
- origin: string;
1379
- paymentApprovedDate: string;
1380
- paymentNames: string;
1381
- salesChannel: string;
1382
- sequence: string;
1383
- status: string;
1384
- statusDescription: string;
1385
- totalItems: number;
1386
- totalValue: number;
1387
- workflowInErrorState: boolean;
1388
- workflowInRetry: boolean;
1389
- }
1390
-
1391
- export interface Orders {
1392
- facets: Facet[];
1393
- list: Order[];
1394
- paging: {
1395
- total: number;
1396
- pages: number;
1397
- currentPage: number;
1398
- perPage: number;
1399
- };
1400
- reportRecordsLimit: number;
1401
- stats: {
1402
- stats: {
1403
- totalItems: {
1404
- Count: number;
1405
- Max: number;
1406
- Mean: number;
1407
- Min: number;
1408
- Missing: number;
1409
- StdDev: number;
1410
- Sum: number;
1411
- SumOfSquares: number;
1412
- };
1413
- totalValue: {
1414
- Count: number;
1415
- Max: number;
1416
- Mean: number;
1417
- Min: number;
1418
- Missing: number;
1419
- StdDev: number;
1420
- Sum: number;
1421
- SumOfSquares: number;
1422
- };
1423
- };
1424
- };
1425
- }
1426
-
1427
- export interface SalesChannel {
1428
- Id?: number;
1429
- Name?: string;
1430
- IsActive?: boolean;
1431
- ProductClusterId?: number | null;
1432
- CountryCode?: string;
1433
- CultureInfo?: string;
1434
- TimeZone?: string;
1435
- CurrencyCode?: string;
1436
- CurrencySymbol?: string;
1437
- CurrencyLocale?: number;
1438
- CurrencyFormatInfo?: {
1439
- CurrencyDecimalDigits?: number;
1440
- CurrencyDecimalSeparator?: string;
1441
- CurrencyGroupSeparator?: string;
1442
- CurrencyGroupSize?: number;
1443
- StartsWithCurrencySymbol?: boolean;
1444
- };
1445
- Origin?: string | null;
1446
- Position?: number | null;
1447
- ConditionRule?: string | null;
1448
- CurrencyDecimalDigits?: number;
1449
- }
1450
-
1451
- export interface Promotion {
1452
- idCalculatorConfiguration: string;
1453
- name: string;
1454
- beginDateUtc: string;
1455
- endDateUtc: string;
1456
- lastModified: string;
1457
- daysAgoOfPurchases: number;
1458
- isActive: boolean;
1459
- isArchived: boolean;
1460
- isFeatured: boolean;
1461
- disableDeal: boolean;
1462
- activeDaysOfWeek: number[];
1463
- offset: number;
1464
- activateGiftsMultiplier: boolean;
1465
- newOffset: number;
1466
- maxPricesPerItems: string[];
1467
- cumulative: boolean;
1468
- nominalShippingDiscountValue: number;
1469
- absoluteShippingDiscountValue: number;
1470
- nominalDiscountValue: number;
1471
- nominalDiscountType: string;
1472
- maximumUnitPriceDiscount: number;
1473
- percentualDiscountValue: number;
1474
- rebatePercentualDiscountValue: number;
1475
- percentualShippingDiscountValue: number;
1476
- percentualTax: number;
1477
- shippingPercentualTax: number;
1478
- percentualDiscountValueList1: number;
1479
- percentualDiscountValueList2: number;
1480
- skusGift: {
1481
- quantitySelectable: number;
1482
- gifts: number;
1483
- };
1484
- nominalRewardValue: number;
1485
- percentualRewardValue: number;
1486
- orderStatusRewardValue: string;
1487
- applyToAllShippings: boolean;
1488
- nominalTax: number;
1489
- maxPackValue: number;
1490
- origin: string;
1491
- idSellerIsInclusive: boolean;
1492
- idsSalesChannel: string[];
1493
- areSalesChannelIdsExclusive: boolean;
1494
- marketingTags: string[];
1495
- marketingTagsAreNotInclusive: boolean;
1496
- paymentsMethods: {
1497
- id: string;
1498
- name: string;
1499
- }[];
1500
- stores: string[];
1501
- campaigns: string[];
1502
- storesAreInclusive: boolean;
1503
- categories: {
1504
- id: string;
1505
- name: string;
1506
- }[];
1507
- categoriesAreInclusive: boolean;
1508
- brands: {
1509
- id: string;
1510
- name: string;
1511
- }[];
1512
- brandsAreInclusive: boolean;
1513
- products: {
1514
- id: string;
1515
- name: string;
1516
- }[];
1517
- productsAreInclusive: boolean;
1518
- skus: {
1519
- id: string;
1520
- name: string;
1521
- }[];
1522
- skusAreInclusive: boolean;
1523
- collections1BuyTogether: {
1524
- id: string;
1525
- name: string;
1526
- }[];
1527
- collections2BuyTogether: {
1528
- id: string;
1529
- name: string;
1530
- }[];
1531
- minimumQuantityBuyTogether: number;
1532
- quantityToAffectBuyTogether: number;
1533
- enableBuyTogetherPerSku: boolean;
1534
- listSku1BuyTogether: {
1535
- id: string;
1536
- name: string;
1537
- }[];
1538
- listSku2BuyTogether: {
1539
- id: string;
1540
- name: string;
1541
- }[];
1542
- coupon: string[];
1543
- totalValueFloor: number;
1544
- totalValueCeling: number;
1545
- totalValueIncludeAllItems: boolean;
1546
- totalValueMode: string;
1547
- collections: {
1548
- id: string;
1549
- name: string;
1550
- }[];
1551
- collectionsIsInclusive: boolean;
1552
- restrictionsBins: string[];
1553
- cardIssuers: string[];
1554
- totalValuePurchase: number;
1555
- slasIds: string[];
1556
- isSlaSelected: boolean;
1557
- isFirstBuy: boolean;
1558
- firstBuyIsProfileOptimistic: boolean;
1559
- compareListPriceAndPrice: boolean;
1560
- isDifferentListPriceAndPrice: boolean;
1561
- zipCodeRanges: {
1562
- zipCodeFrom: string;
1563
- zipCodeTo: string;
1564
- inclusive: string;
1565
- }[];
1566
- itemMaxPrice: number;
1567
- itemMinPrice: number;
1568
- installment: number;
1569
- isMinMaxInstallments: boolean;
1570
- minInstallment: number;
1571
- maxInstallment: number;
1572
- merchants: string[];
1573
- clusterExpressions: string[];
1574
- clusterOperator: string;
1575
- paymentsRules: string[];
1576
- giftListTypes: string[];
1577
- productsSpecifications: string[];
1578
- affiliates: {
1579
- id: string;
1580
- name: string;
1581
- }[];
1582
- maxUsage: number;
1583
- maxUsagePerClient: number;
1584
- shouldDistributeDiscountAmongMatchedItems: boolean;
1585
- multipleUsePerClient: boolean;
1586
- accumulateWithManualPrice: boolean;
1587
- type: string;
1588
- useNewProgressiveAlgorithm: boolean;
1589
- percentualDiscountValueList: number[];
1590
- isAppliedToMostExpensive: boolean;
1591
- maxNumberOfAffectedItems: number;
1592
- maxNumberOfAffectedItemsGroupKey: string;
1593
- }
1594
-
1595
- export interface AdvancedLoaderConfig {
1596
- /** @description Specifies an array of attribute names from the original object to be directly included in the transformed object. */
1597
- includeOriginalAttributes: string[];
1598
-
1599
- /** @description Allow this field if you prefer to use description instead of metaTagDescription */
1600
- preferDescription?: boolean;
1601
- }
1602
-
1603
- export type Maybe<T> = T | null | undefined;
1604
-
1605
- export interface AddressInput {
1606
- name?: string;
1607
- addressName: string;
1608
- addressType?: string;
1609
- city?: string;
1610
- complement?: string;
1611
- country?: string;
1612
- geoCoordinates?: number[];
1613
- neighborhood?: string;
1614
- number?: string;
1615
- postalCode?: string;
1616
- receiverName?: string;
1617
- reference?: string;
1618
- state?: string;
1619
- street?: string;
1620
- }
1621
-
1622
- export interface SavedAddress {
1623
- id: string;
1624
- cacheId: string;
992
+ productId: string;
993
+ itemId: string;
994
+ name: string;
995
+ nameComplete: string;
996
+ imageUrl: string;
1625
997
  }
1626
998
 
1627
999
  export type SimulationBehavior = "default" | "skip" | "only1P";
1628
1000
 
1629
- export enum DeviceType {
1630
- Mobile = "MOBILE",
1631
- Tablet = "TABLET",
1632
- Desktop = "DESKTOP",
1633
- }
1634
-
1635
- export interface LoginSession {
1636
- id: string;
1637
- cacheId: string;
1638
- deviceType: DeviceType;
1639
- city?: Maybe<string>;
1640
- lastAccess: string;
1641
- browser?: Maybe<string>;
1642
- os?: Maybe<string>;
1643
- ip?: Maybe<string>;
1644
- fullAddress?: Maybe<string>;
1645
- firstAccess: string;
1646
- }
1647
-
1648
- export interface LoginSessionsInfo {
1649
- currentLoginSessionId?: Maybe<string>;
1650
- loginSessions?: Maybe<LoginSession[]>;
1651
- }
1652
-
1653
1001
  export interface Session {
1654
- id: string;
1655
- namespaces?: {
1656
- profile: SessionProfile;
1657
- impersonate: SessionImpersonate;
1658
- authentication: Record<string, string>;
1659
- public: SessionPublic;
1660
- };
1002
+ id: string;
1003
+ namespaces?: {
1004
+ profile: SessionProfile;
1005
+ impersonate: SessionImpersonate;
1006
+ authentication: Record<string, string>;
1007
+ public: SessionPublic;
1008
+ };
1661
1009
  }
1662
1010
 
1663
1011
  export interface SessionProfile {
1664
- id?: { value: string };
1665
- email?: { value: string };
1666
- firstName?: { value: string };
1667
- lastName?: { value: string };
1668
- phone?: { value: string };
1669
- isAuthenticated?: { value: string };
1670
- priceTables?: { value: string };
1012
+ id?: { value: string };
1013
+ email?: { value: string };
1014
+ firstName?: { value: string };
1015
+ lastName?: { value: string };
1016
+ phone?: { value: string };
1017
+ isAuthenticated?: { value: string };
1018
+ priceTables?: { value: string };
1671
1019
  }
1672
1020
 
1673
1021
  export interface SessionImpersonate {
1674
- storeUserEmail?: { value: string };
1675
- storeUserId?: { value: string };
1022
+ storeUserEmail?: { value: string };
1023
+ storeUserId?: { value: string };
1676
1024
  }
1677
1025
 
1678
1026
  export interface SessionPublic {
1679
- orderFormId?: { value: string };
1680
- utm_source?: { value: string };
1681
- utm_medium?: { value: string };
1682
- utm_campaign?: { value: string };
1683
- utm_term?: { value: string };
1684
- utm_content?: { value: string };
1685
- utmi_cp?: { value: string };
1686
- utmi_pc?: { value: string };
1687
- utmi_p?: { value: string };
1688
- }
1689
-
1690
- export interface ProfileCustomField {
1691
- key?: Maybe<string>;
1692
- value?: Maybe<string>;
1693
- }
1694
-
1695
- export interface PaymentProfile {
1696
- cacheId?: Maybe<string>;
1697
- id?: Maybe<string>;
1698
- paymentSystem?: Maybe<string>;
1699
- paymentSystemName?: Maybe<string>;
1700
- cardNumber?: Maybe<string>;
1701
- address?: Maybe<Address>;
1702
- isExpired?: Maybe<boolean>;
1703
- expirationDate?: Maybe<string>;
1704
- accountStatus?: Maybe<string>;
1705
- }
1706
-
1707
- export interface Profile {
1708
- cacheId?: Maybe<string>;
1709
- firstName?: Maybe<string>;
1710
- lastName?: Maybe<string>;
1711
- profilePicture?: Maybe<string>;
1712
- email?: Maybe<string>;
1713
- document?: Maybe<string>;
1714
- userId?: Maybe<string>;
1715
- birthDate?: Maybe<string>;
1716
- gender?: Maybe<string>;
1717
- homePhone?: Maybe<string>;
1718
- businessPhone?: Maybe<string>;
1719
- addresses?: Maybe<Address[]>;
1720
- isCorporate?: Maybe<boolean>;
1721
- corporateName?: Maybe<string>;
1722
- corporateDocument?: Maybe<string>;
1723
- stateRegistration?: Maybe<string>;
1724
- payments?: Maybe<PaymentProfile[]>;
1725
- customFields?: Maybe<ProfileCustomField[]>;
1726
- passwordLastUpdate?: Maybe<string>;
1727
- pii?: Maybe<boolean>;
1728
- tradeName?: Maybe<string>;
1729
- }
1730
-
1731
- export interface ProfileInput {
1732
- email: string;
1733
- firstName?: Maybe<string>;
1734
- lastName?: Maybe<string>;
1735
- document?: Maybe<string>;
1736
- phone?: Maybe<string>;
1737
- birthDate?: Maybe<string>;
1738
- gender?: Maybe<string>;
1739
- homePhone?: Maybe<string>;
1740
- businessPhone?: Maybe<string>;
1741
- tradeName?: Maybe<string>;
1742
- corporateName?: Maybe<string>;
1743
- corporateDocument?: Maybe<string>;
1744
- stateRegistration?: Maybe<string>;
1745
- isCorporate?: Maybe<boolean>;
1746
- }
1747
-
1748
- export interface AuthResponse {
1749
- authStatus: string | "WrongCredentials" | "BlockedUser" | "Success";
1750
- promptMFA: boolean;
1751
- clientToken: string | null;
1752
- authCookie: {
1753
- Name: string;
1754
- Value: string;
1755
- } | null;
1756
- accountAuthCookie: {
1757
- Name: string;
1758
- Value: string;
1759
- } | null;
1760
- expiresIn: number;
1761
- userId: string | null;
1762
- phoneNumber: string | null;
1763
- scope: string | null;
1764
- }
1765
-
1766
- export interface AuthProvider {
1767
- providerName: string;
1768
- className: string;
1769
- expectedContext: unknown[];
1770
- }
1771
-
1772
- export interface StartAuthentication {
1773
- authenticationToken: string | null;
1774
- oauthProviders: AuthProvider[];
1775
- showClassicAuthentication: boolean;
1776
- showAccessKeyAuthentication: boolean;
1777
- showPasskeyAuthentication: boolean;
1778
- authCookie: string | null;
1779
- isAuthenticated: boolean;
1780
- selectedProvider: string | null;
1781
- samlProviders: unknown[];
1782
- }
1783
-
1784
- export interface CanceledOrder {
1785
- date?: string;
1786
- orderId?: string;
1787
- receipt?: string | null;
1788
- }
1789
-
1790
- export interface ReceiptData {
1791
- ReceiptCollection: Receipt[];
1792
- }
1793
-
1794
- export interface Receipt {
1795
- ReceiptType: string;
1796
- Date: string;
1797
- ReceiptToken: string;
1798
- Source: string;
1799
- InvoiceNumber: string | null;
1800
- TransactionId: string;
1801
- MerchantName: string;
1802
- SellerOrderId: string | null;
1803
- ValueAsInt: number | null;
1804
- }
1805
-
1806
- export interface CancellationData {
1807
- requestedByUser: boolean;
1808
- reason: string;
1809
- cancellationDate: string;
1810
- cancellationRequestId: string;
1811
- requestedBy: string | null;
1812
- cancellationSource: string | null;
1813
- }
1814
-
1815
- export interface OrderFormOrder {
1816
- sellers: Seller[];
1817
- receiptData?: ReceiptData;
1818
- sequence?: string;
1819
- marketPlaceOrderId?: string;
1820
- origin?: number;
1821
- items: OrderFormItem[];
1822
- giftRegistryData?: unknown;
1823
- contextData?: unknown;
1824
- marketPlaceOrderGroup?: string | null;
1825
- marketplaceServicesEndpoint?: string | null;
1826
- orderFormId?: string;
1827
- affiliateId?: string;
1828
- status?: string;
1829
- callCenterOperator?: string;
1830
- userProfileId?: string;
1831
- creationVersion?: string;
1832
- creationEnvironment?: string;
1833
- lastChangeVersion?: string;
1834
- workflowInstanceId?: string;
1835
- workflowInstanceGroupId?: string | null;
1836
- marketplacePaymentValue?: number | null;
1837
- marketplacePaymentReferenceValue?: number | null;
1838
- marketplace?: string | null;
1839
- orderId: string;
1840
- orderGroup: string;
1841
- state: string;
1842
- isCheckedIn: boolean;
1843
- sellerOrderId: string;
1844
- storeId?: string | null;
1845
- checkedInPickupPointId?: string | null;
1846
- value: number;
1847
- totals: Total[];
1848
- clientProfileData: ClientProfileData;
1849
- ratesAndBenefitsData: RatesAndBenefitsData;
1850
- shippingData: ShippingData;
1851
- paymentData: PaymentData;
1852
- clientPreferencesData: ClientPreferencesData;
1853
- commercialConditionData?: unknown;
1854
- marketingData?: MarketingData | null;
1855
- storePreferencesData: StorePreferencesData;
1856
- openTextField?: unknown;
1857
- invoiceData?: unknown;
1858
- itemMetadata: ItemMetadata;
1859
- taxData?: unknown;
1860
- customData?: unknown;
1861
- hooksData?: unknown;
1862
- changeData?: unknown;
1863
- subscriptionData?: unknown;
1864
- merchantContextData?: unknown;
1865
- purchaseAgentData?: unknown;
1866
- salesChannel: string;
1867
- followUpEmail?: string;
1868
- creationDate: string;
1869
- lastChange: string;
1870
- timeZoneCreationDate: string;
1871
- timeZoneLastChange: string;
1872
- isCompleted: boolean;
1873
- hostName: string;
1874
- merchantName?: string | null;
1875
- userType?: string;
1876
- roundingError?: number;
1877
- allowEdition?: boolean;
1878
- allowCancellation?: boolean;
1879
- isUserDataVisible?: boolean;
1880
- allowChangeSeller?: boolean;
1881
- cancellationData?: CancellationData;
1882
- orderFormCreationDate?: string;
1883
- marketplaceRequestedCancellationWindow?: unknown;
1027
+ orderFormId?: { value: string };
1028
+ utm_source?: { value: string };
1029
+ utm_medium?: { value: string };
1030
+ utm_campaign?: { value: string };
1031
+ utm_term?: { value: string };
1032
+ utm_content?: { value: string };
1033
+ utmi_cp?: { value: string };
1034
+ utmi_pc?: { value: string };
1035
+ utmi_p?: { value: string };
1884
1036
  }