@bitwarden/commercial-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/bitwarden_wasm_internal.d.ts +20 -1
- package/bitwarden_wasm_internal_bg.js +58 -34
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +2 -1
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +20 -1
- package/node/bitwarden_wasm_internal.js +70 -46
- 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
|
}
|
|
@@ -2243,9 +2249,22 @@ export class IncomingMessage {
|
|
|
2243
2249
|
* [IpcClient] documentation.
|
|
2244
2250
|
*/
|
|
2245
2251
|
export class IpcClient {
|
|
2252
|
+
private constructor();
|
|
2246
2253
|
free(): void;
|
|
2247
2254
|
[Symbol.dispose](): void;
|
|
2248
|
-
|
|
2255
|
+
/**
|
|
2256
|
+
* Create a new `IpcClient` instance with an in-memory session repository for saving
|
|
2257
|
+
* sessions within the SDK.
|
|
2258
|
+
*/
|
|
2259
|
+
static newWithSdkInMemorySessions(communication_provider: IpcCommunicationBackend): IpcClient;
|
|
2260
|
+
/**
|
|
2261
|
+
* Create a new `IpcClient` instance with a client-managed session repository for saving
|
|
2262
|
+
* sessions using State Provider.
|
|
2263
|
+
*/
|
|
2264
|
+
static newWithClientManagedSessions(
|
|
2265
|
+
communication_provider: IpcCommunicationBackend,
|
|
2266
|
+
session_repository: IpcSessionRepository,
|
|
2267
|
+
): IpcClient;
|
|
2249
2268
|
start(): Promise<void>;
|
|
2250
2269
|
isRunning(): Promise<boolean>;
|
|
2251
2270
|
send(message: OutgoingMessage): Promise<void>;
|
|
@@ -2914,6 +2914,14 @@ const IpcClientFinalization =
|
|
|
2914
2914
|
* [IpcClient] documentation.
|
|
2915
2915
|
*/
|
|
2916
2916
|
export class IpcClient {
|
|
2917
|
+
static __wrap(ptr) {
|
|
2918
|
+
ptr = ptr >>> 0;
|
|
2919
|
+
const obj = Object.create(IpcClient.prototype);
|
|
2920
|
+
obj.__wbg_ptr = ptr;
|
|
2921
|
+
IpcClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
2922
|
+
return obj;
|
|
2923
|
+
}
|
|
2924
|
+
|
|
2917
2925
|
__destroy_into_raw() {
|
|
2918
2926
|
const ptr = this.__wbg_ptr;
|
|
2919
2927
|
this.__wbg_ptr = 0;
|
|
@@ -2926,14 +2934,30 @@ export class IpcClient {
|
|
|
2926
2934
|
wasm.__wbg_ipcclient_free(ptr, 0);
|
|
2927
2935
|
}
|
|
2928
2936
|
/**
|
|
2937
|
+
* Create a new `IpcClient` instance with an in-memory session repository for saving
|
|
2938
|
+
* sessions within the SDK.
|
|
2929
2939
|
* @param {IpcCommunicationBackend} communication_provider
|
|
2940
|
+
* @returns {IpcClient}
|
|
2930
2941
|
*/
|
|
2931
|
-
|
|
2942
|
+
static newWithSdkInMemorySessions(communication_provider) {
|
|
2932
2943
|
_assertClass(communication_provider, IpcCommunicationBackend);
|
|
2933
|
-
const ret = wasm.
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2944
|
+
const ret = wasm.ipcclient_newWithSdkInMemorySessions(communication_provider.__wbg_ptr);
|
|
2945
|
+
return IpcClient.__wrap(ret);
|
|
2946
|
+
}
|
|
2947
|
+
/**
|
|
2948
|
+
* Create a new `IpcClient` instance with a client-managed session repository for saving
|
|
2949
|
+
* sessions using State Provider.
|
|
2950
|
+
* @param {IpcCommunicationBackend} communication_provider
|
|
2951
|
+
* @param {IpcSessionRepository} session_repository
|
|
2952
|
+
* @returns {IpcClient}
|
|
2953
|
+
*/
|
|
2954
|
+
static newWithClientManagedSessions(communication_provider, session_repository) {
|
|
2955
|
+
_assertClass(communication_provider, IpcCommunicationBackend);
|
|
2956
|
+
const ret = wasm.ipcclient_newWithClientManagedSessions(
|
|
2957
|
+
communication_provider.__wbg_ptr,
|
|
2958
|
+
addHeapObject(session_repository),
|
|
2959
|
+
);
|
|
2960
|
+
return IpcClient.__wrap(ret);
|
|
2937
2961
|
}
|
|
2938
2962
|
/**
|
|
2939
2963
|
* @returns {Promise<void>}
|
|
@@ -4489,7 +4513,7 @@ export function __wbg_call_e762c39fa8ea36bf() {
|
|
|
4489
4513
|
}, arguments);
|
|
4490
4514
|
}
|
|
4491
4515
|
|
|
4492
|
-
export function
|
|
4516
|
+
export function __wbg_cipher_eb520ade5d02e2c8(arg0) {
|
|
4493
4517
|
const ret = getObject(arg0).cipher;
|
|
4494
4518
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4495
4519
|
}
|
|
@@ -4569,7 +4593,7 @@ export function __wbg_fetch_f8ba0e29a9d6de0d(arg0, arg1) {
|
|
|
4569
4593
|
return addHeapObject(ret);
|
|
4570
4594
|
}
|
|
4571
4595
|
|
|
4572
|
-
export function
|
|
4596
|
+
export function __wbg_folder_a9c369db22013424(arg0) {
|
|
4573
4597
|
const ret = getObject(arg0).folder;
|
|
4574
4598
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
4575
4599
|
}
|
|
@@ -4601,7 +4625,12 @@ export function __wbg_get_7bed016f185add81(arg0, arg1) {
|
|
|
4601
4625
|
return addHeapObject(ret);
|
|
4602
4626
|
}
|
|
4603
4627
|
|
|
4604
|
-
export function
|
|
4628
|
+
export function __wbg_get_access_token_2a6f3a7572a71513(arg0) {
|
|
4629
|
+
const ret = getObject(arg0).get_access_token();
|
|
4630
|
+
return addHeapObject(ret);
|
|
4631
|
+
}
|
|
4632
|
+
|
|
4633
|
+
export function __wbg_get_e964441f5ccb3c80() {
|
|
4605
4634
|
return handleError(function (arg0, arg1, arg2) {
|
|
4606
4635
|
let deferred0_0;
|
|
4607
4636
|
let deferred0_1;
|
|
@@ -4616,12 +4645,7 @@ export function __wbg_get_905bbb36d78e816c() {
|
|
|
4616
4645
|
}, arguments);
|
|
4617
4646
|
}
|
|
4618
4647
|
|
|
4619
|
-
export function
|
|
4620
|
-
const ret = getObject(arg0).get_access_token();
|
|
4621
|
-
return addHeapObject(ret);
|
|
4622
|
-
}
|
|
4623
|
-
|
|
4624
|
-
export function __wbg_get_eb8ca7ea2e1397a3() {
|
|
4648
|
+
export function __wbg_get_ec74c278e7438da5() {
|
|
4625
4649
|
return handleError(function (arg0, arg1, arg2) {
|
|
4626
4650
|
let deferred0_0;
|
|
4627
4651
|
let deferred0_1;
|
|
@@ -4823,14 +4847,14 @@ export function __wbg_length_cdd215e10d9dd507(arg0) {
|
|
|
4823
4847
|
return ret;
|
|
4824
4848
|
}
|
|
4825
4849
|
|
|
4826
|
-
export function
|
|
4850
|
+
export function __wbg_list_b8dfecdd2b65e61e() {
|
|
4827
4851
|
return handleError(function (arg0) {
|
|
4828
4852
|
const ret = getObject(arg0).list();
|
|
4829
4853
|
return addHeapObject(ret);
|
|
4830
4854
|
}, arguments);
|
|
4831
4855
|
}
|
|
4832
4856
|
|
|
4833
|
-
export function
|
|
4857
|
+
export function __wbg_list_daa32c63b02d85cb() {
|
|
4834
4858
|
return handleError(function (arg0) {
|
|
4835
4859
|
const ret = getObject(arg0).list();
|
|
4836
4860
|
return addHeapObject(ret);
|
|
@@ -5045,7 +5069,7 @@ export function __wbg_randomFillSync_ac0988aba3254290() {
|
|
|
5045
5069
|
}, arguments);
|
|
5046
5070
|
}
|
|
5047
5071
|
|
|
5048
|
-
export function
|
|
5072
|
+
export function __wbg_remove_3bf97e854da9e7c3() {
|
|
5049
5073
|
return handleError(function (arg0, arg1, arg2) {
|
|
5050
5074
|
let deferred0_0;
|
|
5051
5075
|
let deferred0_1;
|
|
@@ -5060,7 +5084,7 @@ export function __wbg_remove_33695adbdbc52a3e() {
|
|
|
5060
5084
|
}, arguments);
|
|
5061
5085
|
}
|
|
5062
5086
|
|
|
5063
|
-
export function
|
|
5087
|
+
export function __wbg_remove_be4a47406b9a0def() {
|
|
5064
5088
|
return handleError(function (arg0, arg1, arg2) {
|
|
5065
5089
|
let deferred0_0;
|
|
5066
5090
|
let deferred0_1;
|
|
@@ -5106,7 +5130,7 @@ export function __wbg_setTimeout_ca12ead8b48245e2(arg0, arg1) {
|
|
|
5106
5130
|
return addHeapObject(ret);
|
|
5107
5131
|
}
|
|
5108
5132
|
|
|
5109
|
-
export function
|
|
5133
|
+
export function __wbg_set_10039b2e1149cb0c() {
|
|
5110
5134
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5111
5135
|
let deferred0_0;
|
|
5112
5136
|
let deferred0_1;
|
|
@@ -5125,21 +5149,6 @@ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
|
|
|
5125
5149
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
5126
5150
|
}
|
|
5127
5151
|
|
|
5128
|
-
export function __wbg_set_9006732dd4d65e3c() {
|
|
5129
|
-
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5130
|
-
let deferred0_0;
|
|
5131
|
-
let deferred0_1;
|
|
5132
|
-
try {
|
|
5133
|
-
deferred0_0 = arg1;
|
|
5134
|
-
deferred0_1 = arg2;
|
|
5135
|
-
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5136
|
-
return addHeapObject(ret);
|
|
5137
|
-
} finally {
|
|
5138
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5139
|
-
}
|
|
5140
|
-
}, arguments);
|
|
5141
|
-
}
|
|
5142
|
-
|
|
5143
5152
|
export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
|
|
5144
5153
|
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
5145
5154
|
return addHeapObject(ret);
|
|
@@ -5157,6 +5166,21 @@ export function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
|
|
|
5157
5166
|
getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
|
|
5158
5167
|
}
|
|
5159
5168
|
|
|
5169
|
+
export function __wbg_set_f2f0abdffceab618() {
|
|
5170
|
+
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
5171
|
+
let deferred0_0;
|
|
5172
|
+
let deferred0_1;
|
|
5173
|
+
try {
|
|
5174
|
+
deferred0_0 = arg1;
|
|
5175
|
+
deferred0_1 = arg2;
|
|
5176
|
+
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
5177
|
+
return addHeapObject(ret);
|
|
5178
|
+
} finally {
|
|
5179
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
5180
|
+
}
|
|
5181
|
+
}, arguments);
|
|
5182
|
+
}
|
|
5183
|
+
|
|
5160
5184
|
export function __wbg_set_headers_6926da238cd32ee4(arg0, arg1) {
|
|
5161
5185
|
getObject(arg0).headers = getObject(arg1);
|
|
5162
5186
|
}
|
|
Binary file
|
|
@@ -278,7 +278,8 @@ export const ipcRequestDiscover: (a: number, b: number, c: number) => number;
|
|
|
278
278
|
export const __wbg_ipcclient_free: (a: number, b: number) => void;
|
|
279
279
|
export const __wbg_ipcclientsubscription_free: (a: number, b: number) => void;
|
|
280
280
|
export const ipcclientsubscription_receive: (a: number, b: number) => number;
|
|
281
|
-
export const
|
|
281
|
+
export const ipcclient_newWithSdkInMemorySessions: (a: number) => number;
|
|
282
|
+
export const ipcclient_newWithClientManagedSessions: (a: number, b: number) => number;
|
|
282
283
|
export const ipcclient_start: (a: number) => number;
|
|
283
284
|
export const ipcclient_isRunning: (a: number) => number;
|
|
284
285
|
export const ipcclient_send: (a: number, b: number) => number;
|