pim-import 4.30.3 → 4.30.5

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 (124) hide show
  1. package/dist/algolia/clean.js +10 -10
  2. package/dist/algolia/clean.js.map +1 -1
  3. package/dist/algolia/config.js +9 -9
  4. package/dist/algolia/config.js.map +1 -1
  5. package/dist/algolia/downloads.js +42 -43
  6. package/dist/algolia/downloads.js.map +1 -1
  7. package/dist/algolia/families.js +71 -73
  8. package/dist/algolia/families.js.map +1 -1
  9. package/dist/algolia/models.js +49 -50
  10. package/dist/algolia/models.js.map +1 -1
  11. package/dist/algolia/news.js +40 -41
  12. package/dist/algolia/news.js.map +1 -1
  13. package/dist/algolia/pressRelease.js +37 -38
  14. package/dist/algolia/pressRelease.js.map +1 -1
  15. package/dist/algolia/pressReview.js +35 -36
  16. package/dist/algolia/pressReview.js.map +1 -1
  17. package/dist/algolia/products.js +84 -85
  18. package/dist/algolia/products.js.map +1 -1
  19. package/dist/algolia/projects.js +44 -45
  20. package/dist/algolia/projects.js.map +1 -1
  21. package/dist/algolia/stories.js +53 -54
  22. package/dist/algolia/stories.js.map +1 -1
  23. package/dist/algolia/subFamilies.js +78 -80
  24. package/dist/algolia/subFamilies.js.map +1 -1
  25. package/dist/algolia/subModels.js +48 -49
  26. package/dist/algolia/subModels.js.map +1 -1
  27. package/dist/downloads/classes/manageEntry.js +3 -3
  28. package/dist/downloads/classes/manageEntry.js.map +1 -1
  29. package/dist/downloads/import.js +27 -27
  30. package/dist/downloads/import.js.map +1 -1
  31. package/dist/libs/contentful-cda.js +37 -44
  32. package/dist/libs/contentful-cda.js.map +1 -1
  33. package/dist/libs/contentful.js +131 -130
  34. package/dist/libs/contentful.js.map +1 -1
  35. package/dist/libs/imgix.js +23 -23
  36. package/dist/libs/imgix.js.map +1 -1
  37. package/dist/libs/logs.js +4 -4
  38. package/dist/libs/logs.js.map +1 -1
  39. package/dist/libs/pdf.js +5 -5
  40. package/dist/libs/pdf.js.map +1 -1
  41. package/dist/libs/s3.js +28 -28
  42. package/dist/libs/s3.js.map +1 -1
  43. package/dist/libs/sentry.js +6 -2
  44. package/dist/libs/sentry.js.map +1 -1
  45. package/dist/pim/config.js +3 -3
  46. package/dist/pim/config.js.map +1 -1
  47. package/dist/pim/endpoints.js +39 -39
  48. package/dist/pim/endpoints.js.map +1 -1
  49. package/dist/pim/methods/bulkPublish.js +10 -10
  50. package/dist/pim/methods/bulkPublish.js.map +1 -1
  51. package/dist/pim/methods/catalogs.js +62 -62
  52. package/dist/pim/methods/catalogs.js.map +1 -1
  53. package/dist/pim/methods/designers.js +19 -19
  54. package/dist/pim/methods/designers.js.map +1 -1
  55. package/dist/pim/methods/dictionary.js +66 -66
  56. package/dist/pim/methods/dictionary.js.map +1 -1
  57. package/dist/pim/methods/families.js +37 -37
  58. package/dist/pim/methods/families.js.map +1 -1
  59. package/dist/pim/methods/latestProducts.js +7 -7
  60. package/dist/pim/methods/latestProducts.js.map +1 -1
  61. package/dist/pim/methods/models.js +47 -47
  62. package/dist/pim/methods/models.js.map +1 -1
  63. package/dist/pim/methods/pages/catalogs.js +6 -6
  64. package/dist/pim/methods/pages/catalogs.js.map +1 -1
  65. package/dist/pim/methods/pages/families.js +7 -7
  66. package/dist/pim/methods/pages/families.js.map +1 -1
  67. package/dist/pim/methods/pages/subfamilies.js +11 -11
  68. package/dist/pim/methods/pages/subfamilies.js.map +1 -1
  69. package/dist/pim/methods/products.js +426 -426
  70. package/dist/pim/methods/products.js.map +1 -1
  71. package/dist/pim/methods/subfamilies.js +107 -107
  72. package/dist/pim/methods/subfamilies.js.map +1 -1
  73. package/dist/pim/methods/submodels.js +37 -37
  74. package/dist/pim/methods/submodels.js.map +1 -1
  75. package/dist/pim/request.js +2 -2
  76. package/dist/pim/request.js.map +1 -1
  77. package/dist/utils.js +23 -23
  78. package/dist/utils.js.map +1 -1
  79. package/package.json +4 -4
  80. package/src/algolia/downloads.ts +1 -2
  81. package/src/algolia/families.ts +2 -4
  82. package/src/algolia/models.ts +1 -2
  83. package/src/algolia/news.ts +1 -2
  84. package/src/algolia/pressRelease.ts +1 -2
  85. package/src/algolia/pressReview.ts +1 -2
  86. package/src/algolia/products.ts +1 -2
  87. package/src/algolia/projects.ts +1 -2
  88. package/src/algolia/stories.ts +1 -2
  89. package/src/algolia/subFamilies.ts +2 -4
  90. package/src/algolia/subModels.ts +1 -2
  91. package/src/downloads/import.ts +1 -1
  92. package/src/libs/contentful-cda.ts +7 -10
  93. package/src/libs/contentful.ts +8 -7
  94. package/src/libs/s3.ts +2 -2
  95. package/src/pim/endpoints.ts +8 -8
  96. package/src/pim/methods/bulkPublish.ts +1 -1
  97. package/src/pim/methods/dictionary.ts +1 -1
  98. package/src/pim/methods/families.ts +1 -1
  99. package/src/pim/methods/products.ts +7 -7
  100. package/types/algolia/clean.d.ts +1 -1
  101. package/types/algolia/config.d.ts +1 -1
  102. package/types/algolia/downloads.d.ts +1 -1
  103. package/types/algolia/families.d.ts +3 -3
  104. package/types/algolia/models.d.ts +1 -1
  105. package/types/algolia/news.d.ts +1 -1
  106. package/types/algolia/pressRelease.d.ts +1 -1
  107. package/types/algolia/pressReview.d.ts +1 -1
  108. package/types/algolia/products.d.ts +2 -2
  109. package/types/algolia/projects.d.ts +1 -1
  110. package/types/algolia/stories.d.ts +1 -1
  111. package/types/algolia/subFamilies.d.ts +1 -1
  112. package/types/algolia/subModels.d.ts +1 -1
  113. package/types/libs/contentful-cda.d.ts +2 -2
  114. package/types/libs/contentful.d.ts +10 -10
  115. package/types/libs/logs.d.ts +1 -1
  116. package/types/libs/pdf.d.ts +1 -1
  117. package/types/libs/s3.d.ts +1 -1
  118. package/types/pim/config.d.ts +1 -1
  119. package/types/pim/endpoints.d.ts +3 -3
  120. package/types/pim/methods/designers.d.ts +1 -1
  121. package/types/pim/methods/products.d.ts +3 -3
  122. package/types/resources/Audit.d.ts +1 -1
  123. package/types/types.d.ts +21 -21
  124. package/types/utils.d.ts +1 -1
