@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/index.cjs
CHANGED
|
@@ -1466,11 +1466,7 @@ var CfgAccountsApiKey = class {
|
|
|
1466
1466
|
static cfgAccountsApiKeyRetrieve(options) {
|
|
1467
1467
|
return (options?.client ?? client).get({
|
|
1468
1468
|
security: [
|
|
1469
|
-
{
|
|
1470
|
-
key: "jwtAuth",
|
|
1471
|
-
scheme: "bearer",
|
|
1472
|
-
type: "http"
|
|
1473
|
-
},
|
|
1469
|
+
{ scheme: "bearer", type: "http" },
|
|
1474
1470
|
{
|
|
1475
1471
|
in: "cookie",
|
|
1476
1472
|
name: "sessionid",
|
|
@@ -1490,11 +1486,31 @@ var CfgAccountsApiKey = class {
|
|
|
1490
1486
|
static cfgAccountsApiKeyRegenerateCreate(options) {
|
|
1491
1487
|
return (options.client ?? client).post({
|
|
1492
1488
|
security: [
|
|
1489
|
+
{ scheme: "bearer", type: "http" },
|
|
1493
1490
|
{
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
type: "
|
|
1491
|
+
in: "cookie",
|
|
1492
|
+
name: "sessionid",
|
|
1493
|
+
type: "apiKey"
|
|
1497
1494
|
},
|
|
1495
|
+
{ name: "X-API-Key", type: "apiKey" }
|
|
1496
|
+
],
|
|
1497
|
+
url: "/cfg/accounts/api-key/regenerate/",
|
|
1498
|
+
...options,
|
|
1499
|
+
headers: {
|
|
1500
|
+
"Content-Type": "application/json",
|
|
1501
|
+
...options.headers
|
|
1502
|
+
}
|
|
1503
|
+
});
|
|
1504
|
+
}
|
|
1505
|
+
/**
|
|
1506
|
+
* Reveal API key
|
|
1507
|
+
*
|
|
1508
|
+
* 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.
|
|
1509
|
+
*/
|
|
1510
|
+
static cfgAccountsApiKeyRevealCreate(options) {
|
|
1511
|
+
return (options.client ?? client).post({
|
|
1512
|
+
security: [
|
|
1513
|
+
{ scheme: "bearer", type: "http" },
|
|
1498
1514
|
{
|
|
1499
1515
|
in: "cookie",
|
|
1500
1516
|
name: "sessionid",
|
|
@@ -1502,7 +1518,7 @@ var CfgAccountsApiKey = class {
|
|
|
1502
1518
|
},
|
|
1503
1519
|
{ name: "X-API-Key", type: "apiKey" }
|
|
1504
1520
|
],
|
|
1505
|
-
url: "/cfg/accounts/api-key/
|
|
1521
|
+
url: "/cfg/accounts/api-key/reveal/",
|
|
1506
1522
|
...options,
|
|
1507
1523
|
headers: {
|
|
1508
1524
|
"Content-Type": "application/json",
|
|
@@ -1518,11 +1534,7 @@ var CfgAccountsApiKey = class {
|
|
|
1518
1534
|
static cfgAccountsApiKeyTestCreate(options) {
|
|
1519
1535
|
return (options.client ?? client).post({
|
|
1520
1536
|
security: [
|
|
1521
|
-
{
|
|
1522
|
-
key: "jwtAuth",
|
|
1523
|
-
scheme: "bearer",
|
|
1524
|
-
type: "http"
|
|
1525
|
-
},
|
|
1537
|
+
{ scheme: "bearer", type: "http" },
|
|
1526
1538
|
{
|
|
1527
1539
|
in: "cookie",
|
|
1528
1540
|
name: "sessionid",
|
|
@@ -1550,11 +1562,7 @@ var CfgAccountsOauth = class {
|
|
|
1550
1562
|
*/
|
|
1551
1563
|
static cfgAccountsOauthConnectionsList(options) {
|
|
1552
1564
|
return (options?.client ?? client).get({
|
|
1553
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1554
|
-
key: "jwtAuthWithLastLogin",
|
|
1555
|
-
scheme: "bearer",
|
|
1556
|
-
type: "http"
|
|
1557
|
-
}],
|
|
1565
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1558
1566
|
url: "/cfg/accounts/oauth/connections/",
|
|
1559
1567
|
...options
|
|
1560
1568
|
});
|
|
@@ -1566,11 +1574,7 @@ var CfgAccountsOauth = class {
|
|
|
1566
1574
|
*/
|
|
1567
1575
|
static cfgAccountsOauthDisconnectCreate(options) {
|
|
1568
1576
|
return (options.client ?? client).post({
|
|
1569
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1570
|
-
key: "jwtAuthWithLastLogin",
|
|
1571
|
-
scheme: "bearer",
|
|
1572
|
-
type: "http"
|
|
1573
|
-
}],
|
|
1577
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1574
1578
|
url: "/cfg/accounts/oauth/disconnect/",
|
|
1575
1579
|
...options,
|
|
1576
1580
|
headers: {
|
|
@@ -1627,11 +1631,7 @@ var CfgAccounts = class {
|
|
|
1627
1631
|
*/
|
|
1628
1632
|
static cfgAccountsOtpRequestCreate(options) {
|
|
1629
1633
|
return (options.client ?? client).post({
|
|
1630
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1631
|
-
key: "jwtAuthWithLastLogin",
|
|
1632
|
-
scheme: "bearer",
|
|
1633
|
-
type: "http"
|
|
1634
|
-
}],
|
|
1634
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1635
1635
|
url: "/cfg/accounts/otp/request/",
|
|
1636
1636
|
...options,
|
|
1637
1637
|
headers: {
|
|
@@ -1652,11 +1652,7 @@ var CfgAccounts = class {
|
|
|
1652
1652
|
*/
|
|
1653
1653
|
static cfgAccountsOtpVerifyCreate(options) {
|
|
1654
1654
|
return (options.client ?? client).post({
|
|
1655
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1656
|
-
key: "jwtAuthWithLastLogin",
|
|
1657
|
-
scheme: "bearer",
|
|
1658
|
-
type: "http"
|
|
1659
|
-
}],
|
|
1655
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1660
1656
|
url: "/cfg/accounts/otp/verify/",
|
|
1661
1657
|
...options,
|
|
1662
1658
|
headers: {
|
|
@@ -1677,11 +1673,7 @@ var CfgAccountsProfile = class {
|
|
|
1677
1673
|
*/
|
|
1678
1674
|
static cfgAccountsProfileRetrieve(options) {
|
|
1679
1675
|
return (options?.client ?? client).get({
|
|
1680
|
-
security: [{
|
|
1681
|
-
key: "jwtAuth",
|
|
1682
|
-
scheme: "bearer",
|
|
1683
|
-
type: "http"
|
|
1684
|
-
}, {
|
|
1676
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1685
1677
|
in: "cookie",
|
|
1686
1678
|
name: "sessionid",
|
|
1687
1679
|
type: "apiKey"
|
|
@@ -1698,11 +1690,7 @@ var CfgAccountsProfile = class {
|
|
|
1698
1690
|
static cfgAccountsProfileAvatarCreate(options) {
|
|
1699
1691
|
return (options?.client ?? client).post({
|
|
1700
1692
|
...formDataBodySerializer,
|
|
1701
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1702
|
-
key: "jwtAuthWithLastLogin",
|
|
1703
|
-
scheme: "bearer",
|
|
1704
|
-
type: "http"
|
|
1705
|
-
}],
|
|
1693
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1706
1694
|
url: "/cfg/accounts/profile/avatar/",
|
|
1707
1695
|
...options,
|
|
1708
1696
|
headers: {
|
|
@@ -1728,11 +1716,7 @@ var CfgAccountsProfile = class {
|
|
|
1728
1716
|
*/
|
|
1729
1717
|
static cfgAccountsProfileDeleteCreate(options) {
|
|
1730
1718
|
return (options?.client ?? client).post({
|
|
1731
|
-
security: [{
|
|
1732
|
-
key: "jwtAuth",
|
|
1733
|
-
scheme: "bearer",
|
|
1734
|
-
type: "http"
|
|
1735
|
-
}, {
|
|
1719
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1736
1720
|
in: "cookie",
|
|
1737
1721
|
name: "sessionid",
|
|
1738
1722
|
type: "apiKey"
|
|
@@ -1748,11 +1732,7 @@ var CfgAccountsProfile = class {
|
|
|
1748
1732
|
*/
|
|
1749
1733
|
static cfgAccountsProfilePartialPartialUpdate(options) {
|
|
1750
1734
|
return (options?.client ?? client).patch({
|
|
1751
|
-
security: [{
|
|
1752
|
-
key: "jwtAuth",
|
|
1753
|
-
scheme: "bearer",
|
|
1754
|
-
type: "http"
|
|
1755
|
-
}, {
|
|
1735
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1756
1736
|
in: "cookie",
|
|
1757
1737
|
name: "sessionid",
|
|
1758
1738
|
type: "apiKey"
|
|
@@ -1772,11 +1752,7 @@ var CfgAccountsProfile = class {
|
|
|
1772
1752
|
*/
|
|
1773
1753
|
static cfgAccountsProfilePartialUpdate(options) {
|
|
1774
1754
|
return (options?.client ?? client).put({
|
|
1775
|
-
security: [{
|
|
1776
|
-
key: "jwtAuth",
|
|
1777
|
-
scheme: "bearer",
|
|
1778
|
-
type: "http"
|
|
1779
|
-
}, {
|
|
1755
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1780
1756
|
in: "cookie",
|
|
1781
1757
|
name: "sessionid",
|
|
1782
1758
|
type: "apiKey"
|
|
@@ -1796,11 +1772,7 @@ var CfgAccountsProfile = class {
|
|
|
1796
1772
|
*/
|
|
1797
1773
|
static cfgAccountsProfileUpdatePartialUpdate(options) {
|
|
1798
1774
|
return (options?.client ?? client).patch({
|
|
1799
|
-
security: [{
|
|
1800
|
-
key: "jwtAuth",
|
|
1801
|
-
scheme: "bearer",
|
|
1802
|
-
type: "http"
|
|
1803
|
-
}, {
|
|
1775
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1804
1776
|
in: "cookie",
|
|
1805
1777
|
name: "sessionid",
|
|
1806
1778
|
type: "apiKey"
|
|
@@ -1820,11 +1792,7 @@ var CfgAccountsProfile = class {
|
|
|
1820
1792
|
*/
|
|
1821
1793
|
static cfgAccountsProfileUpdateUpdate(options) {
|
|
1822
1794
|
return (options?.client ?? client).put({
|
|
1823
|
-
security: [{
|
|
1824
|
-
key: "jwtAuth",
|
|
1825
|
-
scheme: "bearer",
|
|
1826
|
-
type: "http"
|
|
1827
|
-
}, {
|
|
1795
|
+
security: [{ scheme: "bearer", type: "http" }, {
|
|
1828
1796
|
in: "cookie",
|
|
1829
1797
|
name: "sessionid",
|
|
1830
1798
|
type: "apiKey"
|
|
@@ -1844,6 +1812,12 @@ var CfgAccountsAuth = class {
|
|
|
1844
1812
|
}
|
|
1845
1813
|
/**
|
|
1846
1814
|
* Refresh JWT token.
|
|
1815
|
+
*
|
|
1816
|
+
* DPoP-aware: when the incoming refresh token is key-bound (`cnf.jkt`), the
|
|
1817
|
+
* rotated access/refresh in the response are re-stamped with the same `cnf`
|
|
1818
|
+
* (stock SimpleJWT drops it from the derived access), and a matching DPoP
|
|
1819
|
+
* proof is required on the refresh request — so a stolen refresh token can't
|
|
1820
|
+
* be used to mint fresh tokens.
|
|
1847
1821
|
*/
|
|
1848
1822
|
static cfgAccountsTokenRefreshCreate(options) {
|
|
1849
1823
|
return (options.client ?? client).post({
|
|
@@ -1867,11 +1841,7 @@ var CfgCentrifugo = class {
|
|
|
1867
1841
|
*/
|
|
1868
1842
|
static cfgCentrifugoAuthTokenRetrieve(options) {
|
|
1869
1843
|
return (options?.client ?? client).get({
|
|
1870
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1871
|
-
key: "jwtAuthWithLastLogin",
|
|
1872
|
-
scheme: "bearer",
|
|
1873
|
-
type: "http"
|
|
1874
|
-
}],
|
|
1844
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1875
1845
|
url: "/cfg/centrifugo/auth/token/",
|
|
1876
1846
|
...options
|
|
1877
1847
|
});
|
|
@@ -1886,11 +1856,7 @@ var CfgTotpBackupCodes = class {
|
|
|
1886
1856
|
*/
|
|
1887
1857
|
static cfgTotpBackupCodesRetrieve(options) {
|
|
1888
1858
|
return (options?.client ?? client).get({
|
|
1889
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1890
|
-
key: "jwtAuthWithLastLogin",
|
|
1891
|
-
scheme: "bearer",
|
|
1892
|
-
type: "http"
|
|
1893
|
-
}],
|
|
1859
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1894
1860
|
url: "/cfg/totp/backup-codes/",
|
|
1895
1861
|
...options
|
|
1896
1862
|
});
|
|
@@ -1903,11 +1869,7 @@ var CfgTotpBackupCodes = class {
|
|
|
1903
1869
|
*/
|
|
1904
1870
|
static cfgTotpBackupCodesRegenerateCreate(options) {
|
|
1905
1871
|
return (options.client ?? client).post({
|
|
1906
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1907
|
-
key: "jwtAuthWithLastLogin",
|
|
1908
|
-
scheme: "bearer",
|
|
1909
|
-
type: "http"
|
|
1910
|
-
}],
|
|
1872
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1911
1873
|
url: "/cfg/totp/backup-codes/regenerate/",
|
|
1912
1874
|
...options,
|
|
1913
1875
|
headers: {
|
|
@@ -1926,11 +1888,7 @@ var CfgTotp = class {
|
|
|
1926
1888
|
*/
|
|
1927
1889
|
static cfgTotpDevicesRetrieve(options) {
|
|
1928
1890
|
return (options?.client ?? client).get({
|
|
1929
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1930
|
-
key: "jwtAuthWithLastLogin",
|
|
1931
|
-
scheme: "bearer",
|
|
1932
|
-
type: "http"
|
|
1933
|
-
}],
|
|
1891
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1934
1892
|
url: "/cfg/totp/devices/",
|
|
1935
1893
|
...options
|
|
1936
1894
|
});
|
|
@@ -1942,11 +1900,7 @@ var CfgTotp = class {
|
|
|
1942
1900
|
*/
|
|
1943
1901
|
static cfgTotpDevicesDestroy(options) {
|
|
1944
1902
|
return (options.client ?? client).delete({
|
|
1945
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1946
|
-
key: "jwtAuthWithLastLogin",
|
|
1947
|
-
scheme: "bearer",
|
|
1948
|
-
type: "http"
|
|
1949
|
-
}],
|
|
1903
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1950
1904
|
url: "/cfg/totp/devices/{id}/",
|
|
1951
1905
|
...options
|
|
1952
1906
|
});
|
|
@@ -1958,11 +1912,7 @@ var CfgTotp = class {
|
|
|
1958
1912
|
*/
|
|
1959
1913
|
static cfgTotpDisableCreate(options) {
|
|
1960
1914
|
return (options.client ?? client).post({
|
|
1961
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1962
|
-
key: "jwtAuthWithLastLogin",
|
|
1963
|
-
scheme: "bearer",
|
|
1964
|
-
type: "http"
|
|
1965
|
-
}],
|
|
1915
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1966
1916
|
url: "/cfg/totp/disable/",
|
|
1967
1917
|
...options,
|
|
1968
1918
|
headers: {
|
|
@@ -1983,11 +1933,7 @@ var CfgTotpSetup = class {
|
|
|
1983
1933
|
*/
|
|
1984
1934
|
static cfgTotpSetupCreate(options) {
|
|
1985
1935
|
return (options?.client ?? client).post({
|
|
1986
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
1987
|
-
key: "jwtAuthWithLastLogin",
|
|
1988
|
-
scheme: "bearer",
|
|
1989
|
-
type: "http"
|
|
1990
|
-
}],
|
|
1936
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
1991
1937
|
url: "/cfg/totp/setup/",
|
|
1992
1938
|
...options,
|
|
1993
1939
|
headers: {
|
|
@@ -2003,11 +1949,7 @@ var CfgTotpSetup = class {
|
|
|
2003
1949
|
*/
|
|
2004
1950
|
static cfgTotpSetupConfirmCreate(options) {
|
|
2005
1951
|
return (options.client ?? client).post({
|
|
2006
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
2007
|
-
key: "jwtAuthWithLastLogin",
|
|
2008
|
-
scheme: "bearer",
|
|
2009
|
-
type: "http"
|
|
2010
|
-
}],
|
|
1952
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
2011
1953
|
url: "/cfg/totp/setup/confirm/",
|
|
2012
1954
|
...options,
|
|
2013
1955
|
headers: {
|
|
@@ -2028,11 +1970,7 @@ var CfgTotpVerify = class {
|
|
|
2028
1970
|
*/
|
|
2029
1971
|
static cfgTotpVerifyCreate(options) {
|
|
2030
1972
|
return (options.client ?? client).post({
|
|
2031
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
2032
|
-
key: "jwtAuthWithLastLogin",
|
|
2033
|
-
scheme: "bearer",
|
|
2034
|
-
type: "http"
|
|
2035
|
-
}],
|
|
1973
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
2036
1974
|
url: "/cfg/totp/verify/",
|
|
2037
1975
|
...options,
|
|
2038
1976
|
headers: {
|
|
@@ -2048,11 +1986,7 @@ var CfgTotpVerify = class {
|
|
|
2048
1986
|
*/
|
|
2049
1987
|
static cfgTotpVerifyBackupCreate(options) {
|
|
2050
1988
|
return (options.client ?? client).post({
|
|
2051
|
-
security: [{ name: "X-API-Key", type: "apiKey" }, {
|
|
2052
|
-
key: "jwtAuthWithLastLogin",
|
|
2053
|
-
scheme: "bearer",
|
|
2054
|
-
type: "http"
|
|
2055
|
-
}],
|
|
1989
|
+
security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
|
|
2056
1990
|
url: "/cfg/totp/verify/backup/",
|
|
2057
1991
|
...options,
|
|
2058
1992
|
headers: {
|