@bitwarden/sdk-internal 0.2.0-main.417 → 0.2.0-main.418

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.
@@ -254,21 +254,33 @@ function passArray8ToWasm0(arg, malloc) {
254
254
  return ptr;
255
255
  }
256
256
  /**
257
- * Generate a new SSH key pair
257
+ * Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
258
+ * to an OpenSSH private key with public key and fingerprint
258
259
  *
259
260
  * # Arguments
260
- * - `key_algorithm` - The algorithm to use for the key pair
261
+ * - `imported_key` - The private key to convert
262
+ * - `password` - The password to use for decrypting the key
261
263
  *
262
264
  * # Returns
263
- * - `Ok(SshKey)` if the key was successfully generated
264
- * - `Err(KeyGenerationError)` if the key could not be generated
265
- * @param {KeyAlgorithm} key_algorithm
265
+ * - `Ok(SshKey)` if the key was successfully coneverted
266
+ * - `Err(PasswordRequired)` if the key is encrypted and no password was provided
267
+ * - `Err(WrongPassword)` if the password provided is incorrect
268
+ * - `Err(ParsingError)` if the key could not be parsed
269
+ * - `Err(UnsupportedKeyType)` if the key type is not supported
270
+ * @param {string} imported_key
271
+ * @param {string | null} [password]
266
272
  * @returns {SshKeyView}
267
273
  */
