@bitwarden/sdk-internal 0.2.0-main.221 → 0.2.0-main.222
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 +41 -29
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +1 -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 +41 -29
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +1 -0
- package/package.json +1 -1
|
@@ -835,6 +835,24 @@ export interface CipherListView {
|
|
|
835
835
|
localData: LocalDataView | undefined;
|
|
836
836
|
}
|
|
837
837
|
|
|
838
|
+
/**
|
|
839
|
+
* Represents the result of decrypting a list of ciphers.
|
|
840
|
+
*
|
|
841
|
+
* This struct contains two vectors: `successes` and `failures`.
|
|
842
|
+
* `successes` contains the decrypted `CipherListView` objects,
|
|
843
|
+
* while `failures` contains the original `Cipher` objects that failed to decrypt.
|
|
844
|
+
*/
|
|
845
|
+
export interface DecryptCipherListResult {
|
|
846
|
+
/**
|
|
847
|
+
* The decrypted `CipherListView` objects.
|
|
848
|
+
*/
|
|
849
|
+
successes: CipherListView[];
|
|
850
|
+
/**
|
|
851
|
+
* The original `Cipher` objects that failed to decrypt.
|
|
852
|
+
*/
|
|
853
|
+
failures: Cipher[];
|
|
854
|
+
}
|
|
855
|
+
|
|
838
856
|
export interface Field {
|
|
839
857
|
name: EncString | undefined;
|
|
840
858
|
value: EncString | undefined;
|
|
@@ -1262,6 +1280,11 @@ export class CiphersClient {
|
|
|
1262
1280
|
encrypt(cipher_view: CipherView): EncryptionContext;
|
|
1263
1281
|
decrypt(cipher: Cipher): CipherView;
|
|
1264
1282
|
decrypt_list(ciphers: Cipher[]): CipherListView[];
|
|
1283
|
+
/**
|
|
1284
|
+
* Decrypt cipher list with failures
|
|
1285
|
+
* Returns both successfully decrypted ciphers and any that failed to decrypt
|
|
1286
|
+
*/
|
|
1287
|
+
decrypt_list_with_failures(ciphers: Cipher[]): DecryptCipherListResult;
|
|
1265
1288
|
decrypt_fido2_credentials(cipher_view: CipherView): Fido2CredentialView[];
|
|
1266
1289
|
move_to_organization(cipher_view: CipherView, organization_id: OrganizationId): CipherView;
|
|
1267
1290
|
decrypt_fido2_private_key(cipher_view: CipherView): string;
|
|
@@ -747,7 +747,7 @@ function __wbg_adapter_56(arg0, arg1, arg2) {
|
|
|
747
747
|
);
|
|
748
748
|
}
|
|
749
749
|
|
|
750
|
-
function
|
|
750
|
+
function __wbg_adapter_278(arg0, arg1, arg2, arg3) {
|
|
751
751
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h8776500d04a3e634(
|
|
752
752
|
arg0,
|
|
753
753
|
arg1,
|
|
@@ -1195,6 +1195,18 @@ class CiphersClient {
|
|
|
1195
1195
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1196
1196
|
}
|
|
1197
1197
|
}
|
|
1198
|
+
/**
|
|
1199
|
+
* Decrypt cipher list with failures
|
|
1200
|
+
* Returns both successfully decrypted ciphers and any that failed to decrypt
|
|
1201
|
+
* @param {Cipher[]} ciphers
|
|
1202
|
+
* @returns {DecryptCipherListResult}
|
|
1203
|
+
*/
|
|
1204
|
+
decrypt_list_with_failures(ciphers) {
|
|
1205
|
+
const ptr0 = passArrayJsValueToWasm0(ciphers, wasm.__wbindgen_malloc);
|
|
1206
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1207
|
+
const ret = wasm.ciphersclient_decrypt_list_with_failures(this.__wbg_ptr, ptr0, len0);
|
|
1208
|
+
return takeObject(ret);
|
|
1209
|
+
}
|
|
1198
1210
|
/**
|
|
1199
1211
|
* @param {CipherView} cipher_view
|
|
1200
1212
|
* @returns {Fido2CredentialView[]}
|
|
@@ -3346,19 +3358,7 @@ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
|
|
|
3346
3358
|
return ret;
|
|
3347
3359
|
};
|
|
3348
3360
|
|
|
3349
|
-
module.exports.
|
|
3350
|
-
return handleError(function (arg0, arg1) {
|
|
3351
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
3352
|
-
return addHeapObject(ret);
|
|
3353
|
-
}, arguments);
|
|
3354
|
-
};
|
|
3355
|
-
|
|
3356
|
-
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
3357
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
3358
|
-
return addHeapObject(ret);
|
|
3359
|
-
};
|
|
3360
|
-
|
|
3361
|
-
module.exports.__wbg_get_d74b07b1ba78be21 = function () {
|
|
3361
|
+
module.exports.__wbg_get_19ade86a11be7465 = function () {
|
|
3362
3362
|
return handleError(function (arg0, arg1, arg2) {
|
|
3363
3363
|
let deferred0_0;
|
|
3364
3364
|
let deferred0_1;
|
|
@@ -3373,7 +3373,19 @@ module.exports.__wbg_get_d74b07b1ba78be21 = function () {
|
|
|
3373
3373
|
}, arguments);
|
|
3374
3374
|
};
|
|
3375
3375
|
|
|
3376
|
-
module.exports.
|
|
3376
|
+
module.exports.__wbg_get_67b2ba62fc30de12 = function () {
|
|
3377
|
+
return handleError(function (arg0, arg1) {
|
|
3378
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
3379
|
+
return addHeapObject(ret);
|
|
3380
|
+
}, arguments);
|
|
3381
|
+
};
|
|
3382
|
+
|
|
3383
|
+
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
3384
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
3385
|
+
return addHeapObject(ret);
|
|
3386
|
+
};
|
|
3387
|
+
|
|
3388
|
+
module.exports.__wbg_getaccesstoken_6f28f7da38d99e02 = function (arg0) {
|
|
3377
3389
|
const ret = getObject(arg0).get_access_token();
|
|
3378
3390
|
return addHeapObject(ret);
|
|
3379
3391
|
};
|
|
@@ -3478,7 +3490,7 @@ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
|
|
|
3478
3490
|
return ret;
|
|
3479
3491
|
};
|
|
3480
3492
|
|
|
3481
|
-
module.exports.
|
|
3493
|
+
module.exports.__wbg_list_405a6847e8a91187 = function () {
|
|
3482
3494
|
return handleError(function (arg0) {
|
|
3483
3495
|
const ret = getObject(arg0).list();
|
|
3484
3496
|
return addHeapObject(ret);
|
|
@@ -3513,7 +3525,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
|
|
|
3513
3525
|
const a = state0.a;
|
|
3514
3526
|
state0.a = 0;
|
|
3515
3527
|
try {
|
|
3516
|
-
return
|
|
3528
|
+
return __wbg_adapter_278(a, state0.b, arg0, arg1);
|
|
3517
3529
|
} finally {
|
|
3518
3530
|
state0.a = a;
|
|
3519
3531
|
}
|
|
@@ -3655,7 +3667,7 @@ module.exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
|
|
|
3655
3667
|
}, arguments);
|
|
3656
3668
|
};
|
|
3657
3669
|
|
|
3658
|
-
module.exports.
|
|
3670
|
+
module.exports.__wbg_remove_bb17db1971104c99 = function () {
|
|
3659
3671
|
return handleError(function (arg0, arg1, arg2) {
|
|
3660
3672
|
let deferred0_0;
|
|
3661
3673
|
let deferred0_1;
|
|
@@ -3702,7 +3714,11 @@ module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
|
|
3702
3714
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
3703
3715
|
};
|
|
3704
3716
|
|
|
3705
|
-
module.exports.
|
|
3717
|
+
module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
|
3718
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
3719
|
+
};
|
|
3720
|
+
|
|
3721
|
+
module.exports.__wbg_set_ff21587e2212f1ae = function () {
|
|
3706
3722
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
3707
3723
|
let deferred0_0;
|
|
3708
3724
|
let deferred0_1;
|
|
@@ -3717,10 +3733,6 @@ module.exports.__wbg_set_616a519deee0d894 = function () {
|
|
|
3717
3733
|
}, arguments);
|
|
3718
3734
|
};
|
|
3719
3735
|
|
|
3720
|
-
module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
|
3721
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
3722
|
-
};
|
|
3723
|
-
|
|
3724
3736
|
module.exports.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
|
|
3725
3737
|
getObject(arg0).body = getObject(arg1);
|
|
3726
3738
|
};
|
|
@@ -3900,18 +3912,18 @@ module.exports.__wbindgen_cb_drop = function (arg0) {
|
|
|
3900
3912
|
return ret;
|
|
3901
3913
|
};
|
|
3902
3914
|
|
|
3903
|
-
module.exports.
|
|
3904
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3915
|
+
module.exports.__wbindgen_closure_wrapper2905 = function (arg0, arg1, arg2) {
|
|
3916
|
+
const ret = makeMutClosure(arg0, arg1, 919, __wbg_adapter_50);
|
|
3905
3917
|
return addHeapObject(ret);
|
|
3906
3918
|
};
|
|
3907
3919
|
|
|
3908
|
-
module.exports.
|
|
3909
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3920
|
+
module.exports.__wbindgen_closure_wrapper3745 = function (arg0, arg1, arg2) {
|
|
3921
|
+
const ret = makeMutClosure(arg0, arg1, 1003, __wbg_adapter_53);
|
|
3910
3922
|
return addHeapObject(ret);
|
|
3911
3923
|
};
|
|
3912
3924
|
|
|
3913
|
-
module.exports.
|
|
3914
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3925
|
+
module.exports.__wbindgen_closure_wrapper4163 = function (arg0, arg1, arg2) {
|
|
3926
|
+
const ret = makeMutClosure(arg0, arg1, 1126, __wbg_adapter_56);
|
|
3915
3927
|
return addHeapObject(ret);
|
|
3916
3928
|
};
|
|
3917
3929
|
|
|
Binary file
|
|
@@ -120,6 +120,7 @@ export const attachmentsclient_decrypt_buffer: (
|
|
|
120
120
|
export const ciphersclient_encrypt: (a: number, b: number, c: number) => void;
|
|
121
121
|
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
|
+
export const ciphersclient_decrypt_list_with_failures: (a: number, b: number, c: number) => number;
|
|
123
124
|
export const ciphersclient_decrypt_fido2_credentials: (a: number, b: number, c: number) => void;
|
|
124
125
|
export const ciphersclient_move_to_organization: (
|
|
125
126
|
a: number,
|