@memori.ai/memori-api-client 1.1.0 → 1.2.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.
@@ -1659,11 +1659,11 @@ var importExport = (function (apiUrl) {
1659
1659
  /**
1660
1660
  * Imports memories from a CSV file.
1661
1661
  * @param {string} sessionId The session ID
1662
- * @param {string[]} csvRows Rows of the CSV file.
1663
- * @param {ImportCSVParams} params The specifications and content of the CSV file
1662
+ * @param {string[]} rows Rows of the CSV file.
1663
+ * @param {ImportParams} params The specifications and content of the CSV file
1664
1664
  */
1665
1665
  importCSV: function () {
1666
- var _importCSV = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(sessionId, csvRows, params) {
1666
+ var _importCSV = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(sessionId, rows, params) {
1667
1667
  return _regeneratorRuntime().wrap(function _callee$(_context) {
1668
1668
  while (1) {
1669
1669
  switch (_context.prev = _context.next) {
@@ -1672,7 +1672,7 @@ var importExport = (function (apiUrl) {
1672
1672
  method: 'POST',
1673
1673
  apiUrl: apiUrl,
1674
1674
  body: _extends({
1675
- csvRows: csvRows
1675
+ rows: rows
1676
1676
  }, params)
1677
1677
  }));
1678
1678
 
@@ -1691,6 +1691,101 @@ var importExport = (function (apiUrl) {
1691
1691
  return importCSV;
1692
1692
  }(),
1693
1693
 
1694
+ /**
1695
+ * Gets the status of an ongoing Import process.
1696
+ * @param {string} importID The import process ID
1697
+ */
1698
+ importStatus: function () {
1699
+ var _importStatus = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(importID) {
1700
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1701
+ while (1) {
1702
+ switch (_context2.prev = _context2.next) {
1703
+ case 0:
1704
+ return _context2.abrupt("return", apiFetcher("/ImportExport/ImportStatus/" + importID, {
1705
+ method: 'GET',
1706
+ apiUrl: apiUrl
1707
+ }));
1708
+
1709
+ case 1:
1710
+ case "end":
1711
+ return _context2.stop();
1712
+ }
1713
+ }
1714
+ }, _callee2);
1715
+ }));
1716
+
1717
+ function importStatus(_x4) {
1718
+ return _importStatus.apply(this, arguments);
1719
+ }
1720
+
1721
+ return importStatus;
1722
+ }(),
1723
+
1724
+ /**
1725
+ * Interrupts an ongoing Import process.
1726
+ * @param {string} importID The import process ID
1727
+ */
1728
+ stopImport: function () {
1729
+ var _stopImport = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(importID) {
1730
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1731
+ while (1) {
1732
+ switch (_context3.prev = _context3.next) {
1733
+ case 0:
1734
+ return _context3.abrupt("return", apiFetcher("/ImportExport/StopImport/" + importID, {
1735
+ method: 'POST',
1736
+ apiUrl: apiUrl
1737
+ }));
1738
+
1739
+ case 1:
1740
+ case "end":
1741
+ return _context3.stop();
1742
+ }
1743
+ }
1744
+ }, _callee3);
1745
+ }));
1746
+
1747
+ function stopImport(_x5) {
1748
+ return _stopImport.apply(this, arguments);
1749
+ }
1750
+
1751
+ return stopImport;
1752
+ }(),
1753
+
1754
+ /**
1755
+ * Imports memories from a TXT file.
1756
+ * @param {string} sessionId The session ID
1757
+ * @param {string[]} rows Rows of the TXT file.
1758
+ * @param {ImportCSVParams} params The specifications and content of the TXT file
1759
+ */
1760
+ importTXT: function () {
1761
+ var _importTXT = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(sessionId, rows, params) {
1762
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1763
+ while (1) {
1764
+ switch (_context4.prev = _context4.next) {
1765
+ case 0:
1766
+ return _context4.abrupt("return", apiFetcher("/ImportExport/ImportTXT/" + sessionId, {
1767
+ method: 'POST',
1768
+ apiUrl: apiUrl,
1769
+ body: _extends({
1770
+ rows: rows
1771
+ }, params)
1772
+ }));
1773
+
1774
+ case 1:
1775
+ case "end":
1776
+ return _context4.stop();
1777
+ }
1778
+ }
1779
+ }, _callee4);
1780
+ }));
1781
+
1782
+ function importTXT(_x6, _x7, _x8) {
1783
+ return _importTXT.apply(this, arguments);
1784
+ }
1785
+
1786
+ return importTXT;
1787
+ }(),
1788
+
1694
1789
  /**
1695
1790
  * Exports memories to a CSV file.
1696
1791
  * @param {string} sessionID The session ID
@@ -1698,12 +1793,12 @@ var importExport = (function (apiUrl) {
1698
1793
  * @returns The CSV file content
1699
1794
  */
1700
1795
  exportCSV: function () {
1701
- var _exportCSV = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(sessionID, params) {
1702
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1796
+ var _exportCSV = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(sessionID, params) {
1797
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
1703
1798
  while (1) {
1704
- switch (_context2.prev = _context2.next) {
1799
+ switch (_context5.prev = _context5.next) {
1705
1800
  case 0:
1706
- return _context2.abrupt("return", apiFetcher("/ImportExport/ExportCSV/" + sessionID, {
1801
+ return _context5.abrupt("return", apiFetcher("/ImportExport/ExportCSV/" + sessionID, {
1707
1802
  method: 'POST',
1708
1803
  apiUrl: apiUrl,
1709
1804
  body: params,
@@ -1712,13 +1807,13 @@ var importExport = (function (apiUrl) {
1712
1807
 
1713
1808
  case 1:
1714
1809
  case "end":
1715
- return _context2.stop();
1810
+ return _context5.stop();
1716
1811
  }
1717
1812
  }
1718
- }, _callee2);
1813
+ }, _callee5);
1719
1814
  }));
1720
1815
 
1721
- function exportCSV(_x4, _x5) {
1816
+ function exportCSV(_x9, _x10) {
1722
1817
  return _exportCSV.apply(this, arguments);
1723
1818
  }
1724
1819