@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/svelte.mjs CHANGED
@@ -1371,26 +1371,32 @@ var BackendManagement = class {
1371
1371
  );
1372
1372
  }
1373
1373
  /**
1374
- * Add a new storage backend
1375
- * @param request - Backend configuration
1374
+ * Propose a new storage. The host asks the user; credentials are entered
1375
+ * only there. Resolves with the new storage, which the extension may then
1376
+ * read and write.
1377
+ * @param request - The proposal, without credentials
1376
1378
  * @returns Created backend info
1377
1379
  */
1378
1380
  async add(request) {
1379
1381
  return this.client.request(
1380
1382
  REMOTE_STORAGE_COMMANDS.addBackend,
1381
- { request }
1383
+ { request },
1384
+ // No deadline: the host waits for the user's answer in its dialog.
1385
+ { timeout: null }
1382
1386
  );
1383
1387
  }
1384
1388
  /**
1385
- * Update a storage backend
1386
- * Only provided fields are updated. Credentials are preserved if not provided.
1389
+ * Change a storage after the user confirms it in the host.
1390
+ * Only provided fields are updated; new credentials are entered in the host.
1387
1391
  * @param request - Update request with backendId and fields to update
1388
1392
  * @returns Updated backend info
1389
1393
  */
1390
1394
  async update(request) {
1391
1395
  return this.client.request(
1392
1396
  REMOTE_STORAGE_COMMANDS.updateBackend,
1393
- { request }
1397
+ { request },
1398
+ // No deadline: the host waits for the user's answer in its dialog.
1399
+ { timeout: null }
1394
1400
  );
1395
1401
  }
1396
1402
  /**
@@ -1398,18 +1404,22 @@ var BackendManagement = class {
1398
1404
  * @param backendId - Backend ID to remove
1399
1405
  */
1400
1406
  async remove(backendId) {
1401
- await this.client.request(REMOTE_STORAGE_COMMANDS.removeBackend, {
1402
- backendId
1403
- });
1407
+ await this.client.request(
1408
+ REMOTE_STORAGE_COMMANDS.removeBackend,
1409
+ { backendId },
1410
+ { timeout: null }
1411
+ );
1404
1412
  }
1405
1413
  /**
1406
1414
  * Test connection to a storage backend
1407
1415
  * @param backendId - Backend ID to test
1408
1416
  */
1409
1417
  async test(backendId) {
1410
- await this.client.request(REMOTE_STORAGE_COMMANDS.testBackend, {
1411
- backendId
1412
- });
1418
+ await this.client.request(
1419
+ REMOTE_STORAGE_COMMANDS.testBackend,
1420
+ { backendId },
1421
+ { timeout: null }
1422
+ );
1413
1423
  }
1414
1424
  };
1415
1425