@djangocfg/api 2.1.440 → 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/clients.cjs
CHANGED
|
@@ -1425,11 +1425,7 @@ var CfgAccountsApiKey = class {
|
|
|
1425
1425
|
static cfgAccountsApiKeyRetrieve(options) {
|
|
1426
1426
|
return (options?.client ?? client).get({
|
|
1427
1427
|
security: [
|
|
1428
|
-
{
|
|
1429
|
-
key: "jwtAuth",
|
|
1430
|
-
scheme: "bearer",
|
|
1431
|
-
type: "http"
|
|
1432
|
-
},
|
|
1428
|
+
{ scheme: "bearer", type: "http" },
|
|
1433
1429
|
{
|
|
1434
1430
|
in: "cookie",
|
|
1435
1431
|
name: "sessionid",
|
|
@@ -1449,11 +1445,31 @@ var CfgAccountsApiKey = class {
|
|
|
1449
1445
|
static cfgAccountsApiKeyRegenerateCreate(options) {
|
|
1450
1446
|
return (options.client ?? client).post({
|
|
1451
1447
|
security: [
|
|
1448
|
+
{ scheme: "bearer", type: "http" },
|
|
1452
1449
|
{
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
type: "
|
|
1450
|
+
in: "cookie",
|
|
1451
|
+
name: "sessionid",
|
|
1452
|
+
type: "apiKey"
|
|
1456
1453
|
},
|
|
1454
|
+
{ name: "X-API-Key", type: "apiKey" }
|
|
1455
|
+
],
|
|
1456
|
+
url: "/cfg/accounts/api-key/regenerate/",
|
|
1457
|
+
...options,
|
|
1458
|
+
headers: {
|
|
1459
|
+
"Content-Type": "application/json",
|
|
1460
|
+
...options.headers
|
|
1461
|
+
}
|
|
1462
|
+
});
|
|
1463
|
+
}
|
|
1464
|
+
/**
|
|
1465
|
+
* Reveal API key
|
|
1466
|
+
*
|
|
1467
|
+
* 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.
|
|
1468
|
+
*/
|
|
1469
|
+
static cfgAccountsApiKeyRevealCreate(options) {
|
|
1470
|
+
return (options.client ?? client).post({
|
|
1471
|
+
security: [
|
|
1472
|
+
{ scheme: "bearer", type: "http" },
|
|
1457
1473
|
{
|
|
1458
1474
|
in: "cookie",
|
|
1459
1475
|
name: "sessionid",
|
|
@@ -1461,7 +1477,7 @@ var CfgAccountsApiKey = class {
|
|
|
1461
1477
|
},
|
|
1462
1478
|
{ name: "X-API-Key", type: "apiKey" }
|
|
1463
1479
|
],
|
|
1464
|
-
url: "/cfg/accounts/api-key/
|
|
1480
|
+
url: "/cfg/accounts/api-key/reveal/",
|
|
1465
1481
|
...options,
|
|
1466
1482
|
headers: {
|
|
1467
1483
|
"Content-Type": "application/json",
|
|
@@ -1477,11 +1493,7 @@ var CfgAccountsApiKey = class {
|
|
|
1477
1493
|
static cfgAccountsApiKeyTestCreate(options) {
|
|
1478
1494
|
return (options.client ?? client).post({
|
|
1479
1495
|
security: [
|
|
1480
|
-
{
|
|
1481
|
-
key: "jwtAuth",
|
|
1482
|
-
scheme: "bearer",
|
|
1483
|
-
type: "http"
|
|
1484
|
-
},
|
|
1496
|
+
{ scheme: "bearer", type: "http" },
|
|
1485
1497
|
{
|
|
1486
1498
|
in: "cookie",
|
|
1487
1499
|
name: "sessionid",
|
|
@@ -1509,11 +1521,7 @@ var CfgAccountsOauth = class {
|
|
|
1509
1521
|
*/
|
|
1510
1522
|
static cfgAccountsOauthConnectionsList(options) {
|
|
1511
1523
|
return (options?.client ?? client).get({
|
|
1512
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1513
|
-
key: "jwtAuthWithLastLogin",
|
|
1514
|
-
scheme: "bearer",
|
|
1515
|
-
type: "http"
|
|
1516
|
-
}],
|
|
1524
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1517
1525
|
url: "/cfg/accounts/oauth/connections/",
|
|
1518
1526
|
...options
|
|
1519
1527
|
});
|
|
@@ -1525,11 +1533,7 @@ var CfgAccountsOauth = class {
|
|
|
1525
1533
|
*/
|
|
1526
1534
|
static cfgAccountsOauthDisconnectCreate(options) {
|
|
1527
1535
|
return (options.client ?? client).post({
|
|
1528
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1529
|
-
key: "jwtAuthWithLastLogin",
|
|
1530
|
-
scheme: "bearer",
|
|
1531
|
-
type: "http"
|
|
1532
|
-
}],
|
|
1536
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1533
1537
|
url: "/cfg/accounts/oauth/disconnect/",
|
|
1534
1538
|
...options,
|
|
1535
1539
|
headers: {
|
|
@@ -1586,11 +1590,7 @@ var CfgAccounts = class {
|
|
|
1586
1590
|
*/
|
|
1587
1591
|
static cfgAccountsOtpRequestCreate(options) {
|
|
1588
1592
|
return (options.client ?? client).post({
|
|
1589
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1590
|
-
key: "jwtAuthWithLastLogin",
|
|
1591
|
-
scheme: "bearer",
|
|
1592
|
-
type: "http"
|
|
1593
|
-
}],
|
|
1593
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1594
1594
|
url: "/cfg/accounts/otp/request/",
|
|
1595
1595
|
...options,
|
|
1596
1596
|
headers: {
|
|
@@ -1611,11 +1611,7 @@ var CfgAccounts = class {
|
|
|
1611
1611
|
*/
|
|
1612
1612
|
static cfgAccountsOtpVerifyCreate(options) {
|
|
1613
1613
|
return (options.client ?? client).post({
|
|
1614
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1615
|
-
key: "jwtAuthWithLastLogin",
|
|
1616
|
-
scheme: "bearer",
|
|
1617
|
-
type: "http"
|
|
1618
|
-
}],
|
|
1614
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1619
1615
|
url: "/cfg/accounts/otp/verify/",
|
|
1620
1616
|
...options,
|
|
1621
1617
|
headers: {
|
|
@@ -1636,11 +1632,7 @@ var CfgAccountsProfile = class {
|
|
|
1636
1632
|
*/
|
|
1637
1633
|
static cfgAccountsProfileRetrieve(options) {
|
|
1638
1634
|
return (options?.client ?? client).get({
|
|
1639
|
-
security: [{
|
|
1640
|
-
key: "jwtAuth",
|
|
1641
|
-
scheme: "bearer",
|
|
1642
|
-
type: "http"
|
|
1643
|
-
}, {
|
|
1635
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1644
1636
|
in: "cookie",
|
|
1645
1637
|
name: "sessionid",
|
|
1646
1638
|
type: "apiKey"
|
|
@@ -1657,11 +1649,7 @@ var CfgAccountsProfile = class {
|
|
|
1657
1649
|
static cfgAccountsProfileAvatarCreate(options) {
|
|
1658
1650
|
return (options?.client ?? client).post({
|
|
1659
1651
|
...formDataBodySerializer,
|
|
1660
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1661
|
-
key: "jwtAuthWithLastLogin",
|
|
1662
|
-
scheme: "bearer",
|
|
1663
|
-
type: "http"
|
|
1664
|
-
}],
|
|
1652
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1665
1653
|
url: "/cfg/accounts/profile/avatar/",
|
|
1666
1654
|
...options,
|
|
1667
1655
|
headers: {
|
|
@@ -1687,11 +1675,7 @@ var CfgAccountsProfile = class {
|
|
|
1687
1675
|
*/
|
|
1688
1676
|
static cfgAccountsProfileDeleteCreate(options) {
|
|
1689
1677
|
return (options?.client ?? client).post({
|
|
1690
|
-
security: [{
|
|
1691
|
-
key: "jwtAuth",
|
|
1692
|
-
scheme: "bearer",
|
|
1693
|
-
type: "http"
|
|
1694
|
-
}, {
|
|
1678
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1695
1679
|
in: "cookie",
|
|
1696
1680
|
name: "sessionid",
|
|
1697
1681
|
type: "apiKey"
|
|
@@ -1707,11 +1691,7 @@ var CfgAccountsProfile = class {
|
|
|
1707
1691
|
*/
|
|
1708
1692
|
static cfgAccountsProfilePartialPartialUpdate(options) {
|
|
1709
1693
|
return (options?.client ?? client).patch({
|
|
1710
|
-
security: [{
|
|
1711
|
-
key: "jwtAuth",
|
|
1712
|
-
scheme: "bearer",
|
|
1713
|
-
type: "http"
|
|
1714
|
-
}, {
|
|
1694
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1715
1695
|
in: "cookie",
|
|
1716
1696
|
name: "sessionid",
|
|
1717
1697
|
type: "apiKey"
|
|
@@ -1731,11 +1711,7 @@ var CfgAccountsProfile = class {
|
|
|
1731
1711
|
*/
|
|
1732
1712
|
static cfgAccountsProfilePartialUpdate(options) {
|
|
1733
1713
|
return (options?.client ?? client).put({
|
|
1734
|
-
security: [{
|
|
1735
|
-
key: "jwtAuth",
|
|
1736
|
-
scheme: "bearer",
|
|
1737
|
-
type: "http"
|
|
1738
|
-
}, {
|
|
1714
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1739
1715
|
in: "cookie",
|
|
1740
1716
|
name: "sessionid",
|
|
1741
1717
|
type: "apiKey"
|
|
@@ -1755,11 +1731,7 @@ var CfgAccountsProfile = class {
|
|
|
1755
1731
|
*/
|
|
1756
1732
|
static cfgAccountsProfileUpdatePartialUpdate(options) {
|
|
1757
1733
|
return (options?.client ?? client).patch({
|
|
1758
|
-
security: [{
|
|
1759
|
-
key: "jwtAuth",
|
|
1760
|
-
scheme: "bearer",
|
|
1761
|
-
type: "http"
|
|
1762
|
-
}, {
|
|
1734
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1763
1735
|
in: "cookie",
|
|
1764
1736
|
name: "sessionid",
|
|
1765
1737
|
type: "apiKey"
|
|
@@ -1779,11 +1751,7 @@ var CfgAccountsProfile = class {
|
|
|
1779
1751
|
*/
|
|
1780
1752
|
static cfgAccountsProfileUpdateUpdate(options) {
|
|
1781
1753
|
return (options?.client ?? client).put({
|
|
1782
|
-
security: [{
|
|
1783
|
-
key: "jwtAuth",
|
|
1784
|
-
scheme: "bearer",
|
|
1785
|
-
type: "http"
|
|
1786
|
-
}, {
|
|
1754
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1787
1755
|
in: "cookie",
|
|
1788
1756
|
name: "sessionid",
|
|
1789
1757
|
type: "apiKey"
|
|
@@ -1803,6 +1771,12 @@ var CfgAccountsAuth = class {
|
|
|
1803
1771
|
}
|
|
1804
1772
|
/**
|
|
1805
1773
|
* Refresh JWT token.
|
|
1774
|
+
*
|
|
1775
|
+
* DPoP-aware: when the incoming refresh token is key-bound (`cnf.jkt`), the
|
|
1776
|
+
* rotated access/refresh in the response are re-stamped with the same `cnf`
|
|
1777
|
+
* (stock SimpleJWT drops it from the derived access), and a matching DPoP
|
|
1778
|
+
* proof is required on the refresh request — so a stolen refresh token can't
|
|
1779
|
+
* be used to mint fresh tokens.
|
|
1806
1780
|
*/
|
|
1807
1781
|
static cfgAccountsTokenRefreshCreate(options) {
|
|
1808
1782
|
return (options.client ?? client).post({
|
|
@@ -1826,11 +1800,7 @@ var CfgCentrifugo = class {
|
|
|
1826
1800
|
*/
|
|
1827
1801
|
static cfgCentrifugoAuthTokenRetrieve(options) {
|
|
1828
1802
|
return (options?.client ?? client).get({
|
|
1829
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1830
|
-
key: "jwtAuthWithLastLogin",
|
|
1831
|
-
scheme: "bearer",
|
|
1832
|
-
type: "http"
|
|
1833
|
-
}],
|
|
1803
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1834
1804
|
url: "/cfg/centrifugo/auth/token/",
|
|
1835
1805
|
...options
|
|
1836
1806
|
});
|
|
@@ -1845,11 +1815,7 @@ var CfgTotpBackupCodes = class {
|
|
|
1845
1815
|
*/
|
|
1846
1816
|
static cfgTotpBackupCodesRetrieve(options) {
|
|
1847
1817
|
return (options?.client ?? client).get({
|
|
1848
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1849
|
-
key: "jwtAuthWithLastLogin",
|
|
1850
|
-
scheme: "bearer",
|
|
1851
|
-
type: "http"
|
|
1852
|
-
}],
|
|
1818
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1853
1819
|
url: "/cfg/totp/backup-codes/",
|
|
1854
1820
|
...options
|
|
1855
1821
|
});
|
|
@@ -1862,11 +1828,7 @@ var CfgTotpBackupCodes = class {
|
|
|
1862
1828
|
*/
|
|
1863
1829
|
static cfgTotpBackupCodesRegenerateCreate(options) {
|
|
1864
1830
|
return (options.client ?? client).post({
|
|
1865
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1866
|
-
key: "jwtAuthWithLastLogin",
|
|
1867
|
-
scheme: "bearer",
|
|
1868
|
-
type: "http"
|
|
1869
|
-
}],
|
|
1831
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1870
1832
|
url: "/cfg/totp/backup-codes/regenerate/",
|
|
1871
1833
|
...options,
|
|
1872
1834
|
headers: {
|
|
@@ -1885,11 +1847,7 @@ var CfgTotp = class {
|
|
|
1885
1847
|
*/
|
|
1886
1848
|
static cfgTotpDevicesRetrieve(options) {
|
|
1887
1849
|
return (options?.client ?? client).get({
|
|
1888
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1889
|
-
key: "jwtAuthWithLastLogin",
|
|
1890
|
-
scheme: "bearer",
|
|
1891
|
-
type: "http"
|
|
1892
|
-
}],
|
|
1850
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1893
1851
|
url: "/cfg/totp/devices/",
|
|
1894
1852
|
...options
|
|
1895
1853
|
});
|
|
@@ -1901,11 +1859,7 @@ var CfgTotp = class {
|
|
|
1901
1859
|
*/
|
|
1902
1860
|
static cfgTotpDevicesDestroy(options) {
|
|
1903
1861
|
return (options.client ?? client).delete({
|
|
1904
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1905
|
-
key: "jwtAuthWithLastLogin",
|
|
1906
|
-
scheme: "bearer",
|
|
1907
|
-
type: "http"
|
|
1908
|
-
}],
|
|
1862
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1909
1863
|
url: "/cfg/totp/devices/{id}/",
|
|
1910
1864
|
...options
|
|
1911
1865
|
});
|
|
@@ -1917,11 +1871,7 @@ var CfgTotp = class {
|
|
|
1917
1871
|
*/
|
|
1918
1872
|
static cfgTotpDisableCreate(options) {
|
|
1919
1873
|
return (options.client ?? client).post({
|
|
1920
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1921
|
-
key: "jwtAuthWithLastLogin",
|
|
1922
|
-
scheme: "bearer",
|
|
1923
|
-
type: "http"
|
|
1924
|
-
}],
|
|
1874
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1925
1875
|
url: "/cfg/totp/disable/",
|
|
1926
1876
|
...options,
|
|
1927
1877
|
headers: {
|
|
@@ -1942,11 +1892,7 @@ var CfgTotpSetup = class {
|
|
|
1942
1892
|
*/
|
|
1943
1893
|
static cfgTotpSetupCreate(options) {
|
|
1944
1894
|
return (options?.client ?? client).post({
|
|
1945
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1946
|
-
key: "jwtAuthWithLastLogin",
|
|
1947
|
-
scheme: "bearer",
|
|
1948
|
-
type: "http"
|
|
1949
|
-
}],
|
|
1895
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1950
1896
|
url: "/cfg/totp/setup/",
|
|
1951
1897
|
...options,
|
|
1952
1898
|
headers: {
|
|
@@ -1962,11 +1908,7 @@ var CfgTotpSetup = class {
|
|
|
1962
1908
|
*/
|
|
1963
1909
|
static cfgTotpSetupConfirmCreate(options) {
|
|
1964
1910
|
return (options.client ?? client).post({
|
|
1965
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1966
|
-
key: "jwtAuthWithLastLogin",
|
|
1967
|
-
scheme: "bearer",
|
|
1968
|
-
type: "http"
|
|
1969
|
-
}],
|
|
1911
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1970
1912
|
url: "/cfg/totp/setup/confirm/",
|
|
1971
1913
|
...options,
|
|
1972
1914
|
headers: {
|
|
@@ -1987,11 +1929,7 @@ var CfgTotpVerify = class {
|
|
|
1987
1929
|
*/
|
|
1988
1930
|
static cfgTotpVerifyCreate(options) {
|
|
1989
1931
|
return (options.client ?? client).post({
|
|
1990
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1991
|
-
key: "jwtAuthWithLastLogin",
|
|
1992
|
-
scheme: "bearer",
|
|
1993
|
-
type: "http"
|
|
1994
|
-
}],
|
|
1932
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1995
1933
|
url: "/cfg/totp/verify/",
|
|
1996
1934
|
...options,
|
|
1997
1935
|
headers: {
|
|
@@ -2007,11 +1945,7 @@ var CfgTotpVerify = class {
|
|
|
2007
1945
|
*/
|
|
2008
1946
|
static cfgTotpVerifyBackupCreate(options) {
|
|
2009
1947
|
return (options.client ?? client).post({
|
|
2010
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
2011
|
-
key: "jwtAuthWithLastLogin",
|
|
2012
|
-
scheme: "bearer",
|
|
2013
|
-
type: "http"
|
|
2014
|
-
}],
|
|
1948
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
2015
1949
|
url: "/cfg/totp/verify/backup/",
|
|
2016
1950
|
...options,
|
|
2017
1951
|
headers: {
|