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