pim-import 4.3.1 → 4.3.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/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.reindexModel = exports.removeSubModelObject = exports.reindexSubModels = exports.reindexSubModel = exports.removeProductObject = exports.reindexProducts = exports.reindexProduct = exports.removeSubFamilyObject = exports.reindexSubFamily = exports.reindexSubFamilies = exports.removeFamilyObject = exports.reindexFamily = exports.reindexFamilies = exports.resetIndexSettings = exports.publishAllDraftProducts = exports.getProductPageIdByCode = exports.removeAllProductModelProductRelations = exports.removeProductFromColorVariantsByProductLine = exports.setProductAutodescriptionByTopicId = exports.getProductAutodescription = exports.setProductsAutodescription = exports.generateTechSpecPdf = exports.audit = exports.getAllProductEntriesByCatalog = exports.setProductRelationships = exports.setProductsRelationships = exports.importProductByCode = exports.importFamilies = exports.importSubFamilies = exports.importSubModels = exports.importModels = exports.importLatestProducts = exports.importCategories = exports.importDictionaryProductSubLine = exports.importDictionaryProductLine = exports.importDictionaryIcons = exports.importDictionaryFields = exports.savePDFToS3 = exports.getFileFromS3 = exports.saveJsonToS3 = exports.uploadS3 = exports.initS3 = exports.getEntries = exports.getTopicPage = exports.getEntryByID = exports.deleteEntries = exports.deletePages = exports.initBaseEntries = exports.initContentful = exports.initPim = void 0;
3
+ exports.reindexModel = exports.removeSubModelObject = exports.reindexSubModels = exports.reindexSubModel = exports.removeProductObject = exports.reindexProducts = exports.reindexProduct = exports.removeSubFamilyObject = exports.reindexSubFamily = exports.reindexSubFamilies = exports.removeFamilyObject = exports.reindexFamily = exports.reindexFamilies = exports.resetIndexSettings = exports.publishAllProductDrafts = exports.getProductPageIdByCode = exports.removeAllProductModelProductRelations = exports.removeProductFromColorVariantsByProductLine = exports.setProductAutodescriptionByTopicId = exports.getProductAutodescription = exports.setProductsAutodescription = exports.generateTechSpecPdf = exports.audit = exports.getAllProductEntriesByCatalog = exports.setProductRelationships = exports.setProductsRelationships = exports.importProductByCode = exports.importFamilies = exports.importSubFamilies = exports.importSubModels = exports.importModels = exports.importLatestProducts = exports.importCategories = exports.importDictionaryProductSubLine = exports.importDictionaryProductLine = exports.importDictionaryIcons = exports.importDictionaryFields = exports.savePDFToS3 = exports.getFileFromS3 = exports.saveJsonToS3 = exports.uploadS3 = exports.initS3 = exports.getEntries = exports.getTopicPage = exports.getEntryByID = exports.deleteEntries = exports.deletePages = exports.initBaseEntries = exports.initContentful = exports.initPim = void 0;
4
4
  exports.generatePDFByUrl = exports.removeRecordsByStatus = exports.getLogFolder = exports.setLogFilename = exports.setLogPath = exports.setLogId = exports.setServerUtils = exports.log = exports.getLatestProducts = exports.getStaticDailyProducts = exports.getLocalISOTime = exports.importDownloads = exports.removePostObject = exports.reindexPosts = exports.reindexPost = exports.removePressReleaseObject = exports.reindexPressReleases = exports.reindexPressRelease = exports.removePressReviewObject = exports.reindexPressReviews = exports.reindexPressReview = exports.removeStoryObject = exports.reindexStories = exports.reindexStory = exports.removeProjectObject = exports.reindexProjects = exports.reindexProject = exports.removeDownloadObject = exports.reindexDownloads = exports.reindexDownload = exports.removeModelObject = exports.reindexModels = void 0;
5
5
  var config_1 = require("./pim/config");
6
6
  Object.defineProperty(exports, "initPim", { enumerable: true, get: function () { return config_1.init; } });
