@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.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2f6479f37b1b69f47dc34cf5baf64c2a618596f3
1
+ 734b56bfdc360ea926d9379f48c417b894cd08e8
@@ -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.
@@ -1012,14 +1012,6 @@ export function isGetFolderError(error) {
1012
1012
  }
1013
1013
  }
1014
1014
 
1015
- function wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d(arg0, arg1) {
1016
- wasm.wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d(arg0, arg1);
1017
- }
1018
-
1019
- function wasm_bindgen__convert__closures_____invoke__h6d021f3e9713c130(arg0, arg1, arg2) {
1020
- wasm.wasm_bindgen__convert__closures_____invoke__h6d021f3e9713c130(arg0, arg1, addHeapObject(arg2));
1021
- }
1022
-
1023
1015
  function wasm_bindgen__convert__closures_____invoke__hd535e5ed92b9c746(arg0, arg1, arg2) {
1024
1016
  try {
1025
1017
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -1034,6 +1026,14 @@ function wasm_bindgen__convert__closures_____invoke__hd535e5ed92b9c746(arg0, arg
1034
1026
  }
1035
1027
  }
1036
1028
 
1029
+ function wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d(arg0, arg1) {
1030
+ wasm.wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d(arg0, arg1);
1031
+ }
1032
+
1033
+ function wasm_bindgen__convert__closures_____invoke__h6d021f3e9713c130(arg0, arg1, arg2) {
1034
+ wasm.wasm_bindgen__convert__closures_____invoke__h6d021f3e9713c130(arg0, arg1, addHeapObject(arg2));
1035
+ }
1036
+
1037
1037
  function wasm_bindgen__convert__closures_____invoke__h0c62e4f019080f6a(arg0, arg1, arg2, arg3) {
1038
1038
  wasm.wasm_bindgen__convert__closures_____invoke__h0c62e4f019080f6a(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
1039
1039
  }
@@ -1705,6 +1705,18 @@ export class CiphersClient {
1705
1705
  wasm.__wbindgen_add_to_stack_pointer(16);
1706
1706
  }
1707
1707
  }
1708
+ /**
1709
+ * Decrypt full cipher list
1710
+ * Returns both successfully fully decrypted ciphers and any that failed to decrypt
1711
+ * @param {Cipher[]} ciphers
1712
+ * @returns {DecryptCipherResult}
1713
+ */
1714
+ decrypt_list_full_with_failures(ciphers) {
1715
+ const ptr0 = passArrayJsValueToWasm0(ciphers, wasm.__wbindgen_malloc);
1716
+ const len0 = WASM_VECTOR_LEN;
1717
+ const ret = wasm.ciphersclient_decrypt_list_full_with_failures(this.__wbg_ptr, ptr0, len0);
1718
+ return takeObject(ret);
1719
+ }
1708
1720
  /**
1709
1721
  * Returns a new client for performing admin operations.
1710
1722
  * Uses the admin server API endpoints and does not modify local state.
@@ -4874,7 +4886,7 @@ export function __wbg_call_e762c39fa8ea36bf() { return handleError(function (arg
4874
4886
  return addHeapObject(ret);
4875
4887
  }, arguments) };
4876
4888
 
4877
- export function __wbg_cipher_f183851245d89ccf(arg0) {
4889
+ export function __wbg_cipher_3611dc38be42a1b8(arg0) {
4878
4890
  const ret = getObject(arg0).cipher;
4879
4891
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4880
4892
  };
@@ -4966,7 +4978,7 @@ export function __wbg_fetch_f8ba0e29a9d6de0d(arg0, arg1) {
4966
4978
  return addHeapObject(ret);
4967
4979
  };
4968
4980
 
4969
- export function __wbg_folder_3367676e71241bf1(arg0) {
4981
+ export function __wbg_folder_40882449237121c8(arg0) {
4970
4982
  const ret = getObject(arg0).folder;
4971
4983
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4972
4984
  };
@@ -4998,7 +5010,7 @@ export function __wbg_getTime_14776bfb48a1bff9(arg0) {
4998
5010
  return ret;
4999
5011
  };
5000
5012
 
5001
- export function __wbg_get_292654433be40c9b() { return handleError(function (arg0, arg1, arg2) {
5013
+ export function __wbg_get_184f24169994931f() { return handleError(function (arg0, arg1, arg2) {
5002
5014
  let deferred0_0;
5003
5015
  let deferred0_1;
5004
5016
  try {
@@ -5011,7 +5023,12 @@ export function __wbg_get_292654433be40c9b() { return handleError(function (arg0
5011
5023
  }
5012
5024
  }, arguments) };
5013
5025
 
5014
- export function __wbg_get_7bb432922d14b943() { return handleError(function (arg0, arg1, arg2) {
5026
+ export function __wbg_get_7bed016f185add81(arg0, arg1) {
5027
+ const ret = getObject(arg0)[arg1 >>> 0];
5028
+ return addHeapObject(ret);
5029
+ };
5030
+
5031
+ export function __wbg_get_8f34fba1115621ef() { return handleError(function (arg0, arg1, arg2) {
5015
5032
  let deferred0_0;
5016
5033
  let deferred0_1;
5017
5034
  try {
@@ -5024,12 +5041,7 @@ export function __wbg_get_7bb432922d14b943() { return handleError(function (arg0
5024
5041
  }
5025
5042
  }, arguments) };
5026
5043
 
5027
- export function __wbg_get_7bed016f185add81(arg0, arg1) {
5028
- const ret = getObject(arg0)[arg1 >>> 0];
5029
- return addHeapObject(ret);
5030
- };
5031
-
5032
- export function __wbg_get_access_token_33767176006f133b(arg0) {
5044
+ export function __wbg_get_access_token_a0aa7100dcdc7c05(arg0) {
5033
5045
  const ret = getObject(arg0).get_access_token();
5034
5046
  return addHeapObject(ret);
5035
5047
  };
@@ -5235,12 +5247,12 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
5235
5247
  return ret;
5236
5248
  };
5237
5249
 
5238
- export function __wbg_list_10f19a64d4161e26() { return handleError(function (arg0) {
5250
+ export function __wbg_list_6c7d50ad7f7df93f() { return handleError(function (arg0) {
5239
5251
  const ret = getObject(arg0).list();
5240
5252
  return addHeapObject(ret);
5241
5253
  }, arguments) };
5242
5254
 
5243
- export function __wbg_list_34dcf498b7d372e2() { return handleError(function (arg0) {
5255
+ export function __wbg_list_da16a98f5ef853c9() { return handleError(function (arg0) {
5244
5256
  const ret = getObject(arg0).list();
5245
5257
  return addHeapObject(ret);
5246
5258
  }, arguments) };
@@ -5462,7 +5474,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() { return handleError(fun
5462
5474
  getObject(arg0).randomFillSync(takeObject(arg1));
5463
5475
  }, arguments) };
5464
5476
 
5465
- export function __wbg_remove_19762b193a4a0ddf() { return handleError(function (arg0, arg1, arg2) {
5477
+ export function __wbg_remove_84f75d9c0f4cbafb() { return handleError(function (arg0, arg1, arg2) {
5466
5478
  let deferred0_0;
5467
5479
  let deferred0_1;
5468
5480
  try {
@@ -5475,7 +5487,7 @@ export function __wbg_remove_19762b193a4a0ddf() { return handleError(function (a
5475
5487
  }
5476
5488
  }, arguments) };
5477
5489
 
5478
- export function __wbg_remove_354599828d8cdcbd() { return handleError(function (arg0, arg1, arg2) {
5490
+ export function __wbg_remove_93147dea7510a7da() { return handleError(function (arg0, arg1, arg2) {
5479
5491
  let deferred0_0;
5480
5492
  let deferred0_1;
5481
5493
  try {
@@ -5517,7 +5529,12 @@ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
5517
5529
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5518
5530
  };
5519
5531
 
5520
- export function __wbg_set_4beca662ae095628() { return handleError(function (arg0, arg1, arg2, arg3) {
5532
+ export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
5533
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5534
+ return addHeapObject(ret);
5535
+ };
5536
+
5537
+ export function __wbg_set_b485bb03fc10d40c() { return handleError(function (arg0, arg1, arg2, arg3) {
5521
5538
  let deferred0_0;
5522
5539
  let deferred0_1;
5523
5540
  try {
@@ -5530,7 +5547,15 @@ export function __wbg_set_4beca662ae095628() { return handleError(function (arg0
5530
5547
  }
5531
5548
  }, arguments) };
5532
5549
 
5533
- export function __wbg_set_8af869ccd7afde4b() { return handleError(function (arg0, arg1, arg2, arg3) {
5550
+ export function __wbg_set_body_3c365989753d61f4(arg0, arg1) {
5551
+ getObject(arg0).body = getObject(arg1);
5552
+ };
5553
+
5554
+ export function __wbg_set_c213c871859d6500(arg0, arg1, arg2) {
5555
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
5556
+ };
5557
+
5558
+ export function __wbg_set_c2582725996f48dd() { return handleError(function (arg0, arg1, arg2, arg3) {
5534
5559
  let deferred0_0;
5535
5560
  let deferred0_1;
5536
5561
  try {
@@ -5543,19 +5568,6 @@ export function __wbg_set_8af869ccd7afde4b() { return handleError(function (arg0
5543
5568
  }
5544
5569
  }, arguments) };
5545
5570
 
5546
- export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
5547
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
5548
- return addHeapObject(ret);
5549
- };
5550
-
5551
- export function __wbg_set_body_3c365989753d61f4(arg0, arg1) {
5552
- getObject(arg0).body = getObject(arg1);
5553
- };
5554
-
5555
- export function __wbg_set_c213c871859d6500(arg0, arg1, arg2) {
5556
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
5557
- };
5558
-
5559
5571
  export function __wbg_set_c2abbebe8b9ebee1() { return handleError(function (arg0, arg1, arg2) {
5560
5572
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
5561
5573
  return ret;
@@ -5756,6 +5768,12 @@ export function __wbindgen_cast_5fea77eff9dd275c(arg0, arg1) {
5756
5768
  return addHeapObject(ret);
5757
5769
  };
5758
5770
 
5771
+ export function __wbindgen_cast_74e55181dcd20690(arg0, arg1) {
5772
+ // 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`.
5773
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hd9661b26d463effa, wasm_bindgen__convert__closures_____invoke__h6d021f3e9713c130);
5774
+ return addHeapObject(ret);
5775
+ };
5776
+
5759
5777
  export function __wbindgen_cast_7a6d185652cd8149(arg0, arg1) {
5760
5778
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
5761
5779
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
@@ -5764,12 +5782,6 @@ export function __wbindgen_cast_7a6d185652cd8149(arg0, arg1) {
5764
5782
  return addHeapObject(ret);
5765
5783
  };
5766
5784
 
5767
- export function __wbindgen_cast_936643e1d8ccf009(arg0, arg1) {
5768
- // Cast intrinsic for `Closure(Closure { dtor_idx: 583, function: Function { arguments: [], shim_idx: 333, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5769
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h666c8569a46b7e11, wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d);
5770
- return addHeapObject(ret);
5771
- };
5772
-
5773
5785
  export function __wbindgen_cast_9ae0607507abb057(arg0) {
5774
5786
  // Cast intrinsic for `I64 -> Externref`.
5775
5787
  const ret = arg0;
@@ -5782,12 +5794,6 @@ export function __wbindgen_cast_a2a1216eb14e5e30(arg0, arg1) {
5782
5794
  return addHeapObject(ret);
5783
5795
  };
5784
5796
 
5785
- export function __wbindgen_cast_a3e5ea889ee07093(arg0, arg1) {
5786
- // 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`.
5787
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hd9661b26d463effa, wasm_bindgen__convert__closures_____invoke__h6d021f3e9713c130);
5788
- return addHeapObject(ret);
5789
- };
5790
-
5791
5797
  export function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
5792
5798
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
5793
5799
  const ret = getArrayU8FromWasm0(arg0, arg1);
@@ -5812,6 +5818,12 @@ export function __wbindgen_cast_e8b3b9b77e6fa82c(arg0, arg1) {
5812
5818
  return addHeapObject(ret);
5813
5819
  };
5814
5820
 
5821
+ export function __wbindgen_cast_eac78313dde2d091(arg0, arg1) {
5822
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 589, function: Function { arguments: [], shim_idx: 333, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5823
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h666c8569a46b7e11, wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d);
5824
+ return addHeapObject(ret);
5825
+ };
5826
+
5815
5827
  export function __wbindgen_cast_ef90a087adb7475d(arg0, arg1) {
5816
5828
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
5817
5829
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
Binary file
@@ -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;
@@ -522,22 +527,22 @@ export const __wbg_get_outgoingmessage_destination: (a: number) => number;
522
527
  export const vaultclient_attachments: (a: number) => number;
523
528
  export const __wbg_set_outgoingmessage_destination: (a: number, b: number) => void;
524
529
  export const __wbg_cryptoclient_free: (a: number, b: number) => void;
525
- export const wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d: (
530
+ export const wasm_bindgen__convert__closures_____invoke__hd535e5ed92b9c746: (
526
531
  a: number,
527
532
  b: number,
533
+ c: number,
534
+ d: number,
528
535
  ) => void;
529
- export const wasm_bindgen__closure__destroy__hc71695a401114797: (a: number, b: number) => void;
530
- export const wasm_bindgen__convert__closures_____invoke__h6d021f3e9713c130: (
536
+ export const wasm_bindgen__closure__destroy__h3238f077fb5ae8c5: (a: number, b: number) => void;
537
+ export const wasm_bindgen__convert__closures_____invoke__ha638740cca0ef77d: (
531
538
  a: number,
532
539
  b: number,
533
- c: number,
534
540
  ) => void;
535
- export const wasm_bindgen__closure__destroy__h3238f077fb5ae8c5: (a: number, b: number) => void;
536
- export const wasm_bindgen__convert__closures_____invoke__hd535e5ed92b9c746: (
541
+ export const wasm_bindgen__closure__destroy__hc71695a401114797: (a: number, b: number) => void;
542
+ export const wasm_bindgen__convert__closures_____invoke__h6d021f3e9713c130: (
537
543
  a: number,
538
544
  b: number,
539
545
  c: number,
540
- d: number,
541
546
  ) => void;
542
547
  export const wasm_bindgen__closure__destroy__hd9661b26d463effa: (a: number, b: number) => void;
543
548
  export const wasm_bindgen__closure__destroy__h666c8569a46b7e11: (a: number, b: number) => void;