@bitwarden/sdk-internal 0.2.0-main.226 → 0.2.0-main.228
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 +27 -0
- package/bitwarden_wasm_internal_bg.js +70 -37
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +8 -1
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +27 -0
- package/node/bitwarden_wasm_internal.js +70 -37
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +8 -1
- package/package.json +1 -1
|
@@ -921,6 +921,22 @@ export interface Fido2CredentialView {
|
|
|
921
921
|
creationDate: DateTime<Utc>;
|
|
922
922
|
}
|
|
923
923
|
|
|
924
|
+
export interface Fido2CredentialFullView {
|
|
925
|
+
credentialId: string;
|
|
926
|
+
keyType: string;
|
|
927
|
+
keyAlgorithm: string;
|
|
928
|
+
keyCurve: string;
|
|
929
|
+
keyValue: string;
|
|
930
|
+
rpId: string;
|
|
931
|
+
userHandle: string | undefined;
|
|
932
|
+
userName: string | undefined;
|
|
933
|
+
counter: string;
|
|
934
|
+
rpName: string | undefined;
|
|
935
|
+
userDisplayName: string | undefined;
|
|
936
|
+
discoverable: string;
|
|
937
|
+
creationDate: DateTime<Utc>;
|
|
938
|
+
}
|
|
939
|
+
|
|
924
940
|
export interface Fido2CredentialNewView {
|
|
925
941
|
credentialId: string;
|
|
926
942
|
keyType: string;
|
|
@@ -1299,6 +1315,17 @@ export class CiphersClient {
|
|
|
1299
1315
|
*/
|
|
1300
1316
|
decrypt_list_with_failures(ciphers: Cipher[]): DecryptCipherListResult;
|
|
1301
1317
|
decrypt_fido2_credentials(cipher_view: CipherView): Fido2CredentialView[];
|
|
1318
|
+
/**
|
|
1319
|
+
* Temporary method used to re-encrypt FIDO2 credentials for a cipher view.
|
|
1320
|
+
* Necessary until the TS clients utilize the SDK entirely for FIDO2 credentials management.
|
|
1321
|
+
* TS clients create decrypted FIDO2 credentials that need to be encrypted manually when
|
|
1322
|
+
* encrypting the rest of the CipherView.
|
|
1323
|
+
* TODO: Remove once TS passkey provider implementation uses SDK - PM-8313
|
|
1324
|
+
*/
|
|
1325
|
+
set_fido2_credentials(
|
|
1326
|
+
cipher_view: CipherView,
|
|
1327
|
+
fido2_credentials: Fido2CredentialFullView[],
|
|
1328
|
+
): CipherView;
|
|
1302
1329
|
move_to_organization(cipher_view: CipherView, organization_id: OrganizationId): CipherView;
|
|
1303
1330
|
decrypt_fido2_private_key(cipher_view: CipherView): string;
|
|
1304
1331
|
}
|
|
@@ -747,7 +747,7 @@ function __wbg_adapter_56(arg0, arg1, arg2) {
|
|
|
747
747
|
);
|
|
748
748
|
}
|
|
749
749
|
|
|
750
|
-
function
|
|
750
|
+
function __wbg_adapter_280(arg0, arg1, arg2, arg3) {
|
|
751
751
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h8776500d04a3e634(
|
|
752
752
|
arg0,
|
|
753
753
|
arg1,
|
|
@@ -1233,6 +1233,39 @@ class CiphersClient {
|
|
|
1233
1233
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1234
1234
|
}
|
|
1235
1235
|
}
|
|
1236
|
+
/**
|
|
1237
|
+
* Temporary method used to re-encrypt FIDO2 credentials for a cipher view.
|
|
1238
|
+
* Necessary until the TS clients utilize the SDK entirely for FIDO2 credentials management.
|
|
1239
|
+
* TS clients create decrypted FIDO2 credentials that need to be encrypted manually when
|
|
1240
|
+
* encrypting the rest of the CipherView.
|
|
1241
|
+
* TODO: Remove once TS passkey provider implementation uses SDK - PM-8313
|
|
1242
|
+
* @param {CipherView} cipher_view
|
|
1243
|
+
* @param {Fido2CredentialFullView[]} fido2_credentials
|
|
1244
|
+
* @returns {CipherView}
|
|
1245
|
+
*/
|
|
1246
|
+
set_fido2_credentials(cipher_view, fido2_credentials) {
|
|
1247
|
+
try {
|
|
1248
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1249
|
+
const ptr0 = passArrayJsValueToWasm0(fido2_credentials, wasm.__wbindgen_malloc);
|
|
1250
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1251
|
+
wasm.ciphersclient_set_fido2_credentials(
|
|
1252
|
+
retptr,
|
|
1253
|
+
this.__wbg_ptr,
|
|
1254
|
+
addHeapObject(cipher_view),
|
|
1255
|
+
ptr0,
|
|
1256
|
+
len0,
|
|
1257
|
+
);
|
|
1258
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1259
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1260
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1261
|
+
if (r2) {
|
|
1262
|
+
throw takeObject(r1);
|
|
1263
|
+
}
|
|
1264
|
+
return takeObject(r0);
|
|
1265
|
+
} finally {
|
|
1266
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1236
1269
|
/**
|
|
1237
1270
|
* @param {CipherView} cipher_view
|
|
1238
1271
|
* @param {OrganizationId} organization_id
|
|
@@ -3387,19 +3420,7 @@ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
|
|
|
3387
3420
|
return ret;
|
|
3388
3421
|
};
|
|
3389
3422
|
|
|
3390
|
-
module.exports.
|
|
3391
|
-
return handleError(function (arg0, arg1) {
|
|
3392
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
3393
|
-
return addHeapObject(ret);
|
|
3394
|
-
}, arguments);
|
|
3395
|
-
};
|
|
3396
|
-
|
|
3397
|
-
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
3398
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
3399
|
-
return addHeapObject(ret);
|
|
3400
|
-
};
|
|
3401
|
-
|
|
3402
|
-
module.exports.__wbg_get_d8ed5b5d3b3615a2 = function () {
|
|
3423
|
+
module.exports.__wbg_get_120c6cc3d0f1b0fd = function () {
|
|
3403
3424
|
return handleError(function (arg0, arg1, arg2) {
|
|
3404
3425
|
let deferred0_0;
|
|
3405
3426
|
let deferred0_1;
|
|
@@ -3414,7 +3435,19 @@ module.exports.__wbg_get_d8ed5b5d3b3615a2 = function () {
|
|
|
3414
3435
|
}, arguments);
|
|
3415
3436
|
};
|
|
3416
3437
|
|
|
3417
|
-
module.exports.
|
|
3438
|
+
module.exports.__wbg_get_67b2ba62fc30de12 = function () {
|
|
3439
|
+
return handleError(function (arg0, arg1) {
|
|
3440
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
3441
|
+
return addHeapObject(ret);
|
|
3442
|
+
}, arguments);
|
|
3443
|
+
};
|
|
3444
|
+
|
|
3445
|
+
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
3446
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
3447
|
+
return addHeapObject(ret);
|
|
3448
|
+
};
|
|
3449
|
+
|
|
3450
|
+
module.exports.__wbg_getaccesstoken_c105a68f9fd5bdb2 = function (arg0) {
|
|
3418
3451
|
const ret = getObject(arg0).get_access_token();
|
|
3419
3452
|
return addHeapObject(ret);
|
|
3420
3453
|
};
|
|
@@ -3519,7 +3552,7 @@ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
|
|
|
3519
3552
|
return ret;
|
|
3520
3553
|
};
|
|
3521
3554
|
|
|
3522
|
-
module.exports.
|
|
3555
|
+
module.exports.__wbg_list_a0d7aae8d7c82da2 = function () {
|
|
3523
3556
|
return handleError(function (arg0) {
|
|
3524
3557
|
const ret = getObject(arg0).list();
|
|
3525
3558
|
return addHeapObject(ret);
|
|
@@ -3554,7 +3587,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
|
|
|
3554
3587
|
const a = state0.a;
|
|
3555
3588
|
state0.a = 0;
|
|
3556
3589
|
try {
|
|
3557
|
-
return
|
|
3590
|
+
return __wbg_adapter_280(a, state0.b, arg0, arg1);
|
|
3558
3591
|
} finally {
|
|
3559
3592
|
state0.a = a;
|
|
3560
3593
|
}
|
|
@@ -3696,7 +3729,7 @@ module.exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
|
|
|
3696
3729
|
}, arguments);
|
|
3697
3730
|
};
|
|
3698
3731
|
|
|
3699
|
-
module.exports.
|
|
3732
|
+
module.exports.__wbg_remove_e29cc41a2c391372 = function () {
|
|
3700
3733
|
return handleError(function (arg0, arg1, arg2) {
|
|
3701
3734
|
let deferred0_0;
|
|
3702
3735
|
let deferred0_1;
|
|
@@ -3735,19 +3768,7 @@ module.exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
|
|
|
3735
3768
|
return addHeapObject(ret);
|
|
3736
3769
|
};
|
|
3737
3770
|
|
|
3738
|
-
module.exports.
|
|
3739
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
3740
|
-
};
|
|
3741
|
-
|
|
3742
|
-
module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
|
3743
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
3744
|
-
};
|
|
3745
|
-
|
|
3746
|
-
module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
|
3747
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
3748
|
-
};
|
|
3749
|
-
|
|
3750
|
-
module.exports.__wbg_set_6b2801b1c2b2fcf3 = function () {
|
|
3771
|
+
module.exports.__wbg_set_0fa06fdbae8d1f02 = function () {
|
|
3751
3772
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3752
3773
|
let deferred0_0;
|
|
3753
3774
|
let deferred0_1;
|
|
@@ -3762,6 +3783,18 @@ module.exports.__wbg_set_6b2801b1c2b2fcf3 = function () {
|
|
|
3762
3783
|
}, arguments);
|
|
3763
3784
|
};
|
|
3764
3785
|
|
|
3786
|
+
module.exports.__wbg_set_37837023f3d740e8 = function (arg0, arg1, arg2) {
|
|
3787
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
3788
|
+
};
|
|
3789
|
+
|
|
3790
|
+
module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
|
3791
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
3792
|
+
};
|
|
3793
|
+
|
|
3794
|
+
module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
|
3795
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
3796
|
+
};
|
|
3797
|
+
|
|
3765
3798
|
module.exports.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
|
|
3766
3799
|
getObject(arg0).body = getObject(arg1);
|
|
3767
3800
|
};
|
|
@@ -3941,18 +3974,18 @@ module.exports.__wbindgen_cb_drop = function (arg0) {
|
|
|
3941
3974
|
return ret;
|
|
3942
3975
|
};
|
|
3943
3976
|
|
|
3944
|
-
module.exports.
|
|
3945
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3977
|
+
module.exports.__wbindgen_closure_wrapper2913 = function (arg0, arg1, arg2) {
|
|
3978
|
+
const ret = makeMutClosure(arg0, arg1, 920, __wbg_adapter_50);
|
|
3946
3979
|
return addHeapObject(ret);
|
|
3947
3980
|
};
|
|
3948
3981
|
|
|
3949
|
-
module.exports.
|
|
3950
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3982
|
+
module.exports.__wbindgen_closure_wrapper3753 = function (arg0, arg1, arg2) {
|
|
3983
|
+
const ret = makeMutClosure(arg0, arg1, 1004, __wbg_adapter_53);
|
|
3951
3984
|
return addHeapObject(ret);
|
|
3952
3985
|
};
|
|
3953
3986
|
|
|
3954
|
-
module.exports.
|
|
3955
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3987
|
+
module.exports.__wbindgen_closure_wrapper4171 = function (arg0, arg1, arg2) {
|
|
3988
|
+
const ret = makeMutClosure(arg0, arg1, 1127, __wbg_adapter_56);
|
|
3956
3989
|
return addHeapObject(ret);
|
|
3957
3990
|
};
|
|
3958
3991
|
|
|
Binary file
|
|
@@ -122,6 +122,13 @@ export const ciphersclient_decrypt: (a: number, b: number, c: number) => void;
|
|
|
122
122
|
export const ciphersclient_decrypt_list: (a: number, b: number, c: number, d: number) => void;
|
|
123
123
|
export const ciphersclient_decrypt_list_with_failures: (a: number, b: number, c: number) => number;
|
|
124
124
|
export const ciphersclient_decrypt_fido2_credentials: (a: number, b: number, c: number) => void;
|
|
125
|
+
export const ciphersclient_set_fido2_credentials: (
|
|
126
|
+
a: number,
|
|
127
|
+
b: number,
|
|
128
|
+
c: number,
|
|
129
|
+
d: number,
|
|
130
|
+
e: number,
|
|
131
|
+
) => void;
|
|
125
132
|
export const ciphersclient_move_to_organization: (
|
|
126
133
|
a: number,
|
|
127
134
|
b: number,
|
|
@@ -329,9 +336,9 @@ export const purecrypto_unwrap_encapsulation_key: (
|
|
|
329
336
|
export const bitwardenclient_vault: (a: number) => number;
|
|
330
337
|
export const bitwardenclient_generator: (a: number) => number;
|
|
331
338
|
export const bitwardenclient_exporters: (a: number) => number;
|
|
339
|
+
export const __wbg_stateclient_free: (a: number, b: number) => void;
|
|
332
340
|
export const __wbg_platformclient_free: (a: number, b: number) => void;
|
|
333
341
|
export const platformclient_state: (a: number) => number;
|
|
334
|
-
export const __wbg_stateclient_free: (a: number, b: number) => void;
|
|
335
342
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
336
343
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
337
344
|
export const __wbindgen_exn_store: (a: number) => void;
|