@bitwarden/commercial-sdk-internal 0.2.0-main.417 → 0.2.0-main.419

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.
@@ -264,33 +264,21 @@ function passArray8ToWasm0(arg, malloc) {
264
264
  return ptr;
265
265
  }
266
266
  /**
267
- * Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
268
- * to an OpenSSH private key with public key and fingerprint
267
+ * Generate a new SSH key pair
269
268
  *
270
269
  * # Arguments
271
- * - `imported_key` - The private key to convert
272
- * - `password` - The password to use for decrypting the key
270
+ * - `key_algorithm` - The algorithm to use for the key pair
273
271
  *
274
272
  * # Returns
275
- * - `Ok(SshKey)` if the key was successfully coneverted
276
- * - `Err(PasswordRequired)` if the key is encrypted and no password was provided
277
- * - `Err(WrongPassword)` if the password provided is incorrect
278
- * - `Err(ParsingError)` if the key could not be parsed
279
- * - `Err(UnsupportedKeyType)` if the key type is not supported
280
- * @param {string} imported_key
281
- * @param {string | null} [password]
273
+ * - `Ok(SshKey)` if the key was successfully generated
274
+ * - `Err(KeyGenerationError)` if the key could not be generated
275
+ * @param {KeyAlgorithm} key_algorithm
282
276
  * @returns {SshKeyView}
283
277
  */
