@djangocfg/api 2.1.441 → 2.1.442
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/auth-server.cjs +53 -119
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +53 -119
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +222 -277
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.mjs +222 -277
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +53 -119
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +50 -1
- package/dist/clients.d.ts +50 -1
- package/dist/clients.mjs +53 -119
- package/dist/clients.mjs.map +1 -1
- package/dist/hooks.cjs +102 -20
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +13 -0
- package/dist/hooks.d.ts +13 -0
- package/dist/hooks.mjs +102 -20
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +53 -119
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +70 -5
- package/dist/index.d.ts +70 -5
- package/dist/index.mjs +53 -119
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/_api/generated/_cfg_accounts/hooks/index.ts +1 -0
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsApiKeyRevealCreate.ts +64 -0
- package/src/_api/generated/_cfg_accounts/openapi.json +92 -15
- package/src/_api/generated/_cfg_accounts/schemas/APIKeyReveal.ts +13 -0
- package/src/_api/generated/_cfg_accounts/schemas/index.ts +1 -0
- package/src/_api/generated/_cfg_centrifugo/openapi.json +0 -5
- package/src/_api/generated/_cfg_totp/openapi.json +0 -5
- package/src/_api/generated/client/index.ts +1 -0
- package/src/_api/generated/core/params.gen.ts +18 -11
- package/src/_api/generated/core/types.gen.ts +6 -0
- package/src/_api/generated/openapi.json +92 -15
- package/src/_api/generated/sdk.gen.ts +57 -122
- package/src/_api/generated/types.gen.ts +38 -0
- package/src/hooks/useApiKey.ts +30 -2
package/dist/index.mjs
CHANGED
|
@@ -1407,11 +1407,7 @@ var CfgAccountsApiKey = class {
|
|
|
1407
1407
|
static cfgAccountsApiKeyRetrieve(options) {
|
|
1408
1408
|
return (options?.client ?? client).get({
|
|
1409
1409
|
security: [
|
|
1410
|
-
{
|
|
1411
|
-
key: "jwtAuth",
|
|
1412
|
-
scheme: "bearer",
|
|
1413
|
-
type: "http"
|
|
1414
|
-
},
|
|
1410
|
+
{ scheme: "bearer", type: "http" },
|
|
1415
1411
|
{
|
|
1416
1412
|
in: "cookie",
|
|
1417
1413
|
name: "sessionid",
|
|
@@ -1431,11 +1427,31 @@ var CfgAccountsApiKey = class {
|
|
|
1431
1427
|
static cfgAccountsApiKeyRegenerateCreate(options) {
|
|
1432
1428
|
return (options.client ?? client).post({
|
|
1433
1429
|
security: [
|
|
1430
|
+
{ scheme: "bearer", type: "http" },
|
|
1434
1431
|
{
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
type: "
|
|
1432
|
+
in: "cookie",
|
|
1433
|
+
name: "sessionid",
|
|
1434
|
+
type: "apiKey"
|
|
1438
1435
|
},
|
|
1436
|
+
{ name: "X-API-Key", type: "apiKey" }
|
|
1437
|
+
],
|
|
1438
|
+
url: "/cfg/accounts/api-key/regenerate/",
|
|
1439
|
+
...options,
|
|
1440
|
+
headers: {
|
|
1441
|
+
"Content-Type": "application/json",
|
|
1442
|
+
...options.headers
|
|
1443
|
+
}
|
|
1444
|
+
});
|
|
1445
|
+
}
|
|
1446
|
+
/**
|
|
1447
|
+
* Reveal API key
|
|
1448
|
+
*
|
|
1449
|
+
* Return the current full API key WITHOUT rotating it. The same durable value every one of the user's agents uses — for the signed-in user to copy and paste into agent onboarding. Default GET stays masked; this is the explicit reveal action.
|
|
1450
|
+
*/
|
|
1451
|
+
static cfgAccountsApiKeyRevealCreate(options) {
|
|
1452
|
+
return (options.client ?? client).post({
|
|
1453
|
+
security: [
|
|
1454
|
+
{ scheme: "bearer", type: "http" },
|
|
1439
1455
|
{
|
|
1440
1456
|
in: "cookie",
|
|
1441
1457
|
name: "sessionid",
|
|
@@ -1443,7 +1459,7 @@ var CfgAccountsApiKey = class {
|
|
|
1443
1459
|
},
|
|
1444
1460
|
{ name: "X-API-Key", type: "apiKey" }
|
|
1445
1461
|
],
|
|
1446
|
-
url: "/cfg/accounts/api-key/
|
|
1462
|
+
url: "/cfg/accounts/api-key/reveal/",
|
|
1447
1463
|
...options,
|
|
1448
1464
|
headers: {
|
|
1449
1465
|
"Content-Type": "application/json",
|
|
@@ -1459,11 +1475,7 @@ var CfgAccountsApiKey = class {
|
|
|
1459
1475
|
static cfgAccountsApiKeyTestCreate(options) {
|
|
1460
1476
|
return (options.client ?? client).post({
|
|
1461
1477
|
security: [
|
|
1462
|
-
{
|
|
1463
|
-
key: "jwtAuth",
|
|
1464
|
-
scheme: "bearer",
|
|
1465
|
-
type: "http"
|
|
1466
|
-
},
|
|
1478
|
+
{ scheme: "bearer", type: "http" },
|
|
1467
1479
|
{
|
|
1468
1480
|
in: "cookie",
|
|
1469
1481
|
name: "sessionid",
|
|
@@ -1491,11 +1503,7 @@ var CfgAccountsOauth = class {
|
|
|
1491
1503
|
*/
|
|
1492
1504
|
static cfgAccountsOauthConnectionsList(options) {
|
|
1493
1505
|
return (options?.client ?? client).get({
|
|
1494
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1495
|
-
key: "jwtAuthWithLastLogin",
|
|
1496
|
-
scheme: "bearer",
|
|
1497
|
-
type: "http"
|
|
1498
|
-
}],
|
|
1506
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1499
1507
|
url: "/cfg/accounts/oauth/connections/",
|
|
1500
1508
|
...options
|
|
1501
1509
|
});
|
|
@@ -1507,11 +1515,7 @@ var CfgAccountsOauth = class {
|
|
|
1507
1515
|
*/
|
|
1508
1516
|
static cfgAccountsOauthDisconnectCreate(options) {
|
|
1509
1517
|
return (options.client ?? client).post({
|
|
1510
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1511
|
-
key: "jwtAuthWithLastLogin",
|
|
1512
|
-
scheme: "bearer",
|
|
1513
|
-
type: "http"
|
|
1514
|
-
}],
|
|
1518
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1515
1519
|
url: "/cfg/accounts/oauth/disconnect/",
|
|
1516
1520
|
...options,
|
|
1517
1521
|
headers: {
|
|
@@ -1568,11 +1572,7 @@ var CfgAccounts = class {
|
|
|
1568
1572
|
*/
|
|
1569
1573
|
static cfgAccountsOtpRequestCreate(options) {
|
|
1570
1574
|
return (options.client ?? client).post({
|
|
1571
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1572
|
-
key: "jwtAuthWithLastLogin",
|
|
1573
|
-
scheme: "bearer",
|
|
1574
|
-
type: "http"
|
|
1575
|
-
}],
|
|
1575
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1576
1576
|
url: "/cfg/accounts/otp/request/",
|
|
1577
1577
|
...options,
|
|
1578
1578
|
headers: {
|
|
@@ -1593,11 +1593,7 @@ var CfgAccounts = class {
|
|
|
1593
1593
|
*/
|
|
1594
1594
|
static cfgAccountsOtpVerifyCreate(options) {
|
|
1595
1595
|
return (options.client ?? client).post({
|
|
1596
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1597
|
-
key: "jwtAuthWithLastLogin",
|
|
1598
|
-
scheme: "bearer",
|
|
1599
|
-
type: "http"
|
|
1600
|
-
}],
|
|
1596
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1601
1597
|
url: "/cfg/accounts/otp/verify/",
|
|
1602
1598
|
...options,
|
|
1603
1599
|
headers: {
|
|
@@ -1618,11 +1614,7 @@ var CfgAccountsProfile = class {
|
|
|
1618
1614
|
*/
|
|
1619
1615
|
static cfgAccountsProfileRetrieve(options) {
|
|
1620
1616
|
return (options?.client ?? client).get({
|
|
1621
|
-
security: [{
|
|
1622
|
-
key: "jwtAuth",
|
|
1623
|
-
scheme: "bearer",
|
|
1624
|
-
type: "http"
|
|
1625
|
-
}, {
|
|
1617
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1626
1618
|
in: "cookie",
|
|
1627
1619
|
name: "sessionid",
|
|
1628
1620
|
type: "apiKey"
|
|
@@ -1639,11 +1631,7 @@ var CfgAccountsProfile = class {
|
|
|
1639
1631
|
static cfgAccountsProfileAvatarCreate(options) {
|
|
1640
1632
|
return (options?.client ?? client).post({
|
|
1641
1633
|
...formDataBodySerializer,
|
|
1642
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1643
|
-
key: "jwtAuthWithLastLogin",
|
|
1644
|
-
scheme: "bearer",
|
|
1645
|
-
type: "http"
|
|
1646
|
-
}],
|
|
1634
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1647
1635
|
url: "/cfg/accounts/profile/avatar/",
|
|
1648
1636
|
...options,
|
|
1649
1637
|
headers: {
|
|
@@ -1669,11 +1657,7 @@ var CfgAccountsProfile = class {
|
|
|
1669
1657
|
*/
|
|
1670
1658
|
static cfgAccountsProfileDeleteCreate(options) {
|
|
1671
1659
|
return (options?.client ?? client).post({
|
|
1672
|
-
security: [{
|
|
1673
|
-
key: "jwtAuth",
|
|
1674
|
-
scheme: "bearer",
|
|
1675
|
-
type: "http"
|
|
1676
|
-
}, {
|
|
1660
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1677
1661
|
in: "cookie",
|
|
1678
1662
|
name: "sessionid",
|
|
1679
1663
|
type: "apiKey"
|
|
@@ -1689,11 +1673,7 @@ var CfgAccountsProfile = class {
|
|
|
1689
1673
|
*/
|
|
1690
1674
|
static cfgAccountsProfilePartialPartialUpdate(options) {
|
|
1691
1675
|
return (options?.client ?? client).patch({
|
|
1692
|
-
security: [{
|
|
1693
|
-
key: "jwtAuth",
|
|
1694
|
-
scheme: "bearer",
|
|
1695
|
-
type: "http"
|
|
1696
|
-
}, {
|
|
1676
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1697
1677
|
in: "cookie",
|
|
1698
1678
|
name: "sessionid",
|
|
1699
1679
|
type: "apiKey"
|
|
@@ -1713,11 +1693,7 @@ var CfgAccountsProfile = class {
|
|
|
1713
1693
|
*/
|
|
1714
1694
|
static cfgAccountsProfilePartialUpdate(options) {
|
|
1715
1695
|
return (options?.client ?? client).put({
|
|
1716
|
-
security: [{
|
|
1717
|
-
key: "jwtAuth",
|
|
1718
|
-
scheme: "bearer",
|
|
1719
|
-
type: "http"
|
|
1720
|
-
}, {
|
|
1696
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1721
1697
|
in: "cookie",
|
|
1722
1698
|
name: "sessionid",
|
|
1723
1699
|
type: "apiKey"
|
|
@@ -1737,11 +1713,7 @@ var CfgAccountsProfile = class {
|
|
|
1737
1713
|
*/
|
|
1738
1714
|
static cfgAccountsProfileUpdatePartialUpdate(options) {
|
|
1739
1715
|
return (options?.client ?? client).patch({
|
|
1740
|
-
security: [{
|
|
1741
|
-
key: "jwtAuth",
|
|
1742
|
-
scheme: "bearer",
|
|
1743
|
-
type: "http"
|
|
1744
|
-
}, {
|
|
1716
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1745
1717
|
in: "cookie",
|
|
1746
1718
|
name: "sessionid",
|
|
1747
1719
|
type: "apiKey"
|
|
@@ -1761,11 +1733,7 @@ var CfgAccountsProfile = class {
|
|
|
1761
1733
|
*/
|
|
1762
1734
|
static cfgAccountsProfileUpdateUpdate(options) {
|
|
1763
1735
|
return (options?.client ?? client).put({
|
|
1764
|
-
security: [{
|
|
1765
|
-
key: "jwtAuth",
|
|
1766
|
-
scheme: "bearer",
|
|
1767
|
-
type: "http"
|
|
1768
|
-
}, {
|
|
1736
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1769
1737
|
in: "cookie",
|
|
1770
1738
|
name: "sessionid",
|
|
1771
1739
|
type: "apiKey"
|
|
@@ -1785,6 +1753,12 @@ var CfgAccountsAuth = class {
|
|
|
1785
1753
|
}
|
|
1786
1754
|
/**
|
|
1787
1755
|
* Refresh JWT token.
|
|
1756
|
+
*
|
|
1757
|
+
* DPoP-aware: when the incoming refresh token is key-bound (`cnf.jkt`), the
|
|
1758
|
+
* rotated access/refresh in the response are re-stamped with the same `cnf`
|
|
1759
|
+
* (stock SimpleJWT drops it from the derived access), and a matching DPoP
|
|
1760
|
+
* proof is required on the refresh request — so a stolen refresh token can't
|
|
1761
|
+
* be used to mint fresh tokens.
|
|
1788
1762
|
*/
|
|
1789
1763
|
static cfgAccountsTokenRefreshCreate(options) {
|
|
1790
1764
|
return (options.client ?? client).post({
|
|
@@ -1808,11 +1782,7 @@ var CfgCentrifugo = class {
|
|
|
1808
1782
|
*/
|
|
1809
1783
|
static cfgCentrifugoAuthTokenRetrieve(options) {
|
|
1810
1784
|
return (options?.client ?? client).get({
|
|
1811
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1812
|
-
key: "jwtAuthWithLastLogin",
|
|
1813
|
-
scheme: "bearer",
|
|
1814
|
-
type: "http"
|
|
1815
|
-
}],
|
|
1785
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1816
1786
|
url: "/cfg/centrifugo/auth/token/",
|
|
1817
1787
|
...options
|
|
1818
1788
|
});
|
|
@@ -1827,11 +1797,7 @@ var CfgTotpBackupCodes = class {
|
|
|
1827
1797
|
*/
|
|
1828
1798
|
static cfgTotpBackupCodesRetrieve(options) {
|
|
1829
1799
|
return (options?.client ?? client).get({
|
|
1830
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1831
|
-
key: "jwtAuthWithLastLogin",
|
|
1832
|
-
scheme: "bearer",
|
|
1833
|
-
type: "http"
|
|
1834
|
-
}],
|
|
1800
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1835
1801
|
url: "/cfg/totp/backup-codes/",
|
|
1836
1802
|
...options
|
|
1837
1803
|
});
|
|
@@ -1844,11 +1810,7 @@ var CfgTotpBackupCodes = class {
|
|
|
1844
1810
|
*/
|
|
1845
1811
|
static cfgTotpBackupCodesRegenerateCreate(options) {
|
|
1846
1812
|
return (options.client ?? client).post({
|
|
1847
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1848
|
-
key: "jwtAuthWithLastLogin",
|
|
1849
|
-
scheme: "bearer",
|
|
1850
|
-
type: "http"
|
|
1851
|
-
}],
|
|
1813
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1852
1814
|
url: "/cfg/totp/backup-codes/regenerate/",
|
|
1853
1815
|
...options,
|
|
1854
1816
|
headers: {
|
|
@@ -1867,11 +1829,7 @@ var CfgTotp = class {
|
|
|
1867
1829
|
*/
|
|
1868
1830
|
static cfgTotpDevicesRetrieve(options) {
|
|
1869
1831
|
return (options?.client ?? client).get({
|
|
1870
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1871
|
-
key: "jwtAuthWithLastLogin",
|
|
1872
|
-
scheme: "bearer",
|
|
1873
|
-
type: "http"
|
|
1874
|
-
}],
|
|
1832
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1875
1833
|
url: "/cfg/totp/devices/",
|
|
1876
1834
|
...options
|
|
1877
1835
|
});
|
|
@@ -1883,11 +1841,7 @@ var CfgTotp = class {
|
|
|
1883
1841
|
*/
|
|
1884
1842
|
static cfgTotpDevicesDestroy(options) {
|
|
1885
1843
|
return (options.client ?? client).delete({
|
|
1886
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1887
|
-
key: "jwtAuthWithLastLogin",
|
|
1888
|
-
scheme: "bearer",
|
|
1889
|
-
type: "http"
|
|
1890
|
-
}],
|
|
1844
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1891
1845
|
url: "/cfg/totp/devices/{id}/",
|
|
1892
1846
|
...options
|
|
1893
1847
|
});
|
|
@@ -1899,11 +1853,7 @@ var CfgTotp = class {
|
|
|
1899
1853
|
*/
|
|
1900
1854
|
static cfgTotpDisableCreate(options) {
|
|
1901
1855
|
return (options.client ?? client).post({
|
|
1902
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1903
|
-
key: "jwtAuthWithLastLogin",
|
|
1904
|
-
scheme: "bearer",
|
|
1905
|
-
type: "http"
|
|
1906
|
-
}],
|
|
1856
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1907
1857
|
url: "/cfg/totp/disable/",
|
|
1908
1858
|
...options,
|
|
1909
1859
|
headers: {
|
|
@@ -1924,11 +1874,7 @@ var CfgTotpSetup = class {
|
|
|
1924
1874
|
*/
|
|
1925
1875
|
static cfgTotpSetupCreate(options) {
|
|
1926
1876
|
return (options?.client ?? client).post({
|
|
1927
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1928
|
-
key: "jwtAuthWithLastLogin",
|
|
1929
|
-
scheme: "bearer",
|
|
1930
|
-
type: "http"
|
|
1931
|
-
}],
|
|
1877
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1932
1878
|
url: "/cfg/totp/setup/",
|
|
1933
1879
|
...options,
|
|
1934
1880
|
headers: {
|
|
@@ -1944,11 +1890,7 @@ var CfgTotpSetup = class {
|
|
|
1944
1890
|
*/
|
|
1945
1891
|
static cfgTotpSetupConfirmCreate(options) {
|
|
1946
1892
|
return (options.client ?? client).post({
|
|
1947
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1948
|
-
key: "jwtAuthWithLastLogin",
|
|
1949
|
-
scheme: "bearer",
|
|
1950
|
-
type: "http"
|
|
1951
|
-
}],
|
|
1893
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1952
1894
|
url: "/cfg/totp/setup/confirm/",
|
|
1953
1895
|
...options,
|
|
1954
1896
|
headers: {
|
|
@@ -1969,11 +1911,7 @@ var CfgTotpVerify = class {
|
|
|
1969
1911
|
*/
|
|
1970
1912
|
static cfgTotpVerifyCreate(options) {
|
|
1971
1913
|
return (options.client ?? client).post({
|
|
1972
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1973
|
-
key: "jwtAuthWithLastLogin",
|
|
1974
|
-
scheme: "bearer",
|
|
1975
|
-
type: "http"
|
|
1976
|
-
}],
|
|
1914
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1977
1915
|
url: "/cfg/totp/verify/",
|
|
1978
1916
|
...options,
|
|
1979
1917
|
headers: {
|
|
@@ -1989,11 +1927,7 @@ var CfgTotpVerify = class {
|
|
|
1989
1927
|
*/
|
|
1990
1928
|
static cfgTotpVerifyBackupCreate(options) {
|
|
1991
1929
|
return (options.client ?? client).post({
|
|
1992
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1993
|
-
key: "jwtAuthWithLastLogin",
|
|
1994
|
-
scheme: "bearer",
|
|
1995
|
-
type: "http"
|
|
1996
|
-
}],
|
|
1930
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1997
1931
|
url: "/cfg/totp/verify/backup/",
|
|
1998
1932
|
...options,
|
|
1999
1933
|
headers: {
|