@bitwarden/sdk-internal 0.2.0-main.233 → 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
- f1fc29b660d4669b7618fbd70d42d217e22619d3
1
+ 9f58e9178020ad036265bb7a5c07361dd674ad64
@@ -63,10 +63,25 @@ export enum CipherType {
63
63
  Identity = 4,
64
64
  SshKey = 5,
65
65
  }
66
+ /**
67
+ * Represents the type of a [FieldView].
68
+ */
66
69
  export enum FieldType {
70
+ /**
71
+ * Text field
72
+ */
67
73
  Text = 0,
74
+ /**
75
+ * Hidden text field
76
+ */
68
77
  Hidden = 1,
78
+ /**
79
+ * Boolean field
80
+ */
69
81
  Boolean = 2,
82
+ /**
83
+ * Linked field
84
+ */
70
85
  Linked = 3,
71
86
  }
72
87
  export enum IdentityLinkedIdType {
@@ -1325,6 +1340,17 @@ export class AttachmentsClient {
1325
1340
  encrypted_buffer: Uint8Array,
1326
1341
  ): Uint8Array;
1327
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
+ }
1328
1354
  export class BitwardenClient {
1329
1355
  free(): void;
1330
1356
  constructor(token_provider: any, settings?: ClientSettings | null);
@@ -1338,6 +1364,10 @@ export class BitwardenClient {
1338
1364
  * Test method, calls http endpoint
1339
1365
  */
1340
1366
  http_get(url: string): Promise<string>;
1367
+ /**
1368
+ * Auth related operations.
1369
+ */
1370
+ auth(): AuthClient;
1341
1371
  crypto(): CryptoClient;
1342
1372
  vault(): VaultClient;
1343
1373
  /**
@@ -1715,6 +1745,14 @@ export class PureCrypto {
1715
1745
  */
1716
1746
  static derive_kdf_material(password: Uint8Array, salt: Uint8Array, kdf: Kdf): Uint8Array;
1717
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
+ }
1718
1756
  export class StateClient {
1719
1757
  private constructor();
1720
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,
@@ -847,15 +847,28 @@ export const CipherType = Object.freeze({
847
847
  5: "SshKey",
848
848
  });
849
849
  /**
850
+ * Represents the type of a [FieldView].
850
851
  * @enum {0 | 1 | 2 | 3}
851
852
  */
852
853
  export const FieldType = Object.freeze({
854
+ /**
855
+ * Text field
856
+ */
853
857
  Text: 0,
854
858
  0: "Text",
859
+ /**
860
+ * Hidden text field
861
+ */
855
862
  Hidden: 1,
856
863
  1: "Hidden",
864
+ /**
865
+ * Boolean field
866
+ */
857
867
  Boolean: 2,
858
868
  2: "Boolean",
869
+ /**
870
+ * Linked field
871
+ */
859
872
  Linked: 3,
860
873
  3: "Linked",
861
874
  });
@@ -1015,6 +1028,43 @@ export class AttachmentsClient {
1015
1028
  }
1016
1029
  }
1017
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
+
1018
1068
  const BitwardenClientFinalization =
1019
1069
  typeof FinalizationRegistry === "undefined"
1020
1070
  ? { register: () => {}, unregister: () => {} }
@@ -1116,6 +1166,14 @@ export class BitwardenClient {
1116
1166
  const ret = wasm.bitwardenclient_http_get(this.__wbg_ptr, ptr0, len0);
1117
1167
  return takeObject(ret);
1118
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
+ }
1119
1177
  /**
1120
1178
  * @returns {CryptoClient}
1121
1179
  */
@@ -3204,6 +3262,44 @@ export class PureCrypto {
3204
3262
  }
3205
3263
  }
3206
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
+
3207
3303
  const StateClientFinalization =
3208
3304
  typeof FinalizationRegistry === "undefined"
3209
3305
  ? { register: () => {}, unregister: () => {} }
@@ -3500,7 +3596,7 @@ export function __wbg_getTime_46267b1c24877e30(arg0) {
3500
3596
  return ret;
3501
3597
  }
3502
3598
 
