pim-import 2.78.0 → 2.78.3
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/dist/pim/data/productFields.json +245 -0
- package/dist/pim/methods/dictionary.js +7 -40
- package/dist/pim/methods/dictionary.js.map +1 -1
- package/dist/pim/methods/products.js +4 -1
- package/dist/pim/methods/products.js.map +1 -1
- package/dist/pim/methods/subfamilies.js +4 -1
- package/dist/pim/methods/subfamilies.js.map +1 -1
- package/package.json +5 -1
- package/src/pim/data/productFields.json +245 -0
- package/src/pim/methods/dictionary.ts +11 -78
- package/src/pim/methods/products.ts +4 -1
- package/src/pim/methods/subfamilies.ts +6 -1
- package/tsconfig.json +2 -1
- package/types/algolia/clean.d.ts +10 -0
- package/types/algolia/config.d.ts +96 -0
- package/types/algolia/downloads.d.ts +36 -0
- package/types/algolia/families.d.ts +48 -0
- package/types/algolia/models.d.ts +31 -0
- package/types/algolia/news.d.ts +33 -0
- package/types/algolia/pipedreamReindex.d.ts +4 -0
- package/types/algolia/pressRelease.d.ts +33 -0
- package/types/algolia/pressReview.d.ts +33 -0
- package/types/algolia/products.d.ts +75 -0
- package/types/algolia/projects.d.ts +43 -0
- package/types/algolia/stories.d.ts +43 -0
- package/types/algolia/subFamilies.d.ts +28 -0
- package/types/algolia/subModels.d.ts +29 -0
- package/types/browser.d.ts +32 -0
- package/types/downloads/classes/manageEntry.d.ts +10 -0
- package/types/downloads/import.d.ts +1 -0
- package/types/index.d.ts +32 -0
- package/types/libs/contentful-cda.d.ts +20 -0
- package/types/libs/contentful.d.ts +59 -0
- package/types/libs/imgix.d.ts +14 -0
- package/types/libs/logs.d.ts +8 -0
- package/types/libs/puppeteer.d.ts +11 -0
- package/types/libs/s3.d.ts +22 -0
- package/types/libs/sentry.d.ts +2 -0
- package/types/pim/config.d.ts +13 -0
- package/types/pim/endpoints.d.ts +20 -0
- package/types/pim/methods/catalogs.d.ts +21 -0
- package/types/pim/methods/dailyProductsUpdate.d.ts +2 -0
- package/types/pim/methods/dictionary.d.ts +6 -0
- package/types/pim/methods/families.d.ts +4 -0
- package/types/pim/methods/latestProducts.d.ts +12 -0
- package/types/pim/methods/models.d.ts +2 -0
- package/types/pim/methods/pages/catalogs.d.ts +3 -0
- package/types/pim/methods/pages/families.d.ts +6 -0
- package/types/pim/methods/pages/subfamilies.d.ts +12 -0
- package/types/pim/methods/products.d.ts +47 -0
- package/types/pim/methods/subfamilies.d.ts +13 -0
- package/types/pim/methods/submodels.d.ts +2 -0
- package/types/pim/request.d.ts +5 -0
- package/types/resources/AllProducts.d.ts +42 -0
- package/types/resources/Audit.d.ts +24 -0
- package/types/resources/CatalogDetails.d.ts +46 -0
- package/types/resources/CollectionModels.d.ts +41 -0
- package/types/resources/CollectionSubFamilies.d.ts +45 -0
- package/types/resources/CollectionSubModels.d.ts +36 -0
- package/types/resources/DProductSubLine.d.ts +34 -0
- package/types/resources/FamilyDetails.d.ts +31 -0
- package/types/resources/ProductDetails.d.ts +346 -0
- package/types/resources/ProductRelation.d.ts +25 -0
- package/types/resources/cfFields.d.ts +8 -0
- package/types/types.d.ts +188 -0
- package/types/utils.d.ts +19 -0
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { AvailableCatalogs } from "../types";
|
|
2
|
+
export interface ProductDetails {
|
|
3
|
+
code: string;
|
|
4
|
+
name: string;
|
|
5
|
+
priority: number;
|
|
6
|
+
ean?: null;
|
|
7
|
+
webNaming: string;
|
|
8
|
+
description1_en: string;
|
|
9
|
+
description1_en_us: string;
|
|
10
|
+
description1_it: string;
|
|
11
|
+
description1_es: string;
|
|
12
|
+
description1_de: string;
|
|
13
|
+
description1_fr: string;
|
|
14
|
+
description1_sv: string;
|
|
15
|
+
description1_no: string;
|
|
16
|
+
description1_da: string;
|
|
17
|
+
description1_ru: string;
|
|
18
|
+
description2_en?: null;
|
|
19
|
+
description2_en_us?: null;
|
|
20
|
+
description2_it?: null;
|
|
21
|
+
description2_es?: null;
|
|
22
|
+
description2_de?: null;
|
|
23
|
+
description2_fr?: null;
|
|
24
|
+
description2_sv?: null;
|
|
25
|
+
description2_no?: null;
|
|
26
|
+
description2_da?: null;
|
|
27
|
+
description2_ru?: null;
|
|
28
|
+
note_en?: null;
|
|
29
|
+
note_en_us?: null;
|
|
30
|
+
note_it?: null;
|
|
31
|
+
note_es?: null;
|
|
32
|
+
note_de?: null;
|
|
33
|
+
note_fr?: null;
|
|
34
|
+
note_sv?: null;
|
|
35
|
+
note_no?: null;
|
|
36
|
+
note_da?: null;
|
|
37
|
+
note_ru?: null;
|
|
38
|
+
applications?: null[] | null;
|
|
39
|
+
productGroup: ProductGroup;
|
|
40
|
+
productLine: GenericData;
|
|
41
|
+
productLineDetail?: GenericData;
|
|
42
|
+
productLineLegacy: GenericData;
|
|
43
|
+
productStatus: GenericData;
|
|
44
|
+
visibleToWeb: boolean;
|
|
45
|
+
lastModified: LastModified;
|
|
46
|
+
upgrade?: null;
|
|
47
|
+
designYear: string;
|
|
48
|
+
mainColour: GenericData;
|
|
49
|
+
baseColour?: null;
|
|
50
|
+
internalColour?: null;
|
|
51
|
+
externalColour?: null;
|
|
52
|
+
profileColour?: null;
|
|
53
|
+
structureColour?: null;
|
|
54
|
+
colourVariants?: ColourVariant[] | null;
|
|
55
|
+
mountings?: GenericData[] | null;
|
|
56
|
+
environments?: GenericData[] | null;
|
|
57
|
+
quickDelivery: GenericData;
|
|
58
|
+
upgradeProduct?: null;
|
|
59
|
+
accessories?: AccessoriesEntity[] | null;
|
|
60
|
+
accessoryOf?: null[] | null;
|
|
61
|
+
bulbs?: null[] | null;
|
|
62
|
+
spareparts?: null[] | null;
|
|
63
|
+
designers?: GenericData[] | null;
|
|
64
|
+
assets?: AssetsEntity[] | null;
|
|
65
|
+
brands?: GenericData[] | null;
|
|
66
|
+
madeIn?: null[] | null;
|
|
67
|
+
accessoryTypes?: null[] | null;
|
|
68
|
+
priceLists?: null[] | null;
|
|
69
|
+
markets?: GenericData[] | null;
|
|
70
|
+
models?: ModelsEntityOrParentModel[] | null;
|
|
71
|
+
submodels?: SubmodelsEntity[] | null;
|
|
72
|
+
productionSite: GenericData;
|
|
73
|
+
certification: Certification;
|
|
74
|
+
marking: Marking;
|
|
75
|
+
optical: Optical;
|
|
76
|
+
electrical: Electrical;
|
|
77
|
+
photometric: Photometric;
|
|
78
|
+
physical: Physical;
|
|
79
|
+
logistic: Logistic;
|
|
80
|
+
urlVideo1?: null;
|
|
81
|
+
urlVideo2?: null;
|
|
82
|
+
spareParts?: null;
|
|
83
|
+
catalogs?: CatalogsEntity[] | null;
|
|
84
|
+
currentCatalog?: CatalogsEntity | null;
|
|
85
|
+
}
|
|
86
|
+
export interface ProductGroup {
|
|
87
|
+
code: string;
|
|
88
|
+
name: string;
|
|
89
|
+
priority: number;
|
|
90
|
+
catalog: string;
|
|
91
|
+
description: string;
|
|
92
|
+
productLine: GenericData;
|
|
93
|
+
products?: null;
|
|
94
|
+
lastModified: LastModified;
|
|
95
|
+
}
|
|
96
|
+
export interface GenericData {
|
|
97
|
+
code: string;
|
|
98
|
+
image?: null;
|
|
99
|
+
imageAlternative?: null;
|
|
100
|
+
value_en: string;
|
|
101
|
+
value_en_US?: string;
|
|
102
|
+
value_it: string;
|
|
103
|
+
value_es: string;
|
|
104
|
+
value_de: string;
|
|
105
|
+
value_fr: string;
|
|
106
|
+
value_sv: string;
|
|
107
|
+
value_no: string;
|
|
108
|
+
value_da: string;
|
|
109
|
+
value_ru: string;
|
|
110
|
+
othersData: OthersData;
|
|
111
|
+
}
|
|
112
|
+
export interface OthersData {
|
|
113
|
+
}
|
|
114
|
+
export interface LastModified {
|
|
115
|
+
year: number;
|
|
116
|
+
month: number;
|
|
117
|
+
dayOfMonth: number;
|
|
118
|
+
hourOfDay: number;
|
|
119
|
+
minute: number;
|
|
120
|
+
second: number;
|
|
121
|
+
}
|
|
122
|
+
export interface AccessoriesEntity {
|
|
123
|
+
code: string;
|
|
124
|
+
productLine: GenericData;
|
|
125
|
+
quantity: string;
|
|
126
|
+
typeCode?: null;
|
|
127
|
+
typeLabel: string;
|
|
128
|
+
}
|
|
129
|
+
export interface AssetsEntity {
|
|
130
|
+
title_en?: null;
|
|
131
|
+
title_en_us?: null;
|
|
132
|
+
title_it?: null;
|
|
133
|
+
title_es?: null;
|
|
134
|
+
title_de?: null;
|
|
135
|
+
title_fr?: null;
|
|
136
|
+
title_sv?: null;
|
|
137
|
+
title_no?: null;
|
|
138
|
+
title_da?: null;
|
|
139
|
+
title_ru?: null;
|
|
140
|
+
url: string;
|
|
141
|
+
md5: string;
|
|
142
|
+
assetType: GenericData;
|
|
143
|
+
}
|
|
144
|
+
export interface Certification {
|
|
145
|
+
enec: GenericData;
|
|
146
|
+
ul: GenericData;
|
|
147
|
+
rgCertified?: null;
|
|
148
|
+
euRule?: null;
|
|
149
|
+
certificates?: GenericData[] | null;
|
|
150
|
+
}
|
|
151
|
+
export interface Marking {
|
|
152
|
+
externalIp: GenericData;
|
|
153
|
+
ipCategory: GenericData;
|
|
154
|
+
energyLabel: GenericData;
|
|
155
|
+
lightObjMinDist: number;
|
|
156
|
+
fMarking: GenericData;
|
|
157
|
+
ilcos: string;
|
|
158
|
+
ik?: null;
|
|
159
|
+
markings?: null;
|
|
160
|
+
dynamicLoad: string;
|
|
161
|
+
staticLoad: string;
|
|
162
|
+
designAwards?: null[] | null;
|
|
163
|
+
casambi?: null;
|
|
164
|
+
}
|
|
165
|
+
export interface Optical {
|
|
166
|
+
numberOfHeads: number;
|
|
167
|
+
lightingTypes?: GenericData[] | null;
|
|
168
|
+
opticalType: GenericData;
|
|
169
|
+
lightingDistributions?: GenericData[] | null;
|
|
170
|
+
reflectorFinish?: null;
|
|
171
|
+
screenFinish?: null;
|
|
172
|
+
}
|
|
173
|
+
export interface Electrical {
|
|
174
|
+
frequency: string;
|
|
175
|
+
powerSupply: GenericData;
|
|
176
|
+
powerSupplyType?: GenericData[] | null;
|
|
177
|
+
mainsVoltage: string;
|
|
178
|
+
dimming?: GenericData[] | null;
|
|
179
|
+
lampCategories?: GenericData[] | null;
|
|
180
|
+
emergency: GenericData;
|
|
181
|
+
wPower: string;
|
|
182
|
+
lampNumber?: null;
|
|
183
|
+
lampHolders?: null;
|
|
184
|
+
current: string;
|
|
185
|
+
powerFactor?: null;
|
|
186
|
+
systemPower?: null;
|
|
187
|
+
emergencyLightingFlux?: null;
|
|
188
|
+
batteries?: null;
|
|
189
|
+
batteryType?: null;
|
|
190
|
+
rechargeConnector?: null;
|
|
191
|
+
inductionRecharge?: null;
|
|
192
|
+
rechargeCycleGuaranteed?: null;
|
|
193
|
+
minTimeRecharge?: null;
|
|
194
|
+
rechargePowerMax?: null;
|
|
195
|
+
insulationClass: GenericData;
|
|
196
|
+
lightSourceIncluded?: null;
|
|
197
|
+
lightSourceType?: null;
|
|
198
|
+
bulbAndLed?: null;
|
|
199
|
+
lampType?: null;
|
|
200
|
+
vac?: null;
|
|
201
|
+
vdc?: null;
|
|
202
|
+
phases?: null[] | null;
|
|
203
|
+
dimmingInterfaces?: null[] | null;
|
|
204
|
+
dimmingRange?: null;
|
|
205
|
+
forwardVoltage?: null;
|
|
206
|
+
maximumWattage?: null;
|
|
207
|
+
driverInputVoltage?: null;
|
|
208
|
+
driverOutputVoltage?: null;
|
|
209
|
+
lightSourceReplaceable?: null[] | null;
|
|
210
|
+
}
|
|
211
|
+
export interface Photometric {
|
|
212
|
+
ledTypes?: GenericData[] | null;
|
|
213
|
+
beam0_180: number;
|
|
214
|
+
beam90_270: number;
|
|
215
|
+
beamind0_180?: null;
|
|
216
|
+
beamind90_270?: null;
|
|
217
|
+
realNetFlow: string;
|
|
218
|
+
realGrossFlow: string;
|
|
219
|
+
temperatureColor: GenericData;
|
|
220
|
+
cri: GenericData;
|
|
221
|
+
criThreshold: string;
|
|
222
|
+
sdcm?: null;
|
|
223
|
+
efficacy?: null;
|
|
224
|
+
ugrl?: null;
|
|
225
|
+
lifespan?: null;
|
|
226
|
+
actualPhotometryReference?: null;
|
|
227
|
+
cutOff?: null;
|
|
228
|
+
}
|
|
229
|
+
export interface Physical {
|
|
230
|
+
trim: GenericData;
|
|
231
|
+
bezelDiameter?: null;
|
|
232
|
+
constructionMaterial?: null;
|
|
233
|
+
recessedDepth: string;
|
|
234
|
+
spotDiameter: string;
|
|
235
|
+
width?: null;
|
|
236
|
+
length: number;
|
|
237
|
+
height?: null;
|
|
238
|
+
rotation: number;
|
|
239
|
+
suspensionType: GenericData;
|
|
240
|
+
orientations?: GenericData[] | null;
|
|
241
|
+
longitudinalTilting: number;
|
|
242
|
+
bezelTrimDimension?: null;
|
|
243
|
+
cableIngress?: null;
|
|
244
|
+
preCabled?: null;
|
|
245
|
+
plugTypes?: null;
|
|
246
|
+
diameterDecor?: null;
|
|
247
|
+
cordLenght?: null;
|
|
248
|
+
h2oStop?: null;
|
|
249
|
+
cuttableField?: null;
|
|
250
|
+
shapes?: GenericData[] | null;
|
|
251
|
+
}
|
|
252
|
+
export interface Logistic {
|
|
253
|
+
netWeight: string;
|
|
254
|
+
netWeight_us: string;
|
|
255
|
+
}
|
|
256
|
+
export interface CatalogsEntity {
|
|
257
|
+
catalogCode?: AvailableCatalogs | null;
|
|
258
|
+
categoryCode?: string | null;
|
|
259
|
+
subFamilyCode?: string | null;
|
|
260
|
+
familyCode?: string | null;
|
|
261
|
+
childFamilyCode?: null;
|
|
262
|
+
}
|
|
263
|
+
export interface ModelsEntityOrParentModel {
|
|
264
|
+
data: GenericData;
|
|
265
|
+
priority: number;
|
|
266
|
+
subFamilyCode: string;
|
|
267
|
+
productLineCode: string;
|
|
268
|
+
description1_en?: null;
|
|
269
|
+
description1_it?: null;
|
|
270
|
+
description1_de?: null;
|
|
271
|
+
description1_fr?: null;
|
|
272
|
+
description1_es?: null;
|
|
273
|
+
description1_sv?: null;
|
|
274
|
+
description1_no?: null;
|
|
275
|
+
description1_da?: null;
|
|
276
|
+
description1_ru?: null;
|
|
277
|
+
description1_en_us?: null;
|
|
278
|
+
description2_en?: null;
|
|
279
|
+
description2_it?: null;
|
|
280
|
+
description2_de?: null;
|
|
281
|
+
description2_fr?: null;
|
|
282
|
+
description2_es?: null;
|
|
283
|
+
description2_sv?: null;
|
|
284
|
+
description2_no?: null;
|
|
285
|
+
description2_da?: null;
|
|
286
|
+
description2_ru?: null;
|
|
287
|
+
description2_en_us?: null;
|
|
288
|
+
code?: null;
|
|
289
|
+
image?: null;
|
|
290
|
+
imageAlternative?: null;
|
|
291
|
+
value_en?: null;
|
|
292
|
+
value_en_US?: null;
|
|
293
|
+
value_it?: null;
|
|
294
|
+
value_es?: null;
|
|
295
|
+
value_de?: null;
|
|
296
|
+
value_fr?: null;
|
|
297
|
+
value_sv?: null;
|
|
298
|
+
value_no?: null;
|
|
299
|
+
value_da?: null;
|
|
300
|
+
value_ru?: null;
|
|
301
|
+
othersData: OthersData;
|
|
302
|
+
}
|
|
303
|
+
export interface SubmodelsEntity {
|
|
304
|
+
data: GenericData;
|
|
305
|
+
priority: number;
|
|
306
|
+
subFamilyCode?: null;
|
|
307
|
+
productLineCode?: null;
|
|
308
|
+
parentModel: ModelsEntityOrParentModel;
|
|
309
|
+
description1_en?: null;
|
|
310
|
+
description1_it?: null;
|
|
311
|
+
description1_de?: null;
|
|
312
|
+
description1_fr?: null;
|
|
313
|
+
description1_es?: null;
|
|
314
|
+
description1_sv?: null;
|
|
315
|
+
description1_no?: null;
|
|
316
|
+
description1_da?: null;
|
|
317
|
+
description1_ru?: null;
|
|
318
|
+
description1_en_us?: null;
|
|
319
|
+
description2_en?: null;
|
|
320
|
+
description2_it?: null;
|
|
321
|
+
description2_de?: null;
|
|
322
|
+
description2_fr?: null;
|
|
323
|
+
description2_es?: null;
|
|
324
|
+
description2_sv?: null;
|
|
325
|
+
description2_no?: null;
|
|
326
|
+
description2_da?: null;
|
|
327
|
+
description2_ru?: null;
|
|
328
|
+
description2_en_us?: null;
|
|
329
|
+
code?: null;
|
|
330
|
+
image?: null;
|
|
331
|
+
imageAlternative?: null;
|
|
332
|
+
value_en?: null;
|
|
333
|
+
value_en_US?: null;
|
|
334
|
+
value_it?: null;
|
|
335
|
+
value_es?: null;
|
|
336
|
+
value_de?: null;
|
|
337
|
+
value_fr?: null;
|
|
338
|
+
value_sv?: null;
|
|
339
|
+
value_no?: null;
|
|
340
|
+
value_da?: null;
|
|
341
|
+
value_ru?: null;
|
|
342
|
+
othersData: OthersData;
|
|
343
|
+
}
|
|
344
|
+
export interface ColourVariant {
|
|
345
|
+
code: string;
|
|
346
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface ProductRelation {
|
|
2
|
+
code: string;
|
|
3
|
+
quantity: string;
|
|
4
|
+
typeCode?: null;
|
|
5
|
+
typeLabel: string;
|
|
6
|
+
productLine: ProductLine;
|
|
7
|
+
}
|
|
8
|
+
export interface ProductLine {
|
|
9
|
+
code: string;
|
|
10
|
+
image?: null;
|
|
11
|
+
value_da: string;
|
|
12
|
+
value_de: string;
|
|
13
|
+
value_en: string;
|
|
14
|
+
value_es: string;
|
|
15
|
+
value_fr: string;
|
|
16
|
+
value_it: string;
|
|
17
|
+
value_no: string;
|
|
18
|
+
value_ru: string;
|
|
19
|
+
value_sv: string;
|
|
20
|
+
othersData: OthersData;
|
|
21
|
+
value_en_US: string;
|
|
22
|
+
imageAlternative?: null;
|
|
23
|
+
}
|
|
24
|
+
export interface OthersData {
|
|
25
|
+
}
|
package/types/types.d.ts
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
export declare type AvailableCatalogs = "ARCHITECTURAL" | "OUTDOOR" | "DECORATIVE";
|
|
2
|
+
export declare type AvailableEntryStatus = "Published" | "Changed" | "Draft" | "Archived";
|
|
3
|
+
export declare type NonEmptyArray<T> = [T, ...T[]];
|
|
4
|
+
export declare type ObjectPartial = Partial<Record<string, any>>;
|
|
5
|
+
export type { Config as ContentfulConfig } from "./libs/contentful";
|
|
6
|
+
export declare type PimLocale = "en" | "en_US" | "it" | "es" | "de" | "fr" | "sv" | "no" | "da" | "ru";
|
|
7
|
+
export declare type ContentfulLocale = "en" | "en-US" | "it" | "es" | "de" | "fr";
|
|
8
|
+
export declare type PimValues = {
|
|
9
|
+
value_en: string;
|
|
10
|
+
value_en_US?: string | null;
|
|
11
|
+
value_it: string | null;
|
|
12
|
+
value_es: string | null;
|
|
13
|
+
value_de: string | null;
|
|
14
|
+
value_fr: string | null;
|
|
15
|
+
value_sv: string | null;
|
|
16
|
+
value_no: string | null;
|
|
17
|
+
value_da: string | null;
|
|
18
|
+
value_ru: string | null;
|
|
19
|
+
};
|
|
20
|
+
export declare type PimDescription = {
|
|
21
|
+
description_en: string;
|
|
22
|
+
description_en_US?: string | null;
|
|
23
|
+
description_it: string | null;
|
|
24
|
+
description_es: string | null;
|
|
25
|
+
description_de: string | null;
|
|
26
|
+
description_fr: string | null;
|
|
27
|
+
description_sv: string | null;
|
|
28
|
+
description_no: string | null;
|
|
29
|
+
description_da: string | null;
|
|
30
|
+
description_ru: string | null;
|
|
31
|
+
};
|
|
32
|
+
export declare type PimProductDescription = {
|
|
33
|
+
description1_en: string;
|
|
34
|
+
description1_en_US?: string | null;
|
|
35
|
+
description1_it: string | null;
|
|
36
|
+
description1_es: string | null;
|
|
37
|
+
description1_de: string | null;
|
|
38
|
+
description1_fr: string | null;
|
|
39
|
+
description1_sv: string | null;
|
|
40
|
+
description1_no: string | null;
|
|
41
|
+
description1_da: string | null;
|
|
42
|
+
description1_ru: string | null;
|
|
43
|
+
};
|
|
44
|
+
export declare type PimProductExcerpt = {
|
|
45
|
+
description2_en: string;
|
|
46
|
+
description2_en_US?: string | null;
|
|
47
|
+
description2_it: string | null;
|
|
48
|
+
description2_es: string | null;
|
|
49
|
+
description2_de: string | null;
|
|
50
|
+
description2_fr: string | null;
|
|
51
|
+
description2_sv: string | null;
|
|
52
|
+
description2_no: string | null;
|
|
53
|
+
description2_da: string | null;
|
|
54
|
+
description2_ru: string | null;
|
|
55
|
+
};
|
|
56
|
+
export declare type CfSys = {
|
|
57
|
+
sys: {
|
|
58
|
+
type: string;
|
|
59
|
+
linkType: string;
|
|
60
|
+
id: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
export declare type PaginationResults = {
|
|
64
|
+
offset: number;
|
|
65
|
+
limit: number;
|
|
66
|
+
completed: boolean;
|
|
67
|
+
s3FilePath?: string;
|
|
68
|
+
total?: number;
|
|
69
|
+
};
|
|
70
|
+
export declare type CfLocalizedEntryField = Partial<Record<ContentfulLocale, string | null>>;
|
|
71
|
+
export declare type TopicDetailsResponse = {
|
|
72
|
+
names: CfLocalizedEntryField;
|
|
73
|
+
code: string;
|
|
74
|
+
slugs?: {};
|
|
75
|
+
details?: {};
|
|
76
|
+
};
|
|
77
|
+
export declare type ProductFieldsRequiredData = {
|
|
78
|
+
key: string;
|
|
79
|
+
parent: string;
|
|
80
|
+
icon: boolean;
|
|
81
|
+
dictionary: string;
|
|
82
|
+
type: string;
|
|
83
|
+
};
|
|
84
|
+
export interface AlgoliaPaginateRecords extends PaginationResults {
|
|
85
|
+
objects: Readonly<Record<string, any>>[];
|
|
86
|
+
}
|
|
87
|
+
export interface AlgoliaPaginateObjectIds extends PaginationResults {
|
|
88
|
+
objectIds: string[];
|
|
89
|
+
}
|
|
90
|
+
export declare type AssetPropFields = {
|
|
91
|
+
title: {
|
|
92
|
+
[key: string]: string;
|
|
93
|
+
};
|
|
94
|
+
description?: {
|
|
95
|
+
[key: string]: string;
|
|
96
|
+
};
|
|
97
|
+
file: {
|
|
98
|
+
[key: string]: {
|
|
99
|
+
fileName: string;
|
|
100
|
+
contentType: string;
|
|
101
|
+
upload?: string;
|
|
102
|
+
url?: string;
|
|
103
|
+
details?: Record<string, any>;
|
|
104
|
+
uploadFrom?: Record<string, any>;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
export declare type AssetPropFieldsWithoutLocaleKey = {
|
|
109
|
+
title: {
|
|
110
|
+
[key: string]: string;
|
|
111
|
+
};
|
|
112
|
+
description?: {
|
|
113
|
+
[key: string]: string;
|
|
114
|
+
};
|
|
115
|
+
file: {
|
|
116
|
+
fileName: string;
|
|
117
|
+
contentType: string;
|
|
118
|
+
upload?: string;
|
|
119
|
+
url?: string;
|
|
120
|
+
details?: Record<string, any>;
|
|
121
|
+
uploadFrom?: Record<string, any>;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
export declare type TopicProductFieldsResponse = {
|
|
125
|
+
names: CfLocalizedEntryField;
|
|
126
|
+
code: string;
|
|
127
|
+
slugs: {};
|
|
128
|
+
};
|
|
129
|
+
export interface OtherFilters {
|
|
130
|
+
key: string;
|
|
131
|
+
value: string;
|
|
132
|
+
}
|
|
133
|
+
export interface ImgixData {
|
|
134
|
+
url: string;
|
|
135
|
+
details: ImgixDataDetails;
|
|
136
|
+
fileName: string;
|
|
137
|
+
contentType: string;
|
|
138
|
+
}
|
|
139
|
+
export interface ImgixDataDetails {
|
|
140
|
+
size: number;
|
|
141
|
+
image: ImgixDataImageDetails;
|
|
142
|
+
}
|
|
143
|
+
interface ImgixDataImageDetails {
|
|
144
|
+
width: number;
|
|
145
|
+
height: number;
|
|
146
|
+
}
|
|
147
|
+
export declare type WrapperImageFields = {
|
|
148
|
+
internalName: string;
|
|
149
|
+
imgixData: ImgixData;
|
|
150
|
+
altText: CfLocalizedEntryField;
|
|
151
|
+
caption?: CfLocalizedEntryField;
|
|
152
|
+
hoverTitle?: CfLocalizedEntryField;
|
|
153
|
+
foceHoverTitle?: boolean;
|
|
154
|
+
};
|
|
155
|
+
export interface ImgixAttributes {
|
|
156
|
+
analyzed_content_warnings: boolean;
|
|
157
|
+
analyzed_faces: boolean;
|
|
158
|
+
analyzed_tags: boolean;
|
|
159
|
+
categories?: null[] | null;
|
|
160
|
+
color_model: string;
|
|
161
|
+
color_profile: string;
|
|
162
|
+
colors: string;
|
|
163
|
+
content_type: string;
|
|
164
|
+
custom_fields?: null;
|
|
165
|
+
date_created: number;
|
|
166
|
+
date_modified: number;
|
|
167
|
+
description?: null;
|
|
168
|
+
dpi_height: number;
|
|
169
|
+
dpi_width: number;
|
|
170
|
+
face_count?: null;
|
|
171
|
+
file_size: number;
|
|
172
|
+
has_frames: boolean;
|
|
173
|
+
media_height: number;
|
|
174
|
+
media_kind: string;
|
|
175
|
+
media_width: number;
|
|
176
|
+
name?: null;
|
|
177
|
+
origin_path: string;
|
|
178
|
+
source_id: string;
|
|
179
|
+
tags: Record<string, any>;
|
|
180
|
+
uploaded_by: string;
|
|
181
|
+
uploaded_by_api: boolean;
|
|
182
|
+
warning_adult: number;
|
|
183
|
+
warning_medical: number;
|
|
184
|
+
warning_racy: number;
|
|
185
|
+
warning_spoof: number;
|
|
186
|
+
warning_violence: number;
|
|
187
|
+
}
|
|
188
|
+
export declare type RequiredImgixAttributes = Pick<ImgixAttributes, "origin_path" | "file_size" | "media_width" | "media_height" | "content_type" | "name">;
|
package/types/utils.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PimLocale, ContentfulLocale, PimValues, CfLocalizedEntryField, PimProductDescription, PimProductExcerpt } from "./types";
|
|
2
|
+
import { AssetsEntity } from "./resources/ProductDetails";
|
|
3
|
+
export declare const mergeObjects: <T extends object, U extends object>(objA: T, objB: U) => T & U;
|
|
4
|
+
export declare const sleep: (ms: number, showLog?: boolean) => Promise<unknown>;
|
|
5
|
+
export declare const getBaseURL: (url: string) => string;
|
|
6
|
+
export declare const basename: (path: string) => string;
|
|
7
|
+
export declare const secondBetweenTwoDate: (newDate: Date, oldDate: Date) => number;
|
|
8
|
+
export declare const stringToSlug: (str: string, skipReplaceDots?: boolean) => string;
|
|
9
|
+
export declare const pimLocaleMap: Partial<Record<PimLocale, ContentfulLocale>>;
|
|
10
|
+
export declare const getLocale: (pimLocaleCode: PimLocale) => ContentfulLocale | null;
|
|
11
|
+
export declare const getPimTranslations: (values: Partial<PimValues | PimProductDescription | PimProductExcerpt | AssetsEntity>, fieldKey?: "value" | "description" | "description1" | "description2" | "note" | "title" | "webNaming") => CfLocalizedEntryField;
|
|
12
|
+
export declare const getUnwantedValues: () => (string | number)[];
|
|
13
|
+
export declare const sanitizeValue: (value: string) => string | null;
|
|
14
|
+
export declare const doChunk: (list: string[], size: number) => any[][];
|
|
15
|
+
export declare const getLocalISOTime: () => string;
|
|
16
|
+
export declare const capitalizeFirstLetter: (text: string) => string;
|
|
17
|
+
export declare const keysToLowerCase: (obj: any, includeNestedKeys?: boolean) => any;
|
|
18
|
+
export declare const addProductFieldValueCodesByPimDetails: (pimDetails: any, productFields: any, fieldKey: string, fieldParentKey?: string | undefined) => string[];
|
|
19
|
+
export declare const replaceAll: (original: string, from: string, to: string) => string;
|