@djangocfg/api 1.2.23 → 1.2.25
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 +2770 -23332
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1908 -19148
- package/dist/index.d.ts +1908 -19148
- package/dist/index.mjs +2705 -23279
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/contexts/index.ts +0 -11
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo.ts +3 -2
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_auth.ts +48 -0
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +5 -5
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +0 -16
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_api_keys.ts +78 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_monitoring.ts +5 -20
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_proto_files.ts +91 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_services.ts +5 -4
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_jobs.ts +10 -8
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_registries.ts +24 -22
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_schedules.ts +5 -4
- package/src/cfg/generated/_utils/fetchers/index.ts +3 -0
- package/src/cfg/generated/_utils/hooks/cfg__accounts.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__accounts__auth.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo.ts +3 -3
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_admin_api.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_auth.ts +35 -0
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +5 -6
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_testing.ts +0 -21
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_activity.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_api_zones.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_charts.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_config.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_overview.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_statistics.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_system.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__endpoints.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_api_keys.ts +65 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_charts.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_configuration.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_monitoring.ts +5 -21
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_proto_files.ts +83 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_services.ts +3 -3
- package/src/cfg/generated/_utils/hooks/cfg__health.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__leads__lead_submission.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__bulk_email.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__logs.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__newsletters.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__testing.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_jobs.ts +8 -6
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_monitoring.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_registries.ts +16 -14
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_schedules.ts +3 -2
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_workers.ts +0 -1
- package/src/cfg/generated/_utils/hooks/index.ts +3 -0
- package/src/cfg/generated/_utils/schemas/ApiKey.schema.ts +32 -0
- package/src/cfg/generated/_utils/schemas/ApiKeyStats.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoToken.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/Command.schema.ts +13 -0
- package/src/cfg/generated/_utils/schemas/ConnectionTokenResponse.schema.ts +3 -2
- package/src/cfg/generated/_utils/schemas/DashboardCharts.schema.ts +10 -10
- package/src/cfg/generated/_utils/schemas/GRPCCallRequestRequest.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/GRPCConfig.schema.ts +6 -6
- package/src/cfg/generated/_utils/schemas/{GRPCExampleSerializer.schema.ts → GRPCExample.schema.ts} +3 -3
- package/src/cfg/generated/_utils/schemas/GRPCExamplesList.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/{GRPCFeaturesSerializer.schema.ts → GRPCFeatures.schema.ts} +4 -4
- package/src/cfg/generated/_utils/schemas/{GRPCFrameworkConfigSerializer.schema.ts → GRPCFrameworkConfig.schema.ts} +3 -3
- package/src/cfg/generated/_utils/schemas/{GRPCInterceptorInfoSerializer.schema.ts → GRPCInterceptorInfo.schema.ts} +3 -3
- package/src/cfg/generated/_utils/schemas/GRPCOverviewStats.schema.ts +3 -1
- package/src/cfg/generated/_utils/schemas/GRPCRegisteredService.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/{GRPCServerConfigSerializer.schema.ts → GRPCServerConfig.schema.ts} +4 -4
- package/src/cfg/generated/_utils/schemas/GRPCServerInfo.schema.ts +6 -6
- package/src/cfg/generated/_utils/schemas/GRPCServerStatus.schema.ts +34 -0
- package/src/cfg/generated/_utils/schemas/{GRPCServiceInfoSerializer.schema.ts → GRPCServiceInfo.schema.ts} +3 -3
- package/src/cfg/generated/_utils/schemas/{GRPCStatsSerializer.schema.ts → GRPCStats.schema.ts} +3 -3
- package/src/cfg/generated/_utils/schemas/JobListRequest.schema.ts +28 -0
- package/src/cfg/generated/_utils/schemas/{MethodInfoSerializer.schema.ts → MethodInfo.schema.ts} +3 -3
- package/src/cfg/generated/_utils/schemas/MethodList.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/{MethodStatsSerializer.schema.ts → MethodStats.schema.ts} +3 -3
- package/src/cfg/generated/_utils/schemas/{MethodSummarySerializer.schema.ts → MethodSummary.schema.ts} +5 -5
- package/src/cfg/generated/_utils/schemas/PaginatedApiKeyList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedJobListList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedPublishList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedRecentRequestList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedScheduledJobList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedServiceSummaryList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/ProtoFileDetail.schema.ts +27 -0
- package/src/cfg/generated/_utils/schemas/ProtoFileList.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/ProtoGenerateError.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/ProtoGenerateRequestRequest.schema.ts +20 -0
- package/src/cfg/generated/_utils/schemas/ProtoGenerateResponse.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/Publish.schema.ts +29 -0
- package/src/cfg/generated/_utils/schemas/{RecentErrorSerializer.schema.ts → RecentError.schema.ts} +3 -3
- package/src/cfg/generated/_utils/schemas/RecentRequest.schema.ts +5 -0
- package/src/cfg/generated/_utils/schemas/ServiceDetail.schema.ts +6 -6
- package/src/cfg/generated/_utils/schemas/ServiceMethods.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/{ServiceStatsSerializer.schema.ts → ServiceStats.schema.ts} +3 -3
- package/src/cfg/generated/_utils/schemas/ServiceSummary.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/User.schema.ts +2 -0
- package/src/cfg/generated/_utils/schemas/index.ts +31 -21
- package/src/cfg/generated/cfg__accounts/models.ts +17 -0
- package/src/cfg/generated/cfg__accounts__user_profile/models.ts +17 -0
- package/src/cfg/generated/cfg__centrifugo/client.ts +1 -1
- package/src/cfg/generated/cfg__centrifugo/models.ts +19 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/client.ts +26 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/index.ts +2 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/models.ts +16 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/client.ts +6 -5
- package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/models.ts +37 -11
- package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/client.ts +0 -10
- package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/models.ts +0 -26
- package/src/cfg/generated/cfg__dashboard__dashboard_commands/models.ts +10 -1
- package/src/cfg/generated/cfg__grpc__grpc_api_keys/client.ts +56 -0
- package/src/cfg/generated/cfg__grpc__grpc_api_keys/index.ts +2 -0
- package/src/cfg/generated/cfg__grpc__grpc_api_keys/models.ts +79 -0
- package/src/cfg/generated/cfg__grpc__grpc_charts/models.ts +0 -96
- package/src/cfg/generated/cfg__grpc__grpc_configuration/models.ts +12 -12
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/client.ts +4 -25
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/models.ts +111 -49
- package/src/cfg/generated/cfg__grpc__grpc_proto_files/client.ts +54 -0
- package/src/cfg/generated/cfg__grpc__grpc_proto_files/index.ts +2 -0
- package/src/cfg/generated/cfg__grpc__grpc_proto_files/models.ts +35 -0
- package/src/cfg/generated/cfg__grpc__grpc_services/client.ts +6 -5
- package/src/cfg/generated/cfg__grpc__grpc_services/models.ts +57 -8
- package/src/cfg/generated/cfg__grpc__grpc_testing/models.ts +2 -2
- package/src/cfg/generated/cfg__rq__rq_jobs/client.ts +8 -8
- package/src/cfg/generated/cfg__rq__rq_jobs/models.ts +65 -0
- package/src/cfg/generated/cfg__rq__rq_registries/client.ts +37 -34
- package/src/cfg/generated/cfg__rq__rq_registries/models.ts +65 -0
- package/src/cfg/generated/cfg__rq__rq_schedules/client.ts +4 -4
- package/src/cfg/generated/cfg__rq__rq_schedules/models.ts +25 -0
- package/src/cfg/generated/client.ts +9 -0
- package/src/cfg/generated/index.ts +27 -8
- package/src/cfg/generated/{schema.ts → schema.json} +19166 -18258
- package/src/index.ts +7 -2
- package/src/types/auth.ts +40 -0
- package/src/types/index.ts +7 -0
- package/src/cfg/contexts/AccountsContext.tsx +0 -205
- package/src/cfg/generated/_utils/schemas/ConnectionTokenRequestRequest.schema.ts +0 -20
- package/src/cfg/generated/_utils/schemas/ErrorDistributionChartSerializer.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/MonitoringServiceStatsSerializer.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/RecentPublishes.schema.ts +0 -23
- package/src/cfg/generated/_utils/schemas/RequestVolumeChartSerializer.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/ResponseTimeChartSerializer.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/ServerUptimeChartSerializer.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/ServiceActivityChartSerializer.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/ServiceList.schema.ts +0 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/api",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.25",
|
|
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.25",
|
|
72
72
|
"react": "^19.1.0",
|
|
73
73
|
"react-dom": "^19.1.0",
|
|
74
74
|
"tsup": "^8.5.0",
|
|
@@ -5,17 +5,6 @@
|
|
|
5
5
|
* Uses generated SWR hooks for optimal data fetching and caching
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
// Accounts (Auth & Profile)
|
|
9
|
-
export {
|
|
10
|
-
AccountsProvider,
|
|
11
|
-
useAccountsContext,
|
|
12
|
-
PatchedUserProfileUpdateRequestSchema
|
|
13
|
-
} from './AccountsContext';
|
|
14
|
-
export type {
|
|
15
|
-
AccountsContextValue,
|
|
16
|
-
PatchedUserProfileUpdateRequest
|
|
17
|
-
} from './AccountsContext';
|
|
18
|
-
|
|
19
8
|
// Newsletter (Campaigns & Subscriptions)
|
|
20
9
|
export { NewsletterProvider, useNewsletterContext } from './NewsletterContext';
|
|
21
10
|
export type { NewsletterContextValue } from './NewsletterContext';
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
* const users = await getUsers({ page: 1 }, api)
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
+
import { PublishSchema, type Publish } from '../schemas/Publish.schema'
|
|
32
33
|
import { getAPIInstance } from '../../api-instance'
|
|
33
34
|
|
|
34
35
|
/**
|
|
@@ -38,10 +39,10 @@ import { getAPIInstance } from '../../api-instance'
|
|
|
38
39
|
* @path /cfg/centrifugo/monitor/channels/
|
|
39
40
|
*/
|
|
40
41
|
export async function getCentrifugoMonitorChannelsRetrieve( client?: any
|
|
41
|
-
): Promise<
|
|
42
|
+
): Promise<Publish> {
|
|
42
43
|
const api = client || getAPIInstance()
|
|
43
44
|
const response = await api.cfg_centrifugo.monitorChannelsRetrieve()
|
|
44
|
-
return response
|
|
45
|
+
return PublishSchema.parse(response)
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed fetchers for Centrifugo Auth
|
|
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 { ConnectionTokenResponseSchema, type ConnectionTokenResponse } from '../schemas/ConnectionTokenResponse.schema'
|
|
33
|
+
import { getAPIInstance } from '../../api-instance'
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get Centrifugo connection token
|
|
37
|
+
*
|
|
38
|
+
* @method GET
|
|
39
|
+
* @path /cfg/centrifugo/auth/token/
|
|
40
|
+
*/
|
|
41
|
+
export async function getCentrifugoAuthTokenRetrieve( client?: any
|
|
42
|
+
): Promise<ConnectionTokenResponse> {
|
|
43
|
+
const api = client || getAPIInstance()
|
|
44
|
+
const response = await api.cfg_centrifugo_auth.tokenRetrieve()
|
|
45
|
+
return ConnectionTokenResponseSchema.parse(response)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
import { CentrifugoOverviewStatsSchema, type CentrifugoOverviewStats } from '../schemas/CentrifugoOverviewStats.schema'
|
|
33
33
|
import { ChannelListSchema, type ChannelList } from '../schemas/ChannelList.schema'
|
|
34
34
|
import { HealthCheckSchema, type HealthCheck } from '../schemas/HealthCheck.schema'
|
|
35
|
-
import {
|
|
35
|
+
import { PaginatedPublishListSchema, type PaginatedPublishList } from '../schemas/PaginatedPublishList.schema'
|
|
36
36
|
import { getAPIInstance } from '../../api-instance'
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -69,11 +69,11 @@ export async function getCentrifugoMonitorOverviewRetrieve( params?: { hours?:
|
|
|
69
69
|
* @method GET
|
|
70
70
|
* @path /cfg/centrifugo/monitor/publishes/
|
|
71
71
|
*/
|
|
72
|
-
export async function
|
|
73
|
-
): Promise<
|
|
72
|
+
export async function getCentrifugoMonitorPublishesList( params?: { channel?: string; page?: number; page_size?: number; status?: string }, client?: any
|
|
73
|
+
): Promise<PaginatedPublishList> {
|
|
74
74
|
const api = client || getAPIInstance()
|
|
75
|
-
const response = await api.cfg_centrifugo_monitoring.
|
|
76
|
-
return
|
|
75
|
+
const response = await api.cfg_centrifugo_monitoring.centrifugoMonitorPublishesList(params?.channel, params?.page, params?.page_size, params?.status)
|
|
76
|
+
return PaginatedPublishListSchema.parse(response)
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
|
|
@@ -29,28 +29,12 @@
|
|
|
29
29
|
* const users = await getUsers({ page: 1 }, api)
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
import { ConnectionTokenRequestRequestSchema, type ConnectionTokenRequestRequest } from '../schemas/ConnectionTokenRequestRequest.schema'
|
|
33
|
-
import { ConnectionTokenResponseSchema, type ConnectionTokenResponse } from '../schemas/ConnectionTokenResponse.schema'
|
|
34
32
|
import { ManualAckRequestRequestSchema, type ManualAckRequestRequest } from '../schemas/ManualAckRequestRequest.schema'
|
|
35
33
|
import { ManualAckResponseSchema, type ManualAckResponse } from '../schemas/ManualAckResponse.schema'
|
|
36
34
|
import { PublishTestRequestRequestSchema, type PublishTestRequestRequest } from '../schemas/PublishTestRequestRequest.schema'
|
|
37
35
|
import { PublishTestResponseSchema, type PublishTestResponse } from '../schemas/PublishTestResponse.schema'
|
|
38
36
|
import { getAPIInstance } from '../../api-instance'
|
|
39
37
|
|
|
40
|
-
/**
|
|
41
|
-
* Generate connection token
|
|
42
|
-
*
|
|
43
|
-
* @method POST
|
|
44
|
-
* @path /cfg/centrifugo/testing/connection-token/
|
|
45
|
-
*/
|
|
46
|
-
export async function createCentrifugoTestingConnectionTokenCreate( data: ConnectionTokenRequestRequest, client?: any
|
|
47
|
-
): Promise<ConnectionTokenResponse> {
|
|
48
|
-
const api = client || getAPIInstance()
|
|
49
|
-
const response = await api.cfg_centrifugo_testing.connectionTokenCreate(data)
|
|
50
|
-
return ConnectionTokenResponseSchema.parse(response)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
38
|
/**
|
|
55
39
|
* Publish test message
|
|
56
40
|
*
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed fetchers for Grpc Api Keys
|
|
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 { ApiKeySchema, type ApiKey } from '../schemas/ApiKey.schema'
|
|
33
|
+
import { ApiKeyStatsSchema, type ApiKeyStats } from '../schemas/ApiKeyStats.schema'
|
|
34
|
+
import { PaginatedApiKeyListSchema, type PaginatedApiKeyList } from '../schemas/PaginatedApiKeyList.schema'
|
|
35
|
+
import { getAPIInstance } from '../../api-instance'
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* List API keys
|
|
39
|
+
*
|
|
40
|
+
* @method GET
|
|
41
|
+
* @path /cfg/grpc/api-keys/
|
|
42
|
+
*/
|
|
43
|
+
export async function getGrpcApiKeysList( params?: { is_active?: boolean; key_type?: string; page?: number; page_size?: number; user_id?: number }, client?: any
|
|
44
|
+
): Promise<PaginatedApiKeyList> {
|
|
45
|
+
const api = client || getAPIInstance()
|
|
46
|
+
const response = await api.cfg_grpc_api_keys.list(params?.is_active, params?.key_type, params?.page, params?.page_size, params?.user_id)
|
|
47
|
+
return PaginatedApiKeyListSchema.parse(response)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Get API key details
|
|
53
|
+
*
|
|
54
|
+
* @method GET
|
|
55
|
+
* @path /cfg/grpc/api-keys/{id}/
|
|
56
|
+
*/
|
|
57
|
+
export async function getGrpcApiKeysRetrieve( id: number, client?: any
|
|
58
|
+
): Promise<ApiKey> {
|
|
59
|
+
const api = client || getAPIInstance()
|
|
60
|
+
const response = await api.cfg_grpc_api_keys.retrieve(id)
|
|
61
|
+
return ApiKeySchema.parse(response)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Get API keys statistics
|
|
67
|
+
*
|
|
68
|
+
* @method GET
|
|
69
|
+
* @path /cfg/grpc/api-keys/stats/
|
|
70
|
+
*/
|
|
71
|
+
export async function getGrpcApiKeysStatsRetrieve( client?: any
|
|
72
|
+
): Promise<ApiKeyStats> {
|
|
73
|
+
const api = client || getAPIInstance()
|
|
74
|
+
const response = await api.cfg_grpc_api_keys.statsRetrieve()
|
|
75
|
+
return ApiKeyStatsSchema.parse(response)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
import { GRPCHealthCheckSchema, type GRPCHealthCheck } from '../schemas/GRPCHealthCheck.schema'
|
|
33
33
|
import { GRPCOverviewStatsSchema, type GRPCOverviewStats } from '../schemas/GRPCOverviewStats.schema'
|
|
34
34
|
import { MethodListSchema, type MethodList } from '../schemas/MethodList.schema'
|
|
35
|
-
import {
|
|
36
|
-
import { ServiceListSchema, type ServiceList } from '../schemas/ServiceList.schema'
|
|
35
|
+
import { PaginatedRecentRequestListSchema, type PaginatedRecentRequestList } from '../schemas/PaginatedRecentRequestList.schema'
|
|
37
36
|
import { getAPIInstance } from '../../api-instance'
|
|
38
37
|
|
|
39
38
|
/**
|
|
@@ -84,25 +83,11 @@ export async function getGrpcMonitorOverviewRetrieve( params?: { hours?: number
|
|
|
84
83
|
* @method GET
|
|
85
84
|
* @path /cfg/grpc/monitor/requests/
|
|
86
85
|
*/
|
|
87
|
-
export async function
|
|
88
|
-
): Promise<
|
|
86
|
+
export async function getGrpcMonitorRequestsList( params?: { method?: string; page?: number; page_size?: number; service?: string; status?: string }, client?: any
|
|
87
|
+
): Promise<PaginatedRecentRequestList> {
|
|
89
88
|
const api = client || getAPIInstance()
|
|
90
|
-
const response = await api.cfg_grpc_monitoring.
|
|
91
|
-
return
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Get service statistics
|
|
97
|
-
*
|
|
98
|
-
* @method GET
|
|
99
|
-
* @path /cfg/grpc/monitor/services/
|
|
100
|
-
*/
|
|
101
|
-
export async function getGrpcMonitorServicesRetrieve( params?: { hours?: number }, client?: any
|
|
102
|
-
): Promise<ServiceList> {
|
|
103
|
-
const api = client || getAPIInstance()
|
|
104
|
-
const response = await api.cfg_grpc_monitoring.grpcMonitorServicesRetrieve(params?.hours)
|
|
105
|
-
return ServiceListSchema.parse(response)
|
|
89
|
+
const response = await api.cfg_grpc_monitoring.grpcMonitorRequestsList(params?.method, params?.page, params?.page_size, params?.service, params?.status)
|
|
90
|
+
return PaginatedRecentRequestListSchema.parse(response)
|
|
106
91
|
}
|
|
107
92
|
|
|
108
93
|
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed fetchers for Grpc Proto Files
|
|
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 { ProtoGenerateRequestRequestSchema, type ProtoGenerateRequestRequest } from '../schemas/ProtoGenerateRequestRequest.schema'
|
|
33
|
+
import { ProtoGenerateResponseSchema, type ProtoGenerateResponse } from '../schemas/ProtoGenerateResponse.schema'
|
|
34
|
+
import { getAPIInstance } from '../../api-instance'
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* List all proto files
|
|
38
|
+
*
|
|
39
|
+
* @method GET
|
|
40
|
+
* @path /cfg/grpc/proto-files/
|
|
41
|
+
*/
|
|
42
|
+
export async function getGrpcProtoFilesList( client?: any
|
|
43
|
+
): Promise<any> {
|
|
44
|
+
const api = client || getAPIInstance()
|
|
45
|
+
const response = await api.cfg_grpc_proto_files.list()
|
|
46
|
+
return response
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Download proto file
|
|
52
|
+
*
|
|
53
|
+
* @method GET
|
|
54
|
+
* @path /cfg/grpc/proto-files/{id}/
|
|
55
|
+
*/
|
|
56
|
+
export async function getGrpcProtoFilesRetrieve( id: string, pk: string, client?: any
|
|
57
|
+
): Promise<any> {
|
|
58
|
+
const api = client || getAPIInstance()
|
|
59
|
+
const response = await api.cfg_grpc_proto_files.retrieve(id, pk)
|
|
60
|
+
return response
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Download all proto files
|
|
66
|
+
*
|
|
67
|
+
* @method GET
|
|
68
|
+
* @path /cfg/grpc/proto-files/download-all/
|
|
69
|
+
*/
|
|
70
|
+
export async function getGrpcProtoFilesDownloadAllRetrieve( client?: any
|
|
71
|
+
): Promise<any> {
|
|
72
|
+
const api = client || getAPIInstance()
|
|
73
|
+
const response = await api.cfg_grpc_proto_files.downloadAllRetrieve()
|
|
74
|
+
return response
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Generate proto files
|
|
80
|
+
*
|
|
81
|
+
* @method POST
|
|
82
|
+
* @path /cfg/grpc/proto-files/generate/
|
|
83
|
+
*/
|
|
84
|
+
export async function createGrpcProtoFilesGenerateCreate( data: ProtoGenerateRequestRequest, client?: any
|
|
85
|
+
): Promise<ProtoGenerateResponse> {
|
|
86
|
+
const api = client || getAPIInstance()
|
|
87
|
+
const response = await api.cfg_grpc_proto_files.generateCreate(data)
|
|
88
|
+
return ProtoGenerateResponseSchema.parse(response)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
* const users = await getUsers({ page: 1 }, api)
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
+
import { PaginatedServiceSummaryListSchema, type PaginatedServiceSummaryList } from '../schemas/PaginatedServiceSummaryList.schema'
|
|
32
33
|
import { ServiceDetailSchema, type ServiceDetail } from '../schemas/ServiceDetail.schema'
|
|
33
34
|
import { ServiceMethodsSchema, type ServiceMethods } from '../schemas/ServiceMethods.schema'
|
|
34
35
|
import { getAPIInstance } from '../../api-instance'
|
|
@@ -39,11 +40,11 @@ import { getAPIInstance } from '../../api-instance'
|
|
|
39
40
|
* @method GET
|
|
40
41
|
* @path /cfg/grpc/services/
|
|
41
42
|
*/
|
|
42
|
-
export async function getGrpcServicesList( params?: { hours?: number }, client?: any
|
|
43
|
-
): Promise<
|
|
43
|
+
export async function getGrpcServicesList( params?: { hours?: number; page?: number; page_size?: number }, client?: any
|
|
44
|
+
): Promise<PaginatedServiceSummaryList> {
|
|
44
45
|
const api = client || getAPIInstance()
|
|
45
|
-
const response = await api.cfg_grpc_services.list(params?.hours)
|
|
46
|
-
return response
|
|
46
|
+
const response = await api.cfg_grpc_services.list(params?.hours, params?.page, params?.page_size)
|
|
47
|
+
return PaginatedServiceSummaryListSchema.parse(response)
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
*/
|
|
32
32
|
import { JobActionResponseSchema, type JobActionResponse } from '../schemas/JobActionResponse.schema'
|
|
33
33
|
import { JobDetailSchema, type JobDetail } from '../schemas/JobDetail.schema'
|
|
34
|
+
import { JobListRequestSchema, type JobListRequest } from '../schemas/JobListRequest.schema'
|
|
35
|
+
import { PaginatedJobListListSchema, type PaginatedJobListList } from '../schemas/PaginatedJobListList.schema'
|
|
34
36
|
import { getAPIInstance } from '../../api-instance'
|
|
35
37
|
|
|
36
38
|
/**
|
|
@@ -39,11 +41,11 @@ import { getAPIInstance } from '../../api-instance'
|
|
|
39
41
|
* @method GET
|
|
40
42
|
* @path /cfg/rq/jobs/
|
|
41
43
|
*/
|
|
42
|
-
export async function getRqJobsList( params?: { queue?: string; status?: string }, client?: any
|
|
43
|
-
): Promise<
|
|
44
|
+
export async function getRqJobsList( params?: { page?: number; page_size?: number; queue?: string; status?: string }, client?: any
|
|
45
|
+
): Promise<PaginatedJobListList> {
|
|
44
46
|
const api = client || getAPIInstance()
|
|
45
|
-
const response = await api.cfg_rq_jobs.list(params?.queue, params?.status)
|
|
46
|
-
return response
|
|
47
|
+
const response = await api.cfg_rq_jobs.list(params?.page, params?.page_size, params?.queue, params?.status)
|
|
48
|
+
return PaginatedJobListListSchema.parse(response)
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
|
|
@@ -81,10 +83,10 @@ export async function deleteRqJobsDestroy( id: string, client?: any
|
|
|
81
83
|
* @method POST
|
|
82
84
|
* @path /cfg/rq/jobs/{id}/cancel/
|
|
83
85
|
*/
|
|
84
|
-
export async function createRqJobsCancelCreate( id: string, client?: any
|
|
86
|
+
export async function createRqJobsCancelCreate( id: string, data: JobListRequest, client?: any
|
|
85
87
|
): Promise<JobActionResponse> {
|
|
86
88
|
const api = client || getAPIInstance()
|
|
87
|
-
const response = await api.cfg_rq_jobs.cancelCreate(id)
|
|
89
|
+
const response = await api.cfg_rq_jobs.cancelCreate(id, data)
|
|
88
90
|
return JobActionResponseSchema.parse(response)
|
|
89
91
|
}
|
|
90
92
|
|
|
@@ -95,10 +97,10 @@ export async function createRqJobsCancelCreate( id: string, client?: any
|
|
|
95
97
|
* @method POST
|
|
96
98
|
* @path /cfg/rq/jobs/{id}/requeue/
|
|
97
99
|
*/
|
|
98
|
-
export async function createRqJobsRequeueCreate( id: string, client?: any
|
|
100
|
+
export async function createRqJobsRequeueCreate( id: string, data: JobListRequest, client?: any
|
|
99
101
|
): Promise<JobActionResponse> {
|
|
100
102
|
const api = client || getAPIInstance()
|
|
101
|
-
const response = await api.cfg_rq_jobs.requeueCreate(id)
|
|
103
|
+
const response = await api.cfg_rq_jobs.requeueCreate(id, data)
|
|
102
104
|
return JobActionResponseSchema.parse(response)
|
|
103
105
|
}
|
|
104
106
|
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
32
|
import { JobActionResponseSchema, type JobActionResponse } from '../schemas/JobActionResponse.schema'
|
|
33
|
+
import { JobListRequestSchema, type JobListRequest } from '../schemas/JobListRequest.schema'
|
|
34
|
+
import { PaginatedJobListListSchema, type PaginatedJobListList } from '../schemas/PaginatedJobListList.schema'
|
|
33
35
|
import { getAPIInstance } from '../../api-instance'
|
|
34
36
|
|
|
35
37
|
/**
|
|
@@ -38,11 +40,11 @@ import { getAPIInstance } from '../../api-instance'
|
|
|
38
40
|
* @method GET
|
|
39
41
|
* @path /cfg/rq/jobs/registries/deferred/
|
|
40
42
|
*/
|
|
41
|
-
export async function getRqJobsRegistriesDeferredList( params?: { queue?: string }, client?: any
|
|
42
|
-
): Promise<
|
|
43
|
+
export async function getRqJobsRegistriesDeferredList( params?: { page?: number; page_size?: number; queue?: string }, client?: any
|
|
44
|
+
): Promise<PaginatedJobListList> {
|
|
43
45
|
const api = client || getAPIInstance()
|
|
44
|
-
const response = await api.cfg_rq_registries.rqJobsRegistriesDeferredList(params?.queue)
|
|
45
|
-
return response
|
|
46
|
+
const response = await api.cfg_rq_registries.rqJobsRegistriesDeferredList(params?.page, params?.page_size, params?.queue)
|
|
47
|
+
return PaginatedJobListListSchema.parse(response)
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
|
|
@@ -52,11 +54,11 @@ export async function getRqJobsRegistriesDeferredList( params?: { queue?: strin
|
|
|
52
54
|
* @method GET
|
|
53
55
|
* @path /cfg/rq/jobs/registries/failed/
|
|
54
56
|
*/
|
|
55
|
-
export async function getRqJobsRegistriesFailedList( params?: { queue?: string }, client?: any
|
|
56
|
-
): Promise<
|
|
57
|
+
export async function getRqJobsRegistriesFailedList( params?: { page?: number; page_size?: number; queue?: string }, client?: any
|
|
58
|
+
): Promise<PaginatedJobListList> {
|
|
57
59
|
const api = client || getAPIInstance()
|
|
58
|
-
const response = await api.cfg_rq_registries.rqJobsRegistriesFailedList(params?.queue)
|
|
59
|
-
return response
|
|
60
|
+
const response = await api.cfg_rq_registries.rqJobsRegistriesFailedList(params?.page, params?.page_size, params?.queue)
|
|
61
|
+
return PaginatedJobListListSchema.parse(response)
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
|
|
@@ -66,10 +68,10 @@ export async function getRqJobsRegistriesFailedList( params?: { queue?: string
|
|
|
66
68
|
* @method POST
|
|
67
69
|
* @path /cfg/rq/jobs/registries/failed/clear/
|
|
68
70
|
*/
|
|
69
|
-
export async function createRqJobsRegistriesFailedClearCreate( params: { queue: string }, client?: any
|
|
71
|
+
export async function createRqJobsRegistriesFailedClearCreate( data: JobListRequest, params: { queue: string }, client?: any
|
|
70
72
|
): Promise<JobActionResponse> {
|
|
71
73
|
const api = client || getAPIInstance()
|
|
72
|
-
const response = await api.cfg_rq_registries.rqJobsRegistriesFailedClearCreate(params.queue)
|
|
74
|
+
const response = await api.cfg_rq_registries.rqJobsRegistriesFailedClearCreate(data, params.queue)
|
|
73
75
|
return JobActionResponseSchema.parse(response)
|
|
74
76
|
}
|
|
75
77
|
|
|
@@ -80,10 +82,10 @@ export async function createRqJobsRegistriesFailedClearCreate( params: { queue:
|
|
|
80
82
|
* @method POST
|
|
81
83
|
* @path /cfg/rq/jobs/registries/failed/requeue-all/
|
|
82
84
|
*/
|
|
83
|
-
export async function createRqJobsRegistriesFailedRequeueAllCreate( params: { queue: string }, client?: any
|
|
85
|
+
export async function createRqJobsRegistriesFailedRequeueAllCreate( data: JobListRequest, params: { queue: string }, client?: any
|
|
84
86
|
): Promise<JobActionResponse> {
|
|
85
87
|
const api = client || getAPIInstance()
|
|
86
|
-
const response = await api.cfg_rq_registries.rqJobsRegistriesFailedRequeueAllCreate(params.queue)
|
|
88
|
+
const response = await api.cfg_rq_registries.rqJobsRegistriesFailedRequeueAllCreate(data, params.queue)
|
|
87
89
|
return JobActionResponseSchema.parse(response)
|
|
88
90
|
}
|
|
89
91
|
|
|
@@ -94,11 +96,11 @@ export async function createRqJobsRegistriesFailedRequeueAllCreate( params: { q
|
|
|
94
96
|
* @method GET
|
|
95
97
|
* @path /cfg/rq/jobs/registries/finished/
|
|
96
98
|
*/
|
|
97
|
-
export async function getRqJobsRegistriesFinishedList( params?: { queue?: string }, client?: any
|
|
98
|
-
): Promise<
|
|
99
|
+
export async function getRqJobsRegistriesFinishedList( params?: { page?: number; page_size?: number; queue?: string }, client?: any
|
|
100
|
+
): Promise<PaginatedJobListList> {
|
|
99
101
|
const api = client || getAPIInstance()
|
|
100
|
-
const response = await api.cfg_rq_registries.rqJobsRegistriesFinishedList(params?.queue)
|
|
101
|
-
return response
|
|
102
|
+
const response = await api.cfg_rq_registries.rqJobsRegistriesFinishedList(params?.page, params?.page_size, params?.queue)
|
|
103
|
+
return PaginatedJobListListSchema.parse(response)
|
|
102
104
|
}
|
|
103
105
|
|
|
104
106
|
|
|
@@ -108,10 +110,10 @@ export async function getRqJobsRegistriesFinishedList( params?: { queue?: strin
|
|
|
108
110
|
* @method POST
|
|
109
111
|
* @path /cfg/rq/jobs/registries/finished/clear/
|
|
110
112
|
*/
|
|
111
|
-
export async function createRqJobsRegistriesFinishedClearCreate( params: { queue: string }, client?: any
|
|
113
|
+
export async function createRqJobsRegistriesFinishedClearCreate( data: JobListRequest, params: { queue: string }, client?: any
|
|
112
114
|
): Promise<JobActionResponse> {
|
|
113
115
|
const api = client || getAPIInstance()
|
|
114
|
-
const response = await api.cfg_rq_registries.rqJobsRegistriesFinishedClearCreate(params.queue)
|
|
116
|
+
const response = await api.cfg_rq_registries.rqJobsRegistriesFinishedClearCreate(data, params.queue)
|
|
115
117
|
return JobActionResponseSchema.parse(response)
|
|
116
118
|
}
|
|
117
119
|
|
|
@@ -122,11 +124,11 @@ export async function createRqJobsRegistriesFinishedClearCreate( params: { queu
|
|
|
122
124
|
* @method GET
|
|
123
125
|
* @path /cfg/rq/jobs/registries/started/
|
|
124
126
|
*/
|
|
125
|
-
export async function getRqJobsRegistriesStartedList( params?: { queue?: string }, client?: any
|
|
126
|
-
): Promise<
|
|
127
|
+
export async function getRqJobsRegistriesStartedList( params?: { page?: number; page_size?: number; queue?: string }, client?: any
|
|
128
|
+
): Promise<PaginatedJobListList> {
|
|
127
129
|
const api = client || getAPIInstance()
|
|
128
|
-
const response = await api.cfg_rq_registries.rqJobsRegistriesStartedList(params?.queue)
|
|
129
|
-
return response
|
|
130
|
+
const response = await api.cfg_rq_registries.rqJobsRegistriesStartedList(params?.page, params?.page_size, params?.queue)
|
|
131
|
+
return PaginatedJobListListSchema.parse(response)
|
|
130
132
|
}
|
|
131
133
|
|
|
132
134
|
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
* const users = await getUsers({ page: 1 }, api)
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
+
import { PaginatedScheduledJobListSchema, type PaginatedScheduledJobList } from '../schemas/PaginatedScheduledJobList.schema'
|
|
32
33
|
import { ScheduleActionResponseSchema, type ScheduleActionResponse } from '../schemas/ScheduleActionResponse.schema'
|
|
33
34
|
import { ScheduleCreateRequestSchema, type ScheduleCreateRequest } from '../schemas/ScheduleCreateRequest.schema'
|
|
34
35
|
import { ScheduledJobSchema, type ScheduledJob } from '../schemas/ScheduledJob.schema'
|
|
@@ -40,11 +41,11 @@ import { getAPIInstance } from '../../api-instance'
|
|
|
40
41
|
* @method GET
|
|
41
42
|
* @path /cfg/rq/schedules/
|
|
42
43
|
*/
|
|
43
|
-
export async function getRqSchedulesList( params?: { queue?: string }, client?: any
|
|
44
|
-
): Promise<
|
|
44
|
+
export async function getRqSchedulesList( params?: { page?: number; page_size?: number; queue?: string }, client?: any
|
|
45
|
+
): Promise<PaginatedScheduledJobList> {
|
|
45
46
|
const api = client || getAPIInstance()
|
|
46
|
-
const response = await api.cfg_rq_schedules.list(params?.queue)
|
|
47
|
-
return response
|
|
47
|
+
const response = await api.cfg_rq_schedules.list(params?.page, params?.page_size, params?.queue)
|
|
48
|
+
return PaginatedScheduledJobListSchema.parse(response)
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
|
|
@@ -30,6 +30,7 @@ export * from './cfg__accounts__auth'
|
|
|
30
30
|
export * from './cfg__accounts__user_profile'
|
|
31
31
|
export * from './cfg__centrifugo'
|
|
32
32
|
export * from './cfg__centrifugo__centrifugo_admin_api'
|
|
33
|
+
export * from './cfg__centrifugo__centrifugo_auth'
|
|
33
34
|
export * from './cfg__centrifugo__centrifugo_monitoring'
|
|
34
35
|
export * from './cfg__centrifugo__centrifugo_testing'
|
|
35
36
|
export * from './cfg__dashboard__dashboard_activity'
|
|
@@ -41,9 +42,11 @@ export * from './cfg__dashboard__dashboard_overview'
|
|
|
41
42
|
export * from './cfg__dashboard__dashboard_statistics'
|
|
42
43
|
export * from './cfg__dashboard__dashboard_system'
|
|
43
44
|
export * from './cfg__endpoints'
|
|
45
|
+
export * from './cfg__grpc__grpc_api_keys'
|
|
44
46
|
export * from './cfg__grpc__grpc_charts'
|
|
45
47
|
export * from './cfg__grpc__grpc_configuration'
|
|
46
48
|
export * from './cfg__grpc__grpc_monitoring'
|
|
49
|
+
export * from './cfg__grpc__grpc_proto_files'
|
|
47
50
|
export * from './cfg__grpc__grpc_services'
|
|
48
51
|
export * from './cfg__grpc__grpc_testing'
|
|
49
52
|
export * from './cfg__health'
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
17
|
import useSWR from 'swr'
|
|
18
|
-
import { useSWRConfig } from 'swr'
|
|
19
18
|
import * as Fetchers from '../fetchers/cfg__centrifugo'
|
|
20
19
|
import type { API } from '../../index'
|
|
20
|
+
import type { Publish } from '../schemas/Publish.schema'
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* API operation
|
|
@@ -25,8 +25,8 @@ import type { API } from '../../index'
|
|
|
25
25
|
* @method GET
|
|
26
26
|
* @path /cfg/centrifugo/monitor/channels/
|
|
27
27
|
*/
|
|
28
|
-
export function useCentrifugoMonitorChannelsRetrieve(client?: API): ReturnType<typeof useSWR<
|
|
29
|
-
return useSWR<
|
|
28
|
+
export function useCentrifugoMonitorChannelsRetrieve(client?: API): ReturnType<typeof useSWR<Publish>> {
|
|
29
|
+
return useSWR<Publish>(
|
|
30
30
|
'cfg-centrifugo-monitor-channel',
|
|
31
31
|
() => Fetchers.getCentrifugoMonitorChannelsRetrieve(client)
|
|
32
32
|
)
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
* await createUser({ name: 'John', email: 'john@example.com' })
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
import useSWR from 'swr'
|
|
18
17
|
import { useSWRConfig } from 'swr'
|
|
19
18
|
import * as Fetchers from '../fetchers/cfg__centrifugo__centrifugo_admin_api'
|
|
20
19
|
import type { API } from '../../index'
|