@djangocfg/api 1.2.24 → 1.2.26
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 +6859 -24179
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1243 -20744
- package/dist/index.d.ts +1243 -20744
- package/dist/index.mjs +6766 -24089
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/contexts/index.ts +0 -11
- package/src/cfg/generated/_utils/fetchers/cfg__accounts.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__auth.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__user_profile.ts +175 -6
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_admin_api.ts +146 -5
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_auth.ts +77 -0
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +117 -4
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +88 -19
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_activity.ts +1 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_api_zones.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_charts.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_commands.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_config.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_overview.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_statistics.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_system.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__endpoints.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_api_keys.ts +88 -3
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_charts.ts +204 -7
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_configuration.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_monitoring.ts +119 -21
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_proto_files.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_services.ts +92 -6
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_testing.ts +88 -3
- package/src/cfg/generated/_utils/fetchers/cfg__health.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__knowbase.ts +1422 -49
- package/src/cfg/generated/_utils/fetchers/cfg__leads.ts +146 -5
- package/src/cfg/generated/_utils/fetchers/cfg__leads__lead_submission.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter.ts +88 -3
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__bulk_email.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__campaigns.ts +146 -5
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__logs.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__newsletters.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__subscriptions.ts +88 -3
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__testing.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +175 -6
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_jobs.ts +146 -5
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_monitoring.ts +59 -2
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_queues.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_registries.ts +204 -7
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_schedules.ts +117 -4
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_testing.ts +117 -4
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_workers.ts +30 -1
- package/src/cfg/generated/_utils/fetchers/cfg__support.ts +291 -10
- package/src/cfg/generated/_utils/fetchers/index.ts +1 -0
- package/src/cfg/generated/_utils/hooks/cfg__accounts.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__accounts__auth.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_admin_api.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_auth.ts +35 -0
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_testing.ts +0 -21
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_activity.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_api_zones.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_charts.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_config.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_overview.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_statistics.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_system.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__endpoints.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_api_keys.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_charts.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_configuration.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_monitoring.ts +5 -21
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_services.ts +3 -3
- package/src/cfg/generated/_utils/hooks/cfg__health.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__leads__lead_submission.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__bulk_email.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__logs.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__newsletters.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__testing.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_monitoring.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_workers.ts +0 -1
- package/src/cfg/generated/_utils/hooks/index.ts +1 -0
- package/src/cfg/generated/_utils/schemas/ApiKeyStats.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/AppStatistics.schema.ts +2 -1
- package/src/cfg/generated/_utils/schemas/AppStatisticsData.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/AxesConfig.schema.ts +35 -0
- package/src/cfg/generated/_utils/schemas/CentrifugoChannelsResult.schema.ts +2 -1
- package/src/cfg/generated/_utils/schemas/CentrifugoMetrics.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/CentrifugoPresenceResult.schema.ts +2 -1
- package/src/cfg/generated/_utils/schemas/CentrifugoToken.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/ConnectionTokenResponse.schema.ts +3 -2
- package/src/cfg/generated/_utils/schemas/ConstanceConfig.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/DjangoConfig.schema.ts +14 -7
- package/src/cfg/generated/_utils/schemas/DjangoRQConfig.schema.ts +2 -1
- package/src/cfg/generated/_utils/schemas/GRPCOverviewStats.schema.ts +2 -0
- package/src/cfg/generated/_utils/schemas/GRPCRegisteredService.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/GRPCServerConfig.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/GRPCServerStatus.schema.ts +34 -0
- package/src/cfg/generated/_utils/schemas/NextJSAdminConfig.schema.ts +21 -0
- package/src/cfg/generated/_utils/schemas/NgrokConfig.schema.ts +22 -0
- package/src/cfg/generated/_utils/schemas/OpenAPIClientConfig.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/PaginatedRecentRequestList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedServiceSummaryList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/RQSchedule.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/ServiceSummary.schema.ts +26 -0
- package/src/cfg/generated/_utils/schemas/TelegramConfig.schema.ts +28 -0
- package/src/cfg/generated/_utils/schemas/User.schema.ts +2 -0
- package/src/cfg/generated/_utils/schemas/index.ts +14 -3
- package/src/cfg/generated/cfg__accounts/models.ts +20 -3
- package/src/cfg/generated/cfg__accounts__user_profile/models.ts +19 -2
- package/src/cfg/generated/cfg__centrifugo__centrifugo_admin_api/models.ts +27 -17
- package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/client.ts +26 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/index.ts +2 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_auth/models.ts +16 -0
- package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/client.ts +0 -10
- package/src/cfg/generated/cfg__centrifugo__centrifugo_testing/models.ts +0 -26
- package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/models.ts +1 -1
- package/src/cfg/generated/cfg__dashboard__dashboard_commands/models.ts +2 -2
- package/src/cfg/generated/cfg__dashboard__dashboard_config/models.ts +159 -26
- package/src/cfg/generated/cfg__dashboard__dashboard_overview/models.ts +18 -5
- package/src/cfg/generated/cfg__grpc__grpc_api_keys/models.ts +1 -1
- package/src/cfg/generated/cfg__grpc__grpc_charts/models.ts +5 -5
- package/src/cfg/generated/cfg__grpc__grpc_configuration/models.ts +6 -6
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/client.ts +4 -25
- package/src/cfg/generated/cfg__grpc__grpc_monitoring/models.ts +99 -47
- package/src/cfg/generated/cfg__grpc__grpc_services/client.ts +6 -5
- package/src/cfg/generated/cfg__grpc__grpc_services/models.ts +51 -2
- package/src/cfg/generated/cfg__grpc__grpc_testing/models.ts +6 -6
- package/src/cfg/generated/cfg__knowbase/models.ts +12 -12
- package/src/cfg/generated/cfg__leads__lead_submission/models.ts +1 -1
- package/src/cfg/generated/cfg__newsletter/models.ts +1 -1
- package/src/cfg/generated/cfg__newsletter__campaigns/models.ts +1 -1
- package/src/cfg/generated/cfg__newsletter__logs/models.ts +4 -4
- package/src/cfg/generated/cfg__newsletter__subscriptions/models.ts +1 -1
- package/src/cfg/generated/cfg__payments/models.ts +12 -12
- package/src/cfg/generated/cfg__rq__rq_jobs/models.ts +2 -2
- package/src/cfg/generated/cfg__rq__rq_monitoring/models.ts +1 -1
- package/src/cfg/generated/cfg__rq__rq_queues/models.ts +1 -1
- package/src/cfg/generated/cfg__rq__rq_schedules/models.ts +3 -3
- package/src/cfg/generated/cfg__rq__rq_testing/models.ts +2 -2
- package/src/cfg/generated/cfg__support/models.ts +2 -2
- package/src/cfg/generated/client.ts +3 -0
- package/src/cfg/generated/index.ts +17 -8
- package/src/cfg/generated/{schema.ts → schema.json} +19349 -18798
- package/src/index.ts +7 -2
- package/src/types/auth.ts +40 -0
- package/src/types/index.ts +7 -0
- package/src/cfg/contexts/AccountsContext.tsx +0 -205
- package/src/cfg/generated/_utils/schemas/ConnectionTokenRequestRequest.schema.ts +0 -20
- package/src/cfg/generated/_utils/schemas/MonitoringServiceStats.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/ServiceList.schema.ts +0 -21
|
@@ -14,35 +14,14 @@
|
|
|
14
14
|
* await createUser({ name: 'John', email: 'john@example.com' })
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
import useSWR from 'swr'
|
|
18
17
|
import { useSWRConfig } from 'swr'
|
|
19
18
|
import * as Fetchers from '../fetchers/cfg__centrifugo__centrifugo_testing'
|
|
20
19
|
import type { API } from '../../index'
|
|
21
|
-
import type { ConnectionTokenRequestRequest } from '../schemas/ConnectionTokenRequestRequest.schema'
|
|
22
|
-
import type { ConnectionTokenResponse } from '../schemas/ConnectionTokenResponse.schema'
|
|
23
20
|
import type { ManualAckRequestRequest } from '../schemas/ManualAckRequestRequest.schema'
|
|
24
21
|
import type { ManualAckResponse } from '../schemas/ManualAckResponse.schema'
|
|
25
22
|
import type { PublishTestRequestRequest } from '../schemas/PublishTestRequestRequest.schema'
|
|
26
23
|
import type { PublishTestResponse } from '../schemas/PublishTestResponse.schema'
|
|
27
24
|
|
|
28
|
-
/**
|
|
29
|
-
* Generate connection token
|
|
30
|
-
*
|
|
31
|
-
* @method POST
|
|
32
|
-
* @path /cfg/centrifugo/testing/connection-token/
|
|
33
|
-
*/
|
|
34
|
-
export function useCreateCentrifugoTestingConnectionTokenCreate() {
|
|
35
|
-
const { mutate } = useSWRConfig()
|
|
36
|
-
|
|
37
|
-
return async (data: ConnectionTokenRequestRequest, client?: API): Promise<ConnectionTokenResponse> => {
|
|
38
|
-
const result = await Fetchers.createCentrifugoTestingConnectionTokenCreate(data, client)
|
|
39
|
-
// Revalidate related queries
|
|
40
|
-
mutate('cfg-centrifugo-testing-connection-token')
|
|
41
|
-
return result
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
25
|
/**
|
|
47
26
|
* Publish test message
|
|
48
27
|
*
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
17
|
import useSWR from 'swr'
|
|
18
|
-
import { useSWRConfig } from 'swr'
|
|
19
18
|
import * as Fetchers from '../fetchers/cfg__dashboard__dashboard_api_zones'
|
|
20
19
|
import type { API } from '../../index'
|
|
21
20
|
import type { APIZonesSummary } from '../schemas/APIZonesSummary.schema'
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
17
|
import useSWR from 'swr'
|
|
18
|
-
import { useSWRConfig } from 'swr'
|
|
19
18
|
import * as Fetchers from '../fetchers/cfg__dashboard__dashboard_charts'
|
|
20
19
|
import type { API } from '../../index'
|
|
21
20
|
import type { ChartData } from '../schemas/ChartData.schema'
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
17
|
import useSWR from 'swr'
|
|
18
|
-
import { useSWRConfig } from 'swr'
|
|
19
18
|
import * as Fetchers from '../fetchers/cfg__dashboard__dashboard_config'
|
|
20
19
|
import type { API } from '../../index'
|
|
21
20
|
import type { ConfigData } from '../schemas/ConfigData.schema'
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
17
|
import useSWR from 'swr'
|
|
18
|
-
import { useSWRConfig } from 'swr'
|
|
19
18
|
import * as Fetchers from '../fetchers/cfg__dashboard__dashboard_overview'
|
|
20
19
|
import type { API } from '../../index'
|
|
21
20
|
import type { DashboardOverview } from '../schemas/DashboardOverview.schema'
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
17
|
import useSWR from 'swr'
|
|
18
|
-
import { useSWRConfig } from 'swr'
|
|
19
18
|
import * as Fetchers from '../fetchers/cfg__dashboard__dashboard_statistics'
|
|
20
19
|
import type { API } from '../../index'
|
|
21
20
|
import type { UserStatistics } from '../schemas/UserStatistics.schema'
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
17
|
import useSWR from 'swr'
|
|
18
|
-
import { useSWRConfig } from 'swr'
|
|
19
18
|
import * as Fetchers from '../fetchers/cfg__dashboard__dashboard_system'
|
|
20
19
|
import type { API } from '../../index'
|
|
21
20
|
import type { SystemHealth } from '../schemas/SystemHealth.schema'
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
17
|
import useSWR from 'swr'
|
|
18
|
-
import { useSWRConfig } from 'swr'
|
|
19
18
|
import * as Fetchers from '../fetchers/cfg__grpc__grpc_charts'
|
|
20
19
|
import type { API } from '../../index'
|
|
21
20
|
import type { DashboardCharts } from '../schemas/DashboardCharts.schema'
|
|
@@ -15,14 +15,12 @@
|
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
17
|
import useSWR from 'swr'
|
|
18
|
-
import { useSWRConfig } from 'swr'
|
|
19
18
|
import * as Fetchers from '../fetchers/cfg__grpc__grpc_monitoring'
|
|
20
19
|
import type { API } from '../../index'
|
|
21
20
|
import type { GRPCHealthCheck } from '../schemas/GRPCHealthCheck.schema'
|
|
22
21
|
import type { GRPCOverviewStats } from '../schemas/GRPCOverviewStats.schema'
|
|
23
22
|
import type { MethodList } from '../schemas/MethodList.schema'
|
|
24
|
-
import type {
|
|
25
|
-
import type { ServiceList } from '../schemas/ServiceList.schema'
|
|
23
|
+
import type { PaginatedRecentRequestList } from '../schemas/PaginatedRecentRequestList.schema'
|
|
26
24
|
|
|
27
25
|
/**
|
|
28
26
|
* Get gRPC health status
|
|
@@ -72,24 +70,10 @@ export function useGrpcMonitorOverviewRetrieve(params?: { hours?: number }, clie
|
|
|
72
70
|
* @method GET
|
|
73
71
|
* @path /cfg/grpc/monitor/requests/
|
|
74
72
|
*/
|
|
75
|
-
export function
|
|
76
|
-
return useSWR<
|
|
77
|
-
params ? ['cfg-grpc-monitor-
|
|
78
|
-
() => Fetchers.
|
|
79
|
-
)
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Get service statistics
|
|
85
|
-
*
|
|
86
|
-
* @method GET
|
|
87
|
-
* @path /cfg/grpc/monitor/services/
|
|
88
|
-
*/
|
|
89
|
-
export function useGrpcMonitorServicesRetrieve(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<ServiceList>> {
|
|
90
|
-
return useSWR<ServiceList>(
|
|
91
|
-
params ? ['cfg-grpc-monitor-service', params] : 'cfg-grpc-monitor-service',
|
|
92
|
-
() => Fetchers.getGrpcMonitorServicesRetrieve(params, client)
|
|
73
|
+
export function useGrpcMonitorRequestsList(params?: { method?: string; page?: number; page_size?: number; service?: string; status?: string }, client?: API): ReturnType<typeof useSWR<PaginatedRecentRequestList>> {
|
|
74
|
+
return useSWR<PaginatedRecentRequestList>(
|
|
75
|
+
params ? ['cfg-grpc-monitor-requests', params] : 'cfg-grpc-monitor-requests',
|
|
76
|
+
() => Fetchers.getGrpcMonitorRequestsList(params, client)
|
|
93
77
|
)
|
|
94
78
|
}
|
|
95
79
|
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
17
|
import useSWR from 'swr'
|
|
18
|
-
import { useSWRConfig } from 'swr'
|
|
19
18
|
import * as Fetchers from '../fetchers/cfg__grpc__grpc_services'
|
|
20
19
|
import type { API } from '../../index'
|
|
20
|
+
import type { PaginatedServiceSummaryList } from '../schemas/PaginatedServiceSummaryList.schema'
|
|
21
21
|
import type { ServiceDetail } from '../schemas/ServiceDetail.schema'
|
|
22
22
|
import type { ServiceMethods } from '../schemas/ServiceMethods.schema'
|
|
23
23
|
|
|
@@ -27,8 +27,8 @@ import type { ServiceMethods } from '../schemas/ServiceMethods.schema'
|
|
|
27
27
|
* @method GET
|
|
28
28
|
* @path /cfg/grpc/services/
|
|
29
29
|
*/
|
|
30
|
-
export function useGrpcServicesList(params?: { hours?: number }, client?: API): ReturnType<typeof useSWR<
|
|
31
|
-
return useSWR<
|
|
30
|
+
export function useGrpcServicesList(params?: { hours?: number; page?: number; page_size?: number }, client?: API): ReturnType<typeof useSWR<PaginatedServiceSummaryList>> {
|
|
31
|
+
return useSWR<PaginatedServiceSummaryList>(
|
|
32
32
|
params ? ['cfg-grpc-services', params] : 'cfg-grpc-services',
|
|
33
33
|
() => Fetchers.getGrpcServicesList(params, client)
|
|
34
34
|
)
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
17
|
import useSWR from 'swr'
|
|
18
|
-
import { useSWRConfig } from 'swr'
|
|
19
18
|
import * as Fetchers from '../fetchers/cfg__newsletter__logs'
|
|
20
19
|
import type { API } from '../../index'
|
|
21
20
|
import type { PaginatedEmailLogList } from '../schemas/PaginatedEmailLogList.schema'
|
|
@@ -27,6 +27,7 @@ export * from './cfg__accounts__auth'
|
|
|
27
27
|
export * from './cfg__newsletter__bulk_email'
|
|
28
28
|
export * from './cfg__newsletter__campaigns'
|
|
29
29
|
export * from './cfg__centrifugo__centrifugo_admin_api'
|
|
30
|
+
export * from './cfg__centrifugo__centrifugo_auth'
|
|
30
31
|
export * from './cfg__centrifugo__centrifugo_monitoring'
|
|
31
32
|
export * from './cfg__centrifugo__centrifugo_testing'
|
|
32
33
|
export * from './cfg__dashboard__dashboard_api_zones'
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
* * Serializer for application-specific statistics.
|
|
6
6
|
* */
|
|
7
7
|
import { z } from 'zod'
|
|
8
|
+
import { AppStatisticsDataSchema } from './AppStatisticsData.schema'
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Serializer for application-specific statistics.
|
|
11
12
|
*/
|
|
12
13
|
export const AppStatisticsSchema = z.object({
|
|
13
14
|
app_name: z.string(),
|
|
14
|
-
statistics:
|
|
15
|
+
statistics: AppStatisticsDataSchema,
|
|
15
16
|
})
|
|
16
17
|
|
|
17
18
|
/**
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for AppStatisticsData
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for application statistics data.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Serializer for application statistics data.
|
|
11
|
+
*/
|
|
12
|
+
export const AppStatisticsDataSchema = z.object({
|
|
13
|
+
name: z.string(),
|
|
14
|
+
total_records: z.int(),
|
|
15
|
+
model_count: z.int(),
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Infer TypeScript type from Zod schema
|
|
20
|
+
*/
|
|
21
|
+
export type AppStatisticsData = z.infer<typeof AppStatisticsDataSchema>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for AxesConfig
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Django-Axes brute-force protection configuration.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Django-Axes brute-force protection configuration.
|
|
11
|
+
*/
|
|
12
|
+
export const AxesConfigSchema = z.object({
|
|
13
|
+
enabled: z.boolean().nullable().optional(),
|
|
14
|
+
failure_limit: z.int().nullable().optional(),
|
|
15
|
+
cooloff_time: z.int().nullable().optional(),
|
|
16
|
+
lock_out_at_failure: z.boolean().nullable().optional(),
|
|
17
|
+
reset_on_success: z.boolean().nullable().optional(),
|
|
18
|
+
only_user_failures: z.boolean().nullable().optional(),
|
|
19
|
+
lockout_template: z.string().nullable().optional(),
|
|
20
|
+
lockout_url: z.string().nullable().optional(),
|
|
21
|
+
verbose: z.boolean().nullable().optional(),
|
|
22
|
+
enable_access_failure_log: z.boolean().nullable().optional(),
|
|
23
|
+
ipware_proxy_count: z.int().nullable().optional(),
|
|
24
|
+
ipware_meta_precedence_order: z.array(z.string()).nullable().optional(),
|
|
25
|
+
allowed_ips: z.array(z.string()).nullable().optional(),
|
|
26
|
+
denied_ips: z.array(z.string()).nullable().optional(),
|
|
27
|
+
cache_name: z.string().nullable().optional(),
|
|
28
|
+
use_user_agent: z.boolean().nullable().optional(),
|
|
29
|
+
username_form_field: z.string().nullable().optional(),
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Infer TypeScript type from Zod schema
|
|
34
|
+
*/
|
|
35
|
+
export type AxesConfig = z.infer<typeof AxesConfigSchema>
|
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
* * Channels result wrapper.
|
|
6
6
|
* */
|
|
7
7
|
import { z } from 'zod'
|
|
8
|
+
import { CentrifugoChannelInfoSchema } from './CentrifugoChannelInfo.schema'
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Channels result wrapper.
|
|
11
12
|
*/
|
|
12
13
|
export const CentrifugoChannelsResultSchema = z.object({
|
|
13
|
-
channels: z.record(z.string(),
|
|
14
|
+
channels: z.record(z.string(), CentrifugoChannelInfoSchema),
|
|
14
15
|
})
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
* * Presence result wrapper.
|
|
6
6
|
* */
|
|
7
7
|
import { z } from 'zod'
|
|
8
|
+
import { CentrifugoClientInfoSchema } from './CentrifugoClientInfo.schema'
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Presence result wrapper.
|
|
11
12
|
*/
|
|
12
13
|
export const CentrifugoPresenceResultSchema = z.object({
|
|
13
|
-
presence: z.record(z.string(),
|
|
14
|
+
presence: z.record(z.string(), CentrifugoClientInfoSchema),
|
|
14
15
|
})
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for CentrifugoToken
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Nested serializer for Centrifugo WebSocket connection token.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Nested serializer for Centrifugo WebSocket connection token.
|
|
11
|
+
*/
|
|
12
|
+
export const CentrifugoTokenSchema = z.object({
|
|
13
|
+
token: z.string(),
|
|
14
|
+
centrifugo_url: z.url(),
|
|
15
|
+
expires_at: z.iso.datetime(),
|
|
16
|
+
channels: z.array(z.string()),
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Infer TypeScript type from Zod schema
|
|
21
|
+
*/
|
|
22
|
+
export type CentrifugoToken = z.infer<typeof CentrifugoTokenSchema>
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
* Zod schema for ConnectionTokenResponse
|
|
3
3
|
*
|
|
4
4
|
* This schema provides runtime validation and type inference.
|
|
5
|
-
* * Response model for connection token.
|
|
5
|
+
* * Response model for Centrifugo connection token.
|
|
6
6
|
* */
|
|
7
7
|
import { z } from 'zod'
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Response model for connection token.
|
|
10
|
+
* Response model for Centrifugo connection token.
|
|
11
11
|
*/
|
|
12
12
|
export const ConnectionTokenResponseSchema = z.object({
|
|
13
13
|
token: z.string(),
|
|
14
14
|
centrifugo_url: z.string(),
|
|
15
15
|
expires_at: z.string(),
|
|
16
|
+
channels: z.array(z.string()),
|
|
16
17
|
})
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for ConstanceConfig
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Django-Constance dynamic settings configuration.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Django-Constance dynamic settings configuration.
|
|
11
|
+
*/
|
|
12
|
+
export const ConstanceConfigSchema = z.object({
|
|
13
|
+
config: z.record(z.string(), z.any()).nullable().optional(),
|
|
14
|
+
config_fieldsets: z.record(z.string(), z.any()).nullable().optional(),
|
|
15
|
+
backend: z.string().nullable().optional(),
|
|
16
|
+
database_prefix: z.string().nullable().optional(),
|
|
17
|
+
database_cache_backend: z.string().nullable().optional(),
|
|
18
|
+
additional_config: z.record(z.string(), z.any()).nullable().optional(),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Infer TypeScript type from Zod schema
|
|
23
|
+
*/
|
|
24
|
+
export type ConstanceConfig = z.infer<typeof ConstanceConfigSchema>
|
|
@@ -8,15 +8,22 @@ Reflects the actual structure of DjangoConfig model.
|
|
|
8
8
|
All passwords and sensitive data are sanitized before reaching this serializer.
|
|
9
9
|
* */
|
|
10
10
|
import { z } from 'zod'
|
|
11
|
+
import { AxesConfigSchema } from './AxesConfig.schema'
|
|
11
12
|
import { CentrifugoConfigSchema } from './CentrifugoConfig.schema'
|
|
12
13
|
import { ConfigMetaSchema } from './ConfigMeta.schema'
|
|
14
|
+
import { ConstanceConfigSchema } from './ConstanceConfig.schema'
|
|
13
15
|
import { DRFConfigSchema } from './DRFConfig.schema'
|
|
16
|
+
import { DatabaseConfigSchema } from './DatabaseConfig.schema'
|
|
14
17
|
import { DjangoRQConfigSchema } from './DjangoRQConfig.schema'
|
|
15
18
|
import { EmailConfigSchema } from './EmailConfig.schema'
|
|
16
19
|
import { GRPCConfigDashboardSchema } from './GRPCConfigDashboard.schema'
|
|
17
20
|
import { JWTConfigSchema } from './JWTConfig.schema'
|
|
21
|
+
import { NextJSAdminConfigSchema } from './NextJSAdminConfig.schema'
|
|
22
|
+
import { NgrokConfigSchema } from './NgrokConfig.schema'
|
|
23
|
+
import { OpenAPIClientConfigSchema } from './OpenAPIClientConfig.schema'
|
|
18
24
|
import { PaymentsConfigSchema } from './PaymentsConfig.schema'
|
|
19
25
|
import { SpectacularConfigSchema } from './SpectacularConfig.schema'
|
|
26
|
+
import { TelegramConfigSchema } from './TelegramConfig.schema'
|
|
20
27
|
|
|
21
28
|
/**
|
|
22
29
|
* Typed serializer for user's DjangoConfig settings.
|
|
@@ -48,7 +55,7 @@ export const DjangoConfigSchema = z.object({
|
|
|
48
55
|
wsgi_application: z.string().nullable().optional(),
|
|
49
56
|
auth_user_model: z.string().nullable().optional(),
|
|
50
57
|
project_apps: z.array(z.string()).nullable().optional(),
|
|
51
|
-
databases: z.record(z.string(),
|
|
58
|
+
databases: z.record(z.string(), DatabaseConfigSchema).nullable().optional(),
|
|
52
59
|
redis_url: z.string().nullable().optional(),
|
|
53
60
|
cache_default: z.string().nullable().optional(),
|
|
54
61
|
cache_sessions: z.string().nullable().optional(),
|
|
@@ -63,9 +70,9 @@ export const DjangoConfigSchema = z.object({
|
|
|
63
70
|
drf: DRFConfigSchema.nullable().optional(),
|
|
64
71
|
spectacular: SpectacularConfigSchema.nullable().optional(),
|
|
65
72
|
jwt: JWTConfigSchema.nullable().optional(),
|
|
66
|
-
telegram:
|
|
67
|
-
ngrok:
|
|
68
|
-
axes:
|
|
73
|
+
telegram: TelegramConfigSchema.nullable().optional(),
|
|
74
|
+
ngrok: NgrokConfigSchema.nullable().optional(),
|
|
75
|
+
axes: AxesConfigSchema.nullable().optional(),
|
|
69
76
|
crypto_fields: z.record(z.string(), z.any()).nullable().optional(),
|
|
70
77
|
unfold: z.string().nullable().optional(),
|
|
71
78
|
tailwind_app_name: z.string().nullable().optional(),
|
|
@@ -73,10 +80,10 @@ export const DjangoConfigSchema = z.object({
|
|
|
73
80
|
limits: z.record(z.string(), z.any()).nullable().optional(),
|
|
74
81
|
api_keys: z.record(z.string(), z.any()).nullable().optional(),
|
|
75
82
|
custom_middleware: z.array(z.string()).nullable().optional(),
|
|
76
|
-
nextjs_admin:
|
|
83
|
+
nextjs_admin: NextJSAdminConfigSchema.nullable().optional(),
|
|
77
84
|
admin_emails: z.array(z.string()).nullable().optional(),
|
|
78
|
-
constance:
|
|
79
|
-
openapi_client:
|
|
85
|
+
constance: ConstanceConfigSchema.nullable().optional(),
|
|
86
|
+
openapi_client: OpenAPIClientConfigSchema.nullable().optional(),
|
|
80
87
|
_meta: ConfigMetaSchema.nullable().optional(),
|
|
81
88
|
})
|
|
82
89
|
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* * Django-RQ configuration.
|
|
6
6
|
* */
|
|
7
7
|
import { z } from 'zod'
|
|
8
|
+
import { RQScheduleSchema } from './RQSchedule.schema'
|
|
8
9
|
import { RedisQueueConfigSchema } from './RedisQueueConfig.schema'
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -17,7 +18,7 @@ export const DjangoRQConfigSchema = z.object({
|
|
|
17
18
|
exception_handlers: z.array(z.string()).nullable().optional(),
|
|
18
19
|
api_token: z.string().nullable().optional(),
|
|
19
20
|
prometheus_enabled: z.boolean().nullable().optional(),
|
|
20
|
-
schedules: z.array(
|
|
21
|
+
schedules: z.array(RQScheduleSchema).nullable().optional(),
|
|
21
22
|
})
|
|
22
23
|
|
|
23
24
|
/**
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* * Overview statistics for gRPC requests.
|
|
6
6
|
* */
|
|
7
7
|
import { z } from 'zod'
|
|
8
|
+
import { GRPCServerStatusSchema } from './GRPCServerStatus.schema'
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Overview statistics for gRPC requests.
|
|
@@ -19,6 +20,7 @@ export const GRPCOverviewStatsSchema = z.object({
|
|
|
19
20
|
avg_duration_ms: z.number(),
|
|
20
21
|
p95_duration_ms: z.number().nullable(),
|
|
21
22
|
period_hours: z.int(),
|
|
23
|
+
server: GRPCServerStatusSchema,
|
|
22
24
|
})
|
|
23
25
|
|
|
24
26
|
/**
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for GRPCRegisteredService
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Information about a registered gRPC service.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Information about a registered gRPC service.
|
|
11
|
+
*/
|
|
12
|
+
export const GRPCRegisteredServiceSchema = z.object({
|
|
13
|
+
name: z.string(),
|
|
14
|
+
full_name: z.string(),
|
|
15
|
+
methods_count: z.int(),
|
|
16
|
+
request_count: z.int(),
|
|
17
|
+
error_count: z.int(),
|
|
18
|
+
success_rate: z.number(),
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Infer TypeScript type from Zod schema
|
|
23
|
+
*/
|
|
24
|
+
export type GRPCRegisteredService = z.infer<typeof GRPCRegisteredServiceSchema>
|