@djangocfg/api 1.2.22 → 1.2.24
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 +5727 -2933
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5121 -1310
- package/dist/index.d.ts +5121 -1310
- package/dist/index.mjs +5741 -2964
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo.ts +3 -2
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +8 -8
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_api_keys.ts +78 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_charts.ts +138 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_monitoring.ts +11 -11
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_proto_files.ts +91 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_testing.ts +6 -6
- 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__centrifugo.ts +3 -2
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +8 -8
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_api_keys.ts +66 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_charts.ts +126 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_monitoring.ts +9 -9
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_proto_files.ts +83 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_testing.ts +4 -4
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_jobs.ts +8 -6
- 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/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/CentrifugoClientInfo.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/{OverviewStats.schema.ts → CentrifugoOverviewStats.schema.ts} +3 -3
- package/src/cfg/generated/_utils/schemas/CentrifugoPublication.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/Command.schema.ts +13 -0
- package/src/cfg/generated/_utils/schemas/DashboardCharts.schema.ts +30 -0
- package/src/cfg/generated/_utils/schemas/DjangoRQConfig.schema.ts +8 -1
- package/src/cfg/generated/_utils/schemas/ErrorDistributionChart.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/ErrorDistributionDataPoint.schema.ts +22 -0
- 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/GRPCHealthCheck.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/{GRPCInterceptorInfoSerializer.schema.ts → GRPCInterceptorInfo.schema.ts} +3 -3
- package/src/cfg/generated/_utils/schemas/GRPCOverviewStats.schema.ts +27 -0
- package/src/cfg/generated/_utils/schemas/{GRPCServerConfigSerializer.schema.ts → GRPCServerConfig.schema.ts} +4 -4
- package/src/cfg/generated/_utils/schemas/GRPCServerInfo.schema.ts +7 -7
- 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/{GRPCTestLogSerializer.schema.ts → GRPCTestLog.schema.ts} +4 -4
- 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/{ServiceStatsSerializer.schema.ts → MonitoringServiceStats.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/PaginatedScheduledJobList.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 +33 -0
- package/src/cfg/generated/_utils/schemas/RequestVolumeChart.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/RequestVolumeDataPoint.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/ResponseTimeChart.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/ResponseTimeDataPoint.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/ServerLifecycleChart.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/ServerLifecycleEvent.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/ServerUptimeChart.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/ServerUptimeDataPoint.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/ServiceActivityChart.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/ServiceActivityDataPoint.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/ServiceDetail.schema.ts +6 -6
- package/src/cfg/generated/_utils/schemas/ServiceList.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/ServiceMethods.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/ServiceStats.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/index.ts +44 -17
- 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_admin_api/models.ts +5 -5
- package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/client.ts +10 -9
- package/src/cfg/generated/cfg__centrifugo__centrifugo_monitoring/models.ts +38 -12
- package/src/cfg/generated/cfg__dashboard__dashboard_commands/models.ts +10 -1
- package/src/cfg/generated/cfg__dashboard__dashboard_config/models.ts +26 -1
- package/src/cfg/generated/cfg__endpoints/client.ts +1 -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/client.ts +162 -0
- package/src/cfg/generated/cfg__grpc__grpc_charts/index.ts +2 -0
- package/src/cfg/generated/cfg__grpc__grpc_charts/models.ts +239 -0
- package/src/cfg/generated/cfg__grpc__grpc_configuration/models.ts +12 -12
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/client.ts +12 -11
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/models.ts +57 -33
- 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/models.ts +19 -19
- package/src/cfg/generated/cfg__grpc__grpc_testing/client.ts +9 -10
- package/src/cfg/generated/cfg__grpc__grpc_testing/models.ts +24 -40
- package/src/cfg/generated/cfg__payments/client.ts +1 -1
- 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 +15 -0
- package/src/cfg/generated/schema.ts +2618 -661
- package/src/cfg/generated/_utils/schemas/GRPCTestLogs.schema.ts +0 -23
- package/src/cfg/generated/_utils/schemas/RecentPublishes.schema.ts +0 -23
- package/src/cfg/generated/_utils/schemas/RecentRequests.schema.ts +0 -23
|
@@ -41,8 +41,11 @@ export * from './cfg__dashboard__dashboard_overview'
|
|
|
41
41
|
export * from './cfg__dashboard__dashboard_statistics'
|
|
42
42
|
export * from './cfg__dashboard__dashboard_system'
|
|
43
43
|
export * from './cfg__endpoints'
|
|
44
|
+
export * from './cfg__grpc__grpc_api_keys'
|
|
45
|
+
export * from './cfg__grpc__grpc_charts'
|
|
44
46
|
export * from './cfg__grpc__grpc_configuration'
|
|
45
47
|
export * from './cfg__grpc__grpc_monitoring'
|
|
48
|
+
export * from './cfg__grpc__grpc_proto_files'
|
|
46
49
|
export * from './cfg__grpc__grpc_services'
|
|
47
50
|
export * from './cfg__grpc__grpc_testing'
|
|
48
51
|
export * from './cfg__health'
|
|
@@ -18,6 +18,7 @@ import useSWR from 'swr'
|
|
|
18
18
|
import { useSWRConfig } from 'swr'
|
|
19
19
|
import * as Fetchers from '../fetchers/cfg__centrifugo'
|
|
20
20
|
import type { API } from '../../index'
|
|
21
|
+
import type { Publish } from '../schemas/Publish.schema'
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* API operation
|
|
@@ -25,8 +26,8 @@ import type { API } from '../../index'
|
|
|
25
26
|
* @method GET
|
|
26
27
|
* @path /cfg/centrifugo/monitor/channels/
|
|
27
28
|
*/
|
|
28
|
-
export function useCentrifugoMonitorChannelsRetrieve(client?: API): ReturnType<typeof useSWR<
|
|
29
|
-
return useSWR<
|
|
29
|
+
export function useCentrifugoMonitorChannelsRetrieve(client?: API): ReturnType<typeof useSWR<Publish>> {
|
|
30
|
+
return useSWR<Publish>(
|
|
30
31
|
'cfg-centrifugo-monitor-channel',
|
|
31
32
|
() => Fetchers.getCentrifugoMonitorChannelsRetrieve(client)
|
|
32
33
|
)
|
|
@@ -18,10 +18,10 @@ import useSWR from 'swr'
|
|
|
18
18
|
import { useSWRConfig } from 'swr'
|
|
19
19
|
import * as Fetchers from '../fetchers/cfg__centrifugo__centrifugo_monitoring'
|
|
20
20
|
import type { API } from '../../index'
|
|
21
|
+
import type { CentrifugoOverviewStats } from '../schemas/CentrifugoOverviewStats.schema'
|
|
21
22
|
import type { ChannelList } from '../schemas/ChannelList.schema'
|
|
22
23
|
import type { HealthCheck } from '../schemas/HealthCheck.schema'
|
|
23
|
-
import type {
|
|
24
|
-
import type { RecentPublishes } from '../schemas/RecentPublishes.schema'
|
|
24
|
+
import type { PaginatedPublishList } from '../schemas/PaginatedPublishList.schema'
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Get Centrifugo health status
|
|
@@ -43,8 +43,8 @@ export function useCentrifugoMonitorHealthRetrieve(client?: API): ReturnType<typ
|
|
|
43
43
|
* @method GET
|
|
44
44
|
* @path /cfg/centrifugo/monitor/overview/
|
|
45
45
|
*/
|
|
46
|
-
export function useCentrifugoMonitorOverviewRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<
|
|
47
|
-
return useSWR<
|
|
46
|
+
export function useCentrifugoMonitorOverviewRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<CentrifugoOverviewStats>> {
|
|
47
|
+
return useSWR<CentrifugoOverviewStats>(
|
|
48
48
|
params ? ['cfg-centrifugo-monitor-overview', params] : 'cfg-centrifugo-monitor-overview',
|
|
49
49
|
() => Fetchers.getCentrifugoMonitorOverviewRetrieve(params, client)
|
|
50
50
|
)
|
|
@@ -57,10 +57,10 @@ export function useCentrifugoMonitorOverviewRetrieve(params?: { hours?: number }
|
|
|
57
57
|
* @method GET
|
|
58
58
|
* @path /cfg/centrifugo/monitor/publishes/
|
|
59
59
|
*/
|
|
60
|
-
export function
|
|
61
|
-
return useSWR<
|
|
62
|
-
params ? ['cfg-centrifugo-monitor-
|
|
63
|
-
() => Fetchers.
|
|
60
|
+
export function useCentrifugoMonitorPublishesList(params?: { channel?: string; page?: number; page_size?: number; status?: string }, client?: API): ReturnType<typeof useSWR<PaginatedPublishList>> {
|
|
61
|
+
return useSWR<PaginatedPublishList>(
|
|
62
|
+
params ? ['cfg-centrifugo-monitor-publishes', params] : 'cfg-centrifugo-monitor-publishes',
|
|
63
|
+
() => Fetchers.getCentrifugoMonitorPublishesList(params, client)
|
|
64
64
|
)
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SWR Hooks for Grpc Api Keys
|
|
3
|
+
*
|
|
4
|
+
* React hooks powered by SWR for data fetching with automatic caching,
|
|
5
|
+
* revalidation, and optimistic updates.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* ```typescript
|
|
9
|
+
* // Query hooks (GET)
|
|
10
|
+
* const { data, error, isLoading } = useUsers({ page: 1 })
|
|
11
|
+
*
|
|
12
|
+
* // Mutation hooks (POST/PUT/PATCH/DELETE)
|
|
13
|
+
* const createUser = useCreateUser()
|
|
14
|
+
* await createUser({ name: 'John', email: 'john@example.com' })
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
import useSWR from 'swr'
|
|
18
|
+
import { useSWRConfig } from 'swr'
|
|
19
|
+
import * as Fetchers from '../fetchers/cfg__grpc__grpc_api_keys'
|
|
20
|
+
import type { API } from '../../index'
|
|
21
|
+
import type { ApiKey } from '../schemas/ApiKey.schema'
|
|
22
|
+
import type { ApiKeyStats } from '../schemas/ApiKeyStats.schema'
|
|
23
|
+
import type { PaginatedApiKeyList } from '../schemas/PaginatedApiKeyList.schema'
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* List API keys
|
|
27
|
+
*
|
|
28
|
+
* @method GET
|
|
29
|
+
* @path /cfg/grpc/api-keys/
|
|
30
|
+
*/
|
|
31
|
+
export function useGrpcApiKeysList(params?: { is_active?: boolean; key_type?: string; page?: number; page_size?: number; user_id?: number }, client?: API): ReturnType<typeof useSWR<PaginatedApiKeyList>> {
|
|
32
|
+
return useSWR<PaginatedApiKeyList>(
|
|
33
|
+
params ? ['cfg-grpc-api-keys', params] : 'cfg-grpc-api-keys',
|
|
34
|
+
() => Fetchers.getGrpcApiKeysList(params, client)
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Get API key details
|
|
41
|
+
*
|
|
42
|
+
* @method GET
|
|
43
|
+
* @path /cfg/grpc/api-keys/{id}/
|
|
44
|
+
*/
|
|
45
|
+
export function useGrpcApiKeysRetrieve(id: number, client?: API): ReturnType<typeof useSWR<ApiKey>> {
|
|
46
|
+
return useSWR<ApiKey>(
|
|
47
|
+
['cfg-grpc-api-key', id],
|
|
48
|
+
() => Fetchers.getGrpcApiKeysRetrieve(id, client)
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Get API keys statistics
|
|
55
|
+
*
|
|
56
|
+
* @method GET
|
|
57
|
+
* @path /cfg/grpc/api-keys/stats/
|
|
58
|
+
*/
|
|
59
|
+
export function useGrpcApiKeysStatsRetrieve(client?: API): ReturnType<typeof useSWR<ApiKeyStats>> {
|
|
60
|
+
return useSWR<ApiKeyStats>(
|
|
61
|
+
'cfg-grpc-api-keys-stat',
|
|
62
|
+
() => Fetchers.getGrpcApiKeysStatsRetrieve(client)
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SWR Hooks for Grpc Charts
|
|
3
|
+
*
|
|
4
|
+
* React hooks powered by SWR for data fetching with automatic caching,
|
|
5
|
+
* revalidation, and optimistic updates.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* ```typescript
|
|
9
|
+
* // Query hooks (GET)
|
|
10
|
+
* const { data, error, isLoading } = useUsers({ page: 1 })
|
|
11
|
+
*
|
|
12
|
+
* // Mutation hooks (POST/PUT/PATCH/DELETE)
|
|
13
|
+
* const createUser = useCreateUser()
|
|
14
|
+
* await createUser({ name: 'John', email: 'john@example.com' })
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
import useSWR from 'swr'
|
|
18
|
+
import { useSWRConfig } from 'swr'
|
|
19
|
+
import * as Fetchers from '../fetchers/cfg__grpc__grpc_charts'
|
|
20
|
+
import type { API } from '../../index'
|
|
21
|
+
import type { DashboardCharts } from '../schemas/DashboardCharts.schema'
|
|
22
|
+
import type { ErrorDistributionChart } from '../schemas/ErrorDistributionChart.schema'
|
|
23
|
+
import type { RequestVolumeChart } from '../schemas/RequestVolumeChart.schema'
|
|
24
|
+
import type { ResponseTimeChart } from '../schemas/ResponseTimeChart.schema'
|
|
25
|
+
import type { ServerLifecycleChart } from '../schemas/ServerLifecycleChart.schema'
|
|
26
|
+
import type { ServerUptimeChart } from '../schemas/ServerUptimeChart.schema'
|
|
27
|
+
import type { ServiceActivityChart } from '../schemas/ServiceActivityChart.schema'
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Get all dashboard charts data
|
|
31
|
+
*
|
|
32
|
+
* @method GET
|
|
33
|
+
* @path /cfg/grpc/charts/dashboard/
|
|
34
|
+
*/
|
|
35
|
+
export function useGrpcChartsDashboardRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<DashboardCharts>> {
|
|
36
|
+
return useSWR<DashboardCharts>(
|
|
37
|
+
params ? ['cfg-grpc-charts-dashboard', params] : 'cfg-grpc-charts-dashboard',
|
|
38
|
+
() => Fetchers.getGrpcChartsDashboardRetrieve(params, client)
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Get error distribution chart data
|
|
45
|
+
*
|
|
46
|
+
* @method GET
|
|
47
|
+
* @path /cfg/grpc/charts/error-distribution/
|
|
48
|
+
*/
|
|
49
|
+
export function useGrpcChartsErrorDistributionRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<ErrorDistributionChart>> {
|
|
50
|
+
return useSWR<ErrorDistributionChart>(
|
|
51
|
+
params ? ['cfg-grpc-charts-error-distribution', params] : 'cfg-grpc-charts-error-distribution',
|
|
52
|
+
() => Fetchers.getGrpcChartsErrorDistributionRetrieve(params, client)
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Get request volume chart data
|
|
59
|
+
*
|
|
60
|
+
* @method GET
|
|
61
|
+
* @path /cfg/grpc/charts/request-volume/
|
|
62
|
+
*/
|
|
63
|
+
export function useGrpcChartsRequestVolumeRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<RequestVolumeChart>> {
|
|
64
|
+
return useSWR<RequestVolumeChart>(
|
|
65
|
+
params ? ['cfg-grpc-charts-request-volume', params] : 'cfg-grpc-charts-request-volume',
|
|
66
|
+
() => Fetchers.getGrpcChartsRequestVolumeRetrieve(params, client)
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Get response time chart data
|
|
73
|
+
*
|
|
74
|
+
* @method GET
|
|
75
|
+
* @path /cfg/grpc/charts/response-time/
|
|
76
|
+
*/
|
|
77
|
+
export function useGrpcChartsResponseTimeRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<ResponseTimeChart>> {
|
|
78
|
+
return useSWR<ResponseTimeChart>(
|
|
79
|
+
params ? ['cfg-grpc-charts-response-time', params] : 'cfg-grpc-charts-response-time',
|
|
80
|
+
() => Fetchers.getGrpcChartsResponseTimeRetrieve(params, client)
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Get server lifecycle events
|
|
87
|
+
*
|
|
88
|
+
* @method GET
|
|
89
|
+
* @path /cfg/grpc/charts/server-lifecycle/
|
|
90
|
+
*/
|
|
91
|
+
export function useGrpcChartsServerLifecycleRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<ServerLifecycleChart>> {
|
|
92
|
+
return useSWR<ServerLifecycleChart>(
|
|
93
|
+
params ? ['cfg-grpc-charts-server-lifecycle', params] : 'cfg-grpc-charts-server-lifecycle',
|
|
94
|
+
() => Fetchers.getGrpcChartsServerLifecycleRetrieve(params, client)
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Get server uptime chart data
|
|
101
|
+
*
|
|
102
|
+
* @method GET
|
|
103
|
+
* @path /cfg/grpc/charts/server-uptime/
|
|
104
|
+
*/
|
|
105
|
+
export function useGrpcChartsServerUptimeRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<ServerUptimeChart>> {
|
|
106
|
+
return useSWR<ServerUptimeChart>(
|
|
107
|
+
params ? ['cfg-grpc-charts-server-uptime', params] : 'cfg-grpc-charts-server-uptime',
|
|
108
|
+
() => Fetchers.getGrpcChartsServerUptimeRetrieve(params, client)
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Get service activity chart data
|
|
115
|
+
*
|
|
116
|
+
* @method GET
|
|
117
|
+
* @path /cfg/grpc/charts/service-activity/
|
|
118
|
+
*/
|
|
119
|
+
export function useGrpcChartsServiceActivityRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<ServiceActivityChart>> {
|
|
120
|
+
return useSWR<ServiceActivityChart>(
|
|
121
|
+
params ? ['cfg-grpc-charts-service-activity', params] : 'cfg-grpc-charts-service-activity',
|
|
122
|
+
() => Fetchers.getGrpcChartsServiceActivityRetrieve(params, client)
|
|
123
|
+
)
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
@@ -18,10 +18,10 @@ import useSWR from 'swr'
|
|
|
18
18
|
import { useSWRConfig } from 'swr'
|
|
19
19
|
import * as Fetchers from '../fetchers/cfg__grpc__grpc_monitoring'
|
|
20
20
|
import type { API } from '../../index'
|
|
21
|
-
import type {
|
|
21
|
+
import type { GRPCHealthCheck } from '../schemas/GRPCHealthCheck.schema'
|
|
22
|
+
import type { GRPCOverviewStats } from '../schemas/GRPCOverviewStats.schema'
|
|
22
23
|
import type { MethodList } from '../schemas/MethodList.schema'
|
|
23
|
-
import type {
|
|
24
|
-
import type { RecentRequests } from '../schemas/RecentRequests.schema'
|
|
24
|
+
import type { RecentRequest } from '../schemas/RecentRequest.schema'
|
|
25
25
|
import type { ServiceList } from '../schemas/ServiceList.schema'
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -30,8 +30,8 @@ import type { ServiceList } from '../schemas/ServiceList.schema'
|
|
|
30
30
|
* @method GET
|
|
31
31
|
* @path /cfg/grpc/monitor/health/
|
|
32
32
|
*/
|
|
33
|
-
export function useGrpcMonitorHealthRetrieve(client?: API): ReturnType<typeof useSWR<
|
|
34
|
-
return useSWR<
|
|
33
|
+
export function useGrpcMonitorHealthRetrieve(client?: API): ReturnType<typeof useSWR<GRPCHealthCheck>> {
|
|
34
|
+
return useSWR<GRPCHealthCheck>(
|
|
35
35
|
'cfg-grpc-monitor-health',
|
|
36
36
|
() => Fetchers.getGrpcMonitorHealthRetrieve(client)
|
|
37
37
|
)
|
|
@@ -58,8 +58,8 @@ export function useGrpcMonitorMethodsRetrieve(params?: { hours?: number; service
|
|
|
58
58
|
* @method GET
|
|
59
59
|
* @path /cfg/grpc/monitor/overview/
|
|
60
60
|
*/
|
|
61
|
-
export function useGrpcMonitorOverviewRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<
|
|
62
|
-
return useSWR<
|
|
61
|
+
export function useGrpcMonitorOverviewRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<GRPCOverviewStats>> {
|
|
62
|
+
return useSWR<GRPCOverviewStats>(
|
|
63
63
|
params ? ['cfg-grpc-monitor-overview', params] : 'cfg-grpc-monitor-overview',
|
|
64
64
|
() => Fetchers.getGrpcMonitorOverviewRetrieve(params, client)
|
|
65
65
|
)
|
|
@@ -72,8 +72,8 @@ export function useGrpcMonitorOverviewRetrieve(params?: { hours?: number }, clie
|
|
|
72
72
|
* @method GET
|
|
73
73
|
* @path /cfg/grpc/monitor/requests/
|
|
74
74
|
*/
|
|
75
|
-
export function useGrpcMonitorRequestsRetrieve(params?: {
|
|
76
|
-
return useSWR<
|
|
75
|
+
export function useGrpcMonitorRequestsRetrieve(params?: { method?: string; service?: string; status?: string }, client?: API): ReturnType<typeof useSWR<RecentRequest>> {
|
|
76
|
+
return useSWR<RecentRequest>(
|
|
77
77
|
params ? ['cfg-grpc-monitor-request', params] : 'cfg-grpc-monitor-request',
|
|
78
78
|
() => Fetchers.getGrpcMonitorRequestsRetrieve(params, client)
|
|
79
79
|
)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SWR Hooks for Grpc Proto Files
|
|
3
|
+
*
|
|
4
|
+
* React hooks powered by SWR for data fetching with automatic caching,
|
|
5
|
+
* revalidation, and optimistic updates.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* ```typescript
|
|
9
|
+
* // Query hooks (GET)
|
|
10
|
+
* const { data, error, isLoading } = useUsers({ page: 1 })
|
|
11
|
+
*
|
|
12
|
+
* // Mutation hooks (POST/PUT/PATCH/DELETE)
|
|
13
|
+
* const createUser = useCreateUser()
|
|
14
|
+
* await createUser({ name: 'John', email: 'john@example.com' })
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
import useSWR from 'swr'
|
|
18
|
+
import { useSWRConfig } from 'swr'
|
|
19
|
+
import * as Fetchers from '../fetchers/cfg__grpc__grpc_proto_files'
|
|
20
|
+
import type { API } from '../../index'
|
|
21
|
+
import type { ProtoGenerateRequestRequest } from '../schemas/ProtoGenerateRequestRequest.schema'
|
|
22
|
+
import type { ProtoGenerateResponse } from '../schemas/ProtoGenerateResponse.schema'
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* List all proto files
|
|
26
|
+
*
|
|
27
|
+
* @method GET
|
|
28
|
+
* @path /cfg/grpc/proto-files/
|
|
29
|
+
*/
|
|
30
|
+
export function useGrpcProtoFilesList(client?: API): ReturnType<typeof useSWR<any>> {
|
|
31
|
+
return useSWR<any>(
|
|
32
|
+
'cfg-grpc-proto-files',
|
|
33
|
+
() => Fetchers.getGrpcProtoFilesList(client)
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Download proto file
|
|
40
|
+
*
|
|
41
|
+
* @method GET
|
|
42
|
+
* @path /cfg/grpc/proto-files/{id}/
|
|
43
|
+
*/
|
|
44
|
+
export function useGrpcProtoFilesRetrieve(id: string, pk: string, client?: API): ReturnType<typeof useSWR<any>> {
|
|
45
|
+
return useSWR<any>(
|
|
46
|
+
['cfg-grpc-proto-file', id],
|
|
47
|
+
() => Fetchers.getGrpcProtoFilesRetrieve(id, pk, client)
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Download all proto files
|
|
54
|
+
*
|
|
55
|
+
* @method GET
|
|
56
|
+
* @path /cfg/grpc/proto-files/download-all/
|
|
57
|
+
*/
|
|
58
|
+
export function useGrpcProtoFilesDownloadAllRetrieve(client?: API): ReturnType<typeof useSWR<any>> {
|
|
59
|
+
return useSWR<any>(
|
|
60
|
+
'cfg-grpc-proto-files-download-all',
|
|
61
|
+
() => Fetchers.getGrpcProtoFilesDownloadAllRetrieve(client)
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Generate proto files
|
|
68
|
+
*
|
|
69
|
+
* @method POST
|
|
70
|
+
* @path /cfg/grpc/proto-files/generate/
|
|
71
|
+
*/
|
|
72
|
+
export function useCreateGrpcProtoFilesGenerateCreate() {
|
|
73
|
+
const { mutate } = useSWRConfig()
|
|
74
|
+
|
|
75
|
+
return async (data: ProtoGenerateRequestRequest, client?: API): Promise<ProtoGenerateResponse> => {
|
|
76
|
+
const result = await Fetchers.createGrpcProtoFilesGenerateCreate(data, client)
|
|
77
|
+
// Revalidate related queries
|
|
78
|
+
mutate('cfg-grpc-proto-files-generate')
|
|
79
|
+
return result
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
|
|
@@ -21,10 +21,10 @@ import type { API } from '../../index'
|
|
|
21
21
|
import type { GRPCCallRequestRequest } from '../schemas/GRPCCallRequestRequest.schema'
|
|
22
22
|
import type { GRPCCallResponse } from '../schemas/GRPCCallResponse.schema'
|
|
23
23
|
import type { GRPCExamplesList } from '../schemas/GRPCExamplesList.schema'
|
|
24
|
-
import type {
|
|
24
|
+
import type { GRPCTestLog } from '../schemas/GRPCTestLog.schema'
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* Call gRPC method
|
|
27
|
+
* Call gRPC method
|
|
28
28
|
*
|
|
29
29
|
* @method POST
|
|
30
30
|
* @path /cfg/grpc/test/call/
|
|
@@ -61,8 +61,8 @@ export function useGrpcTestExamplesRetrieve(params?: { method?: string; service?
|
|
|
61
61
|
* @method GET
|
|
62
62
|
* @path /cfg/grpc/test/logs/
|
|
63
63
|
*/
|
|
64
|
-
export function useGrpcTestLogsRetrieve(params?: {
|
|
65
|
-
return useSWR<
|
|
64
|
+
export function useGrpcTestLogsRetrieve(params?: { method?: string; service?: string; status?: string }, client?: API): ReturnType<typeof useSWR<GRPCTestLog>> {
|
|
65
|
+
return useSWR<GRPCTestLog>(
|
|
66
66
|
params ? ['cfg-grpc-test-log', params] : 'cfg-grpc-test-log',
|
|
67
67
|
() => Fetchers.getGrpcTestLogsRetrieve(params, client)
|
|
68
68
|
)
|
|
@@ -20,6 +20,8 @@ import * as Fetchers from '../fetchers/cfg__rq__rq_jobs'
|
|
|
20
20
|
import type { API } from '../../index'
|
|
21
21
|
import type { JobActionResponse } from '../schemas/JobActionResponse.schema'
|
|
22
22
|
import type { JobDetail } from '../schemas/JobDetail.schema'
|
|
23
|
+
import type { JobListRequest } from '../schemas/JobListRequest.schema'
|
|
24
|
+
import type { PaginatedJobListList } from '../schemas/PaginatedJobListList.schema'
|
|
23
25
|
|
|
24
26
|
/**
|
|
25
27
|
* List all jobs
|
|
@@ -27,8 +29,8 @@ import type { JobDetail } from '../schemas/JobDetail.schema'
|
|
|
27
29
|
* @method GET
|
|
28
30
|
* @path /cfg/rq/jobs/
|
|
29
31
|
*/
|
|
30
|
-
export function useRqJobsList(params?: { queue?: string; status?: string }, client?: API): ReturnType<typeof useSWR<
|
|
31
|
-
return useSWR<
|
|
32
|
+
export function useRqJobsList(params?: { page?: number; page_size?: number; queue?: string; status?: string }, client?: API): ReturnType<typeof useSWR<PaginatedJobListList>> {
|
|
33
|
+
return useSWR<PaginatedJobListList>(
|
|
32
34
|
params ? ['cfg-rq-jobs', params] : 'cfg-rq-jobs',
|
|
33
35
|
() => Fetchers.getRqJobsList(params, client)
|
|
34
36
|
)
|
|
@@ -77,8 +79,8 @@ export function useDeleteRqJobsDestroy() {
|
|
|
77
79
|
export function useCreateRqJobsCancelCreate() {
|
|
78
80
|
const { mutate } = useSWRConfig()
|
|
79
81
|
|
|
80
|
-
return async (id: string, client?: API): Promise<JobActionResponse> => {
|
|
81
|
-
const result = await Fetchers.createRqJobsCancelCreate(id, client)
|
|
82
|
+
return async (id: string, data: JobListRequest, client?: API): Promise<JobActionResponse> => {
|
|
83
|
+
const result = await Fetchers.createRqJobsCancelCreate(id, data, client)
|
|
82
84
|
// Revalidate related queries
|
|
83
85
|
mutate('cfg-rq-jobs-cancel')
|
|
84
86
|
return result
|
|
@@ -95,8 +97,8 @@ export function useCreateRqJobsCancelCreate() {
|
|
|
95
97
|
export function useCreateRqJobsRequeueCreate() {
|
|
96
98
|
const { mutate } = useSWRConfig()
|
|
97
99
|
|
|
98
|
-
return async (id: string, client?: API): Promise<JobActionResponse> => {
|
|
99
|
-
const result = await Fetchers.createRqJobsRequeueCreate(id, client)
|
|
100
|
+
return async (id: string, data: JobListRequest, client?: API): Promise<JobActionResponse> => {
|
|
101
|
+
const result = await Fetchers.createRqJobsRequeueCreate(id, data, client)
|
|
100
102
|
// Revalidate related queries
|
|
101
103
|
mutate('cfg-rq-jobs-requeue')
|
|
102
104
|
return result
|
|
@@ -19,6 +19,8 @@ import { useSWRConfig } from 'swr'
|
|
|
19
19
|
import * as Fetchers from '../fetchers/cfg__rq__rq_registries'
|
|
20
20
|
import type { API } from '../../index'
|
|
21
21
|
import type { JobActionResponse } from '../schemas/JobActionResponse.schema'
|
|
22
|
+
import type { JobListRequest } from '../schemas/JobListRequest.schema'
|
|
23
|
+
import type { PaginatedJobListList } from '../schemas/PaginatedJobListList.schema'
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
26
|
* List deferred jobs
|
|
@@ -26,8 +28,8 @@ import type { JobActionResponse } from '../schemas/JobActionResponse.schema'
|
|
|
26
28
|
* @method GET
|
|
27
29
|
* @path /cfg/rq/jobs/registries/deferred/
|
|
28
30
|
*/
|
|
29
|
-
export function useRqJobsRegistriesDeferredList(params?: { queue?: string }, client?: API): ReturnType<typeof useSWR<
|
|
30
|
-
return useSWR<
|
|
31
|
+
export function useRqJobsRegistriesDeferredList(params?: { page?: number; page_size?: number; queue?: string }, client?: API): ReturnType<typeof useSWR<PaginatedJobListList>> {
|
|
32
|
+
return useSWR<PaginatedJobListList>(
|
|
31
33
|
params ? ['cfg-rq-jobs-registries-deferred', params] : 'cfg-rq-jobs-registries-deferred',
|
|
32
34
|
() => Fetchers.getRqJobsRegistriesDeferredList(params, client)
|
|
33
35
|
)
|
|
@@ -40,8 +42,8 @@ export function useRqJobsRegistriesDeferredList(params?: { queue?: string }, cli
|
|
|
40
42
|
* @method GET
|
|
41
43
|
* @path /cfg/rq/jobs/registries/failed/
|
|
42
44
|
*/
|
|
43
|
-
export function useRqJobsRegistriesFailedList(params?: { queue?: string }, client?: API): ReturnType<typeof useSWR<
|
|
44
|
-
return useSWR<
|
|
45
|
+
export function useRqJobsRegistriesFailedList(params?: { page?: number; page_size?: number; queue?: string }, client?: API): ReturnType<typeof useSWR<PaginatedJobListList>> {
|
|
46
|
+
return useSWR<PaginatedJobListList>(
|
|
45
47
|
params ? ['cfg-rq-jobs-registries-failed', params] : 'cfg-rq-jobs-registries-failed',
|
|
46
48
|
() => Fetchers.getRqJobsRegistriesFailedList(params, client)
|
|
47
49
|
)
|
|
@@ -57,8 +59,8 @@ export function useRqJobsRegistriesFailedList(params?: { queue?: string }, clien
|
|
|
57
59
|
export function useCreateRqJobsRegistriesFailedClearCreate() {
|
|
58
60
|
const { mutate } = useSWRConfig()
|
|
59
61
|
|
|
60
|
-
return async (params: { queue: string }, client?: API): Promise<JobActionResponse> => {
|
|
61
|
-
const result = await Fetchers.createRqJobsRegistriesFailedClearCreate(params, client)
|
|
62
|
+
return async (data: JobListRequest, params: { queue: string }, client?: API): Promise<JobActionResponse> => {
|
|
63
|
+
const result = await Fetchers.createRqJobsRegistriesFailedClearCreate(data, params, client)
|
|
62
64
|
// Revalidate related queries
|
|
63
65
|
mutate('cfg-rq-jobs-registries-failed-clear')
|
|
64
66
|
return result
|
|
@@ -75,8 +77,8 @@ export function useCreateRqJobsRegistriesFailedClearCreate() {
|
|
|
75
77
|
export function useCreateRqJobsRegistriesFailedRequeueAllCreate() {
|
|
76
78
|
const { mutate } = useSWRConfig()
|
|
77
79
|
|
|
78
|
-
return async (params: { queue: string }, client?: API): Promise<JobActionResponse> => {
|
|
79
|
-
const result = await Fetchers.createRqJobsRegistriesFailedRequeueAllCreate(params, client)
|
|
80
|
+
return async (data: JobListRequest, params: { queue: string }, client?: API): Promise<JobActionResponse> => {
|
|
81
|
+
const result = await Fetchers.createRqJobsRegistriesFailedRequeueAllCreate(data, params, client)
|
|
80
82
|
// Revalidate related queries
|
|
81
83
|
mutate('cfg-rq-jobs-registries-failed-requeue-all')
|
|
82
84
|
return result
|
|
@@ -90,8 +92,8 @@ export function useCreateRqJobsRegistriesFailedRequeueAllCreate() {
|
|
|
90
92
|
* @method GET
|
|
91
93
|
* @path /cfg/rq/jobs/registries/finished/
|
|
92
94
|
*/
|
|
93
|
-
export function useRqJobsRegistriesFinishedList(params?: { queue?: string }, client?: API): ReturnType<typeof useSWR<
|
|
94
|
-
return useSWR<
|
|
95
|
+
export function useRqJobsRegistriesFinishedList(params?: { page?: number; page_size?: number; queue?: string }, client?: API): ReturnType<typeof useSWR<PaginatedJobListList>> {
|
|
96
|
+
return useSWR<PaginatedJobListList>(
|
|
95
97
|
params ? ['cfg-rq-jobs-registries-finished', params] : 'cfg-rq-jobs-registries-finished',
|
|
96
98
|
() => Fetchers.getRqJobsRegistriesFinishedList(params, client)
|
|
97
99
|
)
|
|
@@ -107,8 +109,8 @@ export function useRqJobsRegistriesFinishedList(params?: { queue?: string }, cli
|
|
|
107
109
|
export function useCreateRqJobsRegistriesFinishedClearCreate() {
|
|
108
110
|
const { mutate } = useSWRConfig()
|
|
109
111
|
|
|
110
|
-
return async (params: { queue: string }, client?: API): Promise<JobActionResponse> => {
|
|
111
|
-
const result = await Fetchers.createRqJobsRegistriesFinishedClearCreate(params, client)
|
|
112
|
+
return async (data: JobListRequest, params: { queue: string }, client?: API): Promise<JobActionResponse> => {
|
|
113
|
+
const result = await Fetchers.createRqJobsRegistriesFinishedClearCreate(data, params, client)
|
|
112
114
|
// Revalidate related queries
|
|
113
115
|
mutate('cfg-rq-jobs-registries-finished-clear')
|
|
114
116
|
return result
|
|
@@ -122,8 +124,8 @@ export function useCreateRqJobsRegistriesFinishedClearCreate() {
|
|
|
122
124
|
* @method GET
|
|
123
125
|
* @path /cfg/rq/jobs/registries/started/
|
|
124
126
|
*/
|
|
125
|
-
export function useRqJobsRegistriesStartedList(params?: { queue?: string }, client?: API): ReturnType<typeof useSWR<
|
|
126
|
-
return useSWR<
|
|
127
|
+
export function useRqJobsRegistriesStartedList(params?: { page?: number; page_size?: number; queue?: string }, client?: API): ReturnType<typeof useSWR<PaginatedJobListList>> {
|
|
128
|
+
return useSWR<PaginatedJobListList>(
|
|
127
129
|
params ? ['cfg-rq-jobs-registries-started', params] : 'cfg-rq-jobs-registries-started',
|
|
128
130
|
() => Fetchers.getRqJobsRegistriesStartedList(params, client)
|
|
129
131
|
)
|
|
@@ -18,6 +18,7 @@ import useSWR from 'swr'
|
|
|
18
18
|
import { useSWRConfig } from 'swr'
|
|
19
19
|
import * as Fetchers from '../fetchers/cfg__rq__rq_schedules'
|
|
20
20
|
import type { API } from '../../index'
|
|
21
|
+
import type { PaginatedScheduledJobList } from '../schemas/PaginatedScheduledJobList.schema'
|
|
21
22
|
import type { ScheduleActionResponse } from '../schemas/ScheduleActionResponse.schema'
|
|
22
23
|
import type { ScheduleCreateRequest } from '../schemas/ScheduleCreateRequest.schema'
|
|
23
24
|
import type { ScheduledJob } from '../schemas/ScheduledJob.schema'
|
|
@@ -28,8 +29,8 @@ import type { ScheduledJob } from '../schemas/ScheduledJob.schema'
|
|
|
28
29
|
* @method GET
|
|
29
30
|
* @path /cfg/rq/schedules/
|
|
30
31
|
*/
|
|
31
|
-
export function useRqSchedulesList(params?: { queue?: string }, client?: API): ReturnType<typeof useSWR<
|
|
32
|
-
return useSWR<
|
|
32
|
+
export function useRqSchedulesList(params?: { page?: number; page_size?: number; queue?: string }, client?: API): ReturnType<typeof useSWR<PaginatedScheduledJobList>> {
|
|
33
|
+
return useSWR<PaginatedScheduledJobList>(
|
|
33
34
|
params ? ['cfg-rq-schedules', params] : 'cfg-rq-schedules',
|
|
34
35
|
() => Fetchers.getRqSchedulesList(params, client)
|
|
35
36
|
)
|
|
@@ -53,8 +53,11 @@ export * from './cfg__accounts__user_profile'
|
|
|
53
53
|
export * from './cfg__accounts'
|
|
54
54
|
export * from './cfg__centrifugo'
|
|
55
55
|
export * from './cfg__endpoints'
|
|
56
|
+
export * from './cfg__grpc__grpc_api_keys'
|
|
57
|
+
export * from './cfg__grpc__grpc_charts'
|
|
56
58
|
export * from './cfg__grpc__grpc_configuration'
|
|
57
59
|
export * from './cfg__grpc__grpc_monitoring'
|
|
60
|
+
export * from './cfg__grpc__grpc_proto_files'
|
|
58
61
|
export * from './cfg__grpc__grpc_services'
|
|
59
62
|
export * from './cfg__grpc__grpc_testing'
|
|
60
63
|
export * from './cfg__health'
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ApiKey
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * API Key information (read-only).
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* API Key information (read-only).
|
|
11
|
+
*/
|
|
12
|
+
export const ApiKeySchema = z.object({
|
|
13
|
+
id: z.int(),
|
|
14
|
+
name: z.string(),
|
|
15
|
+
key_type: z.string(),
|
|
16
|
+
masked_key: z.string(),
|
|
17
|
+
is_active: z.boolean(),
|
|
18
|
+
is_valid: z.boolean(),
|
|
19
|
+
user_id: z.int(),
|
|
20
|
+
username: z.string(),
|
|
21
|
+
user_email: z.string(),
|
|
22
|
+
request_count: z.int(),
|
|
23
|
+
last_used_at: z.iso.datetime().nullable(),
|
|
24
|
+
expires_at: z.iso.datetime().nullable(),
|
|
25
|
+
created_at: z.iso.datetime(),
|
|
26
|
+
created_by: z.string().nullable(),
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Infer TypeScript type from Zod schema
|
|
31
|
+
*/
|
|
32
|
+
export type ApiKey = z.infer<typeof ApiKeySchema>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ApiKeyStats
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * API Key usage statistics.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* API Key usage statistics.
|
|
11
|
+
*/
|
|
12
|
+
export const ApiKeyStatsSchema = z.object({
|
|
13
|
+
total_keys: z.int(),
|
|
14
|
+
active_keys: z.int(),
|
|
15
|
+
expired_keys: z.int(),
|
|
16
|
+
total_requests: z.int(),
|
|
17
|
+
keys_by_type: z.record(z.string(), z.any()),
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Infer TypeScript type from Zod schema
|
|
22
|
+
*/
|
|
23
|
+
export type ApiKeyStats = z.infer<typeof ApiKeyStatsSchema>
|
|
@@ -12,8 +12,8 @@ import { z } from 'zod'
|
|
|
12
12
|
export const CentrifugoClientInfoSchema = z.object({
|
|
13
13
|
user: z.string(),
|
|
14
14
|
client: z.string(),
|
|
15
|
-
conn_info: z.string().nullable().optional(),
|
|
16
|
-
chan_info: z.string().nullable().optional(),
|
|
15
|
+
conn_info: z.record(z.string(), z.any()).nullable().optional(),
|
|
16
|
+
chan_info: z.record(z.string(), z.any()).nullable().optional(),
|
|
17
17
|
})
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -12,9 +12,9 @@ import { CentrifugoStreamPositionSchema } from './CentrifugoStreamPosition.schem
|
|
|
12
12
|
*/
|
|
13
13
|
export const CentrifugoHistoryRequestRequestSchema = z.object({
|
|
14
14
|
channel: z.string(),
|
|
15
|
-
limit: z.
|
|
15
|
+
limit: z.int().nullable().optional(),
|
|
16
16
|
since: CentrifugoStreamPositionSchema.optional(),
|
|
17
|
-
reverse: z.
|
|
17
|
+
reverse: z.boolean().nullable().optional(),
|
|
18
18
|
})
|
|
19
19
|
|
|
20
20
|
/**
|