pim-import 5.9.0 → 5.10.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.
|
@@ -20,6 +20,7 @@ export type AlgoliaFamilyRecord = {
|
|
|
20
20
|
categories: TopicDetailsResponse[];
|
|
21
21
|
productFields: TopicProductFieldsResponse[];
|
|
22
22
|
productFieldsUs: TopicProductFieldsResponse[];
|
|
23
|
+
productFieldsCn: TopicProductFieldsResponse[];
|
|
23
24
|
isNew: boolean;
|
|
24
25
|
priority: number;
|
|
25
26
|
destinations?: string[];
|
|
@@ -53,6 +54,7 @@ export declare const reindexFamily: (topicFamilyEntryId: string) => Promise<{
|
|
|
53
54
|
categories: TopicDetailsResponse[];
|
|
54
55
|
productFields: TopicProductFieldsResponse[];
|
|
55
56
|
productFieldsUs: TopicProductFieldsResponse[];
|
|
57
|
+
productFieldsCn: TopicProductFieldsResponse[];
|
|
56
58
|
isNew: boolean;
|
|
57
59
|
priority: number;
|
|
58
60
|
destinations?: string[] | undefined;
|
package/dist/algolia/families.js
CHANGED
|
@@ -156,6 +156,8 @@ const getObject = async (topicFamily) => {
|
|
|
156
156
|
const productFields = await getProductFields(topicFamily);
|
|
157
157
|
(0, logs_1.log)(`Get productFieldsUs details...`);
|
|
158
158
|
const productFieldsUs = await getProductFields(topicFamily, "PROFESSIONAL_US");
|
|
159
|
+
(0, logs_1.log)(`Get productFieldsCn details...`);
|
|
160
|
+
const productFieldsCn = await getProductFields(topicFamily, "PROFESSIONAL_CHINA");
|
|
159
161
|
const isNew = topicFamilyWithFields?.fields?.isNew?.[defaultEnvironmentLocaleCode] ||
|
|
160
162
|
false;
|
|
161
163
|
(0, logs_1.log)(`Get thumbnail imgix details...`);
|
|
@@ -191,6 +193,7 @@ const getObject = async (topicFamily) => {
|
|
|
191
193
|
categories,
|
|
192
194
|
productFields,
|
|
193
195
|
productFieldsUs,
|
|
196
|
+
productFieldsCn,
|
|
194
197
|
priority,
|
|
195
198
|
isNew,
|
|
196
199
|
destinations: topicFamilyWithFields?.fields?.destinations?.[defaultEnvironmentLocaleCode] || [],
|
|
@@ -27,6 +27,7 @@ export declare const reindexSubFamily: (topicSubFamilyEntryId: string) => Promis
|
|
|
27
27
|
categories: import("../types").TopicDetailsResponse[];
|
|
28
28
|
productFields: import("../types").TopicProductFieldsResponse[];
|
|
29
29
|
productFieldsUs: import("../types").TopicProductFieldsResponse[];
|
|
30
|
+
productFieldsCn: import("../types").TopicProductFieldsResponse[];
|
|
30
31
|
isNew: boolean;
|
|
31
32
|
priority: number;
|
|
32
33
|
destinations?: string[] | undefined;
|
|
@@ -75,6 +75,7 @@ const getProductFields = async (topicSubFamily, destination = "PROFESSIONAL_GLOB
|
|
|
75
75
|
productFields.totalProducts = {};
|
|
76
76
|
for (const destination of allDestinations) {
|
|
77
77
|
productFields.totalProducts[destination] = topicProductEntries.filter((topicProductEntry) => topicProductEntry?.fields?.productFields?.[defaultEnvironmentLocaleCode]?.destinations?.find((productDestination) => productDestination.code === destination)).length;
|
|
78
|
+
(0, logs_1.log)(`Total products for destination ${destination}: ${productFields.totalProducts[destination]}`);
|
|
78
79
|
}
|
|
79
80
|
productFields.certifiedFilters = [];
|
|
80
81
|
for (const topicProduct of topicProductEntries) {
|
|
@@ -163,6 +164,8 @@ const getObject = async (topicSubFamily) => {
|
|
|
163
164
|
const productFields = await getProductFields(topicSubFamilyWithFields);
|
|
164
165
|
(0, logs_1.log)(`Get productFieldsUs details...`);
|
|
165
166
|
const productFieldsUs = await getProductFields(topicSubFamilyWithFields, "PROFESSIONAL_US");
|
|
167
|
+
(0, logs_1.log)(`Get productFieldsCn details...`);
|
|
168
|
+
const productFieldsCn = await getProductFields(topicSubFamilyWithFields, "PROFESSIONAL_CHINA");
|
|
166
169
|
const isNew = topicSubFamilyWithFields?.fields?.isNew?.[defaultEnvironmentLocaleCode] ||
|
|
167
170
|
false;
|
|
168
171
|
(0, logs_1.log)(`Get thumbnail imgix details...`);
|
|
@@ -229,6 +232,7 @@ const getObject = async (topicSubFamily) => {
|
|
|
229
232
|
parentFamily,
|
|
230
233
|
productFields,
|
|
231
234
|
productFieldsUs,
|
|
235
|
+
productFieldsCn,
|
|
232
236
|
priority,
|
|
233
237
|
isNew,
|
|
234
238
|
destinations: topicSubFamilyWithFields?.fields?.destinations?.[defaultEnvironmentLocaleCode] || [],
|