3503
- export function __wbg_get_1e936e9c132ed56a() {
3599
+ export function __wbg_get_0cadee1906808c79() {
3504
3600
  return handleError(function (arg0, arg1, arg2) {
3505
3601
  let deferred0_0;
3506
3602
  let deferred0_1;
@@ -3515,7 +3611,7 @@ export function __wbg_get_1e936e9c132ed56a() {
3515
3611
  }, arguments);
3516
3612
  }
3517
3613
 
3518
- export function __wbg_get_63d4ac1519cd683d() {
3614
+ export function __wbg_get_4b0b3ed275354e7d() {
3519
3615
  return handleError(function (arg0, arg1, arg2) {
3520
3616
  let deferred0_0;
3521
3617
  let deferred0_1;
@@ -3542,7 +3638,7 @@ export function __wbg_get_b9b93047fe3cf45b(arg0, arg1) {
3542
3638
  return addHeapObject(ret);
3543
3639
  }
3544
3640
 
3545
- export function __wbg_getaccesstoken_5c1081642adb54b3(arg0) {
3641
+ export function __wbg_getaccesstoken_b58303a84b075766(arg0) {
3546
3642
  const ret = getObject(arg0).get_access_token();
3547
3643
  return addHeapObject(ret);
3548
3644
  }
@@ -3647,14 +3743,14 @@ export function __wbg_length_e2d2a49132c1b256(arg0) {
3647
3743
  return ret;
3648
3744
  }
3649
3745
 
3650
- export function __wbg_list_d51438674d2a6409() {
3746
+ export function __wbg_list_348eff73734ce88a() {
3651
3747
  return handleError(function (arg0) {
3652
3748
  const ret = getObject(arg0).list();
3653
3749
  return addHeapObject(ret);
3654
3750
  }, arguments);
3655
3751
  }
3656
3752
 
3657
- export function __wbg_list_ee640fea1b320673() {
3753
+ export function __wbg_list_5b39b27accd04294() {
3658
3754
  return handleError(function (arg0) {
3659
3755
  const ret = getObject(arg0).list();
3660
3756
  return addHeapObject(ret);
@@ -3689,7 +3785,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
3689
3785
  const a = state0.a;
3690
3786
  state0.a = 0;
3691
3787
  try {
3692
- return __wbg_adapter_300(a, state0.b, arg0, arg1);
3788
+ return __wbg_adapter_303(a, state0.b, arg0, arg1);
3693
3789
  } finally {
3694
3790
  state0.a = a;
3695
3791
  }
@@ -3831,7 +3927,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
3831
3927
  }, arguments);
3832
3928
  }
3833
3929
 
3834
- export function __wbg_remove_1b7f523b274e28d8() {
3930
+ export function __wbg_remove_91cfed2de422d072() {
3835
3931
  return handleError(function (arg0, arg1, arg2) {
3836
3932
  let deferred0_0;
3837
3933
  let deferred0_1;
@@ -3846,7 +3942,7 @@ export function __wbg_remove_1b7f523b274e28d8() {
3846
3942
  }, arguments);
3847
3943
  }
3848
3944
 
3849
- export function __wbg_remove_b9507a7e3319b5a5() {
3945
+ export function __wbg_remove_c38e3a2bdb1b4a41() {
3850
3946
  return handleError(function (arg0, arg1, arg2) {
3851
3947
  let deferred0_0;
3852
3948
  let deferred0_1;
@@ -3885,11 +3981,7 @@ export function __wbg_setTimeout_ca12ead8b48245e2(arg0, arg1) {
3885
3981
  return addHeapObject(ret);
3886
3982
  }
3887
3983
 
3888
- export function __wbg_set_37837023f3d740e8(arg0, arg1, arg2) {
3889
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
3890
- }
3891
-
3892
- export function __wbg_set_39adcc20133bca63() {
3984
+ export function __wbg_set_240df6b209d9fff7() {
3893
3985
  return handleError(function (arg0, arg1, arg2, arg3) {
3894
3986
  let deferred0_0;
3895
3987
  let deferred0_1;
@@ -3904,15 +3996,7 @@ export function __wbg_set_39adcc20133bca63() {
3904
3996
  }, arguments);
3905
3997
  }
3906
3998
 
3907
- export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
3908
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
3909
- }
3910
-
3911
- export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) {
3912
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3913
- }
3914
-
3915
- export function __wbg_set_7a0f45f61f570f10() {
3999
+ export function __wbg_set_371c14d6e3b20a42() {
3916
4000
  return handleError(function (arg0, arg1, arg2, arg3) {
3917
4001
  let deferred0_0;
3918
4002
  let deferred0_1;
@@ -3927,6 +4011,18 @@ export function __wbg_set_7a0f45f61f570f10() {
3927
4011
  }, arguments);
3928
4012
  }
3929
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
+
3930
4026
  export function __wbg_setbody_5923b78a95eedf29(arg0, arg1) {
3931
4027
  getObject(arg0).body = getObject(arg1);
3932
4028
  }
@@ -4115,17 +4211,17 @@ export function __wbindgen_cb_drop(arg0) {
4115
4211
  return ret;
4116
4212
  }
4117
4213
 
4118
- export function __wbindgen_closure_wrapper3124(arg0, arg1, arg2) {
4214
+ export function __wbindgen_closure_wrapper3227(arg0, arg1, arg2) {
4119
4215
  const ret = makeMutClosure(arg0, arg1, 221, __wbg_adapter_54);
4120
4216
  return addHeapObject(ret);
4121
4217
  }
4122
4218
 
4123
- export function __wbindgen_closure_wrapper5341(arg0, arg1, arg2) {
4219
+ export function __wbindgen_closure_wrapper5409(arg0, arg1, arg2) {
4124
4220
  const ret = makeMutClosure(arg0, arg1, 246, __wbg_adapter_54);
4125
4221
  return addHeapObject(ret);
4126
4222
  }
4127
4223
 
4128
- export function __wbindgen_closure_wrapper5698(arg0, arg1, arg2) {
4224
+ export function __wbindgen_closure_wrapper5768(arg0, arg1, arg2) {
4129
4225
  const ret = makeMutClosure(arg0, arg1, 272, __wbg_adapter_59);
4130
4226
  return addHeapObject(ret);
4131
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;