@bitwarden/sdk-internal 0.2.0-main.234 → 0.2.0-main.235

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
- 1ba460c77a0704e15ef3b4c4104c6554f6061d9d
1
+ 9f58e9178020ad036265bb7a5c07361dd674ad64
@@ -1340,6 +1340,17 @@ export class AttachmentsClient {
1340
1340
  encrypted_buffer: Uint8Array,
1341
1341
  ): Uint8Array;
1342
1342
  }
1343
+ /**
1344
+ * Subclient containing auth functionality.
1345
+ */
1346
+ export class AuthClient {
1347
+ private constructor();
1348
+ free(): void;
1349
+ /**
1350
+ * Client for send access functionality
1351
+ */
1352
+ send_access(): SendAccessClient;
1353
+ }
1343
1354
  export class BitwardenClient {
1344
1355
  free(): void;
1345
1356
  constructor(token_provider: any, settings?: ClientSettings | null);
@@ -1353,6 +1364,10 @@ export class BitwardenClient {
1353
1364
  * Test method, calls http endpoint
1354
1365
  */
1355
1366
  http_get(url: string): Promise<string>;
1367
+ /**
1368
+ * Auth related operations.
1369
+ */
1370
+ auth(): AuthClient;
1356
1371
  crypto(): CryptoClient;
1357
1372
  vault(): VaultClient;
1358
1373
  /**
@@ -1730,6 +1745,14 @@ export class PureCrypto {
1730
1745
  */
1731
1746
  static derive_kdf_material(password: Uint8Array, salt: Uint8Array, kdf: Kdf): Uint8Array;
1732
1747
  }
1748
+ export class SendAccessClient {
1749
+ private constructor();
1750
+ free(): void;
1751
+ /**
1752
+ * Request an access token for the provided send
1753
+ */
1754
+ request_send_access_token(request: string): Promise<string>;
1755
+ }
1733
1756
  export class StateClient {
1734
1757
  private constructor();
1735
1758
  free(): void;
@@ -796,7 +796,7 @@ function __wbg_adapter_59(arg0, arg1, arg2) {
796
796
  );
797
797
  }
798
798
 
799
- function __wbg_adapter_300(arg0, arg1, arg2, arg3) {
799
+ function __wbg_adapter_303(arg0, arg1, arg2, arg3) {
800
800
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h54a8613170fef18e(
801
801
  arg0,
802
802
  arg1,
@@ -1028,6 +1028,43 @@ export class AttachmentsClient {
1028
1028
  }
1029
1029
  }
1030
1030
 
1031
+ const AuthClientFinalization =
1032
+ typeof FinalizationRegistry === "undefined"
1033
+ ? { register: () => {}, unregister: () => {} }
1034
+ : new FinalizationRegistry((ptr) => wasm.__wbg_authclient_free(ptr >>> 0, 1));
1035
+ /**
1036
+ * Subclient containing auth functionality.
1037
+ */
1038
+ export class AuthClient {
1039
+ static __wrap(ptr) {
1040
+ ptr = ptr >>> 0;
1041
+ const obj = Object.create(AuthClient.prototype);
1042
+ obj.__wbg_ptr = ptr;
1043
+ AuthClientFinalization.register(obj, obj.__wbg_ptr, obj);
1044
+ return obj;
1045
+ }
1046
+
1047
+ __destroy_into_raw() {
1048
+ const ptr = this.__wbg_ptr;
1049
+ this.__wbg_ptr = 0;
1050
+ AuthClientFinalization.unregister(this);
1051
+ return ptr;
1052
+ }
1053
+
1054
+ free() {
1055
+ const ptr = this.__destroy_into_raw();
1056
+ wasm.__wbg_authclient_free(ptr, 0);
1057
+ }
1058
+ /**
1059
+ * Client for send access functionality
1060
+ * @returns {SendAccessClient}
1061
+ */
1062
+ send_access() {
1063
+ const ret = wasm.authclient_send_access(this.__wbg_ptr);
1064
+ return SendAccessClient.__wrap(ret);
1065
+ }
1066
+ }
1067
+
1031
1068
  const BitwardenClientFinalization =
1032
1069
  typeof FinalizationRegistry === "undefined"
1033
1070
  ? { register: () => {}, unregister: () => {} }
@@ -1129,6 +1166,14 @@ export class BitwardenClient {
1129
1166
  const ret = wasm.bitwardenclient_http_get(this.__wbg_ptr, ptr0, len0);
1130
1167
  return takeObject(ret);
1131
1168
  }
1169
+ /**
1170
+ * Auth related operations.
1171
+ * @returns {AuthClient}
1172
+ */
1173
+ auth() {
1174
+ const ret = wasm.bitwardenclient_auth(this.__wbg_ptr);
1175
+ return AuthClient.__wrap(ret);
1176
+ }
1132
1177
  /**
1133
1178
  * @returns {CryptoClient}
1134
1179
  */
@@ -3217,6 +3262,44 @@ export class PureCrypto {
3217
3262
  }
3218
3263
  }
3219
3264
 
3265
+ const SendAccessClientFinalization =
3266
+ typeof FinalizationRegistry === "undefined"
3267
+ ? { register: () => {}, unregister: () => {} }
3268
+ : new FinalizationRegistry((ptr) => wasm.__wbg_sendaccessclient_free(ptr >>> 0, 1));
3269
+
3270
+ export class SendAccessClient {
3271
+ static __wrap(ptr) {
3272
+ ptr = ptr >>> 0;
3273
+ const obj = Object.create(SendAccessClient.prototype);
3274
+ obj.__wbg_ptr = ptr;
3275
+ SendAccessClientFinalization.register(obj, obj.__wbg_ptr, obj);
3276
+ return obj;
3277
+ }
3278
+
3279
+ __destroy_into_raw() {
3280
+ const ptr = this.__wbg_ptr;
3281
+ this.__wbg_ptr = 0;
3282
+ SendAccessClientFinalization.unregister(this);
3283
+ return ptr;
3284
+ }
3285
+
3286
+ free() {
3287
+ const ptr = this.__destroy_into_raw();
3288
+ wasm.__wbg_sendaccessclient_free(ptr, 0);
3289
+ }
3290
+ /**
3291
+ * Request an access token for the provided send
3292
+ * @param {string} request
3293
+ * @returns {Promise<string>}
3294
+ */
3295
+ request_send_access_token(request) {
3296
+ const ptr0 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3297
+ const len0 = WASM_VECTOR_LEN;
3298
+ const ret = wasm.sendaccessclient_request_send_access_token(this.__wbg_ptr, ptr0, len0);
3299
+ return takeObject(ret);
3300
+ }
3301
+ }
3302
+
3220
3303
  const StateClientFinalization =
3221
3304
  typeof FinalizationRegistry === "undefined"
3222
3305
  ? { register: () => {}, unregister: () => {} }
@@ -3513,14 +3596,7 @@ export function __wbg_getTime_46267b1c24877e30(arg0) {
3513
3596
  return ret;
3514
3597
  }
3515
3598
 
3516
- export function __wbg_get_67b2ba62fc30de12() {
3517
- return handleError(function (arg0, arg1) {
3518
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
3519
- return addHeapObject(ret);
3520
- }, arguments);
3521
- }
3522
-
3523
- export function __wbg_get_90ebb47755cb51fb() {
3599
+ export function __wbg_get_0cadee1906808c79() {
3524
3600
  return handleError(function (arg0, arg1, arg2) {
3525
3601
  let deferred0_0;
3526
3602
  let deferred0_1;
@@ -3535,12 +3611,7 @@ export function __wbg_get_90ebb47755cb51fb() {
3535
3611
  }, arguments);
3536
3612
  }
3537
3613
 
3538
- export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
3539
- const ret = getObject(arg0)[arg1 >>> 0];
3540
- return addHeapObject(ret);
3541
- }
3542
-
3543
- export function __wbg_get_d49d869dd32dfb0d() {
3614
+ export function __wbg_get_4b0b3ed275354e7d() {
3544
3615
  return handleError(function (arg0, arg1, arg2) {
3545
3616
  let deferred0_0;
3546
3617
  let deferred0_1;
@@ -3555,7 +3626,19 @@ export function __wbg_get_d49d869dd32dfb0d() {
3555
3626
  }, arguments);
3556
3627
  }
3557
3628
 
3558
- export function __wbg_getaccesstoken_9de9d7dbfd90255a(arg0) {
3629
+ export function __wbg_get_67b2ba62fc30de12() {
3630
+ return handleError(function (arg0, arg1) {
3631
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
3632
+ return addHeapObject(ret);
3633
+ }, arguments);
3634
+ }
3635
+
3636
+ export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
3637
+ const ret = getObject(arg0)[arg1 >>> 0];
3638
+ return addHeapObject(ret);
3639
+ }
3640
+
3641
+ export function __wbg_getaccesstoken_b58303a84b075766(arg0) {
3559
3642
  const ret = getObject(arg0).get_access_token();
3560
3643
  return addHeapObject(ret);
3561
3644
  }
@@ -3660,14 +3743,14 @@ export function __wbg_length_e2d2a49132c1b256(arg0) {
3660
3743
  return ret;
3661
3744
  }
3662
3745
 
3663
- export function __wbg_list_30c256aaa2cad987() {
3746
+ export function __wbg_list_348eff73734ce88a() {
3664
3747
  return handleError(function (arg0) {
3665
3748
  const ret = getObject(arg0).list();
3666
3749
  return addHeapObject(ret);
3667
3750
  }, arguments);
3668
3751
  }
3669
3752
 
3670
- export function __wbg_list_645df12dc84455e1() {
3753
+ export function __wbg_list_5b39b27accd04294() {
3671
3754
  return handleError(function (arg0) {
3672
3755
  const ret = getObject(arg0).list();
3673
3756
  return addHeapObject(ret);
@@ -3702,7 +3785,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
3702
3785
  const a = state0.a;
3703
3786
  state0.a = 0;
3704
3787
  try {
3705
- return __wbg_adapter_300(a, state0.b, arg0, arg1);
3788
+ return __wbg_adapter_303(a, state0.b, arg0, arg1);
3706
3789
  } finally {
3707
3790
  state0.a = a;
3708
3791
  }
@@ -3844,7 +3927,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
3844
3927
  }, arguments);
3845
3928
  }
3846
3929
 
3847
- export function __wbg_remove_4d57bc728fc99dfd() {
3930
+ export function __wbg_remove_91cfed2de422d072() {
3848
3931
  return handleError(function (arg0, arg1, arg2) {
3849
3932
  let deferred0_0;
3850
3933
  let deferred0_1;
@@ -3859,7 +3942,7 @@ export function __wbg_remove_4d57bc728fc99dfd() {
3859
3942
  }, arguments);
3860
3943
  }
3861
3944
 
3862
- export function __wbg_remove_4e6915c4e89cca81() {
3945
+ export function __wbg_remove_c38e3a2bdb1b4a41() {
3863
3946
  return handleError(function (arg0, arg1, arg2) {
3864
3947
  let deferred0_0;
3865
3948
  let deferred0_1;
@@ -3898,19 +3981,7 @@ export function __wbg_setTimeout_ca12ead8b48245e2(arg0, arg1) {
3898
3981
  return addHeapObject(ret);
3899
3982
  }
3900
3983
 
3901
- export function __wbg_set_37837023f3d740e8(arg0, arg1, arg2) {
3902
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
3903
- }
3904
-
3905
- export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
3906
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
3907
- }
3908
-
3909
- export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
3910
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3911
- }
3912
-
3913
- export function __wbg_set_6f02fcd0077351fd() {
3984
+ export function __wbg_set_240df6b209d9fff7() {
3914
3985
  return handleError(function (arg0, arg1, arg2, arg3) {
3915
3986
  let deferred0_0;
3916
3987
  let deferred0_1;
@@ -3925,7 +3996,7 @@ export function __wbg_set_6f02fcd0077351fd() {
3925
3996
  }, arguments);
3926
3997
  }
3927
3998
 
3928
- export function __wbg_set_904c83091aaf1bd2() {
3999
+ export function __wbg_set_371c14d6e3b20a42() {
3929
4000
  return handleError(function (arg0, arg1, arg2, arg3) {
3930
4001
  let deferred0_0;
3931
4002
  let deferred0_1;
@@ -3940,6 +4011,18 @@ export function __wbg_set_904c83091aaf1bd2() {
3940
4011
  }, arguments);
3941
4012
  }
3942
4013
 
4014
+ export function __wbg_set_37837023f3d740e8(arg0, arg1, arg2) {
4015
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
4016
+ }
4017
+
4018
+ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
4019
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
4020
+ }
4021
+
4022
+ export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
4023
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
4024
+ }
4025
+
3943
4026
  export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
3944
4027
  getObject(arg0).body = getObject(arg1);
3945
4028
  }
@@ -4128,17 +4211,17 @@ export function __wbindgen_cb_drop(arg0) {
4128
4211
  return ret;
4129
4212
  }
4130
4213
 
4131
- export function __wbindgen_closure_wrapper3129(arg0, arg1, arg2) {
4214
+ export function __wbindgen_closure_wrapper3227(arg0, arg1, arg2) {
4132
4215
  const ret = makeMutClosure(arg0, arg1, 221, __wbg_adapter_54);
4133
4216
  return addHeapObject(ret);
4134
4217
  }
4135
4218
 
4136
- export function __wbindgen_closure_wrapper5346(arg0, arg1, arg2) {
4219
+ export function __wbindgen_closure_wrapper5409(arg0, arg1, arg2) {
4137
4220
  const ret = makeMutClosure(arg0, arg1, 246, __wbg_adapter_54);
4138
4221
  return addHeapObject(ret);
4139
4222
  }
4140
4223
 
4141
- export function __wbindgen_closure_wrapper5703(arg0, arg1, arg2) {
4224
+ export function __wbindgen_closure_wrapper5768(arg0, arg1, arg2) {
4142
4225
  const ret = makeMutClosure(arg0, arg1, 272, __wbg_adapter_59);
4143
4226
  return addHeapObject(ret);
4144
4227
  }
Binary file
@@ -7,6 +7,7 @@ export const bitwardenclient_echo: (a: number, b: number, c: number, d: number)
7
7
  export const bitwardenclient_version: (a: number, b: number) => void;
8
8
  export const bitwardenclient_throw: (a: number, b: number, c: number, d: number) => void;
9
9
  export const bitwardenclient_http_get: (a: number, b: number, c: number) => number;
10
+ export const bitwardenclient_auth: (a: number) => number;
10
11
  export const bitwardenclient_crypto: (a: number) => number;
11
12
  export const bitwardenclient_vault: (a: number) => number;
12
13
  export const bitwardenclient_platform: (a: number) => number;
@@ -171,6 +172,13 @@ export const purecrypto_derive_kdf_material: (
171
172
  export const generate_ssh_key: (a: number, b: number) => void;
172
173
  export const import_ssh_key: (a: number, b: number, c: number, d: number, e: number) => void;
173
174
  export const isTestError: (a: number) => number;
175
+ export const __wbg_authclient_free: (a: number, b: number) => void;
176
+ export const authclient_send_access: (a: number) => number;
177
+ export const sendaccessclient_request_send_access_token: (
178
+ a: number,
179
+ b: number,
180
+ c: number,
181
+ ) => number;
174
182
  export const cryptoclient_initialize_user_crypto: (a: number, b: number) => number;
175
183
  export const cryptoclient_initialize_org_crypto: (a: number, b: number) => number;
176
184
  export const cryptoclient_make_key_pair: (a: number, b: number, c: number, d: number) => void;
@@ -338,6 +346,7 @@ export const vaultclient_totp: (a: number) => number;
338
346
  export const __wbg_foldersclient_free: (a: number, b: number) => void;
339
347
  export const __wbg_ciphersclient_free: (a: number, b: number) => void;
340
348
  export const __wbg_vaultclient_free: (a: number, b: number) => void;
349
+ export const __wbg_sendaccessclient_free: (a: number, b: number) => void;
341
350
  export const __wbg_totpclient_free: (a: number, b: number) => void;
342
351
  export const __wbg_get_outgoingmessage_destination: (a: number) => number;
343
352
  export const __wbg_set_outgoingmessage_destination: (a: number, b: number) => void;