@bitwarden/sdk-internal 0.2.0-main.325 → 0.2.0-main.330

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
- b5d27e402c9eae13238c33fba88b15149bc19a65
1
+ 80fbec9e71bb065d86cfff0b32d9f2345d6bfb60
@@ -169,6 +169,11 @@ export interface TokenProvider {
169
169
  */
170
170
  export interface FeatureFlags extends Map<string, boolean> {}
171
171
 
172
+ export interface Repositories {
173
+ cipher: Repository<Cipher> | null;
174
+ folder: Repository<Folder> | null;
175
+ }
176
+
172
177
  export interface IndexedDbConfiguration {
173
178
  db_name: string;
174
179
  }
@@ -2136,8 +2141,9 @@ export class SendAccessClient {
2136
2141
  export class StateClient {
2137
2142
  private constructor();
2138
2143
  free(): void;
2139
- register_cipher_repository(cipher_repository: Repository<Cipher>): void;
2140
- register_folder_repository(store: Repository<Folder>): void;
2144
+ register_cipher_repository(cipher_repository: any): void;
2145
+ register_folder_repository(store: any): void;
2146
+ register_client_managed_repositories(repositories: Repositories): void;
2141
2147
  /**
2142
2148
  * Initialize the database for SDK managed repositories.
2143
2149
  */
@@ -126,6 +126,10 @@ function getStringFromWasm0(ptr, len) {
126
126
  return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
127
127
  }
128
128
 
129
+ function isLikeNone(x) {
130
+ return x === undefined || x === null;
131
+ }
132
+
129
133
  function dropObject(idx) {
130
134
  if (idx < 132) return;
131
135
  heap[idx] = heap_next;
@@ -138,10 +142,6 @@ function takeObject(idx) {
138
142
  return ret;
139
143
  }
140
144
 
141
- function isLikeNone(x) {
142
- return x === undefined || x === null;
143
- }
144
-
145
145
  function getArrayU8FromWasm0(ptr, len) {
146
146
  ptr = ptr >>> 0;
147
147
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
@@ -821,7 +821,7 @@ export function isEncryptFileError(error) {
821
821
  }
822
822
 
823
823
  function __wbg_adapter_54(arg0, arg1, arg2) {
824
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h975e31b7dc4fe5c9(
824
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb3d7232059e1cc02(
825
825
  arg0,
826
826
  arg1,
827
827
  addHeapObject(arg2),
@@ -831,7 +831,7 @@ function __wbg_adapter_54(arg0, arg1, arg2) {
831
831
  function __wbg_adapter_57(arg0, arg1, arg2) {
832
832
  try {
833
833
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
834
- wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h52600fe0adb0303d(
834
+ wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbddb05d650eb93e1(
835
835
  retptr,
836
836
  arg0,
837
837
  arg1,
@@ -854,7 +854,7 @@ function __wbg_adapter_60(arg0, arg1) {
854
854
  );
855
855
  }
856
856
 
857
- function __wbg_adapter_336(arg0, arg1, arg2, arg3) {
857
+ function __wbg_adapter_341(arg0, arg1, arg2, arg3) {
858
858
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h54a8613170fef18e(
859
859
  arg0,
860
860
  arg1,
@@ -3803,17 +3803,26 @@ export class StateClient {
3803
3803
  wasm.__wbg_stateclient_free(ptr, 0);
3804
3804
  }
3805
3805
  /**
3806
- * @param {Repository<Cipher>} cipher_repository
3806
+ * @param {any} cipher_repository
3807
3807
  */
3808
3808
  register_cipher_repository(cipher_repository) {
3809
3809
  wasm.stateclient_register_cipher_repository(this.__wbg_ptr, addHeapObject(cipher_repository));
3810
3810
  }
3811
3811
  /**
3812
- * @param {Repository<Folder>} store
3812
+ * @param {any} store
3813
3813
  */
3814
3814
  register_folder_repository(store) {
3815
3815
  wasm.stateclient_register_folder_repository(this.__wbg_ptr, addHeapObject(store));
3816
3816
  }
3817
+ /**
3818
+ * @param {Repositories} repositories
3819
+ */
3820
+ register_client_managed_repositories(repositories) {
3821
+ wasm.stateclient_register_client_managed_repositories(
3822
+ this.__wbg_ptr,
3823
+ addHeapObject(repositories),
3824
+ );
3825
+ }
3817
3826
  /**
3818
3827
  * Initialize the database for SDK managed repositories.
3819
3828
  * @param {IndexedDbConfiguration} configuration
@@ -4036,6 +4045,11 @@ export function __wbg_call_7cccdd69e0791ae2() {
4036
4045
  }, arguments);
4037
4046
  }
4038
4047
 
4048
+ export function __wbg_cipher_8e726269feb7de5d(arg0) {
4049
+ const ret = getObject(arg0).cipher;
4050
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
4051
+ }
4052
+
4039
4053
  export function __wbg_clearTimeout_b1115618e821c3b2(arg0) {
4040
4054
  const ret = clearTimeout(takeObject(arg0));
4041
4055
  return addHeapObject(ret);
@@ -4111,6 +4125,11 @@ export function __wbg_fetch_509096533071c657(arg0, arg1) {
4111
4125
  return addHeapObject(ret);
4112
4126
  }
4113
4127
 
4128
+ export function __wbg_folder_7b9420ecc7a630d2(arg0) {
4129
+ const ret = getObject(arg0).folder;
4130
+ return isLikeNone(ret) ? 0 : addHeapObject(ret);
4131
+ }
4132
+
4114
4133
  export function __wbg_getRandomValues_38097e921c2494c3() {
4115
4134
  return handleError(function (arg0, arg1) {
4116
4135
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
@@ -4128,7 +4147,7 @@ export function __wbg_getTime_46267b1c24877e30(arg0) {
4128
4147
  return ret;
4129
4148
  }
4130
4149
 
4131
- export function __wbg_get_035373c170f62bba() {
4150
+ export function __wbg_get_2158d2342e2b6e8a() {
4132
4151
  return handleError(function (arg0, arg1, arg2) {
4133
4152
  let deferred0_0;
4134
4153
  let deferred0_1;
@@ -4150,7 +4169,12 @@ export function __wbg_get_67b2ba62fc30de12() {
4150
4169
  }, arguments);
4151
4170
  }
4152
4171
 
4153
- export function __wbg_get_82785db1949ef1f5() {
4172
+ export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
4173
+ const ret = getObject(arg0)[arg1 >>> 0];
4174
+ return addHeapObject(ret);
4175
+ }
4176
+
4177
+ export function __wbg_get_e95a8289dc0f8bce() {
4154
4178
  return handleError(function (arg0, arg1, arg2) {
4155
4179
  let deferred0_0;
4156
4180
  let deferred0_1;
@@ -4165,12 +4189,7 @@ export function __wbg_get_82785db1949ef1f5() {
4165
4189
  }, arguments);
4166
4190
  }
4167
4191
 
4168
- export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
4169
- const ret = getObject(arg0)[arg1 >>> 0];
4170
- return addHeapObject(ret);
4171
- }
4172
-
4173
- export function __wbg_getaccesstoken_cace9d9a44e05512(arg0) {
4192
+ export function __wbg_getaccesstoken_b7ca9513e7467595(arg0) {
4174
4193
  const ret = getObject(arg0).get_access_token();
4175
4194
  return addHeapObject(ret);
4176
4195
  }
@@ -4355,14 +4374,14 @@ export function __wbg_length_e2d2a49132c1b256(arg0) {
4355
4374
  return ret;
4356
4375
  }
4357
4376
 
4358
- export function __wbg_list_15099eacbb4e42c6() {
4377
+ export function __wbg_list_670640e283e85e10() {
4359
4378
  return handleError(function (arg0) {
4360
4379
  const ret = getObject(arg0).list();
4361
4380
  return addHeapObject(ret);
4362
4381
  }, arguments);
4363
4382
  }
4364
4383
 
4365
- export function __wbg_list_b9164ae3436d353c() {
4384
+ export function __wbg_list_eead26c9de2b2f49() {
4366
4385
  return handleError(function (arg0) {
4367
4386
  const ret = getObject(arg0).list();
4368
4387
  return addHeapObject(ret);
@@ -4405,7 +4424,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
4405
4424
  const a = state0.a;
4406
4425
  state0.a = 0;
4407
4426
  try {
4408
- return __wbg_adapter_336(a, state0.b, arg0, arg1);
4427
+ return __wbg_adapter_341(a, state0.b, arg0, arg1);
4409
4428
  } finally {
4410
4429
  state0.a = a;
4411
4430
  }
@@ -4563,7 +4582,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
4563
4582
  }, arguments);
4564
4583
  }
4565
4584
 
4566
- export function __wbg_remove_f439fa006b0badbf() {
4585
+ export function __wbg_remove_1c2e817103f0304d() {
4567
4586
  return handleError(function (arg0, arg1, arg2) {
4568
4587
  let deferred0_0;
4569
4588
  let deferred0_1;
@@ -4578,7 +4597,7 @@ export function __wbg_remove_f439fa006b0badbf() {
4578
4597
  }, arguments);
4579
4598
  }
4580
4599
 
4581
- export function __wbg_remove_f9db0b9c3ebb4dc8() {
4600
+ export function __wbg_remove_82da0bcc313452b0() {
4582
4601
  return handleError(function (arg0, arg1, arg2) {
4583
4602
  let deferred0_0;
4584
4603
  let deferred0_1;
@@ -4624,6 +4643,21 @@ export function __wbg_setTimeout_ca12ead8b48245e2(arg0, arg1) {
4624
4643
  return addHeapObject(ret);
4625
4644
  }
4626
4645
 
4646
+ export function __wbg_set_125ef01e0d626680() {
4647
+ return handleError(function (arg0, arg1, arg2, arg3) {
4648
+ let deferred0_0;
4649
+ let deferred0_1;
4650
+ try {
4651
+ deferred0_0 = arg1;
4652
+ deferred0_1 = arg2;
4653
+ const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
4654
+ return addHeapObject(ret);
4655
+ } finally {
4656
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
4657
+ }
4658
+ }, arguments);
4659
+ }
4660
+
4627
4661
  export function __wbg_set_37837023f3d740e8(arg0, arg1, arg2) {
4628
4662
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
4629
4663
  }
@@ -4641,22 +4675,7 @@ export function __wbg_set_8fc6bf8a5b1071d1(arg0, arg1, arg2) {
4641
4675
  return addHeapObject(ret);
4642
4676
  }
4643
4677
 
4644
- export function __wbg_set_abc145c4ba0903f3() {
4645
- return handleError(function (arg0, arg1, arg2, arg3) {
4646
- let deferred0_0;
4647
- let deferred0_1;
4648
- try {
4649
- deferred0_0 = arg1;
4650
- deferred0_1 = arg2;
4651
- const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
4652
- return addHeapObject(ret);
4653
- } finally {
4654
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
4655
- }
4656
- }, arguments);
4657
- }
4658
-
4659
- export function __wbg_set_f1735479eb605586() {
4678
+ export function __wbg_set_fb32a3bce13cbc73() {
4660
4679
  return handleError(function (arg0, arg1, arg2, arg3) {
4661
4680
  let deferred0_0;
4662
4681
  let deferred0_1;
@@ -4881,27 +4900,27 @@ export function __wbindgen_cb_drop(arg0) {
4881
4900
  return ret;
4882
4901
  }
4883
4902
 
4884
- export function __wbindgen_closure_wrapper191(arg0, arg1, arg2) {
4903
+ export function __wbindgen_closure_wrapper193(arg0, arg1, arg2) {
4885
4904
  const ret = makeMutClosure(arg0, arg1, 7, __wbg_adapter_54);
4886
4905
  return addHeapObject(ret);
4887
4906
  }
4888
4907
 
4889
- export function __wbindgen_closure_wrapper193(arg0, arg1, arg2) {
4908
+ export function __wbindgen_closure_wrapper195(arg0, arg1, arg2) {
4890
4909
  const ret = makeMutClosure(arg0, arg1, 7, __wbg_adapter_57);
4891
4910
  return addHeapObject(ret);
4892
4911
  }
4893
4912
 
4894
- export function __wbindgen_closure_wrapper3845(arg0, arg1, arg2) {
4913
+ export function __wbindgen_closure_wrapper3848(arg0, arg1, arg2) {
4895
4914
  const ret = makeMutClosure(arg0, arg1, 294, __wbg_adapter_60);
4896
4915
  return addHeapObject(ret);
4897
4916
  }
4898
4917
 
4899
- export function __wbindgen_closure_wrapper6175(arg0, arg1, arg2) {
4918
+ export function __wbindgen_closure_wrapper6177(arg0, arg1, arg2) {
4900
4919
  const ret = makeMutClosure(arg0, arg1, 319, __wbg_adapter_60);
4901
4920
  return addHeapObject(ret);
4902
4921
  }
4903
4922
 
4904
- export function __wbindgen_closure_wrapper6554(arg0, arg1, arg2) {
4923
+ export function __wbindgen_closure_wrapper6556(arg0, arg1, arg2) {
4905
4924
  const ret = makeMutClosure(arg0, arg1, 342, __wbg_adapter_54);
4906
4925
  return addHeapObject(ret);
4907
4926
  }
Binary file
@@ -18,6 +18,7 @@ export const init_sdk: (a: number) => void;
18
18
  export const platformclient_load_flags: (a: number, b: number, c: number) => void;
19
19
  export const stateclient_register_cipher_repository: (a: number, b: number) => void;
20
20
  export const stateclient_register_folder_repository: (a: number, b: number) => void;
21
+ export const stateclient_register_client_managed_repositories: (a: number, b: number) => void;
21
22
  export const stateclient_initialize_state: (a: number, b: number) => number;
22
23
  export const __wbg_purecrypto_free: (a: number, b: number) => void;
23
24
  export const purecrypto_symmetric_decrypt: (
@@ -407,12 +408,12 @@ export const __wbindgen_exn_store: (a: number) => void;
407
408
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
408
409
  export const __wbindgen_export_4: WebAssembly.Table;
409
410
  export const __wbindgen_add_to_stack_pointer: (a: number) => number;
410
- export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h975e31b7dc4fe5c9: (
411
+ export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb3d7232059e1cc02: (
411
412
  a: number,
412
413
  b: number,
413
414
  c: number,
414
415
  ) => void;
415
- export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h52600fe0adb0303d: (
416
+ export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbddb05d650eb93e1: (
416
417
  a: number,
417
418
  b: number,
418
419
  c: number,