@bitwarden/sdk-internal 0.2.0-main.374 → 0.2.0-main.376
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 +20 -1
- package/bitwarden_wasm_internal_bg.js +53 -29
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +5 -4
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +20 -1
- package/node/bitwarden_wasm_internal.js +53 -29
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +8 -7
- package/package.json +1 -1
|
@@ -974,6 +974,12 @@ export interface IpcCommunicationBackendSender {
|
|
|
974
974
|
send(message: OutgoingMessage): Promise<void>;
|
|
975
975
|
}
|
|
976
976
|
|
|
977
|
+
export interface IpcSessionRepository {
|
|
978
|
+
get(endpoint: Endpoint): Promise<any | undefined>;
|
|
979
|
+
save(endpoint: Endpoint, session: any): Promise<void>;
|
|
980
|
+
remove(endpoint: Endpoint): Promise<void>;
|
|
981
|
+
}
|
|
982
|
+
|
|
977
983
|
export interface ChannelError extends Error {
|
|
978
984
|
name: "ChannelError";
|
|
979
985
|
}
|
|
@@ -2222,9 +2228,22 @@ export class IncomingMessage {
|
|
|
2222
2228
|
* [IpcClient] documentation.
|
|
2223
2229
|
*/
|
|
2224
2230
|
export class IpcClient {
|
|
2231
|
+
private constructor();
|
|
2225
2232
|
free(): void;
|
|
2226
2233
|
[Symbol.dispose](): void;
|
|
2227
|
-
|
|
2234
|
+
/**
|
|
2235
|
+
* Create a new `IpcClient` instance with an in-memory session repository for saving
|
|
2236
|
+
* sessions within the SDK.
|
|
2237
|
+
*/
|
|
2238
|
+
static newWithSdkInMemorySessions(communication_provider: IpcCommunicationBackend): IpcClient;
|
|
2239
|
+
/**
|
|
2240
|
+
* Create a new `IpcClient` instance with a client-managed session repository for saving
|
|
2241
|
+
* sessions using State Provider.
|
|
2242
|
+
*/
|
|
2243
|
+
static newWithClientManagedSessions(
|
|
2244
|
+
communication_provider: IpcCommunicationBackend,
|
|
2245
|
+
session_repository: IpcSessionRepository,
|
|
2246
|
+
): IpcClient;
|
|
2228
2247
|
start(): Promise<void>;
|
|
2229
2248
|
isRunning(): Promise<boolean>;
|
|
2230
2249
|
send(message: OutgoingMessage): Promise<void>;
|
|
@@ -865,10 +865,6 @@ exports.isEncryptFileError = function (error) {
|
|
|
865
865
|
}
|
|
866
866
|
};
|
|
867
867
|
|
|
868
|
-
function wasm_bindgen__convert__closures_____invoke__h76c71c1158b6af01(arg0, arg1) {
|
|
869
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h76c71c1158b6af01(arg0, arg1);
|
|
870
|
-
}
|
|
871
|
-
|
|
872
868
|
function wasm_bindgen__convert__closures_____invoke__he84e41ce162f03b8(arg0, arg1, arg2) {
|
|
873
869
|
try {
|
|
874
870
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
@@ -888,6 +884,10 @@ function wasm_bindgen__convert__closures_____invoke__he84e41ce162f03b8(arg0, arg
|
|
|
888
884
|
}
|
|
889
885
|
}
|
|
890
886
|
|
|
887
|
+
function wasm_bindgen__convert__closures_____invoke__h76c71c1158b6af01(arg0, arg1) {
|
|
888
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h76c71c1158b6af01(arg0, arg1);
|
|
889
|
+
}
|
|
890
|
+
|
|
891
891
|
function wasm_bindgen__convert__closures_____invoke__h142f80da75ccedf5(arg0, arg1, arg2) {
|
|
892
892
|
wasm.wasm_bindgen__convert__closures_____invoke__h142f80da75ccedf5(
|
|
893
893
|
arg0,
|
|
@@ -2853,6 +2853,14 @@ const IpcClientFinalization =
|
|
|
2853
2853
|
* [IpcClient] documentation.
|
|
2854
2854
|
*/
|
|
2855
2855
|
class IpcClient {
|
|
2856
|
+
static __wrap(ptr) {
|
|
2857
|
+
ptr = ptr >>> 0;
|
|
2858
|
+
const obj = Object.create(IpcClient.prototype);
|
|
2859
|
+
obj.__wbg_ptr = ptr;
|
|
2860
|
+
IpcClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2861
|
+
return obj;
|
|
2862
|
+
}
|
|
2863
|
+
|
|
2856
2864
|
__destroy_into_raw() {
|
|
2857
2865
|
const ptr = this.__wbg_ptr;
|
|
2858
2866
|
this.__wbg_ptr = 0;
|
|
@@ -2865,14 +2873,30 @@ class IpcClient {
|
|
|
2865
2873
|
wasm.__wbg_ipcclient_free(ptr, 0);
|
|
2866
2874
|
}
|
|
2867
2875
|
/**
|
|
2876
|
+
* Create a new `IpcClient` instance with an in-memory session repository for saving
|
|
2877
|
+
* sessions within the SDK.
|
|
2868
2878
|
* @param {IpcCommunicationBackend} communication_provider
|
|
2879
|
+
* @returns {IpcClient}
|
|
2869
2880
|
*/
|
|
2870
|
-
|
|
2881
|
+
static newWithSdkInMemorySessions(communication_provider) {
|
|
2871
2882
|
_assertClass(communication_provider, IpcCommunicationBackend);
|
|
2872
|
-
const ret = wasm.
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2883
|
+
const ret = wasm.ipcclient_newWithSdkInMemorySessions(communication_provider.__wbg_ptr);
|
|
2884
|
+
return IpcClient.__wrap(ret);
|
|
2885
|
+
}
|
|
2886
|
+
/**
|
|
2887
|
+
* Create a new `IpcClient` instance with a client-managed session repository for saving
|
|
2888
|
+
* sessions using State Provider.
|
|
2889
|
+
* @param {IpcCommunicationBackend} communication_provider
|
|
2890
|
+
* @param {IpcSessionRepository} session_repository
|
|
2891
|
+
* @returns {IpcClient}
|
|
2892
|
+
*/
|
|
2893
|
+
static newWithClientManagedSessions(communication_provider, session_repository) {
|
|
2894
|
+
_assertClass(communication_provider, IpcCommunicationBackend);
|
|
2895
|
+
const ret = wasm.ipcclient_newWithClientManagedSessions(
|
|
2896
|
+
communication_provider.__wbg_ptr,
|
|
2897
|
+
addHeapObject(session_repository),
|
|
2898
|
+
);
|
|
2899
|
+
return IpcClient.__wrap(ret);
|
|
2876
2900
|
}
|
|
2877
2901
|
/**
|
|
2878
2902
|
* @returns {Promise<void>}
|
|
@@ -4448,7 +4472,7 @@ exports.__wbg_call_e762c39fa8ea36bf = function () {
|
|
|
4448
4472
|
}, arguments);
|
|
4449
4473
|
};
|
|
4450
4474
|
|
|
4451
|
-
exports.
|
|
4475
|
+
exports.__wbg_cipher_9701deafaff968bd = function (arg0) {
|
|
4452
4476
|
const ret = getObject(arg0).cipher;
|
|
4453
4477
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4454
4478
|
};
|
|
@@ -4528,7 +4552,7 @@ exports.__wbg_fetch_f8ba0e29a9d6de0d = function (arg0, arg1) {
|
|
|
4528
4552
|
return addHeapObject(ret);
|
|
4529
4553
|
};
|
|
4530
4554
|
|
|
4531
|
-
exports.
|
|
4555
|
+
exports.__wbg_folder_0ac974e0faeac5a3 = function (arg0) {
|
|
4532
4556
|
const ret = getObject(arg0).folder;
|
|
4533
4557
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4534
4558
|
};
|
|
@@ -4555,12 +4579,7 @@ exports.__wbg_getTime_14776bfb48a1bff9 = function (arg0) {
|
|
|
4555
4579
|
return ret;
|
|
4556
4580
|
};
|
|
4557
4581
|
|
|
4558
|
-
exports.
|
|
4559
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
4560
|
-
return addHeapObject(ret);
|
|
4561
|
-
};
|
|
4562
|
-
|
|
4563
|
-
exports.__wbg_get_905bbb36d78e816c = function () {
|
|
4582
|
+
exports.__wbg_get_18698e0d6fcbb417 = function () {
|
|
4564
4583
|
return handleError(function (arg0, arg1, arg2) {
|
|
4565
4584
|
let deferred0_0;
|
|
4566
4585
|
let deferred0_1;
|
|
@@ -4575,12 +4594,7 @@ exports.__wbg_get_905bbb36d78e816c = function () {
|
|
|
4575
4594
|
}, arguments);
|
|
4576
4595
|
};
|
|
4577
4596
|
|
|
4578
|
-
exports.
|
|
4579
|
-
const ret = getObject(arg0).get_access_token();
|
|
4580
|
-
return addHeapObject(ret);
|
|
4581
|
-
};
|
|
4582
|
-
|
|
4583
|
-
exports.__wbg_get_eb8ca7ea2e1397a3 = function () {
|
|
4597
|
+
exports.__wbg_get_30883f9918eff6a9 = function () {
|
|
4584
4598
|
return handleError(function (arg0, arg1, arg2) {
|
|
4585
4599
|
let deferred0_0;
|
|
4586
4600
|
let deferred0_1;
|
|
@@ -4595,6 +4609,16 @@ exports.__wbg_get_eb8ca7ea2e1397a3 = function () {
|
|
|
4595
4609
|
}, arguments);
|
|
4596
4610
|
};
|
|
4597
4611
|
|
|
4612
|
+
exports.__wbg_get_7bed016f185add81 = function (arg0, arg1) {
|
|
4613
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
4614
|
+
return addHeapObject(ret);
|
|
4615
|
+
};
|
|
4616
|
+
|
|
4617
|
+
exports.__wbg_get_access_token_22d89957129b443b = function (arg0) {
|
|
4618
|
+
const ret = getObject(arg0).get_access_token();
|
|
4619
|
+
return addHeapObject(ret);
|
|
4620
|
+
};
|
|
4621
|
+
|
|
4598
4622
|
exports.__wbg_get_efcb449f58ec27c2 = function () {
|
|
4599
4623
|
return handleError(function (arg0, arg1) {
|
|
4600
4624
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
@@ -4782,14 +4806,14 @@ exports.__wbg_length_cdd215e10d9dd507 = function (arg0) {
|
|
|
4782
4806
|
return ret;
|
|
4783
4807
|
};
|
|
4784
4808
|
|
|
4785
|
-
exports.
|
|
4809
|
+
exports.__wbg_list_0eee12d125e84f59 = function () {
|
|
4786
4810
|
return handleError(function (arg0) {
|
|
4787
4811
|
const ret = getObject(arg0).list();
|
|
4788
4812
|
return addHeapObject(ret);
|
|
4789
4813
|
}, arguments);
|
|
4790
4814
|
};
|
|
4791
4815
|
|
|
4792
|
-
exports.
|
|
4816
|
+
exports.__wbg_list_7695393584d6a69b = function () {
|
|
4793
4817
|
return handleError(function (arg0) {
|
|
4794
4818
|
const ret = getObject(arg0).list();
|
|
4795
4819
|
return addHeapObject(ret);
|
|
@@ -5004,7 +5028,7 @@ exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
|
|
|
5004
5028
|
}, arguments);
|
|
5005
5029
|
};
|
|
5006
5030
|
|
|
5007
|
-
exports.
|
|
5031
|
+
exports.__wbg_remove_8b189a6fd3dcbfd4 = function () {
|
|
5008
5032
|
return handleError(function (arg0, arg1, arg2) {
|
|
5009
5033
|
let deferred0_0;
|
|
5010
5034
|
let deferred0_1;
|
|
@@ -5019,7 +5043,7 @@ exports.__wbg_remove_33695adbdbc52a3e = function () {
|
|
|
5019
5043
|
}, arguments);
|
|
5020
5044
|
};
|
|
5021
5045
|
|
|
5022
|
-
exports.
|
|
5046
|
+
exports.__wbg_remove_b53fd6b594257783 = function () {
|
|
5023
5047
|
return handleError(function (arg0, arg1, arg2) {
|
|
5024
5048
|
let deferred0_0;
|
|
5025
5049
|
let deferred0_1;
|
|
@@ -5065,7 +5089,7 @@ exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
|
|
|
5065
5089
|
return addHeapObject(ret);
|
|
5066
5090
|
};
|
|
5067
5091
|
|
|
5068
|
-
exports.
|
|
5092
|
+
exports.__wbg_set_2b24ea7b5665d88e = function () {
|
|
5069
5093
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5070
5094
|
let deferred0_0;
|
|
5071
5095
|
let deferred0_1;
|
|
@@ -5084,7 +5108,7 @@ exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
|
|
5084
5108
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
5085
5109
|
};
|
|
5086
5110
|
|
|
5087
|
-
exports.
|
|
5111
|
+
exports.__wbg_set_685d7b8ddf2c6d23 = function () {
|
|
5088
5112
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5089
5113
|
let deferred0_0;
|
|
5090
5114
|
let deferred0_1;
|
|
Binary file
|
|
@@ -276,7 +276,8 @@ export const ipcRequestDiscover: (a: number, b: number, c: number) => number;
|
|
|
276
276
|
export const __wbg_ipcclient_free: (a: number, b: number) => void;
|
|
277
277
|
export const __wbg_ipcclientsubscription_free: (a: number, b: number) => void;
|
|
278
278
|
export const ipcclientsubscription_receive: (a: number, b: number) => number;
|
|
279
|
-
export const
|
|
279
|
+
export const ipcclient_newWithSdkInMemorySessions: (a: number) => number;
|
|
280
|
+
export const ipcclient_newWithClientManagedSessions: (a: number, b: number) => number;
|
|
280
281
|
export const ipcclient_start: (a: number) => number;
|
|
281
282
|
export const ipcclient_isRunning: (a: number) => number;
|
|
282
283
|
export const ipcclient_send: (a: number, b: number) => number;
|
|
@@ -431,12 +432,6 @@ export const __wbg_totpclient_free: (a: number, b: number) => void;
|
|
|
431
432
|
export const __wbg_get_outgoingmessage_destination: (a: number) => number;
|
|
432
433
|
export const __wbg_set_outgoingmessage_destination: (a: number, b: number) => void;
|
|
433
434
|
export const __wbg_cryptoclient_free: (a: number, b: number) => void;
|
|
434
|
-
export const wasm_bindgen__convert__closures_____invoke__h76c71c1158b6af01: (
|
|
435
|
-
a: number,
|
|
436
|
-
b: number,
|
|
437
|
-
) => void;
|
|
438
|
-
export const wasm_bindgen__closure__destroy__h1cce7ce4a094839d: (a: number, b: number) => void;
|
|
439
|
-
export const wasm_bindgen__closure__destroy__h04ff7fddf688fec6: (a: number, b: number) => void;
|
|
440
435
|
export const wasm_bindgen__convert__closures_____invoke__he84e41ce162f03b8: (
|
|
441
436
|
a: number,
|
|
442
437
|
b: number,
|
|
@@ -444,11 +439,17 @@ export const wasm_bindgen__convert__closures_____invoke__he84e41ce162f03b8: (
|
|
|
444
439
|
d: number,
|
|
445
440
|
) => void;
|
|
446
441
|
export const wasm_bindgen__closure__destroy__h7a400a8c6869e00b: (a: number, b: number) => void;
|
|
442
|
+
export const wasm_bindgen__convert__closures_____invoke__h76c71c1158b6af01: (
|
|
443
|
+
a: number,
|
|
444
|
+
b: number,
|
|
445
|
+
) => void;
|
|
446
|
+
export const wasm_bindgen__closure__destroy__h04ff7fddf688fec6: (a: number, b: number) => void;
|
|
447
447
|
export const wasm_bindgen__convert__closures_____invoke__h142f80da75ccedf5: (
|
|
448
448
|
a: number,
|
|
449
449
|
b: number,
|
|
450
450
|
c: number,
|
|
451
451
|
) => void;
|
|
452
|
+
export const wasm_bindgen__closure__destroy__h1cce7ce4a094839d: (a: number, b: number) => void;
|
|
452
453
|
export const wasm_bindgen__convert__closures_____invoke__h4096c3b930b983e7: (
|
|
453
454
|
a: number,
|
|
454
455
|
b: number,
|