@djangocfg/api 1.2.6 → 1.2.7
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/dist/index.cjs +2577 -1573
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2141 -820
- package/dist/index.d.ts +2141 -820
- package/dist/index.mjs +2487 -1497
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__accounts.ts +2 -3
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__auth.ts +1 -2
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__user_profile.ts +6 -7
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo.ts +2 -3
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_admin_api.ts +12 -13
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +8 -9
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +8 -9
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_activity.ts +61 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_api_zones.ts +62 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_charts.ts +90 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_commands.ts +62 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_overview.ts +48 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_statistics.ts +76 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_system.ts +63 -0
- package/src/cfg/generated/_utils/fetchers/cfg__endpoints.ts +3 -4
- package/src/cfg/generated/_utils/fetchers/cfg__health.ts +2 -3
- package/src/cfg/generated/_utils/fetchers/cfg__knowbase.ts +57 -58
- package/src/cfg/generated/_utils/fetchers/cfg__leads.ts +6 -7
- package/src/cfg/generated/_utils/fetchers/cfg__leads__lead_submission.ts +1 -2
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter.ts +3 -4
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__bulk_email.ts +1 -2
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__campaigns.ts +6 -7
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__logs.ts +1 -2
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__newsletters.ts +2 -3
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__subscriptions.ts +3 -4
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__testing.ts +1 -2
- package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +8 -9
- package/src/cfg/generated/_utils/fetchers/cfg__support.ts +12 -13
- package/src/cfg/generated/_utils/fetchers/cfg__tasks.ts +10 -11
- package/src/cfg/generated/_utils/fetchers/index.ts +7 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_activity.ts +49 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_api_zones.ts +50 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_charts.ts +78 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_commands.ts +50 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_overview.ts +36 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_statistics.ts +64 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_system.ts +51 -0
- package/src/cfg/generated/_utils/hooks/index.ts +7 -1
- package/src/cfg/generated/_utils/schemas/APIZone.schema.ts +27 -0
- package/src/cfg/generated/_utils/schemas/APIZonesSummary.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/ActivityTrackerDay.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/ChartData.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/ChartDataset.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/Command.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/CommandsSummary.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/RecentUser.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/index.ts +8 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_activity/client.ts +45 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_activity/models.ts +0 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/client.ts +34 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/models.ts +27 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_charts/client.ts +98 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_charts/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_charts/models.ts +24 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_commands/client.ts +34 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_commands/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_commands/models.ts +27 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_overview/client.ts +25 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_overview/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_overview/models.ts +23 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_statistics/client.ts +44 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_statistics/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_statistics/models.ts +16 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_system/client.ts +34 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_system/index.ts +2 -0
- package/src/cfg/generated/{cfg__dashboard → cfg__dashboard__dashboard_system}/models.ts +0 -39
- package/src/cfg/generated/client.ts +32 -12
- package/src/cfg/generated/http.ts +8 -3
- package/src/cfg/generated/index.ts +35 -5
- package/src/cfg/generated/schema.ts +574 -8
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard.ts +0 -150
- package/src/cfg/generated/_utils/hooks/cfg__dashboard.ts +0 -137
- package/src/cfg/generated/cfg__dashboard/client.ts +0 -106
- /package/src/cfg/generated/{cfg__dashboard → cfg__dashboard__dashboard_activity}/index.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/api",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "DjangoCFG",
|
|
6
6
|
"url": "https://djangocfg.com"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@types/node": "^22.15.3",
|
|
69
69
|
"@types/react": "19.2.2",
|
|
70
70
|
"@types/react-dom": "19.2.1",
|
|
71
|
-
"@djangocfg/typescript-config": "^1.2.
|
|
71
|
+
"@djangocfg/typescript-config": "^1.2.7",
|
|
72
72
|
"react": "^19.1.0",
|
|
73
73
|
"react-dom": "^19.1.0",
|
|
74
74
|
"tsup": "^8.5.0",
|
|
@@ -34,7 +34,6 @@ import { OTPRequestResponseSchema, type OTPRequestResponse } from '../schemas/OT
|
|
|
34
34
|
import { OTPVerifyRequestSchema, type OTPVerifyRequest } from '../schemas/OTPVerifyRequest.schema'
|
|
35
35
|
import { OTPVerifyResponseSchema, type OTPVerifyResponse } from '../schemas/OTPVerifyResponse.schema'
|
|
36
36
|
import { getAPIInstance } from '../../api-instance'
|
|
37
|
-
import type { API } from '../../index'
|
|
38
37
|
|
|
39
38
|
/**
|
|
40
39
|
* API operation
|
|
@@ -42,7 +41,7 @@ import type { API } from '../../index'
|
|
|
42
41
|
* @method POST
|
|
43
42
|
* @path /cfg/accounts/otp/request/
|
|
44
43
|
*/
|
|
45
|
-
export async function createAccountsOtpRequestCreate( data: OTPRequestRequest, client?:
|
|
44
|
+
export async function createAccountsOtpRequestCreate( data: OTPRequestRequest, client?: any
|
|
46
45
|
): Promise<OTPRequestResponse> {
|
|
47
46
|
const api = client || getAPIInstance()
|
|
48
47
|
const response = await api.cfg_accounts.otpRequestCreate(data)
|
|
@@ -56,7 +55,7 @@ export async function createAccountsOtpRequestCreate( data: OTPRequestRequest,
|
|
|
56
55
|
* @method POST
|
|
57
56
|
* @path /cfg/accounts/otp/verify/
|
|
58
57
|
*/
|
|
59
|
-
export async function createAccountsOtpVerifyCreate( data: OTPVerifyRequest, client?:
|
|
58
|
+
export async function createAccountsOtpVerifyCreate( data: OTPVerifyRequest, client?: any
|
|
60
59
|
): Promise<OTPVerifyResponse> {
|
|
61
60
|
const api = client || getAPIInstance()
|
|
62
61
|
const response = await api.cfg_accounts.otpVerifyCreate(data)
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
import { TokenRefreshSchema, type TokenRefresh } from '../schemas/TokenRefresh.schema'
|
|
33
33
|
import { TokenRefreshRequestSchema, type TokenRefreshRequest } from '../schemas/TokenRefreshRequest.schema'
|
|
34
34
|
import { getAPIInstance } from '../../api-instance'
|
|
35
|
-
import type { API } from '../../index'
|
|
36
35
|
|
|
37
36
|
/**
|
|
38
37
|
* API operation
|
|
@@ -40,7 +39,7 @@ import type { API } from '../../index'
|
|
|
40
39
|
* @method POST
|
|
41
40
|
* @path /cfg/accounts/token/refresh/
|
|
42
41
|
*/
|
|
43
|
-
export async function createAccountsTokenRefreshCreate( data: TokenRefreshRequest, client?:
|
|
42
|
+
export async function createAccountsTokenRefreshCreate( data: TokenRefreshRequest, client?: any
|
|
44
43
|
): Promise<TokenRefresh> {
|
|
45
44
|
const api = client || getAPIInstance()
|
|
46
45
|
const response = await api.cfg_auth.accountsTokenRefreshCreate(data)
|
|
@@ -33,7 +33,6 @@ import { PatchedUserProfileUpdateRequestSchema, type PatchedUserProfileUpdateReq
|
|
|
33
33
|
import { UserSchema, type User } from '../schemas/User.schema'
|
|
34
34
|
import { UserProfileUpdateRequestSchema, type UserProfileUpdateRequest } from '../schemas/UserProfileUpdateRequest.schema'
|
|
35
35
|
import { getAPIInstance } from '../../api-instance'
|
|
36
|
-
import type { API } from '../../index'
|
|
37
36
|
|
|
38
37
|
/**
|
|
39
38
|
* Get current user profile
|
|
@@ -41,7 +40,7 @@ import type { API } from '../../index'
|
|
|
41
40
|
* @method GET
|
|
42
41
|
* @path /cfg/accounts/profile/
|
|
43
42
|
*/
|
|
44
|
-
export async function getAccountsProfileRetrieve( client?:
|
|
43
|
+
export async function getAccountsProfileRetrieve( client?: any
|
|
45
44
|
): Promise<User> {
|
|
46
45
|
const api = client || getAPIInstance()
|
|
47
46
|
const response = await api.cfg_user_profile.accountsProfileRetrieve()
|
|
@@ -55,7 +54,7 @@ export async function getAccountsProfileRetrieve( client?: API
|
|
|
55
54
|
* @method POST
|
|
56
55
|
* @path /cfg/accounts/profile/avatar/
|
|
57
56
|
*/
|
|
58
|
-
export async function createAccountsProfileAvatarCreate( data: any, client?:
|
|
57
|
+
export async function createAccountsProfileAvatarCreate( data: any, client?: any
|
|
59
58
|
): Promise<User> {
|
|
60
59
|
const api = client || getAPIInstance()
|
|
61
60
|
const response = await api.cfg_user_profile.accountsProfileAvatarCreate(data)
|
|
@@ -69,7 +68,7 @@ export async function createAccountsProfileAvatarCreate( data: any, client?: A
|
|
|
69
68
|
* @method PUT
|
|
70
69
|
* @path /cfg/accounts/profile/partial/
|
|
71
70
|
*/
|
|
72
|
-
export async function partialUpdateAccountsProfilePartialUpdate( data: UserProfileUpdateRequest, client?:
|
|
71
|
+
export async function partialUpdateAccountsProfilePartialUpdate( data: UserProfileUpdateRequest, client?: any
|
|
73
72
|
): Promise<User> {
|
|
74
73
|
const api = client || getAPIInstance()
|
|
75
74
|
const response = await api.cfg_user_profile.accountsProfilePartialUpdate(data)
|
|
@@ -83,7 +82,7 @@ export async function partialUpdateAccountsProfilePartialUpdate( data: UserProf
|
|
|
83
82
|
* @method PATCH
|
|
84
83
|
* @path /cfg/accounts/profile/partial/
|
|
85
84
|
*/
|
|
86
|
-
export async function partialUpdateAccountsProfilePartialPartialUpdate( data?: PatchedUserProfileUpdateRequest, client?:
|
|
85
|
+
export async function partialUpdateAccountsProfilePartialPartialUpdate( data?: PatchedUserProfileUpdateRequest, client?: any
|
|
87
86
|
): Promise<User> {
|
|
88
87
|
const api = client || getAPIInstance()
|
|
89
88
|
const response = await api.cfg_user_profile.accountsProfilePartialPartialUpdate(data)
|
|
@@ -97,7 +96,7 @@ export async function partialUpdateAccountsProfilePartialPartialUpdate( data?:
|
|
|
97
96
|
* @method PUT
|
|
98
97
|
* @path /cfg/accounts/profile/update/
|
|
99
98
|
*/
|
|
100
|
-
export async function updateAccountsProfileUpdateUpdate( data: UserProfileUpdateRequest, client?:
|
|
99
|
+
export async function updateAccountsProfileUpdateUpdate( data: UserProfileUpdateRequest, client?: any
|
|
101
100
|
): Promise<User> {
|
|
102
101
|
const api = client || getAPIInstance()
|
|
103
102
|
const response = await api.cfg_user_profile.accountsProfileUpdateUpdate(data)
|
|
@@ -111,7 +110,7 @@ export async function updateAccountsProfileUpdateUpdate( data: UserProfileUpdat
|
|
|
111
110
|
* @method PATCH
|
|
112
111
|
* @path /cfg/accounts/profile/update/
|
|
113
112
|
*/
|
|
114
|
-
export async function partialUpdateAccountsProfileUpdatePartialUpdate( data?: PatchedUserProfileUpdateRequest, client?:
|
|
113
|
+
export async function partialUpdateAccountsProfileUpdatePartialUpdate( data?: PatchedUserProfileUpdateRequest, client?: any
|
|
115
114
|
): Promise<User> {
|
|
116
115
|
const api = client || getAPIInstance()
|
|
117
116
|
const response = await api.cfg_user_profile.accountsProfileUpdatePartialUpdate(data)
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
32
|
import { getAPIInstance } from '../../api-instance'
|
|
33
|
-
import type { API } from '../../index'
|
|
34
33
|
|
|
35
34
|
/**
|
|
36
35
|
* API operation
|
|
@@ -38,7 +37,7 @@ import type { API } from '../../index'
|
|
|
38
37
|
* @method GET
|
|
39
38
|
* @path /cfg/centrifugo/admin/api/monitor/channels/
|
|
40
39
|
*/
|
|
41
|
-
export async function getCentrifugoAdminApiMonitorChannelsRetrieve( client?:
|
|
40
|
+
export async function getCentrifugoAdminApiMonitorChannelsRetrieve( client?: any
|
|
42
41
|
): Promise<any> {
|
|
43
42
|
const api = client || getAPIInstance()
|
|
44
43
|
const response = await api.cfg_centrifugo.adminApiMonitorChannelsRetrieve()
|
|
@@ -52,7 +51,7 @@ export async function getCentrifugoAdminApiMonitorChannelsRetrieve( client?: AP
|
|
|
52
51
|
* @method GET
|
|
53
52
|
* @path /cfg/centrifugo/monitor/channels/
|
|
54
53
|
*/
|
|
55
|
-
export async function getCentrifugoMonitorChannelsRetrieve( client?:
|
|
54
|
+
export async function getCentrifugoMonitorChannelsRetrieve( client?: any
|
|
56
55
|
): Promise<any> {
|
|
57
56
|
const api = client || getAPIInstance()
|
|
58
57
|
const response = await api.cfg_centrifugo.monitorChannelsRetrieve()
|
|
@@ -39,7 +39,6 @@ import { CentrifugoPresenceResponseSchema, type CentrifugoPresenceResponse } fro
|
|
|
39
39
|
import { CentrifugoPresenceStatsRequestRequestSchema, type CentrifugoPresenceStatsRequestRequest } from '../schemas/CentrifugoPresenceStatsRequestRequest.schema'
|
|
40
40
|
import { CentrifugoPresenceStatsResponseSchema, type CentrifugoPresenceStatsResponse } from '../schemas/CentrifugoPresenceStatsResponse.schema'
|
|
41
41
|
import { getAPIInstance } from '../../api-instance'
|
|
42
|
-
import type { API } from '../../index'
|
|
43
42
|
|
|
44
43
|
/**
|
|
45
44
|
* Get connection token for dashboard
|
|
@@ -47,7 +46,7 @@ import type { API } from '../../index'
|
|
|
47
46
|
* @method POST
|
|
48
47
|
* @path /cfg/centrifugo/admin/api/server/auth/token/
|
|
49
48
|
*/
|
|
50
|
-
export async function createCentrifugoAdminApiServerAuthTokenCreate( client?:
|
|
49
|
+
export async function createCentrifugoAdminApiServerAuthTokenCreate( client?: any
|
|
51
50
|
): Promise<any> {
|
|
52
51
|
const api = client || getAPIInstance()
|
|
53
52
|
const response = await api.cfg_centrifugo_admin_api.serverAuthTokenCreate()
|
|
@@ -61,7 +60,7 @@ export async function createCentrifugoAdminApiServerAuthTokenCreate( client?: A
|
|
|
61
60
|
* @method POST
|
|
62
61
|
* @path /cfg/centrifugo/admin/api/server/channels/
|
|
63
62
|
*/
|
|
64
|
-
export async function createCentrifugoAdminApiServerChannelsCreate( data: CentrifugoChannelsRequestRequest, client?:
|
|
63
|
+
export async function createCentrifugoAdminApiServerChannelsCreate( data: CentrifugoChannelsRequestRequest, client?: any
|
|
65
64
|
): Promise<CentrifugoChannelsResponse> {
|
|
66
65
|
const api = client || getAPIInstance()
|
|
67
66
|
const response = await api.cfg_centrifugo_admin_api.serverChannelsCreate(data)
|
|
@@ -75,7 +74,7 @@ export async function createCentrifugoAdminApiServerChannelsCreate( data: Centr
|
|
|
75
74
|
* @method POST
|
|
76
75
|
* @path /cfg/centrifugo/admin/api/server/history/
|
|
77
76
|
*/
|
|
78
|
-
export async function createCentrifugoAdminApiServerHistoryCreate( data: CentrifugoHistoryRequestRequest, client?:
|
|
77
|
+
export async function createCentrifugoAdminApiServerHistoryCreate( data: CentrifugoHistoryRequestRequest, client?: any
|
|
79
78
|
): Promise<CentrifugoHistoryResponse> {
|
|
80
79
|
const api = client || getAPIInstance()
|
|
81
80
|
const response = await api.cfg_centrifugo_admin_api.serverHistoryCreate(data)
|
|
@@ -89,7 +88,7 @@ export async function createCentrifugoAdminApiServerHistoryCreate( data: Centri
|
|
|
89
88
|
* @method POST
|
|
90
89
|
* @path /cfg/centrifugo/admin/api/server/info/
|
|
91
90
|
*/
|
|
92
|
-
export async function createCentrifugoAdminApiServerInfoCreate( client?:
|
|
91
|
+
export async function createCentrifugoAdminApiServerInfoCreate( client?: any
|
|
93
92
|
): Promise<CentrifugoInfoResponse> {
|
|
94
93
|
const api = client || getAPIInstance()
|
|
95
94
|
const response = await api.cfg_centrifugo_admin_api.serverInfoCreate()
|
|
@@ -103,7 +102,7 @@ export async function createCentrifugoAdminApiServerInfoCreate( client?: API
|
|
|
103
102
|
* @method POST
|
|
104
103
|
* @path /cfg/centrifugo/admin/api/server/presence/
|
|
105
104
|
*/
|
|
106
|
-
export async function createCentrifugoAdminApiServerPresenceCreate( data: CentrifugoPresenceRequestRequest, client?:
|
|
105
|
+
export async function createCentrifugoAdminApiServerPresenceCreate( data: CentrifugoPresenceRequestRequest, client?: any
|
|
107
106
|
): Promise<CentrifugoPresenceResponse> {
|
|
108
107
|
const api = client || getAPIInstance()
|
|
109
108
|
const response = await api.cfg_centrifugo_admin_api.serverPresenceCreate(data)
|
|
@@ -117,7 +116,7 @@ export async function createCentrifugoAdminApiServerPresenceCreate( data: Centr
|
|
|
117
116
|
* @method POST
|
|
118
117
|
* @path /cfg/centrifugo/admin/api/server/presence-stats/
|
|
119
118
|
*/
|
|
120
|
-
export async function createCentrifugoAdminApiServerPresenceStatsCreate( data: CentrifugoPresenceStatsRequestRequest, client?:
|
|
119
|
+
export async function createCentrifugoAdminApiServerPresenceStatsCreate( data: CentrifugoPresenceStatsRequestRequest, client?: any
|
|
121
120
|
): Promise<CentrifugoPresenceStatsResponse> {
|
|
122
121
|
const api = client || getAPIInstance()
|
|
123
122
|
const response = await api.cfg_centrifugo_admin_api.serverPresenceStatsCreate(data)
|
|
@@ -131,7 +130,7 @@ export async function createCentrifugoAdminApiServerPresenceStatsCreate( data:
|
|
|
131
130
|
* @method POST
|
|
132
131
|
* @path /cfg/centrifugo/server/auth/token/
|
|
133
132
|
*/
|
|
134
|
-
export async function createCentrifugoServerAuthTokenCreate( client?:
|
|
133
|
+
export async function createCentrifugoServerAuthTokenCreate( client?: any
|
|
135
134
|
): Promise<any> {
|
|
136
135
|
const api = client || getAPIInstance()
|
|
137
136
|
const response = await api.cfg_centrifugo_admin_api.centrifugoServerAuthTokenCreate()
|
|
@@ -145,7 +144,7 @@ export async function createCentrifugoServerAuthTokenCreate( client?: API
|
|
|
145
144
|
* @method POST
|
|
146
145
|
* @path /cfg/centrifugo/server/channels/
|
|
147
146
|
*/
|
|
148
|
-
export async function createCentrifugoServerChannelsCreate( data: CentrifugoChannelsRequestRequest, client?:
|
|
147
|
+
export async function createCentrifugoServerChannelsCreate( data: CentrifugoChannelsRequestRequest, client?: any
|
|
149
148
|
): Promise<CentrifugoChannelsResponse> {
|
|
150
149
|
const api = client || getAPIInstance()
|
|
151
150
|
const response = await api.cfg_centrifugo_admin_api.centrifugoServerChannelsCreate(data)
|
|
@@ -159,7 +158,7 @@ export async function createCentrifugoServerChannelsCreate( data: CentrifugoCha
|
|
|
159
158
|
* @method POST
|
|
160
159
|
* @path /cfg/centrifugo/server/history/
|
|
161
160
|
*/
|
|
162
|
-
export async function createCentrifugoServerHistoryCreate( data: CentrifugoHistoryRequestRequest, client?:
|
|
161
|
+
export async function createCentrifugoServerHistoryCreate( data: CentrifugoHistoryRequestRequest, client?: any
|
|
163
162
|
): Promise<CentrifugoHistoryResponse> {
|
|
164
163
|
const api = client || getAPIInstance()
|
|
165
164
|
const response = await api.cfg_centrifugo_admin_api.centrifugoServerHistoryCreate(data)
|
|
@@ -173,7 +172,7 @@ export async function createCentrifugoServerHistoryCreate( data: CentrifugoHist
|
|
|
173
172
|
* @method POST
|
|
174
173
|
* @path /cfg/centrifugo/server/info/
|
|
175
174
|
*/
|
|
176
|
-
export async function createCentrifugoServerInfoCreate( client?:
|
|
175
|
+
export async function createCentrifugoServerInfoCreate( client?: any
|
|
177
176
|
): Promise<CentrifugoInfoResponse> {
|
|
178
177
|
const api = client || getAPIInstance()
|
|
179
178
|
const response = await api.cfg_centrifugo_admin_api.centrifugoServerInfoCreate()
|
|
@@ -187,7 +186,7 @@ export async function createCentrifugoServerInfoCreate( client?: API
|
|
|
187
186
|
* @method POST
|
|
188
187
|
* @path /cfg/centrifugo/server/presence/
|
|
189
188
|
*/
|
|
190
|
-
export async function createCentrifugoServerPresenceCreate( data: CentrifugoPresenceRequestRequest, client?:
|
|
189
|
+
export async function createCentrifugoServerPresenceCreate( data: CentrifugoPresenceRequestRequest, client?: any
|
|
191
190
|
): Promise<CentrifugoPresenceResponse> {
|
|
192
191
|
const api = client || getAPIInstance()
|
|
193
192
|
const response = await api.cfg_centrifugo_admin_api.centrifugoServerPresenceCreate(data)
|
|
@@ -201,7 +200,7 @@ export async function createCentrifugoServerPresenceCreate( data: CentrifugoPre
|
|
|
201
200
|
* @method POST
|
|
202
201
|
* @path /cfg/centrifugo/server/presence-stats/
|
|
203
202
|
*/
|
|
204
|
-
export async function createCentrifugoServerPresenceStatsCreate( data: CentrifugoPresenceStatsRequestRequest, client?:
|
|
203
|
+
export async function createCentrifugoServerPresenceStatsCreate( data: CentrifugoPresenceStatsRequestRequest, client?: any
|
|
205
204
|
): Promise<CentrifugoPresenceStatsResponse> {
|
|
206
205
|
const api = client || getAPIInstance()
|
|
207
206
|
const response = await api.cfg_centrifugo_admin_api.centrifugoServerPresenceStatsCreate(data)
|
|
@@ -34,7 +34,6 @@ import { HealthCheckSchema, type HealthCheck } from '../schemas/HealthCheck.sche
|
|
|
34
34
|
import { OverviewStatsSchema, type OverviewStats } from '../schemas/OverviewStats.schema'
|
|
35
35
|
import { RecentPublishesSchema, type RecentPublishes } from '../schemas/RecentPublishes.schema'
|
|
36
36
|
import { getAPIInstance } from '../../api-instance'
|
|
37
|
-
import type { API } from '../../index'
|
|
38
37
|
|
|
39
38
|
/**
|
|
40
39
|
* Get Centrifugo health status
|
|
@@ -42,7 +41,7 @@ import type { API } from '../../index'
|
|
|
42
41
|
* @method GET
|
|
43
42
|
* @path /cfg/centrifugo/admin/api/monitor/health/
|
|
44
43
|
*/
|
|
45
|
-
export async function getCentrifugoAdminApiMonitorHealthRetrieve( client?:
|
|
44
|
+
export async function getCentrifugoAdminApiMonitorHealthRetrieve( client?: any
|
|
46
45
|
): Promise<HealthCheck> {
|
|
47
46
|
const api = client || getAPIInstance()
|
|
48
47
|
const response = await api.cfg_centrifugo_monitoring.centrifugoAdminApiMonitorHealthRetrieve()
|
|
@@ -56,7 +55,7 @@ export async function getCentrifugoAdminApiMonitorHealthRetrieve( client?: API
|
|
|
56
55
|
* @method GET
|
|
57
56
|
* @path /cfg/centrifugo/admin/api/monitor/overview/
|
|
58
57
|
*/
|
|
59
|
-
export async function getCentrifugoAdminApiMonitorOverviewRetrieve( params?: { hours?: number }, client?:
|
|
58
|
+
export async function getCentrifugoAdminApiMonitorOverviewRetrieve( params?: { hours?: number }, client?: any
|
|
60
59
|
): Promise<OverviewStats> {
|
|
61
60
|
const api = client || getAPIInstance()
|
|
62
61
|
const response = await api.cfg_centrifugo_monitoring.centrifugoAdminApiMonitorOverviewRetrieve(params?.hours)
|
|
@@ -70,7 +69,7 @@ export async function getCentrifugoAdminApiMonitorOverviewRetrieve( params?: {
|
|
|
70
69
|
* @method GET
|
|
71
70
|
* @path /cfg/centrifugo/admin/api/monitor/publishes/
|
|
72
71
|
*/
|
|
73
|
-
export async function getCentrifugoAdminApiMonitorPublishesRetrieve( params?: { channel?: string; count?: number; offset?: number; status?: string }, client?:
|
|
72
|
+
export async function getCentrifugoAdminApiMonitorPublishesRetrieve( params?: { channel?: string; count?: number; offset?: number; status?: string }, client?: any
|
|
74
73
|
): Promise<RecentPublishes> {
|
|
75
74
|
const api = client || getAPIInstance()
|
|
76
75
|
const response = await api.cfg_centrifugo_monitoring.centrifugoAdminApiMonitorPublishesRetrieve(params?.channel, params?.count, params?.offset, params?.status)
|
|
@@ -84,7 +83,7 @@ export async function getCentrifugoAdminApiMonitorPublishesRetrieve( params?: {
|
|
|
84
83
|
* @method GET
|
|
85
84
|
* @path /cfg/centrifugo/admin/api/monitor/timeline/
|
|
86
85
|
*/
|
|
87
|
-
export async function getCentrifugoAdminApiMonitorTimelineRetrieve( params?: { hours?: number; interval?: string }, client?:
|
|
86
|
+
export async function getCentrifugoAdminApiMonitorTimelineRetrieve( params?: { hours?: number; interval?: string }, client?: any
|
|
88
87
|
): Promise<ChannelList> {
|
|
89
88
|
const api = client || getAPIInstance()
|
|
90
89
|
const response = await api.cfg_centrifugo_monitoring.centrifugoAdminApiMonitorTimelineRetrieve(params?.hours, params?.interval)
|
|
@@ -98,7 +97,7 @@ export async function getCentrifugoAdminApiMonitorTimelineRetrieve( params?: {
|
|
|
98
97
|
* @method GET
|
|
99
98
|
* @path /cfg/centrifugo/monitor/health/
|
|
100
99
|
*/
|
|
101
|
-
export async function getCentrifugoMonitorHealthRetrieve( client?:
|
|
100
|
+
export async function getCentrifugoMonitorHealthRetrieve( client?: any
|
|
102
101
|
): Promise<HealthCheck> {
|
|
103
102
|
const api = client || getAPIInstance()
|
|
104
103
|
const response = await api.cfg_centrifugo_monitoring.centrifugoMonitorHealthRetrieve()
|
|
@@ -112,7 +111,7 @@ export async function getCentrifugoMonitorHealthRetrieve( client?: API
|
|
|
112
111
|
* @method GET
|
|
113
112
|
* @path /cfg/centrifugo/monitor/overview/
|
|
114
113
|
*/
|
|
115
|
-
export async function getCentrifugoMonitorOverviewRetrieve( params?: { hours?: number }, client?:
|
|
114
|
+
export async function getCentrifugoMonitorOverviewRetrieve( params?: { hours?: number }, client?: any
|
|
116
115
|
): Promise<OverviewStats> {
|
|
117
116
|
const api = client || getAPIInstance()
|
|
118
117
|
const response = await api.cfg_centrifugo_monitoring.centrifugoMonitorOverviewRetrieve(params?.hours)
|
|
@@ -126,7 +125,7 @@ export async function getCentrifugoMonitorOverviewRetrieve( params?: { hours?:
|
|
|
126
125
|
* @method GET
|
|
127
126
|
* @path /cfg/centrifugo/monitor/publishes/
|
|
128
127
|
*/
|
|
129
|
-
export async function getCentrifugoMonitorPublishesRetrieve( params?: { channel?: string; count?: number; offset?: number; status?: string }, client?:
|
|
128
|
+
export async function getCentrifugoMonitorPublishesRetrieve( params?: { channel?: string; count?: number; offset?: number; status?: string }, client?: any
|
|
130
129
|
): Promise<RecentPublishes> {
|
|
131
130
|
const api = client || getAPIInstance()
|
|
132
131
|
const response = await api.cfg_centrifugo_monitoring.centrifugoMonitorPublishesRetrieve(params?.channel, params?.count, params?.offset, params?.status)
|
|
@@ -140,7 +139,7 @@ export async function getCentrifugoMonitorPublishesRetrieve( params?: { channel
|
|
|
140
139
|
* @method GET
|
|
141
140
|
* @path /cfg/centrifugo/monitor/timeline/
|
|
142
141
|
*/
|
|
143
|
-
export async function getCentrifugoMonitorTimelineRetrieve( params?: { hours?: number; interval?: string }, client?:
|
|
142
|
+
export async function getCentrifugoMonitorTimelineRetrieve( params?: { hours?: number; interval?: string }, client?: any
|
|
144
143
|
): Promise<ChannelList> {
|
|
145
144
|
const api = client || getAPIInstance()
|
|
146
145
|
const response = await api.cfg_centrifugo_monitoring.centrifugoMonitorTimelineRetrieve(params?.hours, params?.interval)
|
|
@@ -36,7 +36,6 @@ import { ManualAckResponseSchema, type ManualAckResponse } from '../schemas/Manu
|
|
|
36
36
|
import { PublishTestRequestRequestSchema, type PublishTestRequestRequest } from '../schemas/PublishTestRequestRequest.schema'
|
|
37
37
|
import { PublishTestResponseSchema, type PublishTestResponse } from '../schemas/PublishTestResponse.schema'
|
|
38
38
|
import { getAPIInstance } from '../../api-instance'
|
|
39
|
-
import type { API } from '../../index'
|
|
40
39
|
|
|
41
40
|
/**
|
|
42
41
|
* Generate connection token
|
|
@@ -44,7 +43,7 @@ import type { API } from '../../index'
|
|
|
44
43
|
* @method POST
|
|
45
44
|
* @path /cfg/centrifugo/admin/api/testing/connection-token/
|
|
46
45
|
*/
|
|
47
|
-
export async function createCentrifugoAdminApiTestingConnectionTokenCreate( data: ConnectionTokenRequestRequest, client?:
|
|
46
|
+
export async function createCentrifugoAdminApiTestingConnectionTokenCreate( data: ConnectionTokenRequestRequest, client?: any
|
|
48
47
|
): Promise<ConnectionTokenResponse> {
|
|
49
48
|
const api = client || getAPIInstance()
|
|
50
49
|
const response = await api.cfg_centrifugo_testing.centrifugoAdminApiTestingConnectionTokenCreate(data)
|
|
@@ -58,7 +57,7 @@ export async function createCentrifugoAdminApiTestingConnectionTokenCreate( dat
|
|
|
58
57
|
* @method POST
|
|
59
58
|
* @path /cfg/centrifugo/admin/api/testing/publish-test/
|
|
60
59
|
*/
|
|
61
|
-
export async function createCentrifugoAdminApiTestingPublishTestCreate( data: PublishTestRequestRequest, client?:
|
|
60
|
+
export async function createCentrifugoAdminApiTestingPublishTestCreate( data: PublishTestRequestRequest, client?: any
|
|
62
61
|
): Promise<PublishTestResponse> {
|
|
63
62
|
const api = client || getAPIInstance()
|
|
64
63
|
const response = await api.cfg_centrifugo_testing.centrifugoAdminApiTestingPublishTestCreate(data)
|
|
@@ -72,7 +71,7 @@ export async function createCentrifugoAdminApiTestingPublishTestCreate( data: P
|
|
|
72
71
|
* @method POST
|
|
73
72
|
* @path /cfg/centrifugo/admin/api/testing/publish-with-logging/
|
|
74
73
|
*/
|
|
75
|
-
export async function createCentrifugoAdminApiTestingPublishWithLoggingCreate( data: PublishTestRequestRequest, client?:
|
|
74
|
+
export async function createCentrifugoAdminApiTestingPublishWithLoggingCreate( data: PublishTestRequestRequest, client?: any
|
|
76
75
|
): Promise<PublishTestResponse> {
|
|
77
76
|
const api = client || getAPIInstance()
|
|
78
77
|
const response = await api.cfg_centrifugo_testing.centrifugoAdminApiTestingPublishWithLoggingCreate(data)
|
|
@@ -86,7 +85,7 @@ export async function createCentrifugoAdminApiTestingPublishWithLoggingCreate(
|
|
|
86
85
|
* @method POST
|
|
87
86
|
* @path /cfg/centrifugo/admin/api/testing/send-ack/
|
|
88
87
|
*/
|
|
89
|
-
export async function createCentrifugoAdminApiTestingSendAckCreate( data: ManualAckRequestRequest, client?:
|
|
88
|
+
export async function createCentrifugoAdminApiTestingSendAckCreate( data: ManualAckRequestRequest, client?: any
|
|
90
89
|
): Promise<ManualAckResponse> {
|
|
91
90
|
const api = client || getAPIInstance()
|
|
92
91
|
const response = await api.cfg_centrifugo_testing.centrifugoAdminApiTestingSendAckCreate(data)
|
|
@@ -100,7 +99,7 @@ export async function createCentrifugoAdminApiTestingSendAckCreate( data: Manua
|
|
|
100
99
|
* @method POST
|
|
101
100
|
* @path /cfg/centrifugo/testing/connection-token/
|
|
102
101
|
*/
|
|
103
|
-
export async function createCentrifugoTestingConnectionTokenCreate( data: ConnectionTokenRequestRequest, client?:
|
|
102
|
+
export async function createCentrifugoTestingConnectionTokenCreate( data: ConnectionTokenRequestRequest, client?: any
|
|
104
103
|
): Promise<ConnectionTokenResponse> {
|
|
105
104
|
const api = client || getAPIInstance()
|
|
106
105
|
const response = await api.cfg_centrifugo_testing.connectionTokenCreate(data)
|
|
@@ -114,7 +113,7 @@ export async function createCentrifugoTestingConnectionTokenCreate( data: Conne
|
|
|
114
113
|
* @method POST
|
|
115
114
|
* @path /cfg/centrifugo/testing/publish-test/
|
|
116
115
|
*/
|
|
117
|
-
export async function createCentrifugoTestingPublishTestCreate( data: PublishTestRequestRequest, client?:
|
|
116
|
+
export async function createCentrifugoTestingPublishTestCreate( data: PublishTestRequestRequest, client?: any
|
|
118
117
|
): Promise<PublishTestResponse> {
|
|
119
118
|
const api = client || getAPIInstance()
|
|
120
119
|
const response = await api.cfg_centrifugo_testing.publishTestCreate(data)
|
|
@@ -128,7 +127,7 @@ export async function createCentrifugoTestingPublishTestCreate( data: PublishTe
|
|
|
128
127
|
* @method POST
|
|
129
128
|
* @path /cfg/centrifugo/testing/publish-with-logging/
|
|
130
129
|
*/
|
|
131
|
-
export async function createCentrifugoTestingPublishWithLoggingCreate( data: PublishTestRequestRequest, client?:
|
|
130
|
+
export async function createCentrifugoTestingPublishWithLoggingCreate( data: PublishTestRequestRequest, client?: any
|
|
132
131
|
): Promise<PublishTestResponse> {
|
|
133
132
|
const api = client || getAPIInstance()
|
|
134
133
|
const response = await api.cfg_centrifugo_testing.publishWithLoggingCreate(data)
|
|
@@ -142,7 +141,7 @@ export async function createCentrifugoTestingPublishWithLoggingCreate( data: Pu
|
|
|
142
141
|
* @method POST
|
|
143
142
|
* @path /cfg/centrifugo/testing/send-ack/
|
|
144
143
|
*/
|
|
145
|
-
export async function createCentrifugoTestingSendAckCreate( data: ManualAckRequestRequest, client?:
|
|
144
|
+
export async function createCentrifugoTestingSendAckCreate( data: ManualAckRequestRequest, client?: any
|
|
146
145
|
): Promise<ManualAckResponse> {
|
|
147
146
|
const api = client || getAPIInstance()
|
|
148
147
|
const response = await api.cfg_centrifugo_testing.sendAckCreate(data)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed fetchers for Dashboard - Activity
|
|
3
|
+
*
|
|
4
|
+
* Universal functions that work in any environment:
|
|
5
|
+
* - Next.js (App Router / Pages Router / Server Components)
|
|
6
|
+
* - React Native
|
|
7
|
+
* - Node.js backend
|
|
8
|
+
*
|
|
9
|
+
* These fetchers use Zod schemas for runtime validation.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* ```typescript
|
|
13
|
+
* // Configure API once (in your app entry point)
|
|
14
|
+
* import { configureAPI } from '../../api-instance'
|
|
15
|
+
* configureAPI({ baseUrl: 'https://api.example.com' })
|
|
16
|
+
*
|
|
17
|
+
* // Then use fetchers anywhere
|
|
18
|
+
* const users = await getUsers({ page: 1 })
|
|
19
|
+
*
|
|
20
|
+
* // With SWR
|
|
21
|
+
* const { data } = useSWR(['users', params], () => getUsers(params))
|
|
22
|
+
*
|
|
23
|
+
* // With React Query
|
|
24
|
+
* const { data } = useQuery(['users', params], () => getUsers(params))
|
|
25
|
+
*
|
|
26
|
+
* // In Server Component or SSR (pass custom client)
|
|
27
|
+
* import { API } from '../../index'
|
|
28
|
+
* const api = new API('https://api.example.com')
|
|
29
|
+
* const users = await getUsers({ page: 1 }, api)
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
import { getAPIInstance } from '../../api-instance'
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Get quick actions
|
|
36
|
+
*
|
|
37
|
+
* @method GET
|
|
38
|
+
* @path /cfg/dashboard/api/activity/actions/
|
|
39
|
+
*/
|
|
40
|
+
export async function getDashboardApiActivityActionsList( client?: any
|
|
41
|
+
): Promise<any> {
|
|
42
|
+
const api = client || getAPIInstance()
|
|
43
|
+
const response = await api.cfg_dashboard_activity.dashboardApiActivityActionsList()
|
|
44
|
+
return response
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Get recent activity
|
|
50
|
+
*
|
|
51
|
+
* @method GET
|
|
52
|
+
* @path /cfg/dashboard/api/activity/recent/
|
|
53
|
+
*/
|
|
54
|
+
export async function getDashboardApiActivityRecentList( params?: { limit?: number }, client?: any
|
|
55
|
+
): Promise<any> {
|
|
56
|
+
const api = client || getAPIInstance()
|
|
57
|
+
const response = await api.cfg_dashboard_activity.dashboardApiActivityRecentList(params?.limit)
|
|
58
|
+
return response
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed fetchers for Dashboard - API Zones
|
|
3
|
+
*
|
|
4
|
+
* Universal functions that work in any environment:
|
|
5
|
+
* - Next.js (App Router / Pages Router / Server Components)
|
|
6
|
+
* - React Native
|
|
7
|
+
* - Node.js backend
|
|
8
|
+
*
|
|
9
|
+
* These fetchers use Zod schemas for runtime validation.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* ```typescript
|
|
13
|
+
* // Configure API once (in your app entry point)
|
|
14
|
+
* import { configureAPI } from '../../api-instance'
|
|
15
|
+
* configureAPI({ baseUrl: 'https://api.example.com' })
|
|
16
|
+
*
|
|
17
|
+
* // Then use fetchers anywhere
|
|
18
|
+
* const users = await getUsers({ page: 1 })
|
|
19
|
+
*
|
|
20
|
+
* // With SWR
|
|
21
|
+
* const { data } = useSWR(['users', params], () => getUsers(params))
|
|
22
|
+
*
|
|
23
|
+
* // With React Query
|
|
24
|
+
* const { data } = useQuery(['users', params], () => getUsers(params))
|
|
25
|
+
*
|
|
26
|
+
* // In Server Component or SSR (pass custom client)
|
|
27
|
+
* import { API } from '../../index'
|
|
28
|
+
* const api = new API('https://api.example.com')
|
|
29
|
+
* const users = await getUsers({ page: 1 }, api)
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
import { APIZonesSummarySchema, type APIZonesSummary } from '../schemas/APIZonesSummary.schema'
|
|
33
|
+
import { getAPIInstance } from '../../api-instance'
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get all API zones
|
|
37
|
+
*
|
|
38
|
+
* @method GET
|
|
39
|
+
* @path /cfg/dashboard/api/zones/
|
|
40
|
+
*/
|
|
41
|
+
export async function getDashboardApiZonesList( client?: any
|
|
42
|
+
): Promise<any> {
|
|
43
|
+
const api = client || getAPIInstance()
|
|
44
|
+
const response = await api.cfg_dashboard_api_zones.list()
|
|
45
|
+
return response
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Get zones summary
|
|
51
|
+
*
|
|
52
|
+
* @method GET
|
|
53
|
+
* @path /cfg/dashboard/api/zones/summary/
|
|
54
|
+
*/
|
|
55
|
+
export async function getDashboardApiZonesSummaryRetrieve( client?: any
|
|
56
|
+
): Promise<APIZonesSummary> {
|
|
57
|
+
const api = client || getAPIInstance()
|
|
58
|
+
const response = await api.cfg_dashboard_api_zones.summaryRetrieve()
|
|
59
|
+
return APIZonesSummarySchema.parse(response)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed fetchers for Dashboard - Charts
|
|
3
|
+
*
|
|
4
|
+
* Universal functions that work in any environment:
|
|
5
|
+
* - Next.js (App Router / Pages Router / Server Components)
|
|
6
|
+
* - React Native
|
|
7
|
+
* - Node.js backend
|
|
8
|
+
*
|
|
9
|
+
* These fetchers use Zod schemas for runtime validation.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* ```typescript
|
|
13
|
+
* // Configure API once (in your app entry point)
|
|
14
|
+
* import { configureAPI } from '../../api-instance'
|
|
15
|
+
* configureAPI({ baseUrl: 'https://api.example.com' })
|
|
16
|
+
*
|
|
17
|
+
* // Then use fetchers anywhere
|
|
18
|
+
* const users = await getUsers({ page: 1 })
|
|
19
|
+
*
|
|
20
|
+
* // With SWR
|
|
21
|
+
* const { data } = useSWR(['users', params], () => getUsers(params))
|
|
22
|
+
*
|
|
23
|
+
* // With React Query
|
|
24
|
+
* const { data } = useQuery(['users', params], () => getUsers(params))
|
|
25
|
+
*
|
|
26
|
+
* // In Server Component or SSR (pass custom client)
|
|
27
|
+
* import { API } from '../../index'
|
|
28
|
+
* const api = new API('https://api.example.com')
|
|
29
|
+
* const users = await getUsers({ page: 1 }, api)
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
import { ChartDataSchema, type ChartData } from '../schemas/ChartData.schema'
|
|
33
|
+
import { getAPIInstance } from '../../api-instance'
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get user activity chart
|
|
37
|
+
*
|
|
38
|
+
* @method GET
|
|
39
|
+
* @path /cfg/dashboard/api/charts/activity/
|
|
40
|
+
*/
|
|
41
|
+
export async function getDashboardApiChartsActivityRetrieve( params?: { days?: number }, client?: any
|
|
42
|
+
): Promise<ChartData> {
|
|
43
|
+
const api = client || getAPIInstance()
|
|
44
|
+
const response = await api.cfg_dashboard_charts.dashboardApiChartsActivityRetrieve(params?.days)
|
|
45
|
+
return ChartDataSchema.parse(response)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Get recent users
|
|
51
|
+
*
|
|
52
|
+
* @method GET
|
|
53
|
+
* @path /cfg/dashboard/api/charts/recent-users/
|
|
54
|
+
*/
|
|
55
|
+
export async function getDashboardApiChartsRecentUsersList( params?: { limit?: number }, client?: any
|
|
56
|
+
): Promise<any> {
|
|
57
|
+
const api = client || getAPIInstance()
|
|
58
|
+
const response = await api.cfg_dashboard_charts.dashboardApiChartsRecentUsersList(params?.limit)
|
|
59
|
+
return response
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Get user registration chart
|
|
65
|
+
*
|
|
66
|
+
* @method GET
|
|
67
|
+
* @path /cfg/dashboard/api/charts/registrations/
|
|
68
|
+
*/
|
|
69
|
+
export async function getDashboardApiChartsRegistrationsRetrieve( params?: { days?: number }, client?: any
|
|
70
|
+
): Promise<ChartData> {
|
|
71
|
+
const api = client || getAPIInstance()
|
|
72
|
+
const response = await api.cfg_dashboard_charts.dashboardApiChartsRegistrationsRetrieve(params?.days)
|
|
73
|
+
return ChartDataSchema.parse(response)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Get activity tracker
|
|
79
|
+
*
|
|
80
|
+
* @method GET
|
|
81
|
+
* @path /cfg/dashboard/api/charts/tracker/
|
|
82
|
+
*/
|
|
83
|
+
export async function getDashboardApiChartsTrackerList( params?: { weeks?: number }, client?: any
|
|
84
|
+
): Promise<any> {
|
|
85
|
+
const api = client || getAPIInstance()
|
|
86
|
+
const response = await api.cfg_dashboard_charts.dashboardApiChartsTrackerList(params?.weeks)
|
|
87
|
+
return response
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|