@bitwarden/sdk-internal 0.2.0-main.374 → 0.2.0-main.375
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 +62 -38
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +8 -7
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +20 -1
- package/node/bitwarden_wasm_internal.js +66 -42
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +6 -5
- package/package.json +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
b033eddcc25f48e47cc0b6e22e360391fde464c2
|
|
@@ -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>;
|
|
@@ -875,6 +875,10 @@ export function isEncryptFileError(error) {
|
|
|
875
875
|
}
|
|
876
876
|
}
|
|
877
877
|
|
|
878
|
+
function wasm_bindgen__convert__closures_____invoke__h76c71c1158b6af01(arg0, arg1) {
|
|
879
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h76c71c1158b6af01(arg0, arg1);
|
|
880
|
+
}
|
|
881
|
+
|
|
878
882
|
function wasm_bindgen__convert__closures_____invoke__h142f80da75ccedf5(arg0, arg1, arg2) {
|
|
879
883
|
wasm.wasm_bindgen__convert__closures_____invoke__h142f80da75ccedf5(
|
|
880
884
|
arg0,
|
|
@@ -883,10 +887,6 @@ function wasm_bindgen__convert__closures_____invoke__h142f80da75ccedf5(arg0, arg
|
|
|
883
887
|
);
|
|
884
888
|
}
|
|
885
889
|
|
|
886
|
-
function wasm_bindgen__convert__closures_____invoke__h76c71c1158b6af01(arg0, arg1) {
|
|
887
|
-
wasm.wasm_bindgen__convert__closures_____invoke__h76c71c1158b6af01(arg0, arg1);
|
|
888
|
-
}
|
|
889
|
-
|
|
890
890
|
function wasm_bindgen__convert__closures_____invoke__he84e41ce162f03b8(arg0, arg1, arg2) {
|
|
891
891
|
try {
|
|
892
892
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
@@ -2835,6 +2835,14 @@ const IpcClientFinalization =
|
|
|
2835
2835
|
* [IpcClient] documentation.
|
|
2836
2836
|
*/
|
|
2837
2837
|
export class IpcClient {
|
|
2838
|
+
static __wrap(ptr) {
|
|
2839
|
+
ptr = ptr >>> 0;
|
|
2840
|
+
const obj = Object.create(IpcClient.prototype);
|
|
2841
|
+
obj.__wbg_ptr = ptr;
|
|
2842
|
+
IpcClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2843
|
+
return obj;
|
|
2844
|
+
}
|
|
2845
|
+
|
|
2838
2846
|
__destroy_into_raw() {
|
|
2839
2847
|
const ptr = this.__wbg_ptr;
|
|
2840
2848
|
this.__wbg_ptr = 0;
|
|
@@ -2847,14 +2855,30 @@ export class IpcClient {
|
|
|
2847
2855
|
wasm.__wbg_ipcclient_free(ptr, 0);
|
|
2848
2856
|
}
|
|
2849
2857
|
/**
|
|
2858
|
+
* Create a new `IpcClient` instance with an in-memory session repository for saving
|
|
2859
|
+
* sessions within the SDK.
|
|
2850
2860
|
* @param {IpcCommunicationBackend} communication_provider
|
|
2861
|
+
* @returns {IpcClient}
|
|
2851
2862
|
*/
|
|
2852
|
-
|
|
2863
|
+
static newWithSdkInMemorySessions(communication_provider) {
|
|
2853
2864
|
_assertClass(communication_provider, IpcCommunicationBackend);
|
|
2854
|
-
const ret = wasm.
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2865
|
+
const ret = wasm.ipcclient_newWithSdkInMemorySessions(communication_provider.__wbg_ptr);
|
|
2866
|
+
return IpcClient.__wrap(ret);
|
|
2867
|
+
}
|
|
2868
|
+
/**
|
|
2869
|
+
* Create a new `IpcClient` instance with a client-managed session repository for saving
|
|
2870
|
+
* sessions using State Provider.
|
|
2871
|
+
* @param {IpcCommunicationBackend} communication_provider
|
|
2872
|
+
* @param {IpcSessionRepository} session_repository
|
|
2873
|
+
* @returns {IpcClient}
|
|
2874
|
+
*/
|
|
2875
|
+
static newWithClientManagedSessions(communication_provider, session_repository) {
|
|
2876
|
+
_assertClass(communication_provider, IpcCommunicationBackend);
|
|
2877
|
+
const ret = wasm.ipcclient_newWithClientManagedSessions(
|
|
2878
|
+
communication_provider.__wbg_ptr,
|
|
2879
|
+
addHeapObject(session_repository),
|
|
2880
|
+
);
|
|
2881
|
+
return IpcClient.__wrap(ret);
|
|
2858
2882
|
}
|
|
2859
2883
|
/**
|
|
2860
2884
|
* @returns {Promise<void>}
|
|
@@ -4410,7 +4434,7 @@ export function __wbg_call_e762c39fa8ea36bf() {
|
|
|
4410
4434
|
}, arguments);
|
|
4411
4435
|
}
|
|
4412
4436
|
|
|
4413
|
-
export function
|
|
4437
|
+
export function __wbg_cipher_eb520ade5d02e2c8(arg0) {
|
|
4414
4438
|
const ret = getObject(arg0).cipher;
|
|
4415
4439
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4416
4440
|
}
|
|
@@ -4490,7 +4514,7 @@ export function __wbg_fetch_f8ba0e29a9d6de0d(arg0, arg1) {
|
|
|
4490
4514
|
return addHeapObject(ret);
|
|
4491
4515
|
}
|
|
4492
4516
|
|
|
4493
|
-
export function
|
|
4517
|
+
export function __wbg_folder_a9c369db22013424(arg0) {
|
|
4494
4518
|
const ret = getObject(arg0).folder;
|
|
4495
4519
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4496
4520
|
}
|
|
@@ -4522,7 +4546,12 @@ export function __wbg_get_7bed016f185add81(arg0, arg1) {
|
|
|
4522
4546
|
return addHeapObject(ret);
|
|
4523
4547
|
}
|
|
4524
4548
|
|
|
4525
|
-
export function
|
|
4549
|
+
export function __wbg_get_access_token_2a6f3a7572a71513(arg0) {
|
|
4550
|
+
const ret = getObject(arg0).get_access_token();
|
|
4551
|
+
return addHeapObject(ret);
|
|
4552
|
+
}
|
|
4553
|
+
|
|
4554
|
+
export function __wbg_get_e964441f5ccb3c80() {
|
|
4526
4555
|
return handleError(function (arg0, arg1, arg2) {
|
|
4527
4556
|
let deferred0_0;
|
|
4528
4557
|
let deferred0_1;
|
|
@@ -4537,12 +4566,7 @@ export function __wbg_get_905bbb36d78e816c() {
|
|
|
4537
4566
|
}, arguments);
|
|
4538
4567
|
}
|
|
4539
4568
|
|
|
4540
|
-
export function
|
|
4541
|
-
const ret = getObject(arg0).get_access_token();
|
|
4542
|
-
return addHeapObject(ret);
|
|
4543
|
-
}
|
|
4544
|
-
|
|
4545
|
-
export function __wbg_get_eb8ca7ea2e1397a3() {
|
|
4569
|
+
export function __wbg_get_ec74c278e7438da5() {
|
|
4546
4570
|
return handleError(function (arg0, arg1, arg2) {
|
|
4547
4571
|
let deferred0_0;
|
|
4548
4572
|
let deferred0_1;
|
|
@@ -4744,14 +4768,14 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
|
|
|
4744
4768
|
return ret;
|
|
4745
4769
|
}
|
|
4746
4770
|
|
|
4747
|
-
export function
|
|
4771
|
+
export function __wbg_list_b8dfecdd2b65e61e() {
|
|
4748
4772
|
return handleError(function (arg0) {
|
|
4749
4773
|
const ret = getObject(arg0).list();
|
|
4750
4774
|
return addHeapObject(ret);
|
|
4751
4775
|
}, arguments);
|
|
4752
4776
|
}
|
|
4753
4777
|
|
|
4754
|
-
export function
|
|
4778
|
+
export function __wbg_list_daa32c63b02d85cb() {
|
|
4755
4779
|
return handleError(function (arg0) {
|
|
4756
4780
|
const ret = getObject(arg0).list();
|
|
4757
4781
|
return addHeapObject(ret);
|
|
@@ -4966,7 +4990,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
|
|
|
4966
4990
|
}, arguments);
|
|
4967
4991
|
}
|
|
4968
4992
|
|
|
4969
|
-
export function
|
|
4993
|
+
export function __wbg_remove_3bf97e854da9e7c3() {
|
|
4970
4994
|
return handleError(function (arg0, arg1, arg2) {
|
|
4971
4995
|
let deferred0_0;
|
|
4972
4996
|
let deferred0_1;
|
|
@@ -4981,7 +5005,7 @@ export function __wbg_remove_33695adbdbc52a3e() {
|
|
|
4981
5005
|
}, arguments);
|
|
4982
5006
|
}
|
|
4983
5007
|
|
|
4984
|
-
export function
|
|
5008
|
+
export function __wbg_remove_be4a47406b9a0def() {
|
|
4985
5009
|
return handleError(function (arg0, arg1, arg2) {
|
|
4986
5010
|
let deferred0_0;
|
|
4987
5011
|
let deferred0_1;
|
|
@@ -5027,7 +5051,7 @@ export function __wbg_setTimeout_ca12ead8b48245e2(arg0, arg1) {
|
|
|
5027
5051
|
return addHeapObject(ret);
|
|
5028
5052
|
}
|
|
5029
5053
|
|
|
5030
|
-
export function
|
|
5054
|
+
export function __wbg_set_10039b2e1149cb0c() {
|
|
5031
5055
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5032
5056
|
let deferred0_0;
|
|
5033
5057
|
let deferred0_1;
|
|
@@ -5046,21 +5070,6 @@ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
|
5046
5070
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
5047
5071
|
}
|
|
5048
5072
|
|
|
5049
|
-
export function __wbg_set_9006732dd4d65e3c() {
|
|
5050
|
-
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5051
|
-
let deferred0_0;
|
|
5052
|
-
let deferred0_1;
|
|
5053
|
-
try {
|
|
5054
|
-
deferred0_0 = arg1;
|
|
5055
|
-
deferred0_1 = arg2;
|
|
5056
|
-
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5057
|
-
return addHeapObject(ret);
|
|
5058
|
-
} finally {
|
|
5059
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5060
|
-
}
|
|
5061
|
-
}, arguments);
|
|
5062
|
-
}
|
|
5063
|
-
|
|
5064
5073
|
export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
|
|
5065
5074
|
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
5066
5075
|
return addHeapObject(ret);
|
|
@@ -5078,6 +5087,21 @@ export function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
|
|
|
5078
5087
|
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
5079
5088
|
}
|
|
5080
5089
|
|
|
5090
|
+
export function __wbg_set_f2f0abdffceab618() {
|
|
5091
|
+
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5092
|
+
let deferred0_0;
|
|
5093
|
+
let deferred0_1;
|
|
5094
|
+
try {
|
|
5095
|
+
deferred0_0 = arg1;
|
|
5096
|
+
deferred0_1 = arg2;
|
|
5097
|
+
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5098
|
+
return addHeapObject(ret);
|
|
5099
|
+
} finally {
|
|
5100
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5101
|
+
}
|
|
5102
|
+
}, arguments);
|
|
5103
|
+
}
|
|
5104
|
+
|
|
5081
5105
|
export function __wbg_set_headers_6926da238cd32ee4(arg0, arg1) {
|
|
5082
5106
|
getObject(arg0).headers = getObject(arg1);
|
|
5083
5107
|
}
|
|
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,24 +432,24 @@ 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
|
|
435
|
+
export const wasm_bindgen__convert__closures_____invoke__h76c71c1158b6af01: (
|
|
435
436
|
a: number,
|
|
436
437
|
b: number,
|
|
437
|
-
c: number,
|
|
438
438
|
) => void;
|
|
439
|
-
export const
|
|
440
|
-
export const
|
|
439
|
+
export const wasm_bindgen__closure__destroy__h1cce7ce4a094839d: (a: number, b: number) => void;
|
|
440
|
+
export const wasm_bindgen__convert__closures_____invoke__h142f80da75ccedf5: (
|
|
441
441
|
a: number,
|
|
442
442
|
b: number,
|
|
443
|
+
c: number,
|
|
443
444
|
) => void;
|
|
444
|
-
export const
|
|
445
|
+
export const wasm_bindgen__closure__destroy__h04ff7fddf688fec6: (a: number, b: number) => void;
|
|
445
446
|
export const wasm_bindgen__convert__closures_____invoke__he84e41ce162f03b8: (
|
|
446
447
|
a: number,
|
|
447
448
|
b: number,
|
|
448
449
|
c: number,
|
|
449
450
|
d: number,
|
|
450
451
|
) => void;
|
|
451
|
-
export const
|
|
452
|
+
export const wasm_bindgen__closure__destroy__h7a400a8c6869e00b: (a: number, b: number) => void;
|
|
452
453
|
export const wasm_bindgen__convert__closures_____invoke__h4096c3b930b983e7: (
|
|
453
454
|
a: number,
|
|
454
455
|
b: number,
|