denwa-web-shared 1.0.48 → 1.0.49
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/server/index.cjs.js
CHANGED
|
@@ -467,7 +467,7 @@ const generateYandexFeedXML = ({
|
|
|
467
467
|
<name>${escapeXml(item.name)}</name>
|
|
468
468
|
<vendor>${escapeXml(item.vendor)}</vendor>
|
|
469
469
|
<description>${escapeXml(item.description)}</description>
|
|
470
|
-
|
|
470
|
+
${item.vendorCode && `<vendorCode>${escapeXml(item.vendorCode)}</vendorCode>`}
|
|
471
471
|
<pickup>${item.pickup}</pickup>
|
|
472
472
|
${(_a = item.params) == null ? void 0 : _a.map((item2) => {
|
|
473
473
|
return `<param name="${item2.name}">${escapeXml(item2.value)}</param>`;
|
|
@@ -477,7 +477,8 @@ const generateYandexFeedXML = ({
|
|
|
477
477
|
}).join("");
|
|
478
478
|
const categoriesXml = categoriesData.map((item) => {
|
|
479
479
|
const id = typeof item.id === "number" ? item.id : uuidToNumericId(item.id);
|
|
480
|
-
|
|
480
|
+
const parentId = item.parentId ? ` parentId="${typeof item.parentId === "number" ? item.parentId : uuidToNumericId(item.parentId)}"` : "";
|
|
481
|
+
return `<category id="${id}"${parentId}>${escapeXml(item.name)}</category>`;
|
|
481
482
|
}).join("");
|
|
482
483
|
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
483
484
|
<!DOCTYPE yml_catalog SYSTEM "shops.dtd">
|
package/dist/server/index.es.js
CHANGED
|
@@ -465,7 +465,7 @@ const generateYandexFeedXML = ({
|
|
|
465
465
|
<name>${escapeXml(item.name)}</name>
|
|
466
466
|
<vendor>${escapeXml(item.vendor)}</vendor>
|
|
467
467
|
<description>${escapeXml(item.description)}</description>
|
|
468
|
-
|
|
468
|
+
${item.vendorCode && `<vendorCode>${escapeXml(item.vendorCode)}</vendorCode>`}
|
|
469
469
|
<pickup>${item.pickup}</pickup>
|
|
470
470
|
${(_a = item.params) == null ? void 0 : _a.map((item2) => {
|
|
471
471
|
return `<param name="${item2.name}">${escapeXml(item2.value)}</param>`;
|
|
@@ -475,7 +475,8 @@ const generateYandexFeedXML = ({
|
|
|
475
475
|
}).join("");
|
|
476
476
|
const categoriesXml = categoriesData.map((item) => {
|
|
477
477
|
const id = typeof item.id === "number" ? item.id : uuidToNumericId(item.id);
|
|
478
|
-
|
|
478
|
+
const parentId = item.parentId ? ` parentId="${typeof item.parentId === "number" ? item.parentId : uuidToNumericId(item.parentId)}"` : "";
|
|
479
|
+
return `<category id="${id}"${parentId}>${escapeXml(item.name)}</category>`;
|
|
479
480
|
}).join("");
|
|
480
481
|
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
481
482
|
<!DOCTYPE yml_catalog SYSTEM "shops.dtd">
|
|
@@ -231,13 +231,14 @@ export declare const generateYandexFeedXML: ({ shopName, shopCompany, delivery,
|
|
|
231
231
|
categoriesData: {
|
|
232
232
|
id: string | number;
|
|
233
233
|
name: string;
|
|
234
|
+
parentId?: string | number;
|
|
234
235
|
}[];
|
|
235
236
|
offersData: {
|
|
236
237
|
id: string | number;
|
|
237
238
|
categoryId: string | number;
|
|
238
239
|
name: string;
|
|
239
240
|
vendor: string;
|
|
240
|
-
vendorCode
|
|
241
|
+
vendorCode?: string | null;
|
|
241
242
|
description: string;
|
|
242
243
|
href: string;
|
|
243
244
|
images: IPreparedServerImageWithAlt[];
|