@djangocfg/api 2.1.230 → 2.1.232

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 (92) hide show
  1. package/README.md +19 -4
  2. package/dist/auth-server.cjs +45 -358
  3. package/dist/auth-server.cjs.map +1 -1
  4. package/dist/auth-server.mjs +43 -356
  5. package/dist/auth-server.mjs.map +1 -1
  6. package/dist/auth.cjs +223 -735
  7. package/dist/auth.cjs.map +1 -1
  8. package/dist/auth.mjs +218 -730
  9. package/dist/auth.mjs.map +1 -1
  10. package/dist/clients.cjs +313 -1568
  11. package/dist/clients.cjs.map +1 -1
  12. package/dist/clients.d.cts +211 -1932
  13. package/dist/clients.d.ts +211 -1932
  14. package/dist/clients.mjs +309 -1564
  15. package/dist/clients.mjs.map +1 -1
  16. package/dist/hooks.cjs +36 -32
  17. package/dist/hooks.cjs.map +1 -1
  18. package/dist/hooks.d.cts +76 -76
  19. package/dist/hooks.d.ts +76 -76
  20. package/dist/hooks.mjs +36 -32
  21. package/dist/hooks.mjs.map +1 -1
  22. package/dist/index.cjs +88 -593
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +88 -88
  25. package/dist/index.d.ts +88 -88
  26. package/dist/index.mjs +88 -593
  27. package/dist/index.mjs.map +1 -1
  28. package/package.json +2 -2
  29. package/src/_api/generated/cfg_accounts/accounts/models.ts +34 -34
  30. package/src/_api/generated/cfg_accounts/accounts__oauth/models.ts +41 -41
  31. package/src/_api/generated/cfg_accounts/accounts__user_profile/models.ts +18 -18
  32. package/src/_api/generated/cfg_accounts/client.ts +39 -42
  33. package/src/_api/generated/cfg_centrifugo/CLAUDE.md +2 -27
  34. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/index.ts +0 -3
  35. package/src/_api/generated/cfg_centrifugo/_utils/hooks/index.ts +0 -3
  36. package/src/_api/generated/cfg_centrifugo/_utils/schemas/index.ts +0 -34
  37. package/src/_api/generated/cfg_centrifugo/client.ts +39 -51
  38. package/src/_api/generated/cfg_centrifugo/index.ts +0 -21
  39. package/src/_api/generated/cfg_centrifugo/schema.json +4 -2039
  40. package/src/_api/generated/cfg_totp/client.ts +39 -42
  41. package/src/_api/generated/cfg_totp/totp__totp_management/models.ts +10 -10
  42. package/src/_api/generated/cfg_totp/totp__totp_setup/models.ts +12 -12
  43. package/src/_api/generated/cfg_totp/totp__totp_verification/models.ts +8 -8
  44. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_admin_api.ts +0 -344
  45. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_monitoring.ts +0 -326
  46. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_testing.ts +0 -211
  47. package/src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_admin_api.ts +0 -141
  48. package/src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_monitoring.ts +0 -99
  49. package/src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_testing.ts +0 -82
  50. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelInfo.schema.ts +0 -19
  51. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts +0 -19
  52. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts +0 -22
  53. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResult.schema.ts +0 -20
  54. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoClientInfo.schema.ts +0 -22
  55. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoError.schema.ts +0 -20
  56. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHealthCheck.schema.ts +0 -22
  57. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +0 -23
  58. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts +0 -22
  59. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts +0 -22
  60. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts +0 -22
  61. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts +0 -20
  62. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoMetrics.schema.ts +0 -20
  63. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts +0 -30
  64. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoOverviewStats.schema.ts +0 -26
  65. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts +0 -19
  66. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts +0 -22
  67. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResult.schema.ts +0 -20
  68. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts +0 -19
  69. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts +0 -22
  70. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts +0 -20
  71. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoProcess.schema.ts +0 -20
  72. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPublication.schema.ts +0 -23
  73. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoStreamPosition.schema.ts +0 -20
  74. package/src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts +0 -21
  75. package/src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelStats.schema.ts +0 -25
  76. package/src/_api/generated/cfg_centrifugo/_utils/schemas/ManualAckRequestRequest.schema.ts +0 -20
  77. package/src/_api/generated/cfg_centrifugo/_utils/schemas/ManualAckResponse.schema.ts +0 -21
  78. package/src/_api/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts +0 -24
  79. package/src/_api/generated/cfg_centrifugo/_utils/schemas/Publish.schema.ts +0 -29
  80. package/src/_api/generated/cfg_centrifugo/_utils/schemas/PublishTestRequestRequest.schema.ts +0 -22
  81. package/src/_api/generated/cfg_centrifugo/_utils/schemas/PublishTestResponse.schema.ts +0 -24
  82. package/src/_api/generated/cfg_centrifugo/_utils/schemas/TimelineItem.schema.ts +0 -23
  83. package/src/_api/generated/cfg_centrifugo/_utils/schemas/TimelineResponse.schema.ts +0 -22
  84. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/client.ts +0 -76
  85. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/index.ts +0 -4
  86. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/models.ts +0 -268
  87. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/client.ts +0 -110
  88. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/index.ts +0 -4
  89. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/models.ts +0 -144
  90. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/client.ts +0 -48
  91. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/index.ts +0 -4
  92. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/models.ts +0 -64
