@commercetools-frontend-extensions/operations 3.6.0 → 3.6.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @commercetools-frontend-extensions/operations
2
2
 
3
+ ## 3.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1743](https://github.com/commercetools/merchant-center-operations/pull/1743) [`03afc08`](https://github.com/commercetools/merchant-center-operations/commit/03afc087f9f043ff58352aeb443082084068a2cc) Thanks [@renovate](https://github.com/apps/renovate)! - Update dependencies
8
+
9
+ ## 3.6.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#1739](https://github.com/commercetools/merchant-center-operations/pull/1739) [`6bf3e25`](https://github.com/commercetools/merchant-center-operations/commit/6bf3e259e9f9b982039d972c728b579fe4df9bec) Thanks [@valoriecarli](https://github.com/valoriecarli)! - Upgrade merchant-center-application-kit packages from v25 to v27, migrate ESLint config from legacy .eslintrc.js to ESLint 9 flat config (eslint.config.js). Replaced abandoned eslint-plugin-graphql with @graphql-eslint/eslint-plugin in the playground to restore .ctp.graphql linting under ESLint 9.
14
+
3
15
  ## 3.6.0
4
16
 
5
17
  ### Minor Changes
@@ -510,6 +510,7 @@ let ImportStates = /*#__PURE__*/function (ImportStates) {
510
510
  ImportStates["Processing"] = "processing";
511
511
  ImportStates["WaitForUnresolvedReferences"] = "wait-for-unresolved-references";
512
512
  ImportStates["PartiallyCompleted"] = "partially-completed";
513
+ ImportStates["PartiallyImported"] = "partially-imported";
513
514
  ImportStates["Failed"] = "failed";
514
515
  ImportStates["SuccessfullyCompleted"] = "successfully-completed";
515
516
  ImportStates["NoRunningImports"] = "no-running-imports";
@@ -1263,10 +1264,12 @@ function ownKeys$6(e, r) { var t = _Object$keys__default["default"](e); if (_Obj
1263
1264
  function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$6(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$6(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1264
1265
  function getImportState(importSummary) {
1265
1266
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1267
+ const partiallyImported = importSummary.states.partiallyImported ?? 0;
1266
1268
  const processing = importSummary.states.processing > 0;
1267
1269
  if (processing) return ImportStates.Processing;
1268
1270
  const waitForUnresolvedReferences = importSummary.states.waitForMasterVariant > 0 || importSummary.states.unresolved > 0;
1269
1271
  if (waitForUnresolvedReferences) return ImportStates.WaitForUnresolvedReferences;
1272
+ if (partiallyImported > 0) return ImportStates.PartiallyImported;
1270
1273
  const partiallyCompleted = importSummary.states.imported > 0 && importSummary.states.imported < importSummary.total || importSummary.states.deleted > 0 && importSummary.states.deleted < importSummary.total;
1271
1274
  if (partiallyCompleted) return ImportStates.PartiallyCompleted;
1272
1275
  const noRunning = importSummary.total === 0;
@@ -1549,6 +1552,7 @@ const FILE_IMPORT_JOB_POLLING_INTERVAL = 2000;
1549
1552
 
1550
1553
  const IMPORT_MAX_FILE_SIZE_MB = 100;
1551
1554
  const IMPORT_MAX_ITEM_COUNT = 500_000;
1555
+ const IMPORT_CONTAINER_WARNING_THRESHOLD = 1_000;
1552
1556
 
1553
1557
  // =============================================================================
1554
1558
  // Legacy constants (old flow) - Remove after testing and migration is complete
@@ -1573,6 +1577,11 @@ const TAG_KEY_SOURCE_FILE_UPLOAD = `${IMPORT_TAG_KEYS.source}:${IMPORT_TAG_VALUE
1573
1577
  */
1574
1578
  const CT_API_DOCS_URL = 'https://docs.commercetools.com/api/';
1575
1579
 
1580
+ /**
1581
+ * Import container best practices - automatic deletion via retention policy
1582
+ */
1583
+ const IMPORT_CONTAINER_BEST_PRACTICES_URL = 'https://docs.commercetools.com/api/import-export/best-practices#automatically-delete-import-containers';
1584
+
1576
1585
  /**
1577
1586
  * Template download links for each resource type
1578
1587
  */
@@ -1692,7 +1701,8 @@ const importStatesMap = {
1692
1701
  waitForMasterVariant: 0,
1693
1702
  processing: 10,
1694
1703
  canceled: 0,
1695
- deleted: 0
1704
+ deleted: 0,
1705
+ partiallyImported: 0
1696
1706
  },
1697
1707
  total: 10
1698
1708
  }],
@@ -1705,7 +1715,8 @@ const importStatesMap = {
1705
1715
  waitForMasterVariant: 10,
1706
1716
  processing: 0,
1707
1717
  canceled: 0,
1708
- deleted: 0
1718
+ deleted: 0,
1719
+ partiallyImported: 0
1709
1720
  },
1710
1721
  total: 10
1711
1722
  }, {
@@ -1717,7 +1728,8 @@ const importStatesMap = {
1717
1728
  waitForMasterVariant: 0,
1718
1729
  processing: 0,
1719
1730
  canceled: 0,
1720
- deleted: 0
1731
+ deleted: 0,
1732
+ partiallyImported: 0
1721
1733
  },
1722
1734
  total: 10
1723
1735
  }, {
@@ -1729,7 +1741,8 @@ const importStatesMap = {
1729
1741
  waitForMasterVariant: 0,
1730
1742
  processing: 0,
1731
1743
  canceled: 0,
1732
- deleted: 0
1744
+ deleted: 0,
1745
+ partiallyImported: 0
1733
1746
  },
1734
1747
  total: 40
1735
1748
  }],
@@ -1742,7 +1755,8 @@ const importStatesMap = {
1742
1755
  waitForMasterVariant: 0,
1743
1756
  processing: 0,
1744
1757
  canceled: 0,
1745
- deleted: 0
1758
+ deleted: 0,
1759
+ partiallyImported: 0
1746
1760
  },
1747
1761
  total: 8
1748
1762
  }, {
@@ -1754,7 +1768,8 @@ const importStatesMap = {
1754
1768
  waitForMasterVariant: 0,
1755
1769
  processing: 0,
1756
1770
  canceled: 0,
1757
- deleted: 0
1771
+ deleted: 0,
1772
+ partiallyImported: 0
1758
1773
  },
1759
1774
  total: 10
1760
1775
  }, {
@@ -1766,7 +1781,8 @@ const importStatesMap = {
1766
1781
  waitForMasterVariant: 0,
1767
1782
  processing: 0,
1768
1783
  canceled: 0,
1769
- deleted: 0
1784
+ deleted: 0,
1785
+ partiallyImported: 0
1770
1786
  },
1771
1787
  total: 10
1772
1788
  }],
@@ -1779,7 +1795,8 @@ const importStatesMap = {
1779
1795
  waitForMasterVariant: 0,
1780
1796
  processing: 0,
1781
1797
  canceled: 0,
1782
- deleted: 0
1798
+ deleted: 0,
1799
+ partiallyImported: 0
1783
1800
  },
1784
1801
  total: 3
1785
1802
  }, {
@@ -1791,7 +1808,8 @@ const importStatesMap = {
1791
1808
  waitForMasterVariant: 0,
1792
1809
  processing: 0,
1793
1810
  canceled: 0,
1794
- deleted: 0
1811
+ deleted: 0,
1812
+ partiallyImported: 0
1795
1813
  },
1796
1814
  total: 30
1797
1815
  }],
@@ -1804,7 +1822,8 @@ const importStatesMap = {
1804
1822
  waitForMasterVariant: 0,
1805
1823
  processing: 0,
1806
1824
  canceled: 0,
1807
- deleted: 0
1825
+ deleted: 0,
1826
+ partiallyImported: 0
1808
1827
  },
1809
1828
  total: 20
1810
1829
  }, {
@@ -1816,7 +1835,8 @@ const importStatesMap = {
1816
1835
  waitForMasterVariant: 0,
1817
1836
  processing: 0,
1818
1837
  canceled: 0,
1819
- deleted: 0
1838
+ deleted: 0,
1839
+ partiallyImported: 0
1820
1840
  },
1821
1841
  total: 10
1822
1842
  }],
@@ -1829,7 +1849,8 @@ const importStatesMap = {
1829
1849
  waitForMasterVariant: 0,
1830
1850
  processing: 0,
1831
1851
  canceled: 0,
1832
- deleted: 0
1852
+ deleted: 0,
1853
+ partiallyImported: 0
1833
1854
  },
1834
1855
  total: 0
1835
1856
  }],
@@ -1842,9 +1863,37 @@ const importStatesMap = {
1842
1863
  waitForMasterVariant: 0,
1843
1864
  processing: 0,
1844
1865
  canceled: 10,
1845
- deleted: 0
1866
+ deleted: 0,
1867
+ partiallyImported: 0
1846
1868
  },
1847
1869
  total: 10
1870
+ }],
1871
+ [ImportStates.PartiallyImported]: [{
1872
+ states: {
1873
+ unresolved: 0,
1874
+ imported: 0,
1875
+ rejected: 0,
1876
+ validationFailed: 0,
1877
+ waitForMasterVariant: 0,
1878
+ processing: 0,
1879
+ canceled: 0,
1880
+ deleted: 0,
1881
+ partiallyImported: 2
1882
+ },
1883
+ total: 2
1884
+ }, {
1885
+ states: {
1886
+ unresolved: 0,
1887
+ imported: 1,
1888
+ rejected: 0,
1889
+ validationFailed: 0,
1890
+ waitForMasterVariant: 0,
1891
+ processing: 0,
1892
+ canceled: 0,
1893
+ deleted: 0,
1894
+ partiallyImported: 1
1895
+ },
1896
+ total: 2
1848
1897
  }]
1849
1898
  };
1850
1899
  const validFileUploadResponse = {
@@ -3370,6 +3419,8 @@ exports.FileDropArea = FileDropArea;
3370
3419
  exports.FileDroppedArea = FileDroppedArea;
3371
3420
  exports.FileIcon = FileIcon;
3372
3421
  exports.HttpError = HttpError;
3422
+ exports.IMPORT_CONTAINER_BEST_PRACTICES_URL = IMPORT_CONTAINER_BEST_PRACTICES_URL;
3423
+ exports.IMPORT_CONTAINER_WARNING_THRESHOLD = IMPORT_CONTAINER_WARNING_THRESHOLD;
3373
3424
  exports.IMPORT_LEGACY_MAX_FILE_SIZE_MB = IMPORT_LEGACY_MAX_FILE_SIZE_MB;
3374
3425
  exports.IMPORT_LEGACY_MAX_ROW_COUNT = IMPORT_LEGACY_MAX_ROW_COUNT;
3375
3426
  exports.IMPORT_MAX_FILE_SIZE_MB = IMPORT_MAX_FILE_SIZE_MB;
@@ -510,6 +510,7 @@ let ImportStates = /*#__PURE__*/function (ImportStates) {
510
510
  ImportStates["Processing"] = "processing";
511
511
  ImportStates["WaitForUnresolvedReferences"] = "wait-for-unresolved-references";
512
512
  ImportStates["PartiallyCompleted"] = "partially-completed";
513
+ ImportStates["PartiallyImported"] = "partially-imported";
513
514
  ImportStates["Failed"] = "failed";
514
515
  ImportStates["SuccessfullyCompleted"] = "successfully-completed";
515
516
  ImportStates["NoRunningImports"] = "no-running-imports";
@@ -1263,10 +1264,12 @@ function ownKeys$6(e, r) { var t = _Object$keys__default["default"](e); if (_Obj
1263
1264
  function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$6(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$6(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1264
1265
  function getImportState(importSummary) {
1265
1266
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1267
+ const partiallyImported = importSummary.states.partiallyImported ?? 0;
1266
1268
  const processing = importSummary.states.processing > 0;
1267
1269
  if (processing) return ImportStates.Processing;
1268
1270
  const waitForUnresolvedReferences = importSummary.states.waitForMasterVariant > 0 || importSummary.states.unresolved > 0;
1269
1271
  if (waitForUnresolvedReferences) return ImportStates.WaitForUnresolvedReferences;
1272
+ if (partiallyImported > 0) return ImportStates.PartiallyImported;
1270
1273
  const partiallyCompleted = importSummary.states.imported > 0 && importSummary.states.imported < importSummary.total || importSummary.states.deleted > 0 && importSummary.states.deleted < importSummary.total;
1271
1274
  if (partiallyCompleted) return ImportStates.PartiallyCompleted;
1272
1275
  const noRunning = importSummary.total === 0;
@@ -1549,6 +1552,7 @@ const FILE_IMPORT_JOB_POLLING_INTERVAL = 2000;
1549
1552
 
1550
1553
  const IMPORT_MAX_FILE_SIZE_MB = 100;
1551
1554
  const IMPORT_MAX_ITEM_COUNT = 500_000;
1555
+ const IMPORT_CONTAINER_WARNING_THRESHOLD = 1_000;
1552
1556
 
1553
1557
  // =============================================================================
1554
1558
  // Legacy constants (old flow) - Remove after testing and migration is complete
@@ -1573,6 +1577,11 @@ const TAG_KEY_SOURCE_FILE_UPLOAD = `${IMPORT_TAG_KEYS.source}:${IMPORT_TAG_VALUE
1573
1577
  */
1574
1578
  const CT_API_DOCS_URL = 'https://docs.commercetools.com/api/';
1575
1579
 
1580
+ /**
1581
+ * Import container best practices - automatic deletion via retention policy
1582
+ */
1583
+ const IMPORT_CONTAINER_BEST_PRACTICES_URL = 'https://docs.commercetools.com/api/import-export/best-practices#automatically-delete-import-containers';
1584
+
1576
1585
  /**
1577
1586
  * Template download links for each resource type
1578
1587
  */
@@ -1692,7 +1701,8 @@ const importStatesMap = {
1692
1701
  waitForMasterVariant: 0,
1693
1702
  processing: 10,
1694
1703
  canceled: 0,
1695
- deleted: 0
1704
+ deleted: 0,
1705
+ partiallyImported: 0
1696
1706
  },
1697
1707
  total: 10
1698
1708
  }],
@@ -1705,7 +1715,8 @@ const importStatesMap = {
1705
1715
  waitForMasterVariant: 10,
1706
1716
  processing: 0,
1707
1717
  canceled: 0,
1708
- deleted: 0
1718
+ deleted: 0,
1719
+ partiallyImported: 0
1709
1720
  },
1710
1721
  total: 10
1711
1722
  }, {
@@ -1717,7 +1728,8 @@ const importStatesMap = {
1717
1728
  waitForMasterVariant: 0,
1718
1729
  processing: 0,
1719
1730
  canceled: 0,
1720
- deleted: 0
1731
+ deleted: 0,
1732
+ partiallyImported: 0
1721
1733
  },
1722
1734
  total: 10
1723
1735
  }, {
@@ -1729,7 +1741,8 @@ const importStatesMap = {
1729
1741
  waitForMasterVariant: 0,
1730
1742
  processing: 0,
1731
1743
  canceled: 0,
1732
- deleted: 0
1744
+ deleted: 0,
1745
+ partiallyImported: 0
1733
1746
  },
1734
1747
  total: 40
1735
1748
  }],
@@ -1742,7 +1755,8 @@ const importStatesMap = {
1742
1755
  waitForMasterVariant: 0,
1743
1756
  processing: 0,
1744
1757
  canceled: 0,
1745
- deleted: 0
1758
+ deleted: 0,
1759
+ partiallyImported: 0
1746
1760
  },
1747
1761
  total: 8
1748
1762
  }, {
@@ -1754,7 +1768,8 @@ const importStatesMap = {
1754
1768
  waitForMasterVariant: 0,
1755
1769
  processing: 0,
1756
1770
  canceled: 0,
1757
- deleted: 0
1771
+ deleted: 0,
1772
+ partiallyImported: 0
1758
1773
  },
1759
1774
  total: 10
1760
1775
  }, {
@@ -1766,7 +1781,8 @@ const importStatesMap = {
1766
1781
  waitForMasterVariant: 0,
1767
1782
  processing: 0,
1768
1783
  canceled: 0,
1769
- deleted: 0
1784
+ deleted: 0,
1785
+ partiallyImported: 0
1770
1786
  },
1771
1787
  total: 10
1772
1788
  }],
@@ -1779,7 +1795,8 @@ const importStatesMap = {
1779
1795
  waitForMasterVariant: 0,
1780
1796
  processing: 0,
1781
1797
  canceled: 0,
1782
- deleted: 0
1798
+ deleted: 0,
1799
+ partiallyImported: 0
1783
1800
  },
1784
1801
  total: 3
1785
1802
  }, {
@@ -1791,7 +1808,8 @@ const importStatesMap = {
1791
1808
  waitForMasterVariant: 0,
1792
1809
  processing: 0,
1793
1810
  canceled: 0,
1794
- deleted: 0
1811
+ deleted: 0,
1812
+ partiallyImported: 0
1795
1813
  },
1796
1814
  total: 30
1797
1815
  }],