@@ -2,13 +2,13 @@ import { ProductDetails } from "../../resources/ProductDetails";
2
2
  import { AvailableCatalogs } from "../../types";
3
3
  import type { Entry, CreateEntryProps } from "contentful-management/dist/typings/entities/entry";
4
4
  import { KeyValueMap } from "contentful-management/dist/typings/common-types";
5
- export declare type AvailableProductStatus = "To be review" | "Published" | "Unpublished";
6
- export declare type AvailableRelationFieldKeys = "accessories" | "accessoryOf" | "bulbOf" | "sparepartOf" | "bulbs" | "spareparts";
5
+ export type AvailableProductStatus = "To be review" | "Published" | "Unpublished";
6
+ export type AvailableRelationFieldKeys = "accessories" | "accessoryOf" | "bulbOf" | "sparepartOf" | "bulbs" | "spareparts";
7
7
  export declare const setHideInRegionField: (destinations: string[], pageData: CreateEntryProps) => Promise<KeyValueMap>;
8
8
  export declare const certificationFields: string[];
9
9
  export declare const excludeCertificationFieldsKeys: string[];
10
10
  export declare const getProductPageIdByCode: (productCode: string) => string;
11
- export declare const importProduct: (productDetails: ProductDetails, catalog: AvailableCatalogs, familyCodeIn?: string[] | undefined, subFamilyCodeIn?: string[] | undefined) => Promise<boolean>;
11
+ export declare const importProduct: (productDetails: ProductDetails, catalog: AvailableCatalogs, familyCodeIn?: string[], subFamilyCodeIn?: string[]) => Promise<boolean>;
12
12
  export declare const setProductRelationships: (code: string, fieldKey?: AvailableRelationFieldKeys | null) => Promise<void>;
