@soma-vertical-web/multi-lib 0.0.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.
- package/README.md +88 -0
- package/index.esm.d.ts +2 -0
- package/index.esm.js +3 -0
- package/package.json +23 -0
- package/src/data/src/Events/EventContex.d.ts +6 -0
- package/src/data/src/Events/helpers.d.ts +42 -0
- package/src/data/src/Events/interfaces.d.ts +108 -0
- package/src/data/src/helpers/product/generalInfo.d.ts +11 -0
- package/src/data/src/helpers/product/imageResize.d.ts +8 -0
- package/src/data/src/helpers/product/interface.d.ts +179 -0
- package/src/data/src/helpers/product/price.d.ts +1 -0
- package/src/data/src/helpers/product/skuInfos.d.ts +5 -0
- package/src/data/src/helpers/product/thumb.d.ts +2 -0
- package/src/data/src/helpers/utils/cookies.d.ts +2 -0
- package/src/data/src/helpers/utils/debounce.d.ts +1 -0
- package/src/data/src/helpers/utils/generateSlug.d.ts +1 -0
- package/src/data/src/helpers/utils/throttle.d.ts +1 -0
- package/src/data/src/helpers/utils/timer.d.ts +2 -0
- package/src/index.d.ts +2 -0
- package/src/types/src/cms/ContentTypes/CommonPage/index.d.ts +17 -0
- package/src/types/src/cms/ContentTypes/FlagsAndTags/index.d.ts +36 -0
- package/src/types/src/cms/ContentTypes/Footer/index.d.ts +44 -0
- package/src/types/src/cms/ContentTypes/Header/index.d.ts +52 -0
- package/src/types/src/cms/ContentTypes/HelpButton/index.d.ts +29 -0
- package/src/types/src/cms/ContentTypes/LPLojas/index.d.ts +11 -0
- package/src/types/src/cms/ContentTypes/LookbookPage/index.d.ts +38 -0
- package/src/types/src/cms/ContentTypes/NotFoundPage/index.d.ts +14 -0
- package/src/types/src/cms/ContentTypes/PDP/index.d.ts +0 -0
- package/src/types/src/cms/ContentTypes/PLP/index.d.ts +0 -0
- package/src/types/src/cms/ContentTypes/PolicyPage/index.d.ts +37 -0
- package/src/types/src/cms/ContentTypes/PreHome/index.d.ts +20 -0
- package/src/types/src/cms/ContentTypes/Redirects/index.d.ts +20 -0
- package/src/types/src/cms/ContentTypes/Search/index.d.ts +0 -0
- package/src/types/src/cms/ContentTypes/Tipbar/index.d.ts +43 -0
- package/src/types/src/cms/ContentTypes/Wishlist/index.d.ts +0 -0
- package/src/types/src/cms/Factories/index.d.ts +69 -0
- package/src/types/src/cms/Sections/Banner/index.d.ts +48 -0
- package/src/types/src/cms/Sections/BannerCarousel/index.d.ts +20 -0
- package/src/types/src/cms/Sections/BennefitsBar/index.d.ts +19 -0
- package/src/types/src/cms/Sections/HeaderSubmenu/index.d.ts +34 -0
- package/src/types/src/cms/Sections/ImageGrid/index.d.ts +9 -0
- package/src/types/src/cms/Sections/ListProductsBanners/index.d.ts +12 -0
- package/src/types/src/cms/Sections/Newsletter/index.d.ts +19 -0
- package/src/types/src/cms/Sections/ProductCarousel/index.d.ts +0 -0
- package/src/types/src/cms/Sections/TextAccordion/index.d.ts +7 -0
- package/src/types/src/cms/Sections/TextContent/index.d.ts +24 -0
- package/src/types/src/cms/Sections/_common/index.d.ts +8 -0
- package/src/types/src/constants.d.ts +2 -0
- package/src/types/src/contexts/hooks/index.d.ts +6 -0
- package/src/types/src/contexts/store/pdp.d.ts +127 -0
- package/src/types/src/contexts/store/selectedSKU.d.ts +10 -0
- package/src/types/src/data/events/index.d.ts +111 -0
- package/src/types/src/global/product/index.d.ts +295 -0
- package/src/types/src/product/index.d.ts +295 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { MutableRefObject, PropsWithChildren } from 'react';
|
|
2
|
+
export interface ItemListType {
|
|
3
|
+
item_list_name?: string | null;
|
|
4
|
+
item_list_id?: string | null;
|
|
5
|
+
}
|
|
6
|
+
export interface CommonDataType {
|
|
7
|
+
productData: any;
|
|
8
|
+
sizes: any[];
|
|
9
|
+
priceInfo: any;
|
|
10
|
+
breadcrumbList: any[];
|
|
11
|
+
items: any[];
|
|
12
|
+
}
|
|
13
|
+
export interface ProductEventsType {
|
|
14
|
+
type: EventType;
|
|
15
|
+
commonData: CommonDataType;
|
|
16
|
+
customData: any;
|
|
17
|
+
}
|
|
18
|
+
export interface PromotionType {
|
|
19
|
+
creative_name?: string;
|
|
20
|
+
creative_slot?: string;
|
|
21
|
+
promotion_id?: string;
|
|
22
|
+
promotion_name?: string;
|
|
23
|
+
}
|
|
24
|
+
export type EventsDataProps = {
|
|
25
|
+
event?: string;
|
|
26
|
+
commonData?: any;
|
|
27
|
+
customData?: any;
|
|
28
|
+
supportData?: any;
|
|
29
|
+
promotionInfo?: PromotionType;
|
|
30
|
+
readyData?: any;
|
|
31
|
+
itemList?: ItemListType;
|
|
32
|
+
outsideEcommerceData?: any;
|
|
33
|
+
};
|
|
34
|
+
export interface ProductCommonDataType {
|
|
35
|
+
productData: any;
|
|
36
|
+
priceInfo?: any;
|
|
37
|
+
sizes?: any[];
|
|
38
|
+
breadcrumbList?: any[];
|
|
39
|
+
availableSizes?: string[];
|
|
40
|
+
}
|
|
41
|
+
export type EventType = 'select_item' | 'view_item' | 'view_item_list';
|
|
42
|
+
export interface FunctionsKeyType {
|
|
43
|
+
productEvents: (props: EventsDataProps, callBack?: (itemData: any, customEcommerceData: any) => void) => void;
|
|
44
|
+
productListEvent: (props: EventsDataProps) => void;
|
|
45
|
+
skuEvents: (props: EventsDataProps) => void;
|
|
46
|
+
filterEvent: (props: EventsDataProps) => void;
|
|
47
|
+
viewCartEvent: (props: EventsDataProps) => void;
|
|
48
|
+
readyEvents: (props: EventsDataProps) => void;
|
|
49
|
+
}
|
|
50
|
+
export type SendDatalayerEventType = {
|
|
51
|
+
functionKey: FunctionsKeyType;
|
|
52
|
+
data: EventsDataProps;
|
|
53
|
+
callBack?: () => void;
|
|
54
|
+
timeout?: number;
|
|
55
|
+
};
|
|
56
|
+
export interface EventContextProps {
|
|
57
|
+
sendDataLayerEvent: (data: SendDatalayerEventType) => void;
|
|
58
|
+
triggerSelectItemEventRef: MutableRefObject<{
|
|
59
|
+
trigger: boolean;
|
|
60
|
+
index: number;
|
|
61
|
+
}>;
|
|
62
|
+
promotionEventRef: MutableRefObject<PromotionType>;
|
|
63
|
+
currentLocalRef: MutableRefObject<string | null>;
|
|
64
|
+
itemListRef: MutableRefObject<ItemListType | null>;
|
|
65
|
+
cartProductsFullDataRef: MutableRefObject<MinicartFullData>;
|
|
66
|
+
handleSelectContent: (data: HandleSelectContentType) => void;
|
|
67
|
+
handleSelectPromotionEvent: (data: HandleSelectPromotionEventType) => void;
|
|
68
|
+
}
|
|
69
|
+
declare const Pages: readonly ["home", "product", "catalog", "institutional", "landing_page"];
|
|
70
|
+
export interface CollectorProps {
|
|
71
|
+
page: (typeof Pages)[number] | string;
|
|
72
|
+
data?: unknown;
|
|
73
|
+
}
|
|
74
|
+
export interface StockType {
|
|
75
|
+
[key: string]: number;
|
|
76
|
+
}
|
|
77
|
+
export interface PersistedDataType {
|
|
78
|
+
promotionInfo?: PromotionType | null;
|
|
79
|
+
itemList?: ItemListType | null;
|
|
80
|
+
}
|
|
81
|
+
export interface ProductsPersisteDataType {
|
|
82
|
+
[key: string]: PersistedDataType;
|
|
83
|
+
}
|
|
84
|
+
export interface EventProviderProps extends PropsWithChildren {
|
|
85
|
+
evtFunctionsConfigs: {
|
|
86
|
+
PLP_FILTERS: {
|
|
87
|
+
key: string;
|
|
88
|
+
label: string;
|
|
89
|
+
eventLabel: string;
|
|
90
|
+
order: number;
|
|
91
|
+
}[];
|
|
92
|
+
currency: string;
|
|
93
|
+
categoryOff: string;
|
|
94
|
+
storeUrl: string;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export interface MinicartFullData {
|
|
98
|
+
/**
|
|
99
|
+
* TODO: add CartItemStore type
|
|
100
|
+
*/
|
|
101
|
+
[key: string]: any;
|
|
102
|
+
}
|
|
103
|
+
export type HandleSelectContentType = {
|
|
104
|
+
content: string;
|
|
105
|
+
};
|
|
106
|
+
export type HandleSelectPromotionEventType = {
|
|
107
|
+
updatePromotionRef: boolean;
|
|
108
|
+
promotion: PromotionType;
|
|
109
|
+
index?: number;
|
|
110
|
+
};
|
|
111
|
+
export {};
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import type { SizesExtended } from '@soma-vertical-web/foundations';
|
|
2
|
+
import type { HTMLAttributes } from 'react';
|
|
3
|
+
export type SizeInfoType = {
|
|
4
|
+
name: string;
|
|
5
|
+
sku: string;
|
|
6
|
+
value: string;
|
|
7
|
+
available: boolean;
|
|
8
|
+
sellerId: string;
|
|
9
|
+
sellerName: string;
|
|
10
|
+
isSellerDefault?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type InstallmentType = {
|
|
13
|
+
Value: number;
|
|
14
|
+
InterestRate: number;
|
|
15
|
+
TotalValuePlusInterestRate: number;
|
|
16
|
+
NumberOfInstallments: number;
|
|
17
|
+
PaymentSystemName: string;
|
|
18
|
+
PaymentSystemGroupName: string;
|
|
19
|
+
Name: string;
|
|
20
|
+
};
|
|
21
|
+
export type DeliverySlaSampleType = {
|
|
22
|
+
DeliverySlaPerTypes: any[];
|
|
23
|
+
Region: any;
|
|
24
|
+
};
|
|
25
|
+
export type PaymentOptionInstallmentType = {
|
|
26
|
+
count: number;
|
|
27
|
+
hasInterestRate: boolean;
|
|
28
|
+
interestRate: number;
|
|
29
|
+
value: number;
|
|
30
|
+
total: number;
|
|
31
|
+
sellerMerchantInstallments: {
|
|
32
|
+
id: string;
|
|
33
|
+
count: number;
|
|
34
|
+
hasInterestRate: boolean;
|
|
35
|
+
interestRate: number;
|
|
36
|
+
value: number;
|
|
37
|
+
total: number;
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
40
|
+
export type PaymentOptionType = {
|
|
41
|
+
paymentSystem: string;
|
|
42
|
+
bin: any;
|
|
43
|
+
paymentName: string;
|
|
44
|
+
paymentGroupName: string;
|
|
45
|
+
value: number;
|
|
46
|
+
installments: PaymentOptionInstallmentType[];
|
|
47
|
+
};
|
|
48
|
+
export type PaymentSystemType = {
|
|
49
|
+
id: number;
|
|
50
|
+
name: string;
|
|
51
|
+
groupName: string;
|
|
52
|
+
validator: any;
|
|
53
|
+
stringId: string;
|
|
54
|
+
template: string;
|
|
55
|
+
requiresDocument: boolean;
|
|
56
|
+
isCustom: boolean;
|
|
57
|
+
description: any;
|
|
58
|
+
requiresAuthentication: boolean;
|
|
59
|
+
dueDate: string;
|
|
60
|
+
availablePayments: any;
|
|
61
|
+
};
|
|
62
|
+
export type PaymentOptionsType = {
|
|
63
|
+
installmentOptions: PaymentOptionType[];
|
|
64
|
+
paymentSystems: PaymentSystemType[];
|
|
65
|
+
payments: any[];
|
|
66
|
+
giftCards: any[];
|
|
67
|
+
giftCardMessages: any[];
|
|
68
|
+
availableAccounts: any[];
|
|
69
|
+
availableTokens: any[];
|
|
70
|
+
};
|
|
71
|
+
export type CommertialOfferType = {
|
|
72
|
+
DeliverySlaSamplesPerRegion: {
|
|
73
|
+
[key: string]: DeliverySlaSampleType;
|
|
74
|
+
};
|
|
75
|
+
Installments: InstallmentType[];
|
|
76
|
+
DiscountHighLight: any[];
|
|
77
|
+
GiftSkuIds: any[];
|
|
78
|
+
Teasers: any[];
|
|
79
|
+
PromotionTeasers: any[];
|
|
80
|
+
BuyTogether: any[];
|
|
81
|
+
ItemMetadataAttachment: any[];
|
|
82
|
+
Price: number;
|
|
83
|
+
ListPrice: number;
|
|
84
|
+
PriceWithoutDiscount: number;
|
|
85
|
+
FullSellingPrice: number;
|
|
86
|
+
RewardValue: number;
|
|
87
|
+
PriceValidUntil: string;
|
|
88
|
+
AvailableQuantity: number;
|
|
89
|
+
IsAvailable: boolean;
|
|
90
|
+
Tax: number;
|
|
91
|
+
DeliverySlaSamples: DeliverySlaSampleType[];
|
|
92
|
+
GetInfoErrorMessage: any;
|
|
93
|
+
CacheVersionUsedToCallCheckout: string;
|
|
94
|
+
PaymentOptions: PaymentOptionsType;
|
|
95
|
+
};
|
|
96
|
+
export type SellerType = {
|
|
97
|
+
sellerId: string;
|
|
98
|
+
sellerName: string;
|
|
99
|
+
addToCartLink: string;
|
|
100
|
+
sellerDefault: boolean;
|
|
101
|
+
commertialOffer: CommertialOfferType;
|
|
102
|
+
};
|
|
103
|
+
export type ImageType = {
|
|
104
|
+
imageId: string;
|
|
105
|
+
imageLabel: string;
|
|
106
|
+
imageTag: string;
|
|
107
|
+
imageUrl: string;
|
|
108
|
+
imageText: string;
|
|
109
|
+
imageLastModified: string;
|
|
110
|
+
};
|
|
111
|
+
export type ReferenceIdType = {
|
|
112
|
+
Key: string;
|
|
113
|
+
Value: string;
|
|
114
|
+
};
|
|
115
|
+
export type ItemType = {
|
|
116
|
+
itemId: string;
|
|
117
|
+
name: string;
|
|
118
|
+
nameComplete: string;
|
|
119
|
+
complementName: string;
|
|
120
|
+
ean: string;
|
|
121
|
+
referenceId: ReferenceIdType[];
|
|
122
|
+
measurementUnit: string;
|
|
123
|
+
unitMultiplier: number;
|
|
124
|
+
modalType: string | null;
|
|
125
|
+
isKit: boolean;
|
|
126
|
+
images: ImageType[];
|
|
127
|
+
Tamanho: string[];
|
|
128
|
+
variations: string[];
|
|
129
|
+
Videos: any[];
|
|
130
|
+
estimatedDateArrival: string | null;
|
|
131
|
+
sellers: SellerType[];
|
|
132
|
+
};
|
|
133
|
+
export type HasVariant = {
|
|
134
|
+
name: string;
|
|
135
|
+
slug: string;
|
|
136
|
+
sku: string;
|
|
137
|
+
additionalProperty: Array<{
|
|
138
|
+
propertyID: string;
|
|
139
|
+
value: string;
|
|
140
|
+
name: string;
|
|
141
|
+
valueReference: string;
|
|
142
|
+
}>;
|
|
143
|
+
offers: {
|
|
144
|
+
offers: Array<{
|
|
145
|
+
listPrice: number;
|
|
146
|
+
price: number;
|
|
147
|
+
availability: string;
|
|
148
|
+
quantity?: number;
|
|
149
|
+
seller: {
|
|
150
|
+
identifier: string;
|
|
151
|
+
};
|
|
152
|
+
}>;
|
|
153
|
+
};
|
|
154
|
+
productId?: string;
|
|
155
|
+
};
|
|
156
|
+
export type ProductType = {
|
|
157
|
+
productId: string;
|
|
158
|
+
productName: string;
|
|
159
|
+
brand: string;
|
|
160
|
+
brandId: number;
|
|
161
|
+
brandImageUrl: string | null;
|
|
162
|
+
linkText: string;
|
|
163
|
+
productReference: string;
|
|
164
|
+
productReferenceCode: string;
|
|
165
|
+
categoryId: string;
|
|
166
|
+
productTitle: string;
|
|
167
|
+
metaTagDescription: string;
|
|
168
|
+
releaseDate: string;
|
|
169
|
+
clusterHighlights: Record<string, string>;
|
|
170
|
+
productClusters: Record<string, string>;
|
|
171
|
+
searchableClusters: Record<string, string>;
|
|
172
|
+
categories: string[];
|
|
173
|
+
categoriesIds: string[];
|
|
174
|
+
link: string;
|
|
175
|
+
Informação: string[];
|
|
176
|
+
'Tipo de Cor': string[];
|
|
177
|
+
Composição: string[];
|
|
178
|
+
'Tipo de Produto': string[];
|
|
179
|
+
SALE: string[];
|
|
180
|
+
Coleção: string[];
|
|
181
|
+
'Coleção Atual': string[];
|
|
182
|
+
'ID Coleção': string[];
|
|
183
|
+
'Tabela de Medidas': string[];
|
|
184
|
+
'Cores Filtráveis': string[];
|
|
185
|
+
Especificação: string[];
|
|
186
|
+
allSpecifications: string[];
|
|
187
|
+
allSpecificationsGroups: string[];
|
|
188
|
+
description: string;
|
|
189
|
+
items: ItemType[];
|
|
190
|
+
skuSpecifications: {
|
|
191
|
+
field: {
|
|
192
|
+
id: number;
|
|
193
|
+
name: string;
|
|
194
|
+
isActive: boolean;
|
|
195
|
+
position: number;
|
|
196
|
+
type: string;
|
|
197
|
+
};
|
|
198
|
+
values: {
|
|
199
|
+
id: string;
|
|
200
|
+
name: string;
|
|
201
|
+
position: number;
|
|
202
|
+
}[];
|
|
203
|
+
}[];
|
|
204
|
+
};
|
|
205
|
+
export type Product = {
|
|
206
|
+
sku: string;
|
|
207
|
+
gtin: string;
|
|
208
|
+
name: string;
|
|
209
|
+
description: string;
|
|
210
|
+
releaseDate: string;
|
|
211
|
+
slug: string;
|
|
212
|
+
video: string | null;
|
|
213
|
+
categories: string[];
|
|
214
|
+
categoryId: string;
|
|
215
|
+
categoriesIds: string[];
|
|
216
|
+
id: string;
|
|
217
|
+
brand: {
|
|
218
|
+
name: string;
|
|
219
|
+
};
|
|
220
|
+
seo: {
|
|
221
|
+
title: string;
|
|
222
|
+
description: string;
|
|
223
|
+
canonical: string;
|
|
224
|
+
};
|
|
225
|
+
cluster: {
|
|
226
|
+
generals: Array<{
|
|
227
|
+
id: string;
|
|
228
|
+
name: string;
|
|
229
|
+
}>;
|
|
230
|
+
highlights: Array<{
|
|
231
|
+
id: string;
|
|
232
|
+
name: string;
|
|
233
|
+
}>;
|
|
234
|
+
};
|
|
235
|
+
availability: {
|
|
236
|
+
status: boolean;
|
|
237
|
+
};
|
|
238
|
+
breadcrumbList: {
|
|
239
|
+
itemListElement: Array<{
|
|
240
|
+
item: string;
|
|
241
|
+
name: string;
|
|
242
|
+
position: number;
|
|
243
|
+
}>;
|
|
244
|
+
};
|
|
245
|
+
image: Array<{
|
|
246
|
+
url: string;
|
|
247
|
+
alternateName: string;
|
|
248
|
+
keywords: string;
|
|
249
|
+
}>;
|
|
250
|
+
offers: {
|
|
251
|
+
lowPrice: number;
|
|
252
|
+
highPrice: number;
|
|
253
|
+
priceCurrency: string;
|
|
254
|
+
offers: Array<{
|
|
255
|
+
availability: string;
|
|
256
|
+
listPrice: number;
|
|
257
|
+
price: number;
|
|
258
|
+
quantity: number;
|
|
259
|
+
priceValidUntil: string;
|
|
260
|
+
priceCurrency: string;
|
|
261
|
+
itemCondition: string;
|
|
262
|
+
seller: {
|
|
263
|
+
identifier: string;
|
|
264
|
+
};
|
|
265
|
+
}>;
|
|
266
|
+
};
|
|
267
|
+
isVariantOf: {
|
|
268
|
+
productGroupID: string;
|
|
269
|
+
name: string;
|
|
270
|
+
hasVariant?: HasVariant[];
|
|
271
|
+
additionalProperty: Array<{
|
|
272
|
+
propertyID: string;
|
|
273
|
+
value: string | number;
|
|
274
|
+
name: string;
|
|
275
|
+
valueReference: string;
|
|
276
|
+
}>;
|
|
277
|
+
skuVariants: {
|
|
278
|
+
activeVariations: Record<string, string>;
|
|
279
|
+
allVariantsByName: Record<string, string[]>;
|
|
280
|
+
availableVariations: Record<string, Array<Record<string, string>>>;
|
|
281
|
+
} | null;
|
|
282
|
+
};
|
|
283
|
+
installments: {
|
|
284
|
+
count: number;
|
|
285
|
+
value: number;
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
export type Sizes = (typeof SizesExtended)[number];
|
|
289
|
+
export interface ProductCardMediaProps extends HTMLAttributes<HTMLDivElement> {
|
|
290
|
+
hasPriority?: boolean;
|
|
291
|
+
showVideo?: boolean;
|
|
292
|
+
}
|
|
293
|
+
export type ProductNode = {
|
|
294
|
+
node: Product;
|
|
295
|
+
};
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import type { SizesExtended } from '@soma-vertical-web/foundations';
|
|
2
|
+
import type { HTMLAttributes } from 'react';
|
|
3
|
+
export type SizeInfoType = {
|
|
4
|
+
name: string;
|
|
5
|
+
sku: string;
|
|
6
|
+
value: string;
|
|
7
|
+
available: boolean;
|
|
8
|
+
sellerId: string;
|
|
9
|
+
sellerName: string;
|
|
10
|
+
isSellerDefault?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type InstallmentType = {
|
|
13
|
+
Value: number;
|
|
14
|
+
InterestRate: number;
|
|
15
|
+
TotalValuePlusInterestRate: number;
|
|
16
|
+
NumberOfInstallments: number;
|
|
17
|
+
PaymentSystemName: string;
|
|
18
|
+
PaymentSystemGroupName: string;
|
|
19
|
+
Name: string;
|
|
20
|
+
};
|
|
21
|
+
export type DeliverySlaSampleType = {
|
|
22
|
+
DeliverySlaPerTypes: any[];
|
|
23
|
+
Region: any;
|
|
24
|
+
};
|
|
25
|
+
export type PaymentOptionInstallmentType = {
|
|
26
|
+
count: number;
|
|
27
|
+
hasInterestRate: boolean;
|
|
28
|
+
interestRate: number;
|
|
29
|
+
value: number;
|
|
30
|
+
total: number;
|
|
31
|
+
sellerMerchantInstallments: {
|
|
32
|
+
id: string;
|
|
33
|
+
count: number;
|
|
34
|
+
hasInterestRate: boolean;
|
|
35
|
+
interestRate: number;
|
|
36
|
+
value: number;
|
|
37
|
+
total: number;
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
40
|
+
export type PaymentOptionType = {
|
|
41
|
+
paymentSystem: string;
|
|
42
|
+
bin: any;
|
|
43
|
+
paymentName: string;
|
|
44
|
+
paymentGroupName: string;
|
|
45
|
+
value: number;
|
|
46
|
+
installments: PaymentOptionInstallmentType[];
|
|
47
|
+
};
|
|
48
|
+
export type PaymentSystemType = {
|
|
49
|
+
id: number;
|
|
50
|
+
name: string;
|
|
51
|
+
groupName: string;
|
|
52
|
+
validator: any;
|
|
53
|
+
stringId: string;
|
|
54
|
+
template: string;
|
|
55
|
+
requiresDocument: boolean;
|
|
56
|
+
isCustom: boolean;
|
|
57
|
+
description: any;
|
|
58
|
+
requiresAuthentication: boolean;
|
|
59
|
+
dueDate: string;
|
|
60
|
+
availablePayments: any;
|
|
61
|
+
};
|
|
62
|
+
export type PaymentOptionsType = {
|
|
63
|
+
installmentOptions: PaymentOptionType[];
|
|
64
|
+
paymentSystems: PaymentSystemType[];
|
|
65
|
+
payments: any[];
|
|
66
|
+
giftCards: any[];
|
|
67
|
+
giftCardMessages: any[];
|
|
68
|
+
availableAccounts: any[];
|
|
69
|
+
availableTokens: any[];
|
|
70
|
+
};
|
|
71
|
+
export type CommertialOfferType = {
|
|
72
|
+
DeliverySlaSamplesPerRegion: {
|
|
73
|
+
[key: string]: DeliverySlaSampleType;
|
|
74
|
+
};
|
|
75
|
+
Installments: InstallmentType[];
|
|
76
|
+
DiscountHighLight: any[];
|
|
77
|
+
GiftSkuIds: any[];
|
|
78
|
+
Teasers: any[];
|
|
79
|
+
PromotionTeasers: any[];
|
|
80
|
+
BuyTogether: any[];
|
|
81
|
+
ItemMetadataAttachment: any[];
|
|
82
|
+
Price: number;
|
|
83
|
+
ListPrice: number;
|
|
84
|
+
PriceWithoutDiscount: number;
|
|
85
|
+
FullSellingPrice: number;
|
|
86
|
+
RewardValue: number;
|
|
87
|
+
PriceValidUntil: string;
|
|
88
|
+
AvailableQuantity: number;
|
|
89
|
+
IsAvailable: boolean;
|
|
90
|
+
Tax: number;
|
|
91
|
+
DeliverySlaSamples: DeliverySlaSampleType[];
|
|
92
|
+
GetInfoErrorMessage: any;
|
|
93
|
+
CacheVersionUsedToCallCheckout: string;
|
|
94
|
+
PaymentOptions: PaymentOptionsType;
|
|
95
|
+
};
|
|
96
|
+
export type SellerType = {
|
|
97
|
+
sellerId: string;
|
|
98
|
+
sellerName: string;
|
|
99
|
+
addToCartLink: string;
|
|
100
|
+
sellerDefault: boolean;
|
|
101
|
+
commertialOffer: CommertialOfferType;
|
|
102
|
+
};
|
|
103
|
+
export type ImageType = {
|
|
104
|
+
imageId: string;
|
|
105
|
+
imageLabel: string;
|
|
106
|
+
imageTag: string;
|
|
107
|
+
imageUrl: string;
|
|
108
|
+
imageText: string;
|
|
109
|
+
imageLastModified: string;
|
|
110
|
+
};
|
|
111
|
+
export type ReferenceIdType = {
|
|
112
|
+
Key: string;
|
|
113
|
+
Value: string;
|
|
114
|
+
};
|
|
115
|
+
export type ItemType = {
|
|
116
|
+
itemId: string;
|
|
117
|
+
name: string;
|
|
118
|
+
nameComplete: string;
|
|
119
|
+
complementName: string;
|
|
120
|
+
ean: string;
|
|
121
|
+
referenceId: ReferenceIdType[];
|
|
122
|
+
measurementUnit: string;
|
|
123
|
+
unitMultiplier: number;
|
|
124
|
+
modalType: string | null;
|
|
125
|
+
isKit: boolean;
|
|
126
|
+
images: ImageType[];
|
|
127
|
+
Tamanho: string[];
|
|
128
|
+
variations: string[];
|
|
129
|
+
Videos: any[];
|
|
130
|
+
estimatedDateArrival: string | null;
|
|
131
|
+
sellers: SellerType[];
|
|
132
|
+
};
|
|
133
|
+
export type HasVariant = {
|
|
134
|
+
name: string;
|
|
135
|
+
slug: string;
|
|
136
|
+
sku: string;
|
|
137
|
+
additionalProperty: Array<{
|
|
138
|
+
propertyID: string;
|
|
139
|
+
value: string;
|
|
140
|
+
name: string;
|
|
141
|
+
valueReference: string;
|
|
142
|
+
}>;
|
|
143
|
+
offers: {
|
|
144
|
+
offers: Array<{
|
|
145
|
+
listPrice: number;
|
|
146
|
+
price: number;
|
|
147
|
+
availability: string;
|
|
148
|
+
quantity?: number;
|
|
149
|
+
seller: {
|
|
150
|
+
identifier: string;
|
|
151
|
+
};
|
|
152
|
+
}>;
|
|
153
|
+
};
|
|
154
|
+
productId?: string;
|
|
155
|
+
};
|
|
156
|
+
export type ProductType = {
|
|
157
|
+
productId: string;
|
|
158
|
+
productName: string;
|
|
159
|
+
brand: string;
|
|
160
|
+
brandId: number;
|
|
161
|
+
brandImageUrl: string | null;
|
|
162
|
+
linkText: string;
|
|
163
|
+
productReference: string;
|
|
164
|
+
productReferenceCode: string;
|
|
165
|
+
categoryId: string;
|
|
166
|
+
productTitle: string;
|
|
167
|
+
metaTagDescription: string;
|
|
168
|
+
releaseDate: string;
|
|
169
|
+
clusterHighlights: Record<string, string>;
|
|
170
|
+
productClusters: Record<string, string>;
|
|
171
|
+
searchableClusters: Record<string, string>;
|
|
172
|
+
categories: string[];
|
|
173
|
+
categoriesIds: string[];
|
|
174
|
+
link: string;
|
|
175
|
+
Informação: string[];
|
|
176
|
+
'Tipo de Cor': string[];
|
|
177
|
+
Composição: string[];
|
|
178
|
+
'Tipo de Produto': string[];
|
|
179
|
+
SALE: string[];
|
|
180
|
+
Coleção: string[];
|
|
181
|
+
'Coleção Atual': string[];
|
|
182
|
+
'ID Coleção': string[];
|
|
183
|
+
'Tabela de Medidas': string[];
|
|
184
|
+
'Cores Filtráveis': string[];
|
|
185
|
+
Especificação: string[];
|
|
186
|
+
allSpecifications: string[];
|
|
187
|
+
allSpecificationsGroups: string[];
|
|
188
|
+
description: string;
|
|
189
|
+
items: ItemType[];
|
|
190
|
+
skuSpecifications: {
|
|
191
|
+
field: {
|
|
192
|
+
id: number;
|
|
193
|
+
name: string;
|
|
194
|
+
isActive: boolean;
|
|
195
|
+
position: number;
|
|
196
|
+
type: string;
|
|
197
|
+
};
|
|
198
|
+
values: {
|
|
199
|
+
id: string;
|
|
200
|
+
name: string;
|
|
201
|
+
position: number;
|
|
202
|
+
}[];
|
|
203
|
+
}[];
|
|
204
|
+
};
|
|
205
|
+
export type Product = {
|
|
206
|
+
sku: string;
|
|
207
|
+
gtin: string;
|
|
208
|
+
name: string;
|
|
209
|
+
description: string;
|
|
210
|
+
releaseDate: string;
|
|
211
|
+
slug: string;
|
|
212
|
+
video: string | null;
|
|
213
|
+
categories: string[];
|
|
214
|
+
categoryId: string;
|
|
215
|
+
categoriesIds: string[];
|
|
216
|
+
id: string;
|
|
217
|
+
brand: {
|
|
218
|
+
name: string;
|
|
219
|
+
};
|
|
220
|
+
seo: {
|
|
221
|
+
title: string;
|
|
222
|
+
description: string;
|
|
223
|
+
canonical: string;
|
|
224
|
+
};
|
|
225
|
+
cluster: {
|
|
226
|
+
generals: Array<{
|
|
227
|
+
id: string;
|
|
228
|
+
name: string;
|
|
229
|
+
}>;
|
|
230
|
+
highlights: Array<{
|
|
231
|
+
id: string;
|
|
232
|
+
name: string;
|
|
233
|
+
}>;
|
|
234
|
+
};
|
|
235
|
+
availability: {
|
|
236
|
+
status: boolean;
|
|
237
|
+
};
|
|
238
|
+
breadcrumbList: {
|
|
239
|
+
itemListElement: Array<{
|
|
240
|
+
item: string;
|
|
241
|
+
name: string;
|
|
242
|
+
position: number;
|
|
243
|
+
}>;
|
|
244
|
+
};
|
|
245
|
+
image: Array<{
|
|
246
|
+
url: string;
|
|
247
|
+
alternateName: string;
|
|
248
|
+
keywords: string;
|
|
249
|
+
}>;
|
|
250
|
+
offers: {
|
|
251
|
+
lowPrice: number;
|
|
252
|
+
highPrice: number;
|
|
253
|
+
priceCurrency: string;
|
|
254
|
+
offers: Array<{
|
|
255
|
+
availability: string;
|
|
256
|
+
listPrice: number;
|
|
257
|
+
price: number;
|
|
258
|
+
quantity: number;
|
|
259
|
+
priceValidUntil: string;
|
|
260
|
+
priceCurrency: string;
|
|
261
|
+
itemCondition: string;
|
|
262
|
+
seller: {
|
|
263
|
+
identifier: string;
|
|
264
|
+
};
|
|
265
|
+
}>;
|
|
266
|
+
};
|
|
267
|
+
isVariantOf: {
|
|
268
|
+
productGroupID: string;
|
|
269
|
+
name: string;
|
|
270
|
+
hasVariant?: HasVariant[];
|
|
271
|
+
additionalProperty: Array<{
|
|
272
|
+
propertyID: string;
|
|
273
|
+
value: string | number;
|
|
274
|
+
name: string;
|
|
275
|
+
valueReference: string;
|
|
276
|
+
}>;
|
|
277
|
+
skuVariants: {
|
|
278
|
+
activeVariations: Record<string, string>;
|
|
279
|
+
allVariantsByName: Record<string, string[]>;
|
|
280
|
+
availableVariations: Record<string, Array<Record<string, string>>>;
|
|
281
|
+
} | null;
|
|
282
|
+
};
|
|
283
|
+
installments: {
|
|
284
|
+
count: number;
|
|
285
|
+
value: number;
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
export type Sizes = (typeof SizesExtended)[number];
|
|
289
|
+
export interface ProductCardMediaProps extends HTMLAttributes<HTMLDivElement> {
|
|
290
|
+
hasPriority?: boolean;
|
|
291
|
+
showVideo?: boolean;
|
|
292
|
+
}
|
|
293
|
+
export type ProductNode = {
|
|
294
|
+
node: Product;
|
|
295
|
+
};
|