@bitwarden/commercial-sdk-internal 0.2.0-main.360 → 0.2.0-main.362

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.
@@ -631,11 +631,6 @@ export type UserId = Tagged<Uuid, "UserId">;
631
631
  */
632
632
  export type OrganizationId = Tagged<Uuid, "OrganizationId">;
633
633
 
634
- /**
635
- * A non-generic wrapper around `bitwarden-crypto`\'s `PasswordProtectedKeyEnvelope`.
636
- */
637
- export type PasswordProtectedKeyEnvelope = Tagged<string, "PasswordProtectedKeyEnvelope">;
638
-
639
634
  export interface MasterPasswordError extends Error {
640
635
  name: "MasterPasswordError";
641
636
  variant:
@@ -766,6 +761,10 @@ export type EncString = Tagged<string, "EncString">;
766
761
 
767
762
  export type SignedPublicKey = Tagged<string, "SignedPublicKey">;
768
763
 
764
+ export type PasswordProtectedKeyEnvelope = Tagged<string, "PasswordProtectedKeyEnvelope">;
765
+
766
+ export type DataEnvelope = Tagged<string, "DataEnvelope">;
767
+
769
768
  /**
770
769
  * The type of key / signature scheme used for signing and verifying.
771
770
  */
@@ -793,6 +792,7 @@ export interface CryptoError extends Error {
793
792
  | "MissingKey"
794
793
  | "MissingField"
795
794
  | "MissingKeyId"
795
+ | "KeyOperationNotSupported"
796
796
  | "ReadOnlyKeyStore"
797
797
  | "InsufficientKdfParameters"
798
798
  | "EncString"
@@ -1917,10 +1917,7 @@ export class CryptoClient {
1917
1917
  * Decrypts a `PasswordProtectedKeyEnvelope`, returning the user key, if successful.
1918
1918
  * This is a stop-gap solution, until initialization of the SDK is used.
1919
1919
  */
1920
- unseal_password_protected_key_envelope(
1921
- pin: string,
1922
- envelope: PasswordProtectedKeyEnvelope,
1923
- ): Uint8Array;
1920
+ unseal_password_protected_key_envelope(pin: string, envelope: string): Uint8Array;
1924
1921
  }
1925
1922
  export class ExporterClient {
1926
1923
  private constructor();
@@ -2092,7 +2092,7 @@ class CryptoClient {
2092
2092
  * Decrypts a `PasswordProtectedKeyEnvelope`, returning the user key, if successful.
2093
2093
  * This is a stop-gap solution, until initialization of the SDK is used.
2094
2094
  * @param {string} pin
2095
- * @param {PasswordProtectedKeyEnvelope} envelope
2095
+ * @param {string} envelope
2096
2096
  * @returns {Uint8Array}
2097
2097
  */
2098
2098
  unseal_password_protected_key_envelope(pin, envelope) {
@@ -2100,12 +2100,15 @@ class CryptoClient {
2100
2100
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2101
2101
  const ptr0 = passStringToWasm0(pin, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2102
2102
  const len0 = WASM_VECTOR_LEN;
2103
+ const ptr1 = passStringToWasm0(envelope, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2104
+ const len1 = WASM_VECTOR_LEN;
2103
2105
  wasm.cryptoclient_unseal_password_protected_key_envelope(
2104
2106
  retptr,
2105
2107
  this.__wbg_ptr,
2106
2108
  ptr0,
2107
2109
  len0,
2108
- addHeapObject(envelope),
2110
+ ptr1,
2111
+ len1,
2109
2112
  );
2110
2113
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2111
2114
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
@@ -2114,9 +2117,9 @@ class CryptoClient {
2114
2117
  if (r3) {
2115
2118
  throw takeObject(r2);
2116
2119
  }
2117
- var v2 = getArrayU8FromWasm0(r0, r1).slice();
2120
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
2118
2121
  wasm.__wbindgen_free(r0, r1 * 1, 1);
2119
- return v2;
2122
+ return v3;
2120
2123
  } finally {
2121
2124
  wasm.__wbindgen_add_to_stack_pointer(16);
2122
2125
  }
@@ -4194,7 +4197,7 @@ module.exports.__wbg_call_7cccdd69e0791ae2 = function () {
4194
4197
  }, arguments);
4195
4198
  };
4196
4199
 
4197
- module.exports.__wbg_cipher_6677232b251d927c = function (arg0) {
4200
+ module.exports.__wbg_cipher_7efc0c02e4cb8f94 = function (arg0) {
4198
4201
  const ret = getObject(arg0).cipher;
4199
4202
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4200
4203
  };
@@ -4274,7 +4277,7 @@ module.exports.__wbg_fetch_509096533071c657 = function (arg0, arg1) {
4274
4277
  return addHeapObject(ret);
4275
4278
  };
4276
4279
 
4277
- module.exports.__wbg_folder_f2247810fcb27b63 = function (arg0) {
4280
+ module.exports.__wbg_folder_975aa53ef392add1 = function (arg0) {
4278
4281
  const ret = getObject(arg0).folder;
4279
4282
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4280
4283
  };
@@ -4296,7 +4299,7 @@ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
4296
4299
  return ret;
4297
4300
  };
4298
4301
 
4299
- module.exports.__wbg_get_2dd153cbc4e923c1 = function () {
4302
+ module.exports.__wbg_get_36c752bd8ed2d344 = function () {
4300
4303
  return handleError(function (arg0, arg1, arg2) {
4301
4304
  let deferred0_0;
4302
4305
  let deferred0_1;
@@ -4311,19 +4314,7 @@ module.exports.__wbg_get_2dd153cbc4e923c1 = function () {
4311
4314
  }, arguments);
4312
4315
  };
4313
4316
 
4314
- module.exports.__wbg_get_67b2ba62fc30de12 = function () {
4315
- return handleError(function (arg0, arg1) {
4316
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
4317
- return addHeapObject(ret);
4318
- }, arguments);
4319
- };
4320
-
4321
- module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
4322
- const ret = getObject(arg0)[arg1 >>> 0];
4323
- return addHeapObject(ret);
4324
- };
4325
-
4326
- module.exports.__wbg_get_f25f7cf564b18916 = function () {
4317
+ module.exports.__wbg_get_47e036b69fc7c20b = function () {
4327
4318
  return handleError(function (arg0, arg1, arg2) {
4328
4319
  let deferred0_0;
4329
4320
  let deferred0_1;
@@ -4338,7 +4329,19 @@ module.exports.__wbg_get_f25f7cf564b18916 = function () {
4338
4329
  }, arguments);
4339
4330
  };
4340
4331
 
4341
- module.exports.__wbg_getaccesstoken_3dd64fe006c52b5e = function (arg0) {
4332
+ module.exports.__wbg_get_67b2ba62fc30de12 = function () {
4333
+ return handleError(function (arg0, arg1) {
4334
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
4335
+ return addHeapObject(ret);
4336
+ }, arguments);
4337
+ };
4338
+
4339
+ module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
4340
+ const ret = getObject(arg0)[arg1 >>> 0];
4341
+ return addHeapObject(ret);
4342
+ };
4343
+
4344
+ module.exports.__wbg_getaccesstoken_8a7c8bc785845d64 = function (arg0) {
4342
4345
  const ret = getObject(arg0).get_access_token();
4343
4346
  return addHeapObject(ret);
4344
4347
  };
@@ -4523,14 +4526,14 @@ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
4523
4526
  return ret;
4524
4527
  };
4525
4528
 
4526
- module.exports.__wbg_list_54fbb49308e0c5ea = function () {
4529
+ module.exports.__wbg_list_129b1a2b0f3527a9 = function () {
4527
4530
  return handleError(function (arg0) {
4528
4531
  const ret = getObject(arg0).list();
4529
4532
  return addHeapObject(ret);
4530
4533
  }, arguments);
4531
4534
  };
4532
4535
 
4533
- module.exports.__wbg_list_ed5ce00c913de60a = function () {
4536
+ module.exports.__wbg_list_92d3e92c1beb0ada = function () {
4534
4537
  return handleError(function (arg0) {
4535
4538
  const ret = getObject(arg0).list();
4536
4539
  return addHeapObject(ret);
@@ -4731,7 +4734,7 @@ module.exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
4731
4734
  }, arguments);
4732
4735
  };
4733
4736
 
4734
- module.exports.__wbg_remove_128adba3facf371f = function () {
4737
+ module.exports.__wbg_remove_dec4917c5ded06e6 = function () {
4735
4738
  return handleError(function (arg0, arg1, arg2) {
4736
4739
  let deferred0_0;
4737
4740
  let deferred0_1;
@@ -4746,7 +4749,7 @@ module.exports.__wbg_remove_128adba3facf371f = function () {
4746
4749
  }, arguments);
4747
4750
  };
4748
4751
 
4749
- module.exports.__wbg_remove_cf59e3a512377550 = function () {
4752
+ module.exports.__wbg_remove_e9a80a96ae97842b = function () {
4750
4753
  return handleError(function (arg0, arg1, arg2) {
4751
4754
  let deferred0_0;
4752
4755
  let deferred0_1;
@@ -4800,7 +4803,7 @@ module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
4800
4803
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
4801
4804
  };
4802
4805
 
4803
- module.exports.__wbg_set_527001d3cec61b77 = function () {
4806
+ module.exports.__wbg_set_48c1246240530f3b = function () {
4804
4807
  return handleError(function (arg0, arg1, arg2, arg3) {
4805
4808
  let deferred0_0;
4806
4809
  let deferred0_1;
@@ -4824,7 +4827,7 @@ module.exports.__wbg_set_8fc6bf8a5b1071d1 = function (arg0, arg1, arg2) {
4824
4827
  return addHeapObject(ret);
4825
4828
  };
4826
4829
 
4827
- module.exports.__wbg_set_badf4262aabc897d = function () {
4830
+ module.exports.__wbg_set_d2ea454a9e10218d = function () {
4828
4831
  return handleError(function (arg0, arg1, arg2, arg3) {
4829
4832
  let deferred0_0;
4830
4833
  let deferred0_1;
@@ -5059,18 +5062,18 @@ module.exports.__wbindgen_closure_wrapper195 = function (arg0, arg1, arg2) {
5059
5062
  return addHeapObject(ret);
5060
5063
  };
5061
5064
 
5062
- module.exports.__wbindgen_closure_wrapper3946 = function (arg0, arg1, arg2) {
5063
- const ret = makeMutClosure(arg0, arg1, 299, __wbg_adapter_60);
5065
+ module.exports.__wbindgen_closure_wrapper3935 = function (arg0, arg1, arg2) {
5066
+ const ret = makeMutClosure(arg0, arg1, 301, __wbg_adapter_60);
5064
5067
  return addHeapObject(ret);
5065
5068
  };
5066
5069
 
5067
- module.exports.__wbindgen_closure_wrapper6420 = function (arg0, arg1, arg2) {
5068
- const ret = makeMutClosure(arg0, arg1, 325, __wbg_adapter_60);
5070
+ module.exports.__wbindgen_closure_wrapper6419 = function (arg0, arg1, arg2) {
5071
+ const ret = makeMutClosure(arg0, arg1, 327, __wbg_adapter_60);
5069
5072
  return addHeapObject(ret);
5070
5073
  };
5071
5074
 
5072
- module.exports.__wbindgen_closure_wrapper6800 = function (arg0, arg1, arg2) {
5073
- const ret = makeMutClosure(arg0, arg1, 348, __wbg_adapter_57);
5075
+ module.exports.__wbindgen_closure_wrapper6799 = function (arg0, arg1, arg2) {
5076
+ const ret = makeMutClosure(arg0, arg1, 350, __wbg_adapter_57);
5074
5077
  return addHeapObject(ret);
5075
5078
  };
5076
5079
 
@@ -213,6 +213,7 @@ export const cryptoclient_unseal_password_protected_key_envelope: (
213
213
  c: number,
214
214
  d: number,
215
215
  e: number,
216
+ f: number,
216
217
  ) => void;
217
218
  export const isMasterPasswordError: (a: number) => number;
218
219
  export const isDeriveKeyConnectorError: (a: number) => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitwarden/commercial-sdk-internal",
3
- "version": "0.2.0-main.360",
3
+ "version": "0.2.0-main.362",
4
4
  "license": "BITWARDEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT",
5
5
  "repository": {
6
6
  "type": "git",