@bitwarden/sdk-internal 0.2.0-main.325 → 0.2.0-main.330
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 +8 -2
- package/bitwarden_wasm_internal_bg.js +62 -43
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +3 -2
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +8 -2
- package/node/bitwarden_wasm_internal.js +62 -43
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +3 -2
- package/package.json +1 -1
|
@@ -169,6 +169,11 @@ export interface TokenProvider {
|
|
|
169
169
|
*/
|
|
170
170
|
export interface FeatureFlags extends Map<string, boolean> {}
|
|
171
171
|
|
|
172
|
+
export interface Repositories {
|
|
173
|
+
cipher: Repository<Cipher> | null;
|
|
174
|
+
folder: Repository<Folder> | null;
|
|
175
|
+
}
|
|
176
|
+
|
|
172
177
|
export interface IndexedDbConfiguration {
|
|
173
178
|
db_name: string;
|
|
174
179
|
}
|
|
@@ -2136,8 +2141,9 @@ export class SendAccessClient {
|
|
|
2136
2141
|
export class StateClient {
|
|
2137
2142
|
private constructor();
|
|
2138
2143
|
free(): void;
|
|
2139
|
-
register_cipher_repository(cipher_repository:
|
|
2140
|
-
register_folder_repository(store:
|
|
2144
|
+
register_cipher_repository(cipher_repository: any): void;
|
|
2145
|
+
register_folder_repository(store: any): void;
|
|
2146
|
+
register_client_managed_repositories(repositories: Repositories): void;
|
|
2141
2147
|
/**
|
|
2142
2148
|
* Initialize the database for SDK managed repositories.
|
|
2143
2149
|
*/
|
|
@@ -120,6 +120,10 @@ function getStringFromWasm0(ptr, len) {
|
|
|
120
120
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
function isLikeNone(x) {
|
|
124
|
+
return x === undefined || x === null;
|
|
125
|
+
}
|
|
126
|
+
|
|
123
127
|
function dropObject(idx) {
|
|
124
128
|
if (idx < 132) return;
|
|
125
129
|
heap[idx] = heap_next;
|
|
@@ -132,10 +136,6 @@ function takeObject(idx) {
|
|
|
132
136
|
return ret;
|
|
133
137
|
}
|
|
134
138
|
|
|
135
|
-
function isLikeNone(x) {
|
|
136
|
-
return x === undefined || x === null;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
139
|
function getArrayU8FromWasm0(ptr, len) {
|
|
140
140
|
ptr = ptr >>> 0;
|
|
141
141
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
@@ -815,7 +815,7 @@ module.exports.isEncryptFileError = function (error) {
|
|
|
815
815
|
};
|
|
816
816
|
|
|
817
817
|
function __wbg_adapter_54(arg0, arg1, arg2) {
|
|
818
|
-
wasm.
|
|
818
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb3d7232059e1cc02(
|
|
819
819
|
arg0,
|
|
820
820
|
arg1,
|
|
821
821
|
addHeapObject(arg2),
|
|
@@ -825,7 +825,7 @@ function __wbg_adapter_54(arg0, arg1, arg2) {
|
|
|
825
825
|
function __wbg_adapter_57(arg0, arg1, arg2) {
|
|
826
826
|
try {
|
|
827
827
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
828
|
-
wasm.
|
|
828
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbddb05d650eb93e1(
|
|
829
829
|
retptr,
|
|
830
830
|
arg0,
|
|
831
831
|
arg1,
|
|
@@ -848,7 +848,7 @@ function __wbg_adapter_60(arg0, arg1) {
|
|
|
848
848
|
);
|
|
849
849
|
}
|
|
850
850
|
|
|
851
|
-
function
|
|
851
|
+
function __wbg_adapter_341(arg0, arg1, arg2, arg3) {
|
|
852
852
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h54a8613170fef18e(
|
|
853
853
|
arg0,
|
|
854
854
|
arg1,
|
|
@@ -3816,17 +3816,26 @@ class StateClient {
|
|
|
3816
3816
|
wasm.__wbg_stateclient_free(ptr, 0);
|
|
3817
3817
|
}
|
|
3818
3818
|
/**
|
|
3819
|
-
* @param {
|
|
3819
|
+
* @param {any} cipher_repository
|
|
3820
3820
|
*/
|
|
3821
3821
|
register_cipher_repository(cipher_repository) {
|
|
3822
3822
|
wasm.stateclient_register_cipher_repository(this.__wbg_ptr, addHeapObject(cipher_repository));
|
|
3823
3823
|
}
|
|
3824
3824
|
/**
|
|
3825
|
-
* @param {
|
|
3825
|
+
* @param {any} store
|
|
3826
3826
|
*/
|
|
3827
3827
|
register_folder_repository(store) {
|
|
3828
3828
|
wasm.stateclient_register_folder_repository(this.__wbg_ptr, addHeapObject(store));
|
|
3829
3829
|
}
|
|
3830
|
+
/**
|
|
3831
|
+
* @param {Repositories} repositories
|
|
3832
|
+
*/
|
|
3833
|
+
register_client_managed_repositories(repositories) {
|
|
3834
|
+
wasm.stateclient_register_client_managed_repositories(
|
|
3835
|
+
this.__wbg_ptr,
|
|
3836
|
+
addHeapObject(repositories),
|
|
3837
|
+
);
|
|
3838
|
+
}
|
|
3830
3839
|
/**
|
|
3831
3840
|
* Initialize the database for SDK managed repositories.
|
|
3832
3841
|
* @param {IndexedDbConfiguration} configuration
|
|
@@ -4052,6 +4061,11 @@ module.exports.__wbg_call_7cccdd69e0791ae2 = function () {
|
|
|
4052
4061
|
}, arguments);
|
|
4053
4062
|
};
|
|
4054
4063
|
|
|
4064
|
+
module.exports.__wbg_cipher_8e726269feb7de5d = function (arg0) {
|
|
4065
|
+
const ret = getObject(arg0).cipher;
|
|
4066
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4067
|
+
};
|
|
4068
|
+
|
|
4055
4069
|
module.exports.__wbg_clearTimeout_b1115618e821c3b2 = function (arg0) {
|
|
4056
4070
|
const ret = clearTimeout(takeObject(arg0));
|
|
4057
4071
|
return addHeapObject(ret);
|
|
@@ -4127,6 +4141,11 @@ module.exports.__wbg_fetch_509096533071c657 = function (arg0, arg1) {
|
|
|
4127
4141
|
return addHeapObject(ret);
|
|
4128
4142
|
};
|
|
4129
4143
|
|
|
4144
|
+
module.exports.__wbg_folder_7b9420ecc7a630d2 = function (arg0) {
|
|
4145
|
+
const ret = getObject(arg0).folder;
|
|
4146
|
+
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4147
|
+
};
|
|
4148
|
+
|
|
4130
4149
|
module.exports.__wbg_getRandomValues_38097e921c2494c3 = function () {
|
|
4131
4150
|
return handleError(function (arg0, arg1) {
|
|
4132
4151
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
@@ -4144,7 +4163,7 @@ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
|
|
|
4144
4163
|
return ret;
|
|
4145
4164
|
};
|
|
4146
4165
|
|
|
4147
|
-
module.exports.
|
|
4166
|
+
module.exports.__wbg_get_2158d2342e2b6e8a = function () {
|
|
4148
4167
|
return handleError(function (arg0, arg1, arg2) {
|
|
4149
4168
|
let deferred0_0;
|
|
4150
4169
|
let deferred0_1;
|
|
@@ -4166,7 +4185,12 @@ module.exports.__wbg_get_67b2ba62fc30de12 = function () {
|
|
|
4166
4185
|
}, arguments);
|
|
4167
4186
|
};
|
|
4168
4187
|
|
|
4169
|
-
module.exports.
|
|
4188
|
+
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
4189
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
4190
|
+
return addHeapObject(ret);
|
|
4191
|
+
};
|
|
4192
|
+
|
|
4193
|
+
module.exports.__wbg_get_e95a8289dc0f8bce = function () {
|
|
4170
4194
|
return handleError(function (arg0, arg1, arg2) {
|
|
4171
4195
|
let deferred0_0;
|
|
4172
4196
|
let deferred0_1;
|
|
@@ -4181,12 +4205,7 @@ module.exports.__wbg_get_82785db1949ef1f5 = function () {
|
|
|
4181
4205
|
}, arguments);
|
|
4182
4206
|
};
|
|
4183
4207
|
|
|
4184
|
-
module.exports.
|
|
4185
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
4186
|
-
return addHeapObject(ret);
|
|
4187
|
-
};
|
|
4188
|
-
|
|
4189
|
-
module.exports.__wbg_getaccesstoken_cace9d9a44e05512 = function (arg0) {
|
|
4208
|
+
module.exports.__wbg_getaccesstoken_b7ca9513e7467595 = function (arg0) {
|
|
4190
4209
|
const ret = getObject(arg0).get_access_token();
|
|
4191
4210
|
return addHeapObject(ret);
|
|
4192
4211
|
};
|
|
@@ -4371,14 +4390,14 @@ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
|
|
|
4371
4390
|
return ret;
|
|
4372
4391
|
};
|
|
4373
4392
|
|
|
4374
|
-
module.exports.
|
|
4393
|
+
module.exports.__wbg_list_670640e283e85e10 = function () {
|
|
4375
4394
|
return handleError(function (arg0) {
|
|
4376
4395
|
const ret = getObject(arg0).list();
|
|
4377
4396
|
return addHeapObject(ret);
|
|
4378
4397
|
}, arguments);
|
|
4379
4398
|
};
|
|
4380
4399
|
|
|
4381
|
-
module.exports.
|
|
4400
|
+
module.exports.__wbg_list_eead26c9de2b2f49 = function () {
|
|
4382
4401
|
return handleError(function (arg0) {
|
|
4383
4402
|
const ret = getObject(arg0).list();
|
|
4384
4403
|
return addHeapObject(ret);
|
|
@@ -4421,7 +4440,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
|
|
|
4421
4440
|
const a = state0.a;
|
|
4422
4441
|
state0.a = 0;
|
|
4423
4442
|
try {
|
|
4424
|
-
return
|
|
4443
|
+
return __wbg_adapter_341(a, state0.b, arg0, arg1);
|
|
4425
4444
|
} finally {
|
|
4426
4445
|
state0.a = a;
|
|
4427
4446
|
}
|
|
@@ -4579,7 +4598,7 @@ module.exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
|
|
|
4579
4598
|
}, arguments);
|
|
4580
4599
|
};
|
|
4581
4600
|
|
|
4582
|
-
module.exports.
|
|
4601
|
+
module.exports.__wbg_remove_1c2e817103f0304d = function () {
|
|
4583
4602
|
return handleError(function (arg0, arg1, arg2) {
|
|
4584
4603
|
let deferred0_0;
|
|
4585
4604
|
let deferred0_1;
|
|
@@ -4594,7 +4613,7 @@ module.exports.__wbg_remove_f439fa006b0badbf = function () {
|
|
|
4594
4613
|
}, arguments);
|
|
4595
4614
|
};
|
|
4596
4615
|
|
|
4597
|
-
module.exports.
|
|
4616
|
+
module.exports.__wbg_remove_82da0bcc313452b0 = function () {
|
|
4598
4617
|
return handleError(function (arg0, arg1, arg2) {
|
|
4599
4618
|
let deferred0_0;
|
|
4600
4619
|
let deferred0_1;
|
|
@@ -4640,6 +4659,21 @@ module.exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
|
|
|
4640
4659
|
return addHeapObject(ret);
|
|
4641
4660
|
};
|
|
4642
4661
|
|
|
4662
|
+
module.exports.__wbg_set_125ef01e0d626680 = function () {
|
|
4663
|
+
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4664
|
+
let deferred0_0;
|
|
4665
|
+
let deferred0_1;
|
|
4666
|
+
try {
|
|
4667
|
+
deferred0_0 = arg1;
|
|
4668
|
+
deferred0_1 = arg2;
|
|
4669
|
+
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
4670
|
+
return addHeapObject(ret);
|
|
4671
|
+
} finally {
|
|
4672
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
4673
|
+
}
|
|
4674
|
+
}, arguments);
|
|
4675
|
+
};
|
|
4676
|
+
|
|
4643
4677
|
module.exports.__wbg_set_37837023f3d740e8 = function (arg0, arg1, arg2) {
|
|
4644
4678
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
4645
4679
|
};
|
|
@@ -4657,22 +4691,7 @@ module.exports.__wbg_set_8fc6bf8a5b1071d1 = function (arg0, arg1, arg2) {
|
|
|
4657
4691
|
return addHeapObject(ret);
|
|
4658
4692
|
};
|
|
4659
4693
|
|
|
4660
|
-
module.exports.
|
|
4661
|
-
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4662
|
-
let deferred0_0;
|
|
4663
|
-
let deferred0_1;
|
|
4664
|
-
try {
|
|
4665
|
-
deferred0_0 = arg1;
|
|
4666
|
-
deferred0_1 = arg2;
|
|
4667
|
-
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
4668
|
-
return addHeapObject(ret);
|
|
4669
|
-
} finally {
|
|
4670
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
4671
|
-
}
|
|
4672
|
-
}, arguments);
|
|
4673
|
-
};
|
|
4674
|
-
|
|
4675
|
-
module.exports.__wbg_set_f1735479eb605586 = function () {
|
|
4694
|
+
module.exports.__wbg_set_fb32a3bce13cbc73 = function () {
|
|
4676
4695
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4677
4696
|
let deferred0_0;
|
|
4678
4697
|
let deferred0_1;
|
|
@@ -4897,27 +4916,27 @@ module.exports.__wbindgen_cb_drop = function (arg0) {
|
|
|
4897
4916
|
return ret;
|
|
4898
4917
|
};
|
|
4899
4918
|
|
|
4900
|
-
module.exports.
|
|
4919
|
+
module.exports.__wbindgen_closure_wrapper193 = function (arg0, arg1, arg2) {
|
|
4901
4920
|
const ret = makeMutClosure(arg0, arg1, 7, __wbg_adapter_54);
|
|
4902
4921
|
return addHeapObject(ret);
|
|
4903
4922
|
};
|
|
4904
4923
|
|
|
4905
|
-
module.exports.
|
|
4924
|
+
module.exports.__wbindgen_closure_wrapper195 = function (arg0, arg1, arg2) {
|
|
4906
4925
|
const ret = makeMutClosure(arg0, arg1, 7, __wbg_adapter_57);
|
|
4907
4926
|
return addHeapObject(ret);
|
|
4908
4927
|
};
|
|
4909
4928
|
|
|
4910
|
-
module.exports.
|
|
4929
|
+
module.exports.__wbindgen_closure_wrapper3848 = function (arg0, arg1, arg2) {
|
|
4911
4930
|
const ret = makeMutClosure(arg0, arg1, 294, __wbg_adapter_60);
|
|
4912
4931
|
return addHeapObject(ret);
|
|
4913
4932
|
};
|
|
4914
4933
|
|
|
4915
|
-
module.exports.
|
|
4934
|
+
module.exports.__wbindgen_closure_wrapper6177 = function (arg0, arg1, arg2) {
|
|
4916
4935
|
const ret = makeMutClosure(arg0, arg1, 319, __wbg_adapter_60);
|
|
4917
4936
|
return addHeapObject(ret);
|
|
4918
4937
|
};
|
|
4919
4938
|
|
|
4920
|
-
module.exports.
|
|
4939
|
+
module.exports.__wbindgen_closure_wrapper6556 = function (arg0, arg1, arg2) {
|
|
4921
4940
|
const ret = makeMutClosure(arg0, arg1, 342, __wbg_adapter_54);
|
|
4922
4941
|
return addHeapObject(ret);
|
|
4923
4942
|
};
|
|
Binary file
|
|
@@ -18,6 +18,7 @@ export const init_sdk: (a: number) => void;
|
|
|
18
18
|
export const platformclient_load_flags: (a: number, b: number, c: number) => void;
|
|
19
19
|
export const stateclient_register_cipher_repository: (a: number, b: number) => void;
|
|
20
20
|
export const stateclient_register_folder_repository: (a: number, b: number) => void;
|
|
21
|
+
export const stateclient_register_client_managed_repositories: (a: number, b: number) => void;
|
|
21
22
|
export const stateclient_initialize_state: (a: number, b: number) => number;
|
|
22
23
|
export const __wbg_purecrypto_free: (a: number, b: number) => void;
|
|
23
24
|
export const purecrypto_symmetric_decrypt: (
|
|
@@ -407,12 +408,12 @@ export const __wbindgen_exn_store: (a: number) => void;
|
|
|
407
408
|
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
408
409
|
export const __wbindgen_export_4: WebAssembly.Table;
|
|
409
410
|
export const __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
410
|
-
export const
|
|
411
|
+
export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb3d7232059e1cc02: (
|
|
411
412
|
a: number,
|
|
412
413
|
b: number,
|
|
413
414
|
c: number,
|
|
414
415
|
) => void;
|
|
415
|
-
export const
|
|
416
|
+
export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbddb05d650eb93e1: (
|
|
416
417
|
a: number,
|
|
417
418
|
b: number,
|
|
418
419
|
c: number,
|