@djangocfg/api 2.1.231 → 2.1.233

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 +25 -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/index.mjs CHANGED
@@ -801,43 +801,47 @@ var APIClient = class {
801
801
  if (error instanceof APIError) {
802
802
  throw error;
803
803
  }
804
- const isCORSError = error instanceof TypeError && (error.message.toLowerCase().includes("cors") || error.message.toLowerCase().includes("failed to fetch") || error.message.toLowerCase().includes("network request failed"));
804
+ let possiblyCors = false;
805
+ if (error instanceof TypeError && typeof window !== "undefined") {
806
+ try {
807
+ const isCrossOrigin = (() => {
808
+ try {
809
+ return new URL(url).origin !== window.location.origin;
810
+ } catch {
811
+ return false;
812
+ }
813
+ })();
814
+ if (isCrossOrigin) {
815
+ const entries = performance.getEntriesByName(url, "resource");
816
+ if (entries.length > 0) {
817
+ const last = entries[entries.length - 1];
818
+ possiblyCors = "responseStatus" in last && last.responseStatus === 0;
819
+ }
820
+ }
821
+ } catch {
822
+ }
823
+ }
805
824
  if (this.logger) {
806
- if (isCORSError) {
807
- this.logger.error(`\u{1F6AB} CORS Error: ${method} ${url}`);
808
- this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
809
- this.logger.error(` \u2192 Configure security_domains parameter on the server`);
810
- } else {
811
- this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
812
- this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
825
+ this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
826
+ this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
827
+ if (possiblyCors) {
828
+ this.logger.error(` \u2192 Possibly blocked by CORS policy (configure CORS on the server)`);
813
829
  }
814
830
  }
815
831
  if (typeof window !== "undefined") {
816
832
  try {
817
- if (isCORSError) {
818
- window.dispatchEvent(new CustomEvent("cors-error", {
819
- detail: {
820
- url,
821
- method,
822
- error: error instanceof Error ? error.message : String(error),
823
- timestamp: /* @__PURE__ */ new Date()
824
- },
825
- bubbles: true,
826
- cancelable: false
827
- }));
828
- } else {
829
- window.dispatchEvent(new CustomEvent("network-error", {
830
- detail: {
831
- url,
832
- method,
833
- error: error instanceof Error ? error.message : String(error),
834
- timestamp: /* @__PURE__ */ new Date()
835
- },
836
- bubbles: true,
837
- cancelable: false
838
- }));
839
- }
840
- } catch (eventError) {
833
+ window.dispatchEvent(new CustomEvent("network-error", {
834
+ detail: {
835
+ url,
836
+ method,
837
+ error: error instanceof Error ? error.message : String(error),
838
+ possibly_cors: possiblyCors,
839
+ timestamp: /* @__PURE__ */ new Date()
840
+ },
841
+ bubbles: true,
842
+ cancelable: false
843
+ }));
844
+ } catch {
841
845
  }
842
846
  }
843
847
  const networkError = error instanceof Error ? new NetworkError(error.message, url, error) : new NetworkError("Unknown error", url);
@@ -2085,71 +2089,6 @@ var API = class {
2085
2089
  };
2086
2090
  var cfg_accounts_default = API;
2087
2091
 
2088
- // src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/client.ts
2089
- var CentrifugoAdminApi = class {
2090
- static {
2091
- __name(this, "CentrifugoAdminApi");
2092
- }
2093
- constructor(client) {
2094
- this.client = client;
2095
- }
2096
- /**
2097
- * Get connection token for dashboard
2098
- *
2099
- * Returns JWT token and config for WebSocket connection to Centrifugo.
2100
- */
2101
- async centrifugoServerAuthTokenCreate() {
2102
- const response = await this.client.request("POST", "/cfg/centrifugo/server/auth/token/");
2103
- return response;
2104
- }
2105
- /**
2106
- * List active channels
2107
- *
2108
- * Returns list of active channels with optional pattern filter.
2109
- */
2110
- async centrifugoServerChannelsCreate(data) {
2111
- const response = await this.client.request("POST", "/cfg/centrifugo/server/channels/", { body: data });
2112
- return response;
2113
- }
2114
- /**
2115
- * Get channel history
2116
- *
2117
- * Returns message history for a channel.
2118
- */
2119
- async centrifugoServerHistoryCreate(data) {
2120
- const response = await this.client.request("POST", "/cfg/centrifugo/server/history/", { body: data });
2121
- return response;
2122
- }
2123
- /**
2124
- * Get Centrifugo server info
2125
- *
2126
- * Returns server information including node count, version, and uptime.
2127
- */
2128
- async centrifugoServerInfoCreate() {
2129
- const response = await this.client.request("POST", "/cfg/centrifugo/server/info/");
2130
- return response;
2131
- }
2132
- /**
2133
- * Get channel presence
2134
- *
2135
- * Returns list of clients currently subscribed to a channel.
2136
- */
2137
- async centrifugoServerPresenceCreate(data) {
2138
- const response = await this.client.request("POST", "/cfg/centrifugo/server/presence/", { body: data });
2139
- return response;
2140
- }
2141
- /**
2142
- * Get channel presence statistics
2143
- *
2144
- * Returns quick statistics about channel presence (num_clients,
2145
- * num_users).
2146
- */
2147
- async centrifugoServerPresenceStatsCreate(data) {
2148
- const response = await this.client.request("POST", "/cfg/centrifugo/server/presence-stats/", { body: data });
2149
- return response;
2150
- }
2151
- };
2152
-
2153
2092
  // src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_auth/client.ts
2154
2093
  var CentrifugoAuth = class {
2155
2094
  static {
@@ -2171,130 +2110,6 @@ var CentrifugoAuth = class {
2171
2110
  }
2172
2111
  };
2173
2112
 
2174
- // src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/client.ts
2175
- var CentrifugoMonitoring = class {
2176
- static {
2177
- __name(this, "CentrifugoMonitoring");
2178
- }
2179
- constructor(client) {
2180
- this.client = client;
2181
- }
2182
- /**
2183
- * Get channel statistics
2184
- *
2185
- * Returns statistics grouped by channel.
2186
- */
2187
- async centrifugoMonitorChannelsRetrieve(...args) {
2188
- const isParamsObject = args.length === 1 && typeof args[0] === "object" && args[0] !== null && !Array.isArray(args[0]);
2189
- let params;
2190
- if (isParamsObject) {
2191
- params = args[0];
2192
- } else {
2193
- params = { hours: args[0] };
2194
- }
2195
- const response = await this.client.request("GET", "/cfg/centrifugo/monitor/channels/", { params });
2196
- return response;
2197
- }
2198
- /**
2199
- * Get Centrifugo health status
2200
- *
2201
- * Returns the current health status of the Centrifugo client.
2202
- */
2203
- async centrifugoMonitorHealthRetrieve() {
2204
- const response = await this.client.request("GET", "/cfg/centrifugo/monitor/health/");
2205
- return response;
2206
- }
2207
- /**
2208
- * Get overview statistics
2209
- *
2210
- * Returns overview statistics for Centrifugo publishes.
2211
- */
2212
- async centrifugoMonitorOverviewRetrieve(...args) {
2213
- const isParamsObject = args.length === 1 && typeof args[0] === "object" && args[0] !== null && !Array.isArray(args[0]);
2214
- let params;
2215
- if (isParamsObject) {
2216
- params = args[0];
2217
- } else {
2218
- params = { hours: args[0] };
2219
- }
2220
- const response = await this.client.request("GET", "/cfg/centrifugo/monitor/overview/", { params });
2221
- return response;
2222
- }
2223
- /**
2224
- * Get recent publishes
2225
- *
2226
- * Returns a paginated list of recent Centrifugo publishes with their
2227
- * details. Uses standard DRF pagination.
2228
- */
2229
- async centrifugoMonitorPublishesList(...args) {
2230
- const isParamsObject = args.length === 1 && typeof args[0] === "object" && args[0] !== null && !Array.isArray(args[0]);
2231
- let params;
2232
- if (isParamsObject) {
2233
- params = args[0];
2234
- } else {
2235
- params = { channel: args[0], ordering: args[1], page: args[2], page_size: args[3], search: args[4], status: args[5] };
2236
- }
2237
- const response = await this.client.request("GET", "/cfg/centrifugo/monitor/publishes/", { params });
2238
- return response;
2239
- }
2240
- /**
2241
- * Get publish timeline
2242
- *
2243
- * Returns hourly or daily breakdown of publish counts for charts.
2244
- */
2245
- async centrifugoMonitorTimelineRetrieve(...args) {
2246
- const isParamsObject = args.length === 1 && typeof args[0] === "object" && args[0] !== null && !Array.isArray(args[0]);
2247
- let params;
2248
- if (isParamsObject) {
2249
- params = args[0];
2250
- } else {
2251
- params = { hours: args[0], interval: args[1] };
2252
- }
2253
- const response = await this.client.request("GET", "/cfg/centrifugo/monitor/timeline/", { params });
2254
- return response;
2255
- }
2256
- };
2257
-
2258
- // src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/client.ts
2259
- var CentrifugoTesting = class {
2260
- static {
2261
- __name(this, "CentrifugoTesting");
2262
- }
2263
- constructor(client) {
2264
- this.client = client;
2265
- }
2266
- /**
2267
- * Publish test message
2268
- *
2269
- * Publish test message to Centrifugo via wrapper with optional ACK
2270
- * tracking.
2271
- */
2272
- async publishTestCreate(data) {
2273
- const response = await this.client.request("POST", "/cfg/centrifugo/testing/publish-test/", { body: data });
2274
- return response;
2275
- }
2276
- /**
2277
- * Publish with database logging
2278
- *
2279
- * Publish message using CentrifugoClient with database logging. This will
2280
- * create CentrifugoLog records.
2281
- */
2282
- async publishWithLoggingCreate(data) {
2283
- const response = await this.client.request("POST", "/cfg/centrifugo/testing/publish-with-logging/", { body: data });
2284
- return response;
2285
- }
2286
- /**
2287
- * Send manual ACK
2288
- *
2289
- * Manually send ACK for a message to the wrapper. Pass message_id in
2290
- * request body.
2291
- */
2292
- async sendAckCreate(data) {
2293
- const response = await this.client.request("POST", "/cfg/centrifugo/testing/send-ack/", { body: data });
2294
- return response;
2295
- }
2296
- };
2297
-
2298
2113
  // src/_api/generated/cfg_centrifugo/http.ts
2299
2114
  var FetchAdapter2 = class {
2300
2115
  static {
@@ -2671,10 +2486,7 @@ var APIClient2 = class {
2671
2486
  if (options?.retryConfig !== void 0) {
2672
2487
  this.retryConfig = options.retryConfig;
2673
2488
  }
2674
- this.centrifugo_admin_api = new CentrifugoAdminApi(this);
2675
2489
  this.centrifugo_auth = new CentrifugoAuth(this);
2676
- this.centrifugo_monitoring = new CentrifugoMonitoring(this);
2677
- this.centrifugo_testing = new CentrifugoTesting(this);
2678
2490
  }
2679
2491
  static {
2680
2492
  __name(this, "APIClient");
@@ -2809,43 +2621,47 @@ var APIClient2 = class {
2809
2621
  if (error instanceof APIError2) {
2810
2622
  throw error;
2811
2623
  }
2812
- const isCORSError = error instanceof TypeError && (error.message.toLowerCase().includes("cors") || error.message.toLowerCase().includes("failed to fetch") || error.message.toLowerCase().includes("network request failed"));
2624
+ let possiblyCors = false;
2625
+ if (error instanceof TypeError && typeof window !== "undefined") {
2626
+ try {
2627
+ const isCrossOrigin = (() => {
2628
+ try {
2629
+ return new URL(url).origin !== window.location.origin;
2630
+ } catch {
2631
+ return false;
2632
+ }
2633
+ })();
2634
+ if (isCrossOrigin) {
2635
+ const entries = performance.getEntriesByName(url, "resource");
2636
+ if (entries.length > 0) {
2637
+ const last = entries[entries.length - 1];
2638
+ possiblyCors = "responseStatus" in last && last.responseStatus === 0;
2639
+ }
2640
+ }
2641
+ } catch {
2642
+ }
2643
+ }
2813
2644
  if (this.logger) {
2814
- if (isCORSError) {
2815
- this.logger.error(`\u{1F6AB} CORS Error: ${method} ${url}`);
2816
- this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
2817
- this.logger.error(` \u2192 Configure security_domains parameter on the server`);
2818
- } else {
2819
- this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
2820
- this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
2645
+ this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
2646
+ this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
2647
+ if (possiblyCors) {
2648
+ this.logger.error(` \u2192 Possibly blocked by CORS policy (configure CORS on the server)`);
2821
2649
  }
2822
2650
  }
2823
2651
  if (typeof window !== "undefined") {
2824
2652
  try {
2825
- if (isCORSError) {
2826
- window.dispatchEvent(new CustomEvent("cors-error", {
2827
- detail: {
2828
- url,
2829
- method,
2830
- error: error instanceof Error ? error.message : String(error),
2831
- timestamp: /* @__PURE__ */ new Date()
2832
- },
2833
- bubbles: true,
2834
- cancelable: false
2835
- }));
2836
- } else {
2837
- window.dispatchEvent(new CustomEvent("network-error", {
2838
- detail: {
2839
- url,
2840
- method,
2841
- error: error instanceof Error ? error.message : String(error),
2842
- timestamp: /* @__PURE__ */ new Date()
2843
- },
2844
- bubbles: true,
2845
- cancelable: false
2846
- }));
2847
- }
2848
- } catch (eventError) {
2653
+ window.dispatchEvent(new CustomEvent("network-error", {
2654
+ detail: {
2655
+ url,
2656
+ method,
2657
+ error: error instanceof Error ? error.message : String(error),
2658
+ possibly_cors: possiblyCors,
2659
+ timestamp: /* @__PURE__ */ new Date()
2660
+ },
2661
+ bubbles: true,
2662
+ cancelable: false
2663
+ }));
2664
+ } catch {
2849
2665
  }
2850
2666
  }
2851
2667
  const networkError = error instanceof Error ? new NetworkError2(error.message, url, error) : new NetworkError2("Unknown error", url);
@@ -2917,324 +2733,16 @@ var LocalStorageAdapter2 = class {
2917
2733
  }
2918
2734
  };
2919
2735
 
2920
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelInfo.schema.ts
2921
- import { z as z22 } from "zod";
2922
- var CentrifugoChannelInfoSchema = z22.object({
2923
- num_clients: z22.number().int()
2924
- });
2925
-
2926
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts
2927
- import { z as z23 } from "zod";
2928
- var CentrifugoChannelsRequestRequestSchema = z23.object({
2929
- pattern: z23.string().nullable().optional()
2930
- });
2931
-
2932
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts
2933
- import { z as z26 } from "zod";
2934
-
2935
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResult.schema.ts
2936
- import { z as z24 } from "zod";
2937
- var CentrifugoChannelsResultSchema = z24.object({
2938
- channels: z24.record(z24.string(), CentrifugoChannelInfoSchema)
2939
- });
2940
-
2941
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoError.schema.ts
2942
- import { z as z25 } from "zod";
2943
- var CentrifugoErrorSchema = z25.object({
2944
- code: z25.number().int().optional(),
2945
- message: z25.string().optional()
2946
- });
2947
-
2948
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts
2949
- var CentrifugoChannelsResponseSchema = z26.object({
2950
- error: CentrifugoErrorSchema.nullable().optional(),
2951
- result: CentrifugoChannelsResultSchema.nullable().optional()
2952
- });
2953
-
2954
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoClientInfo.schema.ts
2955
- import { z as z27 } from "zod";
2956
- var CentrifugoClientInfoSchema = z27.object({
2957
- user: z27.string(),
2958
- client: z27.string(),
2959
- conn_info: z27.record(z27.string(), z27.any()).nullable().optional(),
2960
- chan_info: z27.record(z27.string(), z27.any()).nullable().optional()
2961
- });
2962
-
2963
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHealthCheck.schema.ts
2964
- import { z as z28 } from "zod";
2965
- var CentrifugoHealthCheckSchema = z28.object({
2966
- status: z28.string(),
2967
- wrapper_url: z28.string(),
2968
- has_api_key: z28.boolean(),
2969
- timestamp: z28.string()
2970
- });
2971
-
2972
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts
2973
- import { z as z30 } from "zod";
2974
-
2975
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoStreamPosition.schema.ts
2976
- import { z as z29 } from "zod";
2977
- var CentrifugoStreamPositionSchema = z29.object({
2978
- offset: z29.number().int(),
2979
- epoch: z29.string()
2980
- });
2981
-
2982
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts
2983
- var CentrifugoHistoryRequestRequestSchema = z30.object({
2984
- channel: z30.string(),
2985
- limit: z30.number().int().nullable().optional(),
2986
- since: CentrifugoStreamPositionSchema.nullable().optional(),
2987
- reverse: z30.boolean().nullable().optional()
2988
- });
2989
-
2990
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts
2991
- import { z as z33 } from "zod";
2992
-
2993
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts
2994
- import { z as z32 } from "zod";
2995
-
2996
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPublication.schema.ts
2997
- import { z as z31 } from "zod";
2998
- var CentrifugoPublicationSchema = z31.object({
2999
- data: z31.record(z31.string(), z31.any()),
3000
- info: CentrifugoClientInfoSchema.nullable().optional(),
3001
- offset: z31.number().int(),
3002
- tags: z31.record(z31.string(), z31.any()).nullable().optional()
3003
- });
3004
-
3005
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts
3006
- var CentrifugoHistoryResultSchema = z32.object({
3007
- publications: z32.array(CentrifugoPublicationSchema),
3008
- epoch: z32.string(),
3009
- offset: z32.number().int()
3010
- });
3011
-
3012
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts
3013
- var CentrifugoHistoryResponseSchema = z33.object({
3014
- error: CentrifugoErrorSchema.nullable().optional(),
3015
- result: CentrifugoHistoryResultSchema.nullable().optional()
3016
- });
3017
-
3018
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts
3019
- import { z as z38 } from "zod";
3020
-
3021
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts
3022
- import { z as z37 } from "zod";
3023
-
3024
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts
3025
- import { z as z36 } from "zod";
3026
-
3027
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoMetrics.schema.ts
3028
- import { z as z34 } from "zod";
3029
- var CentrifugoMetricsSchema = z34.object({
3030
- interval: z34.number(),
3031
- items: z34.record(z34.string(), z34.number())
3032
- });
3033
-
3034
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoProcess.schema.ts
3035
- import { z as z35 } from "zod";
3036
- var CentrifugoProcessSchema = z35.object({
3037
- cpu: z35.number(),
3038
- rss: z35.number().int()
3039
- });
3040
-
3041
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts
3042
- var CentrifugoNodeInfoSchema = z36.object({
3043
- uid: z36.string(),
3044
- name: z36.string(),
3045
- version: z36.string(),
3046
- num_clients: z36.number().int(),
3047
- num_users: z36.number().int(),
3048
- num_channels: z36.number().int(),
3049
- uptime: z36.number().int(),
3050
- num_subs: z36.number().int(),
3051
- metrics: CentrifugoMetricsSchema.nullable().optional(),
3052
- process: CentrifugoProcessSchema.nullable().optional()
3053
- });
3054
-
3055
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts
3056
- var CentrifugoInfoResultSchema = z37.object({
3057
- nodes: z37.array(CentrifugoNodeInfoSchema)
3058
- });
3059
-
3060
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts
3061
- var CentrifugoInfoResponseSchema = z38.object({
3062
- error: CentrifugoErrorSchema.nullable().optional(),
3063
- result: CentrifugoInfoResultSchema.nullable().optional()
3064
- });
3065
-
3066
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoOverviewStats.schema.ts
3067
- import { z as z39 } from "zod";
3068
- var CentrifugoOverviewStatsSchema = z39.object({
3069
- total: z39.number().int(),
3070
- successful: z39.number().int(),
3071
- failed: z39.number().int(),
3072
- timeout: z39.number().int(),
3073
- success_rate: z39.number(),
3074
- avg_duration_ms: z39.number(),
3075
- avg_acks_received: z39.number(),
3076
- period_hours: z39.number().int()
3077
- });
3078
-
3079
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts
3080
- import { z as z40 } from "zod";
3081
- var CentrifugoPresenceRequestRequestSchema = z40.object({
3082
- channel: z40.string()
3083
- });
3084
-
3085
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts
3086
- import { z as z42 } from "zod";
3087
-
3088
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResult.schema.ts
3089
- import { z as z41 } from "zod";
3090
- var CentrifugoPresenceResultSchema = z41.object({
3091
- presence: z41.record(z41.string(), CentrifugoClientInfoSchema)
3092
- });
3093
-
3094
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts
3095
- var CentrifugoPresenceResponseSchema = z42.object({
3096
- error: CentrifugoErrorSchema.nullable().optional(),
3097
- result: CentrifugoPresenceResultSchema.nullable().optional()
3098
- });
3099
-
3100
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts
3101
- import { z as z43 } from "zod";
3102
- var CentrifugoPresenceStatsRequestRequestSchema = z43.object({
3103
- channel: z43.string()
3104
- });
3105
-
3106
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts
3107
- import { z as z45 } from "zod";
3108
-
3109
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts
3110
- import { z as z44 } from "zod";
3111
- var CentrifugoPresenceStatsResultSchema = z44.object({
3112
- num_clients: z44.number().int(),
3113
- num_users: z44.number().int()
3114
- });
3115
-
3116
- // src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts
3117
- var CentrifugoPresenceStatsResponseSchema = z45.object({
3118
- error: CentrifugoErrorSchema.nullable().optional(),
3119
- result: CentrifugoPresenceStatsResultSchema.nullable().optional()
3120
- });
3121
-
3122
- // src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts
3123
- import { z as z47 } from "zod";
3124
-
3125
- // src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelStats.schema.ts
3126
- import { z as z46 } from "zod";
3127
- var ChannelStatsSchema = z46.object({
3128
- channel: z46.string(),
3129
- total: z46.number().int(),
3130
- successful: z46.number().int(),
3131
- failed: z46.number().int(),
3132
- avg_duration_ms: z46.number(),
3133
- avg_acks: z46.number(),
3134
- last_activity_at: z46.string().nullable()
3135
- });
3136
-
3137
- // src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts
3138
- var ChannelListSchema = z47.object({
3139
- channels: z47.array(ChannelStatsSchema),
3140
- total_channels: z47.number().int()
3141
- });
3142
-
3143
2736
  // src/_api/generated/cfg_centrifugo/_utils/schemas/ConnectionTokenResponse.schema.ts
3144
- import { z as z48 } from "zod";
3145
- var ConnectionTokenResponseSchema = z48.object({
3146
- token: z48.string(),
3147
- centrifugo_url: z48.string(),
3148
- expires_at: z48.string(),
3149
- channels: z48.array(z48.string())
3150
- });
3151
-
3152
- // src/_api/generated/cfg_centrifugo/_utils/schemas/ManualAckRequestRequest.schema.ts
3153
- import { z as z49 } from "zod";
3154
- var ManualAckRequestRequestSchema = z49.object({
3155
- message_id: z49.string(),
3156
- client_id: z49.string()
3157
- });
3158
-
3159
- // src/_api/generated/cfg_centrifugo/_utils/schemas/ManualAckResponse.schema.ts
3160
- import { z as z50 } from "zod";
3161
- var ManualAckResponseSchema = z50.object({
3162
- success: z50.boolean(),
3163
- message_id: z50.string(),
3164
- error: z50.string().nullable().optional()
3165
- });
3166
-
3167
- // src/_api/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts
3168
- import { z as z52 } from "zod";
3169
-
3170
- // src/_api/generated/cfg_centrifugo/_utils/schemas/Publish.schema.ts
3171
- import { z as z51 } from "zod";
3172
- var PublishSchema = z51.object({
3173
- message_id: z51.string(),
3174
- channel: z51.string(),
3175
- status: z51.string(),
3176
- wait_for_ack: z51.boolean(),
3177
- acks_received: z51.number().int(),
3178
- acks_expected: z51.number().int().nullable(),
3179
- duration_ms: z51.number().nullable(),
3180
- created_at: z51.string().datetime({ offset: true }),
3181
- completed_at: z51.string().datetime({ offset: true }).nullable(),
3182
- error_code: z51.string().nullable(),
3183
- error_message: z51.string().nullable()
3184
- });
3185
-
3186
- // src/_api/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts
3187
- var PaginatedPublishListSchema = z52.object({
3188
- count: z52.number().int(),
3189
- page: z52.number().int(),
3190
- pages: z52.number().int(),
3191
- page_size: z52.number().int(),
3192
- has_next: z52.boolean(),
3193
- has_previous: z52.boolean(),
3194
- next_page: z52.number().int().nullable().optional(),
3195
- previous_page: z52.number().int().nullable().optional(),
3196
- results: z52.array(PublishSchema)
3197
- });
3198
-
3199
- // src/_api/generated/cfg_centrifugo/_utils/schemas/PublishTestRequestRequest.schema.ts
3200
- import { z as z53 } from "zod";
3201
- var PublishTestRequestRequestSchema = z53.object({
3202
- channel: z53.string(),
3203
- data: z53.record(z53.string(), z53.any()),
3204
- wait_for_ack: z53.boolean().optional(),
3205
- ack_timeout: z53.number().int().min(1).max(60).optional()
3206
- });
3207
-
3208
- // src/_api/generated/cfg_centrifugo/_utils/schemas/PublishTestResponse.schema.ts
3209
- import { z as z54 } from "zod";
3210
- var PublishTestResponseSchema = z54.object({
3211
- success: z54.boolean(),
3212
- message_id: z54.string(),
3213
- channel: z54.string(),
3214
- acks_received: z54.number().int().optional(),
3215
- delivered: z54.boolean().optional(),
3216
- error: z54.string().nullable().optional()
3217
- });
3218
-
3219
- // src/_api/generated/cfg_centrifugo/_utils/schemas/TimelineItem.schema.ts
3220
- import { z as z55 } from "zod";
3221
- var TimelineItemSchema = z55.object({
3222
- timestamp: z55.string(),
3223
- count: z55.number().int(),
3224
- successful: z55.number().int(),
3225
- failed: z55.number().int(),
3226
- timeout: z55.number().int()
3227
- });
3228
-
3229
- // src/_api/generated/cfg_centrifugo/_utils/schemas/TimelineResponse.schema.ts
3230
- import { z as z56 } from "zod";
3231
- var TimelineResponseSchema = z56.object({
3232
- timeline: z56.array(TimelineItemSchema),
3233
- period_hours: z56.number().int(),
3234
- interval: z56.string()
2737
+ import { z as z22 } from "zod";
2738
+ var ConnectionTokenResponseSchema = z22.object({
2739
+ token: z22.string(),
2740
+ centrifugo_url: z22.string(),
2741
+ expires_at: z22.string(),
2742
+ channels: z22.array(z22.string())
3235
2743
  });
3236
2744
 
3237
- // src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_admin_api.ts
2745
+ // src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_auth.ts
3238
2746
  import { consola as consola5 } from "consola";
3239
2747
 
3240
2748
  // src/_api/generated/cfg_centrifugo/api-instance.ts
@@ -3263,27 +2771,26 @@ function getAPIInstance2() {
3263
2771
  __name(getAPIInstance2, "getAPIInstance");
3264
2772
 
3265
2773
  // src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_auth.ts
3266
- import { consola as consola6 } from "consola";
3267
2774
  async function getCentrifugoAuthTokenRetrieve(client) {
3268
2775
  const api2 = client || getAPIInstance2();
3269
2776
  const response = await api2.centrifugo_auth.tokenRetrieve();
3270
2777
  try {
3271
2778
  return ConnectionTokenResponseSchema.parse(response);
3272
2779
  } catch (error) {
3273
- consola6.error("\u274C Zod Validation Failed");
3274
- consola6.box(`getCentrifugoAuthTokenRetrieve
2780
+ consola5.error("\u274C Zod Validation Failed");
2781
+ consola5.box(`getCentrifugoAuthTokenRetrieve
3275
2782
  Path: /cfg/centrifugo/auth/token/
3276
2783
  Method: GET`);
3277
2784
  if (error instanceof Error && "issues" in error && Array.isArray(error.issues)) {
3278
- consola6.error("Validation Issues:");
2785
+ consola5.error("Validation Issues:");
3279
2786
  error.issues.forEach((issue, index) => {
3280
- consola6.error(` ${index + 1}. ${issue.path.join(".") || "root"}`);
3281
- consola6.error(` \u251C\u2500 Message: ${issue.message}`);
3282
- if (issue.expected) consola6.error(` \u251C\u2500 Expected: ${issue.expected}`);
3283
- if (issue.received) consola6.error(` \u2514\u2500 Received: ${issue.received}`);
2787
+ consola5.error(` ${index + 1}. ${issue.path.join(".") || "root"}`);
2788
+ consola5.error(` \u251C\u2500 Message: ${issue.message}`);
2789
+ if (issue.expected) consola5.error(` \u251C\u2500 Expected: ${issue.expected}`);
2790
+ if (issue.received) consola5.error(` \u2514\u2500 Received: ${issue.received}`);
3284
2791
  });
3285
2792
  }
3286
- consola6.error("Response data:", response);
2793
+ consola5.error("Response data:", response);
3287
2794
  if (typeof window !== "undefined" && error instanceof Error && "issues" in error) {
3288
2795
  try {
3289
2796
  const event = new CustomEvent("zod-validation-error", {
@@ -3300,7 +2807,7 @@ Method: GET`);
3300
2807
  });
3301
2808
  window.dispatchEvent(event);
3302
2809
  } catch (eventError) {
3303
- consola6.warn("Failed to dispatch validation error event:", eventError);
2810
+ consola5.warn("Failed to dispatch validation error event:", eventError);
3304
2811
  }
3305
2812
  }
3306
2813
  throw error;
@@ -3308,12 +2815,6 @@ Method: GET`);
3308
2815
  }
3309
2816
  __name(getCentrifugoAuthTokenRetrieve, "getCentrifugoAuthTokenRetrieve");
3310
2817
 
3311
- // src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_monitoring.ts
3312
- import { consola as consola7 } from "consola";
3313
-
3314
- // src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_testing.ts
3315
- import { consola as consola8 } from "consola";
3316
-
3317
2818
  // src/_api/generated/cfg_centrifugo/index.ts
3318
2819
  var TOKEN_KEY2 = "auth_token";
3319
2820
  var REFRESH_TOKEN_KEY2 = "refresh_token";
@@ -3349,10 +2850,7 @@ var API2 = class {
3349
2850
  tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
3350
2851
  });
3351
2852
  this._injectAuthHeader();
3352
- this.centrifugo_admin_api = this._client.centrifugo_admin_api;
3353
2853
  this.centrifugo_auth = this._client.centrifugo_auth;
3354
- this.centrifugo_monitoring = this._client.centrifugo_monitoring;
3355
- this.centrifugo_testing = this._client.centrifugo_testing;
3356
2854
  }
3357
2855
  static {
3358
2856
  __name(this, "API");
@@ -3369,10 +2867,7 @@ var API2 = class {
3369
2867
  tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
3370
2868
  });
3371
2869
  this._injectAuthHeader();
3372
- this.centrifugo_admin_api = this._client.centrifugo_admin_api;
3373
2870
  this.centrifugo_auth = this._client.centrifugo_auth;
3374
- this.centrifugo_monitoring = this._client.centrifugo_monitoring;
3375
- this.centrifugo_testing = this._client.centrifugo_testing;
3376
2871
  }
3377
2872
  _injectAuthHeader() {
3378
2873
  const originalRequest = this._client.request.bind(this._client);