284
- export function import_ssh_key(imported_key, password) {
278
+ export function generate_ssh_key(key_algorithm) {
285
279
  try {
286
280
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
287
- const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
288
- const len0 = WASM_VECTOR_LEN;
289
- var ptr1 = isLikeNone(password)
290
- ? 0
291
- : passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
292
- var len1 = WASM_VECTOR_LEN;
293
- wasm.import_ssh_key(retptr, ptr0, len0, ptr1, len1);
281
+ wasm.generate_ssh_key(retptr, addHeapObject(key_algorithm));
294
282
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
295
283
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
296
284
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -304,21 +292,33 @@ export function import_ssh_key(imported_key, password) {
304
292
  }
305
293
 
306
294
  /**
307
- * Generate a new SSH key pair
295
+ * Convert a PCKS8 or OpenSSH encrypted or unencrypted private key
296
+ * to an OpenSSH private key with public key and fingerprint
308
297
  *
309
298
  * # Arguments
310
- * - `key_algorithm` - The algorithm to use for the key pair
299
+ * - `imported_key` - The private key to convert
300
+ * - `password` - The password to use for decrypting the key
311
301
  *
312
302
  * # Returns
313
- * - `Ok(SshKey)` if the key was successfully generated
314
- * - `Err(KeyGenerationError)` if the key could not be generated
315
- * @param {KeyAlgorithm} key_algorithm
303
+ * - `Ok(SshKey)` if the key was successfully coneverted
304
+ * - `Err(PasswordRequired)` if the key is encrypted and no password was provided
305
+ * - `Err(WrongPassword)` if the password provided is incorrect
306
+ * - `Err(ParsingError)` if the key could not be parsed
307
+ * - `Err(UnsupportedKeyType)` if the key type is not supported
308
+ * @param {string} imported_key
309
+ * @param {string | null} [password]
316
310
  * @returns {SshKeyView}
317
311
  */
318
- export function generate_ssh_key(key_algorithm) {
312
+ export function import_ssh_key(imported_key, password) {
319
313
  try {
320
314
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
321
- wasm.generate_ssh_key(retptr, addHeapObject(key_algorithm));
315
+ const ptr0 = passStringToWasm0(imported_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
316
+ const len0 = WASM_VECTOR_LEN;
317
+ var ptr1 = isLikeNone(password)
318
+ ? 0
319
+ : passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
320
+ var len1 = WASM_VECTOR_LEN;
321
+ wasm.import_ssh_key(retptr, ptr0, len0, ptr1, len1);
322
322
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
323
323
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
324
324
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -401,9 +401,9 @@ export function isAccountCryptographyInitializationError(error) {
401
401
  * @param {any} error
402
402
  * @returns {boolean}
403
403
  */
404
- export function isCryptoClientError(error) {
404
+ export function isDeriveKeyConnectorError(error) {
405
405
  try {
406
- const ret = wasm.isCryptoClientError(addBorrowedObject(error));
406
+ const ret = wasm.isDeriveKeyConnectorError(addBorrowedObject(error));
407
407
  return ret !== 0;
408
408
  } finally {
409
409
  heap[stack_pointer++] = undefined;
@@ -414,9 +414,9 @@ export function isCryptoClientError(error) {
414
414
  * @param {any} error
415
415
  * @returns {boolean}
416
416
  */
417
- export function isDeriveKeyConnectorError(error) {
417
+ export function isCryptoClientError(error) {
418
418
  try {
419
- const ret = wasm.isDeriveKeyConnectorError(addBorrowedObject(error));
419
+ const ret = wasm.isCryptoClientError(addBorrowedObject(error));
420
420
  return ret !== 0;
421
421
  } finally {
422
422
  heap[stack_pointer++] = undefined;
@@ -553,9 +553,9 @@ export function isTypedReceiveError(error) {
553
553
  * @param {any} error
554
554
  * @returns {boolean}
555
555
  */
556
- export function isSubscribeError(error) {
556
+ export function isReceiveError(error) {
557
557
  try {
558
- const ret = wasm.isSubscribeError(addBorrowedObject(error));
558
+ const ret = wasm.isReceiveError(addBorrowedObject(error));
559
559
  return ret !== 0;
560
560
  } finally {
561
561
  heap[stack_pointer++] = undefined;
@@ -566,9 +566,9 @@ export function isSubscribeError(error) {
566
566
  * @param {any} error
567
567
  * @returns {boolean}
568
568
  */
569
- export function isReceiveError(error) {
569
+ export function isSubscribeError(error) {
570
570
  try {
571
- const ret = wasm.isReceiveError(addBorrowedObject(error));
571
+ const ret = wasm.isSubscribeError(addBorrowedObject(error));
572
572
  return ret !== 0;
573
573
  } finally {
574
574
  heap[stack_pointer++] = undefined;
@@ -584,9 +584,9 @@ function _assertClass(instance, klass) {
584
584
  * @param {any} error
585
585
  * @returns {boolean}
586
586
  */
587
- export function isDeserializeError(error) {
587
+ export function isChannelError(error) {
588
588
  try {
589
- const ret = wasm.isDeserializeError(addBorrowedObject(error));
589
+ const ret = wasm.isChannelError(addBorrowedObject(error));
590
590
  return ret !== 0;
591
591
  } finally {
592
592
  heap[stack_pointer++] = undefined;
@@ -597,9 +597,9 @@ export function isDeserializeError(error) {
597
597
  * @param {any} error
598
598
  * @returns {boolean}
599
599
  */
600
- export function isChannelError(error) {
600
+ export function isDeserializeError(error) {
601
601
  try {
602
- const ret = wasm.isChannelError(addBorrowedObject(error));
602
+ const ret = wasm.isDeserializeError(addBorrowedObject(error));
603
603
  return ret !== 0;
604
604
  } finally {
605
605
  heap[stack_pointer++] = undefined;
@@ -639,9 +639,9 @@ export function ipcRegisterDiscoverHandler(ipc_client, response) {
639
639
  * @param {any} error
640
640
  * @returns {boolean}
641
641
  */
642
- export function isKeyGenerationError(error) {
642
+ export function isSshKeyImportError(error) {
643
643
  try {
644
- const ret = wasm.isKeyGenerationError(addBorrowedObject(error));
644
+ const ret = wasm.isSshKeyImportError(addBorrowedObject(error));
645
645
  return ret !== 0;
646
646
  } finally {
647
647
  heap[stack_pointer++] = undefined;
@@ -665,9 +665,9 @@ export function isSshKeyExportError(error) {
665
665
  * @param {any} error
666
666
  * @returns {boolean}
667
667
  */
668
- export function isSshKeyImportError(error) {
668
+ export function isKeyGenerationError(error) {
669
669
  try {
670
- const ret = wasm.isSshKeyImportError(addBorrowedObject(error));
670
+ const ret = wasm.isKeyGenerationError(addBorrowedObject(error));
671
671
  return ret !== 0;
672
672
  } finally {
673
673
  heap[stack_pointer++] = undefined;
@@ -743,9 +743,9 @@ export function isTotpError(error) {
743
743
  * @param {any} error
744
744
  * @returns {boolean}
745
745
  */
746
- export function isEncryptError(error) {
746
+ export function isDecryptError(error) {
747
747
  try {
748
- const ret = wasm.isEncryptError(addBorrowedObject(error));
748
+ const ret = wasm.isDecryptError(addBorrowedObject(error));
749
749
  return ret !== 0;
750
750
  } finally {
751
751
  heap[stack_pointer++] = undefined;
@@ -756,9 +756,9 @@ export function isEncryptError(error) {
756
756
  * @param {any} error
757
757
  * @returns {boolean}
758
758
  */
759
- export function isDecryptError(error) {
759
+ export function isEncryptError(error) {
760
760
  try {
761
- const ret = wasm.isDecryptError(addBorrowedObject(error));
761
+ const ret = wasm.isEncryptError(addBorrowedObject(error));
762
762
  return ret !== 0;
763
763
  } finally {
764
764
  heap[stack_pointer++] = undefined;
@@ -808,9 +808,9 @@ export function isCreateCipherError(error) {
808
808
  * @param {any} error
809
809
  * @returns {boolean}
810
810
  */
811
- export function isEncryptFileError(error) {
811
+ export function isDecryptFileError(error) {
812
812
  try {
813
- const ret = wasm.isEncryptFileError(addBorrowedObject(error));
813
+ const ret = wasm.isDecryptFileError(addBorrowedObject(error));
814
814
  return ret !== 0;
815
815
  } finally {
816
816
  heap[stack_pointer++] = undefined;
@@ -821,9 +821,9 @@ export function isEncryptFileError(error) {
821
821
  * @param {any} error
822
822
  * @returns {boolean}
823
823
  */
824
- export function isDecryptFileError(error) {
824
+ export function isEncryptFileError(error) {
825
825
  try {
826
- const ret = wasm.isDecryptFileError(addBorrowedObject(error));
826
+ const ret = wasm.isEncryptFileError(addBorrowedObject(error));
827
827
  return ret !== 0;
828
828
  } finally {
829
829
  heap[stack_pointer++] = undefined;
@@ -882,10 +882,22 @@ export function isGetFolderError(error) {
882
882
  }
883
883
  }
884
884
 
885
- function wasm_bindgen__convert__closures_____invoke__h86320ba04bc5bce5(arg0, arg1, arg2) {
885
+ function wasm_bindgen__convert__closures_____invoke__h727bb28be87becbf(arg0, arg1, arg2) {
886
+ wasm.wasm_bindgen__convert__closures_____invoke__h727bb28be87becbf(
887
+ arg0,
888
+ arg1,
889
+ addHeapObject(arg2),
890
+ );
891
+ }
892
+
893
+ function wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2(arg0, arg1) {
894
+ wasm.wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2(arg0, arg1);
895
+ }
896
+
897
+ function wasm_bindgen__convert__closures_____invoke__h3d71357e6a8288f5(arg0, arg1, arg2) {
886
898
  try {
887
899
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
888
- wasm.wasm_bindgen__convert__closures_____invoke__h86320ba04bc5bce5(
900
+ wasm.wasm_bindgen__convert__closures_____invoke__h3d71357e6a8288f5(
889
901
  retptr,
890
902
  arg0,
891
903
  arg1,
@@ -901,18 +913,6 @@ function wasm_bindgen__convert__closures_____invoke__h86320ba04bc5bce5(arg0, arg
901
913
  }
902
914
  }
903
915
 
904
- function wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2(arg0, arg1) {
905
- wasm.wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2(arg0, arg1);
906
- }
907
-
908
- function wasm_bindgen__convert__closures_____invoke__ha3eecaeccbf508bc(arg0, arg1, arg2) {
909
- wasm.wasm_bindgen__convert__closures_____invoke__ha3eecaeccbf508bc(
910
- arg0,
911
- arg1,
912
- addHeapObject(arg2),
913
- );
914
- }
915
-
916
916
  function wasm_bindgen__convert__closures_____invoke__h0cb536241502fe83(arg0, arg1, arg2, arg3) {
917
917
  wasm.wasm_bindgen__convert__closures_____invoke__h0cb536241502fe83(
918
918
  arg0,
@@ -4681,7 +4681,7 @@ export function __wbg_call_e762c39fa8ea36bf() {
4681
4681
  }, arguments);
4682
4682
  }
4683
4683
 
4684
- export function __wbg_cipher_a65561393b2f1712(arg0) {
4684
+ export function __wbg_cipher_4adc4c6d44021f45(arg0) {
4685
4685
  const ret = getObject(arg0).cipher;
4686
4686
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4687
4687
  }
@@ -4774,7 +4774,7 @@ export function __wbg_fetch_f8ba0e29a9d6de0d(arg0, arg1) {
4774
4774
  return addHeapObject(ret);
4775
4775
  }
4776
4776
 
4777
- export function __wbg_folder_b5bfa014ae93cc74(arg0) {
4777
+ export function __wbg_folder_a133c250cfa20b2b(arg0) {
4778
4778
  const ret = getObject(arg0).folder;
4779
4779
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4780
4780
  }
@@ -4807,12 +4807,7 @@ export function __wbg_getTime_14776bfb48a1bff9(arg0) {
4807
4807
  return ret;
4808
4808
  }
4809
4809
 
4810
- export function __wbg_get_7bed016f185add81(arg0, arg1) {
4811
- const ret = getObject(arg0)[arg1 >>> 0];
4812
- return addHeapObject(ret);
4813
- }
4814
-
4815
- export function __wbg_get_a2736f97ced6b9de() {
4810
+ export function __wbg_get_1d8fc9cf35595596() {
4816
4811
  return handleError(function (arg0, arg1, arg2) {
4817
4812
  let deferred0_0;
4818
4813
  let deferred0_1;
@@ -4827,12 +4822,7 @@ export function __wbg_get_a2736f97ced6b9de() {
4827
4822
  }, arguments);
4828
4823
  }
4829
4824
 
4830
- export function __wbg_get_access_token_2e6cdf0799f495fb(arg0) {
4831
- const ret = getObject(arg0).get_access_token();
4832
- return addHeapObject(ret);
4833
- }
4834
-
4835
- export function __wbg_get_acd42db33be214a6() {
4825
+ export function __wbg_get_717e3ed5a180f3fe() {
4836
4826
  return handleError(function (arg0, arg1, arg2) {
4837
4827
  let deferred0_0;
4838
4828
  let deferred0_1;
@@ -4847,6 +4837,16 @@ export function __wbg_get_acd42db33be214a6() {
4847
4837
  }, arguments);
4848
4838
  }
4849
4839
 
4840
+ export function __wbg_get_7bed016f185add81(arg0, arg1) {
4841
+ const ret = getObject(arg0)[arg1 >>> 0];
4842
+ return addHeapObject(ret);
4843
+ }
4844
+
4845
+ export function __wbg_get_access_token_cd7c130d95407bfd(arg0) {
4846
+ const ret = getObject(arg0).get_access_token();
4847
+ return addHeapObject(ret);
4848
+ }
4849
+
4850
4850
  export function __wbg_get_efcb449f58ec27c2() {
4851
4851
  return handleError(function (arg0, arg1) {
4852
4852
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
@@ -5038,14 +5038,14 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
5038
5038
  return ret;
5039
5039
  }
5040
5040
 
5041
- export function __wbg_list_b084d117028f3ac0() {
5041
+ export function __wbg_list_1f6d2e19eed274e9() {
5042
5042
  return handleError(function (arg0) {
5043
5043
  const ret = getObject(arg0).list();
5044
5044
  return addHeapObject(ret);
5045
5045
  }, arguments);
5046
5046
  }
5047
5047
 
5048
- export function __wbg_list_c0ca3c5963412c9f() {
5048
+ export function __wbg_list_f68ed92d8fd6ffbf() {
5049
5049
  return handleError(function (arg0) {
5050
5050
  const ret = getObject(arg0).list();
5051
5051
  return addHeapObject(ret);
@@ -5289,7 +5289,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
5289
5289
  }, arguments);
5290
5290
  }
5291
5291
 
5292
- export function __wbg_remove_4d025537227a79eb() {
5292
+ export function __wbg_remove_b044f4b7ff2070b1() {
5293
5293
  return handleError(function (arg0, arg1, arg2) {
5294
5294
  let deferred0_0;
5295
5295
  let deferred0_1;
@@ -5304,7 +5304,7 @@ export function __wbg_remove_4d025537227a79eb() {
5304
5304
  }, arguments);
5305
5305
  }
5306
5306
 
5307
- export function __wbg_remove_c56d7d7308929d48() {
5307
+ export function __wbg_remove_ed3ff4f5ab500480() {
5308
5308
  return handleError(function (arg0, arg1, arg2) {
5309
5309
  let deferred0_0;
5310
5310
  let deferred0_1;
@@ -5354,7 +5354,7 @@ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
5354
5354
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5355
5355
  }
5356
5356
 
5357
- export function __wbg_set_633932dc157d971e() {
5357
+ export function __wbg_set_40e4d6ada6f06b58() {
5358
5358
  return handleError(function (arg0, arg1, arg2, arg3) {
5359
5359
  let deferred0_0;
5360
5360
  let deferred0_1;
@@ -5389,7 +5389,11 @@ export function __wbg_set_c2abbebe8b9ebee1() {
5389
5389
  }, arguments);
5390
5390
  }
5391
5391
 
5392
- export function __wbg_set_c7d0408f9557d445() {
5392
+ export function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
5393
+ getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
5394
+ }
5395
+
5396
+ export function __wbg_set_ef8b87e358b87125() {
5393
5397
  return handleError(function (arg0, arg1, arg2, arg3) {
5394
5398
  let deferred0_0;
5395
5399
  let deferred0_1;
@@ -5404,10 +5408,6 @@ export function __wbg_set_c7d0408f9557d445() {
5404
5408
  }, arguments);
5405
5409
  }
5406
5410
 
5407
- export function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
5408
- getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
5409
- }
5410
-
5411
5411
  export function __wbg_set_headers_6926da238cd32ee4(arg0, arg1) {
5412
5412
  getObject(arg0).headers = getObject(arg1);
5413
5413
  }
@@ -5577,8 +5577,8 @@ export function __wbindgen_cast_0f3a80f9c6c81c16(arg0, arg1) {
5577
5577
  const ret = makeMutClosure(
5578
5578
  arg0,
5579
5579
  arg1,
5580
- wasm.wasm_bindgen__closure__destroy__h0a76ff7104f80505,
5581
- wasm_bindgen__convert__closures_____invoke__ha3eecaeccbf508bc,
5580
+ wasm.wasm_bindgen__closure__destroy__h31d399e6af2fe814,
5581
+ wasm_bindgen__convert__closures_____invoke__h727bb28be87becbf,
5582
5582
  );
5583
5583
  return addHeapObject(ret);
5584
5584
  }
@@ -5609,7 +5609,7 @@ export function __wbindgen_cast_67d165bf11ca912a(arg0, arg1) {
5609
5609
  arg0,
5610
5610
  arg1,
5611
5611
  wasm.wasm_bindgen__closure__destroy__h591e0f2efd143068,
5612
- wasm_bindgen__convert__closures_____invoke__ha3eecaeccbf508bc,
5612
+ wasm_bindgen__convert__closures_____invoke__h727bb28be87becbf,
5613
5613
  );
5614
5614
  return addHeapObject(ret);
5615
5615
  }
@@ -5667,8 +5667,8 @@ export function __wbindgen_cast_e12aaa4ecde9c999(arg0, arg1) {
5667
5667
  const ret = makeMutClosure(
5668
5668
  arg0,
5669
5669
  arg1,
5670
- wasm.wasm_bindgen__closure__destroy__h0a76ff7104f80505,
5671
- wasm_bindgen__convert__closures_____invoke__h86320ba04bc5bce5,
5670
+ wasm.wasm_bindgen__closure__destroy__h31d399e6af2fe814,
5671
+ wasm_bindgen__convert__closures_____invoke__h3d71357e6a8288f5,
5672
5672
  );
5673
5673
  return addHeapObject(ret);
5674
5674
  }
Binary file
@@ -454,24 +454,24 @@ export const __wbg_get_outgoingmessage_destination: (a: number) => number;
454
454
  export const __wbg_registrationclient_free: (a: number, b: number) => void;
455
455
  export const __wbg_set_outgoingmessage_destination: (a: number, b: number) => void;
456
456
  export const __wbg_cryptoclient_free: (a: number, b: number) => void;
457
- export const wasm_bindgen__convert__closures_____invoke__h86320ba04bc5bce5: (
457
+ export const wasm_bindgen__convert__closures_____invoke__h727bb28be87becbf: (
458
458
  a: number,
459
459
  b: number,
460
460
  c: number,
461
- d: number,
462
461
  ) => void;
463
- export const wasm_bindgen__closure__destroy__h0a76ff7104f80505: (a: number, b: number) => void;
462
+ export const wasm_bindgen__closure__destroy__h31d399e6af2fe814: (a: number, b: number) => void;
463
+ export const wasm_bindgen__closure__destroy__h591e0f2efd143068: (a: number, b: number) => void;
464
464
  export const wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2: (
465
465
  a: number,
466
466
  b: number,
467
467
  ) => void;
468
468
  export const wasm_bindgen__closure__destroy__he41cbbdbe831f2ac: (a: number, b: number) => void;
469
- export const wasm_bindgen__convert__closures_____invoke__ha3eecaeccbf508bc: (
469
+ export const wasm_bindgen__convert__closures_____invoke__h3d71357e6a8288f5: (
470
470
  a: number,
471
471
  b: number,
472
472
  c: number,
473
+ d: number,
473
474
  ) => void;
474
- export const wasm_bindgen__closure__destroy__h591e0f2efd143068: (a: number, b: number) => void;
475
475
  export const wasm_bindgen__convert__closures_____invoke__h0cb536241502fe83: (
476
476
  a: number,
477
477
  b: number,