@witnium-tech/witniumchain 0.7.0 → 0.8.0
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/dist/index.d.mts +847 -1
- package/dist/index.d.ts +847 -1
- package/dist/index.js +85 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +85 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1373,6 +1373,806 @@ interface paths$1 {
|
|
|
1373
1373
|
patch?: never;
|
|
1374
1374
|
trace?: never;
|
|
1375
1375
|
};
|
|
1376
|
+
"/v1/orgs/me/members": {
|
|
1377
|
+
parameters: {
|
|
1378
|
+
query?: never;
|
|
1379
|
+
header?: never;
|
|
1380
|
+
path?: never;
|
|
1381
|
+
cookie?: never;
|
|
1382
|
+
};
|
|
1383
|
+
/**
|
|
1384
|
+
* List the caller's org members (session-cookie, org-admin only)
|
|
1385
|
+
* @description Returns every active member of the authenticated org-admin's org with role, suspended state, owner flag, and delegated-key public keys.
|
|
1386
|
+
*/
|
|
1387
|
+
get: {
|
|
1388
|
+
parameters: {
|
|
1389
|
+
query?: never;
|
|
1390
|
+
header?: never;
|
|
1391
|
+
path?: never;
|
|
1392
|
+
cookie?: never;
|
|
1393
|
+
};
|
|
1394
|
+
requestBody?: never;
|
|
1395
|
+
responses: {
|
|
1396
|
+
/** @description Success */
|
|
1397
|
+
200: {
|
|
1398
|
+
headers: {
|
|
1399
|
+
[name: string]: unknown;
|
|
1400
|
+
};
|
|
1401
|
+
content: {
|
|
1402
|
+
"application/json": {
|
|
1403
|
+
members: {
|
|
1404
|
+
/**
|
|
1405
|
+
* @description UUID v4
|
|
1406
|
+
* @example 550e8400-e29b-41d4-a716-446655440000
|
|
1407
|
+
*/
|
|
1408
|
+
userId: string;
|
|
1409
|
+
/**
|
|
1410
|
+
* Format: email
|
|
1411
|
+
* @description RFC 5321 email address
|
|
1412
|
+
* @example user@example.com
|
|
1413
|
+
*/
|
|
1414
|
+
email: string;
|
|
1415
|
+
/** @enum {string} */
|
|
1416
|
+
role: "org-admin" | "member";
|
|
1417
|
+
/**
|
|
1418
|
+
* Format: date-time
|
|
1419
|
+
* @description ISO 8601 date-time string
|
|
1420
|
+
* @example 2026-05-20T10:30:00.000Z
|
|
1421
|
+
*/
|
|
1422
|
+
emailVerifiedAt: string | null;
|
|
1423
|
+
/**
|
|
1424
|
+
* Format: date-time
|
|
1425
|
+
* @description ISO 8601 date-time string
|
|
1426
|
+
* @example 2026-05-20T10:30:00.000Z
|
|
1427
|
+
*/
|
|
1428
|
+
suspendedAt: string | null;
|
|
1429
|
+
isOwner: boolean;
|
|
1430
|
+
delegatedKeyPublicKeys: string[];
|
|
1431
|
+
/**
|
|
1432
|
+
* Format: date-time
|
|
1433
|
+
* @description ISO 8601 date-time string
|
|
1434
|
+
* @example 2026-05-20T10:30:00.000Z
|
|
1435
|
+
*/
|
|
1436
|
+
membershipCreatedAt: string;
|
|
1437
|
+
}[];
|
|
1438
|
+
};
|
|
1439
|
+
};
|
|
1440
|
+
};
|
|
1441
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
1442
|
+
403: {
|
|
1443
|
+
headers: {
|
|
1444
|
+
[name: string]: unknown;
|
|
1445
|
+
};
|
|
1446
|
+
content: {
|
|
1447
|
+
"application/json": {
|
|
1448
|
+
/**
|
|
1449
|
+
* @description HTTP status code
|
|
1450
|
+
* @example 400
|
|
1451
|
+
*/
|
|
1452
|
+
statusCode?: number;
|
|
1453
|
+
/**
|
|
1454
|
+
* @description Short error label
|
|
1455
|
+
* @example Bad Request
|
|
1456
|
+
*/
|
|
1457
|
+
error?: string;
|
|
1458
|
+
/**
|
|
1459
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
1460
|
+
* @example Validation failed
|
|
1461
|
+
*/
|
|
1462
|
+
message: string | string[];
|
|
1463
|
+
};
|
|
1464
|
+
};
|
|
1465
|
+
};
|
|
1466
|
+
};
|
|
1467
|
+
};
|
|
1468
|
+
put?: never;
|
|
1469
|
+
post?: never;
|
|
1470
|
+
delete?: never;
|
|
1471
|
+
options?: never;
|
|
1472
|
+
head?: never;
|
|
1473
|
+
patch?: never;
|
|
1474
|
+
trace?: never;
|
|
1475
|
+
};
|
|
1476
|
+
"/v1/orgs/me/members/invite": {
|
|
1477
|
+
parameters: {
|
|
1478
|
+
query?: never;
|
|
1479
|
+
header?: never;
|
|
1480
|
+
path?: never;
|
|
1481
|
+
cookie?: never;
|
|
1482
|
+
};
|
|
1483
|
+
get?: never;
|
|
1484
|
+
put?: never;
|
|
1485
|
+
/** Invite a member to the caller's org */
|
|
1486
|
+
post: {
|
|
1487
|
+
parameters: {
|
|
1488
|
+
query?: never;
|
|
1489
|
+
header?: never;
|
|
1490
|
+
path?: never;
|
|
1491
|
+
cookie?: never;
|
|
1492
|
+
};
|
|
1493
|
+
requestBody?: {
|
|
1494
|
+
content: {
|
|
1495
|
+
"application/json": {
|
|
1496
|
+
/**
|
|
1497
|
+
* Format: email
|
|
1498
|
+
* @description RFC 5321 email address
|
|
1499
|
+
* @example user@example.com
|
|
1500
|
+
*/
|
|
1501
|
+
email: string;
|
|
1502
|
+
/**
|
|
1503
|
+
* @default member
|
|
1504
|
+
* @enum {string}
|
|
1505
|
+
*/
|
|
1506
|
+
role?: "org-admin" | "member";
|
|
1507
|
+
};
|
|
1508
|
+
};
|
|
1509
|
+
};
|
|
1510
|
+
responses: {
|
|
1511
|
+
/** @description Success */
|
|
1512
|
+
200: {
|
|
1513
|
+
headers: {
|
|
1514
|
+
[name: string]: unknown;
|
|
1515
|
+
};
|
|
1516
|
+
content: {
|
|
1517
|
+
"application/json": {
|
|
1518
|
+
/**
|
|
1519
|
+
* @description UUID v4
|
|
1520
|
+
* @example 550e8400-e29b-41d4-a716-446655440000
|
|
1521
|
+
*/
|
|
1522
|
+
userId: string;
|
|
1523
|
+
/**
|
|
1524
|
+
* @description UUID v4
|
|
1525
|
+
* @example 550e8400-e29b-41d4-a716-446655440000
|
|
1526
|
+
*/
|
|
1527
|
+
membershipId: string;
|
|
1528
|
+
userPreexisted: boolean;
|
|
1529
|
+
membershipPreexisted: boolean;
|
|
1530
|
+
emailVerifyToken?: string;
|
|
1531
|
+
};
|
|
1532
|
+
};
|
|
1533
|
+
};
|
|
1534
|
+
/** @description Bad Request — validation failed */
|
|
1535
|
+
400: {
|
|
1536
|
+
headers: {
|
|
1537
|
+
[name: string]: unknown;
|
|
1538
|
+
};
|
|
1539
|
+
content: {
|
|
1540
|
+
"application/json": {
|
|
1541
|
+
/**
|
|
1542
|
+
* @description HTTP status code
|
|
1543
|
+
* @example 400
|
|
1544
|
+
*/
|
|
1545
|
+
statusCode?: number;
|
|
1546
|
+
/**
|
|
1547
|
+
* @description Short error label
|
|
1548
|
+
* @example Bad Request
|
|
1549
|
+
*/
|
|
1550
|
+
error?: string;
|
|
1551
|
+
/**
|
|
1552
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
1553
|
+
* @example Validation failed
|
|
1554
|
+
*/
|
|
1555
|
+
message: string | string[];
|
|
1556
|
+
};
|
|
1557
|
+
};
|
|
1558
|
+
};
|
|
1559
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
1560
|
+
403: {
|
|
1561
|
+
headers: {
|
|
1562
|
+
[name: string]: unknown;
|
|
1563
|
+
};
|
|
1564
|
+
content: {
|
|
1565
|
+
"application/json": {
|
|
1566
|
+
/**
|
|
1567
|
+
* @description HTTP status code
|
|
1568
|
+
* @example 400
|
|
1569
|
+
*/
|
|
1570
|
+
statusCode?: number;
|
|
1571
|
+
/**
|
|
1572
|
+
* @description Short error label
|
|
1573
|
+
* @example Bad Request
|
|
1574
|
+
*/
|
|
1575
|
+
error?: string;
|
|
1576
|
+
/**
|
|
1577
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
1578
|
+
* @example Validation failed
|
|
1579
|
+
*/
|
|
1580
|
+
message: string | string[];
|
|
1581
|
+
};
|
|
1582
|
+
};
|
|
1583
|
+
};
|
|
1584
|
+
};
|
|
1585
|
+
};
|
|
1586
|
+
delete?: never;
|
|
1587
|
+
options?: never;
|
|
1588
|
+
head?: never;
|
|
1589
|
+
patch?: never;
|
|
1590
|
+
trace?: never;
|
|
1591
|
+
};
|
|
1592
|
+
"/v1/orgs/me/members/{userId}/suspend": {
|
|
1593
|
+
parameters: {
|
|
1594
|
+
query?: never;
|
|
1595
|
+
header?: never;
|
|
1596
|
+
path?: never;
|
|
1597
|
+
cookie?: never;
|
|
1598
|
+
};
|
|
1599
|
+
get?: never;
|
|
1600
|
+
put?: never;
|
|
1601
|
+
/** Suspend a member (reversible). The owner cannot be suspended. */
|
|
1602
|
+
post: {
|
|
1603
|
+
parameters: {
|
|
1604
|
+
query?: never;
|
|
1605
|
+
header?: never;
|
|
1606
|
+
path?: never;
|
|
1607
|
+
cookie?: never;
|
|
1608
|
+
};
|
|
1609
|
+
requestBody?: never;
|
|
1610
|
+
responses: {
|
|
1611
|
+
/** @description Success */
|
|
1612
|
+
200: {
|
|
1613
|
+
headers: {
|
|
1614
|
+
[name: string]: unknown;
|
|
1615
|
+
};
|
|
1616
|
+
content: {
|
|
1617
|
+
"application/json": {
|
|
1618
|
+
/**
|
|
1619
|
+
* @description UUID v4
|
|
1620
|
+
* @example 550e8400-e29b-41d4-a716-446655440000
|
|
1621
|
+
*/
|
|
1622
|
+
membershipId: string;
|
|
1623
|
+
/**
|
|
1624
|
+
* Format: date-time
|
|
1625
|
+
* @description ISO 8601 date-time string
|
|
1626
|
+
* @example 2026-05-20T10:30:00.000Z
|
|
1627
|
+
*/
|
|
1628
|
+
suspendedAt: string;
|
|
1629
|
+
};
|
|
1630
|
+
};
|
|
1631
|
+
};
|
|
1632
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
1633
|
+
403: {
|
|
1634
|
+
headers: {
|
|
1635
|
+
[name: string]: unknown;
|
|
1636
|
+
};
|
|
1637
|
+
content: {
|
|
1638
|
+
"application/json": {
|
|
1639
|
+
/**
|
|
1640
|
+
* @description HTTP status code
|
|
1641
|
+
* @example 400
|
|
1642
|
+
*/
|
|
1643
|
+
statusCode?: number;
|
|
1644
|
+
/**
|
|
1645
|
+
* @description Short error label
|
|
1646
|
+
* @example Bad Request
|
|
1647
|
+
*/
|
|
1648
|
+
error?: string;
|
|
1649
|
+
/**
|
|
1650
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
1651
|
+
* @example Validation failed
|
|
1652
|
+
*/
|
|
1653
|
+
message: string | string[];
|
|
1654
|
+
};
|
|
1655
|
+
};
|
|
1656
|
+
};
|
|
1657
|
+
/** @description Not Found */
|
|
1658
|
+
404: {
|
|
1659
|
+
headers: {
|
|
1660
|
+
[name: string]: unknown;
|
|
1661
|
+
};
|
|
1662
|
+
content: {
|
|
1663
|
+
"application/json": {
|
|
1664
|
+
/**
|
|
1665
|
+
* @description HTTP status code
|
|
1666
|
+
* @example 400
|
|
1667
|
+
*/
|
|
1668
|
+
statusCode?: number;
|
|
1669
|
+
/**
|
|
1670
|
+
* @description Short error label
|
|
1671
|
+
* @example Bad Request
|
|
1672
|
+
*/
|
|
1673
|
+
error?: string;
|
|
1674
|
+
/**
|
|
1675
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
1676
|
+
* @example Validation failed
|
|
1677
|
+
*/
|
|
1678
|
+
message: string | string[];
|
|
1679
|
+
};
|
|
1680
|
+
};
|
|
1681
|
+
};
|
|
1682
|
+
/** @description Conflict */
|
|
1683
|
+
409: {
|
|
1684
|
+
headers: {
|
|
1685
|
+
[name: string]: unknown;
|
|
1686
|
+
};
|
|
1687
|
+
content: {
|
|
1688
|
+
"application/json": {
|
|
1689
|
+
/**
|
|
1690
|
+
* @description HTTP status code
|
|
1691
|
+
* @example 400
|
|
1692
|
+
*/
|
|
1693
|
+
statusCode?: number;
|
|
1694
|
+
/**
|
|
1695
|
+
* @description Short error label
|
|
1696
|
+
* @example Bad Request
|
|
1697
|
+
*/
|
|
1698
|
+
error?: string;
|
|
1699
|
+
/**
|
|
1700
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
1701
|
+
* @example Validation failed
|
|
1702
|
+
*/
|
|
1703
|
+
message: string | string[];
|
|
1704
|
+
};
|
|
1705
|
+
};
|
|
1706
|
+
};
|
|
1707
|
+
};
|
|
1708
|
+
};
|
|
1709
|
+
delete?: never;
|
|
1710
|
+
options?: never;
|
|
1711
|
+
head?: never;
|
|
1712
|
+
patch?: never;
|
|
1713
|
+
trace?: never;
|
|
1714
|
+
};
|
|
1715
|
+
"/v1/orgs/me/members/{userId}/unsuspend": {
|
|
1716
|
+
parameters: {
|
|
1717
|
+
query?: never;
|
|
1718
|
+
header?: never;
|
|
1719
|
+
path?: never;
|
|
1720
|
+
cookie?: never;
|
|
1721
|
+
};
|
|
1722
|
+
get?: never;
|
|
1723
|
+
put?: never;
|
|
1724
|
+
/** Lift a member suspension */
|
|
1725
|
+
post: {
|
|
1726
|
+
parameters: {
|
|
1727
|
+
query?: never;
|
|
1728
|
+
header?: never;
|
|
1729
|
+
path?: never;
|
|
1730
|
+
cookie?: never;
|
|
1731
|
+
};
|
|
1732
|
+
requestBody?: never;
|
|
1733
|
+
responses: {
|
|
1734
|
+
/** @description Success */
|
|
1735
|
+
200: {
|
|
1736
|
+
headers: {
|
|
1737
|
+
[name: string]: unknown;
|
|
1738
|
+
};
|
|
1739
|
+
content: {
|
|
1740
|
+
"application/json": {
|
|
1741
|
+
/**
|
|
1742
|
+
* @description UUID v4
|
|
1743
|
+
* @example 550e8400-e29b-41d4-a716-446655440000
|
|
1744
|
+
*/
|
|
1745
|
+
membershipId: string;
|
|
1746
|
+
};
|
|
1747
|
+
};
|
|
1748
|
+
};
|
|
1749
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
1750
|
+
403: {
|
|
1751
|
+
headers: {
|
|
1752
|
+
[name: string]: unknown;
|
|
1753
|
+
};
|
|
1754
|
+
content: {
|
|
1755
|
+
"application/json": {
|
|
1756
|
+
/**
|
|
1757
|
+
* @description HTTP status code
|
|
1758
|
+
* @example 400
|
|
1759
|
+
*/
|
|
1760
|
+
statusCode?: number;
|
|
1761
|
+
/**
|
|
1762
|
+
* @description Short error label
|
|
1763
|
+
* @example Bad Request
|
|
1764
|
+
*/
|
|
1765
|
+
error?: string;
|
|
1766
|
+
/**
|
|
1767
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
1768
|
+
* @example Validation failed
|
|
1769
|
+
*/
|
|
1770
|
+
message: string | string[];
|
|
1771
|
+
};
|
|
1772
|
+
};
|
|
1773
|
+
};
|
|
1774
|
+
/** @description Not Found */
|
|
1775
|
+
404: {
|
|
1776
|
+
headers: {
|
|
1777
|
+
[name: string]: unknown;
|
|
1778
|
+
};
|
|
1779
|
+
content: {
|
|
1780
|
+
"application/json": {
|
|
1781
|
+
/**
|
|
1782
|
+
* @description HTTP status code
|
|
1783
|
+
* @example 400
|
|
1784
|
+
*/
|
|
1785
|
+
statusCode?: number;
|
|
1786
|
+
/**
|
|
1787
|
+
* @description Short error label
|
|
1788
|
+
* @example Bad Request
|
|
1789
|
+
*/
|
|
1790
|
+
error?: string;
|
|
1791
|
+
/**
|
|
1792
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
1793
|
+
* @example Validation failed
|
|
1794
|
+
*/
|
|
1795
|
+
message: string | string[];
|
|
1796
|
+
};
|
|
1797
|
+
};
|
|
1798
|
+
};
|
|
1799
|
+
};
|
|
1800
|
+
};
|
|
1801
|
+
delete?: never;
|
|
1802
|
+
options?: never;
|
|
1803
|
+
head?: never;
|
|
1804
|
+
patch?: never;
|
|
1805
|
+
trace?: never;
|
|
1806
|
+
};
|
|
1807
|
+
"/v1/orgs/me/members/{userId}/role": {
|
|
1808
|
+
parameters: {
|
|
1809
|
+
query?: never;
|
|
1810
|
+
header?: never;
|
|
1811
|
+
path?: never;
|
|
1812
|
+
cookie?: never;
|
|
1813
|
+
};
|
|
1814
|
+
get?: never;
|
|
1815
|
+
/** Set a member's role (org-admin | member). Owner cannot be demoted. */
|
|
1816
|
+
put: {
|
|
1817
|
+
parameters: {
|
|
1818
|
+
query?: never;
|
|
1819
|
+
header?: never;
|
|
1820
|
+
path?: never;
|
|
1821
|
+
cookie?: never;
|
|
1822
|
+
};
|
|
1823
|
+
requestBody?: {
|
|
1824
|
+
content: {
|
|
1825
|
+
"application/json": {
|
|
1826
|
+
/** @enum {string} */
|
|
1827
|
+
role: "org-admin" | "member";
|
|
1828
|
+
};
|
|
1829
|
+
};
|
|
1830
|
+
};
|
|
1831
|
+
responses: {
|
|
1832
|
+
/** @description Success */
|
|
1833
|
+
200: {
|
|
1834
|
+
headers: {
|
|
1835
|
+
[name: string]: unknown;
|
|
1836
|
+
};
|
|
1837
|
+
content: {
|
|
1838
|
+
"application/json": {
|
|
1839
|
+
/**
|
|
1840
|
+
* @description UUID v4
|
|
1841
|
+
* @example 550e8400-e29b-41d4-a716-446655440000
|
|
1842
|
+
*/
|
|
1843
|
+
membershipId: string;
|
|
1844
|
+
/** @enum {string} */
|
|
1845
|
+
role: "org-admin" | "member";
|
|
1846
|
+
};
|
|
1847
|
+
};
|
|
1848
|
+
};
|
|
1849
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
1850
|
+
403: {
|
|
1851
|
+
headers: {
|
|
1852
|
+
[name: string]: unknown;
|
|
1853
|
+
};
|
|
1854
|
+
content: {
|
|
1855
|
+
"application/json": {
|
|
1856
|
+
/**
|
|
1857
|
+
* @description HTTP status code
|
|
1858
|
+
* @example 400
|
|
1859
|
+
*/
|
|
1860
|
+
statusCode?: number;
|
|
1861
|
+
/**
|
|
1862
|
+
* @description Short error label
|
|
1863
|
+
* @example Bad Request
|
|
1864
|
+
*/
|
|
1865
|
+
error?: string;
|
|
1866
|
+
/**
|
|
1867
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
1868
|
+
* @example Validation failed
|
|
1869
|
+
*/
|
|
1870
|
+
message: string | string[];
|
|
1871
|
+
};
|
|
1872
|
+
};
|
|
1873
|
+
};
|
|
1874
|
+
/** @description Not Found */
|
|
1875
|
+
404: {
|
|
1876
|
+
headers: {
|
|
1877
|
+
[name: string]: unknown;
|
|
1878
|
+
};
|
|
1879
|
+
content: {
|
|
1880
|
+
"application/json": {
|
|
1881
|
+
/**
|
|
1882
|
+
* @description HTTP status code
|
|
1883
|
+
* @example 400
|
|
1884
|
+
*/
|
|
1885
|
+
statusCode?: number;
|
|
1886
|
+
/**
|
|
1887
|
+
* @description Short error label
|
|
1888
|
+
* @example Bad Request
|
|
1889
|
+
*/
|
|
1890
|
+
error?: string;
|
|
1891
|
+
/**
|
|
1892
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
1893
|
+
* @example Validation failed
|
|
1894
|
+
*/
|
|
1895
|
+
message: string | string[];
|
|
1896
|
+
};
|
|
1897
|
+
};
|
|
1898
|
+
};
|
|
1899
|
+
/** @description Conflict */
|
|
1900
|
+
409: {
|
|
1901
|
+
headers: {
|
|
1902
|
+
[name: string]: unknown;
|
|
1903
|
+
};
|
|
1904
|
+
content: {
|
|
1905
|
+
"application/json": {
|
|
1906
|
+
/**
|
|
1907
|
+
* @description HTTP status code
|
|
1908
|
+
* @example 400
|
|
1909
|
+
*/
|
|
1910
|
+
statusCode?: number;
|
|
1911
|
+
/**
|
|
1912
|
+
* @description Short error label
|
|
1913
|
+
* @example Bad Request
|
|
1914
|
+
*/
|
|
1915
|
+
error?: string;
|
|
1916
|
+
/**
|
|
1917
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
1918
|
+
* @example Validation failed
|
|
1919
|
+
*/
|
|
1920
|
+
message: string | string[];
|
|
1921
|
+
};
|
|
1922
|
+
};
|
|
1923
|
+
};
|
|
1924
|
+
};
|
|
1925
|
+
};
|
|
1926
|
+
post?: never;
|
|
1927
|
+
delete?: never;
|
|
1928
|
+
options?: never;
|
|
1929
|
+
head?: never;
|
|
1930
|
+
patch?: never;
|
|
1931
|
+
trace?: never;
|
|
1932
|
+
};
|
|
1933
|
+
"/v1/orgs/me/members/{userId}": {
|
|
1934
|
+
parameters: {
|
|
1935
|
+
query?: never;
|
|
1936
|
+
header?: never;
|
|
1937
|
+
path?: never;
|
|
1938
|
+
cookie?: never;
|
|
1939
|
+
};
|
|
1940
|
+
get?: never;
|
|
1941
|
+
put?: never;
|
|
1942
|
+
post?: never;
|
|
1943
|
+
/** Remove a member (terminal). Revokes their delegated keys. Owner cannot be removed. */
|
|
1944
|
+
delete: {
|
|
1945
|
+
parameters: {
|
|
1946
|
+
query?: never;
|
|
1947
|
+
header?: never;
|
|
1948
|
+
path?: never;
|
|
1949
|
+
cookie?: never;
|
|
1950
|
+
};
|
|
1951
|
+
requestBody?: never;
|
|
1952
|
+
responses: {
|
|
1953
|
+
/** @description Success */
|
|
1954
|
+
200: {
|
|
1955
|
+
headers: {
|
|
1956
|
+
[name: string]: unknown;
|
|
1957
|
+
};
|
|
1958
|
+
content: {
|
|
1959
|
+
"application/json": {
|
|
1960
|
+
/**
|
|
1961
|
+
* @description UUID v4
|
|
1962
|
+
* @example 550e8400-e29b-41d4-a716-446655440000
|
|
1963
|
+
*/
|
|
1964
|
+
membershipId: string;
|
|
1965
|
+
/**
|
|
1966
|
+
* Format: date-time
|
|
1967
|
+
* @description ISO 8601 date-time string
|
|
1968
|
+
* @example 2026-05-20T10:30:00.000Z
|
|
1969
|
+
*/
|
|
1970
|
+
revokedAt: string;
|
|
1971
|
+
delegatedKeysRevoked: number;
|
|
1972
|
+
};
|
|
1973
|
+
};
|
|
1974
|
+
};
|
|
1975
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
1976
|
+
403: {
|
|
1977
|
+
headers: {
|
|
1978
|
+
[name: string]: unknown;
|
|
1979
|
+
};
|
|
1980
|
+
content: {
|
|
1981
|
+
"application/json": {
|
|
1982
|
+
/**
|
|
1983
|
+
* @description HTTP status code
|
|
1984
|
+
* @example 400
|
|
1985
|
+
*/
|
|
1986
|
+
statusCode?: number;
|
|
1987
|
+
/**
|
|
1988
|
+
* @description Short error label
|
|
1989
|
+
* @example Bad Request
|
|
1990
|
+
*/
|
|
1991
|
+
error?: string;
|
|
1992
|
+
/**
|
|
1993
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
1994
|
+
* @example Validation failed
|
|
1995
|
+
*/
|
|
1996
|
+
message: string | string[];
|
|
1997
|
+
};
|
|
1998
|
+
};
|
|
1999
|
+
};
|
|
2000
|
+
/** @description Not Found */
|
|
2001
|
+
404: {
|
|
2002
|
+
headers: {
|
|
2003
|
+
[name: string]: unknown;
|
|
2004
|
+
};
|
|
2005
|
+
content: {
|
|
2006
|
+
"application/json": {
|
|
2007
|
+
/**
|
|
2008
|
+
* @description HTTP status code
|
|
2009
|
+
* @example 400
|
|
2010
|
+
*/
|
|
2011
|
+
statusCode?: number;
|
|
2012
|
+
/**
|
|
2013
|
+
* @description Short error label
|
|
2014
|
+
* @example Bad Request
|
|
2015
|
+
*/
|
|
2016
|
+
error?: string;
|
|
2017
|
+
/**
|
|
2018
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
2019
|
+
* @example Validation failed
|
|
2020
|
+
*/
|
|
2021
|
+
message: string | string[];
|
|
2022
|
+
};
|
|
2023
|
+
};
|
|
2024
|
+
};
|
|
2025
|
+
/** @description Conflict */
|
|
2026
|
+
409: {
|
|
2027
|
+
headers: {
|
|
2028
|
+
[name: string]: unknown;
|
|
2029
|
+
};
|
|
2030
|
+
content: {
|
|
2031
|
+
"application/json": {
|
|
2032
|
+
/**
|
|
2033
|
+
* @description HTTP status code
|
|
2034
|
+
* @example 400
|
|
2035
|
+
*/
|
|
2036
|
+
statusCode?: number;
|
|
2037
|
+
/**
|
|
2038
|
+
* @description Short error label
|
|
2039
|
+
* @example Bad Request
|
|
2040
|
+
*/
|
|
2041
|
+
error?: string;
|
|
2042
|
+
/**
|
|
2043
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
2044
|
+
* @example Validation failed
|
|
2045
|
+
*/
|
|
2046
|
+
message: string | string[];
|
|
2047
|
+
};
|
|
2048
|
+
};
|
|
2049
|
+
};
|
|
2050
|
+
};
|
|
2051
|
+
};
|
|
2052
|
+
options?: never;
|
|
2053
|
+
head?: never;
|
|
2054
|
+
patch?: never;
|
|
2055
|
+
trace?: never;
|
|
2056
|
+
};
|
|
2057
|
+
"/v1/orgs/me/members/{userId}/resend-invite": {
|
|
2058
|
+
parameters: {
|
|
2059
|
+
query?: never;
|
|
2060
|
+
header?: never;
|
|
2061
|
+
path?: never;
|
|
2062
|
+
cookie?: never;
|
|
2063
|
+
};
|
|
2064
|
+
get?: never;
|
|
2065
|
+
put?: never;
|
|
2066
|
+
/** Re-mint an email-verify token for a pending member */
|
|
2067
|
+
post: {
|
|
2068
|
+
parameters: {
|
|
2069
|
+
query?: never;
|
|
2070
|
+
header?: never;
|
|
2071
|
+
path?: never;
|
|
2072
|
+
cookie?: never;
|
|
2073
|
+
};
|
|
2074
|
+
requestBody?: never;
|
|
2075
|
+
responses: {
|
|
2076
|
+
/** @description Success */
|
|
2077
|
+
200: {
|
|
2078
|
+
headers: {
|
|
2079
|
+
[name: string]: unknown;
|
|
2080
|
+
};
|
|
2081
|
+
content: {
|
|
2082
|
+
"application/json": {
|
|
2083
|
+
emailVerifyToken: string;
|
|
2084
|
+
/**
|
|
2085
|
+
* Format: email
|
|
2086
|
+
* @description RFC 5321 email address
|
|
2087
|
+
* @example user@example.com
|
|
2088
|
+
*/
|
|
2089
|
+
email: string;
|
|
2090
|
+
};
|
|
2091
|
+
};
|
|
2092
|
+
};
|
|
2093
|
+
/** @description Forbidden — insufficient permissions or scope */
|
|
2094
|
+
403: {
|
|
2095
|
+
headers: {
|
|
2096
|
+
[name: string]: unknown;
|
|
2097
|
+
};
|
|
2098
|
+
content: {
|
|
2099
|
+
"application/json": {
|
|
2100
|
+
/**
|
|
2101
|
+
* @description HTTP status code
|
|
2102
|
+
* @example 400
|
|
2103
|
+
*/
|
|
2104
|
+
statusCode?: number;
|
|
2105
|
+
/**
|
|
2106
|
+
* @description Short error label
|
|
2107
|
+
* @example Bad Request
|
|
2108
|
+
*/
|
|
2109
|
+
error?: string;
|
|
2110
|
+
/**
|
|
2111
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
2112
|
+
* @example Validation failed
|
|
2113
|
+
*/
|
|
2114
|
+
message: string | string[];
|
|
2115
|
+
};
|
|
2116
|
+
};
|
|
2117
|
+
};
|
|
2118
|
+
/** @description Not Found */
|
|
2119
|
+
404: {
|
|
2120
|
+
headers: {
|
|
2121
|
+
[name: string]: unknown;
|
|
2122
|
+
};
|
|
2123
|
+
content: {
|
|
2124
|
+
"application/json": {
|
|
2125
|
+
/**
|
|
2126
|
+
* @description HTTP status code
|
|
2127
|
+
* @example 400
|
|
2128
|
+
*/
|
|
2129
|
+
statusCode?: number;
|
|
2130
|
+
/**
|
|
2131
|
+
* @description Short error label
|
|
2132
|
+
* @example Bad Request
|
|
2133
|
+
*/
|
|
2134
|
+
error?: string;
|
|
2135
|
+
/**
|
|
2136
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
2137
|
+
* @example Validation failed
|
|
2138
|
+
*/
|
|
2139
|
+
message: string | string[];
|
|
2140
|
+
};
|
|
2141
|
+
};
|
|
2142
|
+
};
|
|
2143
|
+
/** @description Conflict */
|
|
2144
|
+
409: {
|
|
2145
|
+
headers: {
|
|
2146
|
+
[name: string]: unknown;
|
|
2147
|
+
};
|
|
2148
|
+
content: {
|
|
2149
|
+
"application/json": {
|
|
2150
|
+
/**
|
|
2151
|
+
* @description HTTP status code
|
|
2152
|
+
* @example 400
|
|
2153
|
+
*/
|
|
2154
|
+
statusCode?: number;
|
|
2155
|
+
/**
|
|
2156
|
+
* @description Short error label
|
|
2157
|
+
* @example Bad Request
|
|
2158
|
+
*/
|
|
2159
|
+
error?: string;
|
|
2160
|
+
/**
|
|
2161
|
+
* @description Human-readable error message. Validation errors from `ZodError.flatten()` may be returned as an array.
|
|
2162
|
+
* @example Validation failed
|
|
2163
|
+
*/
|
|
2164
|
+
message: string | string[];
|
|
2165
|
+
};
|
|
2166
|
+
};
|
|
2167
|
+
};
|
|
2168
|
+
};
|
|
2169
|
+
};
|
|
2170
|
+
delete?: never;
|
|
2171
|
+
options?: never;
|
|
2172
|
+
head?: never;
|
|
2173
|
+
patch?: never;
|
|
2174
|
+
trace?: never;
|
|
2175
|
+
};
|
|
1376
2176
|
"/v1/admin/organizations": {
|
|
1377
2177
|
parameters: {
|
|
1378
2178
|
query?: never;
|
|
@@ -9366,6 +10166,14 @@ type CreateUserResponse = Res<'/v1/orgs/me/users', 'post'>;
|
|
|
9366
10166
|
type ListUsersResponse = Res<'/v1/orgs/me/users', 'get'>;
|
|
9367
10167
|
type CreateOrgRequest = Req<'/v1/orgs', 'post'>;
|
|
9368
10168
|
type CreateOrgResponse = Res<'/v1/orgs', 'post'>;
|
|
10169
|
+
type MembersListResponse = Res<'/v1/orgs/me/members', 'get'>;
|
|
10170
|
+
type InviteMemberRequest = Req<'/v1/orgs/me/members/invite', 'post'>;
|
|
10171
|
+
type InviteMemberResponse = Res<'/v1/orgs/me/members/invite', 'post'>;
|
|
10172
|
+
type SuspendMemberResponse = Res<'/v1/orgs/me/members/{userId}/suspend', 'post'>;
|
|
10173
|
+
type SetMemberRoleRequest = Req<'/v1/orgs/me/members/{userId}/role', 'put'>;
|
|
10174
|
+
type SetMemberRoleResponse = Res<'/v1/orgs/me/members/{userId}/role', 'put'>;
|
|
10175
|
+
type RemoveMemberResponse = Res<'/v1/orgs/me/members/{userId}', 'delete'>;
|
|
10176
|
+
type ResendInviteResponse = Res<'/v1/orgs/me/members/{userId}/resend-invite', 'post'>;
|
|
9369
10177
|
type CreateOrganizationRequest = Req<'/v1/admin/organizations', 'post'>;
|
|
9370
10178
|
type CreateOrganizationResponse = Res<'/v1/admin/organizations', 'post'>;
|
|
9371
10179
|
type SetAccountTypeRequest = Req<'/v1/admin/organizations/{id}/account-type', 'patch'>;
|
|
@@ -9659,6 +10467,8 @@ declare class WitniumchainClient {
|
|
|
9659
10467
|
readonly oauth: OauthNamespace;
|
|
9660
10468
|
/** MFA self-management. Accessed as `client.mfa.totp.*` and `client.mfa.recoveryCodes.*`. */
|
|
9661
10469
|
readonly mfa: MfaNamespace;
|
|
10470
|
+
/** Session-cookie team management (org-admin only). `client.orgUsers.*`. */
|
|
10471
|
+
readonly orgUsers: OrgMembers;
|
|
9662
10472
|
constructor(config: WitniumchainClientConfig);
|
|
9663
10473
|
/**
|
|
9664
10474
|
* Convenience alias for {@link getAccount} — returns the authenticated
|
|
@@ -9677,6 +10487,15 @@ declare class WitniumchainClient {
|
|
|
9677
10487
|
* for UIs that prefer to render the verify link themselves.
|
|
9678
10488
|
*/
|
|
9679
10489
|
createOrg(body: CreateOrgRequest): Promise<CreateOrgResponse>;
|
|
10490
|
+
listMembers(): Promise<MembersListResponse>;
|
|
10491
|
+
inviteMember(body: InviteMemberRequest): Promise<InviteMemberResponse>;
|
|
10492
|
+
suspendMember(userId: string): Promise<SuspendMemberResponse>;
|
|
10493
|
+
unsuspendMember(userId: string): Promise<{
|
|
10494
|
+
membershipId: string;
|
|
10495
|
+
}>;
|
|
10496
|
+
setMemberRole(userId: string, body: SetMemberRoleRequest): Promise<SetMemberRoleResponse>;
|
|
10497
|
+
removeMember(userId: string): Promise<RemoveMemberResponse>;
|
|
10498
|
+
resendMemberInvite(userId: string): Promise<ResendInviteResponse>;
|
|
9680
10499
|
verifyEmail(token: string): Promise<VerifyEmailResponse>;
|
|
9681
10500
|
login(body: LoginRequest): Promise<LoginResponse>;
|
|
9682
10501
|
logout(): Promise<LogoutResponse>;
|
|
@@ -9961,6 +10780,33 @@ declare class MfaNamespace {
|
|
|
9961
10780
|
readonly recoveryCodes: MfaRecoveryCodes;
|
|
9962
10781
|
constructor(client: WitniumchainClient);
|
|
9963
10782
|
}
|
|
10783
|
+
/**
|
|
10784
|
+
* `client.orgUsers.*` — session-cookie team management for the org-admin
|
|
10785
|
+
* dashboard. The caller's org + org-admin role are resolved server-side from
|
|
10786
|
+
* the session; there's no orgId parameter and no cross-org access. 2-tier
|
|
10787
|
+
* role model (`org-admin` / `member`); the org owner is protected from
|
|
10788
|
+
* demote / suspend / remove.
|
|
10789
|
+
*/
|
|
10790
|
+
declare class OrgMembers {
|
|
10791
|
+
private readonly client;
|
|
10792
|
+
constructor(client: WitniumchainClient);
|
|
10793
|
+
/** List the caller's org members (role, suspendedAt, isOwner, keys). */
|
|
10794
|
+
list(): Promise<MembersListResponse>;
|
|
10795
|
+
/** Invite a member by email (default role `member`). */
|
|
10796
|
+
invite(body: InviteMemberRequest): Promise<InviteMemberResponse>;
|
|
10797
|
+
/** Suspend a member (reversible). The owner cannot be suspended. */
|
|
10798
|
+
suspend(userId: string): Promise<SuspendMemberResponse>;
|
|
10799
|
+
/** Lift a member's suspension. */
|
|
10800
|
+
unsuspend(userId: string): Promise<{
|
|
10801
|
+
membershipId: string;
|
|
10802
|
+
}>;
|
|
10803
|
+
/** Set a member's role. Refuses to demote the owner. */
|
|
10804
|
+
setRole(userId: string, role: SetMemberRoleRequest['role']): Promise<SetMemberRoleResponse>;
|
|
10805
|
+
/** Remove a member (terminal; revokes their delegated keys). Owner protected. */
|
|
10806
|
+
remove(userId: string): Promise<RemoveMemberResponse>;
|
|
10807
|
+
/** Re-mint an email-verify token for a pending member. */
|
|
10808
|
+
resendInvite(userId: string): Promise<ResendInviteResponse>;
|
|
10809
|
+
}
|
|
9964
10810
|
declare class MfaTotp {
|
|
9965
10811
|
private readonly client;
|
|
9966
10812
|
constructor(client: WitniumchainClient);
|
|
@@ -10226,4 +11072,4 @@ declare function buildRevokeSigningKeyPayload(args: {
|
|
|
10226
11072
|
key: string;
|
|
10227
11073
|
}): string;
|
|
10228
11074
|
|
|
10229
|
-
export { type AccountResponse, type AccountType, type paths$1 as AccountsPaths, type AddSigningKeyRequest$1 as AddSigningKeyRequest, type AddSigningKeyResponse, type AdjustCreditsRequest, type AdjustCreditsResponse, type BeginOAuthLoginArgs, type BeginOAuthLoginResult, type paths as ChainPaths, type CheckoutRequest, type CheckoutResponse, type CreateOrgRequest, type CreateOrgResponse, type CreateOrganizationRequest, type CreateOrganizationResponse, type CreateUserRequest, type CreateUserResponse, DelegatedKeys, type FinalizeWitnessResponse, type ForgotPasswordRequest, type ForgotPasswordResponse, type GetWitnessResponse, type HealthLiveResponse, type HealthReadyResponse, type LedgerResponse, type ListDelegatedKeysResponse, type ListOauthSessionsResponse, type ListUsersResponse, type LoginRequest, type LoginResponse, type LogoutResponse, MfaNamespace, MfaRecoveryCodes, MfaTotp, type OAuthTokenSnapshot, OWNER_OP, OauthNamespace, OauthSessions, OrgUsers, type OwnerOpName, type OwnerSigner, type PauseRequest$1 as PauseRequest, type PauseResponse, type PkceVerifierStorage, type PortalResponse, type PrepareDelegatedKeyRequest, type PreparedDelegatedKeyResponse, type ProposeWitnessRequest, type ProposeWitnessResponse, type ProvisionContractRequest, type ProvisionContractResponse, type ProvisionDelegatedKeyArgs, type ProvisionDelegatedKeyResult, type PublicOrgResponse, type RecoveryCodesRegenerateResponse, type ResetAccountResponse, type ResetPasswordRequest, type ResetPasswordResponse, type RevokeDelegatedKeyResponse, type RevokeSigningKeyRequest$1 as RevokeSigningKeyRequest, type RevokeSigningKeyResponse, type RevokeWitnessRequest, type RevokeWitnessResponse, type RotateApiKeyResponse, type SetAccountTypeRequest, type SetAccountTypeResponse, type SignRequest, type SignResponse, type SignWitnessRequest, type SignWitnessResponse, type SignedRequestSigner, SigningKeys, type SignupRequest, type SignupResponse, type SubmitDelegatedKeyRequest, type SubmitDelegatedKeyResponse, Subscriptions, type TotpConfirmRequest, type TotpConfirmResponse, type TotpDisableResponse, type TotpEnrollResponse, type UnpauseRequest, type UnpauseResponse, type VerifyEmailResponse, type VerifyOrganizationResponse, WitniumchainAdminClient, type WitniumchainAdminClientConfig, WitniumchainApiError, WitniumchainChainAdminClient, type WitniumchainChainAdminClientConfig, WitniumchainClient, type WitniumchainClientConfig, WitniumchainOrgClient, type WitniumchainOrgClientConfig, buildAddSigningKeyPayload, buildPausePayload, buildRevokeSigningKeyPayload, buildUnpausePayload, defaultVerifierStorage };
|
|
11075
|
+
export { type AccountResponse, type AccountType, type paths$1 as AccountsPaths, type AddSigningKeyRequest$1 as AddSigningKeyRequest, type AddSigningKeyResponse, type AdjustCreditsRequest, type AdjustCreditsResponse, type BeginOAuthLoginArgs, type BeginOAuthLoginResult, type paths as ChainPaths, type CheckoutRequest, type CheckoutResponse, type CreateOrgRequest, type CreateOrgResponse, type CreateOrganizationRequest, type CreateOrganizationResponse, type CreateUserRequest, type CreateUserResponse, DelegatedKeys, type FinalizeWitnessResponse, type ForgotPasswordRequest, type ForgotPasswordResponse, type GetWitnessResponse, type HealthLiveResponse, type HealthReadyResponse, type InviteMemberRequest, type InviteMemberResponse, type LedgerResponse, type ListDelegatedKeysResponse, type ListOauthSessionsResponse, type ListUsersResponse, type LoginRequest, type LoginResponse, type LogoutResponse, type MembersListResponse, MfaNamespace, MfaRecoveryCodes, MfaTotp, type OAuthTokenSnapshot, OWNER_OP, OauthNamespace, OauthSessions, OrgMembers, OrgUsers, type OwnerOpName, type OwnerSigner, type PauseRequest$1 as PauseRequest, type PauseResponse, type PkceVerifierStorage, type PortalResponse, type PrepareDelegatedKeyRequest, type PreparedDelegatedKeyResponse, type ProposeWitnessRequest, type ProposeWitnessResponse, type ProvisionContractRequest, type ProvisionContractResponse, type ProvisionDelegatedKeyArgs, type ProvisionDelegatedKeyResult, type PublicOrgResponse, type RecoveryCodesRegenerateResponse, type RemoveMemberResponse, type ResendInviteResponse, type ResetAccountResponse, type ResetPasswordRequest, type ResetPasswordResponse, type RevokeDelegatedKeyResponse, type RevokeSigningKeyRequest$1 as RevokeSigningKeyRequest, type RevokeSigningKeyResponse, type RevokeWitnessRequest, type RevokeWitnessResponse, type RotateApiKeyResponse, type SetAccountTypeRequest, type SetAccountTypeResponse, type SetMemberRoleRequest, type SetMemberRoleResponse, type SignRequest, type SignResponse, type SignWitnessRequest, type SignWitnessResponse, type SignedRequestSigner, SigningKeys, type SignupRequest, type SignupResponse, type SubmitDelegatedKeyRequest, type SubmitDelegatedKeyResponse, Subscriptions, type SuspendMemberResponse, type TotpConfirmRequest, type TotpConfirmResponse, type TotpDisableResponse, type TotpEnrollResponse, type UnpauseRequest, type UnpauseResponse, type VerifyEmailResponse, type VerifyOrganizationResponse, WitniumchainAdminClient, type WitniumchainAdminClientConfig, WitniumchainApiError, WitniumchainChainAdminClient, type WitniumchainChainAdminClientConfig, WitniumchainClient, type WitniumchainClientConfig, WitniumchainOrgClient, type WitniumchainOrgClientConfig, buildAddSigningKeyPayload, buildPausePayload, buildRevokeSigningKeyPayload, buildUnpausePayload, defaultVerifierStorage };
|