@bitwarden/sdk-internal 0.2.0-main.516 → 0.2.0-main.518

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/VERSION CHANGED
@@ -1 +1 @@
1
- 275eb078a571e31c70165a55f1061210c5bea1f6
1
+ f892494e835c24cd8d3d51cdeffeb914d21c068d
@@ -1,5 +1,16 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ /**
4
+ * Generate a new SSH key pair
5
+ *
6
+ * # Arguments
7
+ * - `key_algorithm` - The algorithm to use for the key pair
8
+ *
9
+ * # Returns
10
+ * - `Ok(SshKey)` if the key was successfully generated
11
+ * - `Err(KeyGenerationError)` if the key could not be generated
12
+ */
13
+ export function generate_ssh_key(key_algorithm: KeyAlgorithm): SshKeyView;
3
14
  /**
4
15
  * Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
5
16
  * to an OpenSSH private key with public key and fingerprint
@@ -16,17 +27,6 @@
16
27
  * - `Err(UnsupportedKeyType)` if the key type is not supported
17
28
  */
18
29
  export function import_ssh_key(imported_key: string, password?: string | null): SshKeyView;
19
- /**
20
- * Generate a new SSH key pair
21
- *
22
- * # Arguments
23
- * - `key_algorithm` - The algorithm to use for the key pair
24
- *
25
- * # Returns
26
- * - `Ok(SshKey)` if the key was successfully generated
27
- * - `Err(KeyGenerationError)` if the key could not be generated
28
- */
29
- export function generate_ssh_key(key_algorithm: KeyAlgorithm): SshKeyView;
30
30
  export function init_sdk(log_level?: LogLevel | null): void;
31
31
  /**
32
32
  * Registers a DiscoverHandler so that the client can respond to DiscoverRequests.
@@ -185,15 +185,15 @@ export interface Repositories {
185
185
  folder: Repository<Folder> | null;
186
186
  }
187
187
 
188
- export interface IndexedDbConfiguration {
189
- db_name: string;
190
- }
191
-
192
188
  /**
193
189
  * Active feature flags for the SDK.
194
190
  */
195
191
  export interface FeatureFlags extends Map<string, boolean> {}
196
192
 
193
+ export interface IndexedDbConfiguration {
194
+ db_name: string;
195
+ }
196
+
197
197
  /**
198
198
  * A request structure for requesting a send access token from the API.
199
199
  */
@@ -257,31 +257,21 @@ function passArray8ToWasm0(arg, malloc) {
257
257
  return ptr;
258
258
  }
259
259
  /**
260
- * Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
261
- * to an OpenSSH private key with public key and fingerprint
260
+ * Generate a new SSH key pair
262
261
  *
263
262
  * # Arguments
264
- * - `imported_key` - The private key to convert
265
- * - `password` - The password to use for decrypting the key
263
+ * - `key_algorithm` - The algorithm to use for the key pair
266
264
  *
267
265
  * # Returns
268
- * - `Ok(SshKey)` if the key was successfully coneverted
269
- * - `Err(PasswordRequired)` if the key is encrypted and no password was provided
270
- * - `Err(WrongPassword)` if the password provided is incorrect
271
- * - `Err(ParsingError)` if the key could not be parsed
272
- * - `Err(UnsupportedKeyType)` if the key type is not supported
273
- * @param {string} imported_key
274
- * @param {string | null} [password]
266
+ * - `Ok(SshKey)` if the key was successfully generated
267
+ * - `Err(KeyGenerationError)` if the key could not be generated
268
+ * @param {KeyAlgorithm} key_algorithm
275
269
  * @returns {SshKeyView}
276
270
  */
