@djangocfg/api 1.2.3 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/index.cjs +7221 -4039
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +8464 -4517
  4. package/dist/index.d.ts +8464 -4517
  5. package/dist/index.mjs +7231 -4080
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +2 -2
  8. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_admin_api.ts +211 -0
  9. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +150 -0
  10. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +152 -0
  11. package/src/cfg/generated/_utils/fetchers/index.ts +3 -0
  12. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_admin_api.ts +246 -0
  13. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +137 -0
  14. package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_testing.ts +171 -0
  15. package/src/cfg/generated/_utils/hooks/index.ts +3 -0
  16. package/src/cfg/generated/_utils/schemas/CentrifugoChannelInfo.schema.ts +19 -0
  17. package/src/cfg/generated/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts +19 -0
  18. package/src/cfg/generated/_utils/schemas/CentrifugoChannelsResponse.schema.ts +22 -0
  19. package/src/cfg/generated/_utils/schemas/CentrifugoChannelsResult.schema.ts +19 -0
  20. package/src/cfg/generated/_utils/schemas/CentrifugoClientInfo.schema.ts +22 -0
  21. package/src/cfg/generated/_utils/schemas/CentrifugoError.schema.ts +20 -0
  22. package/src/cfg/generated/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +23 -0
  23. package/src/cfg/generated/_utils/schemas/CentrifugoHistoryResponse.schema.ts +22 -0
  24. package/src/cfg/generated/_utils/schemas/CentrifugoHistoryResult.schema.ts +22 -0
  25. package/src/cfg/generated/_utils/schemas/CentrifugoInfoResponse.schema.ts +22 -0
  26. package/src/cfg/generated/_utils/schemas/CentrifugoInfoResult.schema.ts +20 -0
  27. package/src/cfg/generated/_utils/schemas/CentrifugoMetrics.schema.ts +20 -0
  28. package/src/cfg/generated/_utils/schemas/CentrifugoNodeInfo.schema.ts +30 -0
  29. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts +19 -0
  30. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceResponse.schema.ts +22 -0
  31. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceResult.schema.ts +19 -0
  32. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts +19 -0
  33. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts +22 -0
  34. package/src/cfg/generated/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts +20 -0
  35. package/src/cfg/generated/_utils/schemas/CentrifugoProcess.schema.ts +20 -0
  36. package/src/cfg/generated/_utils/schemas/CentrifugoPublication.schema.ts +23 -0
  37. package/src/cfg/generated/_utils/schemas/CentrifugoStreamPosition.schema.ts +20 -0
  38. package/src/cfg/generated/_utils/schemas/ChannelList.schema.ts +21 -0
  39. package/src/cfg/generated/_utils/schemas/ChannelStatsSerializer.schema.ts +24 -0
  40. package/src/cfg/generated/_utils/schemas/ConnectionTokenRequestRequest.schema.ts +20 -0
  41. package/src/cfg/generated/_utils/schemas/ConnectionTokenResponse.schema.ts +21 -0
  42. package/src/cfg/generated/_utils/schemas/HealthCheck.schema.ts +5 -7
  43. package/src/cfg/generated/_utils/schemas/ManualAckRequestRequest.schema.ts +20 -0
  44. package/src/cfg/generated/_utils/schemas/ManualAckResponse.schema.ts +21 -0
  45. package/src/cfg/generated/_utils/schemas/OverviewStats.schema.ts +26 -0
  46. package/src/cfg/generated/_utils/schemas/PublishTestRequestRequest.schema.ts +22 -0
  47. package/src/cfg/generated/_utils/schemas/PublishTestResponse.schema.ts +24 -0
  48. package/src/cfg/generated/_utils/schemas/RecentPublishes.schema.ts +21 -0
  49. package/src/cfg/generated/_utils/schemas/index.ts +32 -0
  50. package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/client.ts +136 -0
  51. package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/index.ts +2 -0
  52. package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/models.ts +256 -0
  53. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/client.ts +160 -0
  54. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/index.ts +2 -0
  55. package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/models.ts +86 -0
  56. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/client.ts +100 -0
  57. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/index.ts +2 -0
  58. package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/models.ts +88 -0
  59. package/src/cfg/generated/cfg__health/models.ts +7 -11
  60. package/src/cfg/generated/client.ts +9 -0
  61. package/src/cfg/generated/index.ts +15 -0
  62. package/src/cfg/generated/schema.ts +5844 -3785
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/api",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
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.3",
71
+ "@djangocfg/typescript-config": "^1.2.5",
72
72
  "react": "^19.1.0",
