@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
|
@@ -1,436 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Typed fetchers for RQ Registries
|
|
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 { JobActionResponseSchema, type JobActionResponse } from '../schemas/JobActionResponse.schema'
|
|
34
|
-
import { JobListRequestSchema, type JobListRequest } from '../schemas/JobListRequest.schema'
|
|
35
|
-
import { PaginatedJobListListSchema, type PaginatedJobListList } from '../schemas/PaginatedJobListList.schema'
|
|
36
|
-
import { getAPIInstance } from '../../api-instance'
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* List deferred jobs
|
|
40
|
-
*
|
|
41
|
-
* @method GET
|
|
42
|
-
* @path /cfg/rq/jobs/registries/deferred/
|
|
43
|
-
*/
|
|
44
|
-
export async function getRqJobsRegistriesDeferredList( params?: { page?: number; page_size?: number; queue?: string }, client?: any
|
|
45
|
-
): Promise<PaginatedJobListList> {
|
|
46
|
-
const api = client || getAPIInstance()
|
|
47
|
-
const response = await api.cfg_accounts_rq_registries.rqJobsRegistriesDeferredList(params?.page, params?.page_size, params?.queue)
|
|
48
|
-
try {
|
|
49
|
-
return PaginatedJobListListSchema.parse(response)
|
|
50
|
-
} catch (error) {
|
|
51
|
-
// Zod validation error - log detailed information
|
|
52
|
-
consola.error('❌ Zod Validation Failed');
|
|
53
|
-
consola.box(`getRqJobsRegistriesDeferredList\nPath: /cfg/rq/jobs/registries/deferred/\nMethod: GET`);
|
|
54
|
-
|
|
55
|
-
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
56
|
-
consola.error('Validation Issues:');
|
|
57
|
-
(error as any).issues.forEach((issue: any, index: number) => {
|
|
58
|
-
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
59
|
-
consola.error(` ├─ Message: ${issue.message}`);
|
|
60
|
-
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
61
|
-
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
consola.error('Response data:', response);
|
|
66
|
-
|
|
67
|
-
// Dispatch browser CustomEvent (only if window is defined)
|
|
68
|
-
if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
|
|
69
|
-
try {
|
|
70
|
-
const event = new CustomEvent('zod-validation-error', {
|
|
71
|
-
detail: {
|
|
72
|
-
operation: 'getRqJobsRegistriesDeferredList',
|
|
73
|
-
path: '/cfg/rq/jobs/registries/deferred/',
|
|
74
|
-
method: 'GET',
|
|
75
|
-
error: error,
|
|
76
|
-
response: response,
|
|
77
|
-
timestamp: new Date(),
|
|
78
|
-
},
|
|
79
|
-
bubbles: true,
|
|
80
|
-
cancelable: false,
|
|
81
|
-
});
|
|
82
|
-
window.dispatchEvent(event);
|
|
83
|
-
} catch (eventError) {
|
|
84
|
-
// Silently fail - event dispatch should never crash the app
|
|
85
|
-
consola.warn('Failed to dispatch validation error event:', eventError);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Re-throw the error
|
|
90
|
-
throw error;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* List failed jobs
|
|
97
|
-
*
|
|
98
|
-
* @method GET
|
|
99
|
-
* @path /cfg/rq/jobs/registries/failed/
|
|
100
|
-
*/
|
|
101
|
-
export async function getRqJobsRegistriesFailedList( params?: { page?: number; page_size?: number; queue?: string }, client?: any
|
|
102
|
-
): Promise<PaginatedJobListList> {
|
|
103
|
-
const api = client || getAPIInstance()
|
|
104
|
-
const response = await api.cfg_accounts_rq_registries.rqJobsRegistriesFailedList(params?.page, params?.page_size, params?.queue)
|
|
105
|
-
try {
|
|
106
|
-
return PaginatedJobListListSchema.parse(response)
|
|
107
|
-
} catch (error) {
|
|
108
|
-
// Zod validation error - log detailed information
|
|
109
|
-
consola.error('❌ Zod Validation Failed');
|
|
110
|
-
consola.box(`getRqJobsRegistriesFailedList\nPath: /cfg/rq/jobs/registries/failed/\nMethod: GET`);
|
|
111
|
-
|
|
112
|
-
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
113
|
-
consola.error('Validation Issues:');
|
|
114
|
-
(error as any).issues.forEach((issue: any, index: number) => {
|
|
115
|
-
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
116
|
-
consola.error(` ├─ Message: ${issue.message}`);
|
|
117
|
-
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
118
|
-
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
consola.error('Response data:', response);
|
|
123
|
-
|
|
124
|
-
// Dispatch browser CustomEvent (only if window is defined)
|
|
125
|
-
if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
|
|
126
|
-
try {
|
|
127
|
-
const event = new CustomEvent('zod-validation-error', {
|
|
128
|
-
detail: {
|
|
129
|
-
operation: 'getRqJobsRegistriesFailedList',
|
|
130
|
-
path: '/cfg/rq/jobs/registries/failed/',
|
|
131
|
-
method: 'GET',
|
|
132
|
-
error: error,
|
|
133
|
-
response: response,
|
|
134
|
-
timestamp: new Date(),
|
|
135
|
-
},
|
|
136
|
-
bubbles: true,
|
|
137
|
-
cancelable: false,
|
|
138
|
-
});
|
|
139
|
-
window.dispatchEvent(event);
|
|
140
|
-
} catch (eventError) {
|
|
141
|
-
// Silently fail - event dispatch should never crash the app
|
|
142
|
-
consola.warn('Failed to dispatch validation error event:', eventError);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// Re-throw the error
|
|
147
|
-
throw error;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Clear failed jobs registry
|
|
154
|
-
*
|
|
155
|
-
* @method POST
|
|
156
|
-
* @path /cfg/rq/jobs/registries/failed/clear/
|
|
157
|
-
*/
|
|
158
|
-
export async function createRqJobsRegistriesFailedClearCreate( data: JobListRequest, params: { queue: string }, client?: any
|
|
159
|
-
): Promise<JobActionResponse> {
|
|
160
|
-
const api = client || getAPIInstance()
|
|
161
|
-
const response = await api.cfg_accounts_rq_registries.rqJobsRegistriesFailedClearCreate(data, params.queue)
|
|
162
|
-
try {
|
|
163
|
-
return JobActionResponseSchema.parse(response)
|
|
164
|
-
} catch (error) {
|
|
165
|
-
// Zod validation error - log detailed information
|
|
166
|
-
consola.error('❌ Zod Validation Failed');
|
|
167
|
-
consola.box(`createRqJobsRegistriesFailedClearCreate\nPath: /cfg/rq/jobs/registries/failed/clear/\nMethod: POST`);
|
|
168
|
-
|
|
169
|
-
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
170
|
-
consola.error('Validation Issues:');
|
|
171
|
-
(error as any).issues.forEach((issue: any, index: number) => {
|
|
172
|
-
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
173
|
-
consola.error(` ├─ Message: ${issue.message}`);
|
|
174
|
-
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
175
|
-
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
consola.error('Response data:', response);
|
|
180
|
-
|
|
181
|
-
// Dispatch browser CustomEvent (only if window is defined)
|
|
182
|
-
if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
|
|
183
|
-
try {
|
|
184
|
-
const event = new CustomEvent('zod-validation-error', {
|
|
185
|
-
detail: {
|
|
186
|
-
operation: 'createRqJobsRegistriesFailedClearCreate',
|
|
187
|
-
path: '/cfg/rq/jobs/registries/failed/clear/',
|
|
188
|
-
method: 'POST',
|
|
189
|
-
error: error,
|
|
190
|
-
response: response,
|
|
191
|
-
timestamp: new Date(),
|
|
192
|
-
},
|
|
193
|
-
bubbles: true,
|
|
194
|
-
cancelable: false,
|
|
195
|
-
});
|
|
196
|
-
window.dispatchEvent(event);
|
|
197
|
-
} catch (eventError) {
|
|
198
|
-
// Silently fail - event dispatch should never crash the app
|
|
199
|
-
consola.warn('Failed to dispatch validation error event:', eventError);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// Re-throw the error
|
|
204
|
-
throw error;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Requeue all failed jobs
|
|
211
|
-
*
|
|
212
|
-
* @method POST
|
|
213
|
-
* @path /cfg/rq/jobs/registries/failed/requeue-all/
|
|
214
|
-
*/
|
|
215
|
-
export async function createRqJobsRegistriesFailedRequeueAllCreate( data: JobListRequest, params: { queue: string }, client?: any
|
|
216
|
-
): Promise<JobActionResponse> {
|
|
217
|
-
const api = client || getAPIInstance()
|
|
218
|
-
const response = await api.cfg_accounts_rq_registries.rqJobsRegistriesFailedRequeueAllCreate(data, params.queue)
|
|
219
|
-
try {
|
|
220
|
-
return JobActionResponseSchema.parse(response)
|
|
221
|
-
} catch (error) {
|
|
222
|
-
// Zod validation error - log detailed information
|
|
223
|
-
consola.error('❌ Zod Validation Failed');
|
|
224
|
-
consola.box(`createRqJobsRegistriesFailedRequeueAllCreate\nPath: /cfg/rq/jobs/registries/failed/requeue-all/\nMethod: POST`);
|
|
225
|
-
|
|
226
|
-
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
227
|
-
consola.error('Validation Issues:');
|
|
228
|
-
(error as any).issues.forEach((issue: any, index: number) => {
|
|
229
|
-
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
230
|
-
consola.error(` ├─ Message: ${issue.message}`);
|
|
231
|
-
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
232
|
-
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
consola.error('Response data:', response);
|
|
237
|
-
|
|
238
|
-
// Dispatch browser CustomEvent (only if window is defined)
|
|
239
|
-
if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
|
|
240
|
-
try {
|
|
241
|
-
const event = new CustomEvent('zod-validation-error', {
|
|
242
|
-
detail: {
|
|
243
|
-
operation: 'createRqJobsRegistriesFailedRequeueAllCreate',
|
|
244
|
-
path: '/cfg/rq/jobs/registries/failed/requeue-all/',
|
|
245
|
-
method: 'POST',
|
|
246
|
-
error: error,
|
|
247
|
-
response: response,
|
|
248
|
-
timestamp: new Date(),
|
|
249
|
-
},
|
|
250
|
-
bubbles: true,
|
|
251
|
-
cancelable: false,
|
|
252
|
-
});
|
|
253
|
-
window.dispatchEvent(event);
|
|
254
|
-
} catch (eventError) {
|
|
255
|
-
// Silently fail - event dispatch should never crash the app
|
|
256
|
-
consola.warn('Failed to dispatch validation error event:', eventError);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
// Re-throw the error
|
|
261
|
-
throw error;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* List finished jobs
|
|
268
|
-
*
|
|
269
|
-
* @method GET
|
|
270
|
-
* @path /cfg/rq/jobs/registries/finished/
|
|
271
|
-
*/
|
|
272
|
-
export async function getRqJobsRegistriesFinishedList( params?: { page?: number; page_size?: number; queue?: string }, client?: any
|
|
273
|
-
): Promise<PaginatedJobListList> {
|
|
274
|
-
const api = client || getAPIInstance()
|
|
275
|
-
const response = await api.cfg_accounts_rq_registries.rqJobsRegistriesFinishedList(params?.page, params?.page_size, params?.queue)
|
|
276
|
-
try {
|
|
277
|
-
return PaginatedJobListListSchema.parse(response)
|
|
278
|
-
} catch (error) {
|
|
279
|
-
// Zod validation error - log detailed information
|
|
280
|
-
consola.error('❌ Zod Validation Failed');
|
|
281
|
-
consola.box(`getRqJobsRegistriesFinishedList\nPath: /cfg/rq/jobs/registries/finished/\nMethod: GET`);
|
|
282
|
-
|
|
283
|
-
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
284
|
-
consola.error('Validation Issues:');
|
|
285
|
-
(error as any).issues.forEach((issue: any, index: number) => {
|
|
286
|
-
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
287
|
-
consola.error(` ├─ Message: ${issue.message}`);
|
|
288
|
-
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
289
|
-
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
consola.error('Response data:', response);
|
|
294
|
-
|
|
295
|
-
// Dispatch browser CustomEvent (only if window is defined)
|
|
296
|
-
if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
|
|
297
|
-
try {
|
|
298
|
-
const event = new CustomEvent('zod-validation-error', {
|
|
299
|
-
detail: {
|
|
300
|
-
operation: 'getRqJobsRegistriesFinishedList',
|
|
301
|
-
path: '/cfg/rq/jobs/registries/finished/',
|
|
302
|
-
method: 'GET',
|
|
303
|
-
error: error,
|
|
304
|
-
response: response,
|
|
305
|
-
timestamp: new Date(),
|
|
306
|
-
},
|
|
307
|
-
bubbles: true,
|
|
308
|
-
cancelable: false,
|
|
309
|
-
});
|
|
310
|
-
window.dispatchEvent(event);
|
|
311
|
-
} catch (eventError) {
|
|
312
|
-
// Silently fail - event dispatch should never crash the app
|
|
313
|
-
consola.warn('Failed to dispatch validation error event:', eventError);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
// Re-throw the error
|
|
318
|
-
throw error;
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* Clear finished jobs registry
|
|
325
|
-
*
|
|
326
|
-
* @method POST
|
|
327
|
-
* @path /cfg/rq/jobs/registries/finished/clear/
|
|
328
|
-
*/
|
|
329
|
-
export async function createRqJobsRegistriesFinishedClearCreate( data: JobListRequest, params: { queue: string }, client?: any
|
|
330
|
-
): Promise<JobActionResponse> {
|
|
331
|
-
const api = client || getAPIInstance()
|
|
332
|
-
const response = await api.cfg_accounts_rq_registries.rqJobsRegistriesFinishedClearCreate(data, params.queue)
|
|
333
|
-
try {
|
|
334
|
-
return JobActionResponseSchema.parse(response)
|
|
335
|
-
} catch (error) {
|
|
336
|
-
// Zod validation error - log detailed information
|
|
337
|
-
consola.error('❌ Zod Validation Failed');
|
|
338
|
-
consola.box(`createRqJobsRegistriesFinishedClearCreate\nPath: /cfg/rq/jobs/registries/finished/clear/\nMethod: POST`);
|
|
339
|
-
|
|
340
|
-
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
341
|
-
consola.error('Validation Issues:');
|
|
342
|
-
(error as any).issues.forEach((issue: any, index: number) => {
|
|
343
|
-
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
344
|
-
consola.error(` ├─ Message: ${issue.message}`);
|
|
345
|
-
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
346
|
-
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
consola.error('Response data:', response);
|
|
351
|
-
|
|
352
|
-
// Dispatch browser CustomEvent (only if window is defined)
|
|
353
|
-
if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
|
|
354
|
-
try {
|
|
355
|
-
const event = new CustomEvent('zod-validation-error', {
|
|
356
|
-
detail: {
|
|
357
|
-
operation: 'createRqJobsRegistriesFinishedClearCreate',
|
|
358
|
-
path: '/cfg/rq/jobs/registries/finished/clear/',
|
|
359
|
-
method: 'POST',
|
|
360
|
-
error: error,
|
|
361
|
-
response: response,
|
|
362
|
-
timestamp: new Date(),
|
|
363
|
-
},
|
|
364
|
-
bubbles: true,
|
|
365
|
-
cancelable: false,
|
|
366
|
-
});
|
|
367
|
-
window.dispatchEvent(event);
|
|
368
|
-
} catch (eventError) {
|
|
369
|
-
// Silently fail - event dispatch should never crash the app
|
|
370
|
-
consola.warn('Failed to dispatch validation error event:', eventError);
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
// Re-throw the error
|
|
375
|
-
throw error;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* List started jobs
|
|
382
|
-
*
|
|
383
|
-
* @method GET
|
|
384
|
-
* @path /cfg/rq/jobs/registries/started/
|
|
385
|
-
*/
|
|
386
|
-
export async function getRqJobsRegistriesStartedList( params?: { page?: number; page_size?: number; queue?: string }, client?: any
|
|
387
|
-
): Promise<PaginatedJobListList> {
|
|
388
|
-
const api = client || getAPIInstance()
|
|
389
|
-
const response = await api.cfg_accounts_rq_registries.rqJobsRegistriesStartedList(params?.page, params?.page_size, params?.queue)
|
|
390
|
-
try {
|
|
391
|
-
return PaginatedJobListListSchema.parse(response)
|
|
392
|
-
} catch (error) {
|
|
393
|
-
// Zod validation error - log detailed information
|
|
394
|
-
consola.error('❌ Zod Validation Failed');
|
|
395
|
-
consola.box(`getRqJobsRegistriesStartedList\nPath: /cfg/rq/jobs/registries/started/\nMethod: GET`);
|
|
396
|
-
|
|
397
|
-
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
398
|
-
consola.error('Validation Issues:');
|
|
399
|
-
(error as any).issues.forEach((issue: any, index: number) => {
|
|
400
|
-
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
401
|
-
consola.error(` ├─ Message: ${issue.message}`);
|
|
402
|
-
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
403
|
-
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
404
|
-
});
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
consola.error('Response data:', response);
|
|
408
|
-
|
|
409
|
-
// Dispatch browser CustomEvent (only if window is defined)
|
|
410
|
-
if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
|
|
411
|
-
try {
|
|
412
|
-
const event = new CustomEvent('zod-validation-error', {
|
|
413
|
-
detail: {
|
|
414
|
-
operation: 'getRqJobsRegistriesStartedList',
|
|
415
|
-
path: '/cfg/rq/jobs/registries/started/',
|
|
416
|
-
method: 'GET',
|
|
417
|
-
error: error,
|
|
418
|
-
response: response,
|
|
419
|
-
timestamp: new Date(),
|
|
420
|
-
},
|
|
421
|
-
bubbles: true,
|
|
422
|
-
cancelable: false,
|
|
423
|
-
});
|
|
424
|
-
window.dispatchEvent(event);
|
|
425
|
-
} catch (eventError) {
|
|
426
|
-
// Silently fail - event dispatch should never crash the app
|
|
427
|
-
consola.warn('Failed to dispatch validation error event:', eventError);
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
// Re-throw the error
|
|
432
|
-
throw error;
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
|
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Typed fetchers for RQ Schedules
|
|
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 { PaginatedScheduledJobListSchema, type PaginatedScheduledJobList } from '../schemas/PaginatedScheduledJobList.schema'
|
|
34
|
-
import { ScheduleActionResponseSchema, type ScheduleActionResponse } from '../schemas/ScheduleActionResponse.schema'
|
|
35
|
-
import { ScheduleCreateRequestSchema, type ScheduleCreateRequest } from '../schemas/ScheduleCreateRequest.schema'
|
|
36
|
-
import { ScheduledJobSchema, type ScheduledJob } from '../schemas/ScheduledJob.schema'
|
|
37
|
-
import { getAPIInstance } from '../../api-instance'
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* List scheduled jobs
|
|
41
|
-
*
|
|
42
|
-
* @method GET
|
|
43
|
-
* @path /cfg/rq/schedules/
|
|
44
|
-
*/
|
|
45
|
-
export async function getRqSchedulesList( params?: { page?: number; page_size?: number; queue?: string }, client?: any
|
|
46
|
-
): Promise<PaginatedScheduledJobList> {
|
|
47
|
-
const api = client || getAPIInstance()
|
|
48
|
-
const response = await api.cfg_accounts_rq_schedules.list(params?.page, params?.page_size, params?.queue)
|
|
49
|
-
try {
|
|
50
|
-
return PaginatedScheduledJobListSchema.parse(response)
|
|
51
|
-
} catch (error) {
|
|
52
|
-
// Zod validation error - log detailed information
|
|
53
|
-
consola.error('❌ Zod Validation Failed');
|
|
54
|
-
consola.box(`getRqSchedulesList\nPath: /cfg/rq/schedules/\nMethod: GET`);
|
|
55
|
-
|
|
56
|
-
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
57
|
-
consola.error('Validation Issues:');
|
|
58
|
-
(error as any).issues.forEach((issue: any, index: number) => {
|
|
59
|
-
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
60
|
-
consola.error(` ├─ Message: ${issue.message}`);
|
|
61
|
-
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
62
|
-
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
consola.error('Response data:', response);
|
|
67
|
-
|
|
68
|
-
// Dispatch browser CustomEvent (only if window is defined)
|
|
69
|
-
if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
|
|
70
|
-
try {
|
|
71
|
-
const event = new CustomEvent('zod-validation-error', {
|
|
72
|
-
detail: {
|
|
73
|
-
operation: 'getRqSchedulesList',
|
|
74
|
-
path: '/cfg/rq/schedules/',
|
|
75
|
-
method: 'GET',
|
|
76
|
-
error: error,
|
|
77
|
-
response: response,
|
|
78
|
-
timestamp: new Date(),
|
|
79
|
-
},
|
|
80
|
-
bubbles: true,
|
|
81
|
-
cancelable: false,
|
|
82
|
-
});
|
|
83
|
-
window.dispatchEvent(event);
|
|
84
|
-
} catch (eventError) {
|
|
85
|
-
// Silently fail - event dispatch should never crash the app
|
|
86
|
-
consola.warn('Failed to dispatch validation error event:', eventError);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// Re-throw the error
|
|
91
|
-
throw error;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Create scheduled job
|
|
98
|
-
*
|
|
99
|
-
* @method POST
|
|
100
|
-
* @path /cfg/rq/schedules/
|
|
101
|
-
*/
|
|
102
|
-
export async function createRqSchedulesCreate( data: ScheduleCreateRequest, client?: any
|
|
103
|
-
): Promise<ScheduleActionResponse> {
|
|
104
|
-
const api = client || getAPIInstance()
|
|
105
|
-
const response = await api.cfg_accounts_rq_schedules.create(data)
|
|
106
|
-
try {
|
|
107
|
-
return ScheduleActionResponseSchema.parse(response)
|
|
108
|
-
} catch (error) {
|
|
109
|
-
// Zod validation error - log detailed information
|
|
110
|
-
consola.error('❌ Zod Validation Failed');
|
|
111
|
-
consola.box(`createRqSchedulesCreate\nPath: /cfg/rq/schedules/\nMethod: POST`);
|
|
112
|
-
|
|
113
|
-
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
114
|
-
consola.error('Validation Issues:');
|
|
115
|
-
(error as any).issues.forEach((issue: any, index: number) => {
|
|
116
|
-
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
117
|
-
consola.error(` ├─ Message: ${issue.message}`);
|
|
118
|
-
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
119
|
-
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
consola.error('Response data:', response);
|
|
124
|
-
|
|
125
|
-
// Dispatch browser CustomEvent (only if window is defined)
|
|
126
|
-
if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
|
|
127
|
-
try {
|
|
128
|
-
const event = new CustomEvent('zod-validation-error', {
|
|
129
|
-
detail: {
|
|
130
|
-
operation: 'createRqSchedulesCreate',
|
|
131
|
-
path: '/cfg/rq/schedules/',
|
|
132
|
-
method: 'POST',
|
|
133
|
-
error: error,
|
|
134
|
-
response: response,
|
|
135
|
-
timestamp: new Date(),
|
|
136
|
-
},
|
|
137
|
-
bubbles: true,
|
|
138
|
-
cancelable: false,
|
|
139
|
-
});
|
|
140
|
-
window.dispatchEvent(event);
|
|
141
|
-
} catch (eventError) {
|
|
142
|
-
// Silently fail - event dispatch should never crash the app
|
|
143
|
-
consola.warn('Failed to dispatch validation error event:', eventError);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// Re-throw the error
|
|
148
|
-
throw error;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Get scheduled job details
|
|
155
|
-
*
|
|
156
|
-
* @method GET
|
|
157
|
-
* @path /cfg/rq/schedules/{id}/
|
|
158
|
-
*/
|
|
159
|
-
export async function getRqSchedulesRetrieve( id: string, pk: string, params?: { queue?: string }, client?: any
|
|
160
|
-
): Promise<ScheduledJob> {
|
|
161
|
-
const api = client || getAPIInstance()
|
|
162
|
-
const response = await api.cfg_accounts_rq_schedules.retrieve(id, pk, params?.queue)
|
|
163
|
-
try {
|
|
164
|
-
return ScheduledJobSchema.parse(response)
|
|
165
|
-
} catch (error) {
|
|
166
|
-
// Zod validation error - log detailed information
|
|
167
|
-
consola.error('❌ Zod Validation Failed');
|
|
168
|
-
consola.box(`getRqSchedulesRetrieve\nPath: /cfg/rq/schedules/{id}/\nMethod: GET`);
|
|
169
|
-
|
|
170
|
-
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
171
|
-
consola.error('Validation Issues:');
|
|
172
|
-
(error as any).issues.forEach((issue: any, index: number) => {
|
|
173
|
-
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
174
|
-
consola.error(` ├─ Message: ${issue.message}`);
|
|
175
|
-
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
176
|
-
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
consola.error('Response data:', response);
|
|
181
|
-
|
|
182
|
-
// Dispatch browser CustomEvent (only if window is defined)
|
|
183
|
-
if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
|
|
184
|
-
try {
|
|
185
|
-
const event = new CustomEvent('zod-validation-error', {
|
|
186
|
-
detail: {
|
|
187
|
-
operation: 'getRqSchedulesRetrieve',
|
|
188
|
-
path: '/cfg/rq/schedules/{id}/',
|
|
189
|
-
method: 'GET',
|
|
190
|
-
error: error,
|
|
191
|
-
response: response,
|
|
192
|
-
timestamp: new Date(),
|
|
193
|
-
},
|
|
194
|
-
bubbles: true,
|
|
195
|
-
cancelable: false,
|
|
196
|
-
});
|
|
197
|
-
window.dispatchEvent(event);
|
|
198
|
-
} catch (eventError) {
|
|
199
|
-
// Silently fail - event dispatch should never crash the app
|
|
200
|
-
consola.warn('Failed to dispatch validation error event:', eventError);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
// Re-throw the error
|
|
205
|
-
throw error;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Cancel scheduled job
|
|
212
|
-
*
|
|
213
|
-
* @method DELETE
|
|
214
|
-
* @path /cfg/rq/schedules/{id}/
|
|
215
|
-
*/
|
|
216
|
-
export async function deleteRqSchedulesDestroy( id: string, pk: string, params?: { queue?: string }, client?: any
|
|
217
|
-
): Promise<ScheduleActionResponse> {
|
|
218
|
-
const api = client || getAPIInstance()
|
|
219
|
-
const response = await api.cfg_accounts_rq_schedules.destroy(id, pk, params?.queue)
|
|
220
|
-
try {
|
|
221
|
-
return ScheduleActionResponseSchema.parse(response)
|
|
222
|
-
} catch (error) {
|
|
223
|
-
// Zod validation error - log detailed information
|
|
224
|
-
consola.error('❌ Zod Validation Failed');
|
|
225
|
-
consola.box(`deleteRqSchedulesDestroy\nPath: /cfg/rq/schedules/{id}/\nMethod: DELETE`);
|
|
226
|
-
|
|
227
|
-
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
228
|
-
consola.error('Validation Issues:');
|
|
229
|
-
(error as any).issues.forEach((issue: any, index: number) => {
|
|
230
|
-
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
231
|
-
consola.error(` ├─ Message: ${issue.message}`);
|
|
232
|
-
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
233
|
-
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
consola.error('Response data:', response);
|
|
238
|
-
|
|
239
|
-
// Dispatch browser CustomEvent (only if window is defined)
|
|
240
|
-
if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
|
|
241
|
-
try {
|
|
242
|
-
const event = new CustomEvent('zod-validation-error', {
|
|
243
|
-
detail: {
|
|
244
|
-
operation: 'deleteRqSchedulesDestroy',
|
|
245
|
-
path: '/cfg/rq/schedules/{id}/',
|
|
246
|
-
method: 'DELETE',
|
|
247
|
-
error: error,
|
|
248
|
-
response: response,
|
|
249
|
-
timestamp: new Date(),
|
|
250
|
-
},
|
|
251
|
-
bubbles: true,
|
|
252
|
-
cancelable: false,
|
|
253
|
-
});
|
|
254
|
-
window.dispatchEvent(event);
|
|
255
|
-
} catch (eventError) {
|
|
256
|
-
// Silently fail - event dispatch should never crash the app
|
|
257
|
-
consola.warn('Failed to dispatch validation error event:', eventError);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
// Re-throw the error
|
|
262
|
-
throw error;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
|