pim-import 2.77.0 → 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.
Files changed (68) hide show
  1. package/dist/libs/contentful.js +29 -1
  2. package/dist/libs/contentful.js.map +1 -1
  3. package/dist/pim/methods/products.js +8 -23
  4. package/dist/pim/methods/products.js.map +1 -1
  5. package/dist/pim/methods/subfamilies.js +15 -0
  6. package/dist/pim/methods/subfamilies.js.map +1 -1
  7. package/package.json +5 -1
  8. package/src/libs/contentful.ts +58 -0
  9. package/src/pim/methods/products.ts +8 -43
  10. package/src/pim/methods/subfamilies.ts +19 -0
  11. package/src/resources/CollectionSubFamilies.ts +6 -6
  12. package/src/resources/ProductDetails.ts +1 -1
  13. package/tsconfig.json +2 -1
  14. package/types/algolia/clean.d.ts +10 -0
  15. package/types/algolia/config.d.ts +96 -0
  16. package/types/algolia/downloads.d.ts +36 -0
  17. package/types/algolia/families.d.ts +48 -0
  18. package/types/algolia/models.d.ts +31 -0
  19. package/types/algolia/news.d.ts +33 -0
  20. package/types/algolia/pipedreamReindex.d.ts +4 -0
  21. package/types/algolia/pressRelease.d.ts +33 -0
  22. package/types/algolia/pressReview.d.ts +33 -0
  23. package/types/algolia/products.d.ts +75 -0
  24. package/types/algolia/projects.d.ts +43 -0
  25. package/types/algolia/stories.d.ts +43 -0
  26. package/types/algolia/subFamilies.d.ts +28 -0
  27. package/types/algolia/subModels.d.ts +29 -0
  28. package/types/downloads/classes/manageEntry.d.ts +10 -0
  29. package/types/downloads/import.d.ts +1 -0
  30. package/types/index.d.ts +32 -0
  31. package/types/libs/contentful-cda.d.ts +20 -0
  32. package/types/libs/contentful.d.ts +59 -0
  33. package/types/libs/imgix.d.ts +14 -0
  34. package/types/libs/logs.d.ts +8 -0
  35. package/types/libs/puppeteer.d.ts +11 -0
  36. package/types/libs/s3.d.ts +22 -0
  37. package/types/libs/sentry.d.ts +2 -0
  38. package/types/pim/config.d.ts +13 -0
  39. package/types/pim/endpoints.d.ts +20 -0
  40. package/types/pim/methods/catalogs.d.ts +21 -0
  41. package/types/pim/methods/dailyProductsUpdate.d.ts +2 -0
  42. package/types/pim/methods/dictionary.d.ts +6 -0
  43. package/types/pim/methods/families.d.ts +4 -0
  44. package/types/pim/methods/latestProducts.d.ts +12 -0
  45. package/types/pim/methods/models.d.ts +2 -0
  46. package/types/pim/methods/pages/catalogs.d.ts +3 -0
  47. package/types/pim/methods/pages/families.d.ts +6 -0
  48. package/types/pim/methods/pages/subfamilies.d.ts +12 -0
  49. package/types/pim/methods/products.d.ts +47 -0
  50. package/types/pim/methods/subfamilies.d.ts +13 -0
  51. package/types/pim/methods/submodels.d.ts +2 -0
  52. package/types/pim/request.d.ts +5 -0
  53. package/types/resources/AllProducts.d.ts +42 -0
  54. package/types/resources/Audit.d.ts +24 -0
  55. package/types/resources/CatalogDetails.d.ts +46 -0
  56. package/types/resources/CollectionModels.d.ts +41 -0
  57. package/types/resources/CollectionSubFamilies.d.ts +45 -0
  58. package/types/resources/CollectionSubModels.d.ts +36 -0
  59. package/types/resources/DProductSubLine.d.ts +34 -0
  60. package/types/resources/FamilyDetails.d.ts +31 -0
  61. package/types/resources/ProductDetails.d.ts +346 -0
  62. package/types/resources/ProductRelation.d.ts +25 -0
  63. package/types/resources/cfFields.d.ts +8 -0
  64. package/types/types.d.ts +188 -0
  65. package/types/utils.d.ts +19 -0
  66. package/dist/browser.js +0 -117
  67. package/dist/browser.js.map +0 -1
  68. package/src/browser.ts +0 -117
