@djangocfg/api 1.2.6 → 1.2.8
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 +3023 -1755
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2542 -908
- package/dist/index.d.ts +2542 -908
- package/dist/index.mjs +2959 -1707
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/generated/_utils/fetchers/cfg__accounts.ts +2 -3
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__auth.ts +1 -2
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__user_profile.ts +6 -7
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo.ts +2 -3
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_admin_api.ts +12 -13
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +8 -9
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +8 -9
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_activity.ts +61 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_api_zones.ts +62 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_charts.ts +90 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_commands.ts +92 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_overview.ts +48 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_statistics.ts +76 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_system.ts +63 -0
- package/src/cfg/generated/_utils/fetchers/cfg__endpoints.ts +3 -4
- package/src/cfg/generated/_utils/fetchers/cfg__health.ts +2 -3
- package/src/cfg/generated/_utils/fetchers/cfg__knowbase.ts +57 -58
- package/src/cfg/generated/_utils/fetchers/cfg__leads.ts +6 -7
- package/src/cfg/generated/_utils/fetchers/cfg__leads__lead_submission.ts +1 -2
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter.ts +3 -4
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__bulk_email.ts +1 -2
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__campaigns.ts +6 -7
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__logs.ts +1 -2
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__newsletters.ts +2 -3
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__subscriptions.ts +3 -4
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__testing.ts +1 -2
- package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +8 -9
- package/src/cfg/generated/_utils/fetchers/cfg__support.ts +12 -13
- package/src/cfg/generated/_utils/fetchers/cfg__tasks.ts +10 -11
- package/src/cfg/generated/_utils/fetchers/index.ts +7 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_activity.ts +49 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_api_zones.ts +50 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_charts.ts +78 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_commands.ts +84 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_overview.ts +36 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_statistics.ts +64 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_system.ts +51 -0
- package/src/cfg/generated/_utils/hooks/index.ts +7 -1
- package/src/cfg/generated/_utils/schemas/APIZone.schema.ts +27 -0
- package/src/cfg/generated/_utils/schemas/APIZonesSummary.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/ActivityTrackerDay.schema.ts +23 -0
- package/src/cfg/generated/_utils/schemas/ChartData.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/ChartDataset.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/Command.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/CommandExecuteRequestRequest.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/CommandHelpResponse.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/CommandsSummary.schema.ts +25 -0
- package/src/cfg/generated/_utils/schemas/RecentUser.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/index.ts +10 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_activity/client.ts +45 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_activity/models.ts +0 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/client.ts +34 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/models.ts +27 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_charts/client.ts +98 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_charts/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_charts/models.ts +24 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_commands/client.ts +55 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_commands/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_commands/models.ts +58 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_overview/client.ts +25 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_overview/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_overview/models.ts +23 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_statistics/client.ts +44 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_statistics/index.ts +2 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_statistics/models.ts +16 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_system/client.ts +34 -0
- package/src/cfg/generated/cfg__dashboard__dashboard_system/index.ts +2 -0
- package/src/cfg/generated/{cfg__dashboard → cfg__dashboard__dashboard_system}/models.ts +0 -39
- package/src/cfg/generated/client.ts +32 -12
- package/src/cfg/generated/http.ts +8 -3
- package/src/cfg/generated/index.ts +35 -5
- package/src/cfg/generated/schema.ts +776 -22
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard.ts +0 -150
- package/src/cfg/generated/_utils/hooks/cfg__dashboard.ts +0 -137
- package/src/cfg/generated/cfg__dashboard/client.ts +0 -106
- /package/src/cfg/generated/{cfg__dashboard → cfg__dashboard__dashboard_activity}/index.ts +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SWR Hooks for Dashboard - Commands
|
|
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__dashboard__dashboard_commands'
|
|
20
|
+
import type { API } from '../../index'
|
|
21
|
+
import type { CommandExecuteRequestRequest } from '../schemas/CommandExecuteRequestRequest.schema'
|
|
22
|
+
import type { CommandHelpResponse } from '../schemas/CommandHelpResponse.schema'
|
|
23
|
+
import type { CommandsSummary } from '../schemas/CommandsSummary.schema'
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Get all commands
|
|
27
|
+
*
|
|
28
|
+
* @method GET
|
|
29
|
+
* @path /cfg/dashboard/api/commands/
|
|
30
|
+
*/
|
|
31
|
+
export function useDashboardApiCommandsList(client?: API): ReturnType<typeof useSWR<any>> {
|
|
32
|
+
return useSWR<any>(
|
|
33
|
+
'cfg-dashboard-api-commands',
|
|
34
|
+
() => Fetchers.getDashboardApiCommandsList(client)
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Get command help
|
|
41
|
+
*
|
|
42
|
+
* @method GET
|
|
43
|
+
* @path /cfg/dashboard/api/commands/{id}/help/
|
|
44
|
+
*/
|
|
45
|
+
export function useDashboardApiCommandsHelpRetrieve(id: string, client?: API): ReturnType<typeof useSWR<CommandHelpResponse>> {
|
|
46
|
+
return useSWR<CommandHelpResponse>(
|
|
47
|
+
['cfg-dashboard-api-commands-help', id],
|
|
48
|
+
() => Fetchers.getDashboardApiCommandsHelpRetrieve(id, client)
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Execute command
|
|
55
|
+
*
|
|
56
|
+
* @method POST
|
|
57
|
+
* @path /cfg/dashboard/api/commands/execute/
|
|
58
|
+
*/
|
|
59
|
+
export function useCreateDashboardApiCommandsExecuteCreate() {
|
|
60
|
+
const { mutate } = useSWRConfig()
|
|
61
|
+
|
|
62
|
+
return async (data: CommandExecuteRequestRequest, client?: API): Promise<any> => {
|
|
63
|
+
const result = await Fetchers.createDashboardApiCommandsExecuteCreate(data, client)
|
|
64
|
+
// Revalidate related queries
|
|
65
|
+
mutate('cfg-dashboard-api-commands-execute')
|
|
66
|
+
return result
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Get commands summary
|
|
73
|
+
*
|
|
74
|
+
* @method GET
|
|
75
|
+
* @path /cfg/dashboard/api/commands/summary/
|
|
76
|
+
*/
|
|
77
|
+
export function useDashboardApiCommandsSummaryRetrieve(client?: API): ReturnType<typeof useSWR<CommandsSummary>> {
|
|
78
|
+
return useSWR<CommandsSummary>(
|
|
79
|
+
'cfg-dashboard-api-commands-summary',
|
|
80
|
+
() => Fetchers.getDashboardApiCommandsSummaryRetrieve(client)
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SWR Hooks for Dashboard - Overview
|
|
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__dashboard__dashboard_overview'
|
|
20
|
+
import type { API } from '../../index'
|
|
21
|
+
import type { DashboardOverview } from '../schemas/DashboardOverview.schema'
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Get dashboard overview
|
|
25
|
+
*
|
|
26
|
+
* @method GET
|
|
27
|
+
* @path /cfg/dashboard/api/overview/overview/
|
|
28
|
+
*/
|
|
29
|
+
export function useDashboardApiOverviewOverviewRetrieve(client?: API): ReturnType<typeof useSWR<DashboardOverview>> {
|
|
30
|
+
return useSWR<DashboardOverview>(
|
|
31
|
+
'cfg-dashboard-api-overview-overview',
|
|
32
|
+
() => Fetchers.getDashboardApiOverviewOverviewRetrieve(client)
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SWR Hooks for Dashboard - Statistics
|
|
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__dashboard__dashboard_statistics'
|
|
20
|
+
import type { API } from '../../index'
|
|
21
|
+
import type { UserStatistics } from '../schemas/UserStatistics.schema'
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Get application statistics
|
|
25
|
+
*
|
|
26
|
+
* @method GET
|
|
27
|
+
* @path /cfg/dashboard/api/statistics/apps/
|
|
28
|
+
*/
|
|
29
|
+
export function useDashboardApiStatisticsAppsList(client?: API): ReturnType<typeof useSWR<any>> {
|
|
30
|
+
return useSWR<any>(
|
|
31
|
+
'cfg-dashboard-api-statistics-apps',
|
|
32
|
+
() => Fetchers.getDashboardApiStatisticsAppsList(client)
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Get statistics cards
|
|
39
|
+
*
|
|
40
|
+
* @method GET
|
|
41
|
+
* @path /cfg/dashboard/api/statistics/cards/
|
|
42
|
+
*/
|
|
43
|
+
export function useDashboardApiStatisticsCardsList(client?: API): ReturnType<typeof useSWR<any>> {
|
|
44
|
+
return useSWR<any>(
|
|
45
|
+
'cfg-dashboard-api-statistics-cards',
|
|
46
|
+
() => Fetchers.getDashboardApiStatisticsCardsList(client)
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Get user statistics
|
|
53
|
+
*
|
|
54
|
+
* @method GET
|
|
55
|
+
* @path /cfg/dashboard/api/statistics/users/
|
|
56
|
+
*/
|
|
57
|
+
export function useDashboardApiStatisticsUsersRetrieve(client?: API): ReturnType<typeof useSWR<UserStatistics>> {
|
|
58
|
+
return useSWR<UserStatistics>(
|
|
59
|
+
'cfg-dashboard-api-statistics-user',
|
|
60
|
+
() => Fetchers.getDashboardApiStatisticsUsersRetrieve(client)
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SWR Hooks for Dashboard - System
|
|
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__dashboard__dashboard_system'
|
|
20
|
+
import type { API } from '../../index'
|
|
21
|
+
import type { SystemHealth } from '../schemas/SystemHealth.schema'
|
|
22
|
+
import type { SystemMetrics } from '../schemas/SystemMetrics.schema'
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Get system health status
|
|
26
|
+
*
|
|
27
|
+
* @method GET
|
|
28
|
+
* @path /cfg/dashboard/api/system/health/
|
|
29
|
+
*/
|
|
30
|
+
export function useDashboardApiSystemHealthRetrieve(client?: API): ReturnType<typeof useSWR<SystemHealth>> {
|
|
31
|
+
return useSWR<SystemHealth>(
|
|
32
|
+
'cfg-dashboard-api-system-health',
|
|
33
|
+
() => Fetchers.getDashboardApiSystemHealthRetrieve(client)
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Get system metrics
|
|
40
|
+
*
|
|
41
|
+
* @method GET
|
|
42
|
+
* @path /cfg/dashboard/api/system/metrics/
|
|
43
|
+
*/
|
|
44
|
+
export function useDashboardApiSystemMetricsRetrieve(client?: API): ReturnType<typeof useSWR<SystemMetrics>> {
|
|
45
|
+
return useSWR<SystemMetrics>(
|
|
46
|
+
'cfg-dashboard-api-system-metric',
|
|
47
|
+
() => Fetchers.getDashboardApiSystemMetricsRetrieve(client)
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
@@ -29,6 +29,13 @@ export * from './cfg__newsletter__campaigns'
|
|
|
29
29
|
export * from './cfg__centrifugo__centrifugo_admin_api'
|
|
30
30
|
export * from './cfg__centrifugo__centrifugo_monitoring'
|
|
31
31
|
export * from './cfg__centrifugo__centrifugo_testing'
|
|
32
|
+
export * from './cfg__dashboard__dashboard_api_zones'
|
|
33
|
+
export * from './cfg__dashboard__dashboard_activity'
|
|
34
|
+
export * from './cfg__dashboard__dashboard_charts'
|
|
35
|
+
export * from './cfg__dashboard__dashboard_commands'
|
|
36
|
+
export * from './cfg__dashboard__dashboard_overview'
|
|
37
|
+
export * from './cfg__dashboard__dashboard_statistics'
|
|
38
|
+
export * from './cfg__dashboard__dashboard_system'
|
|
32
39
|
export * from './cfg__leads__lead_submission'
|
|
33
40
|
export * from './cfg__newsletter__logs'
|
|
34
41
|
export * from './cfg__newsletter__newsletters'
|
|
@@ -37,7 +44,6 @@ export * from './cfg__newsletter__testing'
|
|
|
37
44
|
export * from './cfg__accounts__user_profile'
|
|
38
45
|
export * from './cfg__accounts'
|
|
39
46
|
export * from './cfg__centrifugo'
|
|
40
|
-
export * from './cfg__dashboard'
|
|
41
47
|
export * from './cfg__endpoints'
|
|
42
48
|
export * from './cfg__health'
|
|
43
49
|
export * from './cfg__knowbase'
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for APIZone
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * OpenAPI zone/group serializer.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* OpenAPI zone/group serializer.
|
|
11
|
+
*/
|
|
12
|
+
export const APIZoneSchema = z.object({
|
|
13
|
+
name: z.string(),
|
|
14
|
+
title: z.string(),
|
|
15
|
+
description: z.string(),
|
|
16
|
+
app_count: z.int(),
|
|
17
|
+
endpoint_count: z.int(),
|
|
18
|
+
status: z.string(),
|
|
19
|
+
schema_url: z.string(),
|
|
20
|
+
api_url: z.string(),
|
|
21
|
+
apps: z.array(z.string()),
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Infer TypeScript type from Zod schema
|
|
26
|
+
*/
|
|
27
|
+
export type APIZone = z.infer<typeof APIZoneSchema>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for APIZonesSummary
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * API zones summary serializer.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { APIZoneSchema } from './APIZone.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* API zones summary serializer.
|
|
12
|
+
*/
|
|
13
|
+
export const APIZonesSummarySchema = z.object({
|
|
14
|
+
zones: z.array(APIZoneSchema),
|
|
15
|
+
summary: z.record(z.string(), z.any()),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Infer TypeScript type from Zod schema
|
|
20
|
+
*/
|
|
21
|
+
export type APIZonesSummary = z.infer<typeof APIZonesSummarySchema>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ActivityTrackerDay
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Activity tracker single day serializer.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Activity tracker single day serializer.
|
|
11
|
+
*/
|
|
12
|
+
export const ActivityTrackerDaySchema = z.object({
|
|
13
|
+
date: z.iso.date(),
|
|
14
|
+
count: z.int(),
|
|
15
|
+
level: z.int(),
|
|
16
|
+
color: z.string(),
|
|
17
|
+
tooltip: z.string(),
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Infer TypeScript type from Zod schema
|
|
22
|
+
*/
|
|
23
|
+
export type ActivityTrackerDay = z.infer<typeof ActivityTrackerDaySchema>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ChartData
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Chart.js data structure serializer.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { ChartDatasetSchema } from './ChartDataset.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Chart.js data structure serializer.
|
|
12
|
+
*/
|
|
13
|
+
export const ChartDataSchema = z.object({
|
|
14
|
+
labels: z.array(z.string()),
|
|
15
|
+
datasets: z.array(ChartDatasetSchema),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Infer TypeScript type from Zod schema
|
|
20
|
+
*/
|
|
21
|
+
export type ChartData = z.infer<typeof ChartDataSchema>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ChartDataset
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Chart.js dataset serializer.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Chart.js dataset serializer.
|
|
11
|
+
*/
|
|
12
|
+
export const ChartDatasetSchema = z.object({
|
|
13
|
+
label: z.string(),
|
|
14
|
+
data: z.array(z.int()),
|
|
15
|
+
backgroundColor: z.string(),
|
|
16
|
+
borderColor: z.string(),
|
|
17
|
+
tension: z.number(),
|
|
18
|
+
fill: z.boolean().optional(),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Infer TypeScript type from Zod schema
|
|
23
|
+
*/
|
|
24
|
+
export type ChartDataset = z.infer<typeof ChartDatasetSchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for Command
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Django management command serializer.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Django management command serializer.
|
|
11
|
+
*/
|
|
12
|
+
export const CommandSchema = z.object({
|
|
13
|
+
name: z.string(),
|
|
14
|
+
app: z.string(),
|
|
15
|
+
help: z.string(),
|
|
16
|
+
is_core: z.boolean(),
|
|
17
|
+
is_custom: z.boolean(),
|
|
18
|
+
is_allowed: z.boolean().optional(),
|
|
19
|
+
risk_level: z.string().optional(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type Command = z.infer<typeof CommandSchema>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for CommandExecuteRequestRequest
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Request serializer for command execution.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Request serializer for command execution.
|
|
11
|
+
*/
|
|
12
|
+
export const CommandExecuteRequestRequestSchema = z.object({
|
|
13
|
+
command: z.string().min(1),
|
|
14
|
+
args: z.array(z.string().min(1)).optional(),
|
|
15
|
+
options: z.record(z.string(), z.any()).optional(),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Infer TypeScript type from Zod schema
|
|
20
|
+
*/
|
|
21
|
+
export type CommandExecuteRequestRequest = z.infer<typeof CommandExecuteRequestRequestSchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for CommandHelpResponse
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Response serializer for command help.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Response serializer for command help.
|
|
11
|
+
*/
|
|
12
|
+
export const CommandHelpResponseSchema = z.object({
|
|
13
|
+
status: z.string(),
|
|
14
|
+
command: z.string(),
|
|
15
|
+
app: z.string().optional(),
|
|
16
|
+
help_text: z.string().optional(),
|
|
17
|
+
is_allowed: z.boolean().optional(),
|
|
18
|
+
risk_level: z.string().optional(),
|
|
19
|
+
error: z.string().optional(),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type CommandHelpResponse = z.infer<typeof CommandHelpResponseSchema>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for CommandsSummary
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Commands summary serializer.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import { CommandSchema } from './Command.schema'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Commands summary serializer.
|
|
12
|
+
*/
|
|
13
|
+
export const CommandsSummarySchema = z.object({
|
|
14
|
+
total_commands: z.int(),
|
|
15
|
+
core_commands: z.int(),
|
|
16
|
+
custom_commands: z.int(),
|
|
17
|
+
categories: z.array(z.string()),
|
|
18
|
+
commands: z.array(CommandSchema),
|
|
19
|
+
categorized: z.record(z.string(), z.any()),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Infer TypeScript type from Zod schema
|
|
24
|
+
*/
|
|
25
|
+
export type CommandsSummary = z.infer<typeof CommandsSummarySchema>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for RecentUser
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Recent user serializer.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Recent user serializer.
|
|
11
|
+
*/
|
|
12
|
+
export const RecentUserSchema = z.object({
|
|
13
|
+
id: z.int(),
|
|
14
|
+
username: z.string(),
|
|
15
|
+
email: z.email(),
|
|
16
|
+
date_joined: z.string(),
|
|
17
|
+
is_active: z.boolean(),
|
|
18
|
+
is_staff: z.boolean(),
|
|
19
|
+
is_superuser: z.boolean(),
|
|
20
|
+
last_login: z.string().nullable(),
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Infer TypeScript type from Zod schema
|
|
25
|
+
*/
|
|
26
|
+
export type RecentUser = z.infer<typeof RecentUserSchema>
|
|
@@ -18,7 +18,10 @@
|
|
|
18
18
|
|
|
19
19
|
export * from './APIResponse.schema'
|
|
20
20
|
export * from './APIResponseRequest.schema'
|
|
21
|
+
export * from './APIZone.schema'
|
|
22
|
+
export * from './APIZonesSummary.schema'
|
|
21
23
|
export * from './ActivityEntry.schema'
|
|
24
|
+
export * from './ActivityTrackerDay.schema'
|
|
22
25
|
export * from './AppStatistics.schema'
|
|
23
26
|
export * from './ArchiveItem.schema'
|
|
24
27
|
export * from './ArchiveItemChunk.schema'
|
|
@@ -57,6 +60,8 @@ export * from './CentrifugoPublication.schema'
|
|
|
57
60
|
export * from './CentrifugoStreamPosition.schema'
|
|
58
61
|
export * from './ChannelList.schema'
|
|
59
62
|
export * from './ChannelStatsSerializer.schema'
|
|
63
|
+
export * from './ChartData.schema'
|
|
64
|
+
export * from './ChartDataset.schema'
|
|
60
65
|
export * from './ChatHistory.schema'
|
|
61
66
|
export * from './ChatMessage.schema'
|
|
62
67
|
export * from './ChatQueryRequest.schema'
|
|
@@ -68,6 +73,10 @@ export * from './ChatSessionRequest.schema'
|
|
|
68
73
|
export * from './ChatSource.schema'
|
|
69
74
|
export * from './ChatSourceRequest.schema'
|
|
70
75
|
export * from './ChunkRevectorizationRequestRequest.schema'
|
|
76
|
+
export * from './Command.schema'
|
|
77
|
+
export * from './CommandExecuteRequestRequest.schema'
|
|
78
|
+
export * from './CommandHelpResponse.schema'
|
|
79
|
+
export * from './CommandsSummary.schema'
|
|
71
80
|
export * from './ConnectionTokenRequestRequest.schema'
|
|
72
81
|
export * from './ConnectionTokenResponse.schema'
|
|
73
82
|
export * from './Currency.schema'
|
|
@@ -150,6 +159,7 @@ export * from './QueueStatus.schema'
|
|
|
150
159
|
export * from './QuickAction.schema'
|
|
151
160
|
export * from './QuickHealth.schema'
|
|
152
161
|
export * from './RecentPublishes.schema'
|
|
162
|
+
export * from './RecentUser.schema'
|
|
153
163
|
export * from './SendCampaignRequest.schema'
|
|
154
164
|
export * from './SendCampaignResponse.schema'
|
|
155
165
|
export * from './Sender.schema'
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as Models from "./models";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* API endpoints for Dashboard - Activity.
|
|
6
|
+
*/
|
|
7
|
+
export class CfgDashboardActivity {
|
|
8
|
+
private client: any;
|
|
9
|
+
|
|
10
|
+
constructor(client: any) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get quick actions
|
|
16
|
+
*
|
|
17
|
+
* Retrieve quick action buttons for dashboard
|
|
18
|
+
*/
|
|
19
|
+
async dashboardApiActivityActionsList(): Promise<any> {
|
|
20
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/activity/actions/");
|
|
21
|
+
return response;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async dashboardApiActivityRecentList(limit?: number): Promise<any>;
|
|
25
|
+
async dashboardApiActivityRecentList(params?: { limit?: number }): Promise<any>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Get recent activity
|
|
29
|
+
*
|
|
30
|
+
* Retrieve recent system activity entries
|
|
31
|
+
*/
|
|
32
|
+
async dashboardApiActivityRecentList(...args: any[]): Promise<any> {
|
|
33
|
+
const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
|
|
34
|
+
|
|
35
|
+
let params;
|
|
36
|
+
if (isParamsObject) {
|
|
37
|
+
params = args[0];
|
|
38
|
+
} else {
|
|
39
|
+
params = { limit: args[0] };
|
|
40
|
+
}
|
|
41
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/activity/recent/", { params });
|
|
42
|
+
return response;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as Models from "./models";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* API endpoints for Dashboard - API Zones.
|
|
6
|
+
*/
|
|
7
|
+
export class CfgDashboardApiZones {
|
|
8
|
+
private client: any;
|
|
9
|
+
|
|
10
|
+
constructor(client: any) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get all API zones
|
|
16
|
+
*
|
|
17
|
+
* Retrieve all OpenAPI zones/groups with their configuration
|
|
18
|
+
*/
|
|
19
|
+
async list(): Promise<any> {
|
|
20
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/zones/");
|
|
21
|
+
return response;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Get zones summary
|
|
26
|
+
*
|
|
27
|
+
* Retrieve zones summary with statistics
|
|
28
|
+
*/
|
|
29
|
+
async summaryRetrieve(): Promise<Models.APIZonesSummary> {
|
|
30
|
+
const response = await this.client.request('GET', "/cfg/dashboard/api/zones/summary/");
|
|
31
|
+
return response;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API zones summary serializer.
|
|
3
|
+
*
|
|
4
|
+
* Response model (includes read-only fields).
|
|
5
|
+
*/
|
|
6
|
+
export interface APIZonesSummary {
|
|
7
|
+
zones: Array<APIZone>;
|
|
8
|
+
summary: Record<string, any>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* OpenAPI zone/group serializer.
|
|
13
|
+
*
|
|
14
|
+
* Response model (includes read-only fields).
|
|
15
|
+
*/
|
|
16
|
+
export interface APIZone {
|
|
17
|
+
name: string;
|
|
18
|
+
title: string;
|
|
19
|
+
description: string;
|
|
20
|
+
app_count: number;
|
|
21
|
+
endpoint_count: number;
|
|
22
|
+
status: string;
|
|
23
|
+
schema_url: string;
|
|
24
|
+
api_url: string;
|
|
25
|
+
apps: Array<string>;
|
|
26
|
+
}
|
|
27
|
+
|