@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.
- package/README.md +25 -4
- package/dist/auth-server.cjs +45 -358
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +43 -356
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +223 -735
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.mjs +218 -730
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +313 -1568
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +211 -1932
- package/dist/clients.d.ts +211 -1932
- package/dist/clients.mjs +309 -1564
- package/dist/clients.mjs.map +1 -1
- package/dist/hooks.cjs +36 -32
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +76 -76
- package/dist/hooks.d.ts +76 -76
- package/dist/hooks.mjs +36 -32
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +88 -593
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +88 -88
- package/dist/index.d.ts +88 -88
- package/dist/index.mjs +88 -593
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/_api/generated/cfg_accounts/accounts/models.ts +34 -34
- package/src/_api/generated/cfg_accounts/accounts__oauth/models.ts +41 -41
- package/src/_api/generated/cfg_accounts/accounts__user_profile/models.ts +18 -18
- package/src/_api/generated/cfg_accounts/client.ts +39 -42
- package/src/_api/generated/cfg_centrifugo/CLAUDE.md +2 -27
- package/src/_api/generated/cfg_centrifugo/_utils/fetchers/index.ts +0 -3
- package/src/_api/generated/cfg_centrifugo/_utils/hooks/index.ts +0 -3
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/index.ts +0 -34
- package/src/_api/generated/cfg_centrifugo/client.ts +39 -51
- package/src/_api/generated/cfg_centrifugo/index.ts +0 -21
- package/src/_api/generated/cfg_centrifugo/schema.json +4 -2039
- package/src/_api/generated/cfg_totp/client.ts +39 -42
- package/src/_api/generated/cfg_totp/totp__totp_management/models.ts +10 -10
- package/src/_api/generated/cfg_totp/totp__totp_setup/models.ts +12 -12
- package/src/_api/generated/cfg_totp/totp__totp_verification/models.ts +8 -8
- package/src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_admin_api.ts +0 -344
- package/src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_monitoring.ts +0 -326
- package/src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_testing.ts +0 -211
- package/src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_admin_api.ts +0 -141
- package/src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_monitoring.ts +0 -99
- package/src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_testing.ts +0 -82
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelInfo.schema.ts +0 -19
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts +0 -19
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts +0 -22
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResult.schema.ts +0 -20
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoClientInfo.schema.ts +0 -22
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoError.schema.ts +0 -20
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHealthCheck.schema.ts +0 -22
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +0 -23
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts +0 -22
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts +0 -22
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts +0 -22
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts +0 -20
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoMetrics.schema.ts +0 -20
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts +0 -30
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoOverviewStats.schema.ts +0 -26
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts +0 -19
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts +0 -22
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResult.schema.ts +0 -20
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts +0 -19
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts +0 -22
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts +0 -20
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoProcess.schema.ts +0 -20
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPublication.schema.ts +0 -23
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoStreamPosition.schema.ts +0 -20
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts +0 -21
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelStats.schema.ts +0 -25
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/ManualAckRequestRequest.schema.ts +0 -20
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/ManualAckResponse.schema.ts +0 -21
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts +0 -24
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/Publish.schema.ts +0 -29
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/PublishTestRequestRequest.schema.ts +0 -22
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/PublishTestResponse.schema.ts +0 -24
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/TimelineItem.schema.ts +0 -23
- package/src/_api/generated/cfg_centrifugo/_utils/schemas/TimelineResponse.schema.ts +0 -22
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/client.ts +0 -76
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/index.ts +0 -4
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/models.ts +0 -268
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/client.ts +0 -110
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/index.ts +0 -4
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/models.ts +0 -144
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/client.ts +0 -48
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/index.ts +0 -4
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/models.ts +0 -64
package/dist/index.cjs
CHANGED
|
@@ -900,43 +900,47 @@ var APIClient = class {
|
|
|
900
900
|
if (error instanceof APIError) {
|
|
901
901
|
throw error;
|
|
902
902
|
}
|
|
903
|
-
|
|
903
|
+
let possiblyCors = false;
|
|
904
|
+
if (error instanceof TypeError && typeof window !== "undefined") {
|
|
905
|
+
try {
|
|
906
|
+
const isCrossOrigin = (() => {
|
|
907
|
+
try {
|
|
908
|
+
return new URL(url).origin !== window.location.origin;
|
|
909
|
+
} catch {
|
|
910
|
+
return false;
|
|
911
|
+
}
|
|
912
|
+
})();
|
|
913
|
+
if (isCrossOrigin) {
|
|
914
|
+
const entries = performance.getEntriesByName(url, "resource");
|
|
915
|
+
if (entries.length > 0) {
|
|
916
|
+
const last = entries[entries.length - 1];
|
|
917
|
+
possiblyCors = "responseStatus" in last && last.responseStatus === 0;
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
} catch {
|
|
921
|
+
}
|
|
922
|
+
}
|
|
904
923
|
if (this.logger) {
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
this.logger.error(` \u2192
|
|
909
|
-
} else {
|
|
910
|
-
this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
|
|
911
|
-
this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
|
|
924
|
+
this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
|
|
925
|
+
this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
|
|
926
|
+
if (possiblyCors) {
|
|
927
|
+
this.logger.error(` \u2192 Possibly blocked by CORS policy (configure CORS on the server)`);
|
|
912
928
|
}
|
|
913
929
|
}
|
|
914
930
|
if (typeof window !== "undefined") {
|
|
915
931
|
try {
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
window.dispatchEvent(new CustomEvent("network-error", {
|
|
929
|
-
detail: {
|
|
930
|
-
url,
|
|
931
|
-
method,
|
|
932
|
-
error: error instanceof Error ? error.message : String(error),
|
|
933
|
-
timestamp: /* @__PURE__ */ new Date()
|
|
934
|
-
},
|
|
935
|
-
bubbles: true,
|
|
936
|
-
cancelable: false
|
|
937
|
-
}));
|
|
938
|
-
}
|
|
939
|
-
} catch (eventError) {
|
|
932
|
+
window.dispatchEvent(new CustomEvent("network-error", {
|
|
933
|
+
detail: {
|
|
934
|
+
url,
|
|
935
|
+
method,
|
|
936
|
+
error: error instanceof Error ? error.message : String(error),
|
|
937
|
+
possibly_cors: possiblyCors,
|
|
938
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
939
|
+
},
|
|
940
|
+
bubbles: true,
|
|
941
|
+
cancelable: false
|
|
942
|
+
}));
|
|
943
|
+
} catch {
|
|
940
944
|
}
|
|
941
945
|
}
|
|
942
946
|
const networkError = error instanceof Error ? new NetworkError(error.message, url, error) : new NetworkError("Unknown error", url);
|
|
@@ -2184,71 +2188,6 @@ var API = class {
|
|
|
2184
2188
|
};
|
|
2185
2189
|
var cfg_accounts_default = API;
|
|
2186
2190
|
|
|
2187
|
-
// src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/client.ts
|
|
2188
|
-
var CentrifugoAdminApi = class {
|
|
2189
|
-
static {
|
|
2190
|
-
__name(this, "CentrifugoAdminApi");
|
|
2191
|
-
}
|
|
2192
|
-
constructor(client) {
|
|
2193
|
-
this.client = client;
|
|
2194
|
-
}
|
|
2195
|
-
/**
|
|
2196
|
-
* Get connection token for dashboard
|
|
2197
|
-
*
|
|
2198
|
-
* Returns JWT token and config for WebSocket connection to Centrifugo.
|
|
2199
|
-
*/
|
|
2200
|
-
async centrifugoServerAuthTokenCreate() {
|
|
2201
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/server/auth/token/");
|
|
2202
|
-
return response;
|
|
2203
|
-
}
|
|
2204
|
-
/**
|
|
2205
|
-
* List active channels
|
|
2206
|
-
*
|
|
2207
|
-
* Returns list of active channels with optional pattern filter.
|
|
2208
|
-
*/
|
|
2209
|
-
async centrifugoServerChannelsCreate(data) {
|
|
2210
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/server/channels/", { body: data });
|
|
2211
|
-
return response;
|
|
2212
|
-
}
|
|
2213
|
-
/**
|
|
2214
|
-
* Get channel history
|
|
2215
|
-
*
|
|
2216
|
-
* Returns message history for a channel.
|
|
2217
|
-
*/
|
|
2218
|
-
async centrifugoServerHistoryCreate(data) {
|
|
2219
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/server/history/", { body: data });
|
|
2220
|
-
return response;
|
|
2221
|
-
}
|
|
2222
|
-
/**
|
|
2223
|
-
* Get Centrifugo server info
|
|
2224
|
-
*
|
|
2225
|
-
* Returns server information including node count, version, and uptime.
|
|
2226
|
-
*/
|
|
2227
|
-
async centrifugoServerInfoCreate() {
|
|
2228
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/server/info/");
|
|
2229
|
-
return response;
|
|
2230
|
-
}
|
|
2231
|
-
/**
|
|
2232
|
-
* Get channel presence
|
|
2233
|
-
*
|
|
2234
|
-
* Returns list of clients currently subscribed to a channel.
|
|
2235
|
-
*/
|
|
2236
|
-
async centrifugoServerPresenceCreate(data) {
|
|
2237
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/server/presence/", { body: data });
|
|
2238
|
-
return response;
|
|
2239
|
-
}
|
|
2240
|
-
/**
|
|
2241
|
-
* Get channel presence statistics
|
|
2242
|
-
*
|
|
2243
|
-
* Returns quick statistics about channel presence (num_clients,
|
|
2244
|
-
* num_users).
|
|
2245
|
-
*/
|
|
2246
|
-
async centrifugoServerPresenceStatsCreate(data) {
|
|
2247
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/server/presence-stats/", { body: data });
|
|
2248
|
-
return response;
|
|
2249
|
-
}
|
|
2250
|
-
};
|
|
2251
|
-
|
|
2252
2191
|
// src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_auth/client.ts
|
|
2253
2192
|
var CentrifugoAuth = class {
|
|
2254
2193
|
static {
|
|
@@ -2270,130 +2209,6 @@ var CentrifugoAuth = class {
|
|
|
2270
2209
|
}
|
|
2271
2210
|
};
|
|
2272
2211
|
|
|
2273
|
-
// src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/client.ts
|
|
2274
|
-
var CentrifugoMonitoring = class {
|
|
2275
|
-
static {
|
|
2276
|
-
__name(this, "CentrifugoMonitoring");
|
|
2277
|
-
}
|
|
2278
|
-
constructor(client) {
|
|
2279
|
-
this.client = client;
|
|
2280
|
-
}
|
|
2281
|
-
/**
|
|
2282
|
-
* Get channel statistics
|
|
2283
|
-
*
|
|
2284
|
-
* Returns statistics grouped by channel.
|
|
2285
|
-
*/
|
|
2286
|
-
async centrifugoMonitorChannelsRetrieve(...args) {
|
|
2287
|
-
const isParamsObject = args.length === 1 && typeof args[0] === "object" && args[0] !== null && !Array.isArray(args[0]);
|
|
2288
|
-
let params;
|
|
2289
|
-
if (isParamsObject) {
|
|
2290
|
-
params = args[0];
|
|
2291
|
-
} else {
|
|
2292
|
-
params = { hours: args[0] };
|
|
2293
|
-
}
|
|
2294
|
-
const response = await this.client.request("GET", "/cfg/centrifugo/monitor/channels/", { params });
|
|
2295
|
-
return response;
|
|
2296
|
-
}
|
|
2297
|
-
/**
|
|
2298
|
-
* Get Centrifugo health status
|
|
2299
|
-
*
|
|
2300
|
-
* Returns the current health status of the Centrifugo client.
|
|
2301
|
-
*/
|
|
2302
|
-
async centrifugoMonitorHealthRetrieve() {
|
|
2303
|
-
const response = await this.client.request("GET", "/cfg/centrifugo/monitor/health/");
|
|
2304
|
-
return response;
|
|
2305
|
-
}
|
|
2306
|
-
/**
|
|
2307
|
-
* Get overview statistics
|
|
2308
|
-
*
|
|
2309
|
-
* Returns overview statistics for Centrifugo publishes.
|
|
2310
|
-
*/
|
|
2311
|
-
async centrifugoMonitorOverviewRetrieve(...args) {
|
|
2312
|
-
const isParamsObject = args.length === 1 && typeof args[0] === "object" && args[0] !== null && !Array.isArray(args[0]);
|
|
2313
|
-
let params;
|
|
2314
|
-
if (isParamsObject) {
|
|
2315
|
-
params = args[0];
|
|
2316
|
-
} else {
|
|
2317
|
-
params = { hours: args[0] };
|
|
2318
|
-
}
|
|
2319
|
-
const response = await this.client.request("GET", "/cfg/centrifugo/monitor/overview/", { params });
|
|
2320
|
-
return response;
|
|
2321
|
-
}
|
|
2322
|
-
/**
|
|
2323
|
-
* Get recent publishes
|
|
2324
|
-
*
|
|
2325
|
-
* Returns a paginated list of recent Centrifugo publishes with their
|
|
2326
|
-
* details. Uses standard DRF pagination.
|
|
2327
|
-
*/
|
|
2328
|
-
async centrifugoMonitorPublishesList(...args) {
|
|
2329
|
-
const isParamsObject = args.length === 1 && typeof args[0] === "object" && args[0] !== null && !Array.isArray(args[0]);
|
|
2330
|
-
let params;
|
|
2331
|
-
if (isParamsObject) {
|
|
2332
|
-
params = args[0];
|
|
2333
|
-
} else {
|
|
2334
|
-
params = { channel: args[0], ordering: args[1], page: args[2], page_size: args[3], search: args[4], status: args[5] };
|
|
2335
|
-
}
|
|
2336
|
-
const response = await this.client.request("GET", "/cfg/centrifugo/monitor/publishes/", { params });
|
|
2337
|
-
return response;
|
|
2338
|
-
}
|
|
2339
|
-
/**
|
|
2340
|
-
* Get publish timeline
|
|
2341
|
-
*
|
|
2342
|
-
* Returns hourly or daily breakdown of publish counts for charts.
|
|
2343
|
-
*/
|
|
2344
|
-
async centrifugoMonitorTimelineRetrieve(...args) {
|
|
2345
|
-
const isParamsObject = args.length === 1 && typeof args[0] === "object" && args[0] !== null && !Array.isArray(args[0]);
|
|
2346
|
-
let params;
|
|
2347
|
-
if (isParamsObject) {
|
|
2348
|
-
params = args[0];
|
|
2349
|
-
} else {
|
|
2350
|
-
params = { hours: args[0], interval: args[1] };
|
|
2351
|
-
}
|
|
2352
|
-
const response = await this.client.request("GET", "/cfg/centrifugo/monitor/timeline/", { params });
|
|
2353
|
-
return response;
|
|
2354
|
-
}
|
|
2355
|
-
};
|
|
2356
|
-
|
|
2357
|
-
// src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/client.ts
|
|
2358
|
-
var CentrifugoTesting = class {
|
|
2359
|
-
static {
|
|
2360
|
-
__name(this, "CentrifugoTesting");
|
|
2361
|
-
}
|
|
2362
|
-
constructor(client) {
|
|
2363
|
-
this.client = client;
|
|
2364
|
-
}
|
|
2365
|
-
/**
|
|
2366
|
-
* Publish test message
|
|
2367
|
-
*
|
|
2368
|
-
* Publish test message to Centrifugo via wrapper with optional ACK
|
|
2369
|
-
* tracking.
|
|
2370
|
-
*/
|
|
2371
|
-
async publishTestCreate(data) {
|
|
2372
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/testing/publish-test/", { body: data });
|
|
2373
|
-
return response;
|
|
2374
|
-
}
|
|
2375
|
-
/**
|
|
2376
|
-
* Publish with database logging
|
|
2377
|
-
*
|
|
2378
|
-
* Publish message using CentrifugoClient with database logging. This will
|
|
2379
|
-
* create CentrifugoLog records.
|
|
2380
|
-
*/
|
|
2381
|
-
async publishWithLoggingCreate(data) {
|
|
2382
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/testing/publish-with-logging/", { body: data });
|
|
2383
|
-
return response;
|
|
2384
|
-
}
|
|
2385
|
-
/**
|
|
2386
|
-
* Send manual ACK
|
|
2387
|
-
*
|
|
2388
|
-
* Manually send ACK for a message to the wrapper. Pass message_id in
|
|
2389
|
-
* request body.
|
|
2390
|
-
*/
|
|
2391
|
-
async sendAckCreate(data) {
|
|
2392
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/testing/send-ack/", { body: data });
|
|
2393
|
-
return response;
|
|
2394
|
-
}
|
|
2395
|
-
};
|
|
2396
|
-
|
|
2397
2212
|
// src/_api/generated/cfg_centrifugo/http.ts
|
|
2398
2213
|
var FetchAdapter2 = class {
|
|
2399
2214
|
static {
|
|
@@ -2770,10 +2585,7 @@ var APIClient2 = class {
|
|
|
2770
2585
|
if (options?.retryConfig !== void 0) {
|
|
2771
2586
|
this.retryConfig = options.retryConfig;
|
|
2772
2587
|
}
|
|
2773
|
-
this.centrifugo_admin_api = new CentrifugoAdminApi(this);
|
|
2774
2588
|
this.centrifugo_auth = new CentrifugoAuth(this);
|
|
2775
|
-
this.centrifugo_monitoring = new CentrifugoMonitoring(this);
|
|
2776
|
-
this.centrifugo_testing = new CentrifugoTesting(this);
|
|
2777
2589
|
}
|
|
2778
2590
|
static {
|
|
2779
2591
|
__name(this, "APIClient");
|
|
@@ -2908,43 +2720,47 @@ var APIClient2 = class {
|
|
|
2908
2720
|
if (error instanceof APIError2) {
|
|
2909
2721
|
throw error;
|
|
2910
2722
|
}
|
|
2911
|
-
|
|
2723
|
+
let possiblyCors = false;
|
|
2724
|
+
if (error instanceof TypeError && typeof window !== "undefined") {
|
|
2725
|
+
try {
|
|
2726
|
+
const isCrossOrigin = (() => {
|
|
2727
|
+
try {
|
|
2728
|
+
return new URL(url).origin !== window.location.origin;
|
|
2729
|
+
} catch {
|
|
2730
|
+
return false;
|
|
2731
|
+
}
|
|
2732
|
+
})();
|
|
2733
|
+
if (isCrossOrigin) {
|
|
2734
|
+
const entries = performance.getEntriesByName(url, "resource");
|
|
2735
|
+
if (entries.length > 0) {
|
|
2736
|
+
const last = entries[entries.length - 1];
|
|
2737
|
+
possiblyCors = "responseStatus" in last && last.responseStatus === 0;
|
|
2738
|
+
}
|
|
2739
|
+
}
|
|
2740
|
+
} catch {
|
|
2741
|
+
}
|
|
2742
|
+
}
|
|
2912
2743
|
if (this.logger) {
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
this.logger.error(` \u2192
|
|
2917
|
-
} else {
|
|
2918
|
-
this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
|
|
2919
|
-
this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
|
|
2744
|
+
this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
|
|
2745
|
+
this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
|
|
2746
|
+
if (possiblyCors) {
|
|
2747
|
+
this.logger.error(` \u2192 Possibly blocked by CORS policy (configure CORS on the server)`);
|
|
2920
2748
|
}
|
|
2921
2749
|
}
|
|
2922
2750
|
if (typeof window !== "undefined") {
|
|
2923
2751
|
try {
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
window.dispatchEvent(new CustomEvent("network-error", {
|
|
2937
|
-
detail: {
|
|
2938
|
-
url,
|
|
2939
|
-
method,
|
|
2940
|
-
error: error instanceof Error ? error.message : String(error),
|
|
2941
|
-
timestamp: /* @__PURE__ */ new Date()
|
|
2942
|
-
},
|
|
2943
|
-
bubbles: true,
|
|
2944
|
-
cancelable: false
|
|
2945
|
-
}));
|
|
2946
|
-
}
|
|
2947
|
-
} catch (eventError) {
|
|
2752
|
+
window.dispatchEvent(new CustomEvent("network-error", {
|
|
2753
|
+
detail: {
|
|
2754
|
+
url,
|
|
2755
|
+
method,
|
|
2756
|
+
error: error instanceof Error ? error.message : String(error),
|
|
2757
|
+
possibly_cors: possiblyCors,
|
|
2758
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
2759
|
+
},
|
|
2760
|
+
bubbles: true,
|
|
2761
|
+
cancelable: false
|
|
2762
|
+
}));
|
|
2763
|
+
} catch {
|
|
2948
2764
|
}
|
|
2949
2765
|
}
|
|
2950
2766
|
const networkError = error instanceof Error ? new NetworkError2(error.message, url, error) : new NetworkError2("Unknown error", url);
|
|
@@ -3016,324 +2832,16 @@ var LocalStorageAdapter2 = class {
|
|
|
3016
2832
|
}
|
|
3017
2833
|
};
|
|
3018
2834
|
|
|
3019
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelInfo.schema.ts
|
|
3020
|
-
var import_zod22 = require("zod");
|
|
3021
|
-
var CentrifugoChannelInfoSchema = import_zod22.z.object({
|
|
3022
|
-
num_clients: import_zod22.z.number().int()
|
|
3023
|
-
});
|
|
3024
|
-
|
|
3025
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts
|
|
3026
|
-
var import_zod23 = require("zod");
|
|
3027
|
-
var CentrifugoChannelsRequestRequestSchema = import_zod23.z.object({
|
|
3028
|
-
pattern: import_zod23.z.string().nullable().optional()
|
|
3029
|
-
});
|
|
3030
|
-
|
|
3031
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts
|
|
3032
|
-
var import_zod26 = require("zod");
|
|
3033
|
-
|
|
3034
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResult.schema.ts
|
|
3035
|
-
var import_zod24 = require("zod");
|
|
3036
|
-
var CentrifugoChannelsResultSchema = import_zod24.z.object({
|
|
3037
|
-
channels: import_zod24.z.record(import_zod24.z.string(), CentrifugoChannelInfoSchema)
|
|
3038
|
-
});
|
|
3039
|
-
|
|
3040
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoError.schema.ts
|
|
3041
|
-
var import_zod25 = require("zod");
|
|
3042
|
-
var CentrifugoErrorSchema = import_zod25.z.object({
|
|
3043
|
-
code: import_zod25.z.number().int().optional(),
|
|
3044
|
-
message: import_zod25.z.string().optional()
|
|
3045
|
-
});
|
|
3046
|
-
|
|
3047
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts
|
|
3048
|
-
var CentrifugoChannelsResponseSchema = import_zod26.z.object({
|
|
3049
|
-
error: CentrifugoErrorSchema.nullable().optional(),
|
|
3050
|
-
result: CentrifugoChannelsResultSchema.nullable().optional()
|
|
3051
|
-
});
|
|
3052
|
-
|
|
3053
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoClientInfo.schema.ts
|
|
3054
|
-
var import_zod27 = require("zod");
|
|
3055
|
-
var CentrifugoClientInfoSchema = import_zod27.z.object({
|
|
3056
|
-
user: import_zod27.z.string(),
|
|
3057
|
-
client: import_zod27.z.string(),
|
|
3058
|
-
conn_info: import_zod27.z.record(import_zod27.z.string(), import_zod27.z.any()).nullable().optional(),
|
|
3059
|
-
chan_info: import_zod27.z.record(import_zod27.z.string(), import_zod27.z.any()).nullable().optional()
|
|
3060
|
-
});
|
|
3061
|
-
|
|
3062
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHealthCheck.schema.ts
|
|
3063
|
-
var import_zod28 = require("zod");
|
|
3064
|
-
var CentrifugoHealthCheckSchema = import_zod28.z.object({
|
|
3065
|
-
status: import_zod28.z.string(),
|
|
3066
|
-
wrapper_url: import_zod28.z.string(),
|
|
3067
|
-
has_api_key: import_zod28.z.boolean(),
|
|
3068
|
-
timestamp: import_zod28.z.string()
|
|
3069
|
-
});
|
|
3070
|
-
|
|
3071
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts
|
|
3072
|
-
var import_zod30 = require("zod");
|
|
3073
|
-
|
|
3074
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoStreamPosition.schema.ts
|
|
3075
|
-
var import_zod29 = require("zod");
|
|
3076
|
-
var CentrifugoStreamPositionSchema = import_zod29.z.object({
|
|
3077
|
-
offset: import_zod29.z.number().int(),
|
|
3078
|
-
epoch: import_zod29.z.string()
|
|
3079
|
-
});
|
|
3080
|
-
|
|
3081
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts
|
|
3082
|
-
var CentrifugoHistoryRequestRequestSchema = import_zod30.z.object({
|
|
3083
|
-
channel: import_zod30.z.string(),
|
|
3084
|
-
limit: import_zod30.z.number().int().nullable().optional(),
|
|
3085
|
-
since: CentrifugoStreamPositionSchema.nullable().optional(),
|
|
3086
|
-
reverse: import_zod30.z.boolean().nullable().optional()
|
|
3087
|
-
});
|
|
3088
|
-
|
|
3089
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts
|
|
3090
|
-
var import_zod33 = require("zod");
|
|
3091
|
-
|
|
3092
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts
|
|
3093
|
-
var import_zod32 = require("zod");
|
|
3094
|
-
|
|
3095
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPublication.schema.ts
|
|
3096
|
-
var import_zod31 = require("zod");
|
|
3097
|
-
var CentrifugoPublicationSchema = import_zod31.z.object({
|
|
3098
|
-
data: import_zod31.z.record(import_zod31.z.string(), import_zod31.z.any()),
|
|
3099
|
-
info: CentrifugoClientInfoSchema.nullable().optional(),
|
|
3100
|
-
offset: import_zod31.z.number().int(),
|
|
3101
|
-
tags: import_zod31.z.record(import_zod31.z.string(), import_zod31.z.any()).nullable().optional()
|
|
3102
|
-
});
|
|
3103
|
-
|
|
3104
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts
|
|
3105
|
-
var CentrifugoHistoryResultSchema = import_zod32.z.object({
|
|
3106
|
-
publications: import_zod32.z.array(CentrifugoPublicationSchema),
|
|
3107
|
-
epoch: import_zod32.z.string(),
|
|
3108
|
-
offset: import_zod32.z.number().int()
|
|
3109
|
-
});
|
|
3110
|
-
|
|
3111
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts
|
|
3112
|
-
var CentrifugoHistoryResponseSchema = import_zod33.z.object({
|
|
3113
|
-
error: CentrifugoErrorSchema.nullable().optional(),
|
|
3114
|
-
result: CentrifugoHistoryResultSchema.nullable().optional()
|
|
3115
|
-
});
|
|
3116
|
-
|
|
3117
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts
|
|
3118
|
-
var import_zod38 = require("zod");
|
|
3119
|
-
|
|
3120
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts
|
|
3121
|
-
var import_zod37 = require("zod");
|
|
3122
|
-
|
|
3123
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts
|
|
3124
|
-
var import_zod36 = require("zod");
|
|
3125
|
-
|
|
3126
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoMetrics.schema.ts
|
|
3127
|
-
var import_zod34 = require("zod");
|
|
3128
|
-
var CentrifugoMetricsSchema = import_zod34.z.object({
|
|
3129
|
-
interval: import_zod34.z.number(),
|
|
3130
|
-
items: import_zod34.z.record(import_zod34.z.string(), import_zod34.z.number())
|
|
3131
|
-
});
|
|
3132
|
-
|
|
3133
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoProcess.schema.ts
|
|
3134
|
-
var import_zod35 = require("zod");
|
|
3135
|
-
var CentrifugoProcessSchema = import_zod35.z.object({
|
|
3136
|
-
cpu: import_zod35.z.number(),
|
|
3137
|
-
rss: import_zod35.z.number().int()
|
|
3138
|
-
});
|
|
3139
|
-
|
|
3140
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts
|
|
3141
|
-
var CentrifugoNodeInfoSchema = import_zod36.z.object({
|
|
3142
|
-
uid: import_zod36.z.string(),
|
|
3143
|
-
name: import_zod36.z.string(),
|
|
3144
|
-
version: import_zod36.z.string(),
|
|
3145
|
-
num_clients: import_zod36.z.number().int(),
|
|
3146
|
-
num_users: import_zod36.z.number().int(),
|
|
3147
|
-
num_channels: import_zod36.z.number().int(),
|
|
3148
|
-
uptime: import_zod36.z.number().int(),
|
|
3149
|
-
num_subs: import_zod36.z.number().int(),
|
|
3150
|
-
metrics: CentrifugoMetricsSchema.nullable().optional(),
|
|
3151
|
-
process: CentrifugoProcessSchema.nullable().optional()
|
|
3152
|
-
});
|
|
3153
|
-
|
|
3154
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts
|
|
3155
|
-
var CentrifugoInfoResultSchema = import_zod37.z.object({
|
|
3156
|
-
nodes: import_zod37.z.array(CentrifugoNodeInfoSchema)
|
|
3157
|
-
});
|
|
3158
|
-
|
|
3159
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts
|
|
3160
|
-
var CentrifugoInfoResponseSchema = import_zod38.z.object({
|
|
3161
|
-
error: CentrifugoErrorSchema.nullable().optional(),
|
|
3162
|
-
result: CentrifugoInfoResultSchema.nullable().optional()
|
|
3163
|
-
});
|
|
3164
|
-
|
|
3165
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoOverviewStats.schema.ts
|
|
3166
|
-
var import_zod39 = require("zod");
|
|
3167
|
-
var CentrifugoOverviewStatsSchema = import_zod39.z.object({
|
|
3168
|
-
total: import_zod39.z.number().int(),
|
|
3169
|
-
successful: import_zod39.z.number().int(),
|
|
3170
|
-
failed: import_zod39.z.number().int(),
|
|
3171
|
-
timeout: import_zod39.z.number().int(),
|
|
3172
|
-
success_rate: import_zod39.z.number(),
|
|
3173
|
-
avg_duration_ms: import_zod39.z.number(),
|
|
3174
|
-
avg_acks_received: import_zod39.z.number(),
|
|
3175
|
-
period_hours: import_zod39.z.number().int()
|
|
3176
|
-
});
|
|
3177
|
-
|
|
3178
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts
|
|
3179
|
-
var import_zod40 = require("zod");
|
|
3180
|
-
var CentrifugoPresenceRequestRequestSchema = import_zod40.z.object({
|
|
3181
|
-
channel: import_zod40.z.string()
|
|
3182
|
-
});
|
|
3183
|
-
|
|
3184
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts
|
|
3185
|
-
var import_zod42 = require("zod");
|
|
3186
|
-
|
|
3187
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResult.schema.ts
|
|
3188
|
-
var import_zod41 = require("zod");
|
|
3189
|
-
var CentrifugoPresenceResultSchema = import_zod41.z.object({
|
|
3190
|
-
presence: import_zod41.z.record(import_zod41.z.string(), CentrifugoClientInfoSchema)
|
|
3191
|
-
});
|
|
3192
|
-
|
|
3193
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts
|
|
3194
|
-
var CentrifugoPresenceResponseSchema = import_zod42.z.object({
|
|
3195
|
-
error: CentrifugoErrorSchema.nullable().optional(),
|
|
3196
|
-
result: CentrifugoPresenceResultSchema.nullable().optional()
|
|
3197
|
-
});
|
|
3198
|
-
|
|
3199
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts
|
|
3200
|
-
var import_zod43 = require("zod");
|
|
3201
|
-
var CentrifugoPresenceStatsRequestRequestSchema = import_zod43.z.object({
|
|
3202
|
-
channel: import_zod43.z.string()
|
|
3203
|
-
});
|
|
3204
|
-
|
|
3205
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts
|
|
3206
|
-
var import_zod45 = require("zod");
|
|
3207
|
-
|
|
3208
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts
|
|
3209
|
-
var import_zod44 = require("zod");
|
|
3210
|
-
var CentrifugoPresenceStatsResultSchema = import_zod44.z.object({
|
|
3211
|
-
num_clients: import_zod44.z.number().int(),
|
|
3212
|
-
num_users: import_zod44.z.number().int()
|
|
3213
|
-
});
|
|
3214
|
-
|
|
3215
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts
|
|
3216
|
-
var CentrifugoPresenceStatsResponseSchema = import_zod45.z.object({
|
|
3217
|
-
error: CentrifugoErrorSchema.nullable().optional(),
|
|
3218
|
-
result: CentrifugoPresenceStatsResultSchema.nullable().optional()
|
|
3219
|
-
});
|
|
3220
|
-
|
|
3221
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts
|
|
3222
|
-
var import_zod47 = require("zod");
|
|
3223
|
-
|
|
3224
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelStats.schema.ts
|
|
3225
|
-
var import_zod46 = require("zod");
|
|
3226
|
-
var ChannelStatsSchema = import_zod46.z.object({
|
|
3227
|
-
channel: import_zod46.z.string(),
|
|
3228
|
-
total: import_zod46.z.number().int(),
|
|
3229
|
-
successful: import_zod46.z.number().int(),
|
|
3230
|
-
failed: import_zod46.z.number().int(),
|
|
3231
|
-
avg_duration_ms: import_zod46.z.number(),
|
|
3232
|
-
avg_acks: import_zod46.z.number(),
|
|
3233
|
-
last_activity_at: import_zod46.z.string().nullable()
|
|
3234
|
-
});
|
|
3235
|
-
|
|
3236
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts
|
|
3237
|
-
var ChannelListSchema = import_zod47.z.object({
|
|
3238
|
-
channels: import_zod47.z.array(ChannelStatsSchema),
|
|
3239
|
-
total_channels: import_zod47.z.number().int()
|
|
3240
|
-
});
|
|
3241
|
-
|
|
3242
2835
|
// src/_api/generated/cfg_centrifugo/_utils/schemas/ConnectionTokenResponse.schema.ts
|
|
3243
|
-
var
|
|
3244
|
-
var ConnectionTokenResponseSchema =
|
|
3245
|
-
token:
|
|
3246
|
-
centrifugo_url:
|
|
3247
|
-
expires_at:
|
|
3248
|
-
channels:
|
|
3249
|
-
});
|
|
3250
|
-
|
|
3251
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/ManualAckRequestRequest.schema.ts
|
|
3252
|
-
var import_zod49 = require("zod");
|
|
3253
|
-
var ManualAckRequestRequestSchema = import_zod49.z.object({
|
|
3254
|
-
message_id: import_zod49.z.string(),
|
|
3255
|
-
client_id: import_zod49.z.string()
|
|
3256
|
-
});
|
|
3257
|
-
|
|
3258
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/ManualAckResponse.schema.ts
|
|
3259
|
-
var import_zod50 = require("zod");
|
|
3260
|
-
var ManualAckResponseSchema = import_zod50.z.object({
|
|
3261
|
-
success: import_zod50.z.boolean(),
|
|
3262
|
-
message_id: import_zod50.z.string(),
|
|
3263
|
-
error: import_zod50.z.string().nullable().optional()
|
|
3264
|
-
});
|
|
3265
|
-
|
|
3266
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts
|
|
3267
|
-
var import_zod52 = require("zod");
|
|
3268
|
-
|
|
3269
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/Publish.schema.ts
|
|
3270
|
-
var import_zod51 = require("zod");
|
|
3271
|
-
var PublishSchema = import_zod51.z.object({
|
|
3272
|
-
message_id: import_zod51.z.string(),
|
|
3273
|
-
channel: import_zod51.z.string(),
|
|
3274
|
-
status: import_zod51.z.string(),
|
|
3275
|
-
wait_for_ack: import_zod51.z.boolean(),
|
|
3276
|
-
acks_received: import_zod51.z.number().int(),
|
|
3277
|
-
acks_expected: import_zod51.z.number().int().nullable(),
|
|
3278
|
-
duration_ms: import_zod51.z.number().nullable(),
|
|
3279
|
-
created_at: import_zod51.z.string().datetime({ offset: true }),
|
|
3280
|
-
completed_at: import_zod51.z.string().datetime({ offset: true }).nullable(),
|
|
3281
|
-
error_code: import_zod51.z.string().nullable(),
|
|
3282
|
-
error_message: import_zod51.z.string().nullable()
|
|
3283
|
-
});
|
|
3284
|
-
|
|
3285
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts
|
|
3286
|
-
var PaginatedPublishListSchema = import_zod52.z.object({
|
|
3287
|
-
count: import_zod52.z.number().int(),
|
|
3288
|
-
page: import_zod52.z.number().int(),
|
|
3289
|
-
pages: import_zod52.z.number().int(),
|
|
3290
|
-
page_size: import_zod52.z.number().int(),
|
|
3291
|
-
has_next: import_zod52.z.boolean(),
|
|
3292
|
-
has_previous: import_zod52.z.boolean(),
|
|
3293
|
-
next_page: import_zod52.z.number().int().nullable().optional(),
|
|
3294
|
-
previous_page: import_zod52.z.number().int().nullable().optional(),
|
|
3295
|
-
results: import_zod52.z.array(PublishSchema)
|
|
3296
|
-
});
|
|
3297
|
-
|
|
3298
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/PublishTestRequestRequest.schema.ts
|
|
3299
|
-
var import_zod53 = require("zod");
|
|
3300
|
-
var PublishTestRequestRequestSchema = import_zod53.z.object({
|
|
3301
|
-
channel: import_zod53.z.string(),
|
|
3302
|
-
data: import_zod53.z.record(import_zod53.z.string(), import_zod53.z.any()),
|
|
3303
|
-
wait_for_ack: import_zod53.z.boolean().optional(),
|
|
3304
|
-
ack_timeout: import_zod53.z.number().int().min(1).max(60).optional()
|
|
3305
|
-
});
|
|
3306
|
-
|
|
3307
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/PublishTestResponse.schema.ts
|
|
3308
|
-
var import_zod54 = require("zod");
|
|
3309
|
-
var PublishTestResponseSchema = import_zod54.z.object({
|
|
3310
|
-
success: import_zod54.z.boolean(),
|
|
3311
|
-
message_id: import_zod54.z.string(),
|
|
3312
|
-
channel: import_zod54.z.string(),
|
|
3313
|
-
acks_received: import_zod54.z.number().int().optional(),
|
|
3314
|
-
delivered: import_zod54.z.boolean().optional(),
|
|
3315
|
-
error: import_zod54.z.string().nullable().optional()
|
|
3316
|
-
});
|
|
3317
|
-
|
|
3318
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/TimelineItem.schema.ts
|
|
3319
|
-
var import_zod55 = require("zod");
|
|
3320
|
-
var TimelineItemSchema = import_zod55.z.object({
|
|
3321
|
-
timestamp: import_zod55.z.string(),
|
|
3322
|
-
count: import_zod55.z.number().int(),
|
|
3323
|
-
successful: import_zod55.z.number().int(),
|
|
3324
|
-
failed: import_zod55.z.number().int(),
|
|
3325
|
-
timeout: import_zod55.z.number().int()
|
|
3326
|
-
});
|
|
3327
|
-
|
|
3328
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/TimelineResponse.schema.ts
|
|
3329
|
-
var import_zod56 = require("zod");
|
|
3330
|
-
var TimelineResponseSchema = import_zod56.z.object({
|
|
3331
|
-
timeline: import_zod56.z.array(TimelineItemSchema),
|
|
3332
|
-
period_hours: import_zod56.z.number().int(),
|
|
3333
|
-
interval: import_zod56.z.string()
|
|
2836
|
+
var import_zod22 = require("zod");
|
|
2837
|
+
var ConnectionTokenResponseSchema = import_zod22.z.object({
|
|
2838
|
+
token: import_zod22.z.string(),
|
|
2839
|
+
centrifugo_url: import_zod22.z.string(),
|
|
2840
|
+
expires_at: import_zod22.z.string(),
|
|
2841
|
+
channels: import_zod22.z.array(import_zod22.z.string())
|
|
3334
2842
|
});
|
|
3335
2843
|
|
|
3336
|
-
// src/_api/generated/cfg_centrifugo/_utils/fetchers/
|
|
2844
|
+
// src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_auth.ts
|
|
3337
2845
|
var import_consola7 = require("consola");
|
|
3338
2846
|
|
|
3339
2847
|
// src/_api/generated/cfg_centrifugo/api-instance.ts
|
|
@@ -3362,27 +2870,26 @@ function getAPIInstance2() {
|
|
|
3362
2870
|
__name(getAPIInstance2, "getAPIInstance");
|
|
3363
2871
|
|
|
3364
2872
|
// src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_auth.ts
|
|
3365
|
-
var import_consola8 = require("consola");
|
|
3366
2873
|
async function getCentrifugoAuthTokenRetrieve(client) {
|
|
3367
2874
|
const api2 = client || getAPIInstance2();
|
|
3368
2875
|
const response = await api2.centrifugo_auth.tokenRetrieve();
|
|
3369
2876
|
try {
|
|
3370
2877
|
return ConnectionTokenResponseSchema.parse(response);
|
|
3371
2878
|
} catch (error) {
|
|
3372
|
-
|
|
3373
|
-
|
|
2879
|
+
import_consola7.consola.error("\u274C Zod Validation Failed");
|
|
2880
|
+
import_consola7.consola.box(`getCentrifugoAuthTokenRetrieve
|
|
3374
2881
|
Path: /cfg/centrifugo/auth/token/
|
|
3375
2882
|
Method: GET`);
|
|
3376
2883
|
if (error instanceof Error && "issues" in error && Array.isArray(error.issues)) {
|
|
3377
|
-
|
|
2884
|
+
import_consola7.consola.error("Validation Issues:");
|
|
3378
2885
|
error.issues.forEach((issue, index) => {
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
if (issue.expected)
|
|
3382
|
-
if (issue.received)
|
|
2886
|
+
import_consola7.consola.error(` ${index + 1}. ${issue.path.join(".") || "root"}`);
|
|
2887
|
+
import_consola7.consola.error(` \u251C\u2500 Message: ${issue.message}`);
|
|
2888
|
+
if (issue.expected) import_consola7.consola.error(` \u251C\u2500 Expected: ${issue.expected}`);
|
|
2889
|
+
if (issue.received) import_consola7.consola.error(` \u2514\u2500 Received: ${issue.received}`);
|
|
3383
2890
|
});
|
|
3384
2891
|
}
|
|
3385
|
-
|
|
2892
|
+
import_consola7.consola.error("Response data:", response);
|
|
3386
2893
|
if (typeof window !== "undefined" && error instanceof Error && "issues" in error) {
|
|
3387
2894
|
try {
|
|
3388
2895
|
const event = new CustomEvent("zod-validation-error", {
|
|
@@ -3399,7 +2906,7 @@ Method: GET`);
|
|
|
3399
2906
|
});
|
|
3400
2907
|
window.dispatchEvent(event);
|
|
3401
2908
|
} catch (eventError) {
|
|
3402
|
-
|
|
2909
|
+
import_consola7.consola.warn("Failed to dispatch validation error event:", eventError);
|
|
3403
2910
|
}
|
|
3404
2911
|
}
|
|
3405
2912
|
throw error;
|
|
@@ -3407,12 +2914,6 @@ Method: GET`);
|
|
|
3407
2914
|
}
|
|
3408
2915
|
__name(getCentrifugoAuthTokenRetrieve, "getCentrifugoAuthTokenRetrieve");
|
|
3409
2916
|
|
|
3410
|
-
// src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_monitoring.ts
|
|
3411
|
-
var import_consola9 = require("consola");
|
|
3412
|
-
|
|
3413
|
-
// src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_testing.ts
|
|
3414
|
-
var import_consola10 = require("consola");
|
|
3415
|
-
|
|
3416
2917
|
// src/_api/generated/cfg_centrifugo/index.ts
|
|
3417
2918
|
var TOKEN_KEY2 = "auth_token";
|
|
3418
2919
|
var REFRESH_TOKEN_KEY2 = "refresh_token";
|
|
@@ -3448,10 +2949,7 @@ var API2 = class {
|
|
|
3448
2949
|
tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
|
|
3449
2950
|
});
|
|
3450
2951
|
this._injectAuthHeader();
|
|
3451
|
-
this.centrifugo_admin_api = this._client.centrifugo_admin_api;
|
|
3452
2952
|
this.centrifugo_auth = this._client.centrifugo_auth;
|
|
3453
|
-
this.centrifugo_monitoring = this._client.centrifugo_monitoring;
|
|
3454
|
-
this.centrifugo_testing = this._client.centrifugo_testing;
|
|
3455
2953
|
}
|
|
3456
2954
|
static {
|
|
3457
2955
|
__name(this, "API");
|
|
@@ -3468,10 +2966,7 @@ var API2 = class {
|
|
|
3468
2966
|
tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
|
|
3469
2967
|
});
|
|
3470
2968
|
this._injectAuthHeader();
|
|
3471
|
-
this.centrifugo_admin_api = this._client.centrifugo_admin_api;
|
|
3472
2969
|
this.centrifugo_auth = this._client.centrifugo_auth;
|
|
3473
|
-
this.centrifugo_monitoring = this._client.centrifugo_monitoring;
|
|
3474
|
-
this.centrifugo_testing = this._client.centrifugo_testing;
|
|
3475
2970
|
}
|
|
3476
2971
|
_injectAuthHeader() {
|
|
3477
2972
|
const originalRequest = this._client.request.bind(this._client);
|