@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.
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
@@ -1416,11 +1416,7 @@ var CfgAccountsApiKey = class {
1416
1416
  static cfgAccountsApiKeyRetrieve(options) {
1417
1417
  return (options?.client ?? client).get({
1418
1418
  security: [
1419
- {
1420
- key: "jwtAuth",
1421
- scheme: "bearer",
1422
- type: "http"
1423
- },
1419
+ { scheme: "bearer", type: "http" },
1424
1420
  {
1425
1421
  in: "cookie",
1426
1422
  name: "sessionid",
@@ -1440,11 +1436,31 @@ var CfgAccountsApiKey = class {
1440
1436
  static cfgAccountsApiKeyRegenerateCreate(options) {
1441
1437
  return (options.client ?? client).post({
1442
1438
  security: [
1439
+ { scheme: "bearer", type: "http" },
1443
1440
  {
1444
- key: "jwtAuth",
1445
- scheme: "bearer",
1446
- type: "http"
1441
+ in: "cookie",
1442
+ name: "sessionid",
1443
+ type: "apiKey"
1447
1444
  },
1445
+ { name: "X-API-Key", type: "apiKey" }
1446
+ ],
1447
+ url: "/cfg/accounts/api-key/regenerate/",
1448
+ ...options,
1449
+ headers: {
1450
+ "Content-Type": "application/json",
1451
+ ...options.headers
1452
+ }
1453
+ });
1454
+ }
1455
+ /**
1456
+ * Reveal API key
1457
+ *
1458
+ * 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.
1459
+ */
1460
+ static cfgAccountsApiKeyRevealCreate(options) {
1461
+ return (options.client ?? client).post({
1462
+ security: [
1463
+ { scheme: "bearer", type: "http" },
1448
1464
  {
1449
1465
  in: "cookie",
1450
1466
  name: "sessionid",
@@ -1452,7 +1468,7 @@ var CfgAccountsApiKey = class {
1452
1468
  },
1453
1469
  { name: "X-API-Key", type: "apiKey" }
1454
1470
  ],
1455
- url: "/cfg/accounts/api-key/regenerate/",
1471
+ url: "/cfg/accounts/api-key/reveal/",
1456
1472
  ...options,
1457
1473
  headers: {
1458
1474
  "Content-Type": "application/json",
@@ -1468,11 +1484,7 @@ var CfgAccountsApiKey = class {
1468
1484
  static cfgAccountsApiKeyTestCreate(options) {
1469
1485
  return (options.client ?? client).post({
1470
1486
  security: [
1471
- {
1472
- key: "jwtAuth",
1473
- scheme: "bearer",
1474
- type: "http"
1475
- },
1487
+ { scheme: "bearer", type: "http" },
1476
1488
  {
1477
1489
  in: "cookie",
1478
1490
  name: "sessionid",
@@ -1500,11 +1512,7 @@ var CfgAccountsOauth = class {
1500
1512
  */
1501
1513
  static cfgAccountsOauthConnectionsList(options) {
1502
1514
  return (options?.client ?? client).get({
1503
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1504
- key: "jwtAuthWithLastLogin",
1505
- scheme: "bearer",
1506
- type: "http"
1507
- }],
1515
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1508
1516
  url: "/cfg/accounts/oauth/connections/",
1509
1517
  ...options
1510
1518
  });
@@ -1516,11 +1524,7 @@ var CfgAccountsOauth = class {
1516
1524
  */
1517
1525
  static cfgAccountsOauthDisconnectCreate(options) {
1518
1526
  return (options.client ?? client).post({
1519
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1520
- key: "jwtAuthWithLastLogin",
1521
- scheme: "bearer",
1522
- type: "http"
1523
- }],
1527
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1524
1528
  url: "/cfg/accounts/oauth/disconnect/",
1525
1529
  ...options,
1526
1530
  headers: {
@@ -1577,11 +1581,7 @@ var CfgAccounts = class {
1577
1581
  */
1578
1582
  static cfgAccountsOtpRequestCreate(options) {
1579
1583
  return (options.client ?? client).post({
1580
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1581
- key: "jwtAuthWithLastLogin",
1582
- scheme: "bearer",
1583
- type: "http"
1584
- }],
1584
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1585
1585
  url: "/cfg/accounts/otp/request/",
1586
1586
  ...options,
1587
1587
  headers: {
@@ -1602,11 +1602,7 @@ var CfgAccounts = class {
1602
1602
  */
1603
1603
  static cfgAccountsOtpVerifyCreate(options) {
1604
1604
  return (options.client ?? client).post({
1605
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1606
- key: "jwtAuthWithLastLogin",
1607
- scheme: "bearer",
1608
- type: "http"
1609
- }],
1605
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1610
1606
  url: "/cfg/accounts/otp/verify/",
1611
1607
  ...options,
1612
1608
  headers: {
@@ -1627,11 +1623,7 @@ var CfgAccountsProfile = class {
1627
1623
  */
1628
1624
  static cfgAccountsProfileRetrieve(options) {
1629
1625
  return (options?.client ?? client).get({
1630
- security: [{
1631
- key: "jwtAuth",
1632
- scheme: "bearer",
1633
- type: "http"
1634
- }, {
1626
+ security: [{ scheme: "bearer", type: "http" }, {
1635
1627
  in: "cookie",
1636
1628
  name: "sessionid",
1637
1629
  type: "apiKey"
@@ -1648,11 +1640,7 @@ var CfgAccountsProfile = class {
1648
1640
  static cfgAccountsProfileAvatarCreate(options) {
1649
1641
  return (options?.client ?? client).post({
1650
1642
  ...formDataBodySerializer,
1651
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1652
- key: "jwtAuthWithLastLogin",
1653
- scheme: "bearer",
1654
- type: "http"
1655
- }],
1643
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1656
1644
  url: "/cfg/accounts/profile/avatar/",
1657
1645
  ...options,
1658
1646
  headers: {
@@ -1678,11 +1666,7 @@ var CfgAccountsProfile = class {
1678
1666
  */
1679
1667
  static cfgAccountsProfileDeleteCreate(options) {
1680
1668
  return (options?.client ?? client).post({
1681
- security: [{
1682
- key: "jwtAuth",
1683
- scheme: "bearer",
1684
- type: "http"
1685
- }, {
1669
+ security: [{ scheme: "bearer", type: "http" }, {
1686
1670
  in: "cookie",
1687
1671
  name: "sessionid",
1688
1672
  type: "apiKey"
@@ -1698,11 +1682,7 @@ var CfgAccountsProfile = class {
1698
1682
  */
1699
1683
  static cfgAccountsProfilePartialPartialUpdate(options) {
1700
1684
  return (options?.client ?? client).patch({
1701
- security: [{
1702
- key: "jwtAuth",
1703
- scheme: "bearer",
1704
- type: "http"
1705
- }, {
1685
+ security: [{ scheme: "bearer", type: "http" }, {
1706
1686
  in: "cookie",
1707
1687
  name: "sessionid",
1708
1688
  type: "apiKey"
@@ -1722,11 +1702,7 @@ var CfgAccountsProfile = class {
1722
1702
  */
1723
1703
  static cfgAccountsProfilePartialUpdate(options) {
1724
1704
  return (options?.client ?? client).put({
1725
- security: [{
1726
- key: "jwtAuth",
1727
- scheme: "bearer",
1728
- type: "http"
1729
- }, {
1705
+ security: [{ scheme: "bearer", type: "http" }, {
1730
1706
  in: "cookie",
1731
1707
  name: "sessionid",
1732
1708
  type: "apiKey"
@@ -1746,11 +1722,7 @@ var CfgAccountsProfile = class {
1746
1722
  */
1747
1723
  static cfgAccountsProfileUpdatePartialUpdate(options) {
1748
1724
  return (options?.client ?? client).patch({
1749
- security: [{
1750
- key: "jwtAuth",
1751
- scheme: "bearer",
1752
- type: "http"
1753
- }, {
1725
+ security: [{ scheme: "bearer", type: "http" }, {
1754
1726
  in: "cookie",
1755
1727
  name: "sessionid",
1756
1728
  type: "apiKey"
@@ -1770,11 +1742,7 @@ var CfgAccountsProfile = class {
1770
1742
  */
1771
1743
  static cfgAccountsProfileUpdateUpdate(options) {
1772
1744
  return (options?.client ?? client).put({
1773
- security: [{
1774
- key: "jwtAuth",
1775
- scheme: "bearer",
1776
- type: "http"
1777
- }, {
1745
+ security: [{ scheme: "bearer", type: "http" }, {
1778
1746
  in: "cookie",
1779
1747
  name: "sessionid",
1780
1748
  type: "apiKey"
@@ -1794,6 +1762,12 @@ var CfgAccountsAuth = class {
1794
1762
  }
1795
1763
  /**
1796
1764
  * Refresh JWT token.
1765
+ *
1766
+ * DPoP-aware: when the incoming refresh token is key-bound (`cnf.jkt`), the
1767
+ * rotated access/refresh in the response are re-stamped with the same `cnf`
1768
+ * (stock SimpleJWT drops it from the derived access), and a matching DPoP
1769
+ * proof is required on the refresh request — so a stolen refresh token can't
1770
+ * be used to mint fresh tokens.
1797
1771
  */
1798
1772
  static cfgAccountsTokenRefreshCreate(options) {
1799
1773
  return (options.client ?? client).post({
@@ -1817,11 +1791,7 @@ var CfgCentrifugo = class {
1817
1791
  */
1818
1792
  static cfgCentrifugoAuthTokenRetrieve(options) {
1819
1793
  return (options?.client ?? client).get({
1820
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1821
- key: "jwtAuthWithLastLogin",
1822
- scheme: "bearer",
1823
- type: "http"
1824
- }],
1794
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1825
1795
  url: "/cfg/centrifugo/auth/token/",
1826
1796
  ...options
1827
1797
  });
@@ -1836,11 +1806,7 @@ var CfgTotpBackupCodes = class {
1836
1806
  */
1837
1807
  static cfgTotpBackupCodesRetrieve(options) {
1838
1808
  return (options?.client ?? client).get({
1839
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1840
- key: "jwtAuthWithLastLogin",
1841
- scheme: "bearer",
1842
- type: "http"
1843
- }],
1809
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1844
1810
  url: "/cfg/totp/backup-codes/",
1845
1811
  ...options
1846
1812
  });
@@ -1853,11 +1819,7 @@ var CfgTotpBackupCodes = class {
1853
1819
  */
1854
1820
  static cfgTotpBackupCodesRegenerateCreate(options) {
1855
1821
  return (options.client ?? client).post({
1856
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1857
- key: "jwtAuthWithLastLogin",
1858
- scheme: "bearer",
1859
- type: "http"
1860
- }],
1822
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1861
1823
  url: "/cfg/totp/backup-codes/regenerate/",
1862
1824
  ...options,
1863
1825
  headers: {
@@ -1876,11 +1838,7 @@ var CfgTotp = class {
1876
1838
  */
1877
1839
  static cfgTotpDevicesRetrieve(options) {
1878
1840
  return (options?.client ?? client).get({
1879
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1880
- key: "jwtAuthWithLastLogin",
1881
- scheme: "bearer",
1882
- type: "http"
1883
- }],
1841
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1884
1842
  url: "/cfg/totp/devices/",
1885
1843
  ...options
1886
1844
  });
@@ -1892,11 +1850,7 @@ var CfgTotp = class {
1892
1850
  */
1893
1851
  static cfgTotpDevicesDestroy(options) {
1894
1852
  return (options.client ?? client).delete({
1895
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1896
- key: "jwtAuthWithLastLogin",
1897
- scheme: "bearer",
1898
- type: "http"
1899
- }],
1853
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1900
1854
  url: "/cfg/totp/devices/{id}/",
1901
1855
  ...options
1902
1856
  });
@@ -1908,11 +1862,7 @@ var CfgTotp = class {
1908
1862
  */
1909
1863
  static cfgTotpDisableCreate(options) {
1910
1864
  return (options.client ?? client).post({
1911
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1912
- key: "jwtAuthWithLastLogin",
1913
- scheme: "bearer",
1914
- type: "http"
1915
- }],
1865
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1916
1866
  url: "/cfg/totp/disable/",
1917
1867
  ...options,
1918
1868
  headers: {
@@ -1933,11 +1883,7 @@ var CfgTotpSetup = class {
1933
1883
  */
1934
1884
  static cfgTotpSetupCreate(options) {
1935
1885
  return (options?.client ?? client).post({
1936
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1937
- key: "jwtAuthWithLastLogin",
1938
- scheme: "bearer",
1939
- type: "http"
1940
- }],
1886
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1941
1887
  url: "/cfg/totp/setup/",
1942
1888
  ...options,
1943
1889
  headers: {
@@ -1953,11 +1899,7 @@ var CfgTotpSetup = class {
1953
1899
  */
1954
1900
  static cfgTotpSetupConfirmCreate(options) {
1955
1901
  return (options.client ?? client).post({
1956
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1957
- key: "jwtAuthWithLastLogin",
1958
- scheme: "bearer",
1959
- type: "http"
1960
- }],
1902
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1961
1903
  url: "/cfg/totp/setup/confirm/",
1962
1904
  ...options,
1963
1905
  headers: {
@@ -1978,11 +1920,7 @@ var CfgTotpVerify = class {
1978
1920
  */
1979
1921
  static cfgTotpVerifyCreate(options) {
1980
1922
  return (options.client ?? client).post({
1981
- security: [{ name: "X-API-Key", type: "apiKey" }, {
1982
- key: "jwtAuthWithLastLogin",
1983
- scheme: "bearer",
1984
- type: "http"
1985
- }],
1923
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
1986
1924
  url: "/cfg/totp/verify/",
1987
1925
  ...options,
1988
1926
  headers: {
@@ -1998,11 +1936,7 @@ var CfgTotpVerify = class {
1998
1936
  */
1999
1937
  static cfgTotpVerifyBackupCreate(options) {
2000
1938
  return (options.client ?? client).post({
2001
- security: [{ name: "X-API-Key", type: "apiKey" }, {
2002
- key: "jwtAuthWithLastLogin",
2003
- scheme: "bearer",
2004
- type: "http"
2005
- }],
1939
+ security: [{ name: "X-API-Key", type: "apiKey" }, { scheme: "bearer", type: "http" }],
2006
1940
  url: "/cfg/totp/verify/backup/",
2007
1941
  ...options,
2008
1942
  headers: {