268
- exports.generate_ssh_key = function (key_algorithm) {
274
+ exports.import_ssh_key = function (imported_key, password) {
269
275
  try {
270
276
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
271
- wasm.generate_ssh_key(retptr, addHeapObject(key_algorithm));
277
+ const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
278
+ const len0 = WASM_VECTOR_LEN;
279
+ var ptr1 = isLikeNone(password)
280
+ ? 0
281
+ : passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
282
+ var len1 = WASM_VECTOR_LEN;
283
+ wasm.import_ssh_key(retptr, ptr0, len0, ptr1, len1);
272
284
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
273
285
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
274
286
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -282,33 +294,21 @@ exports.generate_ssh_key = function (key_algorithm) {
282
294
  };
283
295
 
284
296
  /**
285
- * Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
286
- * to an OpenSSH private key with public key and fingerprint
297
+ * Generate a new SSH key pair
287
298
  *
288
299
  * # Arguments
289
- * - `imported_key` - The private key to convert
290
- * - `password` - The password to use for decrypting the key
300
+ * - `key_algorithm` - The algorithm to use for the key pair
291
301
  *
292
302
  * # Returns
293
- * - `Ok(SshKey)` if the key was successfully coneverted
294
- * - `Err(PasswordRequired)` if the key is encrypted and no password was provided
295
- * - `Err(WrongPassword)` if the password provided is incorrect
296
- * - `Err(ParsingError)` if the key could not be parsed
297
- * - `Err(UnsupportedKeyType)` if the key type is not supported
298
- * @param {string} imported_key
299
- * @param {string | null} [password]
303
+ * - `Ok(SshKey)` if the key was successfully generated
304
+ * - `Err(KeyGenerationError)` if the key could not be generated
305
+ * @param {KeyAlgorithm} key_algorithm
300
306
  * @returns {SshKeyView}
301
307
  */
302
- exports.import_ssh_key = function (imported_key, password) {
308
+ exports.generate_ssh_key = function (key_algorithm) {
303
309
  try {
304
310
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
305
- const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
306
- const len0 = WASM_VECTOR_LEN;
307
- var ptr1 = isLikeNone(password)
308
- ? 0
309
- : passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
310
- var len1 = WASM_VECTOR_LEN;
311
- wasm.import_ssh_key(retptr, ptr0, len0, ptr1, len1);
311
+ wasm.generate_ssh_key(retptr, addHeapObject(key_algorithm));
312
312
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
313
313
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
314
314
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -391,9 +391,9 @@ exports.isAccountCryptographyInitializationError = function (error) {
391
391
  * @param {any} error
392
392
  * @returns {boolean}
393
393
  */
394
- exports.isCryptoClientError = function (error) {
394
+ exports.isDeriveKeyConnectorError = function (error) {
395
395
  try {
396
- const ret = wasm.isCryptoClientError(addBorrowedObject(error));
396
+ const ret = wasm.isDeriveKeyConnectorError(addBorrowedObject(error));
397
397
  return ret !== 0;
398
398
  } finally {
399
399
  heap[stack_pointer++] = undefined;
@@ -404,9 +404,9 @@ exports.isCryptoClientError = function (error) {
404
404
  * @param {any} error
405
405
  * @returns {boolean}
406
406
  */
407
- exports.isDeriveKeyConnectorError = function (error) {
407
+ exports.isCryptoClientError = function (error) {
408
408
  try {
409
- const ret = wasm.isDeriveKeyConnectorError(addBorrowedObject(error));
409
+ const ret = wasm.isCryptoClientError(addBorrowedObject(error));
410
410
  return ret !== 0;
411
411
  } finally {
412
412
  heap[stack_pointer++] = undefined;
@@ -543,9 +543,9 @@ exports.isTypedReceiveError = function (error) {
543
543
  * @param {any} error
544
544
  * @returns {boolean}
545
545
  */
546
- exports.isSubscribeError = function (error) {
546
+ exports.isReceiveError = function (error) {
547
547
  try {
548
- const ret = wasm.isSubscribeError(addBorrowedObject(error));
548
+ const ret = wasm.isReceiveError(addBorrowedObject(error));
549
549
  return ret !== 0;
550
550
  } finally {
551
551
  heap[stack_pointer++] = undefined;
@@ -556,9 +556,9 @@ exports.isSubscribeError = function (error) {
556
556
  * @param {any} error
557
557
  * @returns {boolean}
558
558
  */
559
- exports.isReceiveError = function (error) {
559
+ exports.isSubscribeError = function (error) {
560
560
  try {
561
- const ret = wasm.isReceiveError(addBorrowedObject(error));
561
+ const ret = wasm.isSubscribeError(addBorrowedObject(error));
562
562
  return ret !== 0;
563
563
  } finally {
564
564
  heap[stack_pointer++] = undefined;
@@ -574,9 +574,9 @@ function _assertClass(instance, klass) {
574
574
  * @param {any} error
575
575
  * @returns {boolean}
576
576
  */
577
- exports.isDeserializeError = function (error) {
577
+ exports.isChannelError = function (error) {
578
578
  try {
579
- const ret = wasm.isDeserializeError(addBorrowedObject(error));
579
+ const ret = wasm.isChannelError(addBorrowedObject(error));
580
580
  return ret !== 0;
581
581
  } finally {
582
582
  heap[stack_pointer++] = undefined;
@@ -587,9 +587,9 @@ exports.isDeserializeError = function (error) {
587
587
  * @param {any} error
588
588
  * @returns {boolean}
589
589
  */
590
- exports.isChannelError = function (error) {
590
+ exports.isDeserializeError = function (error) {
591
591
  try {
592
- const ret = wasm.isChannelError(addBorrowedObject(error));
592
+ const ret = wasm.isDeserializeError(addBorrowedObject(error));
593
593
  return ret !== 0;
594
594
  } finally {
595
595
  heap[stack_pointer++] = undefined;
@@ -629,9 +629,9 @@ exports.ipcRegisterDiscoverHandler = function (ipc_client, response) {
629
629
  * @param {any} error
630
630
  * @returns {boolean}
631
631
  */
632
- exports.isKeyGenerationError = function (error) {
632
+ exports.isSshKeyImportError = function (error) {
633
633
  try {
634
- const ret = wasm.isKeyGenerationError(addBorrowedObject(error));
634
+ const ret = wasm.isSshKeyImportError(addBorrowedObject(error));
635
635
  return ret !== 0;
636
636
  } finally {
637
637
  heap[stack_pointer++] = undefined;
@@ -655,9 +655,9 @@ exports.isSshKeyExportError = function (error) {
655
655
  * @param {any} error
656
656
  * @returns {boolean}
657
657
  */
658
- exports.isSshKeyImportError = function (error) {
658
+ exports.isKeyGenerationError = function (error) {
659
659
  try {
660
- const ret = wasm.isSshKeyImportError(addBorrowedObject(error));
660
+ const ret = wasm.isKeyGenerationError(addBorrowedObject(error));
661
661
  return ret !== 0;
662
662
  } finally {
663
663
  heap[stack_pointer++] = undefined;
@@ -733,9 +733,9 @@ exports.isTotpError = function (error) {
733
733
  * @param {any} error
734
734
  * @returns {boolean}
735
735
  */
736
- exports.isEncryptError = function (error) {
736
+ exports.isDecryptError = function (error) {
737
737
  try {
738
- const ret = wasm.isEncryptError(addBorrowedObject(error));
738
+ const ret = wasm.isDecryptError(addBorrowedObject(error));
739
739
  return ret !== 0;
740
740
  } finally {
741
741
  heap[stack_pointer++] = undefined;
@@ -746,9 +746,9 @@ exports.isEncryptError = function (error) {
746
746
  * @param {any} error
747
747
  * @returns {boolean}
748
748
  */
749
- exports.isDecryptError = function (error) {
749
+ exports.isEncryptError = function (error) {
750
750
  try {
751
- const ret = wasm.isDecryptError(addBorrowedObject(error));
751
+ const ret = wasm.isEncryptError(addBorrowedObject(error));
752
752
  return ret !== 0;
753
753
  } finally {
754
754
  heap[stack_pointer++] = undefined;
@@ -798,9 +798,9 @@ exports.isCreateCipherError = function (error) {
798
798
  * @param {any} error
799
799
  * @returns {boolean}
800
800
  */
801
- exports.isEncryptFileError = function (error) {
801
+ exports.isDecryptFileError = function (error) {
802
802
  try {
803
- const ret = wasm.isEncryptFileError(addBorrowedObject(error));
803
+ const ret = wasm.isDecryptFileError(addBorrowedObject(error));
804
804
  return ret !== 0;
805
805
  } finally {
806
806
  heap[stack_pointer++] = undefined;
@@ -811,9 +811,9 @@ exports.isEncryptFileError = function (error) {
811
811
  * @param {any} error
812
812
  * @returns {boolean}
813
813
  */
814
- exports.isDecryptFileError = function (error) {
814
+ exports.isEncryptFileError = function (error) {
815
815
  try {
816
- const ret = wasm.isDecryptFileError(addBorrowedObject(error));
816
+ const ret = wasm.isEncryptFileError(addBorrowedObject(error));
817
817
  return ret !== 0;
818
818
  } finally {
819
819
  heap[stack_pointer++] = undefined;
@@ -872,8 +872,8 @@ exports.isGetFolderError = function (error) {
872
872
  }
873
873
  };
874
874
 
875
- function wasm_bindgen__convert__closures_____invoke__h05da89f3ce503b8f(arg0, arg1, arg2) {
876
- wasm.wasm_bindgen__convert__closures_____invoke__h05da89f3ce503b8f(
875
+ function wasm_bindgen__convert__closures_____invoke__h4c28727d20825f0e(arg0, arg1, arg2) {
876
+ wasm.wasm_bindgen__convert__closures_____invoke__h4c28727d20825f0e(
877
877
  arg0,
878
878
  arg1,
879
879
  addHeapObject(arg2),
@@ -884,10 +884,10 @@ function wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2(arg0, arg
884
884
  wasm.wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2(arg0, arg1);
885
885
  }
886
886
 
887
- function wasm_bindgen__convert__closures_____invoke__h389a5517bdf6e196(arg0, arg1, arg2) {
887
+ function wasm_bindgen__convert__closures_____invoke__h3cc396d089734e5b(arg0, arg1, arg2) {
888
888
  try {
889
889
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
890
- wasm.wasm_bindgen__convert__closures_____invoke__h389a5517bdf6e196(
890
+ wasm.wasm_bindgen__convert__closures_____invoke__h3cc396d089734e5b(
891
891
  retptr,
892
892
  arg0,
893
893
  arg1,
@@ -4642,7 +4642,7 @@ exports.__wbg_call_e762c39fa8ea36bf = function () {
4642
4642
  }, arguments);
4643
4643
  };
4644
4644
 
4645
- exports.__wbg_cipher_a65561393b2f1712 = function (arg0) {
4645
+ exports.__wbg_cipher_c214a9e1669d598f = function (arg0) {
4646
4646
  const ret = getObject(arg0).cipher;
4647
4647
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4648
4648
  };
@@ -4735,7 +4735,7 @@ exports.__wbg_fetch_f8ba0e29a9d6de0d = function (arg0, arg1) {
4735
4735
  return addHeapObject(ret);
4736
4736
  };
4737
4737
 
4738
- exports.__wbg_folder_b5bfa014ae93cc74 = function (arg0) {
4738
+ exports.__wbg_folder_34c1dba0879106f3 = function (arg0) {
4739
4739
  const ret = getObject(arg0).folder;
4740
4740
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4741
4741
  };
@@ -4768,12 +4768,7 @@ exports.__wbg_getTime_14776bfb48a1bff9 = function (arg0) {
4768
4768
  return ret;
4769
4769
  };
4770
4770
 
4771
- exports.__wbg_get_7bed016f185add81 = function (arg0, arg1) {
4772
- const ret = getObject(arg0)[arg1 >>> 0];
4773
- return addHeapObject(ret);
4774
- };
4775
-
4776
- exports.__wbg_get_a2736f97ced6b9de = function () {
4771
+ exports.__wbg_get_0c97133af3282fab = function () {
4777
4772
  return handleError(function (arg0, arg1, arg2) {
4778
4773
  let deferred0_0;
4779
4774
  let deferred0_1;
@@ -4788,12 +4783,17 @@ exports.__wbg_get_a2736f97ced6b9de = function () {
4788
4783
  }, arguments);
4789
4784
  };
4790
4785
 
4791
- exports.__wbg_get_access_token_2e6cdf0799f495fb = function (arg0) {
4786
+ exports.__wbg_get_7bed016f185add81 = function (arg0, arg1) {
4787
+ const ret = getObject(arg0)[arg1 >>> 0];
4788
+ return addHeapObject(ret);
4789
+ };
4790
+
4791
+ exports.__wbg_get_access_token_ef11e024d2c4212c = function (arg0) {
4792
4792
  const ret = getObject(arg0).get_access_token();
4793
4793
  return addHeapObject(ret);
4794
4794
  };
4795
4795
 
4796
- exports.__wbg_get_acd42db33be214a6 = function () {
4796
+ exports.__wbg_get_eef42b3436ce0823 = function () {
4797
4797
  return handleError(function (arg0, arg1, arg2) {
4798
4798
  let deferred0_0;
4799
4799
  let deferred0_1;
@@ -4999,14 +4999,14 @@ exports.__wbg_length_cdd215e10d9dd507 = function (arg0) {
4999
4999
  return ret;
5000
5000
  };
5001
5001
 
5002
- exports.__wbg_list_b084d117028f3ac0 = function () {
5002
+ exports.__wbg_list_1f83643a10817570 = function () {
5003
5003
  return handleError(function (arg0) {
5004
5004
  const ret = getObject(arg0).list();
5005
5005
  return addHeapObject(ret);
5006
5006
  }, arguments);
5007
5007
  };
5008
5008
 
5009
- exports.__wbg_list_c0ca3c5963412c9f = function () {
5009
+ exports.__wbg_list_ff8b17a6bbd44e23 = function () {
5010
5010
  return handleError(function (arg0) {
5011
5011
  const ret = getObject(arg0).list();
5012
5012
  return addHeapObject(ret);
@@ -5250,7 +5250,7 @@ exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
5250
5250
  }, arguments);
5251
5251
  };
5252
5252
 
5253
- exports.__wbg_remove_4d025537227a79eb = function () {
5253
+ exports.__wbg_remove_8e66c940f20e0bec = function () {
5254
5254
  return handleError(function (arg0, arg1, arg2) {
5255
5255
  let deferred0_0;
5256
5256
  let deferred0_1;
@@ -5265,7 +5265,7 @@ exports.__wbg_remove_4d025537227a79eb = function () {
5265
5265
  }, arguments);
5266
5266
  };
5267
5267
 
5268
- exports.__wbg_remove_c56d7d7308929d48 = function () {
5268
+ exports.__wbg_remove_df10f16a50d15e26 = function () {
5269
5269
  return handleError(function (arg0, arg1, arg2) {
5270
5270
  let deferred0_0;
5271
5271
  let deferred0_1;
@@ -5311,11 +5311,26 @@ exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
5311
5311
  return addHeapObject(ret);
5312
5312
  };
5313
5313
 
5314
+ exports.__wbg_set_09bbc40828d46d85 = function () {
5315
+ return handleError(function (arg0, arg1, arg2, arg3) {
5316
+ let deferred0_0;
5317
+ let deferred0_1;
5318
+ try {
5319
+ deferred0_0 = arg1;
5320
+ deferred0_1 = arg2;
5321
+ const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
5322
+ return addHeapObject(ret);
5323
+ } finally {
5324
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5325
+ }
5326
+ }, arguments);
5327
+ };
5328
+
5314
5329
  exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
5315
5330
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5316
5331
  };
5317
5332
 
5318
- exports.__wbg_set_633932dc157d971e = function () {
5333
+ exports.__wbg_set_7da7b4b543b9132c = function () {
5319
5334
  return handleError(function (arg0, arg1, arg2, arg3) {
5320
5335
  let deferred0_0;
5321
5336
  let deferred0_1;
@@ -5350,21 +5365,6 @@ exports.__wbg_set_c2abbebe8b9ebee1 = function () {
5350
5365
  }, arguments);
5351
5366
  };
5352
5367
 
5353
- exports.__wbg_set_c7d0408f9557d445 = function () {
5354
- return handleError(function (arg0, arg1, arg2, arg3) {
5355
- let deferred0_0;
5356
- let deferred0_1;
5357
- try {
5358
- deferred0_0 = arg1;
5359
- deferred0_1 = arg2;
5360
- const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
5361
- return addHeapObject(ret);
5362
- } finally {
5363
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
5364
- }
5365
- }, arguments);
5366
- };
5367
-
5368
5368
  exports.__wbg_set_credentials_f621cd2d85c0c228 = function (arg0, arg1) {
5369
5369
  getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
5370
5370
  };
@@ -5544,8 +5544,8 @@ exports.__wbindgen_cast_34ef3ce950757bdd = function (arg0, arg1) {
5544
5544
  const ret = makeMutClosure(
5545
5545
  arg0,
5546
5546
  arg1,
5547
- wasm.wasm_bindgen__closure__destroy__h003cf2eb90144982,
5548
- wasm_bindgen__convert__closures_____invoke__h05da89f3ce503b8f,
5547
+ wasm.wasm_bindgen__closure__destroy__h1d351c005144aad7,
5548
+ wasm_bindgen__convert__closures_____invoke__h4c28727d20825f0e,
5549
5549
  );
5550
5550
  return addHeapObject(ret);
5551
5551
  };
@@ -5555,8 +5555,8 @@ exports.__wbindgen_cast_397295739b4135cd = function (arg0, arg1) {
5555
5555
  const ret = makeMutClosure(
5556
5556
  arg0,
5557
5557
  arg1,
5558
- wasm.wasm_bindgen__closure__destroy__h003cf2eb90144982,
5559
- wasm_bindgen__convert__closures_____invoke__h389a5517bdf6e196,
5558
+ wasm.wasm_bindgen__closure__destroy__h1d351c005144aad7,
5559
+ wasm_bindgen__convert__closures_____invoke__h3cc396d089734e5b,
5560
5560
  );
5561
5561
  return addHeapObject(ret);
5562
5562
  };
@@ -5589,7 +5589,7 @@ exports.__wbindgen_cast_930d054add031527 = function (arg0, arg1) {
5589
5589
  arg0,
5590
5590
  arg1,
5591
5591
  wasm.wasm_bindgen__closure__destroy__h591e0f2efd143068,
5592
- wasm_bindgen__convert__closures_____invoke__h05da89f3ce503b8f,
5592
+ wasm_bindgen__convert__closures_____invoke__h4c28727d20825f0e,
5593
5593
  );
5594
5594
  return addHeapObject(ret);
5595
5595
  };
@@ -450,24 +450,24 @@ export const __wbg_get_outgoingmessage_destination: (a: number) => number;
450
450
  export const __wbg_registrationclient_free: (a: number, b: number) => void;
451
451
  export const __wbg_set_outgoingmessage_destination: (a: number, b: number) => void;
452
452
  export const __wbg_cryptoclient_free: (a: number, b: number) => void;
453
- export const wasm_bindgen__convert__closures_____invoke__h05da89f3ce503b8f: (
453
+ export const wasm_bindgen__convert__closures_____invoke__h4c28727d20825f0e: (
454
454
  a: number,
455
455
  b: number,
456
456
  c: number,
457
457
  ) => void;
458
458
  export const wasm_bindgen__closure__destroy__h591e0f2efd143068: (a: number, b: number) => void;
459
- export const wasm_bindgen__closure__destroy__h003cf2eb90144982: (a: number, b: number) => void;
460
459
  export const wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2: (
461
460
  a: number,
462
461
  b: number,
463
462
  ) => void;
464
- export const wasm_bindgen__convert__closures_____invoke__h389a5517bdf6e196: (
463
+ export const wasm_bindgen__closure__destroy__he41cbbdbe831f2ac: (a: number, b: number) => void;
464
+ export const wasm_bindgen__closure__destroy__h1d351c005144aad7: (a: number, b: number) => void;
465
+ export const wasm_bindgen__convert__closures_____invoke__h3cc396d089734e5b: (
465
466
  a: number,
466
467
  b: number,
467
468
  c: number,
468
469
  d: number,
469
470
  ) => void;
470
- export const wasm_bindgen__closure__destroy__he41cbbdbe831f2ac: (a: number, b: number) => void;
471
471
  export const wasm_bindgen__convert__closures_____invoke__h0cb536241502fe83: (
472
472
  a: number,
473
473
  b: number,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitwarden/sdk-internal",
3
- "version": "0.2.0-main.417",
3
+ "version": "0.2.0-main.418",
4
4
  "license": "GPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",