@@ -1804,7 +1822,8 @@ const importStatesMap = {
1804
1822
  waitForMasterVariant: 0,
1805
1823
  processing: 0,
1806
1824
  canceled: 0,
1807
- deleted: 0
1825
+ deleted: 0,
1826
+ partiallyImported: 0
1808
1827
  },
1809
1828
  total: 20
1810
1829
  }, {
@@ -1816,7 +1835,8 @@ const importStatesMap = {
1816
1835
  waitForMasterVariant: 0,
1817
1836
  processing: 0,
1818
1837
  canceled: 0,
1819
- deleted: 0
1838
+ deleted: 0,
1839
+ partiallyImported: 0
1820
1840
  },
1821
1841
  total: 10
1822
1842
  }],
@@ -1829,7 +1849,8 @@ const importStatesMap = {
1829
1849
  waitForMasterVariant: 0,
1830
1850
  processing: 0,
1831
1851
  canceled: 0,
1832
- deleted: 0
1852
+ deleted: 0,
1853
+ partiallyImported: 0
1833
1854
  },
1834
1855
  total: 0
1835
1856
  }],
@@ -1842,9 +1863,37 @@ const importStatesMap = {
1842
1863
  waitForMasterVariant: 0,
1843
1864
  processing: 0,
1844
1865
  canceled: 10,
1845
- deleted: 0
1866
+ deleted: 0,
1867
+ partiallyImported: 0
1846
1868
  },