@@ -49,7 +49,7 @@ Object.defineProperty(exports, "removeProductFromColorVariantsByProductLine", {
49
49
  Object.defineProperty(exports, "removeAllProductModelProductRelations", { enumerable: true, get: function () { return products_1.removeAllProductModelProductRelations; } });
50
50
  Object.defineProperty(exports, "getProductPageIdByCode", { enumerable: true, get: function () { return products_1.getProductPageIdByCode; } });
51
51
  var bulkPublish_1 = require("./pim/methods/bulkPublish");
52
- Object.defineProperty(exports, "publishAllDraftProducts", { enumerable: true, get: function () { return bulkPublish_1.publishAllDraftProducts; } });
52
+ Object.defineProperty(exports, "publishAllProductDrafts", { enumerable: true, get: function () { return bulkPublish_1.publishAllProductDrafts; } });
53
53
  var config_2 = require("./algolia/config");
54
54
  Object.defineProperty(exports, "resetIndexSettings", { enumerable: true, get: function () { return config_2.resetIndexSettings; } });
55
55
  var families_2 = require("./algolia/families");
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.publishAllDraftProducts = exports.publishTopicProduct = void 0;
3
+ exports.publishAllProductDrafts = exports.publishTopicProduct = void 0;
4
4
  const contentful_1 = require("../../libs/contentful");
5
5
  const logs_1 = require("../../libs/logs");
6
6
  const products_1 = require("./products");
@@ -122,8 +122,8 @@ const publishTopicProduct = async (productEntry) => {
122
122
  await productEntry.publish();
123
123
  };
124
124
  exports.publishTopicProduct = publishTopicProduct;
125
- const publishAllDraftProducts = async (filters, limit = 100) => {
126
- let logMsg = `publishAllDraftProducts catalog: ${filters?.catalog} family: ${filters?.family} limit: ${limit}`;
125
+ const publishAllProductDrafts = async (filters, limit = 100) => {
126
+ let logMsg = `publishAllProductDrafts catalog: ${filters?.catalog} family: ${filters?.family} limit: ${limit}`;
127
127
  logs_1.log(logMsg);
128
128
  if (logs_1.serverUtils) {
129
129
  logs_1.serverUtils.log(logMsg);
@@ -187,5 +187,5 @@ const publishAllDraftProducts = async (filters, limit = 100) => {
187
187
  total,
188
188
  };
189
189
  };
190
- exports.publishAllDraftProducts = publishAllDraftProducts;
190
+ exports.publishAllProductDrafts = publishAllProductDrafts;
191
191
  //# sourceMappingURL=bulkPublish.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pim-import",
3
- "version": "4.3.1",
3
+ "version": "4.3.2",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "types/index.d.ts",
package/src/index.ts CHANGED
@@ -44,7 +44,7 @@ export {
44
44
  removeAllProductModelProductRelations,
45
45
  getProductPageIdByCode,
46
46
  } from "./pim/methods/products";
47
- export { publishAllDraftProducts } from "./pim/methods/bulkPublish";
47
+ export { publishAllProductDrafts } from "./pim/methods/bulkPublish";
48
48
  // export {
49
49
  // createOrUpdateCatalogPages,
50
50
  // createOrUpdateCatalogPageByCode,
@@ -194,11 +194,11 @@ export const publishTopicProduct = async (productEntry: Entry) => {
194
194
  await productEntry.publish();
195
195
  };
196
196
 
197
- export const publishAllDraftProducts = async (
197
+ export const publishAllProductDrafts = async (
198
198
  filters: { catalog?: AvailableCatalogs; family?: string },
199
199
  limit: number = 100
200
200
  ) => {
201
- let logMsg = `publishAllDraftProducts catalog: ${filters?.catalog} family: ${filters?.family} limit: ${limit}`;
201
+ let logMsg = `publishAllProductDrafts catalog: ${filters?.catalog} family: ${filters?.family} limit: ${limit}`;
202
202
  log(logMsg);
203
203
  if (serverUtils) {
204
204
  serverUtils.log(logMsg);
package/types/index.d.ts CHANGED
@@ -9,7 +9,7 @@ export { importSubModels } from "./pim/methods/submodels";
9
9
  export { importSubFamilies } from "./pim/methods/subfamilies";
10
10
  export { importFamilies } from "./pim/methods/families";
11
11
  export { importProductByCode, setProductsRelationships, setProductRelationships, getAllProductEntriesByCatalog, audit, generateTechSpecPdf, setProductsAutodescription, getProductAutodescription, setProductAutodescriptionByTopicId, removeProductFromColorVariantsByProductLine, removeAllProductModelProductRelations, getProductPageIdByCode, } from "./pim/methods/products";
12
- export { publishAllDraftProducts } from "./pim/methods/bulkPublish";
12
+ export { publishAllProductDrafts } from "./pim/methods/bulkPublish";
13
13
  export { resetIndexSettings } from "./algolia/config";
14
14
  export { reindexFamilies, reindexFamily, removeFamilyObject, } from "./algolia/families";
15
15
  export { reindexSubFamilies, reindexSubFamily, removeSubFamilyObject, } from "./algolia/subFamilies";
@@ -1,7 +1,7 @@
1
1
  import { AvailableCatalogs } from "../../types";
2
2
  import type { Entry } from "contentful-management/dist/typings/entities/entry";
3
3
  export declare const publishTopicProduct: (productEntry: Entry) => Promise<void>;
4
- export declare const publishAllDraftProducts: (filters: {
4
+ export declare const publishAllProductDrafts: (filters: {
5
5
  catalog?: AvailableCatalogs;
6
6
  family?: string;
7
7
  }, limit?: number) => Promise<{