pim-import 2.78.1 → 2.78.2
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/package.json +5 -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/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
- package/dist/browser.js +0 -117
- package/dist/browser.js.map +0 -1
- package/src/browser.ts +0 -117
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pim-import",
|
|
3
|
-
"version": "2.78.
|
|
3
|
+
"version": "2.78.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
|
+
"types": "types/index.d.ts",
|
|
7
|
+
"typescript": {
|
|
8
|
+
"definition": "types/index.d.ts"
|
|
9
|
+
},
|
|
6
10
|
"scripts": {
|
|
7
11
|
"prepublishOnly": "npm run build",
|
|
8
12
|
"publishCmd": "npm publish --access public",
|
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>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CfLocalizedEntryField, WrapperImageFields } from "../types";
|
|
2
|
+
export declare type AlgoliaStoryRecord = {
|
|
3
|
+
objectID: string;
|
|
4
|
+
name?: CfLocalizedEntryField;
|
|
5
|
+
excerpt?: CfLocalizedEntryField;
|
|
6
|
+
previewExcerpt?: CfLocalizedEntryField;
|
|
7
|
+
description?: CfLocalizedEntryField;
|
|
8
|
+
slugs?: {};
|
|
9
|
+
fullScreenImageImgix?: WrapperImageFields | {};
|
|
10
|
+
previewImagesImgix?: any;
|
|
11
|
+
video?: {};
|
|
12
|
+
category?: {};
|
|
13
|
+
previewLayout?: string;
|
|
14
|
+
visualizationDate?: string;
|
|
15
|
+
lastSyncDate?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const reindexStory: (topicStoryId: string) => Promise<false | {
|
|
18
|
+
objectID: string;
|
|
19
|
+
name?: Partial<Record<import("../types").ContentfulLocale, string | null>> | undefined;
|
|
20
|
+
excerpt?: Partial<Record<import("../types").ContentfulLocale, string | null>> | undefined;
|
|
21
|
+
previewExcerpt?: Partial<Record<import("../types").ContentfulLocale, string | null>> | undefined;
|
|
22
|
+
description?: Partial<Record<import("../types").ContentfulLocale, string | null>> | undefined;
|
|
23
|
+
slugs?: {} | undefined;
|
|
24
|
+
fullScreenImageImgix?: {} | WrapperImageFields | undefined;
|
|
25
|
+
previewImagesImgix?: any;
|
|
26
|
+
video?: {} | undefined;
|
|
27
|
+
category?: {} | undefined;
|
|
28
|
+
previewLayout?: string | undefined;
|
|
29
|
+
visualizationDate?: string | undefined;
|
|
30
|
+
lastSyncDate?: string | undefined;
|
|
31
|
+
taskID: number;
|
|
32
|
+
}>;
|
|
33
|
+
export declare const reindexStories: (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 removeStoryObject: (objectId: string) => Promise<void>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AvailableCatalogs } from "../types";
|
|
2
|
+
export declare const reindexSubFamilies: (offset?: number, limit?: number, catalogCode?: AvailableCatalogs | undefined) => Promise<{
|
|
3
|
+
taskIDs: number[];
|
|
4
|
+
objectIDs: string[];
|
|
5
|
+
objects: Readonly<Record<string, any>>[];
|
|
6
|
+
offset: number;
|
|
7
|
+
limit: number;
|
|
8
|
+
completed: boolean;
|
|
9
|
+
s3FilePath?: string | undefined;
|
|
10
|
+
total?: number | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const reindexSubFamily: (topicSubFamilyEntryId: string) => Promise<false | {
|
|
13
|
+
objectID: string;
|
|
14
|
+
names: Partial<Record<import("../types").ContentfulLocale, string | null>>;
|
|
15
|
+
code: string;
|
|
16
|
+
thumbnailImgix: {} | import("../types").WrapperImageFields;
|
|
17
|
+
fullScreenImageImgix: {} | import("../types").WrapperImageFields;
|
|
18
|
+
slugs: {} | null;
|
|
19
|
+
slugType: string | null;
|
|
20
|
+
catalogs: import("../types").TopicDetailsResponse[];
|
|
21
|
+
categories: import("../types").TopicDetailsResponse[];
|
|
22
|
+
productFields: import("../types").TopicProductFieldsResponse[];
|
|
23
|
+
isNew: boolean;
|
|
24
|
+
priority: number;
|
|
25
|
+
lastSyncDate: string;
|
|
26
|
+
taskID: number;
|
|
27
|
+
}>;
|
|
28
|
+
export declare const removeSubFamilyObject: (objectId: string) => Promise<void>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TopicDetailsResponse, AvailableCatalogs, TopicProductFieldsResponse, WrapperImageFields } from "../types";
|
|
2
|
+
export declare const reindexSubModel: (topicSubModelId: string) => Promise<{
|
|
3
|
+
objectID: string;
|
|
4
|
+
names?: Partial<Record<import("../types").ContentfulLocale, string | null>> | undefined;
|
|
5
|
+
code?: string | undefined;
|
|
6
|
+
description?: string | null | undefined;
|
|
7
|
+
thumbnailImgix?: {} | WrapperImageFields | undefined;
|
|
8
|
+
productLine?: TopicDetailsResponse | undefined;
|
|
9
|
+
productFields?: TopicProductFieldsResponse[] | undefined;
|
|
10
|
+
catalog?: TopicDetailsResponse | undefined;
|
|
11
|
+
subFamily?: TopicDetailsResponse | undefined;
|
|
12
|
+
parentModel?: TopicDetailsResponse | undefined;
|
|
13
|
+
isNew?: boolean | undefined;
|
|
14
|
+
priority?: number | undefined;
|
|
15
|
+
productCounter?: number | undefined;
|
|
16
|
+
lastSyncDate?: string | undefined;
|
|
17
|
+
taskID: number;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const reindexSubModels: (offset?: number, limit?: number, catalogCode?: AvailableCatalogs | undefined) => Promise<{
|
|
20
|
+
taskIDs: number[];
|
|
21
|
+
objectIDs: string[];
|
|
22
|
+
objects: Readonly<Record<string, any>>[];
|
|
23
|
+
offset: number;
|
|
24
|
+
limit: number;
|
|
25
|
+
completed: boolean;
|
|
26
|
+
s3FilePath?: string | undefined;
|
|
27
|
+
total?: number | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const removeSubModelObject: (topicSubModelId: string) => Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { EntryProps } from "contentful-management/dist/typings/entities/entry";
|
|
2
|
+
interface Filter {
|
|
3
|
+
key: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export default class ManageEntry {
|
|
7
|
+
get(contentType: string, filter: Filter, select?: string): Promise<import("contentful-management/dist/typings/entities/entry").Entry | undefined>;
|
|
8
|
+
add(data: Omit<EntryProps, "sys">, contentType: string, filter: Filter): Promise<import("contentful-management/dist/typings/entities/entry").Entry>;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const importDownloads: (offset?: number) => Promise<void>;
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export { reportError } from "./libs/sentry";
|
|
2
|
+
export { init as initPim } from "./pim/config";
|
|
3
|
+
export { init as initContentful, initBaseEntries, deletePages, deleteEntries, getEntryByID, getTopicPage, } from "./libs/contentful";
|
|
4
|
+
export { init as initS3, upload as uploadS3, saveJsonToS3, getFileFromS3, savePDFToS3, } from "./libs/s3";
|
|
5
|
+
export { importDictionaryFields, importDictionaryIcons, importDictionaryProductLine, importDictionaryProductSubLine, } from "./pim/methods/dictionary";
|
|
6
|
+
export { importCategories } from "./pim/methods/catalogs";
|
|
7
|
+
export { importLatestProducts } from "./pim/methods/latestProducts";
|
|
8
|
+
export { dailyProductsUpdate } from "./pim/methods/dailyProductsUpdate";
|
|
9
|
+
export { importModels } from "./pim/methods/models";
|
|
10
|
+
export { importSubModels } from "./pim/methods/submodels";
|
|
11
|
+
export { importSubFamilies } from "./pim/methods/subfamilies";
|
|
12
|
+
export { importFamilies } from "./pim/methods/families";
|
|
13
|
+
export { importProductByCode, setProductsRelationships, setProductRelationships, getAllProductEntriesByCatalog, audit, generateTechSpecPdf, setProductsAutodescription, getProductAutodescription, setProductAutodescriptionByTopicId, removeProductFromColorVariantsByProductLine, removeAllProductModelProductRelations, } from "./pim/methods/products";
|
|
14
|
+
export { resetIndexSettings } from "./algolia/config";
|
|
15
|
+
export { reindexFamilies, reindexFamily, removeFamilyObject, } from "./algolia/families";
|
|
16
|
+
export { pipedreamReindex } from "./algolia/pipedreamReindex";
|
|
17
|
+
export { reindexSubFamilies, reindexSubFamily, removeSubFamilyObject, } from "./algolia/subFamilies";
|
|
18
|
+
export { reindexProduct, reindexProducts, removeProductObject, } from "./algolia/products";
|
|
19
|
+
export { reindexSubModel, reindexSubModels, removeSubModelObject, } from "./algolia/subModels";
|
|
20
|
+
export { reindexModel, reindexModels, removeModelObject, } from "./algolia/models";
|
|
21
|
+
export { reindexDownload, reindexDownloads, removeDownloadObject, } from "./algolia/downloads";
|
|
22
|
+
export { reindexProject, reindexProjects, removeProjectObject, } from "./algolia/projects";
|
|
23
|
+
export { reindexStory, reindexStories, removeStoryObject, } from "./algolia/stories";
|
|
24
|
+
export { reindexPressReview, reindexPressReviews, removePressReviewObject, } from "./algolia/pressReview";
|
|
25
|
+
export { reindexPressRelease, reindexPressReleases, removePressReleaseObject, } from "./algolia/pressRelease";
|
|
26
|
+
export { reindexPost, reindexPosts, removePostObject } from "./algolia/news";
|
|
27
|
+
export { importDownloads } from "./downloads/import";
|
|
28
|
+
export { getLocalISOTime } from "./utils";
|
|
29
|
+
export { getStaticDailyProducts } from "./pim/endpoints";
|
|
30
|
+
export { log, setLogId, setLogOptions } from "./libs/logs";
|
|
31
|
+
export { removeRecordsByStatus } from "./algolia/clean";
|
|
32
|
+
export { generatePDFByUrl } from "./libs/puppeteer";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Entry } from "contentful-management/dist/typings/entities/entry";
|
|
2
|
+
import { Locale } from "contentful-management/types";
|
|
3
|
+
import { TopicDetailsResponse, AssetPropFieldsWithoutLocaleKey, OtherFilters } from "../types";
|
|
4
|
+
export declare const getClient: () => Promise<any>;
|
|
5
|
+
export declare const getEnvironmentDefaultLocale: () => Promise<Locale>;
|
|
6
|
+
export declare const getEnvironmentDefaultLocaleCode: () => Promise<string>;
|
|
7
|
+
export declare const getEntryByID: (entryID: string, contentTypeId: string, select?: string | undefined) => Promise<Entry>;
|
|
8
|
+
export declare const getAllEntries: (contentType: string, select?: string | undefined, filterKey?: string | undefined, filterValue?: string | undefined, limit?: number, otherFilters?: OtherFilters[] | undefined, include?: number) => Promise<Entry[]>;
|
|
9
|
+
export declare const getAssetDetails: (assetId: string) => Promise<AssetPropFieldsWithoutLocaleKey>;
|
|
10
|
+
export declare const getEntryImageDetails: (entry: Entry, fieldKey: string) => Promise<string>;
|
|
11
|
+
export declare const getTopicDetails: (topicEntry: Entry, fieldKey: string, contentType: string, lowerCaseKeys?: boolean, showRelatedEntities?: boolean, isCatalogEntry?: boolean, skipPageSlugs?: boolean) => Promise<TopicDetailsResponse[]>;
|
|
12
|
+
export declare const getSubFamilySlugDetails: (topicSubFamily: Entry) => Promise<{
|
|
13
|
+
catalogPageSlugs: any;
|
|
14
|
+
familyPageSlugs: any;
|
|
15
|
+
categoryPageSlugs: any;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const getDictionaryJson: () => Promise<any>;
|
|
18
|
+
export declare const getDictionaryValue: (fieldKey: string, fieldValue: string, fieldParent?: string, dictionaryJsonFile?: any) => Promise<any>;
|
|
19
|
+
export declare const getDictionaryLocaleValue: (locale: string, fieldKey: string, fieldValue: string, fieldParent?: string, dictionaryJsonFile?: any) => Promise<any>;
|
|
20
|
+
export declare const getTopicPage: (topicId: string, select?: string) => Promise<any>;
|