@bitwarden/sdk-internal 0.2.0-main.526 → 0.2.0-main.527

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.
@@ -2441,6 +2441,13 @@ export class CiphersClient {
2441
2441
  collection_ids: CollectionId[],
2442
2442
  ): Promise<Cipher[]>;
2443
2443
  decrypt_list(ciphers: Cipher[]): CipherListView[];
2444
+ /**
2445
+ * Encrypt a list of cipher views.
2446
+ *
2447
+ * This method attempts to encrypt all ciphers in the list. If any cipher
2448
+ * fails to encrypt, the entire operation fails and an error is returned.
2449
+ */
2450
+ encrypt_list(cipher_views: CipherView[]): EncryptionContext[];
2444
2451
  move_to_organization(cipher_view: CipherView, organization_id: OrganizationId): CipherView;
2445
2452
  /**
2446
2453
  * Temporary method used to re-encrypt FIDO2 credentials for a cipher view.
@@ -1577,6 +1577,34 @@ class CiphersClient {
1577
1577
  wasm.__wbindgen_add_to_stack_pointer(16);
1578
1578
  }
1579
1579
  }
1580
+ /**
1581
+ * Encrypt a list of cipher views.
1582
+ *
1583
+ * This method attempts to encrypt all ciphers in the list. If any cipher
1584
+ * fails to encrypt, the entire operation fails and an error is returned.
1585
+ * @param {CipherView[]} cipher_views
1586
+ * @returns {EncryptionContext[]}
1587
+ */
1588
+ encrypt_list(cipher_views) {
1589
+ try {
1590
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1591
+ const ptr0 = passArrayJsValueToWasm0(cipher_views, wasm.__wbindgen_malloc);
1592
+ const len0 = WASM_VECTOR_LEN;
1593
+ wasm.ciphersclient_encrypt_list(retptr, this.__wbg_ptr, ptr0, len0);
1594
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1595
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1596
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1597
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1598
+ if (r3) {
1599
+ throw takeObject(r2);
1600
+ }
1601
+ var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
1602
+ wasm.__wbindgen_free(r0, r1 * 4, 4);
1603
+ return v2;
1604
+ } finally {
1605
+ wasm.__wbindgen_add_to_stack_pointer(16);
1606
+ }
1607
+ }
1580
1608
  /**
1581
1609
  * @param {CipherView} cipher_view
1582
1610
  * @param {OrganizationId} organization_id
@@ -4986,7 +5014,7 @@ exports.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (
4986
5014
  return addHeapObject(ret);
4987
5015
  }, arguments) };
4988
5016
 
4989
- exports.__wbg_cipher_24c585a92e29aeb0 = function(arg0) {
5017
+ exports.__wbg_cipher_e94b41946da95619 = function(arg0) {
4990
5018
  const ret = getObject(arg0).cipher;
4991
5019
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4992
5020
  };
@@ -5073,7 +5101,7 @@ exports.__wbg_fetch_f8ba0e29a9d6de0d = function(arg0, arg1) {
5073
5101
  return addHeapObject(ret);
5074
5102
  };
5075
5103
 
5076
- exports.__wbg_folder_718a9489c24c07e1 = function(arg0) {
5104
+ exports.__wbg_folder_7cc716d9bb265b1f = function(arg0) {
5077
5105
  const ret = getObject(arg0).folder;
5078
5106
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
5079
5107
  };
@@ -5105,7 +5133,7 @@ exports.__wbg_getTime_14776bfb48a1bff9 = function(arg0) {
5105
5133
  return ret;
5106
5134
  };
5107
5135
 
5108
- exports.__wbg_get_0b8fdf26487baa48 = function() { return handleError(function (arg0, arg1, arg2) {
5136
+ exports.__wbg_get_0b30250d94987600 = function() { return handleError(function (arg0, arg1, arg2) {
5109
5137
  let deferred0_0;
5110
5138
  let deferred0_1;
5111
5139
  try {
@@ -5118,7 +5146,12 @@ exports.__wbg_get_0b8fdf26487baa48 = function() { return handleError(function (a
5118
5146
  }
5119
5147
  }, arguments) };
5120
5148
 
5121
- exports.__wbg_get_772dc118366a750c = function() { return handleError(function (arg0, arg1, arg2) {
5149
+ exports.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
5150
+ const ret = getObject(arg0)[arg1 >>> 0];
5151
+ return addHeapObject(ret);
5152
+ };
5153
+
5154
+ exports.__wbg_get_9afb6f1e4582c19d = function() { return handleError(function (arg0, arg1, arg2) {
5122
5155
  let deferred0_0;
5123
5156
  let deferred0_1;
5124
5157
  try {
@@ -5131,12 +5164,7 @@ exports.__wbg_get_772dc118366a750c = function() { return handleError(function (a
5131
5164
  }
5132
5165
  }, arguments) };
5133
5166
 
5134
- exports.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
5135
- const ret = getObject(arg0)[arg1 >>> 0];
5136
- return addHeapObject(ret);
5137
- };
5138
-
5139
- exports.__wbg_get_access_token_ed8665f4feda38dd = function(arg0) {
5167
+ exports.__wbg_get_access_token_25fc3c7ed0d95a5f = function(arg0) {
5140
5168
  const ret = getObject(arg0).get_access_token();
5141
5169
  return addHeapObject(ret);
5142
5170
  };
@@ -5342,12 +5370,12 @@ exports.__wbg_length_cdd215e10d9dd507 = function(arg0) {
5342
5370
  return ret;
5343
5371
  };
5344
5372
 
5345
- exports.__wbg_list_4a38177b0b5cf22f = function() { return handleError(function (arg0) {
5373
+ exports.__wbg_list_c880f3568db706bd = function() { return handleError(function (arg0) {
5346
5374
  const ret = getObject(arg0).list();
5347
5375
  return addHeapObject(ret);
5348
5376
  }, arguments) };
5349
5377
 
5350
- exports.__wbg_list_b065f392043e1f90 = function() { return handleError(function (arg0) {
5378
+ exports.__wbg_list_ed1ce5ff3be9e3bc = function() { return handleError(function (arg0) {
5351
5379
  const ret = getObject(arg0).list();
5352
5380
  return addHeapObject(ret);
5353
5381
  }, arguments) };
@@ -5548,7 +5576,7 @@ exports.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(
5548
5576
  getObject(arg0).randomFillSync(takeObject(arg1));
5549
5577
  }, arguments) };
5550
5578
 
5551
- exports.__wbg_remove_570db54b523676ce = function() { return handleError(function (arg0, arg1, arg2) {
5579
+ exports.__wbg_remove_a51dd510df9ae51d = function() { return handleError(function (arg0, arg1, arg2) {
5552
5580
  let deferred0_0;
5553
5581
  let deferred0_1;
5554
5582
  try {
@@ -5561,7 +5589,7 @@ exports.__wbg_remove_570db54b523676ce = function() { return handleError(function
5561
5589
  }
5562
5590
  }, arguments) };
5563
5591
 
5564
- exports.__wbg_remove_ae1411a140845c5a = function() { return handleError(function (arg0, arg1, arg2) {
5592
+ exports.__wbg_remove_a5a3acfb413a9cec = function() { return handleError(function (arg0, arg1, arg2) {
5565
5593
  let deferred0_0;
5566
5594
  let deferred0_1;
5567
5595
  try {
@@ -5612,7 +5640,11 @@ exports.__wbg_setTimeout_ca12ead8b48245e2 = function(arg0, arg1) {
5612
5640
  return addHeapObject(ret);
5613
5641
  };
5614
5642
 
5615
- exports.__wbg_set_13decb01eef0e5d0 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
5643
+ exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
5644
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5645
+ };
5646
+
5647
+ exports.__wbg_set_6e1a46fb1b4fbfbf = function() { return handleError(function (arg0, arg1, arg2, arg3) {
5616
5648
  let deferred0_0;
5617
5649
  let deferred0_1;
5618
5650
  try {
@@ -5625,16 +5657,7 @@ exports.__wbg_set_13decb01eef0e5d0 = function() { return handleError(function (a
5625
5657
  }
5626
5658
  }, arguments) };
5627
5659
 
5628
- exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
5629
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5630
- };
5631
-
5632
- exports.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
5633
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5634
- return addHeapObject(ret);
5635
- };
5636
-
5637
- exports.__wbg_set_a1a56c83262488d5 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
5660
+ exports.__wbg_set_8a313f41247925b3 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
5638
5661
  let deferred0_0;
5639
5662
  let deferred0_1;
5640
5663
  try {
@@ -5647,6 +5670,11 @@ exports.__wbg_set_a1a56c83262488d5 = function() { return handleError(function (a
5647
5670
  }
5648
5671
  }, arguments) };
5649
5672
 
5673
+ exports.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
5674
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5675
+ return addHeapObject(ret);
5676
+ };
5677
+
5650
5678
  exports.__wbg_set_body_3c365989753d61f4 = function(arg0, arg1) {
5651
5679
  getObject(arg0).body = getObject(arg1);
5652
5680
  };
@@ -5876,6 +5904,12 @@ exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
5876
5904
  return addHeapObject(ret);
5877
5905
  };
5878
5906
 
5907
+ exports.__wbindgen_cast_9f8dcc40cab50f4b = function(arg0, arg1) {
5908
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 595, function: Function { arguments: [], shim_idx: 333, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5909
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h666c8569a46b7e11, wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d);
5910
+ return addHeapObject(ret);
5911
+ };
5912
+
5879
5913
  exports.__wbindgen_cast_a2a1216eb14e5e30 = function(arg0, arg1) {
5880
5914
  // Cast intrinsic for `Closure(Closure { dtor_idx: 332, function: Function { arguments: [], shim_idx: 333, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5881
5915
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hc71695a401114797, wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d);
@@ -5900,12 +5934,6 @@ exports.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
5900
5934
  return addHeapObject(ret);
5901
5935
  };
5902
5936
 
5903
- exports.__wbindgen_cast_eac78313dde2d091 = function(arg0, arg1) {
5904
- // Cast intrinsic for `Closure(Closure { dtor_idx: 589, function: Function { arguments: [], shim_idx: 333, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5905
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h666c8569a46b7e11, wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d);
5906
- return addHeapObject(ret);
5907
- };
5908
-
5909
5937
  exports.__wbindgen_cast_ef90a087adb7475d = function(arg0, arg1) {
5910
5938
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
5911
5939
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
@@ -422,6 +422,7 @@ export const ciphersclient_encrypt_cipher_for_rotation: (
422
422
  c: number,
423
423
  d: number,
424
424
  ) => void;
425
+ export const ciphersclient_encrypt_list: (a: number, b: number, c: number, d: number) => void;
425
426
  export const ciphersclient_get: (a: number, b: number, c: number) => number;
426
427
  export const ciphersclient_list: (a: number) => number;
427
428
  export const ciphersclient_move_to_organization: (
@@ -545,13 +546,13 @@ export const wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d: (
545
546
  ) => void;
546
547
  export const wasm_bindgen__closure__destroy__h666c8569a46b7e11: (a: number, b: number) => void;
547
548
  export const wasm_bindgen__closure__destroy__hc71695a401114797: (a: number, b: number) => void;
548
- export const wasm_bindgen__closure__destroy__h34c685b2e12a24bd: (a: number, b: number) => void;
549
549
  export const wasm_bindgen__convert__closures_____invoke__h20d3e443a387c2db: (
550
550
  a: number,
551
551
  b: number,
552
552
  c: number,
553
553
  d: number,
554
554
  ) => void;
555
+ export const wasm_bindgen__closure__destroy__h34c685b2e12a24bd: (a: number, b: number) => void;
555
556
  export const wasm_bindgen__convert__closures_____invoke__h0c62e4f019080f6a: (
556
557
  a: number,
557
558
  b: number,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitwarden/sdk-internal",
3
- "version": "0.2.0-main.526",
3
+ "version": "0.2.0-main.527",
4
4
  "license": "GPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",