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