277
- export function import_ssh_key(imported_key, password) {
271
+ export function generate_ssh_key(key_algorithm) {
278
272
  try {
279
273
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
280
- const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
281
- const len0 = WASM_VECTOR_LEN;
282
- var ptr1 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
283
- var len1 = WASM_VECTOR_LEN;
284
- wasm.import_ssh_key(retptr, ptr0, len0, ptr1, len1);
274
+ wasm.generate_ssh_key(retptr, addHeapObject(key_algorithm));
285
275
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
286
276
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
287
277
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -295,21 +285,31 @@ export function import_ssh_key(imported_key, password) {
295
285
  }
296
286
 
297
287
  /**
298
- * Generate a new SSH key pair
288
+ * Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
289
+ * to an OpenSSH private key with public key and fingerprint
299
290
  *
300
291
  * # Arguments
301
- * - `key_algorithm` - The algorithm to use for the key pair
292
+ * - `imported_key` - The private key to convert
293
+ * - `password` - The password to use for decrypting the key
302
294
  *
303
295
  * # Returns
304
- * - `Ok(SshKey)` if the key was successfully generated
305
- * - `Err(KeyGenerationError)` if the key could not be generated
306
- * @param {KeyAlgorithm} key_algorithm
296
+ * - `Ok(SshKey)` if the key was successfully coneverted
297
+ * - `Err(PasswordRequired)` if the key is encrypted and no password was provided
298
+ * - `Err(WrongPassword)` if the password provided is incorrect
299
+ * - `Err(ParsingError)` if the key could not be parsed
300
+ * - `Err(UnsupportedKeyType)` if the key type is not supported
301
+ * @param {string} imported_key
302
+ * @param {string | null} [password]
307
303
  * @returns {SshKeyView}
308
304
  */
309
- export function generate_ssh_key(key_algorithm) {
305
+ export function import_ssh_key(imported_key, password) {
310
306
  try {
311
307
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
312
- wasm.generate_ssh_key(retptr, addHeapObject(key_algorithm));
308
+ const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
309
+ const len0 = WASM_VECTOR_LEN;
310
+ var ptr1 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
311
+ var len1 = WASM_VECTOR_LEN;
312
+ wasm.import_ssh_key(retptr, ptr0, len0, ptr1, len1);
313
313
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
314
314
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
315
315
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1012,18 +1012,18 @@ export function isGetFolderError(error) {
1012
1012
  }
1013
1013
  }
1014
1014
 
1015
- function wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d(arg0, arg1) {
1016
- wasm.wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d(arg0, arg1);
1015
+ function wasm_bindgen__convert__closures_____invoke__h6d021f3e9713c130(arg0, arg1, arg2) {
1016
+ wasm.wasm_bindgen__convert__closures_____invoke__h6d021f3e9713c130(arg0, arg1, addHeapObject(arg2));
1017
1017
  }
1018
1018
 
1019
- function wasm_bindgen__convert__closures_____invoke__h7e690d71e18a977f(arg0, arg1, arg2) {
1020
- wasm.wasm_bindgen__convert__closures_____invoke__h7e690d71e18a977f(arg0, arg1, addHeapObject(arg2));
1019
+ function wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d(arg0, arg1) {
1020
+ wasm.wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d(arg0, arg1);
1021
1021
  }
1022
1022
 
1023
- function wasm_bindgen__convert__closures_____invoke__h7cff7b1aea3a3d32(arg0, arg1, arg2) {
1023
+ function wasm_bindgen__convert__closures_____invoke__hd535e5ed92b9c746(arg0, arg1, arg2) {
1024
1024
  try {
1025
1025
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1026
- wasm.wasm_bindgen__convert__closures_____invoke__h7cff7b1aea3a3d32(retptr, arg0, arg1, addHeapObject(arg2));
1026
+ wasm.wasm_bindgen__convert__closures_____invoke__hd535e5ed92b9c746(retptr, arg0, arg1, addHeapObject(arg2));
1027
1027
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1028
1028
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1029
1029
  if (r1) {
@@ -4874,7 +4874,7 @@ export function __wbg_call_e762c39fa8ea36bf() { return handleError(function (arg
4874
4874
  return addHeapObject(ret);
4875
4875
  }, arguments) };
4876
4876
 
4877
- export function __wbg_cipher_b060c518cfd6941f(arg0) {
4877
+ export function __wbg_cipher_a844278d8217651a(arg0) {
4878
4878
  const ret = getObject(arg0).cipher;
4879
4879
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4880
4880
  };
@@ -4966,7 +4966,7 @@ export function __wbg_fetch_f8ba0e29a9d6de0d(arg0, arg1) {
4966
4966
  return addHeapObject(ret);
4967
4967
  };
4968
4968
 
4969
- export function __wbg_folder_648732d89f553367(arg0) {
4969
+ export function __wbg_folder_28387eb724ebe615(arg0) {
4970
4970
  const ret = getObject(arg0).folder;
4971
4971
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4972
4972
  };
@@ -4998,30 +4998,17 @@ export function __wbg_getTime_14776bfb48a1bff9(arg0) {
4998
4998
  return ret;
4999
4999
  };
5000
5000
 
5001
- export function __wbg_get_41936b73441d6c1c() { return handleError(function (arg0, arg1, arg2) {
5002
- let deferred0_0;
5003
- let deferred0_1;
5004
- try {
5005
- deferred0_0 = arg1;
5006
- deferred0_1 = arg2;
5007
- const ret = getObject(arg0).get(getStringFromWasm0(arg1, arg2));
5008
- return addHeapObject(ret);
5009
- } finally {
5010
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5011
- }
5012
- }, arguments) };
5013
-
5014
5001
  export function __wbg_get_7bed016f185add81(arg0, arg1) {
5015
5002
  const ret = getObject(arg0)[arg1 >>> 0];
5016
5003
  return addHeapObject(ret);
5017
5004
  };
5018
5005
 
5019
- export function __wbg_get_access_token_03c295c2dec7ab15(arg0) {
5006
+ export function __wbg_get_access_token_bfee15761f1f0fa8(arg0) {
5020
5007
  const ret = getObject(arg0).get_access_token();
5021
5008
  return addHeapObject(ret);
5022
5009
  };
5023
5010
 
5024
- export function __wbg_get_af9d4d1ba44b4371() { return handleError(function (arg0, arg1, arg2) {
5011
+ export function __wbg_get_c03a59ff46a549dd() { return handleError(function (arg0, arg1, arg2) {
5025
5012
  let deferred0_0;
5026
5013
  let deferred0_1;
5027
5014
  try {
@@ -5034,7 +5021,7 @@ export function __wbg_get_af9d4d1ba44b4371() { return handleError(function (arg0
5034
5021
  }
5035
5022
  }, arguments) };
5036
5023
 
5037
- export function __wbg_get_c03a59ff46a549dd() { return handleError(function (arg0, arg1, arg2) {
5024
+ export function __wbg_get_e62965c361f314d8() { return handleError(function (arg0, arg1, arg2) {
5038
5025
  let deferred0_0;
5039
5026
  let deferred0_1;
5040
5027
  try {
@@ -5052,6 +5039,19 @@ export function __wbg_get_efcb449f58ec27c2() { return handleError(function (arg0
5052
5039
  return addHeapObject(ret);
5053
5040
  }, arguments) };
5054
5041
 
5042
+ export function __wbg_get_f50bbdcaf8035ff1() { return handleError(function (arg0, arg1, arg2) {
5043
+ let deferred0_0;
5044
+ let deferred0_1;
5045
+ try {
5046
+ deferred0_0 = arg1;
5047
+ deferred0_1 = arg2;
5048
+ const ret = getObject(arg0).get(getStringFromWasm0(arg1, arg2));
5049
+ return addHeapObject(ret);
5050
+ } finally {
5051
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5052
+ }
5053
+ }, arguments) };
5054
+
5055
5055
  export function __wbg_get_fb1fa70beb44a754() { return handleError(function (arg0, arg1) {
5056
5056
  const ret = getObject(arg0).get(getObject(arg1));
5057
5057
  return addHeapObject(ret);
@@ -5235,12 +5235,12 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
5235
5235
  return ret;
5236
5236
  };
5237
5237
 
5238
- export function __wbg_list_01a7134772856677() { return handleError(function (arg0) {
5238
+ export function __wbg_list_b9f454de1e52f1c1() { return handleError(function (arg0) {
5239
5239
  const ret = getObject(arg0).list();
5240
5240
  return addHeapObject(ret);
5241
5241
  }, arguments) };
5242
5242
 
5243
- export function __wbg_list_e498dbee8e0f8dbe() { return handleError(function (arg0) {
5243
+ export function __wbg_list_e7a974e868940942() { return handleError(function (arg0) {
5244
5244
  const ret = getObject(arg0).list();
5245
5245
  return addHeapObject(ret);
5246
5246
  }, arguments) };
@@ -5462,7 +5462,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() { return handleError(fun
5462
5462
  getObject(arg0).randomFillSync(takeObject(arg1));
5463
5463
  }, arguments) };
5464
5464
 
5465
- export function __wbg_remove_e30059d65cdf10bc() { return handleError(function (arg0, arg1, arg2) {
5465
+ export function __wbg_remove_1270056b464312b8() { return handleError(function (arg0, arg1, arg2) {
5466
5466
  let deferred0_0;
5467
5467
  let deferred0_1;
5468
5468
  try {
@@ -5475,7 +5475,7 @@ export function __wbg_remove_e30059d65cdf10bc() { return handleError(function (a
5475
5475
  }
5476
5476
  }, arguments) };
5477
5477
 
5478
- export function __wbg_remove_feae4cdac56c54a3() { return handleError(function (arg0, arg1, arg2) {
5478
+ export function __wbg_remove_4760761a3aea1da8() { return handleError(function (arg0, arg1, arg2) {
5479
5479
  let deferred0_0;
5480
5480
  let deferred0_1;
5481
5481
  try {
@@ -5517,7 +5517,7 @@ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
5517
5517
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5518
5518
  };
5519
5519
 
5520
- export function __wbg_set_496160e645ad2880() { return handleError(function (arg0, arg1, arg2, arg3) {
5520
+ export function __wbg_set_5f74eb94c6d8660a() { return handleError(function (arg0, arg1, arg2, arg3) {
5521
5521
  let deferred0_0;
5522
5522
  let deferred0_1;
5523
5523
  try {
@@ -5535,19 +5535,6 @@ export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
5535
5535
  return addHeapObject(ret);
5536
5536
  };
5537
5537
 
5538
- export function __wbg_set_ad376fca1dc2d534() { return handleError(function (arg0, arg1, arg2, arg3) {
5539
- let deferred0_0;
5540
- let deferred0_1;
5541
- try {
5542
- deferred0_0 = arg1;
5543
- deferred0_1 = arg2;
5544
- const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
5545
- return addHeapObject(ret);
5546
- } finally {
5547
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5548
- }
5549
- }, arguments) };
5550
-
5551
5538
  export function __wbg_set_body_3c365989753d61f4(arg0, arg1) {
5552
5539
  getObject(arg0).body = getObject(arg1);
5553
5540
  };
@@ -5565,6 +5552,19 @@ export function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
5565
5552
  getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
5566
5553
  };
5567
5554
 
5555
+ export function __wbg_set_ded1025d1bc6d826() { return handleError(function (arg0, arg1, arg2, arg3) {
5556
+ let deferred0_0;
5557
+ let deferred0_1;
5558
+ try {
5559
+ deferred0_0 = arg1;
5560
+ deferred0_1 = arg2;
5561
+ const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
5562
+ return addHeapObject(ret);
5563
+ } finally {
5564
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5565
+ }
5566
+ }, arguments) };
5567
+
5568
5568
  export function __wbg_set_headers_6926da238cd32ee4(arg0, arg1) {
5569
5569
  getObject(arg0).headers = getObject(arg1);
5570
5570
  };
@@ -5738,7 +5738,7 @@ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
5738
5738
 
5739
5739
  export function __wbindgen_cast_4042b341512ce63a(arg0, arg1) {
5740
5740
  // Cast intrinsic for `Closure(Closure { dtor_idx: 41, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 44, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5741
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h04502fa063387efa, wasm_bindgen__convert__closures_____invoke__h7e690d71e18a977f);
5741
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3238f077fb5ae8c5, wasm_bindgen__convert__closures_____invoke__h6d021f3e9713c130);
5742
5742
  return addHeapObject(ret);
5743
5743
  };
5744
5744
 
@@ -5784,7 +5784,7 @@ export function __wbindgen_cast_a2a1216eb14e5e30(arg0, arg1) {
5784
5784
 
5785
5785
  export function __wbindgen_cast_a3e5ea889ee07093(arg0, arg1) {
5786
5786
  // Cast intrinsic for `Closure(Closure { dtor_idx: 338, function: Function { arguments: [NamedExternref("Event")], shim_idx: 44, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5787
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hd9661b26d463effa, wasm_bindgen__convert__closures_____invoke__h7e690d71e18a977f);
5787
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hd9661b26d463effa, wasm_bindgen__convert__closures_____invoke__h6d021f3e9713c130);
5788
5788
  return addHeapObject(ret);
5789
5789
  };
5790
5790
 
@@ -5796,7 +5796,7 @@ export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
5796
5796
 
5797
5797
  export function __wbindgen_cast_d49c305f67640cb1(arg0, arg1) {
5798
5798
  // Cast intrinsic for `Closure(Closure { dtor_idx: 41, function: Function { arguments: [NamedExternref("Event")], shim_idx: 42, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
5799
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h04502fa063387efa, wasm_bindgen__convert__closures_____invoke__h7cff7b1aea3a3d32);
5799
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h3238f077fb5ae8c5, wasm_bindgen__convert__closures_____invoke__hd535e5ed92b9c746);
5800
5800
  return addHeapObject(ret);
5801
5801
  };
5802
5802
 
@@ -5808,7 +5808,7 @@ export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
5808
5808
 
5809
5809
  export function __wbindgen_cast_e8b3b9b77e6fa82c(arg0, arg1) {
5810
5810
  // Cast intrinsic for `Closure(Closure { dtor_idx: 332, function: Function { arguments: [Externref], shim_idx: 44, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5811
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hc71695a401114797, wasm_bindgen__convert__closures_____invoke__h7e690d71e18a977f);
5811
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hc71695a401114797, wasm_bindgen__convert__closures_____invoke__h6d021f3e9713c130);
5812
5812
  return addHeapObject(ret);
5813
5813
  };
5814
5814
 
Binary file
@@ -522,25 +522,25 @@ export const __wbg_get_outgoingmessage_destination: (a: number) => number;
522
522
  export const vaultclient_attachments: (a: number) => number;
523
523
  export const __wbg_set_outgoingmessage_destination: (a: number, b: number) => void;
524
524
  export const __wbg_cryptoclient_free: (a: number, b: number) => void;
525
- export const wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d: (
525
+ export const wasm_bindgen__convert__closures_____invoke__h6d021f3e9713c130: (
526
526
  a: number,
527
527
  b: number,
528
+ c: number,
528
529
  ) => void;
529
- export const wasm_bindgen__closure__destroy__h666c8569a46b7e11: (a: number, b: number) => void;
530
- export const wasm_bindgen__convert__closures_____invoke__h7e690d71e18a977f: (
530
+ export const wasm_bindgen__closure__destroy__h3238f077fb5ae8c5: (a: number, b: number) => void;
531
+ export const wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d: (
531
532
  a: number,
532
533
  b: number,
533
- c: number,
534
534
  ) => void;
535
+ export const wasm_bindgen__closure__destroy__h666c8569a46b7e11: (a: number, b: number) => void;
535
536
  export const wasm_bindgen__closure__destroy__hc71695a401114797: (a: number, b: number) => void;
536
- export const wasm_bindgen__convert__closures_____invoke__h7cff7b1aea3a3d32: (
537
+ export const wasm_bindgen__closure__destroy__hd9661b26d463effa: (a: number, b: number) => void;
538
+ export const wasm_bindgen__convert__closures_____invoke__hd535e5ed92b9c746: (
537
539
  a: number,
538
540
  b: number,
539
541
  c: number,
540
542
  d: number,
541
543
  ) => void;
542
- export const wasm_bindgen__closure__destroy__h04502fa063387efa: (a: number, b: number) => void;
543
- export const wasm_bindgen__closure__destroy__hd9661b26d463effa: (a: number, b: number) => void;
544
544
  export const wasm_bindgen__convert__closures_____invoke__h0c62e4f019080f6a: (
545
545
  a: number,
546
546
  b: number,