@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.
Files changed (41) hide show
  1. package/dist/auth-server.cjs +53 -119
  2. package/dist/auth-server.cjs.map +1 -1
  3. package/dist/auth-server.mjs +53 -119
  4. package/dist/auth-server.mjs.map +1 -1
  5. package/dist/auth.cjs +222 -277
  6. package/dist/auth.cjs.map +1 -1
  7. package/dist/auth.mjs +222 -277
  8. package/dist/auth.mjs.map +1 -1
  9. package/dist/clients.cjs +53 -119
  10. package/dist/clients.cjs.map +1 -1
  11. package/dist/clients.d.cts +50 -1
  12. package/dist/clients.d.ts +50 -1
  13. package/dist/clients.mjs +53 -119
  14. package/dist/clients.mjs.map +1 -1
  15. package/dist/hooks.cjs +102 -20
  16. package/dist/hooks.cjs.map +1 -1
  17. package/dist/hooks.d.cts +13 -0
  18. package/dist/hooks.d.ts +13 -0
  19. package/dist/hooks.mjs +102 -20
  20. package/dist/hooks.mjs.map +1 -1
  21. package/dist/index.cjs +53 -119
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +70 -5
  24. package/dist/index.d.ts +70 -5
  25. package/dist/index.mjs +53 -119
  26. package/dist/index.mjs.map +1 -1
  27. package/package.json +2 -2
  28. package/src/_api/generated/_cfg_accounts/hooks/index.ts +1 -0
  29. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsApiKeyRevealCreate.ts +64 -0
  30. package/src/_api/generated/_cfg_accounts/openapi.json +92 -15
  31. package/src/_api/generated/_cfg_accounts/schemas/APIKeyReveal.ts +13 -0
  32. package/src/_api/generated/_cfg_accounts/schemas/index.ts +1 -0
  33. package/src/_api/generated/_cfg_centrifugo/openapi.json +0 -5
  34. package/src/_api/generated/_cfg_totp/openapi.json +0 -5
  35. package/src/_api/generated/client/index.ts +1 -0
  36. package/src/_api/generated/core/params.gen.ts +18 -11
  37. package/src/_api/generated/core/types.gen.ts +6 -0
  38. package/src/_api/generated/openapi.json +92 -15
  39. package/src/_api/generated/sdk.gen.ts +57 -122
  40. package/src/_api/generated/types.gen.ts +38 -0
  41. package/src/hooks/useApiKey.ts +30 -2
