@bitwarden/sdk-internal 0.2.0-main.520 → 0.2.0-main.521

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.
@@ -1759,6 +1759,25 @@ export interface Field {
1759
1759
  linkedId: LinkedIdType | undefined;
1760
1760
  }
1761
1761
 
1762
+ /**
1763
+ * Minimal field view for list/search operations.
1764
+ * Contains only the fields needed for search indexing.
1765
+ */
1766
+ export interface FieldListView {
1767
+ /**
1768
+ * Only populated if the field has a name.
1769
+ */
1770
+ name: string | undefined;
1771
+ /**
1772
+ * Only populated for [FieldType::Text] fields.
1773
+ */
1774
+ value: string | undefined;
1775
+ /**
1776
+ * The field type.
1777
+ */
1778
+ type: FieldType;
1779
+ }
1780
+
1762
1781
  export interface Fido2Credential {
1763
1782
  credentialId: EncString;
1764
1783
  keyType: EncString;
@@ -1925,6 +1944,19 @@ export interface CipherListView {
1925
1944
  */
1926
1945
  copyableFields: CopyableCipherFields[];
1927
1946
  localData: LocalDataView | undefined;
1947
+ /**
1948
+ * Decrypted cipher notes for search indexing.
1949
+ */
1950
+ notes: string | undefined;
1951
+ /**
1952
+ * Decrypted cipher fields for search indexing.
1953
+ * Only includes name and value (for text fields only).
1954
+ */
1955
+ fields: FieldListView[] | undefined;
1956
+ /**
1957
+ * Decrypted attachment filenames for search indexing.
1958
+ */
1959
+ attachmentNames: string[] | undefined;
1928
1960
  }
1929
1961
 
1930
1962
  /**
@@ -1932,6 +1964,24 @@ export interface CipherListView {
1932
1964
  */
1933
1965
  export type CipherId = Tagged<Uuid, "CipherId">;
1934
1966
 
1967
+ /**
1968
+ * Represents the result of decrypting a list of ciphers.
1969
+ *
1970
+ * This struct contains two vectors: `successes` and `failures`.
1971
+ * `successes` contains the decrypted `CipherView` objects,
1972
+ * while `failures` contains the original `Cipher` objects that failed to decrypt.
1973
+ */
1974
+ export interface DecryptCipherResult {
1975
+ /**
1976
+ * The decrypted `CipherView` objects.
1977
+ */
1978
+ successes: CipherView[];
1979
+ /**
1980
+ * The original `Cipher` objects that failed to decrypt.
1981
+ */
1982
+ failures: Cipher[];
1983
+ }
1984
+
1935
1985
  export type CipherListViewType =
1936
1986
  | { login: LoginListView }
1937
1987
  | "secureNote"
@@ -2366,6 +2416,11 @@ export class CiphersClient {
2366
2416
  * key directly.
2367
2417
  */
2368
2418
  encrypt_cipher_for_rotation(cipher_view: CipherView, new_key: B64): EncryptionContext;
2419
+ /**
2420
+ * Decrypt full cipher list
2421
+ * Returns both successfully fully decrypted ciphers and any that failed to decrypt
2422
+ */
2423
+ decrypt_list_full_with_failures(ciphers: Cipher[]): DecryptCipherResult;
2369
2424
  /**
2370
2425
  * Returns a new client for performing admin operations.
2371
2426
  * Uses the admin server API endpoints and does not modify local state.
@@ -1703,6 +1703,18 @@ class CiphersClient {
1703
1703
  wasm.__wbindgen_add_to_stack_pointer(16);
1704
1704
  }
1705
1705
  }
1706
+ /**
1707
+ * Decrypt full cipher list
1708
+ * Returns both successfully fully decrypted ciphers and any that failed to decrypt
1709
+ * @param {Cipher[]} ciphers
1710
+ * @returns {DecryptCipherResult}
1711
+ */
1712
+ decrypt_list_full_with_failures(ciphers) {
1713
+ const ptr0 = passArrayJsValueToWasm0(ciphers, wasm.__wbindgen_malloc);
1714
+ const len0 = WASM_VECTOR_LEN;
1715
+ const ret = wasm.ciphersclient_decrypt_list_full_with_failures(this.__wbg_ptr, ptr0, len0);
1716
+ return takeObject(ret);
1717
+ }
1706
1718
  /**
1707
1719
  * Returns a new client for performing admin operations.
1708
1720
  * Uses the admin server API endpoints and does not modify local state.
@@ -4920,7 +4932,7 @@ exports.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (
4920
4932
  return addHeapObject(ret);
4921
4933
  }, arguments) };
4922
4934
 
4923
- exports.__wbg_cipher_f183851245d89ccf = function(arg0) {
4935
+ exports.__wbg_cipher_3611dc38be42a1b8 = function(arg0) {
4924
4936
  const ret = getObject(arg0).cipher;
4925
4937
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4926
4938
  };
@@ -5012,7 +5024,7 @@ exports.__wbg_fetch_f8ba0e29a9d6de0d = function(arg0, arg1) {
5012
5024
  return addHeapObject(ret);
5013
5025
  };
5014
5026
 
5015
- exports.__wbg_folder_3367676e71241bf1 = function(arg0) {
5027
+ exports.__wbg_folder_40882449237121c8 = function(arg0) {
5016
5028
  const ret = getObject(arg0).folder;
5017
5029
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
5018
5030
  };
@@ -5044,7 +5056,7 @@ exports.__wbg_getTime_14776bfb48a1bff9 = function(arg0) {
5044
5056
  return ret;
5045
5057
  };
5046
5058
 
5047
- exports.__wbg_get_292654433be40c9b = function() { return handleError(function (arg0, arg1, arg2) {
5059
+ exports.__wbg_get_184f24169994931f = function() { return handleError(function (arg0, arg1, arg2) {
5048
5060
  let deferred0_0;
5049
5061
  let deferred0_1;
5050
5062
  try {
@@ -5057,7 +5069,12 @@ exports.__wbg_get_292654433be40c9b = function() { return handleError(function (a
5057
5069
  }
5058
5070
  }, arguments) };
5059
5071
 
5060
- exports.__wbg_get_7bb432922d14b943 = function() { return handleError(function (arg0, arg1, arg2) {
5072
+ exports.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
5073
+ const ret = getObject(arg0)[arg1 >>> 0];
5074
+ return addHeapObject(ret);
5075
+ };
5076
+
5077
+ exports.__wbg_get_8f34fba1115621ef = function() { return handleError(function (arg0, arg1, arg2) {
5061
5078
  let deferred0_0;
5062
5079
  let deferred0_1;
5063
5080
  try {
@@ -5070,12 +5087,7 @@ exports.__wbg_get_7bb432922d14b943 = function() { return handleError(function (a
5070
5087
  }
5071
5088
  }, arguments) };
5072
5089
 
5073
- exports.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
5074
- const ret = getObject(arg0)[arg1 >>> 0];
5075
- return addHeapObject(ret);
5076
- };
5077
-
5078
- exports.__wbg_get_access_token_33767176006f133b = function(arg0) {
5090
+ exports.__wbg_get_access_token_a0aa7100dcdc7c05 = function(arg0) {
5079
5091
  const ret = getObject(arg0).get_access_token();
5080
5092
  return addHeapObject(ret);
5081
5093
  };
@@ -5281,12 +5293,12 @@ exports.__wbg_length_cdd215e10d9dd507 = function(arg0) {
5281
5293
  return ret;
5282
5294
  };
5283
5295
 
5284
- exports.__wbg_list_10f19a64d4161e26 = function() { return handleError(function (arg0) {
5296
+ exports.__wbg_list_6c7d50ad7f7df93f = function() { return handleError(function (arg0) {
5285
5297
  const ret = getObject(arg0).list();
5286
5298
  return addHeapObject(ret);
5287
5299
  }, arguments) };
5288
5300
 
5289
- exports.__wbg_list_34dcf498b7d372e2 = function() { return handleError(function (arg0) {
5301
+ exports.__wbg_list_da16a98f5ef853c9 = function() { return handleError(function (arg0) {
5290
5302
  const ret = getObject(arg0).list();
5291
5303
  return addHeapObject(ret);
5292
5304
  }, arguments) };
@@ -5508,7 +5520,7 @@ exports.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(
5508
5520
  getObject(arg0).randomFillSync(takeObject(arg1));
5509
5521
  }, arguments) };
5510
5522
 
5511
- exports.__wbg_remove_19762b193a4a0ddf = function() { return handleError(function (arg0, arg1, arg2) {
5523
+ exports.__wbg_remove_84f75d9c0f4cbafb = function() { return handleError(function (arg0, arg1, arg2) {
5512
5524
  let deferred0_0;
5513
5525
  let deferred0_1;
5514
5526
  try {
@@ -5521,7 +5533,7 @@ exports.__wbg_remove_19762b193a4a0ddf = function() { return handleError(function
5521
5533
  }
5522
5534
  }, arguments) };
5523
5535
 
5524
- exports.__wbg_remove_354599828d8cdcbd = function() { return handleError(function (arg0, arg1, arg2) {
5536
+ exports.__wbg_remove_93147dea7510a7da = function() { return handleError(function (arg0, arg1, arg2) {
5525
5537
  let deferred0_0;
5526
5538
  let deferred0_1;
5527
5539
  try {
@@ -5563,7 +5575,12 @@ exports.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
5563
5575
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5564
5576
  };
5565
5577
 
5566
- exports.__wbg_set_4beca662ae095628 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
5578
+ exports.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
5579
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5580
+ return addHeapObject(ret);
5581
+ };
5582
+
5583
+ exports.__wbg_set_b485bb03fc10d40c = function() { return handleError(function (arg0, arg1, arg2, arg3) {
5567
5584
  let deferred0_0;
5568
5585
  let deferred0_1;
5569
5586
  try {
@@ -5576,7 +5593,15 @@ exports.__wbg_set_4beca662ae095628 = function() { return handleError(function (a
5576
5593
  }
5577
5594
  }, arguments) };
5578
5595
 
5579
- exports.__wbg_set_8af869ccd7afde4b = function() { return handleError(function (arg0, arg1, arg2, arg3) {
5596
+ exports.__wbg_set_body_3c365989753d61f4 = function(arg0, arg1) {
5597
+ getObject(arg0).body = getObject(arg1);
5598
+ };
5599
+
5600
+ exports.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
5601
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
5602
+ };
5603
+
5604
+ exports.__wbg_set_c2582725996f48dd = function() { return handleError(function (arg0, arg1, arg2, arg3) {
5580
5605
  let deferred0_0;
5581
5606
  let deferred0_1;
5582
5607
  try {
@@ -5589,19 +5614,6 @@ exports.__wbg_set_8af869ccd7afde4b = function() { return handleError(function (a
5589
5614
  }
5590
5615
  }, arguments) };
5591
5616
 
5592
- exports.__wbg_set_907fb406c34a251d = function(arg0, arg1, arg2) {
5593
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5594
- return addHeapObject(ret);
5595
- };
5596
-
5597
- exports.__wbg_set_body_3c365989753d61f4 = function(arg0, arg1) {
5598
- getObject(arg0).body = getObject(arg1);
5599
- };
5600
-
5601
- exports.__wbg_set_c213c871859d6500 = function(arg0, arg1, arg2) {
5602
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
5603
- };
5604
-
5605
5617
  exports.__wbg_set_c2abbebe8b9ebee1 = function() { return handleError(function (arg0, arg1, arg2) {
5606
5618
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
5607
5619
  return ret;
@@ -5802,6 +5814,12 @@ exports.__wbindgen_cast_5fea77eff9dd275c = function(arg0, arg1) {
5802
5814
  return addHeapObject(ret);
5803
5815
  };
5804
5816
 
5817
+ exports.__wbindgen_cast_74e55181dcd20690 = function(arg0, arg1) {
5818
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 339, function: Function { arguments: [NamedExternref("Event")], shim_idx: 44, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5819
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hd9661b26d463effa, wasm_bindgen__convert__closures_____invoke__h6d021f3e9713c130);
5820
+ return addHeapObject(ret);
5821
+ };
5822
+
5805
5823
  exports.__wbindgen_cast_7a6d185652cd8149 = function(arg0, arg1) {
5806
5824
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
5807
5825
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
@@ -5810,12 +5828,6 @@ exports.__wbindgen_cast_7a6d185652cd8149 = function(arg0, arg1) {
5810
5828
  return addHeapObject(ret);
5811
5829
  };
5812
5830
 
5813
- exports.__wbindgen_cast_936643e1d8ccf009 = function(arg0, arg1) {
5814
- // Cast intrinsic for `Closure(Closure { dtor_idx: 583, function: Function { arguments: [], shim_idx: 333, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5815
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h666c8569a46b7e11, wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d);
5816
- return addHeapObject(ret);
5817
- };
5818
-
5819
5831
  exports.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
5820
5832
  // Cast intrinsic for `I64 -> Externref`.
5821
5833
  const ret = arg0;
@@ -5828,12 +5840,6 @@ exports.__wbindgen_cast_a2a1216eb14e5e30 = function(arg0, arg1) {
5828
5840
  return addHeapObject(ret);
5829
5841
  };
5830
5842
 
5831
- exports.__wbindgen_cast_a3e5ea889ee07093 = function(arg0, arg1) {
5832
- // Cast intrinsic for `Closure(Closure { dtor_idx: 338, function: Function { arguments: [NamedExternref("Event")], shim_idx: 44, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5833
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hd9661b26d463effa, wasm_bindgen__convert__closures_____invoke__h6d021f3e9713c130);
5834
- return addHeapObject(ret);
5835
- };
5836
-
5837
5843
  exports.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
5838
5844
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
5839
5845
  const ret = getArrayU8FromWasm0(arg0, arg1);
@@ -5858,6 +5864,12 @@ exports.__wbindgen_cast_e8b3b9b77e6fa82c = function(arg0, arg1) {
5858
5864
  return addHeapObject(ret);
5859
5865
  };
5860
5866
 
5867
+ exports.__wbindgen_cast_eac78313dde2d091 = function(arg0, arg1) {
5868
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 589, function: Function { arguments: [], shim_idx: 333, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5869
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h666c8569a46b7e11, wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d);
5870
+ return addHeapObject(ret);
5871
+ };
5872
+
5861
5873
  exports.__wbindgen_cast_ef90a087adb7475d = function(arg0, arg1) {
5862
5874
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
5863
5875
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
@@ -400,6 +400,11 @@ export const ciphersclient_decrypt: (a: number, b: number, c: number) => void;
400
400
  export const ciphersclient_decrypt_fido2_credentials: (a: number, b: number, c: number) => void;
401
401
  export const ciphersclient_decrypt_fido2_private_key: (a: number, b: number, c: number) => void;
402
402
  export const ciphersclient_decrypt_list: (a: number, b: number, c: number, d: number) => void;
403
+ export const ciphersclient_decrypt_list_full_with_failures: (
404
+ a: number,
405
+ b: number,
406
+ c: number,
407
+ ) => number;
403
408
  export const ciphersclient_decrypt_list_with_failures: (a: number, b: number, c: number) => number;
404
409
  export const ciphersclient_delete: (a: number, b: number) => number;
405
410
  export const ciphersclient_delete_many: (a: number, b: number, c: number, d: number) => number;
@@ -527,6 +532,7 @@ export const wasm_bindgen__convert__closures_____invoke__h6d021f3e9713c130: (
527
532
  b: number,
528
533
  c: number,
529
534
  ) => void;
535
+ export const wasm_bindgen__closure__destroy__hc71695a401114797: (a: number, b: number) => void;
530
536
  export const wasm_bindgen__closure__destroy__h3238f077fb5ae8c5: (a: number, b: number) => void;
531
537
  export const wasm_bindgen__convert__closures_____invoke__hd535e5ed92b9c746: (
532
538
  a: number,
@@ -538,9 +544,8 @@ export const wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d: (
538
544
  a: number,
539
545
  b: number,
540
546
  ) => void;
541
- export const wasm_bindgen__closure__destroy__hc71695a401114797: (a: number, b: number) => void;
542
- export const wasm_bindgen__closure__destroy__h666c8569a46b7e11: (a: number, b: number) => void;
543
547
  export const wasm_bindgen__closure__destroy__hd9661b26d463effa: (a: number, b: number) => void;
548
+ export const wasm_bindgen__closure__destroy__h666c8569a46b7e11: (a: number, b: number) => void;
544
549
  export const wasm_bindgen__convert__closures_____invoke__h0c62e4f019080f6a: (
545
550
  a: number,
546
551
  b: number,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitwarden/sdk-internal",
3
- "version": "0.2.0-main.520",
3
+ "version": "0.2.0-main.521",
4
4
  "license": "GPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",