pim-import 2.58.2 → 2.60.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 (43) hide show
  1. package/dist/algolia/config.js +36 -0
  2. package/dist/algolia/config.js.map +1 -1
  3. package/dist/algolia/downloads.js +9 -5
  4. package/dist/algolia/downloads.js.map +1 -1
  5. package/dist/algolia/families.js +8 -3
  6. package/dist/algolia/families.js.map +1 -1
  7. package/dist/algolia/models.js +8 -6
  8. package/dist/algolia/models.js.map +1 -1
  9. package/dist/algolia/pipedreamReindex.js +0 -1
  10. package/dist/algolia/pipedreamReindex.js.map +1 -1
  11. package/dist/algolia/pressRelease.js +140 -0
  12. package/dist/algolia/pressRelease.js.map +1 -0
  13. package/dist/algolia/pressReview.js +142 -0
  14. package/dist/algolia/pressReview.js.map +1 -0
  15. package/dist/algolia/products.js +8 -3
  16. package/dist/algolia/products.js.map +1 -1
  17. package/dist/algolia/projects.js +6 -4
  18. package/dist/algolia/projects.js.map +1 -1
  19. package/dist/algolia/stories.js +6 -4
  20. package/dist/algolia/stories.js.map +1 -1
  21. package/dist/algolia/subFamilies.js +8 -4
  22. package/dist/algolia/subFamilies.js.map +1 -1
  23. package/dist/algolia/subModels.js +3 -3
  24. package/dist/algolia/subModels.js.map +1 -1
  25. package/dist/index.js +9 -1
  26. package/dist/index.js.map +1 -1
  27. package/dist/pim/methods/products.js +10 -8
  28. package/dist/pim/methods/products.js.map +1 -1
  29. package/package.json +1 -1
  30. package/src/algolia/config.ts +39 -1
  31. package/src/algolia/downloads.ts +12 -4
  32. package/src/algolia/families.ts +14 -3
  33. package/src/algolia/models.ts +12 -7
  34. package/src/algolia/pipedreamReindex.ts +0 -1
  35. package/src/algolia/pressRelease.ts +241 -0
  36. package/src/algolia/pressReview.ts +234 -0
  37. package/src/algolia/products.ts +14 -3
  38. package/src/algolia/projects.ts +10 -4
  39. package/src/algolia/stories.ts +10 -4
  40. package/src/algolia/subFamilies.ts +14 -4
  41. package/src/algolia/subModels.ts +4 -4
  42. package/src/index.ts +10 -0
  43. package/src/pim/methods/products.ts +10 -8
@@ -1494,6 +1494,8 @@ export const audit = async (
1494
1494
  limit: number = 150,
1495
1495
  s3FilePath: string = ""
1496
1496
  ) => {
1497
+ offset = Number(offset);
1498
+ limit = Number(limit);
1497
1499
  const timeStart = new Date();
1498
1500
  log(`audit - lastModified: ${lastModified} catalog: ${catalog}`, "INFO");
1499
1501
 
@@ -1503,8 +1505,8 @@ export const audit = async (
1503
1505
  if (!allAudit) {
1504
1506
  log(`No audits were found to process for the date ${lastModified}`);
1505
1507
  return {
1506
- offset: Number(offset),
1507
- limit: Number(limit),
1508
+ offset,
1509
+ limit,
1508
1510
  completed: true,
1509
1511
  s3FilePath: "",
1510
1512
  total: 0,
@@ -1555,7 +1557,7 @@ export const audit = async (
1555
1557
  log(
1556
1558
  `No products found between offset: ${offset} and limit: ${limit}. Total: ${total}`
1557
1559
  );
1558
- const nextOffset = Number(offset) + Number(limit);
1560
+ const nextOffset = offset + limit;
1559
1561
  const completed = limit === -1 || nextOffset >= total;
1560
1562
  if (completed) {
1561
1563
  log(`Audit completed`);
@@ -1567,7 +1569,7 @@ export const audit = async (
1567
1569
 
1568
1570
  return {
1569
1571
  offset: nextOffset,
1570
- limit: Number(limit),
1572
+ limit: limit,
1571
1573
  completed,
1572
1574
  s3FilePath,
1573
1575
  total,
@@ -1680,7 +1682,7 @@ export const audit = async (
1680
1682
  }
1681
1683
  }
1682
1684
 
1683
- const nextOffset = Number(offset) + Number(limit);
1685
+ const nextOffset = offset + limit;
1684
1686
 
1685
1687
  const tEnd = new Date();
1686
1688
  const secs = secondBetweenTwoDate(timeStart, tEnd);
@@ -1688,7 +1690,7 @@ export const audit = async (
1688
1690
 
1689
1691
  return {
1690
1692
  offset: nextOffset,
1691
- limit: Number(limit),
1693
+ limit,
1692
1694
  completed: limit === -1 || count >= total,
1693
1695
  s3FilePath,
1694
1696
  total,
@@ -1701,8 +1703,8 @@ export const audit = async (
1701
1703
  log(`Request time: ${secs} seconds`);
1702
1704
 
1703
1705
  return {
1704
- offset: Number(offset),
1705
- limit: Number(limit),
1706
+ offset: offset,
1707
+ limit: limit,
1706
1708
  completed: true,
1707
1709
  s3FilePath,
1708
1710
  };