@@ -1445,11 +1445,7 @@ var CfgAccountsApiKey = class {
1445
1445
  static cfgAccountsApiKeyRetrieve(options) {
1446
1446
  return (options?.client ?? client).get({
1447
1447
  security: [
1448
- {
1449
- key: "jwtAuth",
1450
- scheme: "bearer",
1451
- type: "http"
1452
- },
1448
+ { scheme: "bearer", type: "http" },
1453
1449
  {
1454
1450
  in: "cookie",
1455
1451
  name: "sessionid",
@@ -1469,11 +1465,31 @@ var CfgAccountsApiKey = class {
1469
1465
  static cfgAccountsApiKeyRegenerateCreate(options) {
1470
1466
  return (options.client ?? client).post({
1471
1467
  security: [
1468
+ { scheme: "bearer", type: "http" },
1472
1469
  {
1473
- key: "jwtAuth",
1474
- scheme: "bearer",
1475
- type: "http"
1470
+ in: "cookie",
1471
+ name: "sessionid",
1472
+ type: "apiKey"
1476
1473
  },
1474
+ { name: "X-API-Key", type: "apiKey" }
1475
+ ],
1476
+ url: "/cfg/accounts/api-key/regenerate/",
1477
+ ...options,
1478
+ headers: {
1479
+ "Content-Type": "application/json",
1480
+ ...options.headers
1481
+ }
1482
+ });
1483
+ }
1484
+ /**
1485
+ * Reveal API key
1486
+ *
1487
+ * 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.
1488
+ */
1489
+ static cfgAccountsApiKeyRevealCreate(options) {
1490
+ return (options.client ?? client).post({
1491
+ security: [
1492
+ { scheme: "bearer", type: "http" },
1477
1493
  {
1478
1494
  in: "cookie",
1479
1495
  name: "sessionid",
@@ -1481,7 +1497,7 @@ var CfgAccountsApiKey = class {
1481
1497
  },
1482
1498
  { name: "X-API-Key", type: "apiKey" }
1483
1499
  ],
1484
- url: "/cfg/accounts/api-key/regenerate/",
1500
+ url: "/cfg/accounts/api-key/reveal/",
1485
1501
  ...options,
1486
1502
  headers: {
1487
1503
  "Content-Type": "application/json",
@@ -1497,11 +1513,7 @@ var CfgAccountsApiKey = class {
1497
1513
  static cfgAccountsApiKeyTestCreate(options) {
1498
1514
  return (options.client ?? client).post({
1499
1515
  security: [
1500
- {
1501
- key: "jwtAuth",
1502
- scheme: "bearer",
1503
- type: "http"
1504
- },
1516
+ { scheme: "bearer", type: "http" },
1505
1517
  {
1506
1518
  in: "cookie",
1507
1519
  name: "sessionid",
@@ -1529,11 +1541,7 @@ var CfgAccountsOauth = class {
1529
1541
  */
1530
1542
  static cfgAccountsOauthConnectionsList(options) {
1531
1543
  return (options?.client ?? client).get({
1532
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1533
- key: "jwtAuthWithLastLogin",
1534
- scheme: "bearer",
1535
- type: "http"
1536
- }],
1544
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1537
1545
  url: "/cfg/accounts/oauth/connections/",
1538
1546
  ...options
1539
1547
  });
@@ -1545,11 +1553,7 @@ var CfgAccountsOauth = class {
1545
1553
  */
1546
1554
  static cfgAccountsOauthDisconnectCreate(options) {
1547
1555
  return (options.client ?? client).post({
1548
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1549
- key: "jwtAuthWithLastLogin",
1550
- scheme: "bearer",
1551
- type: "http"
1552
- }],
1556
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1553
1557
  url: "/cfg/accounts/oauth/disconnect/",
1554
1558
  ...options,
1555
1559
  headers: {
@@ -1606,11 +1610,7 @@ var CfgAccounts = class {
1606
1610
  */
1607
1611
  static cfgAccountsOtpRequestCreate(options) {
1608
1612
  return (options.client ?? client).post({
1609
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1610
- key: "jwtAuthWithLastLogin",
1611
- scheme: "bearer",
1612
- type: "http"
1613
- }],
1613
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1614
1614
  url: "/cfg/accounts/otp/request/",
1615
1615
  ...options,
1616
1616
  headers: {
@@ -1631,11 +1631,7 @@ var CfgAccounts = class {
1631
1631
  */
1632
1632
  static cfgAccountsOtpVerifyCreate(options) {
1633
1633
  return (options.client ?? client).post({
1634
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1635
- key: "jwtAuthWithLastLogin",
1636
- scheme: "bearer",
1637
- type: "http"
1638
- }],
1634
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1639
1635
  url: "/cfg/accounts/otp/verify/",
1640
1636
  ...options,
1641
1637
  headers: {
@@ -1656,11 +1652,7 @@ var CfgAccountsProfile = class {
1656
1652
  */
1657
1653
  static cfgAccountsProfileRetrieve(options) {
1658
1654
  return (options?.client ?? client).get({
1659
- security: [{
1660
- key: "jwtAuth",
1661
- scheme: "bearer",
1662
- type: "http"
1663
- }, {
1655
+ security: [{ scheme: "bearer", type: "http" }, {
1664
1656
  in: "cookie",
1665
1657
  name: "sessionid",
1666
1658
  type: "apiKey"
@@ -1677,11 +1669,7 @@ var CfgAccountsProfile = class {
1677
1669
  static cfgAccountsProfileAvatarCreate(options) {
1678
1670
  return (options?.client ?? client).post({
1679
1671
  ...formDataBodySerializer,
1680
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1681
- key: "jwtAuthWithLastLogin",
1682
- scheme: "bearer",
1683
- type: "http"
1684
- }],
1672
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1685
1673
  url: "/cfg/accounts/profile/avatar/",
1686
1674
  ...options,
1687
1675
  headers: {
@@ -1707,11 +1695,7 @@ var CfgAccountsProfile = class {
1707
1695
  */
1708
1696
  static cfgAccountsProfileDeleteCreate(options) {
1709
1697
  return (options?.client ?? client).post({
1710
- security: [{
1711
- key: "jwtAuth",
1712
- scheme: "bearer",
1713
- type: "http"
1714
- }, {
1698
+ security: [{ scheme: "bearer", type: "http" }, {
1715
1699
  in: "cookie",
1716
1700
  name: "sessionid",
1717
1701
  type: "apiKey"
@@ -1727,11 +1711,7 @@ var CfgAccountsProfile = class {
1727
1711
  */
1728
1712
  static cfgAccountsProfilePartialPartialUpdate(options) {
1729
1713
  return (options?.client ?? client).patch({
1730
- security: [{
1731
- key: "jwtAuth",
1732
- scheme: "bearer",
1733
- type: "http"
1734
- }, {
1714
+ security: [{ scheme: "bearer", type: "http" }, {
1735
1715
  in: "cookie",
1736
1716
  name: "sessionid",
1737
1717
  type: "apiKey"
@@ -1751,11 +1731,7 @@ var CfgAccountsProfile = class {
1751
1731
  */
1752
1732
  static cfgAccountsProfilePartialUpdate(options) {
1753
1733
  return (options?.client ?? client).put({
1754
- security: [{
1755
- key: "jwtAuth",
1756
- scheme: "bearer",
1757
- type: "http"
1758
- }, {
1734
+ security: [{ scheme: "bearer", type: "http" }, {
1759
1735
  in: "cookie",
1760
1736
  name: "sessionid",
1761
1737
  type: "apiKey"
@@ -1775,11 +1751,7 @@ var CfgAccountsProfile = class {
1775
1751
  */
1776
1752
  static cfgAccountsProfileUpdatePartialUpdate(options) {
1777
1753
  return (options?.client ?? client).patch({
1778
- security: [{
1779
- key: "jwtAuth",
1780
- scheme: "bearer",
1781
- type: "http"
1782
- }, {
1754
+ security: [{ scheme: "bearer", type: "http" }, {
1783
1755
  in: "cookie",
1784
1756
  name: "sessionid",
1785
1757
  type: "apiKey"
@@ -1799,11 +1771,7 @@ var CfgAccountsProfile = class {
1799
1771
  */
1800
1772
  static cfgAccountsProfileUpdateUpdate(options) {
1801
1773
  return (options?.client ?? client).put({
1802
- security: [{
1803
- key: "jwtAuth",
1804
- scheme: "bearer",
1805
- type: "http"
1806
- }, {
1774
+ security: [{ scheme: "bearer", type: "http" }, {
1807
1775
  in: "cookie",
1808
1776
  name: "sessionid",
1809
1777
  type: "apiKey"
@@ -1823,6 +1791,12 @@ var CfgAccountsAuth = class {
1823
1791
  }
1824
1792
  /**
1825
1793
  * Refresh JWT token.
1794
+ *
1795
+ * DPoP-aware: when the incoming refresh token is key-bound (`cnf.jkt`), the
1796
+ * rotated access/refresh in the response are re-stamped with the same `cnf`
1797
+ * (stock SimpleJWT drops it from the derived access), and a matching DPoP
1798
+ * proof is required on the refresh request — so a stolen refresh token can't
1799
+ * be used to mint fresh tokens.
1826
1800
  */
1827
1801
  static cfgAccountsTokenRefreshCreate(options) {
1828
1802
  return (options.client ?? client).post({
@@ -1846,11 +1820,7 @@ var CfgCentrifugo = class {
1846
1820
  */
1847
1821
  static cfgCentrifugoAuthTokenRetrieve(options) {
1848
1822
  return (options?.client ?? client).get({
1849
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1850
- key: "jwtAuthWithLastLogin",
1851
- scheme: "bearer",
1852
- type: "http"
1853
- }],
1823
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1854
1824
  url: "/cfg/centrifugo/auth/token/",
1855
1825
  ...options
1856
1826
  });
@@ -1865,11 +1835,7 @@ var CfgTotpBackupCodes = class {
1865
1835
  */
1866
1836
  static cfgTotpBackupCodesRetrieve(options) {
1867
1837
  return (options?.client ?? client).get({
1868
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1869
- key: "jwtAuthWithLastLogin",
1870
- scheme: "bearer",
1871
- type: "http"
1872
- }],
1838
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1873
1839
  url: "/cfg/totp/backup-codes/",
1874
1840
  ...options
1875
1841
  });
@@ -1882,11 +1848,7 @@ var CfgTotpBackupCodes = class {
1882
1848
  */
1883
1849
  static cfgTotpBackupCodesRegenerateCreate(options) {
1884
1850
  return (options.client ?? client).post({
1885
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1886
- key: "jwtAuthWithLastLogin",
1887
- scheme: "bearer",
1888
- type: "http"
1889
- }],
1851
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1890
1852
  url: "/cfg/totp/backup-codes/regenerate/",
1891
1853
  ...options,
1892
1854
  headers: {
@@ -1905,11 +1867,7 @@ var CfgTotp = class {
1905
1867
  */
1906
1868
  static cfgTotpDevicesRetrieve(options) {
1907
1869
  return (options?.client ?? client).get({
1908
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1909
- key: "jwtAuthWithLastLogin",
1910
- scheme: "bearer",
1911
- type: "http"
1912
- }],
1870
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1913
1871
  url: "/cfg/totp/devices/",
1914
1872
  ...options
1915
1873
  });
@@ -1921,11 +1879,7 @@ var CfgTotp = class {
1921
1879
  */
1922
1880
  static cfgTotpDevicesDestroy(options) {
1923
1881
  return (options.client ?? client).delete({
1924
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1925
- key: "jwtAuthWithLastLogin",
1926
- scheme: "bearer",
1927
- type: "http"
1928
- }],
1882
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1929
1883
  url: "/cfg/totp/devices/{id}/",
1930
1884
  ...options
1931
1885
  });
@@ -1937,11 +1891,7 @@ var CfgTotp = class {
1937
1891
  */
1938
1892
  static cfgTotpDisableCreate(options) {
1939
1893
  return (options.client ?? client).post({
1940
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1941
- key: "jwtAuthWithLastLogin",
1942
- scheme: "bearer",
1943
- type: "http"
1944
- }],
1894
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1945
1895
  url: "/cfg/totp/disable/",
1946
1896
  ...options,
1947
1897
  headers: {
@@ -1962,11 +1912,7 @@ var CfgTotpSetup = class {
1962
1912
  */
1963
1913
  static cfgTotpSetupCreate(options) {
1964
1914
  return (options?.client ?? client).post({
1965
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1966
- key: "jwtAuthWithLastLogin",
1967
- scheme: "bearer",
1968
- type: "http"
1969
- }],
1915
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1970
1916
  url: "/cfg/totp/setup/",
1971
1917
  ...options,
1972
1918
  headers: {
@@ -1982,11 +1928,7 @@ var CfgTotpSetup = class {
1982
1928
  */
1983
1929
  static cfgTotpSetupConfirmCreate(options) {
1984
1930
  return (options.client ?? client).post({
1985
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1986
- key: "jwtAuthWithLastLogin",
1987
- scheme: "bearer",
1988
- type: "http"
1989
- }],
1931
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1990
1932
  url: "/cfg/totp/setup/confirm/",
1991
1933
  ...options,
1992
1934
  headers: {
@@ -2007,11 +1949,7 @@ var CfgTotpVerify = class {
2007
1949
  */
2008
1950
  static cfgTotpVerifyCreate(options) {
2009
1951
  return (options.client ?? client).post({
2010
- security: [{ name: "X-API-Key", type: "apiKey" }, {
2011
- key: "jwtAuthWithLastLogin",
2012
- scheme: "bearer",
2013
- type: "http"
2014
- }],
1952
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
2015
1953
  url: "/cfg/totp/verify/",
2016
1954
  ...options,
2017
1955
  headers: {
@@ -2027,11 +1965,7 @@ var CfgTotpVerify = class {
2027
1965
  */
2028
1966
  static cfgTotpVerifyBackupCreate(options) {
2029
1967
  return (options.client ?? client).post({
2030
- security: [{ name: "X-API-Key", type: "apiKey" }, {
2031
- key: "jwtAuthWithLastLogin",
2032
- scheme: "bearer",
2033
- type: "http"
2034
- }],
1968
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
2035
1969
  url: "/cfg/totp/verify/backup/",
2036
1970
  ...options,
2037
1971
  headers: {