pim-import 2.78.1 → 2.79.0
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/libs/imgix.js +8 -6
- package/dist/libs/imgix.js.map +1 -1
- 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 +15 -1
- package/dist/pim/methods/products.js.map +1 -1
- package/package.json +5 -1
- package/src/libs/imgix.ts +6 -5
- package/src/pim/data/productFields.json +245 -0
- package/src/pim/methods/dictionary.ts +11 -78
- package/src/pim/methods/products.ts +25 -2
- 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 +15 -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
|
@@ -5,9 +5,6 @@ import {
|
|
|
5
5
|
ProductFieldsRequiredData,
|
|
6
6
|
} from "../../types";
|
|
7
7
|
import {
|
|
8
|
-
getEnvironment,
|
|
9
|
-
getEnvironmentDefaultLocaleCode,
|
|
10
|
-
getEntryByID,
|
|
11
8
|
createEntryWithId,
|
|
12
9
|
updateEntry,
|
|
13
10
|
getEntryByCode,
|
|
@@ -20,6 +17,7 @@ import {
|
|
|
20
17
|
checkConfig as checkS3Config,
|
|
21
18
|
upload as uploadToS3,
|
|
22
19
|
getFileFromS3,
|
|
20
|
+
saveJsonToS3,
|
|
23
21
|
} from "../../libs/s3";
|
|
24
22
|
import type {
|
|
25
23
|
CreateEntryProps,
|
|
@@ -53,69 +51,6 @@ type DictionaryRecord = {
|
|
|
53
51
|
otherData: ObjectPartial;
|
|
54
52
|
};
|
|
55
53
|
|
|
56
|
-
interface DictionaryContentfulData {
|
|
57
|
-
[key: string]: DictionaryRecord[];
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const updateContentfulDictionaryData = async (
|
|
61
|
-
data: DictionaryContentfulData,
|
|
62
|
-
clearBefore: boolean = false
|
|
63
|
-
) => {
|
|
64
|
-
log(`updateContentfulDictionaryData - Start`, "INFO");
|
|
65
|
-
|
|
66
|
-
const environment = await getEnvironment();
|
|
67
|
-
const defaultEnvironmentLocaleCode = await getEnvironmentDefaultLocaleCode();
|
|
68
|
-
|
|
69
|
-
// Check if entry exists
|
|
70
|
-
log(`Check if dictionary entry exists`);
|
|
71
|
-
let entry = await getEntryByID(entryId, contentTypeId);
|
|
72
|
-
|
|
73
|
-
const entryData: CreateEntryProps = {
|
|
74
|
-
fields: {},
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
if (entry) {
|
|
78
|
-
// Entry exists. Update entry data
|
|
79
|
-
log(`Dictionary entry exists. Update entry data`);
|
|
80
|
-
if (
|
|
81
|
-
clearBefore &&
|
|
82
|
-
Object.entries(entry.fields.json[defaultEnvironmentLocaleCode]).length
|
|
83
|
-
) {
|
|
84
|
-
entry.fields.json[defaultEnvironmentLocaleCode] = {};
|
|
85
|
-
entry = await entry.update();
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
entryData.fields = entry?.fields || {};
|
|
89
|
-
|
|
90
|
-
entryData.fields = await addFieldValue(
|
|
91
|
-
entryData,
|
|
92
|
-
"internalName",
|
|
93
|
-
"DictionaryProductFields"
|
|
94
|
-
);
|
|
95
|
-
entryData.fields = await addFieldValue(entryData, "json", data);
|
|
96
|
-
entry = await entry.update();
|
|
97
|
-
entry = await entry.publish();
|
|
98
|
-
} else {
|
|
99
|
-
// Entry not exists. Create new entry with data
|
|
100
|
-
log(`Entry not exists. Create new entry with data`);
|
|
101
|
-
|
|
102
|
-
entryData.fields = await addFieldValue(
|
|
103
|
-
entryData,
|
|
104
|
-
"internalName",
|
|
105
|
-
"DictionaryProductFields"
|
|
106
|
-
);
|
|
107
|
-
entryData.fields = await addFieldValue(entryData, "json", data);
|
|
108
|
-
entry = await environment.createEntryWithId(
|
|
109
|
-
contentTypeId,
|
|
110
|
-
entryId,
|
|
111
|
-
entryData
|
|
112
|
-
);
|
|
113
|
-
entry = await entry.publish();
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
log(`updateContentfulDictionaryData - Completed`);
|
|
117
|
-
};
|
|
118
|
-
|
|
119
54
|
const getRequiredDictionaryDataWithIcons = (): ProductFieldsRequiredData[] => {
|
|
120
55
|
return productFieldsRequiredData.filter((field) => field.icon);
|
|
121
56
|
};
|
|
@@ -174,17 +109,13 @@ export const importDictionaryIcons = async (
|
|
|
174
109
|
checkS3Config();
|
|
175
110
|
|
|
176
111
|
log("importDictionaryIcons - Start", "INFO");
|
|
177
|
-
log("Get dictionary
|
|
178
|
-
const defaultEnvironmentLocaleCode =
|
|
179
|
-
await getEnvironmentDefaultLocaleCode();
|
|
180
|
-
const entry = await getEntryByID(entryId, contentTypeId);
|
|
112
|
+
log("Get S3 JSON dictionary file");
|
|
181
113
|
|
|
182
|
-
|
|
183
|
-
|
|
114
|
+
const data = await getFileFromS3(`dictionary.json`);
|
|
115
|
+
if (!data) {
|
|
116
|
+
throw new Error("Dictionary JSON file not found on S3.");
|
|
184
117
|
}
|
|
185
118
|
|
|
186
|
-
const data = entry.fields.json[defaultEnvironmentLocaleCode];
|
|
187
|
-
|
|
188
119
|
const requiredDictionaryDataWithIcons =
|
|
189
120
|
getRequiredDictionaryDataWithIcons();
|
|
190
121
|
for (const reqField of requiredDictionaryDataWithIcons) {
|
|
@@ -224,9 +155,9 @@ export const importDictionaryIcons = async (
|
|
|
224
155
|
log(`No certifications found into contenful dictionary`);
|
|
225
156
|
}
|
|
226
157
|
|
|
227
|
-
// Updating
|
|
228
|
-
log("Updating
|
|
229
|
-
await
|
|
158
|
+
// Updating S3 dictionary entry data
|
|
159
|
+
log("Updating S3 dictionary entry data");
|
|
160
|
+
await saveJsonToS3(data, "dictionary.json");
|
|
230
161
|
log("importDictionaryIcons - Completed");
|
|
231
162
|
|
|
232
163
|
return { completed: true };
|
|
@@ -327,7 +258,9 @@ export const importDictionaryFields = async (
|
|
|
327
258
|
if (Object.entries(data).length) {
|
|
328
259
|
// Create/Update Contentful entry
|
|
329
260
|
log("Create/Update Contentful entry");
|
|
330
|
-
await updateContentfulDictionaryData(data, offset === 0);
|
|
261
|
+
// await updateContentfulDictionaryData(data, offset === 0);
|
|
262
|
+
|
|
263
|
+
await saveJsonToS3(data, "dictionary.json", "");
|
|
331
264
|
} else {
|
|
332
265
|
log("no matches found", "ERROR");
|
|
333
266
|
}
|
|
@@ -58,7 +58,11 @@ import {
|
|
|
58
58
|
import { getAudit, getProductDetails } from "../endpoints";
|
|
59
59
|
import { getCategoryTopicCode } from "./catalogs";
|
|
60
60
|
import productFieldsRequiredData from "../data/productFields.json";
|
|
61
|
-
import {
|
|
61
|
+
import {
|
|
62
|
+
getDefaultWrapperImgixAttributesByPimUrl,
|
|
63
|
+
getImgixPimUrlByOriginPath,
|
|
64
|
+
getOriginPathByPimUrl,
|
|
65
|
+
} from "../../libs/imgix";
|
|
62
66
|
import { generatePDFByUrl } from "../../libs/puppeteer";
|
|
63
67
|
|
|
64
68
|
export type AvailableProductStatus =
|
|
@@ -843,15 +847,34 @@ const getProductData = async (
|
|
|
843
847
|
|
|
844
848
|
// THUMB
|
|
845
849
|
if (pimAssetThumb?.url) {
|
|
850
|
+
log(`Set THUMB`);
|
|
846
851
|
// THUMB WRAPPER IMGIX
|
|
847
852
|
const wrapperImgixID = pimAssetThumb.md5;
|
|
848
853
|
let wrapperImgix = await getEntryByID(
|
|
849
854
|
wrapperImgixID,
|
|
850
855
|
"wrapperImgix",
|
|
851
|
-
"sys"
|
|
856
|
+
"sys,fields"
|
|
852
857
|
);
|
|
853
858
|
if (wrapperImgix) {
|
|
854
859
|
log(`wrapperImgix with id ${wrapperImgixID} already exists`);
|
|
860
|
+
const imgixBasename = basename(
|
|
861
|
+
wrapperImgix.fields.imgixData[defaultEnvironmentLocaleCode].url
|
|
862
|
+
);
|
|
863
|
+
const pimBasename = basename(pimAssetThumb.url);
|
|
864
|
+
if (imgixBasename !== pimBasename) {
|
|
865
|
+
log(`Update img url from ${imgixBasename} to ${pimBasename}`);
|
|
866
|
+
const newImgixUrl = getImgixPimUrlByOriginPath(
|
|
867
|
+
getOriginPathByPimUrl(pimAssetThumb.url)
|
|
868
|
+
);
|
|
869
|
+
wrapperImgix.fields.imgixData[defaultEnvironmentLocaleCode].url =
|
|
870
|
+
newImgixUrl;
|
|
871
|
+
wrapperImgix = await wrapperImgix.update();
|
|
872
|
+
if (wrapperImgix.isPublished()) {
|
|
873
|
+
wrapperImgix = await wrapperImgix.publish();
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
log(`The new imgix url is: ${newImgixUrl}`);
|
|
877
|
+
}
|
|
855
878
|
} else {
|
|
856
879
|
log(
|
|
857
880
|
`Add thumbnail imgix wrapper with id ${wrapperImgixID} to Contentful`
|
package/tsconfig.json
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
// "allowJs": true, /* Allow javascript files to be compiled. */
|
|
11
11
|
// "checkJs": true, /* Report errors in .js files. */
|
|
12
12
|
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
|
|
13
|
-
|
|
13
|
+
"declaration": true, /* Generates corresponding '.d.ts' file. */
|
|
14
|
+
"declarationDir": "./types",
|
|
14
15
|
//"declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
|
15
16
|
"sourceMap": true, /* Generates corresponding '.map' file. */
|
|
16
17
|
// "outFile": "./", /* Concatenate and emit output to single file. */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AvailableCatalogs, AvailableEntryStatus } from "../types";
|
|
2
|
+
import { AvailableIndicesKey } from "./config";
|
|
3
|
+
export declare const removeRecordsByStatus: (indexKey: AvailableIndicesKey, offset?: number, limit?: number, status?: AvailableEntryStatus, catalogCode?: AvailableCatalogs | undefined) => Promise<false | {
|
|
4
|
+
objectIds: string[];
|
|
5
|
+
offset: number;
|
|
6
|
+
limit: number;
|
|
7
|
+
completed: boolean;
|
|
8
|
+
s3FilePath?: string | undefined;
|
|
9
|
+
total?: number | undefined;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
export declare type AvailableIndicesKey = "products" | "families" | "subFamilies" | "subModels" | "models" | "downloads" | "projects" | "stories" | "pressReviews" | "pressRelease" | "news";
|
|
2
|
+
export declare const getClient: () => import("algoliasearch").SearchClient;
|
|
3
|
+
export declare const getIndicesSettings: () => {
|
|
4
|
+
products: {
|
|
5
|
+
name: string | undefined;
|
|
6
|
+
settings: {
|
|
7
|
+
attributesForFaceting: string[];
|
|
8
|
+
searchableAttributes: string[];
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
families: {
|
|
12
|
+
name: string | undefined;
|
|
13
|
+
settings: {
|
|
14
|
+
attributesForFaceting: string[];
|
|
15
|
+
searchableAttributes: string[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
subFamilies: {
|
|
19
|
+
name: string | undefined;
|
|
20
|
+
settings: {
|
|
21
|
+
attributesForFaceting: string[];
|
|
22
|
+
searchableAttributes: string[];
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
subModels: {
|
|
26
|
+
name: string | undefined;
|
|
27
|
+
settings: {
|
|
28
|
+
attributesForFaceting: string[];
|
|
29
|
+
searchableAttributes: string[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
models: {
|
|
33
|
+
name: string | undefined;
|
|
34
|
+
settings: {
|
|
35
|
+
attributesForFaceting: string[];
|
|
36
|
+
searchableAttributes: string[];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
downloads: {
|
|
40
|
+
name: string | undefined;
|
|
41
|
+
settings: {
|
|
42
|
+
attributesForFaceting: string[];
|
|
43
|
+
searchableAttributes: string[];
|
|
44
|
+
replicas: string[];
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
projects: {
|
|
48
|
+
name: string | undefined;
|
|
49
|
+
settings: {
|
|
50
|
+
attributesForFaceting: string[];
|
|
51
|
+
searchableAttributes: string[];
|
|
52
|
+
ranking: string[];
|
|
53
|
+
replicas: string[];
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
stories: {
|
|
57
|
+
name: string | undefined;
|
|
58
|
+
settings: {
|
|
59
|
+
attributesForFaceting: string[];
|
|
60
|
+
searchableAttributes: string[];
|
|
61
|
+
ranking: string[];
|
|
62
|
+
replicas: string[];
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
pressReviews: {
|
|
66
|
+
name: string | undefined;
|
|
67
|
+
settings: {
|
|
68
|
+
attributesForFaceting: string[];
|
|
69
|
+
searchableAttributes: string[];
|
|
70
|
+
ranking: string[];
|
|
71
|
+
replicas: never[];
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
pressRelease: {
|
|
75
|
+
name: string | undefined;
|
|
76
|
+
settings: {
|
|
77
|
+
attributesForFaceting: string[];
|
|
78
|
+
searchableAttributes: string[];
|
|
79
|
+
ranking: string[];
|
|
80
|
+
replicas: never[];
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
news: {
|
|
84
|
+
name: string | undefined;
|
|
85
|
+
settings: {
|
|
86
|
+
attributesForFaceting: string[];
|
|
87
|
+
searchableAttributes: string[];
|
|
88
|
+
ranking: string[];
|
|
89
|
+
replicas: never[];
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
export declare const getIndexConfig: (indexKey: AvailableIndicesKey) => any;
|
|
94
|
+
export declare const getIndex: (indexKey: AvailableIndicesKey) => import("algoliasearch").SearchIndex;
|
|
95
|
+
export declare const resetIndexSettings: (indexKey: AvailableIndicesKey) => import("algoliasearch").SearchIndex;
|
|
96
|
+
export declare const removeIndexObject: (objectId: string, indexKey: AvailableIndicesKey) => Promise<void>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CfLocalizedEntryField, TopicDetailsResponse, WrapperImageFields } from "../types";
|
|
2
|
+
export declare type AlgoliaDownloadRecord = {
|
|
3
|
+
objectID: string;
|
|
4
|
+
name?: CfLocalizedEntryField;
|
|
5
|
+
thumbnailImgix?: WrapperImageFields | {};
|
|
6
|
+
assets?: {};
|
|
7
|
+
catalogs?: TopicDetailsResponse[];
|
|
8
|
+
category?: TopicDetailsResponse;
|
|
9
|
+
brand?: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
lastSyncDate?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const getAssetsByComponentAssetIds: (componentAssetIds: string[]) => Promise<any>;
|
|
14
|
+
export declare const reindexDownload: (topicDownloadId: string) => Promise<false | {
|
|
15
|
+
objectID: string;
|
|
16
|
+
name?: Partial<Record<import("../types").ContentfulLocale, string | null>> | undefined;
|
|
17
|
+
thumbnailImgix?: {} | WrapperImageFields | undefined;
|
|
18
|
+
assets?: {} | undefined;
|
|
19
|
+
catalogs?: TopicDetailsResponse[] | undefined;
|
|
20
|
+
category?: TopicDetailsResponse | undefined;
|
|
21
|
+
brand?: string | undefined;
|
|
22
|
+
type?: string | undefined;
|
|
23
|
+
lastSyncDate?: string | undefined;
|
|
24
|
+
taskID: number;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const reindexDownloads: (offset?: number, limit?: number, filterKey?: string, filterValue?: string) => Promise<{
|
|
27
|
+
taskIDs: number[];
|
|
28
|
+
objectIDs: string[];
|
|
29
|
+
objects: Readonly<Record<string, any>>[];
|
|
30
|
+
offset: number;
|
|
31
|
+
limit: number;
|
|
32
|
+
completed: boolean;
|
|
33
|
+
s3FilePath?: string | undefined;
|
|
34
|
+
total?: number | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
export declare const removeDownloadObject: (objectId: string) => Promise<void>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { CfLocalizedEntryField, TopicDetailsResponse, TopicProductFieldsResponse, WrapperImageFields, AvailableCatalogs } from "../types";
|
|
2
|
+
export declare type pageResponse = {
|
|
3
|
+
slugs: {};
|
|
4
|
+
type: string;
|
|
5
|
+
details?: {};
|
|
6
|
+
} | null;
|
|
7
|
+
export declare type AlgoliaFamilyRecord = {
|
|
8
|
+
objectID: string;
|
|
9
|
+
names: CfLocalizedEntryField;
|
|
10
|
+
code: string;
|
|
11
|
+
thumbnailImgix: WrapperImageFields | {};
|
|
12
|
+
fullScreenImageImgix: WrapperImageFields | {};
|
|
13
|
+
slugs: {} | null;
|
|
14
|
+
slugType: string | null;
|
|
15
|
+
catalogs: TopicDetailsResponse[];
|
|
16
|
+
categories: TopicDetailsResponse[];
|
|
17
|
+
productFields: TopicProductFieldsResponse[];
|
|
18
|
+
isNew: boolean;
|
|
19
|
+
priority: number;
|
|
20
|
+
lastSyncDate: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const reindexFamilies: (offset?: number, limit?: number, catalogCode?: AvailableCatalogs | undefined) => Promise<{
|
|
23
|
+
taskIDs: number[];
|
|
24
|
+
objectIDs: string[];
|
|
25
|
+
objects: Readonly<Record<string, any>>[];
|
|
26
|
+
offset: number;
|
|
27
|
+
limit: number;
|
|
28
|
+
completed: boolean;
|
|
29
|
+
s3FilePath?: string | undefined;
|
|
30
|
+
total?: number | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const reindexFamily: (topicFamilyEntryId: string) => Promise<{
|
|
33
|
+
objectID: string;
|
|
34
|
+
names: CfLocalizedEntryField;
|
|
35
|
+
code: string;
|
|
36
|
+
thumbnailImgix: WrapperImageFields | {};
|
|
37
|
+
fullScreenImageImgix: WrapperImageFields | {};
|
|
38
|
+
slugs: {} | null;
|
|
39
|
+
slugType: string | null;
|
|
40
|
+
catalogs: TopicDetailsResponse[];
|
|
41
|
+
categories: TopicDetailsResponse[];
|
|
42
|
+
productFields: TopicProductFieldsResponse[];
|
|
43
|
+
isNew: boolean;
|
|
44
|
+
priority: number;
|
|
45
|
+
lastSyncDate: string;
|
|
46
|
+
taskID: number;
|
|
47
|
+
}>;
|
|
48
|
+
export declare const removeFamilyObject: (objectId: string) => Promise<void>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TopicDetailsResponse, AvailableCatalogs, WrapperImageFields } from "../types";
|
|
2
|
+
export declare const reindexModel: (topicModelId: string) => Promise<{
|
|
3
|
+
objectID: string;
|
|
4
|
+
names?: Partial<Record<import("../types").ContentfulLocale, string | null>> | undefined;
|
|
5
|
+
code?: string | undefined;
|
|
6
|
+
slugs?: {} | undefined;
|
|
7
|
+
description?: string | undefined;
|
|
8
|
+
autodescription?: string | undefined;
|
|
9
|
+
thumbnailImgix?: {} | WrapperImageFields | undefined;
|
|
10
|
+
productFieldFilter?: string | undefined;
|
|
11
|
+
productLine?: TopicDetailsResponse | undefined;
|
|
12
|
+
catalog?: TopicDetailsResponse | undefined;
|
|
13
|
+
subFamily?: TopicDetailsResponse | undefined;
|
|
14
|
+
isNew?: boolean | undefined;
|
|
15
|
+
priority?: number | undefined;
|
|
16
|
+
colors?: string[] | undefined;
|
|
17
|
+
designer?: TopicDetailsResponse | undefined;
|
|
18
|
+
lastSyncDate?: string | undefined;
|
|
19
|
+
taskID: number;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const reindexModels: (offset?: number, limit?: number, catalogCode?: AvailableCatalogs | undefined) => Promise<{
|
|
22
|
+
taskIDs: number[];
|
|
23
|
+
objectIDs: string[];
|
|
24
|
+
objects: Readonly<Record<string, any>>[];
|
|
25
|
+
offset: number;
|
|
26
|
+
limit: number;
|
|
27
|
+
completed: boolean;
|
|
28
|
+
s3FilePath?: string | undefined;
|
|
29
|
+
total?: number | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const removeModelObject: (topicModelId: string) => Promise<void>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CfLocalizedEntryField, WrapperImageFields } from "../types";
|
|
2
|
+
export declare type AlgoliaPostRecord = {
|
|
3
|
+
objectID: string;
|
|
4
|
+
name?: CfLocalizedEntryField;
|
|
5
|
+
slugs?: {};
|
|
6
|
+
previewExcerpt?: string;
|
|
7
|
+
thumbnailImageImgix?: WrapperImageFields | {};
|
|
8
|
+
fullScreenImageImgix?: WrapperImageFields | {};
|
|
9
|
+
visualizationDate?: string;
|
|
10
|
+
lastSyncDate?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const reindexPost: (topicNewsId: string) => Promise<false | {
|
|
13
|
+
objectID: string;
|
|
14
|
+
name?: Partial<Record<import("../types").ContentfulLocale, string | null>> | undefined;
|
|
15
|
+
slugs?: {} | undefined;
|
|
16
|
+
previewExcerpt?: string | undefined;
|
|
17
|
+
thumbnailImageImgix?: {} | WrapperImageFields | undefined;
|
|
18
|
+
fullScreenImageImgix?: {} | WrapperImageFields | undefined;
|
|
19
|
+
visualizationDate?: string | undefined;
|
|
20
|
+
lastSyncDate?: string | undefined;
|
|
21
|
+
taskID: number;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const reindexPosts: (offset?: number, limit?: number, filterKey?: string, filterValue?: string) => Promise<{
|
|
24
|
+
taskIDs: number[];
|
|
25
|
+
objectIDs: string[];
|
|
26
|
+
objects: Readonly<Record<string, any>>[];
|
|
27
|
+
offset: number;
|
|
28
|
+
limit: number;
|
|
29
|
+
completed: boolean;
|
|
30
|
+
s3FilePath?: string | undefined;
|
|
31
|
+
total?: number | undefined;
|
|
32
|
+
}>;
|
|
33
|
+
export declare const removePostObject: (objectId: string) => Promise<void>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CfLocalizedEntryField, WrapperImageFields, TopicDetailsResponse } from "../types";
|
|
2
|
+
export declare type AlgoliaPressReleaseRecord = {
|
|
3
|
+
objectID: string;
|
|
4
|
+
name?: CfLocalizedEntryField;
|
|
5
|
+
description?: string;
|
|
6
|
+
thumbnailImgix?: WrapperImageFields | {};
|
|
7
|
+
lastSyncDate?: string;
|
|
8
|
+
category?: TopicDetailsResponse;
|
|
9
|
+
assets?: {};
|
|
10
|
+
visualizationDate?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const reindexPressRelease: (topicPressReleaseId: string) => Promise<false | {
|
|
13
|
+
objectID: string;
|
|
14
|
+
name?: Partial<Record<import("../types").ContentfulLocale, string | null>> | undefined;
|
|
15
|
+
description?: string | undefined;
|
|
16
|
+
thumbnailImgix?: {} | WrapperImageFields | undefined;
|
|
17
|
+
lastSyncDate?: string | undefined;
|
|
18
|
+
category?: TopicDetailsResponse | undefined;
|
|
19
|
+
assets?: {} | undefined;
|
|
20
|
+
visualizationDate?: string | undefined;
|
|
21
|
+
taskID: number;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const reindexPressReleases: (offset?: number, limit?: number, filterKey?: string, filterValue?: string) => Promise<{
|
|
24
|
+
taskIDs: number[];
|
|
25
|
+
objectIDs: string[];
|
|
26
|
+
objects: Readonly<Record<string, any>>[];
|
|
27
|
+
offset: number;
|
|
28
|
+
limit: number;
|
|
29
|
+
completed: boolean;
|
|
30
|
+
s3FilePath?: string | undefined;
|
|
31
|
+
total?: number | undefined;
|
|
32
|
+
}>;
|
|
33
|
+
export declare const removePressReleaseObject: (objectId: string) => Promise<void>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CfLocalizedEntryField, WrapperImageFields } from "../types";
|
|
2
|
+
export declare type AlgoliaPressReviewRecord = {
|
|
3
|
+
objectID: string;
|
|
4
|
+
name?: CfLocalizedEntryField;
|
|
5
|
+
yearOfRelease?: string;
|
|
6
|
+
monthOfRelease?: string;
|
|
7
|
+
country?: string;
|
|
8
|
+
thumbnailImgix?: WrapperImageFields | {};
|
|
9
|
+
asset?: {};
|
|
10
|
+
lastSyncDate?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const reindexPressReview: (topicPressReviewId: string) => Promise<false | {
|
|
13
|
+
objectID: string;
|
|
14
|
+
name?: Partial<Record<import("../types").ContentfulLocale, string | null>> | undefined;
|
|
15
|
+
yearOfRelease?: string | undefined;
|
|
16
|
+
monthOfRelease?: string | undefined;
|
|
17
|
+
country?: string | undefined;
|
|
18
|
+
thumbnailImgix?: {} | WrapperImageFields | undefined;
|
|
19
|
+
asset?: {} | undefined;
|
|
20
|
+
lastSyncDate?: string | undefined;
|
|
21
|
+
taskID: number;
|
|
22
|
+
}>;
|
|
23
|
+
export declare const reindexPressReviews: (offset?: number, limit?: number, filterKey?: string, filterValue?: string) => Promise<{
|
|
24
|
+
taskIDs: number[];
|
|
25
|
+
objectIDs: string[];
|
|
26
|
+
objects: Readonly<Record<string, any>>[];
|
|
27
|
+
offset: number;
|
|
28
|
+
limit: number;
|
|
29
|
+
completed: boolean;
|
|
30
|
+
s3FilePath?: string | undefined;
|
|
31
|
+
total?: number | undefined;
|
|
32
|
+
}>;
|
|
33
|
+
export declare const removePressReviewObject: (objectId: string) => Promise<void>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { CfLocalizedEntryField, TopicDetailsResponse, WrapperImageFields } from "../types";
|
|
2
|
+
export declare type AlgoliaProductRecord = {
|
|
3
|
+
objectID: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
names?: CfLocalizedEntryField;
|
|
6
|
+
code?: string;
|
|
7
|
+
slugs?: {};
|
|
8
|
+
description?: {};
|
|
9
|
+
excerpt?: {};
|
|
10
|
+
autoDescription?: string;
|
|
11
|
+
thumbnailImgix?: WrapperImageFields | {};
|
|
12
|
+
catalogs?: TopicDetailsResponse[];
|
|
13
|
+
categoriesArchitectural?: TopicDetailsResponse[];
|
|
14
|
+
categoriesOutdoor?: TopicDetailsResponse[];
|
|
15
|
+
categoriesDecorative?: TopicDetailsResponse[];
|
|
16
|
+
families?: TopicDetailsResponse[];
|
|
17
|
+
subFamiliesArchitectural?: TopicDetailsResponse[];
|
|
18
|
+
subFamiliesOutdoor?: TopicDetailsResponse[];
|
|
19
|
+
subFamiliesDecorative?: TopicDetailsResponse[];
|
|
20
|
+
modelsArchitectural?: TopicDetailsResponse[];
|
|
21
|
+
modelsOutdoor?: TopicDetailsResponse[];
|
|
22
|
+
modelsDecorative?: TopicDetailsResponse[];
|
|
23
|
+
subModelsArchitectural?: TopicDetailsResponse[];
|
|
24
|
+
subModelsOutdoor?: TopicDetailsResponse[];
|
|
25
|
+
subModelsDecorative?: TopicDetailsResponse[];
|
|
26
|
+
productLine?: TopicDetailsResponse;
|
|
27
|
+
productSubLine?: TopicDetailsResponse;
|
|
28
|
+
designers?: TopicDetailsResponse[];
|
|
29
|
+
designYear?: string;
|
|
30
|
+
productFields?: any;
|
|
31
|
+
lastSyncDate?: string;
|
|
32
|
+
};
|
|
33
|
+
export declare const reindexProduct: (topicProductId: string, generatePdf?: boolean) => Promise<false | {
|
|
34
|
+
objectID: string;
|
|
35
|
+
name?: string | undefined;
|
|
36
|
+
names?: Partial<Record<import("../types").ContentfulLocale, string | null>> | undefined;
|
|
37
|
+
code?: string | undefined;
|
|
38
|
+
slugs?: {} | undefined;
|
|
39
|
+
description?: {} | undefined;
|
|
40
|
+
excerpt?: {} | undefined;
|
|
41
|
+
autoDescription?: string | undefined;
|
|
42
|
+
thumbnailImgix?: {} | WrapperImageFields | undefined;
|
|
43
|
+
catalogs?: TopicDetailsResponse[] | undefined;
|
|
44
|
+
categoriesArchitectural?: TopicDetailsResponse[] | undefined;
|
|
45
|
+
categoriesOutdoor?: TopicDetailsResponse[] | undefined;
|
|
46
|
+
categoriesDecorative?: TopicDetailsResponse[] | undefined;
|
|
47
|
+
families?: TopicDetailsResponse[] | undefined;
|
|
48
|
+
subFamiliesArchitectural?: TopicDetailsResponse[] | undefined;
|
|
49
|
+
subFamiliesOutdoor?: TopicDetailsResponse[] | undefined;
|
|
50
|
+
subFamiliesDecorative?: TopicDetailsResponse[] | undefined;
|
|
51
|
+
modelsArchitectural?: TopicDetailsResponse[] | undefined;
|
|
52
|
+
modelsOutdoor?: TopicDetailsResponse[] | undefined;
|
|
53
|
+
modelsDecorative?: TopicDetailsResponse[] | undefined;
|
|
54
|
+
subModelsArchitectural?: TopicDetailsResponse[] | undefined;
|
|
55
|
+
subModelsOutdoor?: TopicDetailsResponse[] | undefined;
|
|
56
|
+
subModelsDecorative?: TopicDetailsResponse[] | undefined;
|
|
57
|
+
productLine?: TopicDetailsResponse | undefined;
|
|
58
|
+
productSubLine?: TopicDetailsResponse | undefined;
|
|
59
|
+
designers?: TopicDetailsResponse[] | undefined;
|
|
60
|
+
designYear?: string | undefined;
|
|
61
|
+
productFields?: any;
|
|
62
|
+
lastSyncDate?: string | undefined;
|
|
63
|
+
taskID: number;
|
|
64
|
+
}>;
|
|
65
|
+
export declare const reindexProducts: (filterKey: string, filterValue: string, offset?: number, limit?: number, lastPimSyncDateGte?: string | undefined, generatePdf?: boolean) => Promise<{
|
|
66
|
+
taskIDs: number[];
|
|
67
|
+
objectIDs: string[];
|
|
68
|
+
objects: Readonly<Record<string, any>>[];
|
|
69
|
+
offset: number;
|
|
70
|
+
limit: number;
|
|
71
|
+
completed: boolean;
|
|
72
|
+
s3FilePath?: string | undefined;
|
|
73
|
+
total?: number | undefined;
|
|
74
|
+
}>;
|
|
75
|
+
export declare const removeProductObject: (topicProductId: string) => Promise<void>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CfLocalizedEntryField, WrapperImageFields } from "../types";
|
|
2
|
+
export declare type AlgoliaProjectRecord = {
|
|
3
|
+
objectID: string;
|
|
4
|
+
name?: CfLocalizedEntryField;
|
|
5
|
+
slugs?: {};
|
|
6
|
+
isBespoke?: boolean;
|
|
7
|
+
categories?: string[];
|
|
8
|
+
applications?: string[];
|
|
9
|
+
locations?: string[];
|
|
10
|
+
thumbnailImgix?: WrapperImageFields | {};
|
|
11
|
+
fullPageImageImgix?: WrapperImageFields | {};
|
|
12
|
+
locationLabel?: string;
|
|
13
|
+
casambiUsed?: boolean;
|
|
14
|
+
visualizationDate?: string;
|
|
15
|
+
lastSyncDate?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const reindexProject: (topicProjectId: string) => Promise<false | {
|
|
18
|
+
objectID: string;
|
|
19
|
+
name?: Partial<Record<import("../types").ContentfulLocale, string | null>> | undefined;
|
|
20
|
+
slugs?: {} | undefined;
|
|
21
|
+
isBespoke?: boolean | undefined;
|
|
22
|
+
categories?: string[] | undefined;
|
|
23
|
+
applications?: string[] | undefined;
|
|
24
|
+
locations?: string[] | undefined;
|
|
25
|
+
thumbnailImgix?: {} | WrapperImageFields | undefined;
|
|
26
|
+
fullPageImageImgix?: {} | WrapperImageFields | undefined;
|
|
27
|
+
locationLabel?: string | undefined;
|
|
28
|
+
casambiUsed?: boolean | undefined;
|
|
29
|
+
visualizationDate?: string | undefined;
|
|
30
|
+
lastSyncDate?: string | undefined;
|
|
31
|
+
taskID: number;
|
|
32
|
+
}>;
|
|
33
|
+
export declare const reindexProjects: (offset?: number, limit?: number, filterKey?: string, filterValue?: string) => Promise<{
|
|
34
|
+
taskIDs: number[];
|
|
35
|
+
objectIDs: string[];
|
|
36
|
+
objects: Readonly<Record<string, any>>[];
|
|
37
|
+
offset: number;
|
|
38
|
+
limit: number;
|
|
39
|
+
completed: boolean;
|
|
40
|
+
s3FilePath?: string | undefined;
|
|
41
|
+
total?: number | undefined;
|
|
42
|
+
}>;
|
|
43
|
+
export declare const removeProjectObject: (objectId: string) => Promise<void>;
|