package/dist/auth.mjs CHANGED
@@ -944,43 +944,47 @@ var APIClient = class {
944
944
  if (error instanceof APIError) {
945
945
  throw error;
946
946
  }
947
- const isCORSError = error instanceof TypeError && (error.message.toLowerCase().includes("cors") || error.message.toLowerCase().includes("failed to fetch") || error.message.toLowerCase().includes("network request failed"));
947
+ let possiblyCors = false;
948
+ if (error instanceof TypeError && typeof window !== "undefined") {
949
+ try {
950
+ const isCrossOrigin = (() => {
951
+ try {
952
+ return new URL(url).origin !== window.location.origin;
953
+ } catch {
954
+ return false;
955
+ }
956
+ })();
957
+ if (isCrossOrigin) {
958
+ const entries = performance.getEntriesByName(url, "resource");
959
+ if (entries.length > 0) {
960
+ const last = entries[entries.length - 1];
961
+ possiblyCors = "responseStatus" in last && last.responseStatus === 0;
962
+ }
963
+ }
964
+ } catch {
965
+ }
966
+ }
948
967
  if (this.logger) {
949
- if (isCORSError) {
950
- this.logger.error(`\u{1F6AB} CORS Error: ${method} ${url}`);
951
- this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
952
- this.logger.error(` \u2192 Configure security_domains parameter on the server`);
953
- } else {
954
- this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
955
- this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
968
+ this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
969
+ this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
970
+ if (possiblyCors) {
971
+ this.logger.error(` \u2192 Possibly blocked by CORS policy (configure CORS on the server)`);
956
972
  }
957
973
  }
958
974
  if (typeof window !== "undefined") {
959
975
  try {
960
- if (isCORSError) {
961
- window.dispatchEvent(new CustomEvent("cors-error", {
962
- detail: {
963
- url,
964
- method,
965
- error: error instanceof Error ? error.message : String(error),
966
- timestamp: /* @__PURE__ */ new Date()
967
- },
968
- bubbles: true,
969
- cancelable: false
970
- }));
971
- } else {
972
- window.dispatchEvent(new CustomEvent("network-error", {
973
- detail: {
974
- url,
975
- method,
976
- error: error instanceof Error ? error.message : String(error),
977
- timestamp: /* @__PURE__ */ new Date()
978
- },
979
- bubbles: true,
980
- cancelable: false
981
- }));
982
- }
983
- } catch (eventError) {
976
+ window.dispatchEvent(new CustomEvent("network-error", {
977
+ detail: {
978
+ url,
979
+ method,
980
+ error: error instanceof Error ? error.message : String(error),
981
+ possibly_cors: possiblyCors,
982
+ timestamp: /* @__PURE__ */ new Date()
983
+ },
984
+ bubbles: true,
985
+ cancelable: false
986
+ }));
987
+ } catch {
984
988
  }
985
989
  }
986
990
  const networkError = error instanceof Error ? new NetworkError(error.message, url, error) : new NetworkError("Unknown error", url);
@@ -1749,71 +1753,6 @@ var API = class {
1749
1753
  }
1750
1754
  };
1751
1755
 
1752
- // src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/client.ts
1753
- var CentrifugoAdminApi = class {
1754
- static {
1755
- __name(this, "CentrifugoAdminApi");
1756
- }
1757
- constructor(client) {
1758
- this.client = client;
1759
- }
1760
- /**
1761
- * Get connection token for dashboard
1762
- *
1763
- * Returns JWT token and config for WebSocket connection to Centrifugo.
1764
- */
1765
- async centrifugoServerAuthTokenCreate() {
1766
- const response = await this.client.request("POST", "/cfg/centrifugo/server/auth/token/");
1767
- return response;
1768
- }
1769
- /**
1770
- * List active channels
1771
- *
1772
- * Returns list of active channels with optional pattern filter.
1773
- */
1774
- async centrifugoServerChannelsCreate(data) {
1775
- const response = await this.client.request("POST", "/cfg/centrifugo/server/channels/", { body: data });
1776
- return response;
1777
- }
1778
- /**
1779
- * Get channel history
1780
- *
1781
- * Returns message history for a channel.
1782
- */
1783
- async centrifugoServerHistoryCreate(data) {
1784
- const response = await this.client.request("POST", "/cfg/centrifugo/server/history/", { body: data });
1785
- return response;
1786
- }
1787
- /**
1788
- * Get Centrifugo server info
1789
- *
1790
- * Returns server information including node count, version, and uptime.
1791
- */
1792
- async centrifugoServerInfoCreate() {
1793
- const response = await this.client.request("POST", "/cfg/centrifugo/server/info/");
1794
- return response;
1795
- }
1796
- /**
1797
- * Get channel presence
1798
- *
1799
- * Returns list of clients currently subscribed to a channel.
1800
- */
1801
- async centrifugoServerPresenceCreate(data) {
1802
- const response = await this.client.request("POST", "/cfg/centrifugo/server/presence/", { body: data });
1803
- return response;
1804
- }
1805
- /**
1806
- * Get channel presence statistics
1807
- *
1808
- * Returns quick statistics about channel presence (num_clients,
1809
- * num_users).
1810
- */
1811
- async centrifugoServerPresenceStatsCreate(data) {
1812
- const response = await this.client.request("POST", "/cfg/centrifugo/server/presence-stats/", { body: data });
1813
- return response;
1814
- }
1815
- };
1816
-
1817
1756
  // src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_auth/client.ts
1818
1757
  var CentrifugoAuth = class {
1819
1758
  static {
@@ -1835,130 +1774,6 @@ var CentrifugoAuth = class {
1835
1774
  }
1836
1775
  };
1837
1776
 
1838
- // src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/client.ts
1839
- var CentrifugoMonitoring = class {
1840
- static {
1841
- __name(this, "CentrifugoMonitoring");
1842
- }
1843
- constructor(client) {
1844
- this.client = client;
1845
- }
1846
- /**
1847
- * Get channel statistics
1848
- *
1849
- * Returns statistics grouped by channel.
1850
- */
1851
- async centrifugoMonitorChannelsRetrieve(...args) {
1852
- const isParamsObject = args.length === 1 && typeof args[0] === "object" && args[0] !== null && !Array.isArray(args[0]);
1853
- let params;
1854
- if (isParamsObject) {
1855
- params = args[0];
1856
- } else {
1857
- params = { hours: args[0] };
1858
- }
1859
- const response = await this.client.request("GET", "/cfg/centrifugo/monitor/channels/", { params });
1860
- return response;
1861
- }
1862
- /**
1863
- * Get Centrifugo health status
1864
- *
1865
- * Returns the current health status of the Centrifugo client.
1866
- */
1867
- async centrifugoMonitorHealthRetrieve() {
1868
- const response = await this.client.request("GET", "/cfg/centrifugo/monitor/health/");
1869
- return response;
1870
- }
1871
- /**
1872
- * Get overview statistics
1873
- *
1874
- * Returns overview statistics for Centrifugo publishes.
1875
- */
1876
- async centrifugoMonitorOverviewRetrieve(...args) {
1877
- const isParamsObject = args.length === 1 && typeof args[0] === "object" && args[0] !== null && !Array.isArray(args[0]);
1878
- let params;
1879
- if (isParamsObject) {
1880
- params = args[0];
1881
- } else {
1882
- params = { hours: args[0] };
1883
- }
1884
- const response = await this.client.request("GET", "/cfg/centrifugo/monitor/overview/", { params });
1885
- return response;
1886
- }
1887
- /**
1888
- * Get recent publishes
1889
- *
1890
- * Returns a paginated list of recent Centrifugo publishes with their
1891
- * details. Uses standard DRF pagination.
1892
- */
1893
- async centrifugoMonitorPublishesList(...args) {
1894
- const isParamsObject = args.length === 1 && typeof args[0] === "object" && args[0] !== null && !Array.isArray(args[0]);
1895
- let params;
1896
- if (isParamsObject) {
1897
- params = args[0];
1898
- } else {
1899
- params = { channel: args[0], ordering: args[1], page: args[2], page_size: args[3], search: args[4], status: args[5] };
1900
- }
1901
- const response = await this.client.request("GET", "/cfg/centrifugo/monitor/publishes/", { params });
1902
- return response;
1903
- }
1904
- /**
1905
- * Get publish timeline
1906
- *
1907
- * Returns hourly or daily breakdown of publish counts for charts.
1908
- */
1909
- async centrifugoMonitorTimelineRetrieve(...args) {
1910
- const isParamsObject = args.length === 1 && typeof args[0] === "object" && args[0] !== null && !Array.isArray(args[0]);
1911
- let params;
1912
- if (isParamsObject) {
1913
- params = args[0];
1914
- } else {
1915
- params = { hours: args[0], interval: args[1] };
1916
- }
1917
- const response = await this.client.request("GET", "/cfg/centrifugo/monitor/timeline/", { params });
1918
- return response;
1919
- }
1920
- };
1921
-
1922
- // src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/client.ts
1923
- var CentrifugoTesting = class {
1924
- static {
1925
- __name(this, "CentrifugoTesting");
1926
- }
1927
- constructor(client) {
1928
- this.client = client;
1929
- }
1930
- /**
1931
- * Publish test message
1932
- *
1933
- * Publish test message to Centrifugo via wrapper with optional ACK
1934
- * tracking.
1935
- */
1936
- async publishTestCreate(data) {
1937
- const response = await this.client.request("POST", "/cfg/centrifugo/testing/publish-test/", { body: data });
1938
- return response;
1939
- }
1940
- /**
1941
- * Publish with database logging
1942
- *
1943
- * Publish message using CentrifugoClient with database logging. This will
1944
- * create CentrifugoLog records.
1945
- */
1946
- async publishWithLoggingCreate(data) {
1947
- const response = await this.client.request("POST", "/cfg/centrifugo/testing/publish-with-logging/", { body: data });
1948
- return response;
1949
- }
1950
- /**
1951
- * Send manual ACK
1952
- *
1953
- * Manually send ACK for a message to the wrapper. Pass message_id in
1954
- * request body.
1955
- */
1956
- async sendAckCreate(data) {
1957
- const response = await this.client.request("POST", "/cfg/centrifugo/testing/send-ack/", { body: data });
1958
- return response;
1959
- }
1960
- };
1961
-
1962
1777
  // src/_api/generated/cfg_centrifugo/http.ts
1963
1778
  var FetchAdapter2 = class {
1964
1779
  static {
@@ -2335,10 +2150,7 @@ var APIClient2 = class {
2335
2150
  if (options?.retryConfig !== void 0) {
2336
2151
  this.retryConfig = options.retryConfig;
2337
2152
  }
2338
- this.centrifugo_admin_api = new CentrifugoAdminApi(this);
2339
2153
  this.centrifugo_auth = new CentrifugoAuth(this);
2340
- this.centrifugo_monitoring = new CentrifugoMonitoring(this);
2341
- this.centrifugo_testing = new CentrifugoTesting(this);
2342
2154
  }
2343
2155
  static {
2344
2156
  __name(this, "APIClient");
@@ -2473,43 +2285,47 @@ var APIClient2 = class {
2473
2285
  if (error instanceof APIError2) {
2474
2286
  throw error;
2475
2287
  }
2476
- const isCORSError = error instanceof TypeError && (error.message.toLowerCase().includes("cors") || error.message.toLowerCase().includes("failed to fetch") || error.message.toLowerCase().includes("network request failed"));
2288
+ let possiblyCors = false;
2289
+ if (error instanceof TypeError && typeof window !== "undefined") {
2290
+ try {
2291
+ const isCrossOrigin = (() => {
2292
+ try {
2293
+ return new URL(url).origin !== window.location.origin;
2294
+ } catch {
2295
+ return false;
2296
+ }
2297
+ })();
2298
+ if (isCrossOrigin) {
2299
+ const entries = performance.getEntriesByName(url, "resource");
2300
+ if (entries.length > 0) {
2301
+ const last = entries[entries.length - 1];
2302
+ possiblyCors = "responseStatus" in last && last.responseStatus === 0;
2303
+ }
2304
+ }
2305
+ } catch {
2306
+ }
2307
+ }
2477
2308
  if (this.logger) {
2478
- if (isCORSError) {
2479
- this.logger.error(`\u{1F6AB} CORS Error: ${method} ${url}`);
2480
- this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
2481
- this.logger.error(` \u2192 Configure security_domains parameter on the server`);
2482
- } else {
2483
- this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
2484
- this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
2309
+ this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
2310
+ this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
2311
+ if (possiblyCors) {
2312
+ this.logger.error(` \u2192 Possibly blocked by CORS policy (configure CORS on the server)`);
2485
2313
  }
2486
2314
  }
2487
2315
  if (typeof window !== "undefined") {
2488
2316
  try {
2489
- if (isCORSError) {
2490
- window.dispatchEvent(new CustomEvent("cors-error", {
2491
- detail: {
2492
- url,
2493
- method,
2494
- error: error instanceof Error ? error.message : String(error),
2495
- timestamp: /* @__PURE__ */ new Date()
2496
- },
2497
- bubbles: true,
2498
- cancelable: false
2499
- }));
2500
- } else {
2501
- window.dispatchEvent(new CustomEvent("network-error", {
2502
- detail: {
2503
- url,
2504
- method,
2505
- error: error instanceof Error ? error.message : String(error),
2506
- timestamp: /* @__PURE__ */ new Date()
2507
- },
2508
- bubbles: true,
2509
- cancelable: false
2510
- }));
2511
- }
2512
- } catch (eventError) {
2317
+ window.dispatchEvent(new CustomEvent("network-error", {
2318
+ detail: {
2319
+ url,
2320
+ method,
2321
+ error: error instanceof Error ? error.message : String(error),
2322
+ possibly_cors: possiblyCors,
2323
+ timestamp: /* @__PURE__ */ new Date()
2324
+ },
2325
+ bubbles: true,
2326
+ cancelable: false
2327
+ }));
2328
+ } catch {
2513
2329
  }
2514
2330
  }
2515
2331
  const networkError = error instanceof Error ? new NetworkError2(error.message, url, error) : new NetworkError2("Unknown error", url);
@@ -2581,334 +2397,17 @@ var LocalStorageAdapter2 = class {
2581
2397
  }
2582
2398
  };
2583
2399
 
2584
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelInfo.schema.ts
2585
- import { z as z22 } from "zod";
2586
- var CentrifugoChannelInfoSchema = z22.object({
2587
- num_clients: z22.number().int()
2588
- });
2589
-
2590
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts
2591
- import { z as z23 } from "zod";
2592
- var CentrifugoChannelsRequestRequestSchema = z23.object({
2593
- pattern: z23.string().nullable().optional()
2594
- });
2595
-
2596
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts
2597
- import { z as z26 } from "zod";
2598
-
2599
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResult.schema.ts
2600
- import { z as z24 } from "zod";
2601
- var CentrifugoChannelsResultSchema = z24.object({
2602
- channels: z24.record(z24.string(), CentrifugoChannelInfoSchema)
2603
- });
2604
-
2605
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoError.schema.ts
2606
- import { z as z25 } from "zod";
2607
- var CentrifugoErrorSchema = z25.object({
2608
- code: z25.number().int().optional(),
2609
- message: z25.string().optional()
2610
- });
2611
-
2612
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts
2613
- var CentrifugoChannelsResponseSchema = z26.object({
2614
- error: CentrifugoErrorSchema.nullable().optional(),
2615
- result: CentrifugoChannelsResultSchema.nullable().optional()
2616
- });
2617
-
2618
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoClientInfo.schema.ts
2619
- import { z as z27 } from "zod";
2620
- var CentrifugoClientInfoSchema = z27.object({
2621
- user: z27.string(),
2622
- client: z27.string(),
2623
- conn_info: z27.record(z27.string(), z27.any()).nullable().optional(),
2624
- chan_info: z27.record(z27.string(), z27.any()).nullable().optional()
2625
- });
2626
-
2627
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHealthCheck.schema.ts
2628
- import { z as z28 } from "zod";
2629
- var CentrifugoHealthCheckSchema = z28.object({
2630
- status: z28.string(),
2631
- wrapper_url: z28.string(),
2632
- has_api_key: z28.boolean(),
2633
- timestamp: z28.string()
2634
- });
2635
-
2636
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts
2637
- import { z as z30 } from "zod";
2638
-
2639
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoStreamPosition.schema.ts
2640
- import { z as z29 } from "zod";
2641
- var CentrifugoStreamPositionSchema = z29.object({
2642
- offset: z29.number().int(),
2643
- epoch: z29.string()
2644
- });
2645
-
2646
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts
2647
- var CentrifugoHistoryRequestRequestSchema = z30.object({
2648
- channel: z30.string(),
2649
- limit: z30.number().int().nullable().optional(),
2650
- since: CentrifugoStreamPositionSchema.nullable().optional(),
2651
- reverse: z30.boolean().nullable().optional()
2652
- });
2653
-
2654
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts
2655
- import { z as z33 } from "zod";
2656
-
2657
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts
2658
- import { z as z32 } from "zod";
2659
-
2660
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPublication.schema.ts
2661
- import { z as z31 } from "zod";
2662
- var CentrifugoPublicationSchema = z31.object({
2663
- data: z31.record(z31.string(), z31.any()),
2664
- info: CentrifugoClientInfoSchema.nullable().optional(),
2665
- offset: z31.number().int(),
2666
- tags: z31.record(z31.string(), z31.any()).nullable().optional()
2667
- });
2668
-
2669
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts
2670
- var CentrifugoHistoryResultSchema = z32.object({
2671
- publications: z32.array(CentrifugoPublicationSchema),
2672
- epoch: z32.string(),
2673
- offset: z32.number().int()
2674
- });
2675
-
2676
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts
2677
- var CentrifugoHistoryResponseSchema = z33.object({
2678
- error: CentrifugoErrorSchema.nullable().optional(),
2679
- result: CentrifugoHistoryResultSchema.nullable().optional()
2680
- });
2681
-
2682
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts
2683
- import { z as z38 } from "zod";
2684
-
2685
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts
2686
- import { z as z37 } from "zod";
2687
-
2688
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts
2689
- import { z as z36 } from "zod";
2690
-
2691
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoMetrics.schema.ts
2692
- import { z as z34 } from "zod";
2693
- var CentrifugoMetricsSchema = z34.object({
2694
- interval: z34.number(),
2695
- items: z34.record(z34.string(), z34.number())
2696
- });
2697
-
2698
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoProcess.schema.ts
2699
- import { z as z35 } from "zod";
2700
- var CentrifugoProcessSchema = z35.object({
2701
- cpu: z35.number(),
2702
- rss: z35.number().int()
2703
- });
2704
-
2705
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts
2706
- var CentrifugoNodeInfoSchema = z36.object({
2707
- uid: z36.string(),
2708
- name: z36.string(),
2709
- version: z36.string(),
2710
- num_clients: z36.number().int(),
2711
- num_users: z36.number().int(),
2712
- num_channels: z36.number().int(),
2713
- uptime: z36.number().int(),
2714
- num_subs: z36.number().int(),
2715
- metrics: CentrifugoMetricsSchema.nullable().optional(),
2716
- process: CentrifugoProcessSchema.nullable().optional()
2717
- });
2718
-
2719
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts
2720
- var CentrifugoInfoResultSchema = z37.object({
2721
- nodes: z37.array(CentrifugoNodeInfoSchema)
2722
- });
2723
-
2724
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts
2725
- var CentrifugoInfoResponseSchema = z38.object({
2726
- error: CentrifugoErrorSchema.nullable().optional(),
2727
- result: CentrifugoInfoResultSchema.nullable().optional()
2728
- });
2729
-
2730
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoOverviewStats.schema.ts
2731
- import { z as z39 } from "zod";
2732
- var CentrifugoOverviewStatsSchema = z39.object({
2733
- total: z39.number().int(),
2734
- successful: z39.number().int(),
2735
- failed: z39.number().int(),
2736
- timeout: z39.number().int(),
2737
- success_rate: z39.number(),
2738
- avg_duration_ms: z39.number(),
2739
- avg_acks_received: z39.number(),
2740
- period_hours: z39.number().int()
2741
- });
2742
-
2743
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts
2744
- import { z as z40 } from "zod";
2745
- var CentrifugoPresenceRequestRequestSchema = z40.object({
2746
- channel: z40.string()
2747
- });
2748
-
2749
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts
2750
- import { z as z42 } from "zod";
2751
-
2752
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResult.schema.ts
2753
- import { z as z41 } from "zod";
2754
- var CentrifugoPresenceResultSchema = z41.object({
2755
- presence: z41.record(z41.string(), CentrifugoClientInfoSchema)
2756
- });
2757
-
2758
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts
2759
- var CentrifugoPresenceResponseSchema = z42.object({
2760
- error: CentrifugoErrorSchema.nullable().optional(),
2761
- result: CentrifugoPresenceResultSchema.nullable().optional()
2762
- });
2763
-
2764
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts
2765
- import { z as z43 } from "zod";
2766
- var CentrifugoPresenceStatsRequestRequestSchema = z43.object({
2767
- channel: z43.string()
2768
- });
2769
-
2770
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts
2771
- import { z as z45 } from "zod";
2772
-
2773
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts
2774
- import { z as z44 } from "zod";
2775
- var CentrifugoPresenceStatsResultSchema = z44.object({
2776
- num_clients: z44.number().int(),
2777
- num_users: z44.number().int()
2778
- });
2779
-
2780
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts
2781
- var CentrifugoPresenceStatsResponseSchema = z45.object({
2782
- error: CentrifugoErrorSchema.nullable().optional(),
2783
- result: CentrifugoPresenceStatsResultSchema.nullable().optional()
2784
- });
2785
-
2786
- // src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts
2787
- import { z as z47 } from "zod";
2788
-
2789
- // src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelStats.schema.ts
2790
- import { z as z46 } from "zod";
2791
- var ChannelStatsSchema = z46.object({
2792
- channel: z46.string(),
2793
- total: z46.number().int(),
2794
- successful: z46.number().int(),
2795
- failed: z46.number().int(),
2796
- avg_duration_ms: z46.number(),
2797
- avg_acks: z46.number(),
2798
- last_activity_at: z46.string().nullable()
2799
- });
2800
-
2801
- // src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts
2802
- var ChannelListSchema = z47.object({
2803
- channels: z47.array(ChannelStatsSchema),
2804
- total_channels: z47.number().int()
2805
- });
2806
-
2807
2400
  // src/_api/generated/cfg_centrifugo/_utils/schemas/ConnectionTokenResponse.schema.ts
2808
- import { z as z48 } from "zod";
2809
- var ConnectionTokenResponseSchema = z48.object({
2810
- token: z48.string(),
2811
- centrifugo_url: z48.string(),
2812
- expires_at: z48.string(),
2813
- channels: z48.array(z48.string())
2814
- });
2815
-
2816
- // src/_api/generated/cfg_centrifugo/_utils/schemas/ManualAckRequestRequest.schema.ts
2817
- import { z as z49 } from "zod";
2818
- var ManualAckRequestRequestSchema = z49.object({
2819
- message_id: z49.string(),
2820
- client_id: z49.string()
2821
- });
2822
-
2823
- // src/_api/generated/cfg_centrifugo/_utils/schemas/ManualAckResponse.schema.ts
2824
- import { z as z50 } from "zod";
2825
- var ManualAckResponseSchema = z50.object({
2826
- success: z50.boolean(),
2827
- message_id: z50.string(),
2828
- error: z50.string().nullable().optional()
2829
- });
2830
-
2831
- // src/_api/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts
2832
- import { z as z52 } from "zod";
2833
-
2834
- // src/_api/generated/cfg_centrifugo/_utils/schemas/Publish.schema.ts
2835
- import { z as z51 } from "zod";
2836
- var PublishSchema = z51.object({
2837
- message_id: z51.string(),
2838
- channel: z51.string(),
2839
- status: z51.string(),
2840
- wait_for_ack: z51.boolean(),
2841
- acks_received: z51.number().int(),
2842
- acks_expected: z51.number().int().nullable(),
2843
- duration_ms: z51.number().nullable(),
2844
- created_at: z51.string().datetime({ offset: true }),
2845
- completed_at: z51.string().datetime({ offset: true }).nullable(),
2846
- error_code: z51.string().nullable(),
2847
- error_message: z51.string().nullable()
2848
- });
2849
-
2850
- // src/_api/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts
2851
- var PaginatedPublishListSchema = z52.object({
2852
- count: z52.number().int(),
2853
- page: z52.number().int(),
2854
- pages: z52.number().int(),
2855
- page_size: z52.number().int(),
2856
- has_next: z52.boolean(),
2857
- has_previous: z52.boolean(),
2858
- next_page: z52.number().int().nullable().optional(),
2859
- previous_page: z52.number().int().nullable().optional(),
2860
- results: z52.array(PublishSchema)
2861
- });
2862
-
2863
- // src/_api/generated/cfg_centrifugo/_utils/schemas/PublishTestRequestRequest.schema.ts
2864
- import { z as z53 } from "zod";
2865
- var PublishTestRequestRequestSchema = z53.object({
2866
- channel: z53.string(),
2867
- data: z53.record(z53.string(), z53.any()),
2868
- wait_for_ack: z53.boolean().optional(),
2869
- ack_timeout: z53.number().int().min(1).max(60).optional()
2870
- });
2871
-
2872
- // src/_api/generated/cfg_centrifugo/_utils/schemas/PublishTestResponse.schema.ts
2873
- import { z as z54 } from "zod";
2874
- var PublishTestResponseSchema = z54.object({
2875
- success: z54.boolean(),
2876
- message_id: z54.string(),
2877
- channel: z54.string(),
2878
- acks_received: z54.number().int().optional(),
2879
- delivered: z54.boolean().optional(),
2880
- error: z54.string().nullable().optional()
2881
- });
2882
-
2883
- // src/_api/generated/cfg_centrifugo/_utils/schemas/TimelineItem.schema.ts
2884
- import { z as z55 } from "zod";
2885
- var TimelineItemSchema = z55.object({
2886
- timestamp: z55.string(),
2887
- count: z55.number().int(),
2888
- successful: z55.number().int(),
2889
- failed: z55.number().int(),
2890
- timeout: z55.number().int()
2891
- });
2892
-
2893
- // src/_api/generated/cfg_centrifugo/_utils/schemas/TimelineResponse.schema.ts
2894
- import { z as z56 } from "zod";
2895
- var TimelineResponseSchema = z56.object({
2896
- timeline: z56.array(TimelineItemSchema),
2897
- period_hours: z56.number().int(),
2898
- interval: z56.string()
2401
+ import { z as z22 } from "zod";
2402
+ var ConnectionTokenResponseSchema = z22.object({
2403
+ token: z22.string(),
2404
+ centrifugo_url: z22.string(),
2405
+ expires_at: z22.string(),
2406
+ channels: z22.array(z22.string())
2899
2407
  });
2900
2408
 
2901
- // src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_admin_api.ts
2902
- import { consola as consola5 } from "consola";
2903
-
2904
2409
  // src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_auth.ts
2905
- import { consola as consola6 } from "consola";
2906
-
2907
- // src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_monitoring.ts
2908
- import { consola as consola7 } from "consola";
2909
-
2910
- // src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_testing.ts
2911
- import { consola as consola8 } from "consola";
2410
+ import { consola as consola5 } from "consola";
2912
2411
 
2913
2412
  // src/_api/generated/cfg_centrifugo/index.ts
2914
2413
  var TOKEN_KEY2 = "auth_token";
@@ -2945,10 +2444,7 @@ var API2 = class {
2945
2444
  tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
2946
2445
  });
2947
2446
  this._injectAuthHeader();
2948
- this.centrifugo_admin_api = this._client.centrifugo_admin_api;
2949
2447
  this.centrifugo_auth = this._client.centrifugo_auth;
2950
- this.centrifugo_monitoring = this._client.centrifugo_monitoring;
2951
- this.centrifugo_testing = this._client.centrifugo_testing;
2952
2448
  }
2953
2449
  static {
2954
2450
  __name(this, "API");
@@ -2965,10 +2461,7 @@ var API2 = class {
2965
2461
  tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
2966
2462
  });
2967
2463
  this._injectAuthHeader();
2968
- this.centrifugo_admin_api = this._client.centrifugo_admin_api;
2969
2464
  this.centrifugo_auth = this._client.centrifugo_auth;
2970
- this.centrifugo_monitoring = this._client.centrifugo_monitoring;
2971
- this.centrifugo_testing = this._client.centrifugo_testing;
2972
2465
  }
2973
2466
  _injectAuthHeader() {
2974
2467
  const originalRequest = this._client.request.bind(this._client);
@@ -3713,43 +3206,47 @@ var APIClient3 = class {
3713
3206
  if (error instanceof APIError3) {
3714
3207
  throw error;
3715
3208
  }
3716
- const isCORSError = error instanceof TypeError && (error.message.toLowerCase().includes("cors") || error.message.toLowerCase().includes("failed to fetch") || error.message.toLowerCase().includes("network request failed"));
3209
+ let possiblyCors = false;
3210
+ if (error instanceof TypeError && typeof window !== "undefined") {
3211
+ try {
3212
+ const isCrossOrigin = (() => {
3213
+ try {
3214
+ return new URL(url).origin !== window.location.origin;
3215
+ } catch {
3216
+ return false;
3217
+ }
3218
+ })();
3219
+ if (isCrossOrigin) {
3220
+ const entries = performance.getEntriesByName(url, "resource");
3221
+ if (entries.length > 0) {
3222
+ const last = entries[entries.length - 1];
3223
+ possiblyCors = "responseStatus" in last && last.responseStatus === 0;
3224
+ }
3225
+ }
3226
+ } catch {
3227
+ }
3228
+ }
3717
3229
  if (this.logger) {
3718
- if (isCORSError) {
3719
- this.logger.error(`\u{1F6AB} CORS Error: ${method} ${url}`);
3720
- this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
3721
- this.logger.error(` \u2192 Configure security_domains parameter on the server`);
3722
- } else {
3723
- this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
3724
- this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
3230
+ this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
3231
+ this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
3232
+ if (possiblyCors) {
3233
+ this.logger.error(` \u2192 Possibly blocked by CORS policy (configure CORS on the server)`);
3725
3234
  }
3726
3235
  }
3727
3236
  if (typeof window !== "undefined") {
3728
3237
  try {
3729
- if (isCORSError) {
3730
- window.dispatchEvent(new CustomEvent("cors-error", {
3731
- detail: {
3732
- url,
3733
- method,
3734
- error: error instanceof Error ? error.message : String(error),
3735
- timestamp: /* @__PURE__ */ new Date()
3736
- },
3737
- bubbles: true,
3738
- cancelable: false
3739
- }));
3740
- } else {
3741
- window.dispatchEvent(new CustomEvent("network-error", {
3742
- detail: {
3743
- url,
3744
- method,
3745
- error: error instanceof Error ? error.message : String(error),
3746
- timestamp: /* @__PURE__ */ new Date()
3747
- },
3748
- bubbles: true,
3749
- cancelable: false
3750
- }));
3751
- }
3752
- } catch (eventError) {
3238
+ window.dispatchEvent(new CustomEvent("network-error", {
3239
+ detail: {
3240
+ url,
3241
+ method,
3242
+ error: error instanceof Error ? error.message : String(error),
3243
+ possibly_cors: possiblyCors,
3244
+ timestamp: /* @__PURE__ */ new Date()
3245
+ },
3246
+ bubbles: true,
3247
+ cancelable: false
3248
+ }));
3249
+ } catch {
3753
3250
  }
3754
3251
  }
3755
3252
  const networkError = error instanceof Error ? new NetworkError3(error.message, url, error) : new NetworkError3("Unknown error", url);
@@ -3830,154 +3327,154 @@ var DeviceListStatus = /* @__PURE__ */ ((DeviceListStatus2) => {
3830
3327
  })(DeviceListStatus || {});
3831
3328
 
3832
3329
  // src/_api/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateRequest.schema.ts
3833
- import { z as z57 } from "zod";
3834
- var BackupCodesRegenerateRequestSchema = z57.object({
3835
- code: z57.string().min(6).max(6)
3330
+ import { z as z23 } from "zod";
3331
+ var BackupCodesRegenerateRequestSchema = z23.object({
3332
+ code: z23.string().min(6).max(6)
3836
3333
  });
3837
3334
 
3838
3335
  // src/_api/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateResponse.schema.ts
3839
- import { z as z58 } from "zod";
3840
- var BackupCodesRegenerateResponseSchema = z58.object({
3841
- backup_codes: z58.array(z58.string()),
3842
- warning: z58.string()
3336
+ import { z as z24 } from "zod";
3337
+ var BackupCodesRegenerateResponseSchema = z24.object({
3338
+ backup_codes: z24.array(z24.string()),
3339
+ warning: z24.string()
3843
3340
  });
3844
3341
 
3845
3342
  // src/_api/generated/cfg_totp/_utils/schemas/BackupCodesStatus.schema.ts
3846
- import { z as z59 } from "zod";
3847
- var BackupCodesStatusSchema = z59.object({
3848
- remaining_count: z59.number().int(),
3849
- total_generated: z59.number().int(),
3850
- warning: z59.string().nullable().optional()
3343
+ import { z as z25 } from "zod";
3344
+ var BackupCodesStatusSchema = z25.object({
3345
+ remaining_count: z25.number().int(),
3346
+ total_generated: z25.number().int(),
3347
+ warning: z25.string().nullable().optional()
3851
3348
  });
3852
3349
 
3853
3350
  // src/_api/generated/cfg_totp/_utils/schemas/ConfirmSetupRequest.schema.ts
3854
- import { z as z60 } from "zod";
3855
- var ConfirmSetupRequestSchema = z60.object({
3856
- device_id: z60.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
3857
- code: z60.string().min(6).max(6)
3351
+ import { z as z26 } from "zod";
3352
+ var ConfirmSetupRequestSchema = z26.object({
3353
+ device_id: z26.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
3354
+ code: z26.string().min(6).max(6)
3858
3355
  });
3859
3356
 
3860
3357
  // src/_api/generated/cfg_totp/_utils/schemas/ConfirmSetupResponse.schema.ts
3861
- import { z as z61 } from "zod";
3862
- var ConfirmSetupResponseSchema = z61.object({
3863
- message: z61.string(),
3864
- backup_codes: z61.array(z61.string()),
3865
- backup_codes_warning: z61.string()
3358
+ import { z as z27 } from "zod";
3359
+ var ConfirmSetupResponseSchema = z27.object({
3360
+ message: z27.string(),
3361
+ backup_codes: z27.array(z27.string()),
3362
+ backup_codes_warning: z27.string()
3866
3363
  });
3867
3364
 
3868
3365
  // src/_api/generated/cfg_totp/_utils/schemas/DeviceList.schema.ts
3869
- import { z as z62 } from "zod";
3870
- var DeviceListSchema = z62.object({
3871
- id: z62.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
3872
- name: z62.string(),
3873
- is_primary: z62.boolean(),
3874
- status: z62.nativeEnum(DeviceListStatus),
3875
- created_at: z62.string().datetime({ offset: true }),
3876
- confirmed_at: z62.string().datetime({ offset: true }).nullable(),
3877
- last_used_at: z62.string().datetime({ offset: true }).nullable()
3366
+ import { z as z28 } from "zod";
3367
+ var DeviceListSchema = z28.object({
3368
+ id: z28.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
3369
+ name: z28.string(),
3370
+ is_primary: z28.boolean(),
3371
+ status: z28.nativeEnum(DeviceListStatus),
3372
+ created_at: z28.string().datetime({ offset: true }),
3373
+ confirmed_at: z28.string().datetime({ offset: true }).nullable(),
3374
+ last_used_at: z28.string().datetime({ offset: true }).nullable()
3878
3375
  });
3879
3376
 
3880
3377
  // src/_api/generated/cfg_totp/_utils/schemas/DeviceListResponse.schema.ts
3881
- import { z as z63 } from "zod";
3882
- var DeviceListResponseSchema = z63.object({
3883
- devices: z63.array(DeviceListSchema),
3884
- has_2fa_enabled: z63.boolean()
3378
+ import { z as z29 } from "zod";
3379
+ var DeviceListResponseSchema = z29.object({
3380
+ devices: z29.array(DeviceListSchema),
3381
+ has_2fa_enabled: z29.boolean()
3885
3382
  });
3886
3383
 
3887
3384
  // src/_api/generated/cfg_totp/_utils/schemas/DisableRequest.schema.ts
3888
- import { z as z64 } from "zod";
3889
- var DisableRequestSchema = z64.object({
3890
- code: z64.string().min(6).max(6)
3385
+ import { z as z30 } from "zod";
3386
+ var DisableRequestSchema = z30.object({
3387
+ code: z30.string().min(6).max(6)
3891
3388
  });
3892
3389
 
3893
3390
  // src/_api/generated/cfg_totp/_utils/schemas/PaginatedDeviceListResponseList.schema.ts
3894
- import { z as z65 } from "zod";
3895
- var PaginatedDeviceListResponseListSchema = z65.object({
3896
- count: z65.number().int(),
3897
- page: z65.number().int(),
3898
- pages: z65.number().int(),
3899
- page_size: z65.number().int(),
3900
- has_next: z65.boolean(),
3901
- has_previous: z65.boolean(),
3902
- next_page: z65.number().int().nullable().optional(),
3903
- previous_page: z65.number().int().nullable().optional(),
3904
- results: z65.array(DeviceListResponseSchema)
3391
+ import { z as z31 } from "zod";
3392
+ var PaginatedDeviceListResponseListSchema = z31.object({
3393
+ count: z31.number().int(),
3394
+ page: z31.number().int(),
3395
+ pages: z31.number().int(),
3396
+ page_size: z31.number().int(),
3397
+ has_next: z31.boolean(),
3398
+ has_previous: z31.boolean(),
3399
+ next_page: z31.number().int().nullable().optional(),
3400
+ previous_page: z31.number().int().nullable().optional(),
3401
+ results: z31.array(DeviceListResponseSchema)
3905
3402
  });
3906
3403
 
3907
3404
  // src/_api/generated/cfg_totp/_utils/schemas/SetupRequest.schema.ts
3908
- import { z as z66 } from "zod";
3909
- var SetupRequestSchema = z66.object({
3910
- device_name: z66.string().min(1).max(100).optional()
3405
+ import { z as z32 } from "zod";
3406
+ var SetupRequestSchema = z32.object({
3407
+ device_name: z32.string().min(1).max(100).optional()
3911
3408
  });
3912
3409
 
3913
3410
  // src/_api/generated/cfg_totp/_utils/schemas/SetupResponse.schema.ts
3914
- import { z as z67 } from "zod";
3915
- var SetupResponseSchema = z67.object({
3916
- device_id: z67.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
3917
- secret: z67.string(),
3918
- provisioning_uri: z67.string(),
3919
- qr_code_base64: z67.string(),
3920
- expires_in: z67.number().int()
3411
+ import { z as z33 } from "zod";
3412
+ var SetupResponseSchema = z33.object({
3413
+ device_id: z33.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
3414
+ secret: z33.string(),
3415
+ provisioning_uri: z33.string(),
3416
+ qr_code_base64: z33.string(),
3417
+ expires_in: z33.number().int()
3921
3418
  });
3922
3419
 
3923
3420
  // src/_api/generated/cfg_totp/_utils/schemas/TotpVerifyUser.schema.ts
3924
- import { z as z68 } from "zod";
3925
- var TotpVerifyUserSchema = z68.object({
3926
- id: z68.number().int(),
3927
- email: z68.email(),
3928
- first_name: z68.string().max(50).optional(),
3929
- last_name: z68.string().max(50).optional(),
3930
- full_name: z68.string(),
3931
- initials: z68.string(),
3932
- display_username: z68.string(),
3933
- company: z68.string().max(100).optional(),
3934
- phone: z68.string().max(20).optional(),
3935
- position: z68.string().max(100).optional(),
3936
- language: z68.string().max(10).optional(),
3937
- avatar: z68.string().nullable(),
3938
- is_staff: z68.boolean(),
3939
- is_superuser: z68.boolean(),
3940
- date_joined: z68.string().datetime({ offset: true }),
3941
- last_login: z68.string().datetime({ offset: true }).nullable(),
3942
- unanswered_messages_count: z68.number().int()
3421
+ import { z as z34 } from "zod";
3422
+ var TotpVerifyUserSchema = z34.object({
3423
+ id: z34.number().int(),
3424
+ email: z34.email(),
3425
+ first_name: z34.string().max(50).optional(),
3426
+ last_name: z34.string().max(50).optional(),
3427
+ full_name: z34.string(),
3428
+ initials: z34.string(),
3429
+ display_username: z34.string(),
3430
+ company: z34.string().max(100).optional(),
3431
+ phone: z34.string().max(20).optional(),
3432
+ position: z34.string().max(100).optional(),
3433
+ language: z34.string().max(10).optional(),
3434
+ avatar: z34.string().nullable(),
3435
+ is_staff: z34.boolean(),
3436
+ is_superuser: z34.boolean(),
3437
+ date_joined: z34.string().datetime({ offset: true }),
3438
+ last_login: z34.string().datetime({ offset: true }).nullable(),
3439
+ unanswered_messages_count: z34.number().int()
3943
3440
  });
3944
3441
 
3945
3442
  // src/_api/generated/cfg_totp/_utils/schemas/VerifyBackupRequest.schema.ts
3946
- import { z as z69 } from "zod";
3947
- var VerifyBackupRequestSchema = z69.object({
3948
- session_id: z69.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
3949
- backup_code: z69.string().min(8).max(8)
3443
+ import { z as z35 } from "zod";
3444
+ var VerifyBackupRequestSchema = z35.object({
3445
+ session_id: z35.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
3446
+ backup_code: z35.string().min(8).max(8)
3950
3447
  });
3951
3448
 
3952
3449
  // src/_api/generated/cfg_totp/_utils/schemas/VerifyRequest.schema.ts
3953
- import { z as z70 } from "zod";
3954
- var VerifyRequestSchema = z70.object({
3955
- session_id: z70.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
3956
- code: z70.string().min(6).max(6)
3450
+ import { z as z36 } from "zod";
3451
+ var VerifyRequestSchema = z36.object({
3452
+ session_id: z36.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
3453
+ code: z36.string().min(6).max(6)
3957
3454
  });
3958
3455
 
3959
3456
  // src/_api/generated/cfg_totp/_utils/schemas/VerifyResponse.schema.ts
3960
- import { z as z71 } from "zod";
3961
- var VerifyResponseSchema = z71.object({
3962
- message: z71.string(),
3963
- access_token: z71.string(),
3964
- refresh_token: z71.string(),
3457
+ import { z as z37 } from "zod";
3458
+ var VerifyResponseSchema = z37.object({
3459
+ message: z37.string(),
3460
+ access_token: z37.string(),
3461
+ refresh_token: z37.string(),
3965
3462
  user: TotpVerifyUserSchema,
3966
- remaining_backup_codes: z71.number().int().optional(),
3967
- warning: z71.string().optional()
3463
+ remaining_backup_codes: z37.number().int().optional(),
3464
+ warning: z37.string().optional()
3968
3465
  });
3969
3466
 
3970
3467
  // src/_api/generated/cfg_totp/_utils/fetchers/totp__backup_codes.ts
3971
- import { consola as consola9 } from "consola";
3468
+ import { consola as consola6 } from "consola";
3972
3469
 
3973
3470
  // src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_management.ts
3974
- import { consola as consola10 } from "consola";
3471
+ import { consola as consola7 } from "consola";
3975
3472
 
3976
3473
  // src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_setup.ts
3977
- import { consola as consola11 } from "consola";
3474
+ import { consola as consola8 } from "consola";
3978
3475
 
3979
3476
  // src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_verification.ts
3980
- import { consola as consola12 } from "consola";
3477
+ import { consola as consola9 } from "consola";
3981
3478
 
3982
3479
  // src/_api/generated/cfg_totp/index.ts
3983
3480
  var TOKEN_KEY3 = "auth_token";
@@ -4211,34 +3708,25 @@ function useCreateAccountsOtpVerifyCreate() {
4211
3708
  }
4212
3709
  __name(useCreateAccountsOtpVerifyCreate, "useCreateAccountsOtpVerifyCreate");
4213
3710
 
4214
- // src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_admin_api.ts
4215
- import { useSWRConfig as useSWRConfig5 } from "swr";
4216
-
4217
3711
  // src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_auth.ts
4218
3712
  import useSWR3 from "swr";
4219
3713
 
4220
- // src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_monitoring.ts
4221
- import useSWR4 from "swr";
4222
-
4223
- // src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_testing.ts
4224
- import { useSWRConfig as useSWRConfig6 } from "swr";
4225
-
4226
3714
  // src/_api/generated/cfg_totp/_utils/hooks/totp__backup_codes.ts
4227
- import useSWR5 from "swr";
4228
- import { useSWRConfig as useSWRConfig7 } from "swr";
3715
+ import useSWR4 from "swr";
3716
+ import { useSWRConfig as useSWRConfig5 } from "swr";
4229
3717
 
4230
3718
  // src/_api/generated/cfg_totp/_utils/hooks/totp__totp_management.ts
4231
- import useSWR6 from "swr";
4232
- import { useSWRConfig as useSWRConfig8 } from "swr";
3719
+ import useSWR5 from "swr";
3720
+ import { useSWRConfig as useSWRConfig6 } from "swr";
4233
3721
 
4234
3722
  // src/_api/generated/cfg_totp/_utils/hooks/totp__totp_setup.ts
4235
- import { useSWRConfig as useSWRConfig9 } from "swr";
3723
+ import { useSWRConfig as useSWRConfig7 } from "swr";
4236
3724
 
4237
3725
  // src/_api/generated/cfg_totp/_utils/hooks/totp__totp_verification.ts
4238
- import { useSWRConfig as useSWRConfig10 } from "swr";
3726
+ import { useSWRConfig as useSWRConfig8 } from "swr";
4239
3727
 
4240
3728
  // src/_api/generated/cfg_totp/_utils/hooks/totp.ts
4241
- import { useSWRConfig as useSWRConfig11 } from "swr";
3729
+ import { useSWRConfig as useSWRConfig9 } from "swr";
4242
3730
 
4243
3731
  // src/clients.ts
4244
3732
  var isStaticBuild2 = process.env.NEXT_PUBLIC_STATIC_BUILD === "true";