@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/api",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.24",
|
|
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.24",
|
|
72
72
|
"react": "^19.1.0",
|
|
73
73
|
"react-dom": "^19.1.0",
|
|
74
74
|
"tsup": "^8.5.0",
|
|
@@ -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
|
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
* const users = await getUsers({ page: 1 }, api)
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
+
import { CentrifugoOverviewStatsSchema, type CentrifugoOverviewStats } from '../schemas/CentrifugoOverviewStats.schema'
|
|
32
33
|
import { ChannelListSchema, type ChannelList } from '../schemas/ChannelList.schema'
|
|
33
34
|
import { HealthCheckSchema, type HealthCheck } from '../schemas/HealthCheck.schema'
|
|
34
|
-
import {
|
|
35
|
-
import { RecentPublishesSchema, type RecentPublishes } from '../schemas/RecentPublishes.schema'
|
|
35
|
+
import { PaginatedPublishListSchema, type PaginatedPublishList } from '../schemas/PaginatedPublishList.schema'
|
|
36
36
|
import { getAPIInstance } from '../../api-instance'
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -56,10 +56,10 @@ export async function getCentrifugoMonitorHealthRetrieve( client?: any
|
|
|
56
56
|
* @path /cfg/centrifugo/monitor/overview/
|
|
57
57
|
*/
|
|
58
58
|
export async function getCentrifugoMonitorOverviewRetrieve( params?: { hours?: number }, client?: any
|
|
59
|
-
): Promise<
|
|
59
|
+
): Promise<CentrifugoOverviewStats> {
|
|
60
60
|
const api = client || getAPIInstance()
|
|
61
61
|
const response = await api.cfg_centrifugo_monitoring.centrifugoMonitorOverviewRetrieve(params?.hours)
|
|
62
|
-
return
|
|
62
|
+
return CentrifugoOverviewStatsSchema.parse(response)
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
|
|
@@ -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
|
|
|
@@ -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
|
+
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed fetchers for Grpc Charts
|
|
3
|
+
*
|
|
4
|
+
* Universal functions that work in any environment:
|
|
5
|
+
* - Next.js (App Router / Pages Router / Server Components)
|
|
6
|
+
* - React Native
|
|
7
|
+
* - Node.js backend
|
|
8
|
+
*
|
|
9
|
+
* These fetchers use Zod schemas for runtime validation.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* ```typescript
|
|
13
|
+
* // Configure API once (in your app entry point)
|
|
14
|
+
* import { configureAPI } from '../../api-instance'
|
|
15
|
+
* configureAPI({ baseUrl: 'https://api.example.com' })
|
|
16
|
+
*
|
|
17
|
+
* // Then use fetchers anywhere
|
|
18
|
+
* const users = await getUsers({ page: 1 })
|
|
19
|
+
*
|
|
20
|
+
* // With SWR
|
|
21
|
+
* const { data } = useSWR(['users', params], () => getUsers(params))
|
|
22
|
+
*
|
|
23
|
+
* // With React Query
|
|
24
|
+
* const { data } = useQuery(['users', params], () => getUsers(params))
|
|
25
|
+
*
|
|
26
|
+
* // In Server Component or SSR (pass custom client)
|
|
27
|
+
* import { API } from '../../index'
|
|
28
|
+
* const api = new API('https://api.example.com')
|
|
29
|
+
* const users = await getUsers({ page: 1 }, api)
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
import { DashboardChartsSchema, type DashboardCharts } from '../schemas/DashboardCharts.schema'
|
|
33
|
+
import { ErrorDistributionChartSchema, type ErrorDistributionChart } from '../schemas/ErrorDistributionChart.schema'
|
|
34
|
+
import { RequestVolumeChartSchema, type RequestVolumeChart } from '../schemas/RequestVolumeChart.schema'
|
|
35
|
+
import { ResponseTimeChartSchema, type ResponseTimeChart } from '../schemas/ResponseTimeChart.schema'
|
|
36
|
+
import { ServerLifecycleChartSchema, type ServerLifecycleChart } from '../schemas/ServerLifecycleChart.schema'
|
|
37
|
+
import { ServerUptimeChartSchema, type ServerUptimeChart } from '../schemas/ServerUptimeChart.schema'
|
|
38
|
+
import { ServiceActivityChartSchema, type ServiceActivityChart } from '../schemas/ServiceActivityChart.schema'
|
|
39
|
+
import { getAPIInstance } from '../../api-instance'
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Get all dashboard charts data
|
|
43
|
+
*
|
|
44
|
+
* @method GET
|
|
45
|
+
* @path /cfg/grpc/charts/dashboard/
|
|
46
|
+
*/
|
|
47
|
+
export async function getGrpcChartsDashboardRetrieve( params?: { hours?: number }, client?: any
|
|
48
|
+
): Promise<DashboardCharts> {
|
|
49
|
+
const api = client || getAPIInstance()
|
|
50
|
+
const response = await api.cfg_grpc_charts.dashboardRetrieve(params?.hours)
|
|
51
|
+
return DashboardChartsSchema.parse(response)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Get error distribution chart data
|
|
57
|
+
*
|
|
58
|
+
* @method GET
|
|
59
|
+
* @path /cfg/grpc/charts/error-distribution/
|
|
60
|
+
*/
|
|
61
|
+
export async function getGrpcChartsErrorDistributionRetrieve( params?: { hours?: number }, client?: any
|
|
62
|
+
): Promise<ErrorDistributionChart> {
|
|
63
|
+
const api = client || getAPIInstance()
|
|
64
|
+
const response = await api.cfg_grpc_charts.errorDistributionRetrieve(params?.hours)
|
|
65
|
+
return ErrorDistributionChartSchema.parse(response)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Get request volume chart data
|
|
71
|
+
*
|
|
72
|
+
* @method GET
|
|
73
|
+
* @path /cfg/grpc/charts/request-volume/
|
|
74
|
+
*/
|
|
75
|
+
export async function getGrpcChartsRequestVolumeRetrieve( params?: { hours?: number }, client?: any
|
|
76
|
+
): Promise<RequestVolumeChart> {
|
|
77
|
+
const api = client || getAPIInstance()
|
|
78
|
+
const response = await api.cfg_grpc_charts.requestVolumeRetrieve(params?.hours)
|
|
79
|
+
return RequestVolumeChartSchema.parse(response)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Get response time chart data
|
|
85
|
+
*
|
|
86
|
+
* @method GET
|
|
87
|
+
* @path /cfg/grpc/charts/response-time/
|
|
88
|
+
*/
|
|
89
|
+
export async function getGrpcChartsResponseTimeRetrieve( params?: { hours?: number }, client?: any
|
|
90
|
+
): Promise<ResponseTimeChart> {
|
|
91
|
+
const api = client || getAPIInstance()
|
|
92
|
+
const response = await api.cfg_grpc_charts.responseTimeRetrieve(params?.hours)
|
|
93
|
+
return ResponseTimeChartSchema.parse(response)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Get server lifecycle events
|
|
99
|
+
*
|
|
100
|
+
* @method GET
|
|
101
|
+
* @path /cfg/grpc/charts/server-lifecycle/
|
|
102
|
+
*/
|
|
103
|
+
export async function getGrpcChartsServerLifecycleRetrieve( params?: { hours?: number }, client?: any
|
|
104
|
+
): Promise<ServerLifecycleChart> {
|
|
105
|
+
const api = client || getAPIInstance()
|
|
106
|
+
const response = await api.cfg_grpc_charts.serverLifecycleRetrieve(params?.hours)
|
|
107
|
+
return ServerLifecycleChartSchema.parse(response)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Get server uptime chart data
|
|
113
|
+
*
|
|
114
|
+
* @method GET
|
|
115
|
+
* @path /cfg/grpc/charts/server-uptime/
|
|
116
|
+
*/
|
|
117
|
+
export async function getGrpcChartsServerUptimeRetrieve( params?: { hours?: number }, client?: any
|
|
118
|
+
): Promise<ServerUptimeChart> {
|
|
119
|
+
const api = client || getAPIInstance()
|
|
120
|
+
const response = await api.cfg_grpc_charts.serverUptimeRetrieve(params?.hours)
|
|
121
|
+
return ServerUptimeChartSchema.parse(response)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Get service activity chart data
|
|
127
|
+
*
|
|
128
|
+
* @method GET
|
|
129
|
+
* @path /cfg/grpc/charts/service-activity/
|
|
130
|
+
*/
|
|
131
|
+
export async function getGrpcChartsServiceActivityRetrieve( params?: { hours?: number }, client?: any
|
|
132
|
+
): Promise<ServiceActivityChart> {
|
|
133
|
+
const api = client || getAPIInstance()
|
|
134
|
+
const response = await api.cfg_grpc_charts.serviceActivityRetrieve(params?.hours)
|
|
135
|
+
return ServiceActivityChartSchema.parse(response)
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
* const users = await getUsers({ page: 1 }, api)
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
import {
|
|
32
|
+
import { GRPCHealthCheckSchema, type GRPCHealthCheck } from '../schemas/GRPCHealthCheck.schema'
|
|
33
|
+
import { GRPCOverviewStatsSchema, type GRPCOverviewStats } from '../schemas/GRPCOverviewStats.schema'
|
|
33
34
|
import { MethodListSchema, type MethodList } from '../schemas/MethodList.schema'
|
|
34
|
-
import {
|
|
35
|
-
import { RecentRequestsSchema, type RecentRequests } from '../schemas/RecentRequests.schema'
|
|
35
|
+
import { RecentRequestSchema, type RecentRequest } from '../schemas/RecentRequest.schema'
|
|
36
36
|
import { ServiceListSchema, type ServiceList } from '../schemas/ServiceList.schema'
|
|
37
37
|
import { getAPIInstance } from '../../api-instance'
|
|
38
38
|
|
|
@@ -43,10 +43,10 @@ import { getAPIInstance } from '../../api-instance'
|
|
|
43
43
|
* @path /cfg/grpc/monitor/health/
|
|
44
44
|
*/
|
|
45
45
|
export async function getGrpcMonitorHealthRetrieve( client?: any
|
|
46
|
-
): Promise<
|
|
46
|
+
): Promise<GRPCHealthCheck> {
|
|
47
47
|
const api = client || getAPIInstance()
|
|
48
48
|
const response = await api.cfg_grpc_monitoring.grpcMonitorHealthRetrieve()
|
|
49
|
-
return
|
|
49
|
+
return GRPCHealthCheckSchema.parse(response)
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
|
|
@@ -71,10 +71,10 @@ export async function getGrpcMonitorMethodsRetrieve( params?: { hours?: number;
|
|
|
71
71
|
* @path /cfg/grpc/monitor/overview/
|
|
72
72
|
*/
|
|
73
73
|
export async function getGrpcMonitorOverviewRetrieve( params?: { hours?: number }, client?: any
|
|
74
|
-
): Promise<
|
|
74
|
+
): Promise<GRPCOverviewStats> {
|
|
75
75
|
const api = client || getAPIInstance()
|
|
76
76
|
const response = await api.cfg_grpc_monitoring.grpcMonitorOverviewRetrieve(params?.hours)
|
|
77
|
-
return
|
|
77
|
+
return GRPCOverviewStatsSchema.parse(response)
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
|
|
@@ -84,11 +84,11 @@ export async function getGrpcMonitorOverviewRetrieve( params?: { hours?: number
|
|
|
84
84
|
* @method GET
|
|
85
85
|
* @path /cfg/grpc/monitor/requests/
|
|
86
86
|
*/
|
|
87
|
-
export async function getGrpcMonitorRequestsRetrieve( params?: {
|
|
88
|
-
): Promise<
|
|
87
|
+
export async function getGrpcMonitorRequestsRetrieve( params?: { method?: string; service?: string; status?: string }, client?: any
|
|
88
|
+
): Promise<RecentRequest> {
|
|
89
89
|
const api = client || getAPIInstance()
|
|
90
|
-
const response = await api.cfg_grpc_monitoring.grpcMonitorRequestsRetrieve(params?.
|
|
91
|
-
return
|
|
90
|
+
const response = await api.cfg_grpc_monitoring.grpcMonitorRequestsRetrieve(params?.method, params?.service, params?.status)
|
|
91
|
+
return RecentRequestSchema.parse(response)
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
|
|
@@ -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
|
+
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
import { GRPCCallRequestRequestSchema, type GRPCCallRequestRequest } from '../schemas/GRPCCallRequestRequest.schema'
|
|
33
33
|
import { GRPCCallResponseSchema, type GRPCCallResponse } from '../schemas/GRPCCallResponse.schema'
|
|
34
34
|
import { GRPCExamplesListSchema, type GRPCExamplesList } from '../schemas/GRPCExamplesList.schema'
|
|
35
|
-
import {
|
|
35
|
+
import { GRPCTestLogSchema, type GRPCTestLog } from '../schemas/GRPCTestLog.schema'
|
|
36
36
|
import { getAPIInstance } from '../../api-instance'
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* Call gRPC method
|
|
39
|
+
* Call gRPC method
|
|
40
40
|
*
|
|
41
41
|
* @method POST
|
|
42
42
|
* @path /cfg/grpc/test/call/
|
|
@@ -69,11 +69,11 @@ export async function getGrpcTestExamplesRetrieve( params?: { method?: string;
|
|
|
69
69
|
* @method GET
|
|
70
70
|
* @path /cfg/grpc/test/logs/
|
|
71
71
|
*/
|
|
72
|
-
export async function getGrpcTestLogsRetrieve( params?: {
|
|
73
|
-
): Promise<
|
|
72
|
+
export async function getGrpcTestLogsRetrieve( params?: { method?: string; service?: string; status?: string }, client?: any
|
|
73
|
+
): Promise<GRPCTestLog> {
|
|
74
74
|
const api = client || getAPIInstance()
|
|
75
|
-
const response = await api.cfg_grpc_testing.grpcTestLogsRetrieve(params?.
|
|
76
|
-
return
|
|
75
|
+
const response = await api.cfg_grpc_testing.grpcTestLogsRetrieve(params?.method, params?.service, params?.status)
|
|
76
|
+
return GRPCTestLogSchema.parse(response)
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
|
|
@@ -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
|
|