@bitwarden/commercial-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.
@@ -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;
@@ -4681,7 +4681,7 @@ export function __wbg_call_e762c39fa8ea36bf() {
4681
4681
  }, arguments);
4682
4682
  }
4683
4683
 
4684
- export function __wbg_cipher_a8e5bca3fa535748(arg0) {
4684
+ export function __wbg_cipher_b09d3032d5d7f759(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_0d17faa11eda84be(arg0) {
4777
+ export function __wbg_folder_d4ae4d5ab92ab416(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_906612b83779a7a5() {
4810
+ export function __wbg_get_6432ae0367848e1d() {
4816
4811
  return handleError(function (arg0, arg1, arg2) {
4817
4812
  let deferred0_0;
4818
4813
  let deferred0_1;
@@ -4827,19 +4822,17 @@ export function __wbg_get_906612b83779a7a5() {
4827
4822
  }, arguments);
4828
4823
  }
4829
4824
 
4830
- export function __wbg_get_access_token_3d47691e30d95b50(arg0) {
4831
- const ret = getObject(arg0).get_access_token();
4825
+ export function __wbg_get_7bed016f185add81(arg0, arg1) {
4826
+ const ret = getObject(arg0)[arg1 >>> 0];
4832
4827
  return addHeapObject(ret);
4833
4828
  }
4834
4829
 
4835
- export function __wbg_get_efcb449f58ec27c2() {
4836
- return handleError(function (arg0, arg1) {
4837
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
4838
- return addHeapObject(ret);
4839
- }, arguments);
4830
+ export function __wbg_get_access_token_e189464f249968d8(arg0) {
4831
+ const ret = getObject(arg0).get_access_token();
4832
+ return addHeapObject(ret);
4840
4833
  }
4841
4834
 
4842
- export function __wbg_get_f2b4178b803b7230() {
4835
+ export function __wbg_get_bb738be5940cc255() {
4843
4836
  return handleError(function (arg0, arg1, arg2) {
4844
4837
  let deferred0_0;
4845
4838
  let deferred0_1;
@@ -4854,6 +4847,13 @@ export function __wbg_get_f2b4178b803b7230() {
4854
4847
  }, arguments);
4855
4848
  }
4856
4849
 
4850
+ export function __wbg_get_efcb449f58ec27c2() {
4851
+ return handleError(function (arg0, arg1) {
4852
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
4853
+ return addHeapObject(ret);
4854
+ }, arguments);
4855
+ }
4856
+
4857
4857
  export function __wbg_get_with_ref_key_1dc361bd10053bfe(arg0, arg1) {
4858
4858
  const ret = getObject(arg0)[getObject(arg1)];
4859
4859
  return addHeapObject(ret);
@@ -5038,14 +5038,14 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
5038
5038
  return ret;
5039
5039
  }
5040
5040
 
5041
- export function __wbg_list_1032c4807ee9c2ce() {
5041
+ export function __wbg_list_86e77d87e879842c() {
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_a655c254b723e34b() {
5048
+ export function __wbg_list_9f71b39770106e99() {
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_4bd5c377165db91f() {
5292
+ export function __wbg_remove_4a78a55023f6d60d() {
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_4bd5c377165db91f() {
5304
5304
  }, arguments);
5305
5305
  }
5306
5306
 
5307
- export function __wbg_remove_70f6b26ca7135eb7() {
5307
+ export function __wbg_remove_dd9c6cc46b495e5a() {
5308
5308
  return handleError(function (arg0, arg1, arg2) {
5309
5309
  let deferred0_0;
5310
5310
  let deferred0_1;
@@ -5350,7 +5350,11 @@ export function __wbg_setTimeout_ca12ead8b48245e2(arg0, arg1) {
5350
5350
  return addHeapObject(ret);
5351
5351
  }
5352
5352
 
5353
- export function __wbg_set_11a079cace77951c() {
5353
+ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
5354
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5355
+ }
5356
+
5357
+ export function __wbg_set_4524c602a04b7d94() {
5354
5358
  return handleError(function (arg0, arg1, arg2, arg3) {
5355
5359
  let deferred0_0;
5356
5360
  let deferred0_1;
@@ -5365,16 +5369,7 @@ export function __wbg_set_11a079cace77951c() {
5365
5369
  }, arguments);
5366
5370
  }
5367
5371
 
5368
- export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
5369
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5370
- }
5371
-
5372
- export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
5373
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5374
- return addHeapObject(ret);
5375
- }
5376
-
5377
- export function __wbg_set_95709825d99cadb3() {
5372
+ export function __wbg_set_82157cc232dc223e() {
5378
5373
  return handleError(function (arg0, arg1, arg2, arg3) {
5379
5374
  let deferred0_0;
5380
5375
  let deferred0_1;
@@ -5389,6 +5384,11 @@ export function __wbg_set_95709825d99cadb3() {
5389
5384
  }, arguments);
5390
5385
  }
5391
5386
 
5387
+ export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
5388
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5389
+ return addHeapObject(ret);
5390
+ }
5391
+
5392
5392
  export function __wbg_set_body_3c365989753d61f4(arg0, arg1) {
5393
5393
  getObject(arg0).body = getObject(arg1);
5394
5394
  }
Binary file