@@ -28,9 +28,11 @@ import {
28
28
  secondBetweenTwoDate,
29
29
  getPimTranslations,
30
30
  keysToLowerCase,
31
+ replaceAll,
31
32
  } from "../utils";
32
33
  import { getSubFamilySlugDetails } from "../pim/methods/subfamilies";
33
34
  import { removeProductObject } from "../algolia/products";
35
+ import { GenericData } from "../resources/ProductDetails";
34
36
 
35
37
  export type Config = {
36
38
  accessToken: string;
@@ -1386,3 +1388,59 @@ export const archiveEntry = async (
1386
1388
 
1387
1389
  return entry;
1388
1390
  };
1391
+
1392
+ /**
1393
+ * Format designer data field
1394
+ *
1395
+ * @param designer
1396
+ * @returns
1397
+ */
1398
+ export const getDesignerData = async (designer: GenericData) => {
1399
+ const data: CreateEntryProps = {
1400
+ fields: {
1401
+ name: {},
1402
+ code: {},
1403
+ },
1404
+ };
1405
+
1406
+ data.fields.name = getPimTranslations(designer);
1407
+ data.fields = await addFieldValue(data, "code", designer.code);
1408
+
1409
+ return data;
1410
+ };
1411
+
1412
+ export const addDesignerData = async (
1413
+ data: any,
1414
+ designer: GenericData,
1415
+ manyReferences: boolean = false
1416
+ ) => {
1417
+ const designerId = replaceAll(designer.code, ",", "_");
1418
+ log(`Set designer relation: ${designer.code}`);
1419
+ let designerEntry: Entry = await getEntryByCode(
1420
+ designer.code,
1421
+ "topicDesigner",
1422
+ "sys"
1423
+ );
1424
+
1425
+ if (!designerEntry) {
1426
+ log(`${designer.code} designer not found, creating it...`);
1427
+ const designerData = await getDesignerData(designer);
1428
+ designerEntry = await createEntryWithId(
1429
+ "topicDesigner",
1430
+ designerId,
1431
+ designerData,
1432
+ true
1433
+ );
1434
+ } else {
1435
+ log(`${designerId} designer already exists`);
1436
+ }
1437
+
1438
+ data.fields = await addToRelationFields(
1439
+ data,
1440
+ manyReferences ? "designers" : "designer",
1441
+ designerEntry.sys.id,
1442
+ manyReferences
1443
+ );
1444
+
1445
+ return data.fields;
1446
+ };
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  ProductDetails,
3
3
  AssetsEntity,
4
- GenericData,
5
4
  ColourVariant,
6
5
  } from "../../resources/ProductDetails";
7
6
  import { AllProductsEntry } from "../../resources/AllProducts";
@@ -32,6 +31,7 @@ import {
32
31
  getDictionaryJson,
33
32
  getAllEntries,
34
33
  archiveEntry,
34
+ addDesignerData,
35
35
  } from "../../libs/contentful";
