@bitwarden/sdk-internal 0.2.0-main.421 → 0.2.0-main.423

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
- 26df6719d3112171566d89f357fe4ce6e436ab49
1
+ 30879c149944db30a5e19c96cd15f9122e191139
@@ -792,6 +792,33 @@ export type EncString = Tagged<string, "EncString">;
792
792
 
793
793
  export type SignedPublicKey = Tagged<string, "SignedPublicKey">;
794
794
 
795
+ /**
796
+ * A set of keys where a given `DownstreamKey` is protected by an encrypted public/private
797
+ * key-pair. The `DownstreamKey` is used to encrypt/decrypt data, while the public/private key-pair
798
+ * is used to rotate the `DownstreamKey`.
799
+ *
800
+ * The `PrivateKey` is protected by an `UpstreamKey`, such as a `DeviceKey`, or `PrfKey`,
801
+ * and the `PublicKey` is protected by the `DownstreamKey`. This setup allows:
802
+ *
803
+ * - Access to `DownstreamKey` by knowing the `UpstreamKey`
804
+ * - Rotation to a `NewDownstreamKey` by knowing the current `DownstreamKey`, without needing
805
+ * access to the `UpstreamKey`
806
+ */
807
+ export interface RotateableKeySet {
808
+ /**
809
+ * `DownstreamKey` protected by encapsulation key
810
+ */
811
+ encapsulatedDownstreamKey: UnsignedSharedKey;
812
+ /**
813
+ * Encapsulation key protected by `DownstreamKey`
814
+ */
815
+ encryptedEncapsulationKey: EncString;
816
+ /**
817
+ * Decapsulation key protected by `UpstreamKey`
818
+ */
819
+ encryptedDecapsulationKey: EncString;
820
+ }
821
+
795
822
  /**
796
823
  * Key Derivation Function for Bitwarden Account
797
824
  *
@@ -1281,7 +1308,7 @@ export interface SecureNoteView {
1281
1308
 
1282
1309
  export interface GetCipherError extends Error {
1283
1310
  name: "GetCipherError";
1284
- variant: "ItemNotFound" | "Crypto" | "RepositoryError";
1311
+ variant: "ItemNotFound" | "Crypto" | "Repository";
1285
1312
  }
1286
1313
 
1287
1314
  export function isGetCipherError(error: any): error is GetCipherError;
@@ -886,14 +886,6 @@ function wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2(arg0, arg
886
886
  wasm.wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2(arg0, arg1);
887
887
  }
888
888
 
889
- function wasm_bindgen__convert__closures_____invoke__h5dc58f913e716aff(arg0, arg1, arg2) {
890
- wasm.wasm_bindgen__convert__closures_____invoke__h5dc58f913e716aff(
891
- arg0,
892
- arg1,
893
- addHeapObject(arg2),
894
- );
895
- }
896
-
897
889
  function wasm_bindgen__convert__closures_____invoke__h280b016db3e219a2(arg0, arg1, arg2) {
898
890
  try {
899
891
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -913,6 +905,14 @@ function wasm_bindgen__convert__closures_____invoke__h280b016db3e219a2(arg0, arg
913
905
  }
914
906
  }
915
907
 
908
+ function wasm_bindgen__convert__closures_____invoke__h5dc58f913e716aff(arg0, arg1, arg2) {
909
+ wasm.wasm_bindgen__convert__closures_____invoke__h5dc58f913e716aff(
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,
@@ -4602,7 +4602,7 @@ export function __wbg_call_e762c39fa8ea36bf() {
4602
4602
  }, arguments);
4603
4603
  }
4604
4604
 
4605
- export function __wbg_cipher_a8e5bca3fa535748(arg0) {
4605
+ export function __wbg_cipher_b09d3032d5d7f759(arg0) {
4606
4606
  const ret = getObject(arg0).cipher;
4607
4607
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4608
4608
  }
@@ -4695,7 +4695,7 @@ export function __wbg_fetch_f8ba0e29a9d6de0d(arg0, arg1) {
4695
4695
  return addHeapObject(ret);
4696
4696
  }
4697
4697
 
4698
- export function __wbg_folder_0d17faa11eda84be(arg0) {
4698
+ export function __wbg_folder_d4ae4d5ab92ab416(arg0) {
4699
4699
  const ret = getObject(arg0).folder;
4700
4700
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4701
4701
  }
@@ -4728,12 +4728,7 @@ export function __wbg_getTime_14776bfb48a1bff9(arg0) {
4728
4728
  return ret;
4729
4729
  }
4730
4730
 
4731
- export function __wbg_get_7bed016f185add81(arg0, arg1) {
4732
- const ret = getObject(arg0)[arg1 >>> 0];
4733
- return addHeapObject(ret);
4734
- }
4735
-
4736
- export function __wbg_get_906612b83779a7a5() {
4731
+ export function __wbg_get_6432ae0367848e1d() {
4737
4732
  return handleError(function (arg0, arg1, arg2) {
4738
4733
  let deferred0_0;
4739
4734
  let deferred0_1;
@@ -4748,19 +4743,17 @@ export function __wbg_get_906612b83779a7a5() {
4748
4743
  }, arguments);
4749
4744
  }
4750
4745
 
4751
- export function __wbg_get_access_token_3d47691e30d95b50(arg0) {
4752
- const ret = getObject(arg0).get_access_token();
4746
+ export function __wbg_get_7bed016f185add81(arg0, arg1) {
4747
+ const ret = getObject(arg0)[arg1 >>> 0];
4753
4748
  return addHeapObject(ret);
4754
4749
  }
4755
4750
 
4756
- export function __wbg_get_efcb449f58ec27c2() {
4757
- return handleError(function (arg0, arg1) {
4758
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
4759
- return addHeapObject(ret);
4760
- }, arguments);
4751
+ export function __wbg_get_access_token_e189464f249968d8(arg0) {
4752
+ const ret = getObject(arg0).get_access_token();
4753
+ return addHeapObject(ret);
4761
4754
  }
4762
4755
 
4763
- export function __wbg_get_f2b4178b803b7230() {
4756
+ export function __wbg_get_bb738be5940cc255() {
4764
4757
  return handleError(function (arg0, arg1, arg2) {
4765
4758
  let deferred0_0;
4766
4759
  let deferred0_1;
@@ -4775,6 +4768,13 @@ export function __wbg_get_f2b4178b803b7230() {
4775
4768
  }, arguments);
4776
4769
  }
4777
4770
 
4771
+ export function __wbg_get_efcb449f58ec27c2() {
4772
+ return handleError(function (arg0, arg1) {
4773
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
4774
+ return addHeapObject(ret);
4775
+ }, arguments);
4776
+ }
4777
+
4778
4778
  export function __wbg_get_with_ref_key_1dc361bd10053bfe(arg0, arg1) {
4779
4779
  const ret = getObject(arg0)[getObject(arg1)];
4780
4780
  return addHeapObject(ret);
@@ -4959,14 +4959,14 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
4959
4959
  return ret;
4960
4960
  }
4961
4961
 
4962
- export function __wbg_list_1032c4807ee9c2ce() {
4962
+ export function __wbg_list_86e77d87e879842c() {
4963
4963
  return handleError(function (arg0) {
4964
4964
  const ret = getObject(arg0).list();
4965
4965
  return addHeapObject(ret);
4966
4966
  }, arguments);
4967
4967
  }
4968
4968
 
4969
- export function __wbg_list_a655c254b723e34b() {
4969
+ export function __wbg_list_9f71b39770106e99() {
4970
4970
  return handleError(function (arg0) {
4971
4971
  const ret = getObject(arg0).list();
4972
4972
  return addHeapObject(ret);
@@ -5210,7 +5210,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
5210
5210
  }, arguments);
5211
5211
  }
5212
5212
 
5213
- export function __wbg_remove_4bd5c377165db91f() {
5213
+ export function __wbg_remove_4a78a55023f6d60d() {
5214
5214
  return handleError(function (arg0, arg1, arg2) {
5215
5215
  let deferred0_0;
5216
5216
  let deferred0_1;
@@ -5225,7 +5225,7 @@ export function __wbg_remove_4bd5c377165db91f() {
5225
5225
  }, arguments);
5226
5226
  }
5227
5227
 
5228
- export function __wbg_remove_70f6b26ca7135eb7() {
5228
+ export function __wbg_remove_dd9c6cc46b495e5a() {
5229
5229
  return handleError(function (arg0, arg1, arg2) {
5230
5230
  let deferred0_0;
5231
5231
  let deferred0_1;
@@ -5271,7 +5271,11 @@ export function __wbg_setTimeout_ca12ead8b48245e2(arg0, arg1) {
5271
5271
  return addHeapObject(ret);
5272
5272
  }
5273
5273
 
5274
- export function __wbg_set_11a079cace77951c() {
5274
+ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
5275
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5276
+ }
5277
+
5278
+ export function __wbg_set_4524c602a04b7d94() {
5275
5279
  return handleError(function (arg0, arg1, arg2, arg3) {
5276
5280
  let deferred0_0;
5277
5281
  let deferred0_1;
@@ -5286,16 +5290,7 @@ export function __wbg_set_11a079cace77951c() {
5286
5290
  }, arguments);
5287
5291
  }
5288
5292
 
5289
- export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
5290
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5291
- }
5292
-
5293
- export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
5294
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5295
- return addHeapObject(ret);
5296
- }
5297
-
5298
- export function __wbg_set_95709825d99cadb3() {
5293
+ export function __wbg_set_82157cc232dc223e() {
5299
5294
  return handleError(function (arg0, arg1, arg2, arg3) {
5300
5295
  let deferred0_0;
5301
5296
  let deferred0_1;
@@ -5310,6 +5305,11 @@ export function __wbg_set_95709825d99cadb3() {
5310
5305
  }, arguments);
5311
5306
  }
5312
5307
 
5308
+ export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
5309
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5310
+ return addHeapObject(ret);
5311
+ }
5312
+
5313
5313
  export function __wbg_set_body_3c365989753d61f4(arg0, arg1) {
5314
5314
  getObject(arg0).body = getObject(arg1);
5315
5315
  }
Binary file
@@ -454,20 +454,20 @@ export const wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2: (
454
454
  a: number,
455
455
  b: number,
456
456
  ) => void;
457
- export const wasm_bindgen__closure__destroy__he41cbbdbe831f2ac: (a: number, b: number) => void;
458
457
  export const wasm_bindgen__closure__destroy__h591e0f2efd143068: (a: number, b: number) => void;
459
- export const wasm_bindgen__convert__closures_____invoke__h5dc58f913e716aff: (
458
+ export const wasm_bindgen__convert__closures_____invoke__h280b016db3e219a2: (
460
459
  a: number,
461
460
  b: number,
462
461
  c: number,
462
+ d: number,
463
463
  ) => void;
464
- export const wasm_bindgen__convert__closures_____invoke__h280b016db3e219a2: (
464
+ export const wasm_bindgen__closure__destroy__h26a46d7b4587c5e7: (a: number, b: number) => void;
465
+ export const wasm_bindgen__closure__destroy__he41cbbdbe831f2ac: (a: number, b: number) => void;
466
+ export const wasm_bindgen__convert__closures_____invoke__h5dc58f913e716aff: (
465
467
  a: number,
466
468
  b: number,
467
469
  c: number,
468
- d: number,
469
470
  ) => void;
470
- export const wasm_bindgen__closure__destroy__h26a46d7b4587c5e7: (a: number, b: number) => void;
471
471
  export const wasm_bindgen__convert__closures_____invoke__h0cb536241502fe83: (
472
472
  a: number,
473
473
  b: number,