@djangocfg/api 2.1.36 → 2.1.38
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/README.md +94 -56
- package/dist/auth.cjs +3020 -4081
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +5 -7
- package/dist/auth.d.ts +5 -7
- package/dist/auth.mjs +3019 -4080
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +4983 -0
- package/dist/clients.cjs.map +1 -0
- package/dist/clients.d.cts +4135 -0
- package/dist/clients.d.ts +4135 -0
- package/dist/clients.mjs +4957 -0
- package/dist/clients.mjs.map +1 -0
- package/dist/hooks.cjs +1083 -0
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +1122 -1
- package/dist/hooks.d.ts +1122 -1
- package/dist/hooks.mjs +1053 -0
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +2888 -7848
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1867 -9643
- package/dist/index.d.ts +1867 -9643
- package/dist/index.mjs +2891 -7851
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -3
- package/src/auth/context/AuthContext.tsx +8 -71
- package/src/auth/context/types.ts +1 -9
- package/src/auth/hooks/useAuthForm.ts +11 -7
- package/src/auth/hooks/useGithubAuth.ts +3 -3
- package/src/clients.ts +57 -0
- package/src/generated/cfg_accounts/_utils/fetchers/{cfg_accounts__accounts.ts → accounts.ts} +10 -2
- package/src/generated/cfg_accounts/_utils/fetchers/{cfg_accounts__accounts__auth.ts → accounts__auth.ts} +9 -1
- package/src/generated/cfg_accounts/_utils/fetchers/{cfg_accounts__accounts__oauth.ts → accounts__oauth.ts} +13 -5
- package/src/generated/cfg_accounts/_utils/fetchers/{cfg_accounts__accounts__user_profile.ts → accounts__user_profile.ts} +14 -6
- package/src/generated/cfg_accounts/_utils/fetchers/index.ts +12 -29
- package/src/generated/cfg_accounts/_utils/hooks/{cfg_accounts__accounts.ts → accounts.ts} +9 -1
- package/src/generated/cfg_accounts/_utils/hooks/{cfg_accounts__accounts__auth.ts → accounts__auth.ts} +9 -1
- package/src/generated/cfg_accounts/_utils/hooks/{cfg_accounts__accounts__oauth.ts → accounts__oauth.ts} +9 -1
- package/src/generated/cfg_accounts/_utils/hooks/{cfg_accounts__accounts__user_profile.ts → accounts__user_profile.ts} +9 -1
- package/src/generated/cfg_accounts/_utils/hooks/index.ts +12 -29
- package/src/generated/cfg_accounts/_utils/schemas/index.ts +8 -134
- package/src/generated/cfg_accounts/{cfg_accounts__accounts → accounts}/client.ts +1 -1
- package/src/generated/cfg_accounts/accounts/index.ts +10 -0
- package/src/generated/cfg_accounts/{cfg_accounts__accounts → accounts}/models.ts +8 -0
- package/src/generated/cfg_accounts/{cfg_accounts__accounts__auth → accounts__auth}/client.ts +1 -1
- package/src/generated/cfg_accounts/accounts__auth/index.ts +10 -0
- package/src/generated/cfg_accounts/accounts__auth/models.ts +25 -0
- package/src/generated/cfg_accounts/{cfg_accounts__accounts__oauth → accounts__oauth}/client.ts +1 -1
- package/src/generated/cfg_accounts/accounts__oauth/index.ts +10 -0
- package/src/generated/cfg_accounts/{cfg_accounts__accounts__oauth → accounts__oauth}/models.ts +8 -0
- package/src/generated/cfg_accounts/{cfg_accounts__accounts__user_profile → accounts__user_profile}/client.ts +1 -1
- package/src/generated/cfg_accounts/accounts__user_profile/index.ts +10 -0
- package/src/generated/cfg_accounts/{cfg_accounts__accounts__user_profile → accounts__user_profile}/models.ts +8 -0
- package/src/generated/cfg_accounts/api-instance.ts +8 -0
- package/src/generated/cfg_accounts/client.ts +12 -87
- package/src/generated/cfg_accounts/enums.ts +8 -96
- package/src/generated/cfg_accounts/errors.ts +8 -0
- package/src/generated/cfg_accounts/http.ts +8 -0
- package/src/generated/cfg_accounts/index.ts +28 -195
- package/src/generated/cfg_accounts/logger.ts +8 -0
- package/src/generated/cfg_accounts/retry.ts +8 -0
- package/src/generated/cfg_accounts/schema.json +246 -10265
- package/src/generated/cfg_accounts/storage.ts +8 -0
- package/src/generated/cfg_accounts/validation-events.ts +8 -0
- package/src/generated/{cfg_accounts/_utils/fetchers/cfg_accounts__centrifugo__centrifugo_admin_api.ts → cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_admin_api.ts} +14 -6
- package/src/generated/{cfg_accounts/_utils/fetchers/cfg_accounts__centrifugo__centrifugo_auth.ts → cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_auth.ts} +9 -1
- package/src/generated/{cfg_accounts/_utils/fetchers/cfg_accounts__centrifugo__centrifugo_monitoring.ts → cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_monitoring.ts} +13 -5
- package/src/generated/{cfg_accounts/_utils/fetchers/cfg_accounts__centrifugo__centrifugo_testing.ts → cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_testing.ts} +11 -3
- package/src/generated/cfg_centrifugo/_utils/fetchers/index.ts +39 -0
- package/src/generated/{cfg_accounts/_utils/hooks/cfg_accounts__centrifugo__centrifugo_admin_api.ts → cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_admin_api.ts} +9 -1
- package/src/generated/{cfg_accounts/_utils/hooks/cfg_accounts__centrifugo__centrifugo_auth.ts → cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_auth.ts} +9 -1
- package/src/generated/{cfg_accounts/_utils/hooks/cfg_accounts__centrifugo__centrifugo_monitoring.ts → cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_monitoring.ts} +9 -1
- package/src/generated/{cfg_accounts/_utils/hooks/cfg_accounts__centrifugo__centrifugo_testing.ts → cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_testing.ts} +9 -1
- package/src/generated/cfg_centrifugo/_utils/hooks/index.ts +39 -0
- package/src/generated/cfg_centrifugo/_utils/schemas/index.ts +61 -0
- package/src/generated/cfg_centrifugo/api-instance.ts +139 -0
- package/src/generated/{cfg_accounts/cfg_accounts__centrifugo__centrifugo_admin_api → cfg_centrifugo/centrifugo__centrifugo_admin_api}/client.ts +1 -1
- package/src/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/index.ts +10 -0
- package/src/generated/{cfg_accounts/cfg_accounts__centrifugo__centrifugo_admin_api → cfg_centrifugo/centrifugo__centrifugo_admin_api}/models.ts +8 -0
- package/src/generated/{cfg_accounts/cfg_accounts__centrifugo__centrifugo_auth → cfg_centrifugo/centrifugo__centrifugo_auth}/client.ts +1 -1
- package/src/generated/cfg_centrifugo/centrifugo__centrifugo_auth/index.ts +10 -0
- package/src/generated/{cfg_accounts/cfg_accounts__centrifugo__centrifugo_auth → cfg_centrifugo/centrifugo__centrifugo_auth}/models.ts +8 -0
- package/src/generated/{cfg_accounts/cfg_accounts__centrifugo__centrifugo_monitoring → cfg_centrifugo/centrifugo__centrifugo_monitoring}/client.ts +1 -1
- package/src/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/index.ts +10 -0
- package/src/generated/{cfg_accounts/cfg_accounts__centrifugo__centrifugo_monitoring → cfg_centrifugo/centrifugo__centrifugo_monitoring}/models.ts +8 -0
- package/src/generated/{cfg_accounts/cfg_accounts__centrifugo__centrifugo_testing → cfg_centrifugo/centrifugo__centrifugo_testing}/client.ts +1 -1
- package/src/generated/cfg_centrifugo/centrifugo__centrifugo_testing/index.ts +10 -0
- package/src/generated/{cfg_accounts/cfg_accounts__centrifugo__centrifugo_testing → cfg_centrifugo/centrifugo__centrifugo_testing}/models.ts +8 -0
- package/src/generated/cfg_centrifugo/client.ts +310 -0
- package/src/generated/cfg_centrifugo/errors.ts +124 -0
- package/src/generated/cfg_centrifugo/http.ts +111 -0
- package/src/generated/cfg_centrifugo/index.ts +301 -0
- package/src/generated/cfg_centrifugo/logger.ts +267 -0
- package/src/generated/cfg_centrifugo/retry.ts +183 -0
- package/src/generated/cfg_centrifugo/schema.json +2123 -0
- package/src/generated/cfg_centrifugo/storage.ts +169 -0
- package/src/generated/cfg_centrifugo/validation-events.ts +141 -0
- package/src/generated/cfg_webpush/_utils/fetchers/index.ts +36 -0
- package/src/generated/{cfg_accounts/_utils/fetchers/cfg_accounts__grpc__grpc_api_keys.ts → cfg_webpush/_utils/fetchers/webpush__web_push.ts} +45 -35
- package/src/generated/cfg_webpush/_utils/hooks/index.ts +36 -0
- package/src/generated/cfg_webpush/_utils/hooks/webpush__web_push.ts +86 -0
- package/src/generated/cfg_webpush/_utils/schemas/SendPushRequestRequest.schema.ts +22 -0
- package/src/generated/cfg_webpush/_utils/schemas/SendPushResponse.schema.ts +20 -0
- package/src/generated/cfg_webpush/_utils/schemas/SubscribeRequestRequest.schema.ts +20 -0
- package/src/generated/cfg_webpush/_utils/schemas/SubscribeResponse.schema.ts +21 -0
- package/src/generated/cfg_webpush/_utils/schemas/VapidPublicKeyResponse.schema.ts +19 -0
- package/src/generated/cfg_webpush/_utils/schemas/index.ts +31 -0
- package/src/generated/cfg_webpush/api-instance.ts +139 -0
- package/src/generated/cfg_webpush/client.ts +301 -0
- package/src/generated/cfg_webpush/errors.ts +124 -0
- package/src/generated/cfg_webpush/http.ts +111 -0
- package/src/generated/cfg_webpush/index.ts +280 -0
- package/src/generated/cfg_webpush/logger.ts +267 -0
- package/src/generated/cfg_webpush/retry.ts +183 -0
- package/src/generated/cfg_webpush/schema.json +302 -0
- package/src/generated/cfg_webpush/storage.ts +169 -0
- package/src/generated/cfg_webpush/validation-events.ts +141 -0
- package/src/generated/cfg_webpush/webpush__web_push/client.ts +45 -0
- package/src/generated/cfg_webpush/webpush__web_push/index.ts +10 -0
- package/src/generated/cfg_webpush/webpush__web_push/models.ts +72 -0
- package/src/hooks/accounts.ts +8 -0
- package/src/hooks/index.ts +10 -0
- package/src/hooks/webpush.ts +12 -0
- package/src/index.ts +11 -0
- package/src/server.ts +5 -8
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_activity.ts +0 -62
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_api_zones.ts +0 -106
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_charts.ts +0 -177
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_commands.ts +0 -179
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_config.ts +0 -92
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_overview.ts +0 -92
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_statistics.ts +0 -120
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_system.ts +0 -150
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__endpoints.ts +0 -164
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__grpc__grpc_configuration.ts +0 -150
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__grpc__grpc_monitoring.ts +0 -280
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__grpc__grpc_services.ts +0 -208
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__health.ts +0 -150
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__rq__rq_jobs.ts +0 -323
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__rq__rq_monitoring.ts +0 -164
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__rq__rq_queues.ts +0 -134
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__rq__rq_registries.ts +0 -436
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__rq__rq_schedules.ts +0 -266
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__rq__rq_testing.ts +0 -293
- package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__rq__rq_workers.ts +0 -106
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__dashboard__dashboard_activity.ts +0 -50
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__dashboard__dashboard_api_zones.ts +0 -51
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__dashboard__dashboard_charts.ts +0 -79
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__dashboard__dashboard_commands.ts +0 -86
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__dashboard__dashboard_config.ts +0 -37
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__dashboard__dashboard_overview.ts +0 -37
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__dashboard__dashboard_statistics.ts +0 -65
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__dashboard__dashboard_system.ts +0 -52
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__endpoints.ts +0 -66
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__grpc__grpc_api_keys.ts +0 -67
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__grpc__grpc_configuration.ts +0 -52
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__grpc__grpc_monitoring.ts +0 -96
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__grpc__grpc_services.ts +0 -67
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__health.ts +0 -52
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__rq__rq_jobs.ts +0 -110
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__rq__rq_monitoring.ts +0 -66
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__rq__rq_queues.ts +0 -84
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__rq__rq_registries.ts +0 -136
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__rq__rq_schedules.ts +0 -92
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__rq__rq_testing.ts +0 -126
- package/src/generated/cfg_accounts/_utils/hooks/cfg_accounts__rq__rq_workers.ts +0 -51
- package/src/generated/cfg_accounts/_utils/schemas/APIZone.schema.ts +0 -29
- package/src/generated/cfg_accounts/_utils/schemas/APIZonesSummary.schema.ts +0 -22
- package/src/generated/cfg_accounts/_utils/schemas/ActivityEntry.schema.ts +0 -25
- package/src/generated/cfg_accounts/_utils/schemas/ActivityTrackerDay.schema.ts +0 -23
- package/src/generated/cfg_accounts/_utils/schemas/ApiKey.schema.ts +0 -30
- package/src/generated/cfg_accounts/_utils/schemas/ApiKeyStats.schema.ts +0 -22
- package/src/generated/cfg_accounts/_utils/schemas/AppStatistics.schema.ts +0 -21
- package/src/generated/cfg_accounts/_utils/schemas/AppStatisticsData.schema.ts +0 -23
- package/src/generated/cfg_accounts/_utils/schemas/AxesConfig.schema.ts +0 -35
- package/src/generated/cfg_accounts/_utils/schemas/CentrifugoConfig.schema.ts +0 -35
- package/src/generated/cfg_accounts/_utils/schemas/ChartData.schema.ts +0 -21
- package/src/generated/cfg_accounts/_utils/schemas/ChartDataset.schema.ts +0 -24
- package/src/generated/cfg_accounts/_utils/schemas/Command.schema.ts +0 -38
- package/src/generated/cfg_accounts/_utils/schemas/CommandCategory.schema.ts +0 -21
- package/src/generated/cfg_accounts/_utils/schemas/CommandExecuteRequestRequest.schema.ts +0 -21
- package/src/generated/cfg_accounts/_utils/schemas/CommandHelpResponse.schema.ts +0 -25
- package/src/generated/cfg_accounts/_utils/schemas/CommandsSummary.schema.ts +0 -26
- package/src/generated/cfg_accounts/_utils/schemas/ConfigData.schema.ts +0 -27
- package/src/generated/cfg_accounts/_utils/schemas/ConfigMeta.schema.ts +0 -20
- package/src/generated/cfg_accounts/_utils/schemas/ConfigValidation.schema.ts +0 -24
- package/src/generated/cfg_accounts/_utils/schemas/ConstanceConfig.schema.ts +0 -24
- package/src/generated/cfg_accounts/_utils/schemas/DRFConfig.schema.ts +0 -20
- package/src/generated/cfg_accounts/_utils/schemas/DRFHealthCheck.schema.ts +0 -25
- package/src/generated/cfg_accounts/_utils/schemas/DashboardOverview.schema.ts +0 -35
- package/src/generated/cfg_accounts/_utils/schemas/DatabaseConfig.schema.ts +0 -31
- package/src/generated/cfg_accounts/_utils/schemas/DjangoConfig.schema.ts +0 -93
- package/src/generated/cfg_accounts/_utils/schemas/DjangoRQConfig.schema.ts +0 -27
- package/src/generated/cfg_accounts/_utils/schemas/EmailConfig.schema.ts +0 -28
- package/src/generated/cfg_accounts/_utils/schemas/Endpoint.schema.ts +0 -35
- package/src/generated/cfg_accounts/_utils/schemas/EndpointsStatus.schema.ts +0 -28
- package/src/generated/cfg_accounts/_utils/schemas/GRPCConfig.schema.ts +0 -26
- package/src/generated/cfg_accounts/_utils/schemas/GRPCConfigDashboard.schema.ts +0 -33
- package/src/generated/cfg_accounts/_utils/schemas/GRPCFeatures.schema.ts +0 -22
- package/src/generated/cfg_accounts/_utils/schemas/GRPCFrameworkConfig.schema.ts +0 -22
- package/src/generated/cfg_accounts/_utils/schemas/GRPCHealthCheck.schema.ts +0 -23
- package/src/generated/cfg_accounts/_utils/schemas/GRPCInterceptorInfo.schema.ts +0 -20
- package/src/generated/cfg_accounts/_utils/schemas/GRPCOverviewStats.schema.ts +0 -29
- package/src/generated/cfg_accounts/_utils/schemas/GRPCRegisteredService.schema.ts +0 -24
- package/src/generated/cfg_accounts/_utils/schemas/GRPCServerConfig.schema.ts +0 -23
- package/src/generated/cfg_accounts/_utils/schemas/GRPCServerInfo.schema.ts +0 -28
- package/src/generated/cfg_accounts/_utils/schemas/GRPCServerStatus.schema.ts +0 -30
- package/src/generated/cfg_accounts/_utils/schemas/GRPCServiceInfo.schema.ts +0 -22
- package/src/generated/cfg_accounts/_utils/schemas/GRPCServiceRegistryMethodStats.schema.ts +0 -26
- package/src/generated/cfg_accounts/_utils/schemas/GRPCStats.schema.ts +0 -21
- package/src/generated/cfg_accounts/_utils/schemas/GitHubOAuthConfig.schema.ts +0 -30
- package/src/generated/cfg_accounts/_utils/schemas/JWTConfig.schema.ts +0 -21
- package/src/generated/cfg_accounts/_utils/schemas/JobActionResponse.schema.ts +0 -26
- package/src/generated/cfg_accounts/_utils/schemas/JobDetail.schema.ts +0 -40
- package/src/generated/cfg_accounts/_utils/schemas/JobList.schema.ts +0 -28
- package/src/generated/cfg_accounts/_utils/schemas/JobListRequest.schema.ts +0 -28
- package/src/generated/cfg_accounts/_utils/schemas/MethodInfo.schema.ts +0 -24
- package/src/generated/cfg_accounts/_utils/schemas/MethodList.schema.ts +0 -21
- package/src/generated/cfg_accounts/_utils/schemas/MethodSummary.schema.ts +0 -25
- package/src/generated/cfg_accounts/_utils/schemas/ModelStatistics.schema.ts +0 -23
- package/src/generated/cfg_accounts/_utils/schemas/NextJSAdminConfig.schema.ts +0 -21
- package/src/generated/cfg_accounts/_utils/schemas/NgrokConfig.schema.ts +0 -22
- package/src/generated/cfg_accounts/_utils/schemas/OpenAPIClientConfig.schema.ts +0 -26
- package/src/generated/cfg_accounts/_utils/schemas/PaginatedApiKeyList.schema.ts +0 -24
- package/src/generated/cfg_accounts/_utils/schemas/PaginatedJobListList.schema.ts +0 -24
- package/src/generated/cfg_accounts/_utils/schemas/PaginatedRecentRequestList.schema.ts +0 -24
- package/src/generated/cfg_accounts/_utils/schemas/PaginatedScheduledJobList.schema.ts +0 -24
- package/src/generated/cfg_accounts/_utils/schemas/PaginatedServiceSummaryList.schema.ts +0 -24
- package/src/generated/cfg_accounts/_utils/schemas/PaymentsConfig.schema.ts +0 -21
- package/src/generated/cfg_accounts/_utils/schemas/PaymentsNowPayments.schema.ts +0 -22
- package/src/generated/cfg_accounts/_utils/schemas/QueueDetail.schema.ts +0 -34
- package/src/generated/cfg_accounts/_utils/schemas/QueueStats.schema.ts +0 -31
- package/src/generated/cfg_accounts/_utils/schemas/QuickAction.schema.ts +0 -29
- package/src/generated/cfg_accounts/_utils/schemas/QuickHealth.schema.ts +0 -21
- package/src/generated/cfg_accounts/_utils/schemas/RQConfig.schema.ts +0 -30
- package/src/generated/cfg_accounts/_utils/schemas/RQHealthCheck.schema.ts +0 -31
- package/src/generated/cfg_accounts/_utils/schemas/RQSchedule.schema.ts +0 -26
- package/src/generated/cfg_accounts/_utils/schemas/RecentError.schema.ts +0 -22
- package/src/generated/cfg_accounts/_utils/schemas/RecentRequest.schema.ts +0 -33
- package/src/generated/cfg_accounts/_utils/schemas/RecentUser.schema.ts +0 -26
- package/src/generated/cfg_accounts/_utils/schemas/RedisQueueConfig.schema.ts +0 -29
- package/src/generated/cfg_accounts/_utils/schemas/RunDemoRequestRequest.schema.ts +0 -24
- package/src/generated/cfg_accounts/_utils/schemas/ScheduleActionResponse.schema.ts +0 -22
- package/src/generated/cfg_accounts/_utils/schemas/ScheduleCreateRequest.schema.ts +0 -39
- package/src/generated/cfg_accounts/_utils/schemas/ScheduleInfo.schema.ts +0 -27
- package/src/generated/cfg_accounts/_utils/schemas/ScheduledJob.schema.ts +0 -32
- package/src/generated/cfg_accounts/_utils/schemas/ServiceDetail.schema.ts +0 -31
- package/src/generated/cfg_accounts/_utils/schemas/ServiceMethods.schema.ts +0 -22
- package/src/generated/cfg_accounts/_utils/schemas/ServiceStats.schema.ts +0 -24
- package/src/generated/cfg_accounts/_utils/schemas/ServiceSummary.schema.ts +0 -26
- package/src/generated/cfg_accounts/_utils/schemas/SpectacularConfig.schema.ts +0 -21
- package/src/generated/cfg_accounts/_utils/schemas/StatCard.schema.ts +0 -30
- package/src/generated/cfg_accounts/_utils/schemas/StressTestRequestRequest.schema.ts +0 -23
- package/src/generated/cfg_accounts/_utils/schemas/SystemHealth.schema.ts +0 -24
- package/src/generated/cfg_accounts/_utils/schemas/SystemHealthItem.schema.ts +0 -28
- package/src/generated/cfg_accounts/_utils/schemas/SystemMetrics.schema.ts +0 -25
- package/src/generated/cfg_accounts/_utils/schemas/TelegramConfig.schema.ts +0 -28
- package/src/generated/cfg_accounts/_utils/schemas/TestScenario.schema.ts +0 -25
- package/src/generated/cfg_accounts/_utils/schemas/TestingActionResponse.schema.ts +0 -23
- package/src/generated/cfg_accounts/_utils/schemas/URLPattern.schema.ts +0 -26
- package/src/generated/cfg_accounts/_utils/schemas/URLsList.schema.ts +0 -25
- package/src/generated/cfg_accounts/_utils/schemas/UserStatistics.schema.ts +0 -22
- package/src/generated/cfg_accounts/_utils/schemas/Worker.schema.ts +0 -31
- package/src/generated/cfg_accounts/_utils/schemas/WorkerStats.schema.ts +0 -31
- package/src/generated/cfg_accounts/_utils/schemas/ZonesSummaryStats.schema.ts +0 -21
- package/src/generated/cfg_accounts/cfg_accounts__accounts/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__accounts__auth/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__accounts__auth/models.ts +0 -17
- package/src/generated/cfg_accounts/cfg_accounts__accounts__oauth/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__accounts__user_profile/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__centrifugo__centrifugo_admin_api/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__centrifugo__centrifugo_auth/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__centrifugo__centrifugo_monitoring/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__centrifugo__centrifugo_testing/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_activity/client.ts +0 -45
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_activity/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_activity/models.ts +0 -0
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_api_zones/client.ts +0 -34
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_api_zones/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_api_zones/models.ts +0 -40
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_charts/client.ts +0 -98
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_charts/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_charts/models.ts +0 -24
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_commands/client.ts +0 -55
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_commands/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_commands/models.ts +0 -80
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_config/client.ts +0 -25
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_config/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_config/models.ts +0 -412
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_overview/client.ts +0 -25
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_overview/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_overview/models.ts +0 -228
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_statistics/client.ts +0 -44
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_statistics/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_statistics/models.ts +0 -16
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_system/client.ts +0 -34
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_system/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__dashboard__dashboard_system/models.ts +0 -69
- package/src/generated/cfg_accounts/cfg_accounts__endpoints/client.ts +0 -42
- package/src/generated/cfg_accounts/cfg_accounts__endpoints/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__endpoints/models.ts +0 -112
- package/src/generated/cfg_accounts/cfg_accounts__grpc__grpc_api_keys/client.ts +0 -56
- package/src/generated/cfg_accounts/cfg_accounts__grpc__grpc_api_keys/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__grpc__grpc_api_keys/models.ts +0 -73
- package/src/generated/cfg_accounts/cfg_accounts__grpc__grpc_configuration/client.ts +0 -35
- package/src/generated/cfg_accounts/cfg_accounts__grpc__grpc_configuration/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__grpc__grpc_configuration/models.ts +0 -128
- package/src/generated/cfg_accounts/cfg_accounts__grpc__grpc_monitoring/client.ts +0 -109
- package/src/generated/cfg_accounts/cfg_accounts__grpc__grpc_monitoring/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__grpc__grpc_monitoring/models.ts +0 -213
- package/src/generated/cfg_accounts/cfg_accounts__grpc__grpc_services/client.ts +0 -56
- package/src/generated/cfg_accounts/cfg_accounts__grpc__grpc_services/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__grpc__grpc_services/models.ts +0 -189
- package/src/generated/cfg_accounts/cfg_accounts__health/client.ts +0 -30
- package/src/generated/cfg_accounts/cfg_accounts__health/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__health/models.ts +0 -36
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_jobs/client.ts +0 -76
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_jobs/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_jobs/models.ts +0 -127
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_monitoring/client.ts +0 -45
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_monitoring/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_monitoring/models.ts +0 -66
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_queues/client.ts +0 -78
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_queues/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_queues/models.ts +0 -33
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_registries/client.ts +0 -164
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_registries/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_registries/models.ts +0 -82
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_schedules/client.ts +0 -91
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_schedules/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_schedules/models.ts +0 -109
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_testing/client.ts +0 -96
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_testing/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_testing/models.ts +0 -68
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_workers/client.ts +0 -46
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_workers/index.ts +0 -2
- package/src/generated/cfg_accounts/cfg_accounts__rq__rq_workers/models.ts +0 -52
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoChannelInfo.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoChannelsResponse.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoChannelsResult.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoClientInfo.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoError.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoHealthCheck.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoHistoryResponse.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoHistoryResult.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoInfoResponse.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoInfoResult.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoMetrics.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoNodeInfo.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoOverviewStats.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoPresenceResponse.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoPresenceResult.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoProcess.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoPublication.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/CentrifugoStreamPosition.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/ChannelList.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/ChannelStats.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/ConnectionTokenResponse.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/ManualAckRequestRequest.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/ManualAckResponse.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/PaginatedPublishList.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/Publish.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/PublishTestRequestRequest.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/PublishTestResponse.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/TimelineItem.schema.ts +0 -0
- /package/src/generated/{cfg_accounts → cfg_centrifugo}/_utils/schemas/TimelineResponse.schema.ts +0 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by DjangoCFG.
|
|
5
|
+
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Zod Validation Events - Browser CustomEvent integration
|
|
11
|
+
*
|
|
12
|
+
* Dispatches browser CustomEvents when Zod validation fails, allowing
|
|
13
|
+
* React/frontend apps to listen and handle validation errors globally.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* // In your React app
|
|
18
|
+
* window.addEventListener('zod-validation-error', (event) => {
|
|
19
|
+
* const { operation, path, method, error, response } = event.detail;
|
|
20
|
+
* console.error(`Validation failed for ${method} ${path}`, error);
|
|
21
|
+
* // Show toast notification, log to Sentry, etc.
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import type { ZodError } from 'zod'
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Validation error event detail
|
|
30
|
+
*/
|
|
31
|
+
export interface ValidationErrorDetail {
|
|
32
|
+
/** Operation/function name that failed validation */
|
|
33
|
+
operation: string
|
|
34
|
+
/** API endpoint path */
|
|
35
|
+
path: string
|
|
36
|
+
/** HTTP method */
|
|
37
|
+
method: string
|
|
38
|
+
/** Zod validation error */
|
|
39
|
+
error: ZodError
|
|
40
|
+
/** Raw response data that failed validation */
|
|
41
|
+
response: any
|
|
42
|
+
/** Timestamp of the error */
|
|
43
|
+
timestamp: Date
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Custom event type for Zod validation errors
|
|
48
|
+
*/
|
|
49
|
+
export type ValidationErrorEvent = CustomEvent<ValidationErrorDetail>
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Dispatch a Zod validation error event.
|
|
53
|
+
*
|
|
54
|
+
* Only dispatches in browser environment (when window is defined).
|
|
55
|
+
* Safe to call in Node.js/SSR - will be a no-op.
|
|
56
|
+
*
|
|
57
|
+
* @param detail - Validation error details
|
|
58
|
+
*/
|
|
59
|
+
export function dispatchValidationError(detail: ValidationErrorDetail): void {
|
|
60
|
+
// Check if running in browser
|
|
61
|
+
if (typeof window === 'undefined') {
|
|
62
|
+
return
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
try {
|
|
66
|
+
const event = new CustomEvent<ValidationErrorDetail>('zod-validation-error', {
|
|
67
|
+
detail,
|
|
68
|
+
bubbles: true,
|
|
69
|
+
cancelable: false,
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
window.dispatchEvent(event)
|
|
73
|
+
} catch (error) {
|
|
74
|
+
// Silently fail - validation event dispatch should never crash the app
|
|
75
|
+
console.warn('Failed to dispatch validation error event:', error)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Add a global listener for Zod validation errors.
|
|
81
|
+
*
|
|
82
|
+
* @param callback - Function to call when validation error occurs
|
|
83
|
+
* @returns Cleanup function to remove the listener
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* const cleanup = onValidationError(({ operation, error }) => {
|
|
88
|
+
* toast.error(`Validation failed in ${operation}`);
|
|
89
|
+
* logToSentry(error);
|
|
90
|
+
* });
|
|
91
|
+
*
|
|
92
|
+
* // Later, remove listener
|
|
93
|
+
* cleanup();
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
export function onValidationError(
|
|
97
|
+
callback: (detail: ValidationErrorDetail) => void
|
|
98
|
+
): () => void {
|
|
99
|
+
if (typeof window === 'undefined') {
|
|
100
|
+
// Return no-op cleanup function for SSR
|
|
101
|
+
return () => {}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const handler = (event: Event) => {
|
|
105
|
+
if (event instanceof CustomEvent) {
|
|
106
|
+
callback(event.detail)
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
window.addEventListener('zod-validation-error', handler)
|
|
111
|
+
|
|
112
|
+
// Return cleanup function
|
|
113
|
+
return () => {
|
|
114
|
+
window.removeEventListener('zod-validation-error', handler)
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Format Zod error for logging/display.
|
|
120
|
+
*
|
|
121
|
+
* @param error - Zod validation error
|
|
122
|
+
* @returns Formatted error message
|
|
123
|
+
*/
|
|
124
|
+
export function formatZodError(error: ZodError): string {
|
|
125
|
+
const issues = error.issues.map((issue, index) => {
|
|
126
|
+
const path = issue.path.join('.') || 'root'
|
|
127
|
+
const parts = [`${index + 1}. ${path}: ${issue.message}`]
|
|
128
|
+
|
|
129
|
+
if ('expected' in issue && issue.expected) {
|
|
130
|
+
parts.push(` Expected: ${issue.expected}`)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if ('received' in issue && issue.received) {
|
|
134
|
+
parts.push(` Received: ${issue.received}`)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return parts.join('\n')
|
|
138
|
+
})
|
|
139
|
+
|
|
140
|
+
return issues.join('\n')
|
|
141
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as Models from "./models";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* API endpoints for Web Push.
|
|
6
|
+
*/
|
|
7
|
+
export class WebPush {
|
|
8
|
+
private client: any;
|
|
9
|
+
|
|
10
|
+
constructor(client: any) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Send push notification
|
|
16
|
+
*
|
|
17
|
+
* Send push notification to all active subscriptions for the authenticated
|
|
18
|
+
* user.
|
|
19
|
+
*/
|
|
20
|
+
async webpushSendCreate(data: Models.SendPushRequestRequest): Promise<Models.SendPushResponse> {
|
|
21
|
+
const response = await this.client.request('POST', "/cfg/webpush/send/", { body: data });
|
|
22
|
+
return response;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Subscribe to push notifications
|
|
27
|
+
*
|
|
28
|
+
* Save push subscription from browser for the authenticated user.
|
|
29
|
+
*/
|
|
30
|
+
async webpushSubscribeCreate(data: Models.SubscribeRequestRequest): Promise<Models.SubscribeResponse> {
|
|
31
|
+
const response = await this.client.request('POST', "/cfg/webpush/subscribe/", { body: data });
|
|
32
|
+
return response;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get VAPID public key
|
|
37
|
+
*
|
|
38
|
+
* Get VAPID public key for client subscription.
|
|
39
|
+
*/
|
|
40
|
+
async webpushVapidRetrieve(): Promise<Models.VapidPublicKeyResponse> {
|
|
41
|
+
const response = await this.client.request('GET', "/cfg/webpush/vapid/");
|
|
42
|
+
return response;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by DjangoCFG.
|
|
5
|
+
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
+
*/
|
|
9
|
+
export * from "./client";
|
|
10
|
+
export * as Models from "./models";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by DjangoCFG.
|
|
5
|
+
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Request serializer for sending push notifications.
|
|
11
|
+
*
|
|
12
|
+
* Request model (no read-only fields).
|
|
13
|
+
*/
|
|
14
|
+
export interface SendPushRequestRequest {
|
|
15
|
+
/** Notification title */
|
|
16
|
+
title: string;
|
|
17
|
+
/** Notification body */
|
|
18
|
+
body: string;
|
|
19
|
+
/** Notification icon URL */
|
|
20
|
+
icon?: string | null;
|
|
21
|
+
/** URL to open on click */
|
|
22
|
+
url?: string | null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Response serializer for send push endpoint.
|
|
27
|
+
*
|
|
28
|
+
* Response model (includes read-only fields).
|
|
29
|
+
*/
|
|
30
|
+
export interface SendPushResponse {
|
|
31
|
+
/** Whether send was successful */
|
|
32
|
+
success: boolean;
|
|
33
|
+
/** Number of devices notification was sent to */
|
|
34
|
+
sent_to: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Request serializer for subscribing to push notifications.
|
|
39
|
+
*
|
|
40
|
+
* Request model (no read-only fields).
|
|
41
|
+
*/
|
|
42
|
+
export interface SubscribeRequestRequest {
|
|
43
|
+
/** Push service endpoint URL from browser */
|
|
44
|
+
endpoint: string;
|
|
45
|
+
/** Encryption keys (p256dh and auth) */
|
|
46
|
+
keys: Record<string, any>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Response serializer for subscription endpoint.
|
|
51
|
+
*
|
|
52
|
+
* Response model (includes read-only fields).
|
|
53
|
+
*/
|
|
54
|
+
export interface SubscribeResponse {
|
|
55
|
+
/** Whether subscription was successful */
|
|
56
|
+
success: boolean;
|
|
57
|
+
/** ID of the subscription */
|
|
58
|
+
subscription_id: number;
|
|
59
|
+
/** Whether subscription was newly created */
|
|
60
|
+
created: boolean;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Response serializer for VAPID public key endpoint.
|
|
65
|
+
*
|
|
66
|
+
* Response model (includes read-only fields).
|
|
67
|
+
*/
|
|
68
|
+
export interface VapidPublicKeyResponse {
|
|
69
|
+
/** VAPID public key for client subscription */
|
|
70
|
+
publicKey: string;
|
|
71
|
+
}
|
|
72
|
+
|
package/src/hooks/index.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @djangocfg/api hooks
|
|
3
|
+
*
|
|
4
|
+
* Re-exports SWR hooks from generated API clients.
|
|
5
|
+
* Provides type-safe React hooks for data fetching.
|
|
6
|
+
*/
|
|
7
|
+
'use client';
|
|
8
|
+
|
|
9
|
+
// Export all hooks from cfg_accounts (includes all django-cfg apps)
|
|
10
|
+
export * from './accounts';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @djangocfg/api - Web Push hooks
|
|
3
|
+
*
|
|
4
|
+
* Push notifications subscription and management hooks.
|
|
5
|
+
* Note: cfg_webpush contains the same hooks as cfg_accounts.
|
|
6
|
+
* Keep this file for future webpush-specific hooks.
|
|
7
|
+
*/
|
|
8
|
+
'use client';
|
|
9
|
+
|
|
10
|
+
// Currently cfg_webpush doesn't have webpush-specific endpoints
|
|
11
|
+
// All hooks are re-exported from accounts.ts to avoid duplicates
|
|
12
|
+
// export * from '../generated/cfg_webpush/_utils/hooks';
|
package/src/index.ts
CHANGED
|
@@ -20,6 +20,17 @@ export { Schemas, Fetchers, Enums } from './generated/cfg_accounts';
|
|
|
20
20
|
// ============================================================================
|
|
21
21
|
export * as CfgAccountsTypes from './generated/cfg_accounts';
|
|
22
22
|
|
|
23
|
+
// ============================================================================
|
|
24
|
+
// Centrifugo Fetchers (for WebSocket token refresh)
|
|
25
|
+
// ============================================================================
|
|
26
|
+
export { getCentrifugoAuthTokenRetrieve } from './generated/cfg_centrifugo';
|
|
27
|
+
|
|
28
|
+
// ============================================================================
|
|
29
|
+
// WebPush API (for push notifications)
|
|
30
|
+
// ============================================================================
|
|
31
|
+
export { API as WebPushAPI } from './generated/cfg_webpush';
|
|
32
|
+
export * as WebPushTypes from './generated/cfg_webpush';
|
|
33
|
+
|
|
23
34
|
/**
|
|
24
35
|
* Base Client for all API services
|
|
25
36
|
*
|
package/src/server.ts
CHANGED
|
@@ -17,17 +17,14 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
// Export API class and storage adapters
|
|
20
|
-
export { API, MemoryStorageAdapter } from './
|
|
21
|
-
|
|
22
|
-
// Export api instance from BaseClient
|
|
23
|
-
export { api } from './BaseClient';
|
|
20
|
+
export { API, MemoryStorageAdapter } from './generated/cfg_accounts';
|
|
24
21
|
|
|
25
22
|
// Export only fetchers (no hooks, no React dependencies)
|
|
26
|
-
export * as Fetchers from './
|
|
23
|
+
export * as Fetchers from './generated/cfg_accounts/_utils/fetchers';
|
|
27
24
|
|
|
28
25
|
// Export types and schemas (server-safe)
|
|
29
|
-
export * as Schemas from './
|
|
30
|
-
export * as Enums from './
|
|
26
|
+
export * as Schemas from './generated/cfg_accounts/_utils/schemas';
|
|
27
|
+
export * as Enums from './generated/cfg_accounts/enums';
|
|
31
28
|
|
|
32
29
|
// Re-export types
|
|
33
|
-
export type { API as APIType } from './
|
|
30
|
+
export type { API as APIType } from './generated/cfg_accounts';
|
package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_activity.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Typed fetchers for Dashboard - Activity
|
|
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 { consola } from 'consola'
|
|
33
|
-
import { getAPIInstance } from '../../api-instance'
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Get quick actions
|
|
37
|
-
*
|
|
38
|
-
* @method GET
|
|
39
|
-
* @path /cfg/dashboard/api/activity/actions/
|
|
40
|
-
*/
|
|
41
|
-
export async function getDashboardApiActivityActionsList( client?: any
|
|
42
|
-
): Promise<any> {
|
|
43
|
-
const api = client || getAPIInstance()
|
|
44
|
-
const response = await api.cfg_accounts_dashboard_activity.dashboardApiActivityActionsList()
|
|
45
|
-
return response
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Get recent activity
|
|
51
|
-
*
|
|
52
|
-
* @method GET
|
|
53
|
-
* @path /cfg/dashboard/api/activity/recent/
|
|
54
|
-
*/
|
|
55
|
-
export async function getDashboardApiActivityRecentList( params?: { limit?: number }, client?: any
|
|
56
|
-
): Promise<any> {
|
|
57
|
-
const api = client || getAPIInstance()
|
|
58
|
-
const response = await api.cfg_accounts_dashboard_activity.dashboardApiActivityRecentList(params?.limit)
|
|
59
|
-
return response
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_api_zones.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Typed fetchers for Dashboard - API Zones
|
|
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 { consola } from 'consola'
|
|
33
|
-
import { APIZonesSummarySchema, type APIZonesSummary } from '../schemas/APIZonesSummary.schema'
|
|
34
|
-
import { getAPIInstance } from '../../api-instance'
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Get all API zones
|
|
38
|
-
*
|
|
39
|
-
* @method GET
|
|
40
|
-
* @path /cfg/dashboard/api/zones/
|
|
41
|
-
*/
|
|
42
|
-
export async function getDashboardApiZonesList( client?: any
|
|
43
|
-
): Promise<any> {
|
|
44
|
-
const api = client || getAPIInstance()
|
|
45
|
-
const response = await api.cfg_accounts_dashboard_api_zones.list()
|
|
46
|
-
return response
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Get zones summary
|
|
52
|
-
*
|
|
53
|
-
* @method GET
|
|
54
|
-
* @path /cfg/dashboard/api/zones/summary/
|
|
55
|
-
*/
|
|
56
|
-
export async function getDashboardApiZonesSummaryRetrieve( client?: any
|
|
57
|
-
): Promise<APIZonesSummary> {
|
|
58
|
-
const api = client || getAPIInstance()
|
|
59
|
-
const response = await api.cfg_accounts_dashboard_api_zones.summaryRetrieve()
|
|
60
|
-
try {
|
|
61
|
-
return APIZonesSummarySchema.parse(response)
|
|
62
|
-
} catch (error) {
|
|
63
|
-
// Zod validation error - log detailed information
|
|
64
|
-
consola.error('❌ Zod Validation Failed');
|
|
65
|
-
consola.box(`getDashboardApiZonesSummaryRetrieve\nPath: /cfg/dashboard/api/zones/summary/\nMethod: GET`);
|
|
66
|
-
|
|
67
|
-
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
68
|
-
consola.error('Validation Issues:');
|
|
69
|
-
(error as any).issues.forEach((issue: any, index: number) => {
|
|
70
|
-
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
71
|
-
consola.error(` ├─ Message: ${issue.message}`);
|
|
72
|
-
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
73
|
-
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
consola.error('Response data:', response);
|
|
78
|
-
|
|
79
|
-
// Dispatch browser CustomEvent (only if window is defined)
|
|
80
|
-
if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
|
|
81
|
-
try {
|
|
82
|
-
const event = new CustomEvent('zod-validation-error', {
|
|
83
|
-
detail: {
|
|
84
|
-
operation: 'getDashboardApiZonesSummaryRetrieve',
|
|
85
|
-
path: '/cfg/dashboard/api/zones/summary/',
|
|
86
|
-
method: 'GET',
|
|
87
|
-
error: error,
|
|
88
|
-
response: response,
|
|
89
|
-
timestamp: new Date(),
|
|
90
|
-
},
|
|
91
|
-
bubbles: true,
|
|
92
|
-
cancelable: false,
|
|
93
|
-
});
|
|
94
|
-
window.dispatchEvent(event);
|
|
95
|
-
} catch (eventError) {
|
|
96
|
-
// Silently fail - event dispatch should never crash the app
|
|
97
|
-
consola.warn('Failed to dispatch validation error event:', eventError);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// Re-throw the error
|
|
102
|
-
throw error;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
package/src/generated/cfg_accounts/_utils/fetchers/cfg_accounts__dashboard__dashboard_charts.ts
DELETED
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Typed fetchers for Dashboard - 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 { consola } from 'consola'
|
|
33
|
-
import { ChartDataSchema, type ChartData } from '../schemas/ChartData.schema'
|
|
34
|
-
import { getAPIInstance } from '../../api-instance'
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Get user activity chart
|
|
38
|
-
*
|
|
39
|
-
* @method GET
|
|
40
|
-
* @path /cfg/dashboard/api/charts/activity/
|
|
41
|
-
*/
|
|
42
|
-
export async function getDashboardApiChartsActivityRetrieve( params?: { days?: number }, client?: any
|
|
43
|
-
): Promise<ChartData> {
|
|
44
|
-
const api = client || getAPIInstance()
|
|
45
|
-
const response = await api.cfg_accounts_dashboard_charts.dashboardApiChartsActivityRetrieve(params?.days)
|
|
46
|
-
try {
|
|
47
|
-
return ChartDataSchema.parse(response)
|
|
48
|
-
} catch (error) {
|
|
49
|
-
// Zod validation error - log detailed information
|
|
50
|
-
consola.error('❌ Zod Validation Failed');
|
|
51
|
-
consola.box(`getDashboardApiChartsActivityRetrieve\nPath: /cfg/dashboard/api/charts/activity/\nMethod: GET`);
|
|
52
|
-
|
|
53
|
-
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
54
|
-
consola.error('Validation Issues:');
|
|
55
|
-
(error as any).issues.forEach((issue: any, index: number) => {
|
|
56
|
-
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
57
|
-
consola.error(` ├─ Message: ${issue.message}`);
|
|
58
|
-
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
59
|
-
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
consola.error('Response data:', response);
|
|
64
|
-
|
|
65
|
-
// Dispatch browser CustomEvent (only if window is defined)
|
|
66
|
-
if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
|
|
67
|
-
try {
|
|
68
|
-
const event = new CustomEvent('zod-validation-error', {
|
|
69
|
-
detail: {
|
|
70
|
-
operation: 'getDashboardApiChartsActivityRetrieve',
|
|
71
|
-
path: '/cfg/dashboard/api/charts/activity/',
|
|
72
|
-
method: 'GET',
|
|
73
|
-
error: error,
|
|
74
|
-
response: response,
|
|
75
|
-
timestamp: new Date(),
|
|
76
|
-
},
|
|
77
|
-
bubbles: true,
|
|
78
|
-
cancelable: false,
|
|
79
|
-
});
|
|
80
|
-
window.dispatchEvent(event);
|
|
81
|
-
} catch (eventError) {
|
|
82
|
-
// Silently fail - event dispatch should never crash the app
|
|
83
|
-
consola.warn('Failed to dispatch validation error event:', eventError);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// Re-throw the error
|
|
88
|
-
throw error;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Get recent users
|
|
95
|
-
*
|
|
96
|
-
* @method GET
|
|
97
|
-
* @path /cfg/dashboard/api/charts/recent-users/
|
|
98
|
-
*/
|
|
99
|
-
export async function getDashboardApiChartsRecentUsersList( params?: { limit?: number }, client?: any
|
|
100
|
-
): Promise<any> {
|
|
101
|
-
const api = client || getAPIInstance()
|
|
102
|
-
const response = await api.cfg_accounts_dashboard_charts.dashboardApiChartsRecentUsersList(params?.limit)
|
|
103
|
-
return response
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Get user registration chart
|
|
109
|
-
*
|
|
110
|
-
* @method GET
|
|
111
|
-
* @path /cfg/dashboard/api/charts/registrations/
|
|
112
|
-
*/
|
|
113
|
-
export async function getDashboardApiChartsRegistrationsRetrieve( params?: { days?: number }, client?: any
|
|
114
|
-
): Promise<ChartData> {
|
|
115
|
-
const api = client || getAPIInstance()
|
|
116
|
-
const response = await api.cfg_accounts_dashboard_charts.dashboardApiChartsRegistrationsRetrieve(params?.days)
|
|
117
|
-
try {
|
|
118
|
-
return ChartDataSchema.parse(response)
|
|
119
|
-
} catch (error) {
|
|
120
|
-
// Zod validation error - log detailed information
|
|
121
|
-
consola.error('❌ Zod Validation Failed');
|
|
122
|
-
consola.box(`getDashboardApiChartsRegistrationsRetrieve\nPath: /cfg/dashboard/api/charts/registrations/\nMethod: GET`);
|
|
123
|
-
|
|
124
|
-
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
125
|
-
consola.error('Validation Issues:');
|
|
126
|
-
(error as any).issues.forEach((issue: any, index: number) => {
|
|
127
|
-
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
128
|
-
consola.error(` ├─ Message: ${issue.message}`);
|
|
129
|
-
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
130
|
-
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
consola.error('Response data:', response);
|
|
135
|
-
|
|
136
|
-
// Dispatch browser CustomEvent (only if window is defined)
|
|
137
|
-
if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
|
|
138
|
-
try {
|
|
139
|
-
const event = new CustomEvent('zod-validation-error', {
|
|
140
|
-
detail: {
|
|
141
|
-
operation: 'getDashboardApiChartsRegistrationsRetrieve',
|
|
142
|
-
path: '/cfg/dashboard/api/charts/registrations/',
|
|
143
|
-
method: 'GET',
|
|
144
|
-
error: error,
|
|
145
|
-
response: response,
|
|
146
|
-
timestamp: new Date(),
|
|
147
|
-
},
|
|
148
|
-
bubbles: true,
|
|
149
|
-
cancelable: false,
|
|
150
|
-
});
|
|
151
|
-
window.dispatchEvent(event);
|
|
152
|
-
} catch (eventError) {
|
|
153
|
-
// Silently fail - event dispatch should never crash the app
|
|
154
|
-
consola.warn('Failed to dispatch validation error event:', eventError);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
// Re-throw the error
|
|
159
|
-
throw error;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Get activity tracker
|
|
166
|
-
*
|
|
167
|
-
* @method GET
|
|
168
|
-
* @path /cfg/dashboard/api/charts/tracker/
|
|
169
|
-
*/
|
|
170
|
-
export async function getDashboardApiChartsTrackerList( params?: { weeks?: number }, client?: any
|
|
171
|
-
): Promise<any> {
|
|
172
|
-
const api = client || getAPIInstance()
|
|
173
|
-
const response = await api.cfg_accounts_dashboard_charts.dashboardApiChartsTrackerList(params?.weeks)
|
|
174
|
-
return response
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|