@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 +1 -1
- package/bitwarden_wasm_internal.d.ts +38 -0
- package/bitwarden_wasm_internal_bg.js +122 -26
- 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 +38 -0
- package/node/bitwarden_wasm_internal.js +124 -26
- 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
|
@@ -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;
|
|
@@ -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,
|
|
@@ -841,15 +841,28 @@ module.exports.CipherType = Object.freeze({
|
|
|
841
841
|
5: "SshKey",
|
|
842
842
|
});
|
|
843
843
|
/**
|
|
844
|
+
* Represents the type of a [FieldView].
|
|
844
845
|
* @enum {0 | 1 | 2 | 3}
|
|
845
846
|
*/
|
|
846
847
|
module.exports.FieldType = Object.freeze({
|
|
848
|
+
/**
|
|
849
|
+
* Text field
|
|
850
|
+
*/
|
|
847
851
|
Text: 0,
|
|
848
852
|
0: "Text",
|
|
853
|
+
/**
|
|
854
|
+
* Hidden text field
|
|
855
|
+
*/
|
|
849
856
|
Hidden: 1,
|
|
850
857
|
1: "Hidden",
|
|
858
|
+
/**
|
|
859
|
+
* Boolean field
|
|
860
|
+
*/
|
|
851
861
|
Boolean: 2,
|
|
852
862
|
2: "Boolean",
|
|
863
|
+
/**
|
|
864
|
+
* Linked field
|
|
865
|
+
*/
|
|
853
866
|
Linked: 3,
|
|
854
867
|
3: "Linked",
|
|
855
868
|
});
|
|
@@ -1010,6 +1023,44 @@ class AttachmentsClient {
|
|
|
1010
1023
|
}
|
|
1011
1024
|
module.exports.AttachmentsClient = AttachmentsClient;
|
|
1012
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
|
+
|
|
1013
1064
|
const BitwardenClientFinalization =
|
|
1014
1065
|
typeof FinalizationRegistry === "undefined"
|
|
1015
1066
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1111,6 +1162,14 @@ class BitwardenClient {
|
|
|
1111
1162
|
const ret = wasm.bitwardenclient_http_get(this.__wbg_ptr, ptr0, len0);
|
|
1112
1163
|
return takeObject(ret);
|
|
1113
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
|
+
}
|
|
1114
1173
|
/**
|
|
1115
1174
|
* @returns {CryptoClient}
|
|
1116
1175
|
*/
|
|
@@ -3212,6 +3271,45 @@ class PureCrypto {
|
|
|
3212
3271
|
}
|
|
3213
3272
|
module.exports.PureCrypto = PureCrypto;
|
|
3214
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
|
+
|
|
3215
3313
|
const StateClientFinalization =
|
|
3216
3314
|
typeof FinalizationRegistry === "undefined"
|
|
3217
3315
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -3511,7 +3609,7 @@ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
|
|
|
3511
3609
|
return ret;
|
|
3512
3610
|
};
|
|
3513
3611
|
|
|
3514
|
-
module.exports.
|
|
3612
|
+
module.exports.__wbg_get_0cadee1906808c79 = function () {
|
|
3515
3613
|
return handleError(function (arg0, arg1, arg2) {
|
|
3516
3614
|
let deferred0_0;
|
|
3517
3615
|
let deferred0_1;
|
|
@@ -3526,7 +3624,7 @@ module.exports.__wbg_get_1e936e9c132ed56a = function () {
|
|
|
3526
3624
|
}, arguments);
|
|
3527
3625
|
};
|
|
3528
3626
|
|
|
3529
|
-
module.exports.
|
|
3627
|
+
module.exports.__wbg_get_4b0b3ed275354e7d = function () {
|
|
3530
3628
|
return handleError(function (arg0, arg1, arg2) {
|
|
3531
3629
|
let deferred0_0;
|
|
3532
3630
|
let deferred0_1;
|
|
@@ -3553,7 +3651,7 @@ module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
|
3553
3651
|
return addHeapObject(ret);
|
|
3554
3652
|
};
|
|
3555
3653
|
|
|
3556
|
-
module.exports.
|
|
3654
|
+
module.exports.__wbg_getaccesstoken_b58303a84b075766 = function (arg0) {
|
|
3557
3655
|
const ret = getObject(arg0).get_access_token();
|
|
3558
3656
|
return addHeapObject(ret);
|
|
3559
3657
|
};
|
|
@@ -3658,14 +3756,14 @@ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
|
|
|
3658
3756
|
return ret;
|
|
3659
3757
|
};
|
|
3660
3758
|
|
|
3661
|
-
module.exports.
|
|
3759
|
+
module.exports.__wbg_list_348eff73734ce88a = function () {
|
|
3662
3760
|
return handleError(function (arg0) {
|
|
3663
3761
|
const ret = getObject(arg0).list();
|
|
3664
3762
|
return addHeapObject(ret);
|
|
3665
3763
|
}, arguments);
|
|
3666
3764
|
};
|
|
3667
3765
|
|
|
3668
|
-
module.exports.
|
|
3766
|
+
module.exports.__wbg_list_5b39b27accd04294 = function () {
|
|
3669
3767
|
return handleError(function (arg0) {
|
|
3670
3768
|
const ret = getObject(arg0).list();
|
|
3671
3769
|
return addHeapObject(ret);
|
|
@@ -3700,7 +3798,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
|
|
|
3700
3798
|
const a = state0.a;
|
|
3701
3799
|
state0.a = 0;
|
|
3702
3800
|
try {
|
|
3703
|
-
return
|
|
3801
|
+
return __wbg_adapter_303(a, state0.b, arg0, arg1);
|
|
3704
3802
|
} finally {
|
|
3705
3803
|
state0.a = a;
|
|
3706
3804
|
}
|
|
@@ -3842,7 +3940,7 @@ module.exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
|
|
|
3842
3940
|
}, arguments);
|
|
3843
3941
|
};
|
|
3844
3942
|
|
|
3845
|
-
module.exports.
|
|
3943
|
+
module.exports.__wbg_remove_91cfed2de422d072 = function () {
|
|
3846
3944
|
return handleError(function (arg0, arg1, arg2) {
|
|
3847
3945
|
let deferred0_0;
|
|
3848
3946
|
let deferred0_1;
|
|
@@ -3857,7 +3955,7 @@ module.exports.__wbg_remove_1b7f523b274e28d8 = function () {
|
|
|
3857
3955
|
}, arguments);
|
|
3858
3956
|
};
|
|
3859
3957
|
|
|
3860
|
-
module.exports.
|
|
3958
|
+
module.exports.__wbg_remove_c38e3a2bdb1b4a41 = function () {
|
|
3861
3959
|
return handleError(function (arg0, arg1, arg2) {
|
|
3862
3960
|
let deferred0_0;
|
|
3863
3961
|
let deferred0_1;
|
|
@@ -3896,11 +3994,7 @@ module.exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
|
|
|
3896
3994
|
return addHeapObject(ret);
|
|
3897
3995
|
};
|
|
3898
3996
|
|
|
3899
|
-
module.exports.
|
|
3900
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
3901
|
-
};
|
|
3902
|
-
|
|
3903
|
-
module.exports.__wbg_set_39adcc20133bca63 = function () {
|
|
3997
|
+
module.exports.__wbg_set_240df6b209d9fff7 = function () {
|
|
3904
3998
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3905
3999
|
let deferred0_0;
|
|
3906
4000
|
let deferred0_1;
|
|
@@ -3915,15 +4009,7 @@ module.exports.__wbg_set_39adcc20133bca63 = function () {
|
|
|
3915
4009
|
}, arguments);
|
|
3916
4010
|
};
|
|
3917
4011
|
|
|
3918
|
-
module.exports.
|
|
3919
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
3920
|
-
};
|
|
3921
|
-
|
|
3922
|
-
module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
|
3923
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
3924
|
-
};
|
|
3925
|
-
|
|
3926
|
-
module.exports.__wbg_set_7a0f45f61f570f10 = function () {
|
|
4012
|
+
module.exports.__wbg_set_371c14d6e3b20a42 = function () {
|
|
3927
4013
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3928
4014
|
let deferred0_0;
|
|
3929
4015
|
let deferred0_1;
|
|
@@ -3938,6 +4024,18 @@ module.exports.__wbg_set_7a0f45f61f570f10 = function () {
|
|
|
3938
4024
|
}, arguments);
|
|
3939
4025
|
};
|
|
3940
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
|
+
|
|
3941
4039
|
module.exports.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
|
|
3942
4040
|
getObject(arg0).body = getObject(arg1);
|
|
3943
4041
|
};
|
|
@@ -4126,17 +4224,17 @@ module.exports.__wbindgen_cb_drop = function (arg0) {
|
|
|
4126
4224
|
return ret;
|
|
4127
4225
|
};
|
|
4128
4226
|
|
|
4129
|
-
module.exports.
|
|
4227
|
+
module.exports.__wbindgen_closure_wrapper3227 = function (arg0, arg1, arg2) {
|
|
4130
4228
|
const ret = makeMutClosure(arg0, arg1, 221, __wbg_adapter_54);
|
|
4131
4229
|
return addHeapObject(ret);
|
|
4132
4230
|
};
|
|
4133
4231
|
|
|
4134
|
-
module.exports.
|
|
4232
|
+
module.exports.__wbindgen_closure_wrapper5409 = function (arg0, arg1, arg2) {
|
|
4135
4233
|
const ret = makeMutClosure(arg0, arg1, 246, __wbg_adapter_54);
|
|
4136
4234
|
return addHeapObject(ret);
|
|
4137
4235
|
};
|
|
4138
4236
|
|
|
4139
|
-
module.exports.
|
|
4237
|
+
module.exports.__wbindgen_closure_wrapper5768 = function (arg0, arg1, arg2) {
|
|
4140
4238
|
const ret = makeMutClosure(arg0, arg1, 272, __wbg_adapter_59);
|
|
4141
4239
|
return addHeapObject(ret);
|
|
4142
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;
|