@bitwarden/sdk-internal 0.2.0-main.239 → 0.2.0-main.240
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 +60 -12
- package/bitwarden_wasm_internal_bg.js +284 -31
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +15 -0
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +60 -12
- package/node/bitwarden_wasm_internal.js +287 -31
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +15 -0
- package/package.json +1 -1
|
@@ -173,6 +173,33 @@ export interface TestError extends Error {
|
|
|
173
173
|
|
|
174
174
|
export function isTestError(error: any): error is TestError;
|
|
175
175
|
|
|
176
|
+
export interface Collection {
|
|
177
|
+
id: Uuid | undefined;
|
|
178
|
+
organizationId: Uuid;
|
|
179
|
+
name: EncString;
|
|
180
|
+
externalId: string | undefined;
|
|
181
|
+
hidePasswords: boolean;
|
|
182
|
+
readOnly: boolean;
|
|
183
|
+
manage: boolean;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export interface CollectionView {
|
|
187
|
+
id: Uuid | undefined;
|
|
188
|
+
organizationId: Uuid;
|
|
189
|
+
name: string;
|
|
190
|
+
externalId: string | undefined;
|
|
191
|
+
hidePasswords: boolean;
|
|
192
|
+
readOnly: boolean;
|
|
193
|
+
manage: boolean;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export interface CollectionDecryptError extends Error {
|
|
197
|
+
name: "CollectionDecryptError";
|
|
198
|
+
variant: "Crypto";
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export function isCollectionDecryptError(error: any): error is CollectionDecryptError;
|
|
202
|
+
|
|
176
203
|
/**
|
|
177
204
|
* State used for initializing the user cryptographic state.
|
|
178
205
|
*/
|
|
@@ -1151,16 +1178,6 @@ export interface CreateFolderError extends Error {
|
|
|
1151
1178
|
|
|
1152
1179
|
export function isCreateFolderError(error: any): error is CreateFolderError;
|
|
1153
1180
|
|
|
1154
|
-
export interface Collection {
|
|
1155
|
-
id: Uuid | undefined;
|
|
1156
|
-
organizationId: Uuid;
|
|
1157
|
-
name: EncString;
|
|
1158
|
-
externalId: string | undefined;
|
|
1159
|
-
hidePasswords: boolean;
|
|
1160
|
-
readOnly: boolean;
|
|
1161
|
-
manage: boolean;
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
1181
|
export interface SshKeyView {
|
|
1165
1182
|
/**
|
|
1166
1183
|
* SSH private key (ed25519/rsa) in unencrypted openssh private key format [OpenSSH private key](https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.key)
|
|
@@ -1424,6 +1441,33 @@ export class CiphersClient {
|
|
|
1424
1441
|
move_to_organization(cipher_view: CipherView, organization_id: OrganizationId): CipherView;
|
|
1425
1442
|
decrypt_fido2_private_key(cipher_view: CipherView): string;
|
|
1426
1443
|
}
|
|
1444
|
+
export class CollectionViewNodeItem {
|
|
1445
|
+
private constructor();
|
|
1446
|
+
free(): void;
|
|
1447
|
+
get_item(): CollectionView;
|
|
1448
|
+
get_parent(): CollectionView | undefined;
|
|
1449
|
+
get_children(): CollectionView[];
|
|
1450
|
+
get_ancestors(): Map<any, any>;
|
|
1451
|
+
}
|
|
1452
|
+
export class CollectionViewTree {
|
|
1453
|
+
private constructor();
|
|
1454
|
+
free(): void;
|
|
1455
|
+
get_item_by_id(collection_view: CollectionView): CollectionViewNodeItem | undefined;
|
|
1456
|
+
get_root_items(): CollectionViewNodeItem[];
|
|
1457
|
+
get_flat_items(): CollectionViewNodeItem[];
|
|
1458
|
+
}
|
|
1459
|
+
export class CollectionsClient {
|
|
1460
|
+
private constructor();
|
|
1461
|
+
free(): void;
|
|
1462
|
+
decrypt(collection: Collection): CollectionView;
|
|
1463
|
+
decrypt_list(collections: Collection[]): CollectionView[];
|
|
1464
|
+
/**
|
|
1465
|
+
*
|
|
1466
|
+
* Returns the vector of CollectionView objects in a tree structure based on its implemented
|
|
1467
|
+
* path().
|
|
1468
|
+
*/
|
|
1469
|
+
get_collection_tree(collections: CollectionView[]): CollectionViewTree;
|
|
1470
|
+
}
|
|
1427
1471
|
/**
|
|
1428
1472
|
* A client for the crypto operations.
|
|
1429
1473
|
*/
|
|
@@ -1475,7 +1519,7 @@ export class ExporterClient {
|
|
|
1475
1519
|
* *Warning:* Expect this API to be unstable, and it will change in the future.
|
|
1476
1520
|
*
|
|
1477
1521
|
* For use with Apple using [ASCredentialExportManager](https://developer.apple.com/documentation/authenticationservices/ascredentialexportmanager).
|
|
1478
|
-
* Ideally the input should be immediately serialized from [ASImportableAccount](https://developer.apple.com/documentation/authenticationservices/asimportableaccount).
|
|
1522
|
+
* Ideally, the input should be immediately serialized from [ASImportableAccount](https://developer.apple.com/documentation/authenticationservices/asimportableaccount).
|
|
1479
1523
|
*/
|
|
1480
1524
|
export_cxf(account: Account, ciphers: Cipher[]): string;
|
|
1481
1525
|
/**
|
|
@@ -1484,7 +1528,7 @@ export class ExporterClient {
|
|
|
1484
1528
|
* *Warning:* Expect this API to be unstable, and it will change in the future.
|
|
1485
1529
|
*
|
|
1486
1530
|
* For use with Apple using [ASCredentialExportManager](https://developer.apple.com/documentation/authenticationservices/ascredentialexportmanager).
|
|
1487
|
-
* Ideally the input should be immediately serialized from [ASImportableAccount](https://developer.apple.com/documentation/authenticationservices/asimportableaccount).
|
|
1531
|
+
* Ideally, the input should be immediately serialized from [ASImportableAccount](https://developer.apple.com/documentation/authenticationservices/asimportableaccount).
|
|
1488
1532
|
*/
|
|
1489
1533
|
import_cxf(payload: string): Cipher[];
|
|
1490
1534
|
}
|
|
@@ -1811,4 +1855,8 @@ export class VaultClient {
|
|
|
1811
1855
|
* TOTP related operations.
|
|
1812
1856
|
*/
|
|
1813
1857
|
totp(): TotpClient;
|
|
1858
|
+
/**
|
|
1859
|
+
* Collection related operations.
|
|
1860
|
+
*/
|
|
1861
|
+
collections(): CollectionsClient;
|
|
1814
1862
|
}
|
|
@@ -345,6 +345,19 @@ module.exports.isTestError = function (error) {
|
|
|
345
345
|
}
|
|
346
346
|
};
|
|
347
347
|
|
|
348
|
+
/**
|
|
349
|
+
* @param {any} error
|
|
350
|
+
* @returns {boolean}
|
|
351
|
+
*/
|
|
352
|
+
module.exports.isCollectionDecryptError = function (error) {
|
|
353
|
+
try {
|
|
354
|
+
const ret = wasm.isCollectionDecryptError(addBorrowedObject(error));
|
|
355
|
+
return ret !== 0;
|
|
356
|
+
} finally {
|
|
357
|
+
heap[stack_pointer++] = undefined;
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
|
|
348
361
|
/**
|
|
349
362
|
* @param {any} error
|
|
350
363
|
* @returns {boolean}
|
|
@@ -790,7 +803,7 @@ function __wbg_adapter_59(arg0, arg1, arg2) {
|
|
|
790
803
|
);
|
|
791
804
|
}
|
|
792
805
|
|
|
793
|
-
function
|
|
806
|
+
function __wbg_adapter_322(arg0, arg1, arg2, arg3) {
|
|
794
807
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h54a8613170fef18e(
|
|
795
808
|
arg0,
|
|
796
809
|
arg1,
|
|
@@ -1467,6 +1480,226 @@ class CiphersClient {
|
|
|
1467
1480
|
}
|
|
1468
1481
|
module.exports.CiphersClient = CiphersClient;
|
|
1469
1482
|
|
|
1483
|
+
const CollectionViewNodeItemFinalization =
|
|
1484
|
+
typeof FinalizationRegistry === "undefined"
|
|
1485
|
+
? { register: () => {}, unregister: () => {} }
|
|
1486
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_collectionviewnodeitem_free(ptr >>> 0, 1));
|
|
1487
|
+
|
|
1488
|
+
class CollectionViewNodeItem {
|
|
1489
|
+
static __wrap(ptr) {
|
|
1490
|
+
ptr = ptr >>> 0;
|
|
1491
|
+
const obj = Object.create(CollectionViewNodeItem.prototype);
|
|
1492
|
+
obj.__wbg_ptr = ptr;
|
|
1493
|
+
CollectionViewNodeItemFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1494
|
+
return obj;
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
__destroy_into_raw() {
|
|
1498
|
+
const ptr = this.__wbg_ptr;
|
|
1499
|
+
this.__wbg_ptr = 0;
|
|
1500
|
+
CollectionViewNodeItemFinalization.unregister(this);
|
|
1501
|
+
return ptr;
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
free() {
|
|
1505
|
+
const ptr = this.__destroy_into_raw();
|
|
1506
|
+
wasm.__wbg_collectionviewnodeitem_free(ptr, 0);
|
|
1507
|
+
}
|
|
1508
|
+
/**
|
|
1509
|
+
* @returns {CollectionView}
|
|
1510
|
+
*/
|
|
1511
|
+
get_item() {
|
|
1512
|
+
const ret = wasm.collectionviewnodeitem_get_item(this.__wbg_ptr);
|
|
1513
|
+
return takeObject(ret);
|
|
1514
|
+
}
|
|
1515
|
+
/**
|
|
1516
|
+
* @returns {CollectionView | undefined}
|
|
1517
|
+
*/
|
|
1518
|
+
get_parent() {
|
|
1519
|
+
const ret = wasm.collectionviewnodeitem_get_parent(this.__wbg_ptr);
|
|
1520
|
+
return takeObject(ret);
|
|
1521
|
+
}
|
|
1522
|
+
/**
|
|
1523
|
+
* @returns {CollectionView[]}
|
|
1524
|
+
*/
|
|
1525
|
+
get_children() {
|
|
1526
|
+
try {
|
|
1527
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1528
|
+
wasm.collectionviewnodeitem_get_children(retptr, this.__wbg_ptr);
|
|
1529
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1530
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1531
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1532
|
+
wasm.__wbindgen_free(r0, r1 * 4, 4);
|
|
1533
|
+
return v1;
|
|
1534
|
+
} finally {
|
|
1535
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
/**
|
|
1539
|
+
* @returns {Map<any, any>}
|
|
1540
|
+
*/
|
|
1541
|
+
get_ancestors() {
|
|
1542
|
+
const ret = wasm.collectionviewnodeitem_get_ancestors(this.__wbg_ptr);
|
|
1543
|
+
return takeObject(ret);
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
module.exports.CollectionViewNodeItem = CollectionViewNodeItem;
|
|
1547
|
+
|
|
1548
|
+
const CollectionViewTreeFinalization =
|
|
1549
|
+
typeof FinalizationRegistry === "undefined"
|
|
1550
|
+
? { register: () => {}, unregister: () => {} }
|
|
1551
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_collectionviewtree_free(ptr >>> 0, 1));
|
|
1552
|
+
|
|
1553
|
+
class CollectionViewTree {
|
|
1554
|
+
static __wrap(ptr) {
|
|
1555
|
+
ptr = ptr >>> 0;
|
|
1556
|
+
const obj = Object.create(CollectionViewTree.prototype);
|
|
1557
|
+
obj.__wbg_ptr = ptr;
|
|
1558
|
+
CollectionViewTreeFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1559
|
+
return obj;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
__destroy_into_raw() {
|
|
1563
|
+
const ptr = this.__wbg_ptr;
|
|
1564
|
+
this.__wbg_ptr = 0;
|
|
1565
|
+
CollectionViewTreeFinalization.unregister(this);
|
|
1566
|
+
return ptr;
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
free() {
|
|
1570
|
+
const ptr = this.__destroy_into_raw();
|
|
1571
|
+
wasm.__wbg_collectionviewtree_free(ptr, 0);
|
|
1572
|
+
}
|
|
1573
|
+
/**
|
|
1574
|
+
* @param {CollectionView} collection_view
|
|
1575
|
+
* @returns {CollectionViewNodeItem | undefined}
|
|
1576
|
+
*/
|
|
1577
|
+
get_item_by_id(collection_view) {
|
|
1578
|
+
const ret = wasm.collectionviewtree_get_item_by_id(
|
|
1579
|
+
this.__wbg_ptr,
|
|
1580
|
+
addHeapObject(collection_view),
|
|
1581
|
+
);
|
|
1582
|
+
return ret === 0 ? undefined : CollectionViewNodeItem.__wrap(ret);
|
|
1583
|
+
}
|
|
1584
|
+
/**
|
|
1585
|
+
* @returns {CollectionViewNodeItem[]}
|
|
1586
|
+
*/
|
|
1587
|
+
get_root_items() {
|
|
1588
|
+
try {
|
|
1589
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1590
|
+
wasm.collectionviewtree_get_root_items(retptr, this.__wbg_ptr);
|
|
1591
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1592
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1593
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1594
|
+
wasm.__wbindgen_free(r0, r1 * 4, 4);
|
|
1595
|
+
return v1;
|
|
1596
|
+
} finally {
|
|
1597
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
/**
|
|
1601
|
+
* @returns {CollectionViewNodeItem[]}
|
|
1602
|
+
*/
|
|
1603
|
+
get_flat_items() {
|
|
1604
|
+
try {
|
|
1605
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1606
|
+
wasm.collectionviewtree_get_flat_items(retptr, this.__wbg_ptr);
|
|
1607
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1608
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1609
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1610
|
+
wasm.__wbindgen_free(r0, r1 * 4, 4);
|
|
1611
|
+
return v1;
|
|
1612
|
+
} finally {
|
|
1613
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
module.exports.CollectionViewTree = CollectionViewTree;
|
|
1618
|
+
|
|
1619
|
+
const CollectionsClientFinalization =
|
|
1620
|
+
typeof FinalizationRegistry === "undefined"
|
|
1621
|
+
? { register: () => {}, unregister: () => {} }
|
|
1622
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_collectionsclient_free(ptr >>> 0, 1));
|
|
1623
|
+
|
|
1624
|
+
class CollectionsClient {
|
|
1625
|
+
static __wrap(ptr) {
|
|
1626
|
+
ptr = ptr >>> 0;
|
|
1627
|
+
const obj = Object.create(CollectionsClient.prototype);
|
|
1628
|
+
obj.__wbg_ptr = ptr;
|
|
1629
|
+
CollectionsClientFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1630
|
+
return obj;
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
__destroy_into_raw() {
|
|
1634
|
+
const ptr = this.__wbg_ptr;
|
|
1635
|
+
this.__wbg_ptr = 0;
|
|
1636
|
+
CollectionsClientFinalization.unregister(this);
|
|
1637
|
+
return ptr;
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
free() {
|
|
1641
|
+
const ptr = this.__destroy_into_raw();
|
|
1642
|
+
wasm.__wbg_collectionsclient_free(ptr, 0);
|
|
1643
|
+
}
|
|
1644
|
+
/**
|
|
1645
|
+
* @param {Collection} collection
|
|
1646
|
+
* @returns {CollectionView}
|
|
1647
|
+
*/
|
|
1648
|
+
decrypt(collection) {
|
|
1649
|
+
try {
|
|
1650
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1651
|
+
wasm.collectionsclient_decrypt(retptr, this.__wbg_ptr, addHeapObject(collection));
|
|
1652
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1653
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1654
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1655
|
+
if (r2) {
|
|
1656
|
+
throw takeObject(r1);
|
|
1657
|
+
}
|
|
1658
|
+
return takeObject(r0);
|
|
1659
|
+
} finally {
|
|
1660
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
/**
|
|
1664
|
+
* @param {Collection[]} collections
|
|
1665
|
+
* @returns {CollectionView[]}
|
|
1666
|
+
*/
|
|
1667
|
+
decrypt_list(collections) {
|
|
1668
|
+
try {
|
|
1669
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1670
|
+
const ptr0 = passArrayJsValueToWasm0(collections, wasm.__wbindgen_malloc);
|
|
1671
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1672
|
+
wasm.collectionsclient_decrypt_list(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1673
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1674
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1675
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1676
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1677
|
+
if (r3) {
|
|
1678
|
+
throw takeObject(r2);
|
|
1679
|
+
}
|
|
1680
|
+
var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1681
|
+
wasm.__wbindgen_free(r0, r1 * 4, 4);
|
|
1682
|
+
return v2;
|
|
1683
|
+
} finally {
|
|
1684
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
/**
|
|
1688
|
+
*
|
|
1689
|
+
* Returns the vector of CollectionView objects in a tree structure based on its implemented
|
|
1690
|
+
* path().
|
|
1691
|
+
* @param {CollectionView[]} collections
|
|
1692
|
+
* @returns {CollectionViewTree}
|
|
1693
|
+
*/
|
|
1694
|
+
get_collection_tree(collections) {
|
|
1695
|
+
const ptr0 = passArrayJsValueToWasm0(collections, wasm.__wbindgen_malloc);
|
|
1696
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1697
|
+
const ret = wasm.collectionsclient_get_collection_tree(this.__wbg_ptr, ptr0, len0);
|
|
1698
|
+
return CollectionViewTree.__wrap(ret);
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
module.exports.CollectionsClient = CollectionsClient;
|
|
1702
|
+
|
|
1470
1703
|
const CryptoClientFinalization =
|
|
1471
1704
|
typeof FinalizationRegistry === "undefined"
|
|
1472
1705
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -1717,7 +1950,7 @@ class ExporterClient {
|
|
|
1717
1950
|
* *Warning:* Expect this API to be unstable, and it will change in the future.
|
|
1718
1951
|
*
|
|
1719
1952
|
* For use with Apple using [ASCredentialExportManager](https://developer.apple.com/documentation/authenticationservices/ascredentialexportmanager).
|
|
1720
|
-
* Ideally the input should be immediately serialized from [ASImportableAccount](https://developer.apple.com/documentation/authenticationservices/asimportableaccount).
|
|
1953
|
+
* Ideally, the input should be immediately serialized from [ASImportableAccount](https://developer.apple.com/documentation/authenticationservices/asimportableaccount).
|
|
1721
1954
|
* @param {Account} account
|
|
1722
1955
|
* @param {Cipher[]} ciphers
|
|
1723
1956
|
* @returns {string}
|
|
@@ -1755,7 +1988,7 @@ class ExporterClient {
|
|
|
1755
1988
|
* *Warning:* Expect this API to be unstable, and it will change in the future.
|
|
1756
1989
|
*
|
|
1757
1990
|
* For use with Apple using [ASCredentialExportManager](https://developer.apple.com/documentation/authenticationservices/ascredentialexportmanager).
|
|
1758
|
-
* Ideally the input should be immediately serialized from [ASImportableAccount](https://developer.apple.com/documentation/authenticationservices/asimportableaccount).
|
|
1991
|
+
* Ideally, the input should be immediately serialized from [ASImportableAccount](https://developer.apple.com/documentation/authenticationservices/asimportableaccount).
|
|
1759
1992
|
* @param {string} payload
|
|
1760
1993
|
* @returns {Cipher[]}
|
|
1761
1994
|
*/
|
|
@@ -3510,6 +3743,14 @@ class VaultClient {
|
|
|
3510
3743
|
const ret = wasm.vaultclient_attachments(this.__wbg_ptr);
|
|
3511
3744
|
return TotpClient.__wrap(ret);
|
|
3512
3745
|
}
|
|
3746
|
+
/**
|
|
3747
|
+
* Collection related operations.
|
|
3748
|
+
* @returns {CollectionsClient}
|
|
3749
|
+
*/
|
|
3750
|
+
collections() {
|
|
3751
|
+
const ret = wasm.vaultclient_attachments(this.__wbg_ptr);
|
|
3752
|
+
return CollectionsClient.__wrap(ret);
|
|
3753
|
+
}
|
|
3513
3754
|
}
|
|
3514
3755
|
module.exports.VaultClient = VaultClient;
|
|
3515
3756
|
|
|
@@ -3585,6 +3826,11 @@ module.exports.__wbg_clearTimeout_b1115618e821c3b2 = function (arg0) {
|
|
|
3585
3826
|
return addHeapObject(ret);
|
|
3586
3827
|
};
|
|
3587
3828
|
|
|
3829
|
+
module.exports.__wbg_collectionviewnodeitem_new = function (arg0) {
|
|
3830
|
+
const ret = CollectionViewNodeItem.__wrap(arg0);
|
|
3831
|
+
return addHeapObject(ret);
|
|
3832
|
+
};
|
|
3833
|
+
|
|
3588
3834
|
module.exports.__wbg_crypto_574e78ad8b13b65f = function (arg0) {
|
|
3589
3835
|
const ret = getObject(arg0).crypto;
|
|
3590
3836
|
return addHeapObject(ret);
|
|
@@ -3647,7 +3893,7 @@ module.exports.__wbg_getTime_46267b1c24877e30 = function (arg0) {
|
|
|
3647
3893
|
return ret;
|
|
3648
3894
|
};
|
|
3649
3895
|
|
|
3650
|
-
module.exports.
|
|
3896
|
+
module.exports.__wbg_get_4d2d40ca4b374526 = function () {
|
|
3651
3897
|
return handleError(function (arg0, arg1, arg2) {
|
|
3652
3898
|
let deferred0_0;
|
|
3653
3899
|
let deferred0_1;
|
|
@@ -3669,7 +3915,7 @@ module.exports.__wbg_get_67b2ba62fc30de12 = function () {
|
|
|
3669
3915
|
}, arguments);
|
|
3670
3916
|
};
|
|
3671
3917
|
|
|
3672
|
-
module.exports.
|
|
3918
|
+
module.exports.__wbg_get_a704ce0594e32c52 = function () {
|
|
3673
3919
|
return handleError(function (arg0, arg1, arg2) {
|
|
3674
3920
|
let deferred0_0;
|
|
3675
3921
|
let deferred0_1;
|
|
@@ -3689,7 +3935,7 @@ module.exports.__wbg_get_b9b93047fe3cf45b = function (arg0, arg1) {
|
|
|
3689
3935
|
return addHeapObject(ret);
|
|
3690
3936
|
};
|
|
3691
3937
|
|
|
3692
|
-
module.exports.
|
|
3938
|
+
module.exports.__wbg_getaccesstoken_7142c5c3bc53c929 = function (arg0) {
|
|
3693
3939
|
const ret = getObject(arg0).get_access_token();
|
|
3694
3940
|
return addHeapObject(ret);
|
|
3695
3941
|
};
|
|
@@ -3794,14 +4040,14 @@ module.exports.__wbg_length_e2d2a49132c1b256 = function (arg0) {
|
|
|
3794
4040
|
return ret;
|
|
3795
4041
|
};
|
|
3796
4042
|
|
|
3797
|
-
module.exports.
|
|
4043
|
+
module.exports.__wbg_list_23076505e35b81fd = function () {
|
|
3798
4044
|
return handleError(function (arg0) {
|
|
3799
4045
|
const ret = getObject(arg0).list();
|
|
3800
4046
|
return addHeapObject(ret);
|
|
3801
4047
|
}, arguments);
|
|
3802
4048
|
};
|
|
3803
4049
|
|
|
3804
|
-
module.exports.
|
|
4050
|
+
module.exports.__wbg_list_d648fcc86445493d = function () {
|
|
3805
4051
|
return handleError(function (arg0) {
|
|
3806
4052
|
const ret = getObject(arg0).list();
|
|
3807
4053
|
return addHeapObject(ret);
|
|
@@ -3836,7 +4082,7 @@ module.exports.__wbg_new_23a2665fac83c611 = function (arg0, arg1) {
|
|
|
3836
4082
|
const a = state0.a;
|
|
3837
4083
|
state0.a = 0;
|
|
3838
4084
|
try {
|
|
3839
|
-
return
|
|
4085
|
+
return __wbg_adapter_322(a, state0.b, arg0, arg1);
|
|
3840
4086
|
} finally {
|
|
3841
4087
|
state0.a = a;
|
|
3842
4088
|
}
|
|
@@ -3853,6 +4099,11 @@ module.exports.__wbg_new_405e22f390576ce2 = function () {
|
|
|
3853
4099
|
return addHeapObject(ret);
|
|
3854
4100
|
};
|
|
3855
4101
|
|
|
4102
|
+
module.exports.__wbg_new_5e0be73521bc8c17 = function () {
|
|
4103
|
+
const ret = new Map();
|
|
4104
|
+
return addHeapObject(ret);
|
|
4105
|
+
};
|
|
4106
|
+
|
|
3856
4107
|
module.exports.__wbg_new_78feb108b6472713 = function () {
|
|
3857
4108
|
const ret = new Array();
|
|
3858
4109
|
return addHeapObject(ret);
|
|
@@ -3978,7 +4229,7 @@ module.exports.__wbg_randomFillSync_ac0988aba3254290 = function () {
|
|
|
3978
4229
|
}, arguments);
|
|
3979
4230
|
};
|
|
3980
4231
|
|
|
3981
|
-
module.exports.
|
|
4232
|
+
module.exports.__wbg_remove_371346750b94862a = function () {
|
|
3982
4233
|
return handleError(function (arg0, arg1, arg2) {
|
|
3983
4234
|
let deferred0_0;
|
|
3984
4235
|
let deferred0_1;
|
|
@@ -3993,7 +4244,7 @@ module.exports.__wbg_remove_16d35fdbb7886af8 = function () {
|
|
|
3993
4244
|
}, arguments);
|
|
3994
4245
|
};
|
|
3995
4246
|
|
|
3996
|
-
module.exports.
|
|
4247
|
+
module.exports.__wbg_remove_ad058b841824a525 = function () {
|
|
3997
4248
|
return handleError(function (arg0, arg1, arg2) {
|
|
3998
4249
|
let deferred0_0;
|
|
3999
4250
|
let deferred0_1;
|
|
@@ -4032,19 +4283,7 @@ module.exports.__wbg_setTimeout_ca12ead8b48245e2 = function (arg0, arg1) {
|
|
|
4032
4283
|
return addHeapObject(ret);
|
|
4033
4284
|
};
|
|
4034
4285
|
|
|
4035
|
-
module.exports.
|
|
4036
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
4037
|
-
};
|
|
4038
|
-
|
|
4039
|
-
module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
|
4040
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
4041
|
-
};
|
|
4042
|
-
|
|
4043
|
-
module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
|
4044
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
4045
|
-
};
|
|
4046
|
-
|
|
4047
|
-
module.exports.__wbg_set_856c97fda4471dd6 = function () {
|
|
4286
|
+
module.exports.__wbg_set_1877c5f7f0739440 = function () {
|
|
4048
4287
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4049
4288
|
let deferred0_0;
|
|
4050
4289
|
let deferred0_1;
|
|
@@ -4059,7 +4298,19 @@ module.exports.__wbg_set_856c97fda4471dd6 = function () {
|
|
|
4059
4298
|
}, arguments);
|
|
4060
4299
|
};
|
|
4061
4300
|
|
|
4062
|
-
module.exports.
|
|
4301
|
+
module.exports.__wbg_set_37837023f3d740e8 = function (arg0, arg1, arg2) {
|
|
4302
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
4303
|
+
};
|
|
4304
|
+
|
|
4305
|
+
module.exports.__wbg_set_3f1d0b984ed272ed = function (arg0, arg1, arg2) {
|
|
4306
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
4307
|
+
};
|
|
4308
|
+
|
|
4309
|
+
module.exports.__wbg_set_65595bdd868b3009 = function (arg0, arg1, arg2) {
|
|
4310
|
+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
4311
|
+
};
|
|
4312
|
+
|
|
4313
|
+
module.exports.__wbg_set_767d872ecb04d0ee = function () {
|
|
4063
4314
|
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
4064
4315
|
let deferred0_0;
|
|
4065
4316
|
let deferred0_1;
|
|
@@ -4074,6 +4325,11 @@ module.exports.__wbg_set_9e38b917dbfa39fc = function () {
|
|
|
4074
4325
|
}, arguments);
|
|
4075
4326
|
};
|
|
4076
4327
|
|
|
4328
|
+
module.exports.__wbg_set_8fc6bf8a5b1071d1 = function (arg0, arg1, arg2) {
|
|
4329
|
+
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
4330
|
+
return addHeapObject(ret);
|
|
4331
|
+
};
|
|
4332
|
+
|
|
4077
4333
|
module.exports.__wbg_setbody_5923b78a95eedf29 = function (arg0, arg1) {
|
|
4078
4334
|
getObject(arg0).body = getObject(arg1);
|
|
4079
4335
|
};
|
|
@@ -4262,18 +4518,18 @@ module.exports.__wbindgen_cb_drop = function (arg0) {
|
|
|
4262
4518
|
return ret;
|
|
4263
4519
|
};
|
|
4264
4520
|
|
|
4265
|
-
module.exports.
|
|
4266
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4521
|
+
module.exports.__wbindgen_closure_wrapper3203 = function (arg0, arg1, arg2) {
|
|
4522
|
+
const ret = makeMutClosure(arg0, arg1, 268, __wbg_adapter_54);
|
|
4267
4523
|
return addHeapObject(ret);
|
|
4268
4524
|
};
|
|
4269
4525
|
|
|
4270
|
-
module.exports.
|
|
4271
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4526
|
+
module.exports.__wbindgen_closure_wrapper5578 = function (arg0, arg1, arg2) {
|
|
4527
|
+
const ret = makeMutClosure(arg0, arg1, 293, __wbg_adapter_54);
|
|
4272
4528
|
return addHeapObject(ret);
|
|
4273
4529
|
};
|
|
4274
4530
|
|
|
4275
|
-
module.exports.
|
|
4276
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
4531
|
+
module.exports.__wbindgen_closure_wrapper5939 = function (arg0, arg1, arg2) {
|
|
4532
|
+
const ret = makeMutClosure(arg0, arg1, 318, __wbg_adapter_59);
|
|
4277
4533
|
return addHeapObject(ret);
|
|
4278
4534
|
};
|
|
4279
4535
|
|
|
Binary file
|
|
@@ -179,6 +179,7 @@ export const sendaccessclient_request_send_access_token: (
|
|
|
179
179
|
b: number,
|
|
180
180
|
c: number,
|
|
181
181
|
) => number;
|
|
182
|
+
export const isCollectionDecryptError: (a: number) => number;
|
|
182
183
|
export const cryptoclient_initialize_user_crypto: (a: number, b: number) => number;
|
|
183
184
|
export const cryptoclient_initialize_org_crypto: (a: number, b: number) => number;
|
|
184
185
|
export const cryptoclient_make_key_pair: (a: number, b: number, c: number, d: number) => void;
|
|
@@ -322,6 +323,18 @@ export const foldersclient_get: (a: number, b: number, c: number) => number;
|
|
|
322
323
|
export const foldersclient_create: (a: number, b: number) => number;
|
|
323
324
|
export const foldersclient_edit: (a: number, b: number, c: number, d: number) => number;
|
|
324
325
|
export const vaultclient_attachments: (a: number) => number;
|
|
326
|
+
export const collectionsclient_decrypt: (a: number, b: number, c: number) => void;
|
|
327
|
+
export const collectionsclient_decrypt_list: (a: number, b: number, c: number, d: number) => void;
|
|
328
|
+
export const collectionsclient_get_collection_tree: (a: number, b: number, c: number) => number;
|
|
329
|
+
export const __wbg_collectionviewtree_free: (a: number, b: number) => void;
|
|
330
|
+
export const __wbg_collectionviewnodeitem_free: (a: number, b: number) => void;
|
|
331
|
+
export const collectionviewnodeitem_get_item: (a: number) => number;
|
|
332
|
+
export const collectionviewnodeitem_get_parent: (a: number) => number;
|
|
333
|
+
export const collectionviewnodeitem_get_children: (a: number, b: number) => void;
|
|
334
|
+
export const collectionviewnodeitem_get_ancestors: (a: number) => number;
|
|
335
|
+
export const collectionviewtree_get_item_by_id: (a: number, b: number) => number;
|
|
336
|
+
export const collectionviewtree_get_root_items: (a: number, b: number) => void;
|
|
337
|
+
export const collectionviewtree_get_flat_items: (a: number, b: number) => void;
|
|
325
338
|
export const totpclient_generate_totp: (
|
|
326
339
|
a: number,
|
|
327
340
|
b: number,
|
|
@@ -351,8 +364,10 @@ export const __wbg_platformclient_free: (a: number, b: number) => void;
|
|
|
351
364
|
export const vaultclient_ciphers: (a: number) => number;
|
|
352
365
|
export const vaultclient_folders: (a: number) => number;
|
|
353
366
|
export const vaultclient_totp: (a: number) => number;
|
|
367
|
+
export const vaultclient_collections: (a: number) => number;
|
|
354
368
|
export const __wbg_foldersclient_free: (a: number, b: number) => void;
|
|
355
369
|
export const __wbg_ciphersclient_free: (a: number, b: number) => void;
|
|
370
|
+
export const __wbg_collectionsclient_free: (a: number, b: number) => void;
|
|
356
371
|
export const __wbg_vaultclient_free: (a: number, b: number) => void;
|
|
357
372
|
export const __wbg_sendaccessclient_free: (a: number, b: number) => void;
|
|
358
373
|
export const __wbg_totpclient_free: (a: number, b: number) => void;
|