@bitwarden/sdk-internal 0.2.0-main.306 → 0.2.0-main.308
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 -2
- package/bitwarden_wasm_internal_bg.js +52 -44
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +4 -4
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +23 -2
- package/node/bitwarden_wasm_internal.js +52 -44
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +4 -4
- package/package.json +1 -1
|
@@ -1634,14 +1634,26 @@ export class AuthClient {
|
|
|
1634
1634
|
*/
|
|
1635
1635
|
send_access(): SendAccessClient;
|
|
1636
1636
|
}
|
|
1637
|
+
/**
|
|
1638
|
+
* The main entry point for the Bitwarden SDK in WebAssembly environments
|
|
1639
|
+
*/
|
|
1637
1640
|
export class BitwardenClient {
|
|
1638
1641
|
free(): void;
|
|
1642
|
+
/**
|
|
1643
|
+
* Initialize a new instance of the SDK client
|
|
1644
|
+
*/
|
|
1639
1645
|
constructor(token_provider: any, settings?: ClientSettings | null);
|
|
1640
1646
|
/**
|
|
1641
1647
|
* Test method, echoes back the input
|
|
1642
1648
|
*/
|
|
1643
1649
|
echo(msg: string): string;
|
|
1650
|
+
/**
|
|
1651
|
+
* Returns the current SDK version
|
|
1652
|
+
*/
|
|
1644
1653
|
version(): string;
|
|
1654
|
+
/**
|
|
1655
|
+
* Test method, always throws an error
|
|
1656
|
+
*/
|
|
1645
1657
|
throw(msg: string): void;
|
|
1646
1658
|
/**
|
|
1647
1659
|
* Test method, calls http endpoint
|
|
@@ -1651,7 +1663,13 @@ export class BitwardenClient {
|
|
|
1651
1663
|
* Auth related operations.
|
|
1652
1664
|
*/
|
|
1653
1665
|
auth(): AuthClient;
|
|
1666
|
+
/**
|
|
1667
|
+
* Crypto related operations.
|
|
1668
|
+
*/
|
|
1654
1669
|
crypto(): CryptoClient;
|
|
1670
|
+
/**
|
|
1671
|
+
* Vault item related operations.
|
|
1672
|
+
*/
|
|
1655
1673
|
vault(): VaultClient;
|
|
1656
1674
|
/**
|
|
1657
1675
|
* Constructs a specific client for platform-specific functionality
|
|
@@ -1661,6 +1679,9 @@ export class BitwardenClient {
|
|
|
1661
1679
|
* Constructs a specific client for generating passwords and passphrases
|
|
1662
1680
|
*/
|
|
1663
1681
|
generator(): GeneratorClient;
|
|
1682
|
+
/**
|
|
1683
|
+
* Exporter related operations.
|
|
1684
|
+
*/
|
|
1664
1685
|
exporters(): ExporterClient;
|
|
1665
1686
|
}
|
|
1666
1687
|
export class CiphersClient {
|
|
@@ -1844,7 +1865,7 @@ export class FoldersClient {
|
|
|
1844
1865
|
/**
|
|
1845
1866
|
* Get a specific [Folder] by its ID from state and decrypt it to a [FolderView].
|
|
1846
1867
|
*/
|
|
1847
|
-
get(folder_id:
|
|
1868
|
+
get(folder_id: FolderId): Promise<FolderView>;
|
|
1848
1869
|
/**
|
|
1849
1870
|
* Create a new [Folder] and save it to the server.
|
|
1850
1871
|
*/
|
|
@@ -1852,7 +1873,7 @@ export class FoldersClient {
|
|
|
1852
1873
|
/**
|
|
1853
1874
|
* Edit the [Folder] and save it to the server.
|
|
1854
1875
|
*/
|
|
1855
|
-
edit(folder_id:
|
|
1876
|
+
edit(folder_id: FolderId, request: FolderAddEditRequest): Promise<FolderView>;
|
|
1856
1877
|
}
|
|
1857
1878
|
export class GeneratorClient {
|
|
1858
1879
|
private constructor();
|
|
@@ -830,7 +830,7 @@ module.exports.isEncryptFileError = function (error) {
|
|
|
830
830
|
function __wbg_adapter_54(arg0, arg1, arg2) {
|
|
831
831
|
try {
|
|
832
832
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
833
|
-
wasm.
|
|
833
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha454bdf5b4fbe0b2(
|
|
834
834
|
retptr,
|
|
835
835
|
arg0,
|
|
836
836
|
arg1,
|
|
@@ -847,7 +847,7 @@ function __wbg_adapter_54(arg0, arg1, arg2) {
|
|
|
847
847
|
}
|
|
848
848
|
|
|
849
849
|
function __wbg_adapter_57(arg0, arg1, arg2) {
|
|
850
|
-
wasm.
|
|
850
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1357e1fddec762f2(
|
|
851
851
|
arg0,
|
|
852
852
|
arg1,
|
|
853
853
|
addHeapObject(arg2),
|
|
@@ -1136,7 +1136,9 @@ const BitwardenClientFinalization =
|
|
|
1136
1136
|
typeof FinalizationRegistry === "undefined"
|
|
1137
1137
|
? { register: () => {}, unregister: () => {} }
|
|
1138
1138
|
: new FinalizationRegistry((ptr) => wasm.__wbg_bitwardenclient_free(ptr >>> 0, 1));
|
|
1139
|
-
|
|
1139
|
+
/**
|
|
1140
|
+
* The main entry point for the Bitwarden SDK in WebAssembly environments
|
|
1141
|
+
*/
|
|
1140
1142
|
class BitwardenClient {
|
|
1141
1143
|
__destroy_into_raw() {
|
|
1142
1144
|
const ptr = this.__wbg_ptr;
|
|
@@ -1150,6 +1152,7 @@ class BitwardenClient {
|
|
|
1150
1152
|
wasm.__wbg_bitwardenclient_free(ptr, 0);
|
|
1151
1153
|
}
|
|
1152
1154
|
/**
|
|
1155
|
+
* Initialize a new instance of the SDK client
|
|
1153
1156
|
* @param {any} token_provider
|
|
1154
1157
|
* @param {ClientSettings | null} [settings]
|
|
1155
1158
|
*/
|
|
@@ -1186,6 +1189,7 @@ class BitwardenClient {
|
|
|
1186
1189
|
}
|
|
1187
1190
|
}
|
|
1188
1191
|
/**
|
|
1192
|
+
* Returns the current SDK version
|
|
1189
1193
|
* @returns {string}
|
|
1190
1194
|
*/
|
|
1191
1195
|
version() {
|
|
@@ -1205,6 +1209,7 @@ class BitwardenClient {
|
|
|
1205
1209
|
}
|
|
1206
1210
|
}
|
|
1207
1211
|
/**
|
|
1212
|
+
* Test method, always throws an error
|
|
1208
1213
|
* @param {string} msg
|
|
1209
1214
|
*/
|
|
1210
1215
|
throw(msg) {
|
|
@@ -1242,6 +1247,7 @@ class BitwardenClient {
|
|
|
1242
1247
|
return AuthClient.__wrap(ret);
|
|
1243
1248
|
}
|
|
1244
1249
|
/**
|
|
1250
|
+
* Crypto related operations.
|
|
1245
1251
|
* @returns {CryptoClient}
|
|
1246
1252
|
*/
|
|
1247
1253
|
crypto() {
|
|
@@ -1249,6 +1255,7 @@ class BitwardenClient {
|
|
|
1249
1255
|
return CryptoClient.__wrap(ret);
|
|
1250
1256
|
}
|
|
1251
1257
|
/**
|
|
1258
|
+
* Vault item related operations.
|
|
1252
1259
|
* @returns {VaultClient}
|
|
1253
1260
|
*/
|
|
1254
1261
|
vault() {
|
|
@@ -1272,6 +1279,7 @@ class BitwardenClient {
|
|
|
1272
1279
|
return GeneratorClient.__wrap(ret);
|
|
1273
1280
|
}
|
|
1274
1281
|
/**
|
|
1282
|
+
* Exporter related operations.
|
|
1275
1283
|
* @returns {ExporterClient}
|
|
1276
1284
|
*/
|
|
1277
1285
|
exporters() {
|
|
@@ -2280,13 +2288,11 @@ class FoldersClient {
|
|
|
2280
2288
|
}
|
|
2281
2289
|
/**
|
|
2282
2290
|
* Get a specific [Folder] by its ID from state and decrypt it to a [FolderView].
|
|
2283
|
-
* @param {
|
|
2291
|
+
* @param {FolderId} folder_id
|
|
2284
2292
|
* @returns {Promise<FolderView>}
|
|
2285
2293
|
*/
|
|
2286
2294
|
get(folder_id) {
|
|
2287
|
-
const
|
|
2288
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2289
|
-
const ret = wasm.foldersclient_get(this.__wbg_ptr, ptr0, len0);
|
|
2295
|
+
const ret = wasm.foldersclient_get(this.__wbg_ptr, addHeapObject(folder_id));
|
|
2290
2296
|
return takeObject(ret);
|
|
2291
2297
|
}
|
|
2292
2298
|
/**
|
|
@@ -2300,14 +2306,16 @@ class FoldersClient {
|
|
|
2300
2306
|
}
|
|
2301
2307
|
/**
|
|
2302
2308
|
* Edit the [Folder] and save it to the server.
|
|
2303
|
-
* @param {
|
|
2309
|
+
* @param {FolderId} folder_id
|
|
2304
2310
|
* @param {FolderAddEditRequest} request
|
|
2305
2311
|
* @returns {Promise<FolderView>}
|
|
2306
2312
|
*/
|
|
2307
2313
|
edit(folder_id, request) {
|
|
2308
|
-
const
|
|
2309
|
-
|
|
2310
|
-
|
|
2314
|
+
const ret = wasm.foldersclient_edit(
|
|
2315
|
+
this.__wbg_ptr,
|
|
2316
|
+
addHeapObject(folder_id),
|
|
2317
|
+
addHeapObject(request),
|
|
2318
|
+
);
|
|
2311
2319
|
return takeObject(ret);
|
|
2312
2320
|
}
|
|
2313
2321
|
}
|
|
@@ -4118,7 +4126,7 @@ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
|
|
|
4118
4126
|
return ret;
|
|
4119
4127
|
};
|
|
4120
4128
|
|
|
4121
|
-
module.exports.
|
|
4129
|
+
module.exports.__wbg_get_189b413fd1e1b97d = function () {
|
|
4122
4130
|
return handleError(function (arg0, arg1, arg2) {
|
|
4123
4131
|
let deferred0_0;
|
|
4124
4132
|
let deferred0_1;
|
|
@@ -4133,7 +4141,14 @@ module.exports.__wbg_get_244e969dde4f5be1 = function () {
|
|
|
4133
4141
|
}, arguments);
|
|
4134
4142
|
};
|
|
4135
4143
|
|
|
4136
|
-
module.exports.
|
|
4144
|
+
module.exports.__wbg_get_67b2ba62fc30de12 = function () {
|
|
4145
|
+
return handleError(function (arg0, arg1) {
|
|
4146
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4147
|
+
return addHeapObject(ret);
|
|
4148
|
+
}, arguments);
|
|
4149
|
+
};
|
|
4150
|
+
|
|
4151
|
+
module.exports.__wbg_get_938134fb09119281 = function () {
|
|
4137
4152
|
return handleError(function (arg0, arg1, arg2) {
|
|
4138
4153
|
let deferred0_0;
|
|
4139
4154
|
let deferred0_1;
|
|
@@ -4148,19 +4163,12 @@ module.exports.__wbg_get_62e62c7bce1de978 = function () {
|
|
|
4148
4163
|
}, arguments);
|
|
4149
4164
|
};
|
|
4150
4165
|
|
|
4151
|
-
module.exports.__wbg_get_67b2ba62fc30de12 = function () {
|
|
4152
|
-
return handleError(function (arg0, arg1) {
|
|
4153
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4154
|
-
return addHeapObject(ret);
|
|
4155
|
-
}, arguments);
|
|
4156
|
-
};
|
|
4157
|
-
|
|
4158
4166
|
module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
4159
4167
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
4160
4168
|
return addHeapObject(ret);
|
|
4161
4169
|
};
|
|
4162
4170
|
|
|
4163
|
-
module.exports.
|
|
4171
|
+
module.exports.__wbg_getaccesstoken_1e2b54361537c15f = function (arg0) {
|
|
4164
4172
|
const ret = getObject(arg0).get_access_token();
|
|
4165
4173
|
return addHeapObject(ret);
|
|
4166
4174
|
};
|
|
@@ -4345,14 +4353,14 @@ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
|
|
|
4345
4353
|
return ret;
|
|
4346
4354
|
};
|
|
4347
4355
|
|
|
4348
|
-
module.exports.
|
|
4356
|
+
module.exports.__wbg_list_7f0fe22786f8074d = function () {
|
|
4349
4357
|
return handleError(function (arg0) {
|
|
4350
4358
|
const ret = getObject(arg0).list();
|
|
4351
4359
|
return addHeapObject(ret);
|
|
4352
4360
|
}, arguments);
|
|
4353
4361
|
};
|
|
4354
4362
|
|
|
4355
|
-
module.exports.
|
|
4363
|
+
module.exports.__wbg_list_ccadad12bfbaa75c = function () {
|
|
4356
4364
|
return handleError(function (arg0) {
|
|
4357
4365
|
const ret = getObject(arg0).list();
|
|
4358
4366
|
return addHeapObject(ret);
|
|
@@ -4553,7 +4561,7 @@ module.exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
|
|
|
4553
4561
|
}, arguments);
|
|
4554
4562
|
};
|
|
4555
4563
|
|
|
4556
|
-
module.exports.
|
|
4564
|
+
module.exports.__wbg_remove_860cd960c7193eca = function () {
|
|
4557
4565
|
return handleError(function (arg0, arg1, arg2) {
|
|
4558
4566
|
let deferred0_0;
|
|
4559
4567
|
let deferred0_1;
|
|
@@ -4568,7 +4576,7 @@ module.exports.__wbg_remove_99b320bcc978c0d9 = function () {
|
|
|
4568
4576
|
}, arguments);
|
|
4569
4577
|
};
|
|
4570
4578
|
|
|
4571
|
-
module.exports.
|
|
4579
|
+
module.exports.__wbg_remove_e8f91b1c8c670e82 = function () {
|
|
4572
4580
|
return handleError(function (arg0, arg1, arg2) {
|
|
4573
4581
|
let deferred0_0;
|
|
4574
4582
|
let deferred0_1;
|
|
@@ -4614,21 +4622,6 @@ module.exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
|
|
|
4614
4622
|
return addHeapObject(ret);
|
|
4615
4623
|
};
|
|
4616
4624
|
|
|
4617
|
-
module.exports.__wbg_set_1b3f0312806732b5 = function () {
|
|
4618
|
-
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4619
|
-
let deferred0_0;
|
|
4620
|
-
let deferred0_1;
|
|
4621
|
-
try {
|
|
4622
|
-
deferred0_0 = arg1;
|
|
4623
|
-
deferred0_1 = arg2;
|
|
4624
|
-
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
4625
|
-
return addHeapObject(ret);
|
|
4626
|
-
} finally {
|
|
4627
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
4628
|
-
}
|
|
4629
|
-
}, arguments);
|
|
4630
|
-
};
|
|
4631
|
-
|
|
4632
4625
|
module.exports.__wbg_set_37837023f3d740e8 = function (arg0, arg1, arg2) {
|
|
4633
4626
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
4634
4627
|
};
|
|
@@ -4646,7 +4639,22 @@ module.exports.__wbg_set_8fc6bf8a5b1071d1 = function (arg0, arg1, arg2) {
|
|
|
4646
4639
|
return addHeapObject(ret);
|
|
4647
4640
|
};
|
|
4648
4641
|
|
|
4649
|
-
module.exports.
|
|
4642
|
+
module.exports.__wbg_set_d590b5d0d7226a02 = function () {
|
|
4643
|
+
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4644
|
+
let deferred0_0;
|
|
4645
|
+
let deferred0_1;
|
|
4646
|
+
try {
|
|
4647
|
+
deferred0_0 = arg1;
|
|
4648
|
+
deferred0_1 = arg2;
|
|
4649
|
+
const ret = getObject(arg0).set(getStringFromWasm0(arg1, arg2), takeObject(arg3));
|
|
4650
|
+
return addHeapObject(ret);
|
|
4651
|
+
} finally {
|
|
4652
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
4653
|
+
}
|
|
4654
|
+
}, arguments);
|
|
4655
|
+
};
|
|
4656
|
+
|
|
4657
|
+
module.exports.__wbg_set_df049467f6e3aea3 = function () {
|
|
4650
4658
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4651
4659
|
let deferred0_0;
|
|
4652
4660
|
let deferred0_1;
|
|
@@ -4881,17 +4889,17 @@ module.exports.__wbindgen_closure_wrapper193 = function (arg0, arg1, arg2) {
|
|
|
4881
4889
|
return addHeapObject(ret);
|
|
4882
4890
|
};
|
|
4883
4891
|
|
|
4884
|
-
module.exports.
|
|
4892
|
+
module.exports.__wbindgen_closure_wrapper3784 = function (arg0, arg1, arg2) {
|
|
4885
4893
|
const ret = makeMutClosure(arg0, arg1, 294, __wbg_adapter_60);
|
|
4886
4894
|
return addHeapObject(ret);
|
|
4887
4895
|
};
|
|
4888
4896
|
|
|
4889
|
-
module.exports.
|
|
4897
|
+
module.exports.__wbindgen_closure_wrapper6138 = function (arg0, arg1, arg2) {
|
|
4890
4898
|
const ret = makeMutClosure(arg0, arg1, 319, __wbg_adapter_60);
|
|
4891
4899
|
return addHeapObject(ret);
|
|
4892
4900
|
};
|
|
4893
4901
|
|
|
4894
|
-
module.exports.
|
|
4902
|
+
module.exports.__wbindgen_closure_wrapper6519 = function (arg0, arg1, arg2) {
|
|
4895
4903
|
const ret = makeMutClosure(arg0, arg1, 342, __wbg_adapter_57);
|
|
4896
4904
|
return addHeapObject(ret);
|
|
4897
4905
|
};
|
|
Binary file
|
|
@@ -339,9 +339,9 @@ export const foldersclient_encrypt: (a: number, b: number, c: number) => void;
|
|
|
339
339
|
export const foldersclient_decrypt: (a: number, b: number, c: number) => void;
|
|
340
340
|
export const foldersclient_decrypt_list: (a: number, b: number, c: number, d: number) => void;
|
|
341
341
|
export const foldersclient_list: (a: number) => number;
|
|
342
|
-
export const foldersclient_get: (a: number, b: number
|
|
342
|
+
export const foldersclient_get: (a: number, b: number) => number;
|
|
343
343
|
export const foldersclient_create: (a: number, b: number) => number;
|
|
344
|
-
export const foldersclient_edit: (a: number, b: number, c: number
|
|
344
|
+
export const foldersclient_edit: (a: number, b: number, c: number) => number;
|
|
345
345
|
export const vaultclient_attachments: (a: number) => number;
|
|
346
346
|
export const collectionsclient_decrypt: (a: number, b: number, c: number) => void;
|
|
347
347
|
export const collectionsclient_decrypt_list: (a: number, b: number, c: number, d: number) => void;
|
|
@@ -401,13 +401,13 @@ export const __wbindgen_exn_store: (a: number) => void;
|
|
|
401
401
|
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
402
402
|
export const __wbindgen_export_4: WebAssembly.Table;
|
|
403
403
|
export const __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
404
|
-
export const
|
|
404
|
+
export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__ha454bdf5b4fbe0b2: (
|
|
405
405
|
a: number,
|
|
406
406
|
b: number,
|
|
407
407
|
c: number,
|
|
408
408
|
d: number,
|
|
409
409
|
) => void;
|
|
410
|
-
export const
|
|
410
|
+
export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1357e1fddec762f2: (
|
|
411
411
|
a: number,
|
|
412
412
|
b: number,
|
|
413
413
|
c: number,
|