36
36
  import type {
37
37
  Entry,
@@ -47,7 +47,6 @@ import {
47
47
  sanitizeValue,
48
48
  getPimTranslations,
49
49
  basename,
50
- replaceAll,
51
50
  } from "../../utils";
52
51
  import {
53
52
  saveAllProductsToS3,
@@ -581,20 +580,6 @@ const getProductAssets = async (
581
580
  return assets;
582
581
  };
583
582
 
584
- const getDesignerData = async (designer: GenericData) => {
585
- const data: CreateEntryProps = {
586
- fields: {
587
- name: {},
588
- code: {},
589
- },
590
- };
591
-
592
- data.fields.name = getPimTranslations(designer);
593
- data.fields = await addFieldValue(data, "code", designer.code);
594
-
595
- return data;
596
- };
597
-
598
583
  const getProductData = async (
599
584
  productEntry: Entry,
600
585
  productDetails: ProductDetails
@@ -931,33 +916,13 @@ const getProductData = async (
931
916
  // designers
932
917
  if (productDetails.designers) {
933
918
  for (const designer of productDetails.designers) {
934
- const designerId = replaceAll(designer.code, ",", "_");
935
- log(`Set designer relation: ${designer.code}`);
936
- let designerEntry: Entry = await getEntryByCode(
937
- designer.code,
938
- "topicDesigner",
939
- "sys"
940
- );
941
-
942
- if (!designerEntry) {
943
- log(`${designer.code} designer not found, creating it...`);
944
- const designerData = await getDesignerData(designer);
945
- designerEntry = await createEntryWithId(
946
- "topicDesigner",
947
- designerId,
948
- designerData,
949
- true
950
- );
951
- } else {
952
- log(`${designerId} designer already exists`);
953
- }
954
-
955
- data.fields = await addToRelationFields(
956
- data,
957
- "designers",
958
- designerEntry.sys.id,
959
- true
960
- );
919
+ data.fields = await addDesignerData(data, designer, true);
920
+ }
921
+ } else {
922
+ log(`No designers found`, "WARN");
923
+ if (data.fields.designers?.[defaultEnvironmentLocaleCode]) {
924
+ log(`remove old designers relation`);
925
+ data.fields.designers = [];
961
926
  }
962
927
  }
963
928
 
@@ -9,6 +9,7 @@ import {
9
9
  cfLocales,
10
10
  addToRelationFields,
11
11
  addFieldValue,
12
+ addDesignerData,
12
13
  } from "../../libs/contentful";
13
14
  import { log } from "../../libs/logs";
14
15
  import type {
@@ -276,6 +277,7 @@ const getTopicSubFamilyData = async (
276
277
  catalog: AvailableCatalogs,
277
278
  topicSubFamily: Entry
278
279
  ) => {
280
+ const defaultEnvironmentLocaleCode = await getEnvironmentDefaultLocaleCode();
279
281
  const data: CreateEntryProps = {
280
282
  fields: topicSubFamily?.fields || {},
281
283
  };
@@ -377,6 +379,23 @@ const getTopicSubFamilyData = async (
377
379
  );
378
380
  }
379
381
 
382
+ // Designer
383
+ if (subFamily?.designers) {
384
+ const designer = subFamily.designers[0];
385
+ if (designer?.code) {
386
+ log(`set ${designer.code} designer relation`);
387
+ data.fields = await addDesignerData(data, designer);
388
+ } else {
389
+ log(`no designer found`, "WARN");
390
+ if (data.fields.designer?.[defaultEnvironmentLocaleCode]) {
391
+ log(
392
+ `remove old designer relation with ${data.fields.designer?.[defaultEnvironmentLocaleCode].sys.id}`
393
+ );
394
+ data.fields.designer = {};
395
+ }
396
+ }
397
+ }
398
+
380
399
  // lastPimSyncDate
381
400
  data.fields = await addFieldValue(data, "lastPimSyncDate", getLocalISOTime());
382
401
 
@@ -5,12 +5,12 @@ export interface CollectionSubFamilies {
5
5
  pagedCollection?: PagedCollectionEntity[] | null;
6
6
  }
7
7
  export interface PagedCollectionEntity {
8
- data: Data;
8
+ data: GenericData;
9
9
  priority?: number;
10
10
  catalogCode: string;
11
11
  categoryCode: string;
12
12
  parentFamily: ParentFamily;
13
- designers?: null[] | null;
13
+ designers?: GenericData[] | null;
14
14
  relatedProducts?: string[] | null;
15
15
  description1_en?: string;
16
16
  description1_en_us?: string;
@@ -23,10 +23,10 @@ export interface PagedCollectionEntity {
23
23
  description1_da?: string;
24
24
  description1_ru?: string;
25
25
  }
26
- export interface Data {
26
+ export interface GenericData {
27
27
  code: string;
28
28
  value_en: string;
29
- value_en_US: string;
29
+ value_en_US?: string;
30
30
  value_it: string;
31
31
  value_es: string;
32
32
  value_de: string;
@@ -39,6 +39,6 @@ export interface Data {
39
39
  }
40
40
  export interface OthersData {}
41
41
  export interface ParentFamily {
42
- data: Data;
43
- designers?: null[] | null;
42
+ data: GenericData;
43
+ designers?: GenericData[] | null;
44
44
  }
@@ -99,7 +99,7 @@ export interface GenericData {
99
99
  image?: null;
100
100
  imageAlternative?: null;
101
101
  value_en: string;
102
- value_en_US?: null;
102
+ value_en_US?: string;
103
103
  value_it: string;
104
104
  value_es: string;
105
105
  value_de: string;
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
- //"declaration": true, /* Generates corresponding '.d.ts' file. */
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,4 @@
1
+ import { AvailableCatalogs } from "src/types";
2
+ declare type AvailablreReindexType = "reindexFamilies" | "reindexSubFamilies";
3
+ export declare const pipedreamReindex: (reindexType: AvailablreReindexType, catalogCode: AvailableCatalogs) => Promise<void>;
4
+ export {};
@@ -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>;