@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/auth.cjs
CHANGED
|
@@ -74,7 +74,7 @@ module.exports = __toCommonJS(auth_exports);
|
|
|
74
74
|
// src/auth/context/AuthContext.tsx
|
|
75
75
|
var import_navigation4 = require("next/navigation");
|
|
76
76
|
var import_react17 = require("react");
|
|
77
|
-
var
|
|
77
|
+
var import_swr15 = require("swr");
|
|
78
78
|
|
|
79
79
|
// src/auth/hooks/useCfgRouter.ts
|
|
80
80
|
var import_navigation = require("next/navigation");
|
|
@@ -1005,43 +1005,47 @@ var APIClient = class {
|
|
|
1005
1005
|
if (error instanceof APIError) {
|
|
1006
1006
|
throw error;
|
|
1007
1007
|
}
|
|
1008
|
-
|
|
1008
|
+
let possiblyCors = false;
|
|
1009
|
+
if (error instanceof TypeError && typeof window !== "undefined") {
|
|
1010
|
+
try {
|
|
1011
|
+
const isCrossOrigin = (() => {
|
|
1012
|
+
try {
|
|
1013
|
+
return new URL(url).origin !== window.location.origin;
|
|
1014
|
+
} catch {
|
|
1015
|
+
return false;
|
|
1016
|
+
}
|
|
1017
|
+
})();
|
|
1018
|
+
if (isCrossOrigin) {
|
|
1019
|
+
const entries = performance.getEntriesByName(url, "resource");
|
|
1020
|
+
if (entries.length > 0) {
|
|
1021
|
+
const last = entries[entries.length - 1];
|
|
1022
|
+
possiblyCors = "responseStatus" in last && last.responseStatus === 0;
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
} catch {
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1009
1028
|
if (this.logger) {
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
this.logger.error(` \u2192
|
|
1014
|
-
} else {
|
|
1015
|
-
this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
|
|
1016
|
-
this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
|
|
1029
|
+
this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
|
|
1030
|
+
this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
|
|
1031
|
+
if (possiblyCors) {
|
|
1032
|
+
this.logger.error(` \u2192 Possibly blocked by CORS policy (configure CORS on the server)`);
|
|
1017
1033
|
}
|
|
1018
1034
|
}
|
|
1019
1035
|
if (typeof window !== "undefined") {
|
|
1020
1036
|
try {
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
window.dispatchEvent(new CustomEvent("network-error", {
|
|
1034
|
-
detail: {
|
|
1035
|
-
url,
|
|
1036
|
-
method,
|
|
1037
|
-
error: error instanceof Error ? error.message : String(error),
|
|
1038
|
-
timestamp: /* @__PURE__ */ new Date()
|
|
1039
|
-
},
|
|
1040
|
-
bubbles: true,
|
|
1041
|
-
cancelable: false
|
|
1042
|
-
}));
|
|
1043
|
-
}
|
|
1044
|
-
} catch (eventError) {
|
|
1037
|
+
window.dispatchEvent(new CustomEvent("network-error", {
|
|
1038
|
+
detail: {
|
|
1039
|
+
url,
|
|
1040
|
+
method,
|
|
1041
|
+
error: error instanceof Error ? error.message : String(error),
|
|
1042
|
+
possibly_cors: possiblyCors,
|
|
1043
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
1044
|
+
},
|
|
1045
|
+
bubbles: true,
|
|
1046
|
+
cancelable: false
|
|
1047
|
+
}));
|
|
1048
|
+
} catch {
|
|
1045
1049
|
}
|
|
1046
1050
|
}
|
|
1047
1051
|
const networkError = error instanceof Error ? new NetworkError(error.message, url, error) : new NetworkError("Unknown error", url);
|
|
@@ -1810,71 +1814,6 @@ var API = class {
|
|
|
1810
1814
|
}
|
|
1811
1815
|
};
|
|
1812
1816
|
|
|
1813
|
-
// src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/client.ts
|
|
1814
|
-
var CentrifugoAdminApi = class {
|
|
1815
|
-
static {
|
|
1816
|
-
__name(this, "CentrifugoAdminApi");
|
|
1817
|
-
}
|
|
1818
|
-
constructor(client) {
|
|
1819
|
-
this.client = client;
|
|
1820
|
-
}
|
|
1821
|
-
/**
|
|
1822
|
-
* Get connection token for dashboard
|
|
1823
|
-
*
|
|
1824
|
-
* Returns JWT token and config for WebSocket connection to Centrifugo.
|
|
1825
|
-
*/
|
|
1826
|
-
async centrifugoServerAuthTokenCreate() {
|
|
1827
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/server/auth/token/");
|
|
1828
|
-
return response;
|
|
1829
|
-
}
|
|
1830
|
-
/**
|
|
1831
|
-
* List active channels
|
|
1832
|
-
*
|
|
1833
|
-
* Returns list of active channels with optional pattern filter.
|
|
1834
|
-
*/
|
|
1835
|
-
async centrifugoServerChannelsCreate(data) {
|
|
1836
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/server/channels/", { body: data });
|
|
1837
|
-
return response;
|
|
1838
|
-
}
|
|
1839
|
-
/**
|
|
1840
|
-
* Get channel history
|
|
1841
|
-
*
|
|
1842
|
-
* Returns message history for a channel.
|
|
1843
|
-
*/
|
|
1844
|
-
async centrifugoServerHistoryCreate(data) {
|
|
1845
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/server/history/", { body: data });
|
|
1846
|
-
return response;
|
|
1847
|
-
}
|
|
1848
|
-
/**
|
|
1849
|
-
* Get Centrifugo server info
|
|
1850
|
-
*
|
|
1851
|
-
* Returns server information including node count, version, and uptime.
|
|
1852
|
-
*/
|
|
1853
|
-
async centrifugoServerInfoCreate() {
|
|
1854
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/server/info/");
|
|
1855
|
-
return response;
|
|
1856
|
-
}
|
|
1857
|
-
/**
|
|
1858
|
-
* Get channel presence
|
|
1859
|
-
*
|
|
1860
|
-
* Returns list of clients currently subscribed to a channel.
|
|
1861
|
-
*/
|
|
1862
|
-
async centrifugoServerPresenceCreate(data) {
|
|
1863
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/server/presence/", { body: data });
|
|
1864
|
-
return response;
|
|
1865
|
-
}
|
|
1866
|
-
/**
|
|
1867
|
-
* Get channel presence statistics
|
|
1868
|
-
*
|
|
1869
|
-
* Returns quick statistics about channel presence (num_clients,
|
|
1870
|
-
* num_users).
|
|
1871
|
-
*/
|
|
1872
|
-
async centrifugoServerPresenceStatsCreate(data) {
|
|
1873
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/server/presence-stats/", { body: data });
|
|
1874
|
-
return response;
|
|
1875
|
-
}
|
|
1876
|
-
};
|
|
1877
|
-
|
|
1878
1817
|
// src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_auth/client.ts
|
|
1879
1818
|
var CentrifugoAuth = class {
|
|
1880
1819
|
static {
|
|
@@ -1896,130 +1835,6 @@ var CentrifugoAuth = class {
|
|
|
1896
1835
|
}
|
|
1897
1836
|
};
|
|
1898
1837
|
|
|
1899
|
-
// src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/client.ts
|
|
1900
|
-
var CentrifugoMonitoring = class {
|
|
1901
|
-
static {
|
|
1902
|
-
__name(this, "CentrifugoMonitoring");
|
|
1903
|
-
}
|
|
1904
|
-
constructor(client) {
|
|
1905
|
-
this.client = client;
|
|
1906
|
-
}
|
|
1907
|
-
/**
|
|
1908
|
-
* Get channel statistics
|
|
1909
|
-
*
|
|
1910
|
-
* Returns statistics grouped by channel.
|
|
1911
|
-
*/
|
|
1912
|
-
async centrifugoMonitorChannelsRetrieve(...args) {
|
|
1913
|
-
const isParamsObject = args.length === 1 && typeof args[0] === "object" && args[0] !== null && !Array.isArray(args[0]);
|
|
1914
|
-
let params;
|
|
1915
|
-
if (isParamsObject) {
|
|
1916
|
-
params = args[0];
|
|
1917
|
-
} else {
|
|
1918
|
-
params = { hours: args[0] };
|
|
1919
|
-
}
|
|
1920
|
-
const response = await this.client.request("GET", "/cfg/centrifugo/monitor/channels/", { params });
|
|
1921
|
-
return response;
|
|
1922
|
-
}
|
|
1923
|
-
/**
|
|
1924
|
-
* Get Centrifugo health status
|
|
1925
|
-
*
|
|
1926
|
-
* Returns the current health status of the Centrifugo client.
|
|
1927
|
-
*/
|
|
1928
|
-
async centrifugoMonitorHealthRetrieve() {
|
|
1929
|
-
const response = await this.client.request("GET", "/cfg/centrifugo/monitor/health/");
|
|
1930
|
-
return response;
|
|
1931
|
-
}
|
|
1932
|
-
/**
|
|
1933
|
-
* Get overview statistics
|
|
1934
|
-
*
|
|
1935
|
-
* Returns overview statistics for Centrifugo publishes.
|
|
1936
|
-
*/
|
|
1937
|
-
async centrifugoMonitorOverviewRetrieve(...args) {
|
|
1938
|
-
const isParamsObject = args.length === 1 && typeof args[0] === "object" && args[0] !== null && !Array.isArray(args[0]);
|
|
1939
|
-
let params;
|
|
1940
|
-
if (isParamsObject) {
|
|
1941
|
-
params = args[0];
|
|
1942
|
-
} else {
|
|
1943
|
-
params = { hours: args[0] };
|
|
1944
|
-
}
|
|
1945
|
-
const response = await this.client.request("GET", "/cfg/centrifugo/monitor/overview/", { params });
|
|
1946
|
-
return response;
|
|
1947
|
-
}
|
|
1948
|
-
/**
|
|
1949
|
-
* Get recent publishes
|
|
1950
|
-
*
|
|
1951
|
-
* Returns a paginated list of recent Centrifugo publishes with their
|
|
1952
|
-
* details. Uses standard DRF pagination.
|
|
1953
|
-
*/
|
|
1954
|
-
async centrifugoMonitorPublishesList(...args) {
|
|
1955
|
-
const isParamsObject = args.length === 1 && typeof args[0] === "object" && args[0] !== null && !Array.isArray(args[0]);
|
|
1956
|
-
let params;
|
|
1957
|
-
if (isParamsObject) {
|
|
1958
|
-
params = args[0];
|
|
1959
|
-
} else {
|
|
1960
|
-
params = { channel: args[0], ordering: args[1], page: args[2], page_size: args[3], search: args[4], status: args[5] };
|
|
1961
|
-
}
|
|
1962
|
-
const response = await this.client.request("GET", "/cfg/centrifugo/monitor/publishes/", { params });
|
|
1963
|
-
return response;
|
|
1964
|
-
}
|
|
1965
|
-
/**
|
|
1966
|
-
* Get publish timeline
|
|
1967
|
-
*
|
|
1968
|
-
* Returns hourly or daily breakdown of publish counts for charts.
|
|
1969
|
-
*/
|
|
1970
|
-
async centrifugoMonitorTimelineRetrieve(...args) {
|
|
1971
|
-
const isParamsObject = args.length === 1 && typeof args[0] === "object" && args[0] !== null && !Array.isArray(args[0]);
|
|
1972
|
-
let params;
|
|
1973
|
-
if (isParamsObject) {
|
|
1974
|
-
params = args[0];
|
|
1975
|
-
} else {
|
|
1976
|
-
params = { hours: args[0], interval: args[1] };
|
|
1977
|
-
}
|
|
1978
|
-
const response = await this.client.request("GET", "/cfg/centrifugo/monitor/timeline/", { params });
|
|
1979
|
-
return response;
|
|
1980
|
-
}
|
|
1981
|
-
};
|
|
1982
|
-
|
|
1983
|
-
// src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/client.ts
|
|
1984
|
-
var CentrifugoTesting = class {
|
|
1985
|
-
static {
|
|
1986
|
-
__name(this, "CentrifugoTesting");
|
|
1987
|
-
}
|
|
1988
|
-
constructor(client) {
|
|
1989
|
-
this.client = client;
|
|
1990
|
-
}
|
|
1991
|
-
/**
|
|
1992
|
-
* Publish test message
|
|
1993
|
-
*
|
|
1994
|
-
* Publish test message to Centrifugo via wrapper with optional ACK
|
|
1995
|
-
* tracking.
|
|
1996
|
-
*/
|
|
1997
|
-
async publishTestCreate(data) {
|
|
1998
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/testing/publish-test/", { body: data });
|
|
1999
|
-
return response;
|
|
2000
|
-
}
|
|
2001
|
-
/**
|
|
2002
|
-
* Publish with database logging
|
|
2003
|
-
*
|
|
2004
|
-
* Publish message using CentrifugoClient with database logging. This will
|
|
2005
|
-
* create CentrifugoLog records.
|
|
2006
|
-
*/
|
|
2007
|
-
async publishWithLoggingCreate(data) {
|
|
2008
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/testing/publish-with-logging/", { body: data });
|
|
2009
|
-
return response;
|
|
2010
|
-
}
|
|
2011
|
-
/**
|
|
2012
|
-
* Send manual ACK
|
|
2013
|
-
*
|
|
2014
|
-
* Manually send ACK for a message to the wrapper. Pass message_id in
|
|
2015
|
-
* request body.
|
|
2016
|
-
*/
|
|
2017
|
-
async sendAckCreate(data) {
|
|
2018
|
-
const response = await this.client.request("POST", "/cfg/centrifugo/testing/send-ack/", { body: data });
|
|
2019
|
-
return response;
|
|
2020
|
-
}
|
|
2021
|
-
};
|
|
2022
|
-
|
|
2023
1838
|
// src/_api/generated/cfg_centrifugo/http.ts
|
|
2024
1839
|
var FetchAdapter2 = class {
|
|
2025
1840
|
static {
|
|
@@ -2396,10 +2211,7 @@ var APIClient2 = class {
|
|
|
2396
2211
|
if (options?.retryConfig !== void 0) {
|
|
2397
2212
|
this.retryConfig = options.retryConfig;
|
|
2398
2213
|
}
|
|
2399
|
-
this.centrifugo_admin_api = new CentrifugoAdminApi(this);
|
|
2400
2214
|
this.centrifugo_auth = new CentrifugoAuth(this);
|
|
2401
|
-
this.centrifugo_monitoring = new CentrifugoMonitoring(this);
|
|
2402
|
-
this.centrifugo_testing = new CentrifugoTesting(this);
|
|
2403
2215
|
}
|
|
2404
2216
|
static {
|
|
2405
2217
|
__name(this, "APIClient");
|
|
@@ -2534,43 +2346,47 @@ var APIClient2 = class {
|
|
|
2534
2346
|
if (error instanceof APIError2) {
|
|
2535
2347
|
throw error;
|
|
2536
2348
|
}
|
|
2537
|
-
|
|
2349
|
+
let possiblyCors = false;
|
|
2350
|
+
if (error instanceof TypeError && typeof window !== "undefined") {
|
|
2351
|
+
try {
|
|
2352
|
+
const isCrossOrigin = (() => {
|
|
2353
|
+
try {
|
|
2354
|
+
return new URL(url).origin !== window.location.origin;
|
|
2355
|
+
} catch {
|
|
2356
|
+
return false;
|
|
2357
|
+
}
|
|
2358
|
+
})();
|
|
2359
|
+
if (isCrossOrigin) {
|
|
2360
|
+
const entries = performance.getEntriesByName(url, "resource");
|
|
2361
|
+
if (entries.length > 0) {
|
|
2362
|
+
const last = entries[entries.length - 1];
|
|
2363
|
+
possiblyCors = "responseStatus" in last && last.responseStatus === 0;
|
|
2364
|
+
}
|
|
2365
|
+
}
|
|
2366
|
+
} catch {
|
|
2367
|
+
}
|
|
2368
|
+
}
|
|
2538
2369
|
if (this.logger) {
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
this.logger.error(` \u2192
|
|
2543
|
-
} else {
|
|
2544
|
-
this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
|
|
2545
|
-
this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
|
|
2370
|
+
this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
|
|
2371
|
+
this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
|
|
2372
|
+
if (possiblyCors) {
|
|
2373
|
+
this.logger.error(` \u2192 Possibly blocked by CORS policy (configure CORS on the server)`);
|
|
2546
2374
|
}
|
|
2547
2375
|
}
|
|
2548
2376
|
if (typeof window !== "undefined") {
|
|
2549
2377
|
try {
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
window.dispatchEvent(new CustomEvent("network-error", {
|
|
2563
|
-
detail: {
|
|
2564
|
-
url,
|
|
2565
|
-
method,
|
|
2566
|
-
error: error instanceof Error ? error.message : String(error),
|
|
2567
|
-
timestamp: /* @__PURE__ */ new Date()
|
|
2568
|
-
},
|
|
2569
|
-
bubbles: true,
|
|
2570
|
-
cancelable: false
|
|
2571
|
-
}));
|
|
2572
|
-
}
|
|
2573
|
-
} catch (eventError) {
|
|
2378
|
+
window.dispatchEvent(new CustomEvent("network-error", {
|
|
2379
|
+
detail: {
|
|
2380
|
+
url,
|
|
2381
|
+
method,
|
|
2382
|
+
error: error instanceof Error ? error.message : String(error),
|
|
2383
|
+
possibly_cors: possiblyCors,
|
|
2384
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
2385
|
+
},
|
|
2386
|
+
bubbles: true,
|
|
2387
|
+
cancelable: false
|
|
2388
|
+
}));
|
|
2389
|
+
} catch {
|
|
2574
2390
|
}
|
|
2575
2391
|
}
|
|
2576
2392
|
const networkError = error instanceof Error ? new NetworkError2(error.message, url, error) : new NetworkError2("Unknown error", url);
|
|
@@ -2642,334 +2458,17 @@ var LocalStorageAdapter2 = class {
|
|
|
2642
2458
|
}
|
|
2643
2459
|
};
|
|
2644
2460
|
|
|
2645
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelInfo.schema.ts
|
|
2646
|
-
var import_zod22 = require("zod");
|
|
2647
|
-
var CentrifugoChannelInfoSchema = import_zod22.z.object({
|
|
2648
|
-
num_clients: import_zod22.z.number().int()
|
|
2649
|
-
});
|
|
2650
|
-
|
|
2651
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts
|
|
2652
|
-
var import_zod23 = require("zod");
|
|
2653
|
-
var CentrifugoChannelsRequestRequestSchema = import_zod23.z.object({
|
|
2654
|
-
pattern: import_zod23.z.string().nullable().optional()
|
|
2655
|
-
});
|
|
2656
|
-
|
|
2657
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts
|
|
2658
|
-
var import_zod26 = require("zod");
|
|
2659
|
-
|
|
2660
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResult.schema.ts
|
|
2661
|
-
var import_zod24 = require("zod");
|
|
2662
|
-
var CentrifugoChannelsResultSchema = import_zod24.z.object({
|
|
2663
|
-
channels: import_zod24.z.record(import_zod24.z.string(), CentrifugoChannelInfoSchema)
|
|
2664
|
-
});
|
|
2665
|
-
|
|
2666
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoError.schema.ts
|
|
2667
|
-
var import_zod25 = require("zod");
|
|
2668
|
-
var CentrifugoErrorSchema = import_zod25.z.object({
|
|
2669
|
-
code: import_zod25.z.number().int().optional(),
|
|
2670
|
-
message: import_zod25.z.string().optional()
|
|
2671
|
-
});
|
|
2672
|
-
|
|
2673
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts
|
|
2674
|
-
var CentrifugoChannelsResponseSchema = import_zod26.z.object({
|
|
2675
|
-
error: CentrifugoErrorSchema.nullable().optional(),
|
|
2676
|
-
result: CentrifugoChannelsResultSchema.nullable().optional()
|
|
2677
|
-
});
|
|
2678
|
-
|
|
2679
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoClientInfo.schema.ts
|
|
2680
|
-
var import_zod27 = require("zod");
|
|
2681
|
-
var CentrifugoClientInfoSchema = import_zod27.z.object({
|
|
2682
|
-
user: import_zod27.z.string(),
|
|
2683
|
-
client: import_zod27.z.string(),
|
|
2684
|
-
conn_info: import_zod27.z.record(import_zod27.z.string(), import_zod27.z.any()).nullable().optional(),
|
|
2685
|
-
chan_info: import_zod27.z.record(import_zod27.z.string(), import_zod27.z.any()).nullable().optional()
|
|
2686
|
-
});
|
|
2687
|
-
|
|
2688
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHealthCheck.schema.ts
|
|
2689
|
-
var import_zod28 = require("zod");
|
|
2690
|
-
var CentrifugoHealthCheckSchema = import_zod28.z.object({
|
|
2691
|
-
status: import_zod28.z.string(),
|
|
2692
|
-
wrapper_url: import_zod28.z.string(),
|
|
2693
|
-
has_api_key: import_zod28.z.boolean(),
|
|
2694
|
-
timestamp: import_zod28.z.string()
|
|
2695
|
-
});
|
|
2696
|
-
|
|
2697
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts
|
|
2698
|
-
var import_zod30 = require("zod");
|
|
2699
|
-
|
|
2700
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoStreamPosition.schema.ts
|
|
2701
|
-
var import_zod29 = require("zod");
|
|
2702
|
-
var CentrifugoStreamPositionSchema = import_zod29.z.object({
|
|
2703
|
-
offset: import_zod29.z.number().int(),
|
|
2704
|
-
epoch: import_zod29.z.string()
|
|
2705
|
-
});
|
|
2706
|
-
|
|
2707
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts
|
|
2708
|
-
var CentrifugoHistoryRequestRequestSchema = import_zod30.z.object({
|
|
2709
|
-
channel: import_zod30.z.string(),
|
|
2710
|
-
limit: import_zod30.z.number().int().nullable().optional(),
|
|
2711
|
-
since: CentrifugoStreamPositionSchema.nullable().optional(),
|
|
2712
|
-
reverse: import_zod30.z.boolean().nullable().optional()
|
|
2713
|
-
});
|
|
2714
|
-
|
|
2715
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts
|
|
2716
|
-
var import_zod33 = require("zod");
|
|
2717
|
-
|
|
2718
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts
|
|
2719
|
-
var import_zod32 = require("zod");
|
|
2720
|
-
|
|
2721
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPublication.schema.ts
|
|
2722
|
-
var import_zod31 = require("zod");
|
|
2723
|
-
var CentrifugoPublicationSchema = import_zod31.z.object({
|
|
2724
|
-
data: import_zod31.z.record(import_zod31.z.string(), import_zod31.z.any()),
|
|
2725
|
-
info: CentrifugoClientInfoSchema.nullable().optional(),
|
|
2726
|
-
offset: import_zod31.z.number().int(),
|
|
2727
|
-
tags: import_zod31.z.record(import_zod31.z.string(), import_zod31.z.any()).nullable().optional()
|
|
2728
|
-
});
|
|
2729
|
-
|
|
2730
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts
|
|
2731
|
-
var CentrifugoHistoryResultSchema = import_zod32.z.object({
|
|
2732
|
-
publications: import_zod32.z.array(CentrifugoPublicationSchema),
|
|
2733
|
-
epoch: import_zod32.z.string(),
|
|
2734
|
-
offset: import_zod32.z.number().int()
|
|
2735
|
-
});
|
|
2736
|
-
|
|
2737
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts
|
|
2738
|
-
var CentrifugoHistoryResponseSchema = import_zod33.z.object({
|
|
2739
|
-
error: CentrifugoErrorSchema.nullable().optional(),
|
|
2740
|
-
result: CentrifugoHistoryResultSchema.nullable().optional()
|
|
2741
|
-
});
|
|
2742
|
-
|
|
2743
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts
|
|
2744
|
-
var import_zod38 = require("zod");
|
|
2745
|
-
|
|
2746
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts
|
|
2747
|
-
var import_zod37 = require("zod");
|
|
2748
|
-
|
|
2749
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts
|
|
2750
|
-
var import_zod36 = require("zod");
|
|
2751
|
-
|
|
2752
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoMetrics.schema.ts
|
|
2753
|
-
var import_zod34 = require("zod");
|
|
2754
|
-
var CentrifugoMetricsSchema = import_zod34.z.object({
|
|
2755
|
-
interval: import_zod34.z.number(),
|
|
2756
|
-
items: import_zod34.z.record(import_zod34.z.string(), import_zod34.z.number())
|
|
2757
|
-
});
|
|
2758
|
-
|
|
2759
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoProcess.schema.ts
|
|
2760
|
-
var import_zod35 = require("zod");
|
|
2761
|
-
var CentrifugoProcessSchema = import_zod35.z.object({
|
|
2762
|
-
cpu: import_zod35.z.number(),
|
|
2763
|
-
rss: import_zod35.z.number().int()
|
|
2764
|
-
});
|
|
2765
|
-
|
|
2766
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts
|
|
2767
|
-
var CentrifugoNodeInfoSchema = import_zod36.z.object({
|
|
2768
|
-
uid: import_zod36.z.string(),
|
|
2769
|
-
name: import_zod36.z.string(),
|
|
2770
|
-
version: import_zod36.z.string(),
|
|
2771
|
-
num_clients: import_zod36.z.number().int(),
|
|
2772
|
-
num_users: import_zod36.z.number().int(),
|
|
2773
|
-
num_channels: import_zod36.z.number().int(),
|
|
2774
|
-
uptime: import_zod36.z.number().int(),
|
|
2775
|
-
num_subs: import_zod36.z.number().int(),
|
|
2776
|
-
metrics: CentrifugoMetricsSchema.nullable().optional(),
|
|
2777
|
-
process: CentrifugoProcessSchema.nullable().optional()
|
|
2778
|
-
});
|
|
2779
|
-
|
|
2780
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts
|
|
2781
|
-
var CentrifugoInfoResultSchema = import_zod37.z.object({
|
|
2782
|
-
nodes: import_zod37.z.array(CentrifugoNodeInfoSchema)
|
|
2783
|
-
});
|
|
2784
|
-
|
|
2785
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts
|
|
2786
|
-
var CentrifugoInfoResponseSchema = import_zod38.z.object({
|
|
2787
|
-
error: CentrifugoErrorSchema.nullable().optional(),
|
|
2788
|
-
result: CentrifugoInfoResultSchema.nullable().optional()
|
|
2789
|
-
});
|
|
2790
|
-
|
|
2791
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoOverviewStats.schema.ts
|
|
2792
|
-
var import_zod39 = require("zod");
|
|
2793
|
-
var CentrifugoOverviewStatsSchema = import_zod39.z.object({
|
|
2794
|
-
total: import_zod39.z.number().int(),
|
|
2795
|
-
successful: import_zod39.z.number().int(),
|
|
2796
|
-
failed: import_zod39.z.number().int(),
|
|
2797
|
-
timeout: import_zod39.z.number().int(),
|
|
2798
|
-
success_rate: import_zod39.z.number(),
|
|
2799
|
-
avg_duration_ms: import_zod39.z.number(),
|
|
2800
|
-
avg_acks_received: import_zod39.z.number(),
|
|
2801
|
-
period_hours: import_zod39.z.number().int()
|
|
2802
|
-
});
|
|
2803
|
-
|
|
2804
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts
|
|
2805
|
-
var import_zod40 = require("zod");
|
|
2806
|
-
var CentrifugoPresenceRequestRequestSchema = import_zod40.z.object({
|
|
2807
|
-
channel: import_zod40.z.string()
|
|
2808
|
-
});
|
|
2809
|
-
|
|
2810
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts
|
|
2811
|
-
var import_zod42 = require("zod");
|
|
2812
|
-
|
|
2813
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResult.schema.ts
|
|
2814
|
-
var import_zod41 = require("zod");
|
|
2815
|
-
var CentrifugoPresenceResultSchema = import_zod41.z.object({
|
|
2816
|
-
presence: import_zod41.z.record(import_zod41.z.string(), CentrifugoClientInfoSchema)
|
|
2817
|
-
});
|
|
2818
|
-
|
|
2819
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts
|
|
2820
|
-
var CentrifugoPresenceResponseSchema = import_zod42.z.object({
|
|
2821
|
-
error: CentrifugoErrorSchema.nullable().optional(),
|
|
2822
|
-
result: CentrifugoPresenceResultSchema.nullable().optional()
|
|
2823
|
-
});
|
|
2824
|
-
|
|
2825
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts
|
|
2826
|
-
var import_zod43 = require("zod");
|
|
2827
|
-
var CentrifugoPresenceStatsRequestRequestSchema = import_zod43.z.object({
|
|
2828
|
-
channel: import_zod43.z.string()
|
|
2829
|
-
});
|
|
2830
|
-
|
|
2831
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts
|
|
2832
|
-
var import_zod45 = require("zod");
|
|
2833
|
-
|
|
2834
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts
|
|
2835
|
-
var import_zod44 = require("zod");
|
|
2836
|
-
var CentrifugoPresenceStatsResultSchema = import_zod44.z.object({
|
|
2837
|
-
num_clients: import_zod44.z.number().int(),
|
|
2838
|
-
num_users: import_zod44.z.number().int()
|
|
2839
|
-
});
|
|
2840
|
-
|
|
2841
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts
|
|
2842
|
-
var CentrifugoPresenceStatsResponseSchema = import_zod45.z.object({
|
|
2843
|
-
error: CentrifugoErrorSchema.nullable().optional(),
|
|
2844
|
-
result: CentrifugoPresenceStatsResultSchema.nullable().optional()
|
|
2845
|
-
});
|
|
2846
|
-
|
|
2847
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts
|
|
2848
|
-
var import_zod47 = require("zod");
|
|
2849
|
-
|
|
2850
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelStats.schema.ts
|
|
2851
|
-
var import_zod46 = require("zod");
|
|
2852
|
-
var ChannelStatsSchema = import_zod46.z.object({
|
|
2853
|
-
channel: import_zod46.z.string(),
|
|
2854
|
-
total: import_zod46.z.number().int(),
|
|
2855
|
-
successful: import_zod46.z.number().int(),
|
|
2856
|
-
failed: import_zod46.z.number().int(),
|
|
2857
|
-
avg_duration_ms: import_zod46.z.number(),
|
|
2858
|
-
avg_acks: import_zod46.z.number(),
|
|
2859
|
-
last_activity_at: import_zod46.z.string().nullable()
|
|
2860
|
-
});
|
|
2861
|
-
|
|
2862
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts
|
|
2863
|
-
var ChannelListSchema = import_zod47.z.object({
|
|
2864
|
-
channels: import_zod47.z.array(ChannelStatsSchema),
|
|
2865
|
-
total_channels: import_zod47.z.number().int()
|
|
2866
|
-
});
|
|
2867
|
-
|
|
2868
2461
|
// src/_api/generated/cfg_centrifugo/_utils/schemas/ConnectionTokenResponse.schema.ts
|
|
2869
|
-
var
|
|
2870
|
-
var ConnectionTokenResponseSchema =
|
|
2871
|
-
token:
|
|
2872
|
-
centrifugo_url:
|
|
2873
|
-
expires_at:
|
|
2874
|
-
channels:
|
|
2875
|
-
});
|
|
2876
|
-
|
|
2877
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/ManualAckRequestRequest.schema.ts
|
|
2878
|
-
var import_zod49 = require("zod");
|
|
2879
|
-
var ManualAckRequestRequestSchema = import_zod49.z.object({
|
|
2880
|
-
message_id: import_zod49.z.string(),
|
|
2881
|
-
client_id: import_zod49.z.string()
|
|
2882
|
-
});
|
|
2883
|
-
|
|
2884
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/ManualAckResponse.schema.ts
|
|
2885
|
-
var import_zod50 = require("zod");
|
|
2886
|
-
var ManualAckResponseSchema = import_zod50.z.object({
|
|
2887
|
-
success: import_zod50.z.boolean(),
|
|
2888
|
-
message_id: import_zod50.z.string(),
|
|
2889
|
-
error: import_zod50.z.string().nullable().optional()
|
|
2890
|
-
});
|
|
2891
|
-
|
|
2892
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts
|
|
2893
|
-
var import_zod52 = require("zod");
|
|
2894
|
-
|
|
2895
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/Publish.schema.ts
|
|
2896
|
-
var import_zod51 = require("zod");
|
|
2897
|
-
var PublishSchema = import_zod51.z.object({
|
|
2898
|
-
message_id: import_zod51.z.string(),
|
|
2899
|
-
channel: import_zod51.z.string(),
|
|
2900
|
-
status: import_zod51.z.string(),
|
|
2901
|
-
wait_for_ack: import_zod51.z.boolean(),
|
|
2902
|
-
acks_received: import_zod51.z.number().int(),
|
|
2903
|
-
acks_expected: import_zod51.z.number().int().nullable(),
|
|
2904
|
-
duration_ms: import_zod51.z.number().nullable(),
|
|
2905
|
-
created_at: import_zod51.z.string().datetime({ offset: true }),
|
|
2906
|
-
completed_at: import_zod51.z.string().datetime({ offset: true }).nullable(),
|
|
2907
|
-
error_code: import_zod51.z.string().nullable(),
|
|
2908
|
-
error_message: import_zod51.z.string().nullable()
|
|
2909
|
-
});
|
|
2910
|
-
|
|
2911
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts
|
|
2912
|
-
var PaginatedPublishListSchema = import_zod52.z.object({
|
|
2913
|
-
count: import_zod52.z.number().int(),
|
|
2914
|
-
page: import_zod52.z.number().int(),
|
|
2915
|
-
pages: import_zod52.z.number().int(),
|
|
2916
|
-
page_size: import_zod52.z.number().int(),
|
|
2917
|
-
has_next: import_zod52.z.boolean(),
|
|
2918
|
-
has_previous: import_zod52.z.boolean(),
|
|
2919
|
-
next_page: import_zod52.z.number().int().nullable().optional(),
|
|
2920
|
-
previous_page: import_zod52.z.number().int().nullable().optional(),
|
|
2921
|
-
results: import_zod52.z.array(PublishSchema)
|
|
2922
|
-
});
|
|
2923
|
-
|
|
2924
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/PublishTestRequestRequest.schema.ts
|
|
2925
|
-
var import_zod53 = require("zod");
|
|
2926
|
-
var PublishTestRequestRequestSchema = import_zod53.z.object({
|
|
2927
|
-
channel: import_zod53.z.string(),
|
|
2928
|
-
data: import_zod53.z.record(import_zod53.z.string(), import_zod53.z.any()),
|
|
2929
|
-
wait_for_ack: import_zod53.z.boolean().optional(),
|
|
2930
|
-
ack_timeout: import_zod53.z.number().int().min(1).max(60).optional()
|
|
2931
|
-
});
|
|
2932
|
-
|
|
2933
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/PublishTestResponse.schema.ts
|
|
2934
|
-
var import_zod54 = require("zod");
|
|
2935
|
-
var PublishTestResponseSchema = import_zod54.z.object({
|
|
2936
|
-
success: import_zod54.z.boolean(),
|
|
2937
|
-
message_id: import_zod54.z.string(),
|
|
2938
|
-
channel: import_zod54.z.string(),
|
|
2939
|
-
acks_received: import_zod54.z.number().int().optional(),
|
|
2940
|
-
delivered: import_zod54.z.boolean().optional(),
|
|
2941
|
-
error: import_zod54.z.string().nullable().optional()
|
|
2942
|
-
});
|
|
2943
|
-
|
|
2944
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/TimelineItem.schema.ts
|
|
2945
|
-
var import_zod55 = require("zod");
|
|
2946
|
-
var TimelineItemSchema = import_zod55.z.object({
|
|
2947
|
-
timestamp: import_zod55.z.string(),
|
|
2948
|
-
count: import_zod55.z.number().int(),
|
|
2949
|
-
successful: import_zod55.z.number().int(),
|
|
2950
|
-
failed: import_zod55.z.number().int(),
|
|
2951
|
-
timeout: import_zod55.z.number().int()
|
|
2952
|
-
});
|
|
2953
|
-
|
|
2954
|
-
// src/_api/generated/cfg_centrifugo/_utils/schemas/TimelineResponse.schema.ts
|
|
2955
|
-
var import_zod56 = require("zod");
|
|
2956
|
-
var TimelineResponseSchema = import_zod56.z.object({
|
|
2957
|
-
timeline: import_zod56.z.array(TimelineItemSchema),
|
|
2958
|
-
period_hours: import_zod56.z.number().int(),
|
|
2959
|
-
interval: import_zod56.z.string()
|
|
2462
|
+
var import_zod22 = require("zod");
|
|
2463
|
+
var ConnectionTokenResponseSchema = import_zod22.z.object({
|
|
2464
|
+
token: import_zod22.z.string(),
|
|
2465
|
+
centrifugo_url: import_zod22.z.string(),
|
|
2466
|
+
expires_at: import_zod22.z.string(),
|
|
2467
|
+
channels: import_zod22.z.array(import_zod22.z.string())
|
|
2960
2468
|
});
|
|
2961
2469
|
|
|
2962
|
-
// src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_admin_api.ts
|
|
2963
|
-
var import_consola8 = require("consola");
|
|
2964
|
-
|
|
2965
2470
|
// src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_auth.ts
|
|
2966
|
-
var
|
|
2967
|
-
|
|
2968
|
-
// src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_monitoring.ts
|
|
2969
|
-
var import_consola10 = require("consola");
|
|
2970
|
-
|
|
2971
|
-
// src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_testing.ts
|
|
2972
|
-
var import_consola11 = require("consola");
|
|
2471
|
+
var import_consola8 = require("consola");
|
|
2973
2472
|
|
|
2974
2473
|
// src/_api/generated/cfg_centrifugo/index.ts
|
|
2975
2474
|
var TOKEN_KEY2 = "auth_token";
|
|
@@ -3006,10 +2505,7 @@ var API2 = class {
|
|
|
3006
2505
|
tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
|
|
3007
2506
|
});
|
|
3008
2507
|
this._injectAuthHeader();
|
|
3009
|
-
this.centrifugo_admin_api = this._client.centrifugo_admin_api;
|
|
3010
2508
|
this.centrifugo_auth = this._client.centrifugo_auth;
|
|
3011
|
-
this.centrifugo_monitoring = this._client.centrifugo_monitoring;
|
|
3012
|
-
this.centrifugo_testing = this._client.centrifugo_testing;
|
|
3013
2509
|
}
|
|
3014
2510
|
static {
|
|
3015
2511
|
__name(this, "API");
|
|
@@ -3026,10 +2522,7 @@ var API2 = class {
|
|
|
3026
2522
|
tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
|
|
3027
2523
|
});
|
|
3028
2524
|
this._injectAuthHeader();
|
|
3029
|
-
this.centrifugo_admin_api = this._client.centrifugo_admin_api;
|
|
3030
2525
|
this.centrifugo_auth = this._client.centrifugo_auth;
|
|
3031
|
-
this.centrifugo_monitoring = this._client.centrifugo_monitoring;
|
|
3032
|
-
this.centrifugo_testing = this._client.centrifugo_testing;
|
|
3033
2526
|
}
|
|
3034
2527
|
_injectAuthHeader() {
|
|
3035
2528
|
const originalRequest = this._client.request.bind(this._client);
|
|
@@ -3407,7 +2900,7 @@ var NetworkError3 = class extends Error {
|
|
|
3407
2900
|
};
|
|
3408
2901
|
|
|
3409
2902
|
// src/_api/generated/cfg_totp/logger.ts
|
|
3410
|
-
var
|
|
2903
|
+
var import_consola9 = require("consola");
|
|
3411
2904
|
var DEFAULT_CONFIG3 = {
|
|
3412
2905
|
enabled: process.env.NODE_ENV !== "production",
|
|
3413
2906
|
logRequests: true,
|
|
@@ -3429,7 +2922,7 @@ var APILogger3 = class {
|
|
|
3429
2922
|
}
|
|
3430
2923
|
constructor(config = {}) {
|
|
3431
2924
|
this.config = { ...DEFAULT_CONFIG3, ...config };
|
|
3432
|
-
this.consola = config.consola || (0,
|
|
2925
|
+
this.consola = config.consola || (0, import_consola9.createConsola)({
|
|
3433
2926
|
level: this.config.enabled ? 4 : 0
|
|
3434
2927
|
});
|
|
3435
2928
|
}
|
|
@@ -3774,43 +3267,47 @@ var APIClient3 = class {
|
|
|
3774
3267
|
if (error instanceof APIError3) {
|
|
3775
3268
|
throw error;
|
|
3776
3269
|
}
|
|
3777
|
-
|
|
3270
|
+
let possiblyCors = false;
|
|
3271
|
+
if (error instanceof TypeError && typeof window !== "undefined") {
|
|
3272
|
+
try {
|
|
3273
|
+
const isCrossOrigin = (() => {
|
|
3274
|
+
try {
|
|
3275
|
+
return new URL(url).origin !== window.location.origin;
|
|
3276
|
+
} catch {
|
|
3277
|
+
return false;
|
|
3278
|
+
}
|
|
3279
|
+
})();
|
|
3280
|
+
if (isCrossOrigin) {
|
|
3281
|
+
const entries = performance.getEntriesByName(url, "resource");
|
|
3282
|
+
if (entries.length > 0) {
|
|
3283
|
+
const last = entries[entries.length - 1];
|
|
3284
|
+
possiblyCors = "responseStatus" in last && last.responseStatus === 0;
|
|
3285
|
+
}
|
|
3286
|
+
}
|
|
3287
|
+
} catch {
|
|
3288
|
+
}
|
|
3289
|
+
}
|
|
3778
3290
|
if (this.logger) {
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
this.logger.error(` \u2192
|
|
3783
|
-
} else {
|
|
3784
|
-
this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
|
|
3785
|
-
this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
|
|
3291
|
+
this.logger.error(`\u26A0\uFE0F Network Error: ${method} ${url}`);
|
|
3292
|
+
this.logger.error(` \u2192 ${error instanceof Error ? error.message : String(error)}`);
|
|
3293
|
+
if (possiblyCors) {
|
|
3294
|
+
this.logger.error(` \u2192 Possibly blocked by CORS policy (configure CORS on the server)`);
|
|
3786
3295
|
}
|
|
3787
3296
|
}
|
|
3788
3297
|
if (typeof window !== "undefined") {
|
|
3789
3298
|
try {
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
window.dispatchEvent(new CustomEvent("network-error", {
|
|
3803
|
-
detail: {
|
|
3804
|
-
url,
|
|
3805
|
-
method,
|
|
3806
|
-
error: error instanceof Error ? error.message : String(error),
|
|
3807
|
-
timestamp: /* @__PURE__ */ new Date()
|
|
3808
|
-
},
|
|
3809
|
-
bubbles: true,
|
|
3810
|
-
cancelable: false
|
|
3811
|
-
}));
|
|
3812
|
-
}
|
|
3813
|
-
} catch (eventError) {
|
|
3299
|
+
window.dispatchEvent(new CustomEvent("network-error", {
|
|
3300
|
+
detail: {
|
|
3301
|
+
url,
|
|
3302
|
+
method,
|
|
3303
|
+
error: error instanceof Error ? error.message : String(error),
|
|
3304
|
+
possibly_cors: possiblyCors,
|
|
3305
|
+
timestamp: /* @__PURE__ */ new Date()
|
|
3306
|
+
},
|
|
3307
|
+
bubbles: true,
|
|
3308
|
+
cancelable: false
|
|
3309
|
+
}));
|
|
3310
|
+
} catch {
|
|
3814
3311
|
}
|
|
3815
3312
|
}
|
|
3816
3313
|
const networkError = error instanceof Error ? new NetworkError3(error.message, url, error) : new NetworkError3("Unknown error", url);
|
|
@@ -3891,154 +3388,154 @@ var DeviceListStatus = /* @__PURE__ */ ((DeviceListStatus2) => {
|
|
|
3891
3388
|
})(DeviceListStatus || {});
|
|
3892
3389
|
|
|
3893
3390
|
// src/_api/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateRequest.schema.ts
|
|
3894
|
-
var
|
|
3895
|
-
var BackupCodesRegenerateRequestSchema =
|
|
3896
|
-
code:
|
|
3391
|
+
var import_zod23 = require("zod");
|
|
3392
|
+
var BackupCodesRegenerateRequestSchema = import_zod23.z.object({
|
|
3393
|
+
code: import_zod23.z.string().min(6).max(6)
|
|
3897
3394
|
});
|
|
3898
3395
|
|
|
3899
3396
|
// src/_api/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateResponse.schema.ts
|
|
3900
|
-
var
|
|
3901
|
-
var BackupCodesRegenerateResponseSchema =
|
|
3902
|
-
backup_codes:
|
|
3903
|
-
warning:
|
|
3397
|
+
var import_zod24 = require("zod");
|
|
3398
|
+
var BackupCodesRegenerateResponseSchema = import_zod24.z.object({
|
|
3399
|
+
backup_codes: import_zod24.z.array(import_zod24.z.string()),
|
|
3400
|
+
warning: import_zod24.z.string()
|
|
3904
3401
|
});
|
|
3905
3402
|
|
|
3906
3403
|
// src/_api/generated/cfg_totp/_utils/schemas/BackupCodesStatus.schema.ts
|
|
3907
|
-
var
|
|
3908
|
-
var BackupCodesStatusSchema =
|
|
3909
|
-
remaining_count:
|
|
3910
|
-
total_generated:
|
|
3911
|
-
warning:
|
|
3404
|
+
var import_zod25 = require("zod");
|
|
3405
|
+
var BackupCodesStatusSchema = import_zod25.z.object({
|
|
3406
|
+
remaining_count: import_zod25.z.number().int(),
|
|
3407
|
+
total_generated: import_zod25.z.number().int(),
|
|
3408
|
+
warning: import_zod25.z.string().nullable().optional()
|
|
3912
3409
|
});
|
|
3913
3410
|
|
|
3914
3411
|
// src/_api/generated/cfg_totp/_utils/schemas/ConfirmSetupRequest.schema.ts
|
|
3915
|
-
var
|
|
3916
|
-
var ConfirmSetupRequestSchema =
|
|
3917
|
-
device_id:
|
|
3918
|
-
code:
|
|
3412
|
+
var import_zod26 = require("zod");
|
|
3413
|
+
var ConfirmSetupRequestSchema = import_zod26.z.object({
|
|
3414
|
+
device_id: import_zod26.z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
|
|
3415
|
+
code: import_zod26.z.string().min(6).max(6)
|
|
3919
3416
|
});
|
|
3920
3417
|
|
|
3921
3418
|
// src/_api/generated/cfg_totp/_utils/schemas/ConfirmSetupResponse.schema.ts
|
|
3922
|
-
var
|
|
3923
|
-
var ConfirmSetupResponseSchema =
|
|
3924
|
-
message:
|
|
3925
|
-
backup_codes:
|
|
3926
|
-
backup_codes_warning:
|
|
3419
|
+
var import_zod27 = require("zod");
|
|
3420
|
+
var ConfirmSetupResponseSchema = import_zod27.z.object({
|
|
3421
|
+
message: import_zod27.z.string(),
|
|
3422
|
+
backup_codes: import_zod27.z.array(import_zod27.z.string()),
|
|
3423
|
+
backup_codes_warning: import_zod27.z.string()
|
|
3927
3424
|
});
|
|
3928
3425
|
|
|
3929
3426
|
// src/_api/generated/cfg_totp/_utils/schemas/DeviceList.schema.ts
|
|
3930
|
-
var
|
|
3931
|
-
var DeviceListSchema =
|
|
3932
|
-
id:
|
|
3933
|
-
name:
|
|
3934
|
-
is_primary:
|
|
3935
|
-
status:
|
|
3936
|
-
created_at:
|
|
3937
|
-
confirmed_at:
|
|
3938
|
-
last_used_at:
|
|
3427
|
+
var import_zod28 = require("zod");
|
|
3428
|
+
var DeviceListSchema = import_zod28.z.object({
|
|
3429
|
+
id: import_zod28.z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
|
|
3430
|
+
name: import_zod28.z.string(),
|
|
3431
|
+
is_primary: import_zod28.z.boolean(),
|
|
3432
|
+
status: import_zod28.z.nativeEnum(DeviceListStatus),
|
|
3433
|
+
created_at: import_zod28.z.string().datetime({ offset: true }),
|
|
3434
|
+
confirmed_at: import_zod28.z.string().datetime({ offset: true }).nullable(),
|
|
3435
|
+
last_used_at: import_zod28.z.string().datetime({ offset: true }).nullable()
|
|
3939
3436
|
});
|
|
3940
3437
|
|
|
3941
3438
|
// src/_api/generated/cfg_totp/_utils/schemas/DeviceListResponse.schema.ts
|
|
3942
|
-
var
|
|
3943
|
-
var DeviceListResponseSchema =
|
|
3944
|
-
devices:
|
|
3945
|
-
has_2fa_enabled:
|
|
3439
|
+
var import_zod29 = require("zod");
|
|
3440
|
+
var DeviceListResponseSchema = import_zod29.z.object({
|
|
3441
|
+
devices: import_zod29.z.array(DeviceListSchema),
|
|
3442
|
+
has_2fa_enabled: import_zod29.z.boolean()
|
|
3946
3443
|
});
|
|
3947
3444
|
|
|
3948
3445
|
// src/_api/generated/cfg_totp/_utils/schemas/DisableRequest.schema.ts
|
|
3949
|
-
var
|
|
3950
|
-
var DisableRequestSchema =
|
|
3951
|
-
code:
|
|
3446
|
+
var import_zod30 = require("zod");
|
|
3447
|
+
var DisableRequestSchema = import_zod30.z.object({
|
|
3448
|
+
code: import_zod30.z.string().min(6).max(6)
|
|
3952
3449
|
});
|
|
3953
3450
|
|
|
3954
3451
|
// src/_api/generated/cfg_totp/_utils/schemas/PaginatedDeviceListResponseList.schema.ts
|
|
3955
|
-
var
|
|
3956
|
-
var PaginatedDeviceListResponseListSchema =
|
|
3957
|
-
count:
|
|
3958
|
-
page:
|
|
3959
|
-
pages:
|
|
3960
|
-
page_size:
|
|
3961
|
-
has_next:
|
|
3962
|
-
has_previous:
|
|
3963
|
-
next_page:
|
|
3964
|
-
previous_page:
|
|
3965
|
-
results:
|
|
3452
|
+
var import_zod31 = require("zod");
|
|
3453
|
+
var PaginatedDeviceListResponseListSchema = import_zod31.z.object({
|
|
3454
|
+
count: import_zod31.z.number().int(),
|
|
3455
|
+
page: import_zod31.z.number().int(),
|
|
3456
|
+
pages: import_zod31.z.number().int(),
|
|
3457
|
+
page_size: import_zod31.z.number().int(),
|
|
3458
|
+
has_next: import_zod31.z.boolean(),
|
|
3459
|
+
has_previous: import_zod31.z.boolean(),
|
|
3460
|
+
next_page: import_zod31.z.number().int().nullable().optional(),
|
|
3461
|
+
previous_page: import_zod31.z.number().int().nullable().optional(),
|
|
3462
|
+
results: import_zod31.z.array(DeviceListResponseSchema)
|
|
3966
3463
|
});
|
|
3967
3464
|
|
|
3968
3465
|
// src/_api/generated/cfg_totp/_utils/schemas/SetupRequest.schema.ts
|
|
3969
|
-
var
|
|
3970
|
-
var SetupRequestSchema =
|
|
3971
|
-
device_name:
|
|
3466
|
+
var import_zod32 = require("zod");
|
|
3467
|
+
var SetupRequestSchema = import_zod32.z.object({
|
|
3468
|
+
device_name: import_zod32.z.string().min(1).max(100).optional()
|
|
3972
3469
|
});
|
|
3973
3470
|
|
|
3974
3471
|
// src/_api/generated/cfg_totp/_utils/schemas/SetupResponse.schema.ts
|
|
3975
|
-
var
|
|
3976
|
-
var SetupResponseSchema =
|
|
3977
|
-
device_id:
|
|
3978
|
-
secret:
|
|
3979
|
-
provisioning_uri:
|
|
3980
|
-
qr_code_base64:
|
|
3981
|
-
expires_in:
|
|
3472
|
+
var import_zod33 = require("zod");
|
|
3473
|
+
var SetupResponseSchema = import_zod33.z.object({
|
|
3474
|
+
device_id: import_zod33.z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
|
|
3475
|
+
secret: import_zod33.z.string(),
|
|
3476
|
+
provisioning_uri: import_zod33.z.string(),
|
|
3477
|
+
qr_code_base64: import_zod33.z.string(),
|
|
3478
|
+
expires_in: import_zod33.z.number().int()
|
|
3982
3479
|
});
|
|
3983
3480
|
|
|
3984
3481
|
// src/_api/generated/cfg_totp/_utils/schemas/TotpVerifyUser.schema.ts
|
|
3985
|
-
var
|
|
3986
|
-
var TotpVerifyUserSchema =
|
|
3987
|
-
id:
|
|
3988
|
-
email:
|
|
3989
|
-
first_name:
|
|
3990
|
-
last_name:
|
|
3991
|
-
full_name:
|
|
3992
|
-
initials:
|
|
3993
|
-
display_username:
|
|
3994
|
-
company:
|
|
3995
|
-
phone:
|
|
3996
|
-
position:
|
|
3997
|
-
language:
|
|
3998
|
-
avatar:
|
|
3999
|
-
is_staff:
|
|
4000
|
-
is_superuser:
|
|
4001
|
-
date_joined:
|
|
4002
|
-
last_login:
|
|
4003
|
-
unanswered_messages_count:
|
|
3482
|
+
var import_zod34 = require("zod");
|
|
3483
|
+
var TotpVerifyUserSchema = import_zod34.z.object({
|
|
3484
|
+
id: import_zod34.z.number().int(),
|
|
3485
|
+
email: import_zod34.z.email(),
|
|
3486
|
+
first_name: import_zod34.z.string().max(50).optional(),
|
|
3487
|
+
last_name: import_zod34.z.string().max(50).optional(),
|
|
3488
|
+
full_name: import_zod34.z.string(),
|
|
3489
|
+
initials: import_zod34.z.string(),
|
|
3490
|
+
display_username: import_zod34.z.string(),
|
|
3491
|
+
company: import_zod34.z.string().max(100).optional(),
|
|
3492
|
+
phone: import_zod34.z.string().max(20).optional(),
|
|
3493
|
+
position: import_zod34.z.string().max(100).optional(),
|
|
3494
|
+
language: import_zod34.z.string().max(10).optional(),
|
|
3495
|
+
avatar: import_zod34.z.string().nullable(),
|
|
3496
|
+
is_staff: import_zod34.z.boolean(),
|
|
3497
|
+
is_superuser: import_zod34.z.boolean(),
|
|
3498
|
+
date_joined: import_zod34.z.string().datetime({ offset: true }),
|
|
3499
|
+
last_login: import_zod34.z.string().datetime({ offset: true }).nullable(),
|
|
3500
|
+
unanswered_messages_count: import_zod34.z.number().int()
|
|
4004
3501
|
});
|
|
4005
3502
|
|
|
4006
3503
|
// src/_api/generated/cfg_totp/_utils/schemas/VerifyBackupRequest.schema.ts
|
|
4007
|
-
var
|
|
4008
|
-
var VerifyBackupRequestSchema =
|
|
4009
|
-
session_id:
|
|
4010
|
-
backup_code:
|
|
3504
|
+
var import_zod35 = require("zod");
|
|
3505
|
+
var VerifyBackupRequestSchema = import_zod35.z.object({
|
|
3506
|
+
session_id: import_zod35.z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
|
|
3507
|
+
backup_code: import_zod35.z.string().min(8).max(8)
|
|
4011
3508
|
});
|
|
4012
3509
|
|
|
4013
3510
|
// src/_api/generated/cfg_totp/_utils/schemas/VerifyRequest.schema.ts
|
|
4014
|
-
var
|
|
4015
|
-
var VerifyRequestSchema =
|
|
4016
|
-
session_id:
|
|
4017
|
-
code:
|
|
3511
|
+
var import_zod36 = require("zod");
|
|
3512
|
+
var VerifyRequestSchema = import_zod36.z.object({
|
|
3513
|
+
session_id: import_zod36.z.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
|
|
3514
|
+
code: import_zod36.z.string().min(6).max(6)
|
|
4018
3515
|
});
|
|
4019
3516
|
|
|
4020
3517
|
// src/_api/generated/cfg_totp/_utils/schemas/VerifyResponse.schema.ts
|
|
4021
|
-
var
|
|
4022
|
-
var VerifyResponseSchema =
|
|
4023
|
-
message:
|
|
4024
|
-
access_token:
|
|
4025
|
-
refresh_token:
|
|
3518
|
+
var import_zod37 = require("zod");
|
|
3519
|
+
var VerifyResponseSchema = import_zod37.z.object({
|
|
3520
|
+
message: import_zod37.z.string(),
|
|
3521
|
+
access_token: import_zod37.z.string(),
|
|
3522
|
+
refresh_token: import_zod37.z.string(),
|
|
4026
3523
|
user: TotpVerifyUserSchema,
|
|
4027
|
-
remaining_backup_codes:
|
|
4028
|
-
warning:
|
|
3524
|
+
remaining_backup_codes: import_zod37.z.number().int().optional(),
|
|
3525
|
+
warning: import_zod37.z.string().optional()
|
|
4029
3526
|
});
|
|
4030
3527
|
|
|
4031
3528
|
// src/_api/generated/cfg_totp/_utils/fetchers/totp__backup_codes.ts
|
|
4032
|
-
var
|
|
3529
|
+
var import_consola10 = require("consola");
|
|
4033
3530
|
|
|
4034
3531
|
// src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_management.ts
|
|
4035
|
-
var
|
|
3532
|
+
var import_consola11 = require("consola");
|
|
4036
3533
|
|
|
4037
3534
|
// src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_setup.ts
|
|
4038
|
-
var
|
|
3535
|
+
var import_consola12 = require("consola");
|
|
4039
3536
|
|
|
4040
3537
|
// src/_api/generated/cfg_totp/_utils/fetchers/totp__totp_verification.ts
|
|
4041
|
-
var
|
|
3538
|
+
var import_consola13 = require("consola");
|
|
4042
3539
|
|
|
4043
3540
|
// src/_api/generated/cfg_totp/index.ts
|
|
4044
3541
|
var TOKEN_KEY3 = "auth_token";
|
|
@@ -4272,34 +3769,25 @@ function useCreateAccountsOtpVerifyCreate() {
|
|
|
4272
3769
|
}
|
|
4273
3770
|
__name(useCreateAccountsOtpVerifyCreate, "useCreateAccountsOtpVerifyCreate");
|
|
4274
3771
|
|
|
4275
|
-
// src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_admin_api.ts
|
|
4276
|
-
var import_swr7 = require("swr");
|
|
4277
|
-
|
|
4278
3772
|
// src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_auth.ts
|
|
4279
|
-
var
|
|
4280
|
-
|
|
4281
|
-
// src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_monitoring.ts
|
|
4282
|
-
var import_swr9 = __toESM(require("swr"), 1);
|
|
4283
|
-
|
|
4284
|
-
// src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_testing.ts
|
|
4285
|
-
var import_swr10 = require("swr");
|
|
3773
|
+
var import_swr7 = __toESM(require("swr"), 1);
|
|
4286
3774
|
|
|
4287
3775
|
// src/_api/generated/cfg_totp/_utils/hooks/totp__backup_codes.ts
|
|
4288
|
-
var
|
|
4289
|
-
var
|
|
3776
|
+
var import_swr8 = __toESM(require("swr"), 1);
|
|
3777
|
+
var import_swr9 = require("swr");
|
|
4290
3778
|
|
|
4291
3779
|
// src/_api/generated/cfg_totp/_utils/hooks/totp__totp_management.ts
|
|
4292
|
-
var
|
|
4293
|
-
var
|
|
3780
|
+
var import_swr10 = __toESM(require("swr"), 1);
|
|
3781
|
+
var import_swr11 = require("swr");
|
|
4294
3782
|
|
|
4295
3783
|
// src/_api/generated/cfg_totp/_utils/hooks/totp__totp_setup.ts
|
|
4296
|
-
var
|
|
3784
|
+
var import_swr12 = require("swr");
|
|
4297
3785
|
|
|
4298
3786
|
// src/_api/generated/cfg_totp/_utils/hooks/totp__totp_verification.ts
|
|
4299
|
-
var
|
|
3787
|
+
var import_swr13 = require("swr");
|
|
4300
3788
|
|
|
4301
3789
|
// src/_api/generated/cfg_totp/_utils/hooks/totp.ts
|
|
4302
|
-
var
|
|
3790
|
+
var import_swr14 = require("swr");
|
|
4303
3791
|
|
|
4304
3792
|
// src/clients.ts
|
|
4305
3793
|
var isStaticBuild2 = process.env.NEXT_PUBLIC_STATIC_BUILD === "true";
|
|
@@ -6263,7 +5751,7 @@ var AuthProviderInternal = /* @__PURE__ */ __name(({ children, config }) => {
|
|
|
6263
5751
|
uploadAvatar
|
|
6264
5752
|
]
|
|
6265
5753
|
);
|
|
6266
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AuthContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
5754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AuthContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_swr15.SWRConfig, { value: swrConfig, children }) });
|
|
6267
5755
|
}, "AuthProviderInternal");
|
|
6268
5756
|
var AuthProvider = /* @__PURE__ */ __name(({ children, config }) => {
|
|
6269
5757
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AccountsProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AuthProviderInternal, { config, children }) });
|