13
13
  export declare const setProductsRelationships: (catalog: AvailableCatalogs, lastModified: string, fieldKey: AvailableRelationFieldKeys | null, offset?: number, limit?: number, s3FilePath?: string) => Promise<{
14
14
  offset: number;
@@ -1,4 +1,4 @@
1
- declare type AuditCatalog = {
1
+ type AuditCatalog = {
2
2
  where: string;
3
3
  catalogCode?: string;
4
4
  categoryCode?: string;
package/types/types.d.ts CHANGED
@@ -1,11 +1,11 @@
1
- export declare type AvailableCatalogs = "ARCHITECTURAL" | "OUTDOOR" | "DECORATIVE";
2
- export declare type AvailableEntryStatus = "Published" | "Changed" | "Draft" | "Archived";
3
- export declare type NonEmptyArray<T> = [T, ...T[]];
4
- export declare type ObjectPartial = Partial<Record<string, any>>;
1
+ export type AvailableCatalogs = "ARCHITECTURAL" | "OUTDOOR" | "DECORATIVE";
2
+ export type AvailableEntryStatus = "Published" | "Changed" | "Draft" | "Archived";
3
+ export type NonEmptyArray<T> = [T, ...T[]];
4
+ export type ObjectPartial = Partial<Record<string, any>>;
5
5
  export type { Config as ContentfulConfig } from "./libs/contentful";
6
- export declare type PimLocale = "en" | "en_US" | "it" | "es" | "de" | "fr" | "sv" | "no" | "da" | "ru";
7
- export declare type ContentfulLocale = "en" | "en-US" | "it" | "es" | "de" | "fr";
8
- export declare type PimValues = {
6
+ export type PimLocale = "en" | "en_US" | "it" | "es" | "de" | "fr" | "sv" | "no" | "da" | "ru";
7
+ export type ContentfulLocale = "en" | "en-US" | "it" | "es" | "de" | "fr";
8
+ export type PimValues = {
9
9
  value_en: string;
10
10
  value_en_US?: string | null;
11
11
  value_it: string | null;
@@ -17,7 +17,7 @@ export declare type PimValues = {
17
17
  value_da: string | null;
18
18
  value_ru: string | null;
19
19
  };
20
- export declare type PimDescription = {
20
+ export type PimDescription = {
21
21
  description_en: string;
22
22
  description_en_US?: string | null;
23
23
  description_it: string | null;
@@ -29,7 +29,7 @@ export declare type PimDescription = {
29
29
  description_da: string | null;
30
30
  description_ru: string | null;
31
31
  };
32
- export declare type PimProductDescription = {
32
+ export type PimProductDescription = {
33
33
  description1_en: string;
34
34
  description1_en_US?: string | null;
35
35
  description1_it: string | null;
@@ -41,7 +41,7 @@ export declare type PimProductDescription = {
41
41
  description1_da: string | null;
42
42
  description1_ru: string | null;
43
43
  };
44
- export declare type PimProductExcerpt = {
44
+ export type PimProductExcerpt = {
45
45
  description2_en: string;
46
46
  description2_en_US?: string | null;
47
47
  description2_it: string | null;
@@ -53,28 +53,28 @@ export declare type PimProductExcerpt = {
53
53
  description2_da: string | null;
54
54
  description2_ru: string | null;
55
55
  };
56
- export declare type CfSys = {
56
+ export type CfSys = {
57
57
  sys: {
58
58
  type: string;
59
59
  linkType: string;
60
60
  id: string;
61
61
  };
62
62
  };
63
- export declare type PaginationResults = {
63
+ export type PaginationResults = {
64
64
  offset: number;
65
65
  limit: number;
66
66
  completed: boolean;
67
67
  s3FilePath?: string;
68
68
  total?: number;
69
69
  };
70
- export declare type CfLocalizedEntryField = Partial<Record<ContentfulLocale, string | null>>;
71
- export declare type TopicDetailsResponse = {
70
+ export type CfLocalizedEntryField = Partial<Record<ContentfulLocale, string | null>>;
71
+ export type TopicDetailsResponse = {
72
72
  names: CfLocalizedEntryField;
73
73
  code: string;
74
74
  slugs?: {};
75
75
  details?: {};
76
76
  };
77
- export declare type ProductFieldsRequiredData = {
77
+ export type ProductFieldsRequiredData = {
78
78
  key: string;
79
79
  parent: string;
80
80
  icon: boolean;
@@ -87,7 +87,7 @@ export interface AlgoliaPaginateRecords extends PaginationResults {
87
87
  export interface AlgoliaPaginateObjectIds extends PaginationResults {
88
88
  objectIds: string[];
89
89
  }
90
- export declare type AssetPropFields = {
90
+ export type AssetPropFields = {
91
91
  title: {
92
92
  [key: string]: string;
93
93
  };
@@ -105,7 +105,7 @@ export declare type AssetPropFields = {
105
105
  };
106
106
  };
107
107
  };
108
- export declare type AssetPropFieldsWithoutLocaleKey = {
108
+ export type AssetPropFieldsWithoutLocaleKey = {
109
109
  title: {
110
110
  [key: string]: string;
111
111
  };
@@ -121,7 +121,7 @@ export declare type AssetPropFieldsWithoutLocaleKey = {
121
121
  uploadFrom?: Record<string, any>;
122
122
  };
123
123
  };
124
- export declare type TopicProductFieldsResponse = {
124
+ export type TopicProductFieldsResponse = {
125
125
  names: CfLocalizedEntryField;
126
126
  code: string;
127
127
  slugs: {};
@@ -144,7 +144,7 @@ interface ImgixDataImageDetails {
144
144
  width: number;
145
145
  height: number;
146
146
  }
147
- export declare type WrapperImageFields = {
147
+ export type WrapperImageFields = {
148
148
  internalName: string;
149
149
  imgixData: ImgixData;
150
150
  altText: CfLocalizedEntryField;
@@ -185,8 +185,8 @@ export interface ImgixAttributes {
185
185
  warning_spoof: number;
186
186
  warning_violence: number;
187
187
  }
188
- export declare type RequiredImgixAttributes = Pick<ImgixAttributes, "origin_path" | "file_size" | "media_width" | "media_height" | "content_type" | "name">;
189
- export declare type AlgoliaObjectFilter = {
188
+ export type RequiredImgixAttributes = Pick<ImgixAttributes, "origin_path" | "file_size" | "media_width" | "media_height" | "content_type" | "name">;
189
+ export type AlgoliaObjectFilter = {
190
190
  key: string;
191
191
  value: string;
192
192
  };
package/types/utils.d.ts CHANGED
@@ -15,7 +15,7 @@ export declare const doChunk: (list: string[], size: number) => any[][];
15
15
  export declare const getLocalISOTime: () => string;
16
16
  export declare const capitalizeFirstLetter: (text: string) => string;
17
17
  export declare const keysToLowerCase: (obj: any, includeNestedKeys?: boolean) => any;
18
- export declare const addProductFieldValueCodesByPimDetails: (pimDetails: any, productFields: any, fieldKey: string, fieldParentKey?: string | undefined, customKey?: string | undefined, mergeValues?: boolean | undefined, keepKey?: boolean | undefined) => string[];
18
+ export declare const addProductFieldValueCodesByPimDetails: (pimDetails: any, productFields: any, fieldKey: string, fieldParentKey?: string, customKey?: string, mergeValues?: boolean, keepKey?: boolean) => string[];
19
19
  export declare const replaceAll: (original: string, from: string, to: string) => string;
20
20
  export declare const getAllTranslations: (values: any) => Promise<any>;
21
21
  export declare const truncateString: (string: string, limit: number) => string;