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

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
+ a004d825e51592bc2756cd54e2ebeef18a75e46a
@@ -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;
@@ -882,10 +882,6 @@ export function isGetFolderError(error) {
882
882
  }
883
883
  }
884
884
 
885
- function wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2(arg0, arg1) {
886
- wasm.wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2(arg0, arg1);
887
- }
888
-
889
885
  function wasm_bindgen__convert__closures_____invoke__h5dc58f913e716aff(arg0, arg1, arg2) {
890
886
  wasm.wasm_bindgen__convert__closures_____invoke__h5dc58f913e716aff(
891
887
  arg0,
@@ -913,6 +909,10 @@ function wasm_bindgen__convert__closures_____invoke__h280b016db3e219a2(arg0, arg
913
909
  }
914
910
  }
915
911
 
912
+ function wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2(arg0, arg1) {
913
+ wasm.wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2(arg0, arg1);
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_f2e574d68952d395(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_0d97489c28d80f2c(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_38a0d33f5d8fe3e6() {
4737
4732
  return handleError(function (arg0, arg1, arg2) {
4738
4733
  let deferred0_0;
4739
4734
  let deferred0_1;
@@ -4748,19 +4743,7 @@ 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();
4753
- return addHeapObject(ret);
4754
- }
4755
-
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);
4761
- }
4762
-
4763
- export function __wbg_get_f2b4178b803b7230() {
4746
+ export function __wbg_get_63331cddb3c81318() {
4764
4747
  return handleError(function (arg0, arg1, arg2) {
4765
4748
  let deferred0_0;
4766
4749
  let deferred0_1;
@@ -4775,6 +4758,23 @@ export function __wbg_get_f2b4178b803b7230() {
4775
4758
  }, arguments);
4776
4759
  }
4777
4760
 
4761
+ export function __wbg_get_7bed016f185add81(arg0, arg1) {
4762
+ const ret = getObject(arg0)[arg1 >>> 0];
4763
+ return addHeapObject(ret);
4764
+ }
4765
+
4766
+ export function __wbg_get_access_token_ff492ff9ec7db859(arg0) {
4767
+ const ret = getObject(arg0).get_access_token();
4768
+ return addHeapObject(ret);
4769
+ }
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_5785128899ac45b8() {
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_81ad0e6d7a86f793() {
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_177b181db8985dde() {
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_1b0b59ed6aa183ee() {
5229
5229
  return handleError(function (arg0, arg1, arg2) {
5230
5230
  let deferred0_0;
5231
5231
  let deferred0_1;
@@ -5271,7 +5271,7 @@ 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_1e170041843aba75() {
5275
5275
  return handleError(function (arg0, arg1, arg2, arg3) {
5276
5276
  let deferred0_0;
5277
5277
  let deferred0_1;
@@ -5286,16 +5286,7 @@ export function __wbg_set_11a079cace77951c() {
5286
5286
  }, arguments);
5287
5287
  }
5288
5288
 
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() {
5289
+ export function __wbg_set_20c8942e7d6fc8d9() {
5299
5290
  return handleError(function (arg0, arg1, arg2, arg3) {
5300
5291
  let deferred0_0;
5301
5292
  let deferred0_1;
@@ -5310,6 +5301,15 @@ export function __wbg_set_95709825d99cadb3() {
5310
5301
  }, arguments);
5311
5302
  }
5312
5303
 
5304
+ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
5305
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5306
+ }
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
@@ -450,17 +450,12 @@ 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__h4eff94a44eff58c2: (
454
- a: number,
455
- b: number,
456
- ) => void;
457
- export const wasm_bindgen__closure__destroy__he41cbbdbe831f2ac: (a: number, b: number) => void;
458
- export const wasm_bindgen__closure__destroy__h591e0f2efd143068: (a: number, b: number) => void;
459
453
  export const wasm_bindgen__convert__closures_____invoke__h5dc58f913e716aff: (
460
454
  a: number,
461
455
  b: number,
462
456
  c: number,
463
457
  ) => void;
458
+ export const wasm_bindgen__closure__destroy__h591e0f2efd143068: (a: number, b: number) => void;
464
459
  export const wasm_bindgen__convert__closures_____invoke__h280b016db3e219a2: (
465
460
  a: number,
466
461
  b: number,
@@ -468,6 +463,11 @@ export const wasm_bindgen__convert__closures_____invoke__h280b016db3e219a2: (
468
463
  d: number,
469
464
  ) => void;
470
465
  export const wasm_bindgen__closure__destroy__h26a46d7b4587c5e7: (a: number, b: number) => void;
466
+ export const wasm_bindgen__convert__closures_____invoke__h4eff94a44eff58c2: (
467
+ a: number,
468
+ b: number,
469
+ ) => 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,