@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.
@@ -1,6 +1,6 @@
1
1
  import * as nuxt_app from 'nuxt/app';
2
2
  import { ShallowRef } from 'vue';
3
- import { H as HaexVaultSdk } from '../client-Cx4ZyQFL.mjs';
3
+ import { H as HaexVaultSdk } from '../client-7bZyiRwE.mjs';
4
4
  import { A as ApplicationContext } from '../types-BwFKGH70.mjs';
5
5
  import 'drizzle-orm/sqlite-proxy';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import * as nuxt_app from 'nuxt/app';
2
2
  import { ShallowRef } from 'vue';
3
- import { H as HaexVaultSdk } from '../client-CD5QZi7F.js';
3
+ import { H as HaexVaultSdk } from '../client-BPwsH1so.js';
4
4
  import { A as ApplicationContext } from '../types-BwFKGH70.js';
5
5
  import 'drizzle-orm/sqlite-proxy';
6
6
 
@@ -952,26 +952,32 @@ var BackendManagement = class {
952
952
  );
953
953
  }
954
954
  /**
955
- * Add a new storage backend
956
- * @param request - Backend configuration
955
+ * Propose a new storage. The host asks the user; credentials are entered
956
+ * only there. Resolves with the new storage, which the extension may then
957
+ * read and write.
958
+ * @param request - The proposal, without credentials
957
959
  * @returns Created backend info
958
960
  */
959
961
  async add(request) {
960
962
  return this.client.request(
961
963
  REMOTE_STORAGE_COMMANDS.addBackend,
962
- { request }
964
+ { request },
965
+ // No deadline: the host waits for the user's answer in its dialog.
966
+ { timeout: null }
963
967
  );
964
968
  }
965
969
  /**
966
- * Update a storage backend
967
- * Only provided fields are updated. Credentials are preserved if not provided.
970
+ * Change a storage after the user confirms it in the host.
971
+ * Only provided fields are updated; new credentials are entered in the host.
968
972
  * @param request - Update request with backendId and fields to update
969
973
  * @returns Updated backend info
970
974
  */
971
975
  async update(request) {
972
976
  return this.client.request(
973
977
  REMOTE_STORAGE_COMMANDS.updateBackend,
974
- { request }
978
+ { request },
979
+ // No deadline: the host waits for the user's answer in its dialog.
980
+ { timeout: null }
975
981
  );
976
982
  }
977
983
  /**
@@ -979,18 +985,22 @@ var BackendManagement = class {
979
985
  * @param backendId - Backend ID to remove
980
986
  */
981
987
  async remove(backendId) {
982
- await this.client.request(REMOTE_STORAGE_COMMANDS.removeBackend, {
983
- backendId
984
- });
988
+ await this.client.request(
989
+ REMOTE_STORAGE_COMMANDS.removeBackend,
990
+ { backendId },
991
+ { timeout: null }
992
+ );
985
993
  }
986
994
  /**
987
995
  * Test connection to a storage backend
988
996
  * @param backendId - Backend ID to test
989
997
  */
990
998
  async test(backendId) {
991
- await this.client.request(REMOTE_STORAGE_COMMANDS.testBackend, {
992
- backendId
993
- });
999
+ await this.client.request(
1000
+ REMOTE_STORAGE_COMMANDS.testBackend,
1001
+ { backendId },
1002
+ { timeout: null }
1003
+ );
994
1004
  }
995
1005
  };
996
1006