73
73
  "react-dom": "^19.1.0",
74
74
  "tsup": "^8.5.0",
@@ -0,0 +1,211 @@
1
+ /**
2
+ * Typed fetchers for Centrifugo Admin API
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 { CentrifugoChannelsRequestRequestSchema, type CentrifugoChannelsRequestRequest } from '../schemas/CentrifugoChannelsRequestRequest.schema'
33
+ import { CentrifugoChannelsResponseSchema, type CentrifugoChannelsResponse } from '../schemas/CentrifugoChannelsResponse.schema'
34
+ import { CentrifugoHistoryRequestRequestSchema, type CentrifugoHistoryRequestRequest } from '../schemas/CentrifugoHistoryRequestRequest.schema'
35
+ import { CentrifugoHistoryResponseSchema, type CentrifugoHistoryResponse } from '../schemas/CentrifugoHistoryResponse.schema'
36
+ import { CentrifugoInfoResponseSchema, type CentrifugoInfoResponse } from '../schemas/CentrifugoInfoResponse.schema'
37
+ import { CentrifugoPresenceRequestRequestSchema, type CentrifugoPresenceRequestRequest } from '../schemas/CentrifugoPresenceRequestRequest.schema'
38
+ import { CentrifugoPresenceResponseSchema, type CentrifugoPresenceResponse } from '../schemas/CentrifugoPresenceResponse.schema'
39
+ import { CentrifugoPresenceStatsRequestRequestSchema, type CentrifugoPresenceStatsRequestRequest } from '../schemas/CentrifugoPresenceStatsRequestRequest.schema'
40
+ import { CentrifugoPresenceStatsResponseSchema, type CentrifugoPresenceStatsResponse } from '../schemas/CentrifugoPresenceStatsResponse.schema'
41
+ import { getAPIInstance } from '../../api-instance'
42
+ import type { API } from '../../index'
43
+
44
+ /**
45
+ * Get connection token for dashboard
46
+ *
47
+ * @method POST
48
+ * @path /cfg/centrifugo/admin/api/server/auth/token/
49
+ */
50
+ export async function createCentrifugoAdminApiServerAuthTokenCreate( client?
51
+ ): Promise<any> {
52
+ const api = client || getAPIInstance()
53
+ const response = await api.cfg_centrifugo_admin_api.serverAuthTokenCreate()
54
+ return response
55
+ }
56
+
57
+
58
+ /**
59
+ * List active channels
60
+ *
61
+ * @method POST
62
+ * @path /cfg/centrifugo/admin/api/server/channels/
63
+ */
64
+ export async function createCentrifugoAdminApiServerChannelsCreate( data: CentrifugoChannelsRequestRequest, client?
65
+ ): Promise<CentrifugoChannelsResponse> {
66
+ const api = client || getAPIInstance()
67
+ const response = await api.cfg_centrifugo_admin_api.serverChannelsCreate(data)
68
+ return CentrifugoChannelsResponseSchema.parse(response)
69
+ }
70
+
71
+
72
+ /**
73
+ * Get channel history
74
+ *
75
+ * @method POST
76
+ * @path /cfg/centrifugo/admin/api/server/history/
77
+ */
78
+ export async function createCentrifugoAdminApiServerHistoryCreate( data: CentrifugoHistoryRequestRequest, client?
79
+ ): Promise<CentrifugoHistoryResponse> {
80
+ const api = client || getAPIInstance()
81
+ const response = await api.cfg_centrifugo_admin_api.serverHistoryCreate(data)
82
+ return CentrifugoHistoryResponseSchema.parse(response)
83
+ }
84
+
85
+
86
+ /**
87
+ * Get Centrifugo server info
88
+ *
89
+ * @method POST
90
+ * @path /cfg/centrifugo/admin/api/server/info/
91
+ */
92
+ export async function createCentrifugoAdminApiServerInfoCreate( client?
93
+ ): Promise<CentrifugoInfoResponse> {
94
+ const api = client || getAPIInstance()
95
+ const response = await api.cfg_centrifugo_admin_api.serverInfoCreate()
96
+ return CentrifugoInfoResponseSchema.parse(response)
97
+ }
98
+
99
+
100
+ /**
101
+ * Get channel presence
102
+ *
103
+ * @method POST
104
+ * @path /cfg/centrifugo/admin/api/server/presence/
105
+ */
106
+ export async function createCentrifugoAdminApiServerPresenceCreate( data: CentrifugoPresenceRequestRequest, client?
107
+ ): Promise<CentrifugoPresenceResponse> {
108
+ const api = client || getAPIInstance()
109
+ const response = await api.cfg_centrifugo_admin_api.serverPresenceCreate(data)
110
+ return CentrifugoPresenceResponseSchema.parse(response)
111
+ }
112
+
113
+
114
+ /**
115
+ * Get channel presence statistics
116
+ *
117
+ * @method POST
118
+ * @path /cfg/centrifugo/admin/api/server/presence-stats/
119
+ */
120
+ export async function createCentrifugoAdminApiServerPresenceStatsCreate( data: CentrifugoPresenceStatsRequestRequest, client?
121
+ ): Promise<CentrifugoPresenceStatsResponse> {
122
+ const api = client || getAPIInstance()
123
+ const response = await api.cfg_centrifugo_admin_api.serverPresenceStatsCreate(data)
124
+ return CentrifugoPresenceStatsResponseSchema.parse(response)
125
+ }
126
+
127
+
128
+ /**
129
+ * Get connection token for dashboard
130
+ *
131
+ * @method POST
132
+ * @path /cfg/centrifugo/server/auth/token/
133
+ */
134
+ export async function createCentrifugoServerAuthTokenCreate( client?
135
+ ): Promise<any> {
136
+ const api = client || getAPIInstance()
137
+ const response = await api.cfg_centrifugo_admin_api.centrifugoServerAuthTokenCreate()
138
+ return response
139
+ }
140
+
141
+
142
+ /**
143
+ * List active channels
144
+ *
145
+ * @method POST
146
+ * @path /cfg/centrifugo/server/channels/
147
+ */
148
+ export async function createCentrifugoServerChannelsCreate( data: CentrifugoChannelsRequestRequest, client?
149
+ ): Promise<CentrifugoChannelsResponse> {
150
+ const api = client || getAPIInstance()
151
+ const response = await api.cfg_centrifugo_admin_api.centrifugoServerChannelsCreate(data)
152
+ return CentrifugoChannelsResponseSchema.parse(response)
153
+ }
154
+
155
+
156
+ /**
157
+ * Get channel history
158
+ *
159
+ * @method POST
160
+ * @path /cfg/centrifugo/server/history/
161
+ */
162
+ export async function createCentrifugoServerHistoryCreate( data: CentrifugoHistoryRequestRequest, client?
163
+ ): Promise<CentrifugoHistoryResponse> {
164
+ const api = client || getAPIInstance()
165
+ const response = await api.cfg_centrifugo_admin_api.centrifugoServerHistoryCreate(data)
166
+ return CentrifugoHistoryResponseSchema.parse(response)
167
+ }
168
+
169
+
170
+ /**
171
+ * Get Centrifugo server info
172
+ *
173
+ * @method POST
174
+ * @path /cfg/centrifugo/server/info/
175
+ */
176
+ export async function createCentrifugoServerInfoCreate( client?
177
+ ): Promise<CentrifugoInfoResponse> {
178
+ const api = client || getAPIInstance()
179
+ const response = await api.cfg_centrifugo_admin_api.centrifugoServerInfoCreate()
180
+ return CentrifugoInfoResponseSchema.parse(response)
181
+ }
182
+
183
+
184
+ /**
185
+ * Get channel presence
186
+ *
187
+ * @method POST
188
+ * @path /cfg/centrifugo/server/presence/
189
+ */
190
+ export async function createCentrifugoServerPresenceCreate( data: CentrifugoPresenceRequestRequest, client?
191
+ ): Promise<CentrifugoPresenceResponse> {
192
+ const api = client || getAPIInstance()
193
+ const response = await api.cfg_centrifugo_admin_api.centrifugoServerPresenceCreate(data)
194
+ return CentrifugoPresenceResponseSchema.parse(response)
195
+ }
196
+
197
+
198
+ /**
199
+ * Get channel presence statistics
200
+ *
201
+ * @method POST
202
+ * @path /cfg/centrifugo/server/presence-stats/
203
+ */
204
+ export async function createCentrifugoServerPresenceStatsCreate( data: CentrifugoPresenceStatsRequestRequest, client?
205
+ ): Promise<CentrifugoPresenceStatsResponse> {
206
+ const api = client || getAPIInstance()
207
+ const response = await api.cfg_centrifugo_admin_api.centrifugoServerPresenceStatsCreate(data)
208
+ return CentrifugoPresenceStatsResponseSchema.parse(response)
209
+ }
210
+
211
+
@@ -0,0 +1,150 @@
1
+ /**
2
+ * Typed fetchers for Centrifugo Monitoring
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 { ChannelListSchema, type ChannelList } from '../schemas/ChannelList.schema'
33
+ import { HealthCheckSchema, type HealthCheck } from '../schemas/HealthCheck.schema'
34
+ import { OverviewStatsSchema, type OverviewStats } from '../schemas/OverviewStats.schema'
35
+ import { RecentPublishesSchema, type RecentPublishes } from '../schemas/RecentPublishes.schema'
36
+ import { getAPIInstance } from '../../api-instance'
37
+ import type { API } from '../../index'
38
+
39
+ /**
40
+ * Get channel statistics
41
+ *
42
+ * @method GET
43
+ * @path /cfg/centrifugo/admin/api/monitor/channels/
44
+ */
45
+ export async function getCentrifugoAdminApiMonitorChannelsRetrieve( params?: { hours?: number }, client?
46
+ ): Promise<ChannelList> {
47
+ const api = client || getAPIInstance()
48
+ const response = await api.cfg_centrifugo_monitoring.centrifugoAdminApiMonitorChannelsRetrieve(params?.hours)
49
+ return ChannelListSchema.parse(response)
50
+ }
51
+
52
+
53
+ /**
54
+ * Get Centrifugo health status
55
+ *
56
+ * @method GET
57
+ * @path /cfg/centrifugo/admin/api/monitor/health/
58
+ */
59
+ export async function getCentrifugoAdminApiMonitorHealthRetrieve( client?
60
+ ): Promise<HealthCheck> {
61
+ const api = client || getAPIInstance()
62
+ const response = await api.cfg_centrifugo_monitoring.centrifugoAdminApiMonitorHealthRetrieve()
63
+ return HealthCheckSchema.parse(response)
64
+ }
65
+
66
+
67
+ /**
68
+ * Get overview statistics
69
+ *
70
+ * @method GET
71
+ * @path /cfg/centrifugo/admin/api/monitor/overview/
72
+ */
73
+ export async function getCentrifugoAdminApiMonitorOverviewRetrieve( params?: { hours?: number }, client?
74
+ ): Promise<OverviewStats> {
75
+ const api = client || getAPIInstance()
76
+ const response = await api.cfg_centrifugo_monitoring.centrifugoAdminApiMonitorOverviewRetrieve(params?.hours)
77
+ return OverviewStatsSchema.parse(response)
78
+ }
79
+
80
+
81
+ /**
82
+ * Get recent publishes
83
+ *
84
+ * @method GET
85
+ * @path /cfg/centrifugo/admin/api/monitor/publishes/
86
+ */
87
+ export async function getCentrifugoAdminApiMonitorPublishesRetrieve( params?: { channel?: string; count?: number }, client?
88
+ ): Promise<RecentPublishes> {
89
+ const api = client || getAPIInstance()
90
+ const response = await api.cfg_centrifugo_monitoring.centrifugoAdminApiMonitorPublishesRetrieve(params?.channel, params?.count)
91
+ return RecentPublishesSchema.parse(response)
92
+ }
93
+
94
+
95
+ /**
96
+ * Get channel statistics
97
+ *
98
+ * @method GET
99
+ * @path /cfg/centrifugo/monitor/channels/
100
+ */
101
+ export async function getCentrifugoMonitorChannelsRetrieve( params?: { hours?: number }, client?
102
+ ): Promise<ChannelList> {
103
+ const api = client || getAPIInstance()
104
+ const response = await api.cfg_centrifugo_monitoring.centrifugoMonitorChannelsRetrieve(params?.hours)
105
+ return ChannelListSchema.parse(response)
106
+ }
107
+
108
+
109
+ /**
110
+ * Get Centrifugo health status
111
+ *
112
+ * @method GET
113
+ * @path /cfg/centrifugo/monitor/health/
114
+ */
115
+ export async function getCentrifugoMonitorHealthRetrieve( client?
116
+ ): Promise<HealthCheck> {
117
+ const api = client || getAPIInstance()
118
+ const response = await api.cfg_centrifugo_monitoring.centrifugoMonitorHealthRetrieve()
119
+ return HealthCheckSchema.parse(response)
120
+ }
121
+
122
+
123
+ /**
124
+ * Get overview statistics
125
+ *
126
+ * @method GET
127
+ * @path /cfg/centrifugo/monitor/overview/
128
+ */
129
+ export async function getCentrifugoMonitorOverviewRetrieve( params?: { hours?: number }, client?
130
+ ): Promise<OverviewStats> {
131
+ const api = client || getAPIInstance()
132
+ const response = await api.cfg_centrifugo_monitoring.centrifugoMonitorOverviewRetrieve(params?.hours)
133
+ return OverviewStatsSchema.parse(response)
134
+ }
135
+
136
+
137
+ /**
138
+ * Get recent publishes
139
+ *
140
+ * @method GET
141
+ * @path /cfg/centrifugo/monitor/publishes/
142
+ */
143
+ export async function getCentrifugoMonitorPublishesRetrieve( params?: { channel?: string; count?: number }, client?
144
+ ): Promise<RecentPublishes> {
145
+ const api = client || getAPIInstance()
146
+ const response = await api.cfg_centrifugo_monitoring.centrifugoMonitorPublishesRetrieve(params?.channel, params?.count)
147
+ return RecentPublishesSchema.parse(response)
148
+ }
149
+
150
+
@@ -0,0 +1,152 @@
1
+ /**
2
+ * Typed fetchers for Centrifugo Testing
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 { ConnectionTokenRequestRequestSchema, type ConnectionTokenRequestRequest } from '../schemas/ConnectionTokenRequestRequest.schema'
33
+ import { ConnectionTokenResponseSchema, type ConnectionTokenResponse } from '../schemas/ConnectionTokenResponse.schema'
34
+ import { ManualAckRequestRequestSchema, type ManualAckRequestRequest } from '../schemas/ManualAckRequestRequest.schema'
35
+ import { ManualAckResponseSchema, type ManualAckResponse } from '../schemas/ManualAckResponse.schema'
36
+ import { PublishTestRequestRequestSchema, type PublishTestRequestRequest } from '../schemas/PublishTestRequestRequest.schema'
37
+ import { PublishTestResponseSchema, type PublishTestResponse } from '../schemas/PublishTestResponse.schema'
38
+ import { getAPIInstance } from '../../api-instance'
39
+ import type { API } from '../../index'
40
+
41
+ /**
42
+ * Generate connection token
43
+ *
44
+ * @method POST
45
+ * @path /cfg/centrifugo/admin/api/testing/connection-token/
46
+ */
47
+ export async function createCentrifugoAdminApiTestingConnectionTokenCreate( data: ConnectionTokenRequestRequest, client?
48
+ ): Promise<ConnectionTokenResponse> {
49
+ const api = client || getAPIInstance()
50
+ const response = await api.cfg_centrifugo_testing.centrifugoAdminApiTestingConnectionTokenCreate(data)
51
+ return ConnectionTokenResponseSchema.parse(response)
52
+ }
53
+
54
+
55
+ /**
56
+ * Publish test message
57
+ *
58
+ * @method POST
59
+ * @path /cfg/centrifugo/admin/api/testing/publish-test/
60
+ */
61
+ export async function createCentrifugoAdminApiTestingPublishTestCreate( data: PublishTestRequestRequest, client?
62
+ ): Promise<PublishTestResponse> {
63
+ const api = client || getAPIInstance()
64
+ const response = await api.cfg_centrifugo_testing.centrifugoAdminApiTestingPublishTestCreate(data)
65
+ return PublishTestResponseSchema.parse(response)
66
+ }
67
+
68
+
69
+ /**
70
+ * Publish with database logging
71
+ *
72
+ * @method POST
73
+ * @path /cfg/centrifugo/admin/api/testing/publish-with-logging/
74
+ */
75
+ export async function createCentrifugoAdminApiTestingPublishWithLoggingCreate( data: PublishTestRequestRequest, client?
76
+ ): Promise<PublishTestResponse> {
77
+ const api = client || getAPIInstance()
78
+ const response = await api.cfg_centrifugo_testing.centrifugoAdminApiTestingPublishWithLoggingCreate(data)
79
+ return PublishTestResponseSchema.parse(response)
80
+ }
81
+
82
+
83
+ /**
84
+ * Send manual ACK
85
+ *
86
+ * @method POST
87
+ * @path /cfg/centrifugo/admin/api/testing/send-ack/
88
+ */
89
+ export async function createCentrifugoAdminApiTestingSendAckCreate( data: ManualAckRequestRequest, client?
90
+ ): Promise<ManualAckResponse> {
91
+ const api = client || getAPIInstance()
92
+ const response = await api.cfg_centrifugo_testing.centrifugoAdminApiTestingSendAckCreate(data)
93
+ return ManualAckResponseSchema.parse(response)
94
+ }
95
+
96
+
97
+ /**
98
+ * Generate connection token
99
+ *
100
+ * @method POST
101
+ * @path /cfg/centrifugo/testing/connection-token/
102
+ */
103
+ export async function createCentrifugoTestingConnectionTokenCreate( data: ConnectionTokenRequestRequest, client?
104
+ ): Promise<ConnectionTokenResponse> {
105
+ const api = client || getAPIInstance()
106
+ const response = await api.cfg_centrifugo_testing.connectionTokenCreate(data)
107
+ return ConnectionTokenResponseSchema.parse(response)
108
+ }
109
+
110
+
111
+ /**
112
+ * Publish test message
113
+ *
114
+ * @method POST
115
+ * @path /cfg/centrifugo/testing/publish-test/
116
+ */
117
+ export async function createCentrifugoTestingPublishTestCreate( data: PublishTestRequestRequest, client?
118
+ ): Promise<PublishTestResponse> {
119
+ const api = client || getAPIInstance()
120
+ const response = await api.cfg_centrifugo_testing.publishTestCreate(data)
121
+ return PublishTestResponseSchema.parse(response)
122
+ }
123
+
124
+
125
+ /**
126
+ * Publish with database logging
127
+ *
128
+ * @method POST
129
+ * @path /cfg/centrifugo/testing/publish-with-logging/
130
+ */
131
+ export async function createCentrifugoTestingPublishWithLoggingCreate( data: PublishTestRequestRequest, client?
132
+ ): Promise<PublishTestResponse> {
133
+ const api = client || getAPIInstance()
134
+ const response = await api.cfg_centrifugo_testing.publishWithLoggingCreate(data)
135
+ return PublishTestResponseSchema.parse(response)
136
+ }
137
+
138
+
139
+ /**
140
+ * Send manual ACK
141
+ *
142
+ * @method POST
143
+ * @path /cfg/centrifugo/testing/send-ack/
144
+ */
145
+ export async function createCentrifugoTestingSendAckCreate( data: ManualAckRequestRequest, client?
146
+ ): Promise<ManualAckResponse> {
147
+ const api = client || getAPIInstance()
148
+ const response = await api.cfg_centrifugo_testing.sendAckCreate(data)
149
+ return ManualAckResponseSchema.parse(response)
150
+ }
151
+
152
+
@@ -28,6 +28,9 @@
28
28
  export * from './cfg__accounts'
29
29
  export * from './cfg__accounts__auth'
30
30
  export * from './cfg__accounts__user_profile'
31
+ export * from './cfg__centrifugo__centrifugo_admin_api'
32
+ export * from './cfg__centrifugo__centrifugo_monitoring'
33
+ export * from './cfg__centrifugo__centrifugo_testing'
31
34
  export * from './cfg__endpoints'
32
35
  export * from './cfg__health'
33
36
  export * from './cfg__knowbase'