@haex-space/vault-sdk 4.1.0 → 4.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.
package/dist/index.mjs CHANGED
@@ -1791,26 +1791,32 @@ var BackendManagement = class {
1791
1791
  );
1792
1792
  }
1793
1793
  /**
1794
- * Add a new storage backend
1795
- * @param request - Backend configuration
1794
+ * Propose a new storage. The host asks the user; credentials are entered
1795
+ * only there. Resolves with the new storage, which the extension may then
1796
+ * read and write.
1797
+ * @param request - The proposal, without credentials
1796
1798
  * @returns Created backend info
1797
1799
  */
1798
1800
  async add(request) {
1799
1801
  return this.client.request(
1800
1802
  REMOTE_STORAGE_COMMANDS.addBackend,
1801
- { request }
1803
+ { request },
1804
+ // No deadline: the host waits for the user's answer in its dialog.
1805
+ { timeout: null }
1802
1806
  );
1803
1807
  }
1804
1808
  /**
1805
- * Update a storage backend
1806
- * Only provided fields are updated. Credentials are preserved if not provided.
1809
+ * Change a storage after the user confirms it in the host.
1810
+ * Only provided fields are updated; new credentials are entered in the host.
1807
1811
  * @param request - Update request with backendId and fields to update
1808
1812
  * @returns Updated backend info
1809
1813
  */
1810
1814
  async update(request) {
1811
1815
  return this.client.request(
1812
1816
  REMOTE_STORAGE_COMMANDS.updateBackend,
1813
- { request }
1817
+ { request },
1818
+ // No deadline: the host waits for the user's answer in its dialog.
1819
+ { timeout: null }
1814
1820
  );
1815
1821
  }
1816
1822
  /**
@@ -1818,18 +1824,22 @@ var BackendManagement = class {
1818
1824
  * @param backendId - Backend ID to remove
1819
1825
  */
1820
1826
  async remove(backendId) {
1821
- await this.client.request(REMOTE_STORAGE_COMMANDS.removeBackend, {
1822
- backendId
1823
- });
1827
+ await this.client.request(
1828
+ REMOTE_STORAGE_COMMANDS.removeBackend,
1829
+ { backendId },
1830
+ { timeout: null }
1831
+ );
1824
1832
  }
1825
1833
  /**
1826
1834
  * Test connection to a storage backend
1827
1835
  * @param backendId - Backend ID to test
1828
1836
  */
1829
1837
  async test(backendId) {
1830
- await this.client.request(REMOTE_STORAGE_COMMANDS.testBackend, {
1831
- backendId
1832
- });
1838
+ await this.client.request(
1839
+ REMOTE_STORAGE_COMMANDS.testBackend,
1840
+ { backendId },
1841
+ { timeout: null }
1842
+ );
1833
1843
  }
1834
1844
  };
1835
1845