1847
1869
  total: 10
1870
+ }],
1871
+ [ImportStates.PartiallyImported]: [{
1872
+ states: {
1873
+ unresolved: 0,
1874
+ imported: 0,
1875
+ rejected: 0,
1876
+ validationFailed: 0,
1877
+ waitForMasterVariant: 0,
1878
+ processing: 0,
1879
+ canceled: 0,
1880
+ deleted: 0,
1881
+ partiallyImported: 2
1882
+ },
1883
+ total: 2
1884
+ }, {
1885
+ states: {
1886
+ unresolved: 0,
1887
+ imported: 1,
1888
+ rejected: 0,
1889
+ validationFailed: 0,
1890
+ waitForMasterVariant: 0,
1891
+ processing: 0,
1892
+ canceled: 0,
1893
+ deleted: 0,
1894
+ partiallyImported: 1
1895
+ },
1896
+ total: 2
1848
1897
  }]
1849
1898
  };
1850
1899
  const validFileUploadResponse = {
@@ -3362,6 +3411,8 @@ exports.FileDropArea = FileDropArea;
3362
3411
  exports.FileDroppedArea = FileDroppedArea;
3363
3412
  exports.FileIcon = FileIcon;
3364
3413
  exports.HttpError = HttpError;
3414
+ exports.IMPORT_CONTAINER_BEST_PRACTICES_URL = IMPORT_CONTAINER_BEST_PRACTICES_URL;
3415
+ exports.IMPORT_CONTAINER_WARNING_THRESHOLD = IMPORT_CONTAINER_WARNING_THRESHOLD;
3365
3416
  exports.IMPORT_LEGACY_MAX_FILE_SIZE_MB = IMPORT_LEGACY_MAX_FILE_SIZE_MB;
3366
3417
  exports.IMPORT_LEGACY_MAX_ROW_COUNT = IMPORT_LEGACY_MAX_ROW_COUNT;
3367
3418
  exports.IMPORT_MAX_FILE_SIZE_MB = IMPORT_MAX_FILE_SIZE_MB;
@@ -472,6 +472,7 @@ let ImportStates = /*#__PURE__*/function (ImportStates) {
472
472
  ImportStates["Processing"] = "processing";
473
473
  ImportStates["WaitForUnresolvedReferences"] = "wait-for-unresolved-references";
474
474
  ImportStates["PartiallyCompleted"] = "partially-completed";
475
+ ImportStates["PartiallyImported"] = "partially-imported";
475
476
  ImportStates["Failed"] = "failed";
476
477
  ImportStates["SuccessfullyCompleted"] = "successfully-completed";
477
478
  ImportStates["NoRunningImports"] = "no-running-imports";
@@ -1225,10 +1226,12 @@ function ownKeys$6(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySy
1225
1226
  function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$6(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$6(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
1226
1227
  function getImportState(importSummary) {
1227
1228
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1229
+ const partiallyImported = importSummary.states.partiallyImported ?? 0;
1228
1230
  const processing = importSummary.states.processing > 0;
1229
1231
  if (processing) return ImportStates.Processing;
1230
1232
  const waitForUnresolvedReferences = importSummary.states.waitForMasterVariant > 0 || importSummary.states.unresolved > 0;
1231
1233
  if (waitForUnresolvedReferences) return ImportStates.WaitForUnresolvedReferences;
1234
+ if (partiallyImported > 0) return ImportStates.PartiallyImported;
1232
1235
  const partiallyCompleted = importSummary.states.imported > 0 && importSummary.states.imported < importSummary.total || importSummary.states.deleted > 0 && importSummary.states.deleted < importSummary.total;
1233
1236
  if (partiallyCompleted) return ImportStates.PartiallyCompleted;
1234
1237
  const noRunning = importSummary.total === 0;
@@ -1511,6 +1514,7 @@ const FILE_IMPORT_JOB_POLLING_INTERVAL = 2000;
1511
1514
 
1512
1515
  const IMPORT_MAX_FILE_SIZE_MB = 100;
1513
1516
  const IMPORT_MAX_ITEM_COUNT = 500_000;
1517
+ const IMPORT_CONTAINER_WARNING_THRESHOLD = 1_000;
1514
1518
 
1515
1519
  // =============================================================================
1516
1520
  // Legacy constants (old flow) - Remove after testing and migration is complete
@@ -1535,6 +1539,11 @@ const TAG_KEY_SOURCE_FILE_UPLOAD = `${IMPORT_TAG_KEYS.source}:${IMPORT_TAG_VALUE
1535
1539
  */
1536
1540
  const CT_API_DOCS_URL = 'https://docs.commercetools.com/api/';
1537
1541
 
1542
+ /**
1543
+ * Import container best practices - automatic deletion via retention policy
1544
+ */
1545
+ const IMPORT_CONTAINER_BEST_PRACTICES_URL = 'https://docs.commercetools.com/api/import-export/best-practices#automatically-delete-import-containers';
1546
+
1538
1547
  /**
1539
1548
  * Template download links for each resource type
1540
1549
  */
@@ -1654,7 +1663,8 @@ const importStatesMap = {
1654
1663
  waitForMasterVariant: 0,
1655
1664
  processing: 10,
1656
1665
  canceled: 0,
1657
- deleted: 0
1666
+ deleted: 0,
1667
+ partiallyImported: 0
1658
1668
  },
1659
1669
  total: 10
1660
1670
  }],
@@ -1667,7 +1677,8 @@ const importStatesMap = {
1667
1677
  waitForMasterVariant: 10,
1668
1678
  processing: 0,
1669
1679
  canceled: 0,
1670
- deleted: 0
1680
+ deleted: 0,
1681
+ partiallyImported: 0
1671
1682
  },
1672
1683
  total: 10
1673
1684
  }, {
@@ -1679,7 +1690,8 @@ const importStatesMap = {
1679
1690
  waitForMasterVariant: 0,
1680
1691
  processing: 0,
1681
1692
  canceled: 0,
1682
- deleted: 0
1693
+ deleted: 0,
1694
+ partiallyImported: 0
1683
1695
  },
1684
1696
  total: 10
1685
1697
  }, {
@@ -1691,7 +1703,8 @@ const importStatesMap = {
1691
1703
  waitForMasterVariant: 0,
1692
1704
  processing: 0,
1693
1705
  canceled: 0,
1694
- deleted: 0
1706
+ deleted: 0,
1707
+ partiallyImported: 0
1695
1708
  },
1696
1709
  total: 40
1697
1710
  }],
@@ -1704,7 +1717,8 @@ const importStatesMap = {
1704
1717
  waitForMasterVariant: 0,
1705
1718
  processing: 0,
1706
1719
  canceled: 0,
1707
- deleted: 0
1720
+ deleted: 0,
1721
+ partiallyImported: 0
1708
1722
  },
1709
1723
  total: 8
1710
1724
  }, {
@@ -1716,7 +1730,8 @@ const importStatesMap = {
1716
1730
  waitForMasterVariant: 0,
1717
1731
  processing: 0,
1718
1732
  canceled: 0,
1719
- deleted: 0
1733
+ deleted: 0,
1734
+ partiallyImported: 0
1720
1735
  },
1721
1736
  total: 10
1722
1737
  }, {
@@ -1728,7 +1743,8 @@ const importStatesMap = {
1728
1743
  waitForMasterVariant: 0,
1729
1744
  processing: 0,
1730
1745
  canceled: 0,
1731
- deleted: 0
1746
+ deleted: 0,
1747
+ partiallyImported: 0
1732
1748
  },
1733
1749
  total: 10
1734
1750
  }],
@@ -1741,7 +1757,8 @@ const importStatesMap = {
1741
1757
  waitForMasterVariant: 0,
1742
1758
  processing: 0,
1743
1759
  canceled: 0,
1744
- deleted: 0
1760
+ deleted: 0,
1761
+ partiallyImported: 0
1745
1762
  },
1746
1763
  total: 3
1747
1764
  }, {
@@ -1753,7 +1770,8 @@ const importStatesMap = {
1753
1770
  waitForMasterVariant: 0,
1754
1771
  processing: 0,
1755
1772
  canceled: 0,
1756
- deleted: 0
1773
+ deleted: 0,
1774
+ partiallyImported: 0
1757
1775
  },
1758
1776
  total: 30
1759
1777
  }],
@@ -1766,7 +1784,8 @@ const importStatesMap = {
1766
1784
  waitForMasterVariant: 0,
1767
1785
  processing: 0,
1768
1786
  canceled: 0,
1769
- deleted: 0
1787
+ deleted: 0,
1788
+ partiallyImported: 0
1770
1789
  },
1771
1790
  total: 20
1772
1791
  }, {
@@ -1778,7 +1797,8 @@ const importStatesMap = {
1778
1797
  waitForMasterVariant: 0,
1779
1798
  processing: 0,
1780
1799
  canceled: 0,
1781
- deleted: 0
1800
+ deleted: 0,
1801
+ partiallyImported: 0
1782
1802
  },
1783
1803
  total: 10
1784
1804
  }],
@@ -1791,7 +1811,8 @@ const importStatesMap = {
1791
1811
  waitForMasterVariant: 0,
1792
1812
  processing: 0,
1793
1813
  canceled: 0,
1794
- deleted: 0
1814
+ deleted: 0,
1815
+ partiallyImported: 0
1795
1816
  },
1796
1817
  total: 0
1797
1818
  }],
@@ -1804,9 +1825,37 @@ const importStatesMap = {
1804
1825
  waitForMasterVariant: 0,
1805
1826
  processing: 0,
1806
1827
  canceled: 10,
1807
- deleted: 0
1828
+ deleted: 0,
1829
+ partiallyImported: 0
1808
1830
  },
1809
1831
  total: 10
1832
+ }],
1833
+ [ImportStates.PartiallyImported]: [{
1834
+ states: {
1835
+ unresolved: 0,
1836
+ imported: 0,
1837
+ rejected: 0,
1838
+ validationFailed: 0,
1839
+ waitForMasterVariant: 0,
1840
+ processing: 0,
1841
+ canceled: 0,
1842
+ deleted: 0,
1843
+ partiallyImported: 2
1844
+ },
1845
+ total: 2
1846
+ }, {
1847
+ states: {
1848
+ unresolved: 0,
1849
+ imported: 1,
1850
+ rejected: 0,
1851
+ validationFailed: 0,
1852
+ waitForMasterVariant: 0,
1853
+ processing: 0,
1854
+ canceled: 0,
1855
+ deleted: 0,
1856
+ partiallyImported: 1
1857
+ },
1858
+ total: 2
1810
1859
  }]
1811
1860
  };
1812
1861
  const validFileUploadResponse = {
@@ -3319,4 +3368,4 @@ const useFileUpload = _ref2 => {
3319
3368
  };
3320
3369
  };
3321
3370
 
3322
- export { ActiveDragDropArea, COLUMN_DELIMITERS, CT_API_DOCS_URL, DELIMITERS, DisabledDropArea, DropAreaWrapper, EnabledDropArea, ErrorCode, FILE_IMPORT_JOB_POLLING_INTERVAL, FileDropArea, FileDroppedArea, FileIcon, HttpError, IMPORT_LEGACY_MAX_FILE_SIZE_MB, IMPORT_LEGACY_MAX_ROW_COUNT, IMPORT_MAX_FILE_SIZE_MB, IMPORT_MAX_ITEM_COUNT, IMPORT_TAG_KEYS, IMPORT_TAG_VALUES, ImportStates, InfoBox, InvalidResponseError, LockIcon, NoResourcesToExportError, OperationsError, PollingAbortedError, PollingTimeoutError, ProjectKeyNotAvailableError, QueryPredicateError, RESOURCE_TYPE_DOCUMENTATION_LINKS, RESOURCE_TYPE_TEMPLATE_DOWNLOAD_LINKS, TAG_KEY_SOURCE_FILE_UPLOAD, UnexpectedColumnError, UnexpectedOperationStateError, UnexpectedResourceTypeError, UploadSeparator, UploadSettings, UploadingModal, allAutomatedImportOperations, allAutomatedImportOperationsResponse, allFileUploadImportOperations, allFileUploadImportOperationsResponse, appendCsvOrJsonExtensionIfAbsent, assertCancelContainerResponse, assertExportOperationsDownloadFileResponse, assertFileImportJob, assertFileImportJobRecordsResponse, assertFileUploadResponse, assertImportContainer, assertImportContainerPagedResponse, assertImportOperationPagedResponse, assertImportSummary, assertListFileImportJobsResponse, assertPaginatedExportOperationResponse, assertProcessFileImportJobResponse, assertProcessFileResponse, assertResourceType, automatedImportContainerKey, automatedImports, cancelImportContainerByKey, checkIfFileUploadImport, convertFileSizeToKB, countJsonFileItems, createFileImportJob, createImportContainerForFileUpload, decodeFileNameFromImportContainerKey, deleteFileImportJob, deleteImportContainer, dropAreaStyles, encodeFileNameWithTimestampToContainerKey, exportOperationsCompleted, exportOperationsProcessing, extractErrorDescriptionFromValidationMessage, fetchExportOperations, fetchImportContainerByKey, fetchImportContainerDetails, fetchImportContainers, fetchImportOperations, fetchImportSummaries, fetchImportSummary, fetchUsingXhr, fetcher, fileUploadImportContainerKey, fileUploadMissingKeysResponse, formatErrorCode, formatKeys, formatQueryString, getCreateImportContainerURL, getDeleteImportContainerURL, getExportOperationsURL, getFileImportJob, getFileImportJobByIdURL, getFileImportJobDeleteURL, getFileImportJobFileType, getFileImportJobInfoForContainer, getFileImportJobProcessURL, getFileImportJobRecords, getFileImportJobRecordsURL, getFileImportJobsListURL, getFileImportJobsURL, getFileUploadErrorsCount, getFileUploadURL, getImportContainerByKeyURL, getImportContainerTasksURL, getImportContainersURL, getImportOperationsURL, getImportState, getImportSummaryURL, getMissingRequiredFields, getProccessFileURL, getRowCount, getValidatedColumns, hasImportJobStartedProcessing, hasOwnProperty, hasRequiredFields, hasSingleKeyColumn, importContainers, importStatesMap, importsSummaries, invalidFileImportJobRecordsResponse, invalidFileImportJobValidated, invalidFileUploadResponse, isAbortError, isError, isHttpError, isImportJobInitializing, isImportJobProcessing, isImportJobQueued, isImportJobReady, isImportJobRejected, isImportJobTerminal, isImportJobValidated, isNetworkError, isOperationsError, isPollingAbortedError, isPollingTimeoutError, isResourceType, isRetryableError, listFileImportJobs, manualImports, mapFileUploadErrorsToUploadFileErrorRows, mapFormikErrors, mapUploadFileErrorsResponseToUploadFileErrorRows, pollJobUntilProcessing, pollJobUntilValidated, processFileImportJob, processFileImportJobResponse, processUploadedFile, shouldContinuePollingForImportValidation, successfulAutomatedImportOperations, successfulAutomatedImportOperationsResponse, successfulFileUploadImportOperations, successfulFileUploadImportOperationsResponse, toBytes, toImportApiResourceType, uploadFileForImport, useFetchExportOperations, useFetchFileImportJob, useFetchFileImportJobRecords, useFetchImportContainerDetails, useFetchImportOperations, useFetchImportSummaries, useFileImportJobUpload, useFileUpload, useImportContainerUpload, validFileImportJobProcessing, validFileImportJobQueued, validFileImportJobRecordsResponse, validFileImportJobValidated, validFileUploadResponse, validProcessFileResponse, validateDelimiter };
3371
+ export { ActiveDragDropArea, COLUMN_DELIMITERS, CT_API_DOCS_URL, DELIMITERS, DisabledDropArea, DropAreaWrapper, EnabledDropArea, ErrorCode, FILE_IMPORT_JOB_POLLING_INTERVAL, FileDropArea, FileDroppedArea, FileIcon, HttpError, IMPORT_CONTAINER_BEST_PRACTICES_URL, IMPORT_CONTAINER_WARNING_THRESHOLD, IMPORT_LEGACY_MAX_FILE_SIZE_MB, IMPORT_LEGACY_MAX_ROW_COUNT, IMPORT_MAX_FILE_SIZE_MB, IMPORT_MAX_ITEM_COUNT, IMPORT_TAG_KEYS, IMPORT_TAG_VALUES, ImportStates, InfoBox, InvalidResponseError, LockIcon, NoResourcesToExportError, OperationsError, PollingAbortedError, PollingTimeoutError, ProjectKeyNotAvailableError, QueryPredicateError, RESOURCE_TYPE_DOCUMENTATION_LINKS, RESOURCE_TYPE_TEMPLATE_DOWNLOAD_LINKS, TAG_KEY_SOURCE_FILE_UPLOAD, UnexpectedColumnError, UnexpectedOperationStateError, UnexpectedResourceTypeError, UploadSeparator, UploadSettings, UploadingModal, allAutomatedImportOperations, allAutomatedImportOperationsResponse, allFileUploadImportOperations, allFileUploadImportOperationsResponse, appendCsvOrJsonExtensionIfAbsent, assertCancelContainerResponse, assertExportOperationsDownloadFileResponse, assertFileImportJob, assertFileImportJobRecordsResponse, assertFileUploadResponse, assertImportContainer, assertImportContainerPagedResponse, assertImportOperationPagedResponse, assertImportSummary, assertListFileImportJobsResponse, assertPaginatedExportOperationResponse, assertProcessFileImportJobResponse, assertProcessFileResponse, assertResourceType, automatedImportContainerKey, automatedImports, cancelImportContainerByKey, checkIfFileUploadImport, convertFileSizeToKB, countJsonFileItems, createFileImportJob, createImportContainerForFileUpload, decodeFileNameFromImportContainerKey, deleteFileImportJob, deleteImportContainer, dropAreaStyles, encodeFileNameWithTimestampToContainerKey, exportOperationsCompleted, exportOperationsProcessing, extractErrorDescriptionFromValidationMessage, fetchExportOperations, fetchImportContainerByKey, fetchImportContainerDetails, fetchImportContainers, fetchImportOperations, fetchImportSummaries, fetchImportSummary, fetchUsingXhr, fetcher, fileUploadImportContainerKey, fileUploadMissingKeysResponse, formatErrorCode, formatKeys, formatQueryString, getCreateImportContainerURL, getDeleteImportContainerURL, getExportOperationsURL, getFileImportJob, getFileImportJobByIdURL, getFileImportJobDeleteURL, getFileImportJobFileType, getFileImportJobInfoForContainer, getFileImportJobProcessURL, getFileImportJobRecords, getFileImportJobRecordsURL, getFileImportJobsListURL, getFileImportJobsURL, getFileUploadErrorsCount, getFileUploadURL, getImportContainerByKeyURL, getImportContainerTasksURL, getImportContainersURL, getImportOperationsURL, getImportState, getImportSummaryURL, getMissingRequiredFields, getProccessFileURL, getRowCount, getValidatedColumns, hasImportJobStartedProcessing, hasOwnProperty, hasRequiredFields, hasSingleKeyColumn, importContainers, importStatesMap, importsSummaries, invalidFileImportJobRecordsResponse, invalidFileImportJobValidated, invalidFileUploadResponse, isAbortError, isError, isHttpError, isImportJobInitializing, isImportJobProcessing, isImportJobQueued, isImportJobReady, isImportJobRejected, isImportJobTerminal, isImportJobValidated, isNetworkError, isOperationsError, isPollingAbortedError, isPollingTimeoutError, isResourceType, isRetryableError, listFileImportJobs, manualImports, mapFileUploadErrorsToUploadFileErrorRows, mapFormikErrors, mapUploadFileErrorsResponseToUploadFileErrorRows, pollJobUntilProcessing, pollJobUntilValidated, processFileImportJob, processFileImportJobResponse, processUploadedFile, shouldContinuePollingForImportValidation, successfulAutomatedImportOperations, successfulAutomatedImportOperationsResponse, successfulFileUploadImportOperations, successfulFileUploadImportOperationsResponse, toBytes, toImportApiResourceType, uploadFileForImport, useFetchExportOperations, useFetchFileImportJob, useFetchFileImportJobRecords, useFetchImportContainerDetails, useFetchImportOperations, useFetchImportSummaries, useFileImportJobUpload, useFileUpload, useImportContainerUpload, validFileImportJobProcessing, validFileImportJobQueued, validFileImportJobRecordsResponse, validFileImportJobValidated, validFileUploadResponse, validProcessFileResponse, validateDelimiter };
@@ -1,5 +1,6 @@
1
1
  export declare const IMPORT_MAX_FILE_SIZE_MB = 100;
2
2
  export declare const IMPORT_MAX_ITEM_COUNT = 500000;
3
+ export declare const IMPORT_CONTAINER_WARNING_THRESHOLD = 1000;
3
4
  /** @deprecated Use IMPORT_MAX_FILE_SIZE_MB instead. Remove after migration. */
4
5
  export declare const IMPORT_LEGACY_MAX_FILE_SIZE_MB = 35;
5
6
  /** @deprecated Use IMPORT_MAX_ITEM_COUNT instead. Remove after migration. */
@@ -3,6 +3,10 @@ import type { ResourceTypeId } from '@commercetools/importapi-sdk';
3
3
  * CommerceTools API documentation base URL
4
4
  */
5
5
  export declare const CT_API_DOCS_URL = "https://docs.commercetools.com/api/";
6
+ /**
7
+ * Import container best practices - automatic deletion via retention policy
8
+ */
9
+ export declare const IMPORT_CONTAINER_BEST_PRACTICES_URL = "https://docs.commercetools.com/api/import-export/best-practices#automatically-delete-import-containers";
6
10
  /**
7
11
  * Template download links for each resource type
8
12
  */
@@ -2,6 +2,7 @@ export declare enum ImportStates {
2
2
  Processing = "processing",
3
3
  WaitForUnresolvedReferences = "wait-for-unresolved-references",
4
4
  PartiallyCompleted = "partially-completed",
5
+ PartiallyImported = "partially-imported",
5
6
  Failed = "failed",
6
7
  SuccessfullyCompleted = "successfully-completed",
7
8
  NoRunningImports = "no-running-imports",
@@ -8,6 +8,10 @@ interface ExtendedOperationStates extends OperationStates {
8
8
  * The number of resources in the `deleted` state.
9
9
  */
10
10
  readonly deleted: number;
11
+ /**
12
+ * The number of resources in the `partiallyImported` state.
13
+ */
14
+ readonly partiallyImported: number;
11
15
  }
12
16
  export interface ExtendedImportSummary extends ImportSummary {
13
17
  readonly states: ExtendedOperationStates;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend-extensions/operations",
3
- "version": "3.6.0",
3
+ "version": "3.6.2",
4
4
  "license": "Proprietary",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -18,14 +18,14 @@
18
18
  "react-dropzone": "14.3.8"
19
19
  },
20
20
  "devDependencies": {
21
- "@commercetools-frontend/actions-global": "25.1.0",
22
- "@commercetools-frontend/application-components": "25.1.0",
23
- "@commercetools-frontend/application-shell": "25.1.0",
24
- "@commercetools-frontend/application-shell-connectors": "25.1.0",
25
- "@commercetools-frontend/constants": "25.1.0",
26
- "@commercetools-frontend/jest-preset-mc-app": "25.1.0",
27
- "@commercetools-frontend/permissions": "25.1.0",
28
- "@commercetools-frontend/sentry": "25.1.0",
21
+ "@commercetools-frontend/actions-global": "27.2.0",
22
+ "@commercetools-frontend/application-components": "27.2.0",
23
+ "@commercetools-frontend/application-shell": "27.2.0",
24
+ "@commercetools-frontend/application-shell-connectors": "27.2.0",
25
+ "@commercetools-frontend/constants": "27.2.0",
26
+ "@commercetools-frontend/jest-preset-mc-app": "27.2.0",
27
+ "@commercetools-frontend/permissions": "27.2.0",
28
+ "@commercetools-frontend/sentry": "27.2.0",
29
29
  "@commercetools-frontend/ui-kit": "20.3.0",
30
30
  "@emotion/react": "11.14.0",
31
31
  "@emotion/styled": "11.14.1",
@@ -41,13 +41,13 @@
41
41
  "typescript": "5.4.5"
42
42
  },
43
43
  "peerDependencies": {
44
- "@commercetools-frontend/actions-global": "24.x || 25.x",
45
- "@commercetools-frontend/application-components": "24.x || 25.x",
46
- "@commercetools-frontend/application-shell": "24.x || 25.x",
47
- "@commercetools-frontend/application-shell-connectors": "24.x || 25.x",
48
- "@commercetools-frontend/constants": "24.x || 25.x",
49
- "@commercetools-frontend/permissions": "24.x || 25.x",
50
- "@commercetools-frontend/sentry": "24.x || 25.x",
44
+ "@commercetools-frontend/actions-global": "24.x || 25.x || 27.x",
45
+ "@commercetools-frontend/application-components": "24.x || 25.x || 27.x",
46
+ "@commercetools-frontend/application-shell": "24.x || 25.x || 27.x",
47
+ "@commercetools-frontend/application-shell-connectors": "24.x || 25.x || 27.x",
48
+ "@commercetools-frontend/constants": "24.x || 25.x || 27.x",
49
+ "@commercetools-frontend/permissions": "24.x || 25.x || 27.x",
50
+ "@commercetools-frontend/sentry": "24.x || 25.x || 27.x",
51
51
  "@commercetools-frontend/ui-kit": "19.x || 20.x",
52
52
  "@emotion/react": "11.x",
53
53
  "@emotion/styled": "11.x",
@@ -37,6 +37,8 @@ export function getImportState(
37
37
  importSummary: ImportSummary,
38
38
  options: GetImportStateOptions = {}
39
39
  ): ImportStates {
40
+ const partiallyImported = importSummary.states.partiallyImported ?? 0
41
+
40
42
  const processing = importSummary.states.processing > 0
41
43
  if (processing) return ImportStates.Processing
42
44
 
@@ -46,6 +48,8 @@ export function getImportState(
46
48
  if (waitForUnresolvedReferences)
47
49
  return ImportStates.WaitForUnresolvedReferences
48
50
 
51
+ if (partiallyImported > 0) return ImportStates.PartiallyImported
52
+
49
53
  const partiallyCompleted =
50
54
  (importSummary.states.imported > 0 &&
51
55
  importSummary.states.imported < importSummary.total) ||
@@ -114,6 +114,7 @@ export const importStatesMap: Record<ImportStates, Array<ImportSummary>> = {
114
114
  processing: 10,
115
115
  canceled: 0,
116
116
  deleted: 0,
117
+ partiallyImported: 0,
117
118
  },
118
119
  total: 10,
119
120
  },
@@ -129,6 +130,7 @@ export const importStatesMap: Record<ImportStates, Array<ImportSummary>> = {
129
130
  processing: 0,
130
131
  canceled: 0,
131
132
  deleted: 0,
133
+ partiallyImported: 0,
132
134
  },
133
135
  total: 10,
134
136
  },
@@ -142,6 +144,7 @@ export const importStatesMap: Record<ImportStates, Array<ImportSummary>> = {
142
144
  processing: 0,
143
145
  canceled: 0,
144
146
  deleted: 0,
147
+ partiallyImported: 0,
145
148
  },
146
149
  total: 10,
147
150
  },
@@ -155,6 +158,7 @@ export const importStatesMap: Record<ImportStates, Array<ImportSummary>> = {
155
158
  processing: 0,
156
159
  canceled: 0,
157
160
  deleted: 0,
161
+ partiallyImported: 0,
158
162
  },
159
163
  total: 40,
160
164
  },
@@ -170,6 +174,7 @@ export const importStatesMap: Record<ImportStates, Array<ImportSummary>> = {
170
174
  processing: 0,
171
175
  canceled: 0,
172
176
  deleted: 0,
177
+ partiallyImported: 0,
173
178
  },
174
179
  total: 8,
175
180
  },
@@ -183,6 +188,7 @@ export const importStatesMap: Record<ImportStates, Array<ImportSummary>> = {
183
188
  processing: 0,
184
189
  canceled: 0,
185
190
  deleted: 0,
191
+ partiallyImported: 0,
186
192
  },
187
193
  total: 10,
188
194
  },
@@ -196,6 +202,7 @@ export const importStatesMap: Record<ImportStates, Array<ImportSummary>> = {
196
202
  processing: 0,
197
203
  canceled: 0,
198
204
  deleted: 0,
205
+ partiallyImported: 0,
199
206
  },
200
207
  total: 10,
201
208
  },
@@ -211,6 +218,7 @@ export const importStatesMap: Record<ImportStates, Array<ImportSummary>> = {
211
218
  processing: 0,
212
219
  canceled: 0,
213
220
  deleted: 0,
221
+ partiallyImported: 0,
214
222
  },
215
223
  total: 3,
216
224
  },
@@ -224,6 +232,7 @@ export const importStatesMap: Record<ImportStates, Array<ImportSummary>> = {
224
232
  processing: 0,
225
233
  canceled: 0,
226
234
  deleted: 0,
235
+ partiallyImported: 0,
227
236
  },
228
237
  total: 30,
229
238
  },
@@ -239,6 +248,7 @@ export const importStatesMap: Record<ImportStates, Array<ImportSummary>> = {
239
248
  processing: 0,
240
249
  canceled: 0,
241
250
  deleted: 0,
251
+ partiallyImported: 0,
242
252
  },
243
253
  total: 20,
244
254
  },
@@ -252,6 +262,7 @@ export const importStatesMap: Record<ImportStates, Array<ImportSummary>> = {
252
262
  processing: 0,
253
263
  canceled: 0,
254
264
  deleted: 0,
265
+ partiallyImported: 0,
255
266
  },
256
267
  total: 10,
257
268
  },
@@ -267,6 +278,7 @@ export const importStatesMap: Record<ImportStates, Array<ImportSummary>> = {
267
278
  processing: 0,
268
279
  canceled: 0,
269
280
  deleted: 0,
281
+ partiallyImported: 0,
270
282
  },
271
283
  total: 0,
272
284
  },
@@ -282,10 +294,41 @@ export const importStatesMap: Record<ImportStates, Array<ImportSummary>> = {
282
294
  processing: 0,
283
295
  canceled: 10,
284
296
  deleted: 0,
297
+ partiallyImported: 0,
285
298
  },
286
299
  total: 10,
287
300
  },
288
301
  ],
302
+ [ImportStates.PartiallyImported]: [
303
+ {
304
+ states: {
305
+ unresolved: 0,
306
+ imported: 0,
307
+ rejected: 0,
308
+ validationFailed: 0,
309
+ waitForMasterVariant: 0,
310
+ processing: 0,
311
+ canceled: 0,
312
+ deleted: 0,
313
+ partiallyImported: 2,
314
+ },
315
+ total: 2,
316
+ },
317
+ {
318
+ states: {
319
+ unresolved: 0,
320
+ imported: 1,
321
+ rejected: 0,
322
+ validationFailed: 0,
323
+ waitForMasterVariant: 0,
324
+ processing: 0,
325
+ canceled: 0,
326
+ deleted: 0,
327
+ partiallyImported: 1,
328
+ },
329
+ total: 2,
330
+ },
331
+ ],
289
332
  }
290
333
  export const validFileUploadResponse: FileUploadResponse = {
291
334
  results: [],
@@ -2,6 +2,8 @@ export const IMPORT_MAX_FILE_SIZE_MB = 100
2
2
 
3
3
  export const IMPORT_MAX_ITEM_COUNT = 500_000
4
4
 
5
+ export const IMPORT_CONTAINER_WARNING_THRESHOLD = 1_000
6
+
5
7
  // =============================================================================
6
8
  // Legacy constants (old flow) - Remove after testing and migration is complete
7
9
  // =============================================================================
@@ -5,6 +5,12 @@ import type { ResourceTypeId } from '@commercetools/importapi-sdk'
5
5
  */
6
6
  export const CT_API_DOCS_URL = 'https://docs.commercetools.com/api/'
7
7
 
8
+ /**
9
+ * Import container best practices - automatic deletion via retention policy
10
+ */
11
+ export const IMPORT_CONTAINER_BEST_PRACTICES_URL =
12
+ 'https://docs.commercetools.com/api/import-export/best-practices#automatically-delete-import-containers'
13
+
8
14
  /**
9
15
  * Template download links for each resource type
10
16
  */
@@ -2,6 +2,7 @@ export enum ImportStates {
2
2
  Processing = 'processing',
3
3
  WaitForUnresolvedReferences = 'wait-for-unresolved-references',
4
4
  PartiallyCompleted = 'partially-completed',
5
+ PartiallyImported = 'partially-imported',
5
6
  Failed = 'failed',
6
7
  SuccessfullyCompleted = 'successfully-completed',
7
8
  NoRunningImports = 'no-running-imports',
@@ -12,6 +12,10 @@ interface ExtendedOperationStates extends OperationStates {
12
12
  * The number of resources in the `deleted` state.
13
13
  */
14
14
  readonly deleted: number
15
+ /**
16
+ * The number of resources in the `partiallyImported` state.
17
+ */
18
+ readonly partiallyImported: number
15
19
  }
16
20
 
17
21
  export interface ExtendedImportSummary extends ImportSummary {