@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 +1 -1
- package/bitwarden_wasm_internal.d.ts +23 -0
- package/bitwarden_wasm_internal_bg.js +121 -38
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +9 -0
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +23 -0
- package/node/bitwarden_wasm_internal.js +123 -38
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +9 -0
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -790,7 +790,7 @@ function __wbg_adapter_59(arg0, arg1, arg2) {
|
|
|
790
790
|
);
|
|
791
791
|
}
|
|
792
792
|
|
|
793
|
-
function
|
|
793
|
+
function __wbg_adapter_303(arg0, arg1, arg2, arg3) {
|
|
794
794
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h54a8613170fef18e(
|
|
795
795
|
arg0,
|
|
796
796
|
arg1,
|
|
@@ -1023,6 +1023,44 @@ class AttachmentsClient {
|
|
|
1023
1023
|
}
|
|
1024
1024
|
module.exports.AttachmentsClient = AttachmentsClient;
|
|
1025
1025
|
|
|
1026
|
+
const AuthClientFinalization =
|
|
1027
|
+
typeof FinalizationRegistry === "undefined"
|
|
1028
|
+
? { register: () => {}, unregister: () => {} }
|
|
1029
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_authclient_free(ptr >>> 0, 1));
|
|
1030
|
+
/**
|
|
1031
|
+
* Subclient containing auth functionality.
|
|
1032
|
+
*/
|
|
1033
|
+
class AuthClient {
|
|
1034
|
+
static __wrap(ptr) {
|
|
1035
|
+
ptr = ptr >>> 0;
|
|
1036
|
+
const obj = Object.create(AuthClient.prototype);
|
|
1037
|
+
obj.__wbg_ptr = ptr;
|
|
1038
|
+
AuthClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1039
|
+
return obj;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
__destroy_into_raw() {
|
|
1043
|
+
const ptr = this.__wbg_ptr;
|
|
1044
|
+
this.__wbg_ptr = 0;
|
|
1045
|
+
AuthClientFinalization.unregister(this);
|
|
1046
|
+
return ptr;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
free() {
|
|
1050
|
+
const ptr = this.__destroy_into_raw();
|
|
1051
|
+
wasm.__wbg_authclient_free(ptr, 0);
|
|
1052
|
+
}
|
|
1053
|
+
/**
|
|
1054
|
+
* Client for send access functionality
|
|
1055
|
+
* @returns {SendAccessClient}
|
|
1056
|
+
*/
|
|
1057
|
+
send_access() {
|
|
1058
|
+
const ret = wasm.authclient_send_access(this.__wbg_ptr);
|
|
1059
|
+
return SendAccessClient.__wrap(ret);
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
module.exports.AuthClient = AuthClient;
|
|
1063
|
+
|
|
1026
1064
|
const BitwardenClientFinalization =
|
|
1027
1065
|
typeof FinalizationRegistry === "undefined"
|
|
1028
1066
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1124,6 +1162,14 @@ class BitwardenClient {
|
|
|
1124
1162
|
const ret = wasm.bitwardenclient_http_get(this.__wbg_ptr, ptr0, len0);
|
|
1125
1163
|
return takeObject(ret);
|
|
1126
1164
|
}
|
|
1165
|
+
/**
|
|
1166
|
+
* Auth related operations.
|
|
1167
|
+
* @returns {AuthClient}
|
|
1168
|
+
*/
|
|
1169
|
+
auth() {
|
|
1170
|
+
const ret = wasm.bitwardenclient_auth(this.__wbg_ptr);
|
|
1171
|
+
return AuthClient.__wrap(ret);
|
|
1172
|
+
}
|
|
1127
1173
|
/**
|
|
1128
1174
|
* @returns {CryptoClient}
|
|
1129
1175
|
*/
|
|
@@ -3225,6 +3271,45 @@ class PureCrypto {
|
|
|
3225
3271
|
}
|
|
3226
3272
|
module.exports.PureCrypto = PureCrypto;
|
|
3227
3273
|
|
|
3274
|
+
const SendAccessClientFinalization =
|
|
3275
|
+
typeof FinalizationRegistry === "undefined"
|
|
3276
|
+
? { register: () => {}, unregister: () => {} }
|
|
3277
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_sendaccessclient_free(ptr >>> 0, 1));
|
|
3278
|
+
|
|
3279
|
+
class SendAccessClient {
|
|
3280
|
+
static __wrap(ptr) {
|
|
3281
|
+
ptr = ptr >>> 0;
|
|
3282
|
+
const obj = Object.create(SendAccessClient.prototype);
|
|
3283
|
+
obj.__wbg_ptr = ptr;
|
|
3284
|
+
SendAccessClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
3285
|
+
return obj;
|
|
3286
|
+
}
|
|
3287
|
+
|
|
3288
|
+
__destroy_into_raw() {
|
|
3289
|
+
const ptr = this.__wbg_ptr;
|
|
3290
|
+
this.__wbg_ptr = 0;
|
|
3291
|
+
SendAccessClientFinalization.unregister(this);
|
|
3292
|
+
return ptr;
|
|
3293
|
+
}
|
|
3294
|
+
|
|
3295
|
+
free() {
|
|
3296
|
+
const ptr = this.__destroy_into_raw();
|
|
3297
|
+
wasm.__wbg_sendaccessclient_free(ptr, 0);
|
|
3298
|
+
}
|
|
3299
|
+
/**
|
|
3300
|
+
* Request an access token for the provided send
|
|
3301
|
+
* @param {string} request
|
|
3302
|
+
* @returns {Promise<string>}
|
|
3303
|
+
*/
|
|
3304
|
+
request_send_access_token(request) {
|
|
3305
|
+
const ptr0 = passStringToWasm0(request, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
3306
|
+
const len0 = WASM_VECTOR_LEN;
|
|
3307
|
+
const ret = wasm.sendaccessclient_request_send_access_token(this.__wbg_ptr, ptr0, len0);
|
|
3308
|
+
return takeObject(ret);
|
|
3309
|
+
}
|
|
3310
|
+
}
|
|
3311
|
+
module.exports.SendAccessClient = SendAccessClient;
|
|
3312
|
+
|
|
3228
3313
|
const StateClientFinalization =
|
|
3229
3314
|
typeof FinalizationRegistry === "undefined"
|
|
3230
3315
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3524,14 +3609,7 @@ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
|
|
|
3524
3609
|
return ret;
|
|
3525
3610
|
};
|
|
3526
3611
|
|
|
3527
|
-
module.exports.
|
|
3528
|
-
return handleError(function (arg0, arg1) {
|
|
3529
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
3530
|
-
return addHeapObject(ret);
|
|
3531
|
-
}, arguments);
|
|
3532
|
-
};
|
|
3533
|
-
|
|
3534
|
-
module.exports.__wbg_get_90ebb47755cb51fb = function () {
|
|
3612
|
+
module.exports.__wbg_get_0cadee1906808c79 = function () {
|
|
3535
3613
|
return handleError(function (arg0, arg1, arg2) {
|
|
3536
3614
|
let deferred0_0;
|
|
3537
3615
|
let deferred0_1;
|
|
@@ -3546,12 +3624,7 @@ module.exports.__wbg_get_90ebb47755cb51fb = function () {
|
|
|
3546
3624
|
}, arguments);
|
|
3547
3625
|
};
|
|
3548
3626
|
|
|
3549
|
-
module.exports.
|
|
3550
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
3551
|
-
return addHeapObject(ret);
|
|
3552
|
-
};
|
|
3553
|
-
|
|
3554
|
-
module.exports.__wbg_get_d49d869dd32dfb0d = function () {
|
|
3627
|
+
module.exports.__wbg_get_4b0b3ed275354e7d = function () {
|
|
3555
3628
|
return handleError(function (arg0, arg1, arg2) {
|
|
3556
3629
|
let deferred0_0;
|
|
3557
3630
|
let deferred0_1;
|
|
@@ -3566,7 +3639,19 @@ module.exports.__wbg_get_d49d869dd32dfb0d = function () {
|
|
|
3566
3639
|
}, arguments);
|
|
3567
3640
|
};
|
|
3568
3641
|
|
|
3569
|
-
module.exports.
|
|
3642
|
+
module.exports.__wbg_get_67b2ba62fc30de12 = function () {
|
|
3643
|
+
return handleError(function (arg0, arg1) {
|
|
3644
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
3645
|
+
return addHeapObject(ret);
|
|
3646
|
+
}, arguments);
|
|
3647
|
+
};
|
|
3648
|
+
|
|
3649
|
+
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
3650
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
3651
|
+
return addHeapObject(ret);
|
|
3652
|
+
};
|
|
3653
|
+
|
|
3654
|
+
module.exports.__wbg_getaccesstoken_b58303a84b075766 = function (arg0) {
|
|
3570
3655
|
const ret = getObject(arg0).get_access_token();
|
|
3571
3656
|
return addHeapObject(ret);
|
|
3572
3657
|
};
|
|
@@ -3671,14 +3756,14 @@ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
|
|
|
3671
3756
|
return ret;
|
|
3672
3757
|
};
|
|
3673
3758
|
|
|
3674
|
-
module.exports.
|
|
3759
|
+
module.exports.__wbg_list_348eff73734ce88a = function () {
|
|
3675
3760
|
return handleError(function (arg0) {
|
|
3676
3761
|
const ret = getObject(arg0).list();
|
|
3677
3762
|
return addHeapObject(ret);
|
|
3678
3763
|
}, arguments);
|
|
3679
3764
|
};
|
|
3680
3765
|
|
|
3681
|
-
module.exports.
|
|
3766
|
+
module.exports.__wbg_list_5b39b27accd04294 = function () {
|
|
3682
3767
|
return handleError(function (arg0) {
|
|
3683
3768
|
const ret = getObject(arg0).list();
|
|
3684
3769
|
return addHeapObject(ret);
|
|
@@ -3713,7 +3798,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
|
|
|
3713
3798
|
const a = state0.a;
|
|
3714
3799
|
state0.a = 0;
|
|
3715
3800
|
try {
|
|
3716
|
-
return
|
|
3801
|
+
return __wbg_adapter_303(a, state0.b, arg0, arg1);
|
|
3717
3802
|
} finally {
|
|
3718
3803
|
state0.a = a;
|
|
3719
3804
|
}
|
|
@@ -3855,7 +3940,7 @@ module.exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
|
|
|
3855
3940
|
}, arguments);
|
|
3856
3941
|
};
|
|
3857
3942
|
|
|
3858
|
-
module.exports.
|
|
3943
|
+
module.exports.__wbg_remove_91cfed2de422d072 = function () {
|
|
3859
3944
|
return handleError(function (arg0, arg1, arg2) {
|
|
3860
3945
|
let deferred0_0;
|
|
3861
3946
|
let deferred0_1;
|
|
@@ -3870,7 +3955,7 @@ module.exports.__wbg_remove_4d57bc728fc99dfd = function () {
|
|
|
3870
3955
|
}, arguments);
|
|
3871
3956
|
};
|
|
3872
3957
|
|
|
3873
|
-
module.exports.
|
|
3958
|
+
module.exports.__wbg_remove_c38e3a2bdb1b4a41 = function () {
|
|
3874
3959
|
return handleError(function (arg0, arg1, arg2) {
|
|
3875
3960
|
let deferred0_0;
|
|
3876
3961
|
let deferred0_1;
|
|
@@ -3909,19 +3994,7 @@ module.exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
|
|
|
3909
3994
|
return addHeapObject(ret);
|
|
3910
3995
|
};
|
|
3911
3996
|
|
|
3912
|
-
module.exports.
|
|
3913
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
3914
|
-
};
|
|
3915
|
-
|
|
3916
|
-
module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
|
3917
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
3918
|
-
};
|
|
3919
|
-
|
|
3920
|
-
module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
|
3921
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
3922
|
-
};
|
|
3923
|
-
|
|
3924
|
-
module.exports.__wbg_set_6f02fcd0077351fd = function () {
|
|
3997
|
+
module.exports.__wbg_set_240df6b209d9fff7 = function () {
|
|
3925
3998
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3926
3999
|
let deferred0_0;
|
|
3927
4000
|
let deferred0_1;
|
|
@@ -3936,7 +4009,7 @@ module.exports.__wbg_set_6f02fcd0077351fd = function () {
|
|
|
3936
4009
|
}, arguments);
|
|
3937
4010
|
};
|
|
3938
4011
|
|
|
3939
|
-
module.exports.
|
|
4012
|
+
module.exports.__wbg_set_371c14d6e3b20a42 = function () {
|
|
3940
4013
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3941
4014
|
let deferred0_0;
|
|
3942
4015
|
let deferred0_1;
|
|
@@ -3951,6 +4024,18 @@ module.exports.__wbg_set_904c83091aaf1bd2 = function () {
|
|
|
3951
4024
|
}, arguments);
|
|
3952
4025
|
};
|
|
3953
4026
|
|
|
4027
|
+
module.exports.__wbg_set_37837023f3d740e8 = function (arg0, arg1, arg2) {
|
|
4028
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
4029
|
+
};
|
|
4030
|
+
|
|
4031
|
+
module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
|
4032
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
4033
|
+
};
|
|
4034
|
+
|
|
4035
|
+
module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
|
4036
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
4037
|
+
};
|
|
4038
|
+
|
|
3954
4039
|
module.exports.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
|
|
3955
4040
|
getObject(arg0).body = getObject(arg1);
|
|
3956
4041
|
};
|
|
@@ -4139,17 +4224,17 @@ module.exports.__wbindgen_cb_drop = function (arg0) {
|
|
|
4139
4224
|
return ret;
|
|
4140
4225
|
};
|
|
4141
4226
|
|
|
4142
|
-
module.exports.
|
|
4227
|
+
module.exports.__wbindgen_closure_wrapper3227 = function (arg0, arg1, arg2) {
|
|
4143
4228
|
const ret = makeMutClosure(arg0, arg1, 221, __wbg_adapter_54);
|
|
4144
4229
|
return addHeapObject(ret);
|
|
4145
4230
|
};
|
|
4146
4231
|
|
|
4147
|
-
module.exports.
|
|
4232
|
+
module.exports.__wbindgen_closure_wrapper5409 = function (arg0, arg1, arg2) {
|
|
4148
4233
|
const ret = makeMutClosure(arg0, arg1, 246, __wbg_adapter_54);
|
|
4149
4234
|
return addHeapObject(ret);
|
|
4150
4235
|
};
|
|
4151
4236
|
|
|
4152
|
-
module.exports.
|
|
4237
|
+
module.exports.__wbindgen_closure_wrapper5768 = function (arg0, arg1, arg2) {
|
|
4153
4238
|
const ret = makeMutClosure(arg0, arg1, 272, __wbg_adapter_59);
|
|
4154
4239
|
return addHeapObject(ret);
|
|
4155
4240
|
};
|
|
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;
|