@bitwarden/sdk-internal 0.2.0-main.219 → 0.2.0-main.220

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.
@@ -1186,6 +1186,10 @@ export interface Repository<T> {
1186
1186
  remove(id: string): Promise<void>;
1187
1187
  }
1188
1188
 
1189
+ export interface TokenProvider {
1190
+ get_access_token(): Promise<string>;
1191
+ }
1192
+
1189
1193
  export interface TestError extends Error {
1190
1194
  name: "TestError";
1191
1195
  }
@@ -1203,7 +1207,7 @@ export class AttachmentsClient {
1203
1207
  }
1204
1208
  export class BitwardenClient {
1205
1209
  free(): void;
1206
- constructor(settings?: ClientSettings | null);
1210
+ constructor(settings: ClientSettings | null | undefined, token_provider: any);
1207
1211
  /**
1208
1212
  * Test method, echoes back the input
1209
1213
  */
@@ -747,7 +747,7 @@ function __wbg_adapter_56(arg0, arg1, arg2) {
747
747
  );
748
748
  }
749
749
 
750
- function __wbg_adapter_274(arg0, arg1, arg2, arg3) {
750
+ function __wbg_adapter_276(arg0, arg1, arg2, arg3) {
751
751
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h8776500d04a3e634(
752
752
  arg0,
753
753
  arg1,
@@ -985,10 +985,14 @@ class BitwardenClient {
985
985
  wasm.__wbg_bitwardenclient_free(ptr, 0);
986
986
  }
987
987
  /**
988
- * @param {ClientSettings | null} [settings]
988
+ * @param {ClientSettings | null | undefined} settings
989
+ * @param {any} token_provider
989
990
  */
990
- constructor(settings) {
991
- const ret = wasm.bitwardenclient_new(isLikeNone(settings) ? 0 : addHeapObject(settings));
991
+ constructor(settings, token_provider) {
992
+ const ret = wasm.bitwardenclient_new(
993
+ isLikeNone(settings) ? 0 : addHeapObject(settings),
994
+ addHeapObject(token_provider),
995
+ );
992
996
  this.__wbg_ptr = ret >>> 0;
993
997
  BitwardenClientFinalization.register(this, this.__wbg_ptr, this);
994
998
  return this;
@@ -3327,12 +3331,7 @@ module.exports.__wbg_get_67b2ba62fc30de12 = function () {
3327
3331
  }, arguments);
3328
3332
  };
3329
3333
 
3330
- module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
3331
- const ret = getObject(arg0)[arg1 >>> 0];
3332
- return addHeapObject(ret);
3333
- };
3334
-
3335
- module.exports.__wbg_get_f2cf19c228273ccd = function () {
3334
+ module.exports.__wbg_get_a3863a1264cebac2 = function () {
3336
3335
  return handleError(function (arg0, arg1, arg2) {
3337
3336
  let deferred0_0;
3338
3337
  let deferred0_1;
@@ -3347,6 +3346,16 @@ module.exports.__wbg_get_f2cf19c228273ccd = function () {
3347
3346
  }, arguments);
3348
3347
  };
3349
3348
 
3349
+ module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
3350
+ const ret = getObject(arg0)[arg1 >>> 0];
3351
+ return addHeapObject(ret);
3352
+ };
3353
+
3354
+ module.exports.__wbg_getaccesstoken_136d18c86407dc71 = function (arg0) {
3355
+ const ret = getObject(arg0).get_access_token();
3356
+ return addHeapObject(ret);
3357
+ };
3358
+
3350
3359
  module.exports.__wbg_getwithrefkey_1dc361bd10053bfe = function (arg0, arg1) {
3351
3360
  const ret = getObject(arg0)[getObject(arg1)];
3352
3361
  return addHeapObject(ret);
@@ -3447,7 +3456,7 @@ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
3447
3456
  return ret;
3448
3457
  };
3449
3458
 
3450
- module.exports.__wbg_list_44550bfaba0280ab = function () {
3459
+ module.exports.__wbg_list_3165ae7a631e4388 = function () {
3451
3460
  return handleError(function (arg0) {
3452
3461
  const ret = getObject(arg0).list();
3453
3462
  return addHeapObject(ret);
@@ -3482,7 +3491,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
3482
3491
  const a = state0.a;
3483
3492
  state0.a = 0;
3484
3493
  try {
3485
- return __wbg_adapter_274(a, state0.b, arg0, arg1);
3494
+ return __wbg_adapter_276(a, state0.b, arg0, arg1);
3486
3495
  } finally {
3487
3496
  state0.a = a;
3488
3497
  }
@@ -3624,7 +3633,7 @@ module.exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
3624
3633
  }, arguments);
3625
3634
  };
3626
3635
 
3627
- module.exports.__wbg_remove_a55b06e54750d4ab = function () {
3636
+ module.exports.__wbg_remove_fd0081a475f8a37b = function () {
3628
3637
  return handleError(function (arg0, arg1, arg2) {
3629
3638
  let deferred0_0;
3630
3639
  let deferred0_1;
@@ -3671,7 +3680,11 @@ module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
3671
3680
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
3672
3681
  };
3673
3682
 
3674
- module.exports.__wbg_set_4b77629bc769d667 = function () {
3683
+ module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
3684
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3685
+ };
3686
+
3687
+ module.exports.__wbg_set_8d6472bae5625430 = function () {
3675
3688
  return handleError(function (arg0, arg1, arg2, arg3) {
3676
3689
  let deferred0_0;
3677
3690
  let deferred0_1;
@@ -3686,10 +3699,6 @@ module.exports.__wbg_set_4b77629bc769d667 = function () {
3686
3699
  }, arguments);
3687
3700
  };
3688
3701
 
3689
- module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
3690
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3691
- };
3692
-
3693
3702
  module.exports.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
3694
3703
  getObject(arg0).body = getObject(arg1);
3695
3704
  };
@@ -3869,18 +3878,18 @@ module.exports.__wbindgen_cb_drop = function (arg0) {
3869
3878
  return ret;
3870
3879
  };
3871
3880
 
3872
- module.exports.__wbindgen_closure_wrapper2839 = function (arg0, arg1, arg2) {
3873
- const ret = makeMutClosure(arg0, arg1, 904, __wbg_adapter_50);
3881
+ module.exports.__wbindgen_closure_wrapper2853 = function (arg0, arg1, arg2) {
3882
+ const ret = makeMutClosure(arg0, arg1, 913, __wbg_adapter_50);
3874
3883
  return addHeapObject(ret);
3875
3884
  };
3876
3885
 
3877
- module.exports.__wbindgen_closure_wrapper3679 = function (arg0, arg1, arg2) {
3878
- const ret = makeMutClosure(arg0, arg1, 988, __wbg_adapter_53);
3886
+ module.exports.__wbindgen_closure_wrapper3693 = function (arg0, arg1, arg2) {
3887
+ const ret = makeMutClosure(arg0, arg1, 997, __wbg_adapter_53);
3879
3888
  return addHeapObject(ret);
3880
3889
  };
3881
3890
 
3882
- module.exports.__wbindgen_closure_wrapper4097 = function (arg0, arg1, arg2) {
3883
- const ret = makeMutClosure(arg0, arg1, 1111, __wbg_adapter_56);
3891
+ module.exports.__wbindgen_closure_wrapper4111 = function (arg0, arg1, arg2) {
3892
+ const ret = makeMutClosure(arg0, arg1, 1120, __wbg_adapter_56);
3884
3893
  return addHeapObject(ret);
3885
3894
  };
3886
3895
 
@@ -148,7 +148,7 @@ export const __wbg_foldersclient_free: (a: number, b: number) => void;
148
148
  export const __wbg_vaultclient_free: (a: number, b: number) => void;
149
149
  export const __wbg_totpclient_free: (a: number, b: number) => void;
150
150
  export const __wbg_bitwardenclient_free: (a: number, b: number) => void;
151
- export const bitwardenclient_new: (a: number) => number;
151
+ export const bitwardenclient_new: (a: number, b: number) => number;
152
152
  export const bitwardenclient_echo: (a: number, b: number, c: number, d: number) => void;
153
153
  export const bitwardenclient_version: (a: number, b: number) => void;
154
154
  export const bitwardenclient_throw: (a: number, b: number, c: number, d: number) => void;
@@ -314,9 +314,9 @@ export const purecrypto_unwrap_encapsulation_key: (
314
314
  export const bitwardenclient_vault: (a: number) => number;
315
315
  export const bitwardenclient_generator: (a: number) => number;
316
316
  export const bitwardenclient_exporters: (a: number) => number;
317
- export const __wbg_stateclient_free: (a: number, b: number) => void;
318
317
  export const __wbg_platformclient_free: (a: number, b: number) => void;
319
318
  export const platformclient_state: (a: number) => number;
319
+ export const __wbg_stateclient_free: (a: number, b: number) => void;
320
320
  export const __wbindgen_malloc: (a: number, b: number) => number;
321
321
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
322
322
  export const __wbindgen_exn_store: (a: number) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitwarden/sdk-internal",
3
- "version": "0.2.0-main.219",
3
+ "version": "0.2.0-main.220",
4
4
  "license": "GPL-3.0",
5
5
  "files": [
6
6
  "bitwarden_wasm_internal_bg.js",