@djangocfg/api 2.1.36 → 2.1.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth.cjs +3007 -4015
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.mjs +3007 -4015
- 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/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,208 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Typed fetchers for Grpc Services
|
|
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 { PaginatedServiceSummaryListSchema, type PaginatedServiceSummaryList } from '../schemas/PaginatedServiceSummaryList.schema'
|
|
34
|
-
import { ServiceDetailSchema, type ServiceDetail } from '../schemas/ServiceDetail.schema'
|
|
35
|
-
import { ServiceMethodsSchema, type ServiceMethods } from '../schemas/ServiceMethods.schema'
|
|
36
|
-
import { getAPIInstance } from '../../api-instance'
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* List all services
|
|
40
|
-
*
|
|
41
|
-
* @method GET
|
|
42
|
-
* @path /cfg/grpc/services/
|
|
43
|
-
*/
|
|
44
|
-
export async function getGrpcServicesList( params?: { hours?: number; page?: number; page_size?: number }, client?: any
|
|
45
|
-
): Promise<PaginatedServiceSummaryList> {
|
|
46
|
-
const api = client || getAPIInstance()
|
|
47
|
-
const response = await api.cfg_accounts_grpc_services.list(params?.hours, params?.page, params?.page_size)
|
|
48
|
-
try {
|
|
49
|
-
return PaginatedServiceSummaryListSchema.parse(response)
|
|
50
|
-
} catch (error) {
|
|
51
|
-
// Zod validation error - log detailed information
|
|
52
|
-
consola.error('❌ Zod Validation Failed');
|
|
53
|
-
consola.box(`getGrpcServicesList\nPath: /cfg/grpc/services/\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: 'getGrpcServicesList',
|
|
73
|
-
path: '/cfg/grpc/services/',
|
|
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
|
-
* Get service details
|
|
97
|
-
*
|
|
98
|
-
* @method GET
|
|
99
|
-
* @path /cfg/grpc/services/{id}/
|
|
100
|
-
*/
|
|
101
|
-
export async function getGrpcServicesRetrieve( id: string, pk: string, client?: any
|
|
102
|
-
): Promise<ServiceDetail> {
|
|
103
|
-
const api = client || getAPIInstance()
|
|
104
|
-
const response = await api.cfg_accounts_grpc_services.retrieve(id, pk)
|
|
105
|
-
try {
|
|
106
|
-
return ServiceDetailSchema.parse(response)
|
|
107
|
-
} catch (error) {
|
|
108
|
-
// Zod validation error - log detailed information
|
|
109
|
-
consola.error('❌ Zod Validation Failed');
|
|
110
|
-
consola.box(`getGrpcServicesRetrieve\nPath: /cfg/grpc/services/{id}/\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: 'getGrpcServicesRetrieve',
|
|
130
|
-
path: '/cfg/grpc/services/{id}/',
|
|
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
|
-
* Get service methods
|
|
154
|
-
*
|
|
155
|
-
* @method GET
|
|
156
|
-
* @path /cfg/grpc/services/{id}/methods/
|
|
157
|
-
*/
|
|
158
|
-
export async function getGrpcServicesMethodsRetrieve( id: string, pk: string, client?: any
|
|
159
|
-
): Promise<ServiceMethods> {
|
|
160
|
-
const api = client || getAPIInstance()
|
|
161
|
-
const response = await api.cfg_accounts_grpc_services.methodsRetrieve(id, pk)
|
|
162
|
-
try {
|
|
163
|
-
return ServiceMethodsSchema.parse(response)
|
|
164
|
-
} catch (error) {
|
|
165
|
-
// Zod validation error - log detailed information
|
|
166
|
-
consola.error('❌ Zod Validation Failed');
|
|
167
|
-
consola.box(`getGrpcServicesMethodsRetrieve\nPath: /cfg/grpc/services/{id}/methods/\nMethod: GET`);
|
|
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: 'getGrpcServicesMethodsRetrieve',
|
|
187
|
-
path: '/cfg/grpc/services/{id}/methods/',
|
|
188
|
-
method: 'GET',
|
|
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
|
-
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Typed fetchers for Health
|
|
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 { DRFHealthCheckSchema, type DRFHealthCheck } from '../schemas/DRFHealthCheck.schema'
|
|
34
|
-
import { QuickHealthSchema, type QuickHealth } from '../schemas/QuickHealth.schema'
|
|
35
|
-
import { getAPIInstance } from '../../api-instance'
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* API operation
|
|
39
|
-
*
|
|
40
|
-
* @method GET
|
|
41
|
-
* @path /cfg/health/drf/
|
|
42
|
-
*/
|
|
43
|
-
export async function getHealthDrfRetrieve( client?: any
|
|
44
|
-
): Promise<DRFHealthCheck> {
|
|
45
|
-
const api = client || getAPIInstance()
|
|
46
|
-
const response = await api.cfg_accounts_health.drfRetrieve()
|
|
47
|
-
try {
|
|
48
|
-
return DRFHealthCheckSchema.parse(response)
|
|
49
|
-
} catch (error) {
|
|
50
|
-
// Zod validation error - log detailed information
|
|
51
|
-
consola.error('❌ Zod Validation Failed');
|
|
52
|
-
consola.box(`getHealthDrfRetrieve\nPath: /cfg/health/drf/\nMethod: GET`);
|
|
53
|
-
|
|
54
|
-
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
55
|
-
consola.error('Validation Issues:');
|
|
56
|
-
(error as any).issues.forEach((issue: any, index: number) => {
|
|
57
|
-
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
58
|
-
consola.error(` ├─ Message: ${issue.message}`);
|
|
59
|
-
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
60
|
-
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
consola.error('Response data:', response);
|
|
65
|
-
|
|
66
|
-
// Dispatch browser CustomEvent (only if window is defined)
|
|
67
|
-
if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
|
|
68
|
-
try {
|
|
69
|
-
const event = new CustomEvent('zod-validation-error', {
|
|
70
|
-
detail: {
|
|
71
|
-
operation: 'getHealthDrfRetrieve',
|
|
72
|
-
path: '/cfg/health/drf/',
|
|
73
|
-
method: 'GET',
|
|
74
|
-
error: error,
|
|
75
|
-
response: response,
|
|
76
|
-
timestamp: new Date(),
|
|
77
|
-
},
|
|
78
|
-
bubbles: true,
|
|
79
|
-
cancelable: false,
|
|
80
|
-
});
|
|
81
|
-
window.dispatchEvent(event);
|
|
82
|
-
} catch (eventError) {
|
|
83
|
-
// Silently fail - event dispatch should never crash the app
|
|
84
|
-
consola.warn('Failed to dispatch validation error event:', eventError);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// Re-throw the error
|
|
89
|
-
throw error;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* API operation
|
|
96
|
-
*
|
|
97
|
-
* @method GET
|
|
98
|
-
* @path /cfg/health/drf/quick/
|
|
99
|
-
*/
|
|
100
|
-
export async function getHealthDrfQuickRetrieve( client?: any
|
|
101
|
-
): Promise<QuickHealth> {
|
|
102
|
-
const api = client || getAPIInstance()
|
|
103
|
-
const response = await api.cfg_accounts_health.drfQuickRetrieve()
|
|
104
|
-
try {
|
|
105
|
-
return QuickHealthSchema.parse(response)
|
|
106
|
-
} catch (error) {
|
|
107
|
-
// Zod validation error - log detailed information
|
|
108
|
-
consola.error('❌ Zod Validation Failed');
|
|
109
|
-
consola.box(`getHealthDrfQuickRetrieve\nPath: /cfg/health/drf/quick/\nMethod: GET`);
|
|
110
|
-
|
|
111
|
-
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
112
|
-
consola.error('Validation Issues:');
|
|
113
|
-
(error as any).issues.forEach((issue: any, index: number) => {
|
|
114
|
-
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
115
|
-
consola.error(` ├─ Message: ${issue.message}`);
|
|
116
|
-
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
117
|
-
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
consola.error('Response data:', response);
|
|
122
|
-
|
|
123
|
-
// Dispatch browser CustomEvent (only if window is defined)
|
|
124
|
-
if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
|
|
125
|
-
try {
|
|
126
|
-
const event = new CustomEvent('zod-validation-error', {
|
|
127
|
-
detail: {
|
|
128
|
-
operation: 'getHealthDrfQuickRetrieve',
|
|
129
|
-
path: '/cfg/health/drf/quick/',
|
|
130
|
-
method: 'GET',
|
|
131
|
-
error: error,
|
|
132
|
-
response: response,
|
|
133
|
-
timestamp: new Date(),
|
|
134
|
-
},
|
|
135
|
-
bubbles: true,
|
|
136
|
-
cancelable: false,
|
|
137
|
-
});
|
|
138
|
-
window.dispatchEvent(event);
|
|
139
|
-
} catch (eventError) {
|
|
140
|
-
// Silently fail - event dispatch should never crash the app
|
|
141
|
-
consola.warn('Failed to dispatch validation error event:', eventError);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// Re-throw the error
|
|
146
|
-
throw error;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
@@ -1,323 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Typed fetchers for RQ Jobs
|
|
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 { JobDetailSchema, type JobDetail } from '../schemas/JobDetail.schema'
|
|
35
|
-
import { JobListRequestSchema, type JobListRequest } from '../schemas/JobListRequest.schema'
|
|
36
|
-
import { PaginatedJobListListSchema, type PaginatedJobListList } from '../schemas/PaginatedJobListList.schema'
|
|
37
|
-
import { getAPIInstance } from '../../api-instance'
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* List all jobs
|
|
41
|
-
*
|
|
42
|
-
* @method GET
|
|
43
|
-
* @path /cfg/rq/jobs/
|
|
44
|
-
*/
|
|
45
|
-
export async function getRqJobsList( params?: { page?: number; page_size?: number; queue?: string; status?: string }, client?: any
|
|
46
|
-
): Promise<PaginatedJobListList> {
|
|
47
|
-
const api = client || getAPIInstance()
|
|
48
|
-
const response = await api.cfg_accounts_rq_jobs.list(params?.page, params?.page_size, params?.queue, params?.status)
|
|
49
|
-
try {
|
|
50
|
-
return PaginatedJobListListSchema.parse(response)
|
|
51
|
-
} catch (error) {
|
|
52
|
-
// Zod validation error - log detailed information
|
|
53
|
-
consola.error('❌ Zod Validation Failed');
|
|
54
|
-
consola.box(`getRqJobsList\nPath: /cfg/rq/jobs/\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: 'getRqJobsList',
|
|
74
|
-
path: '/cfg/rq/jobs/',
|
|
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
|
-
* Get job details
|
|
98
|
-
*
|
|
99
|
-
* @method GET
|
|
100
|
-
* @path /cfg/rq/jobs/{id}/
|
|
101
|
-
*/
|
|
102
|
-
export async function getRqJobsRetrieve( id: string, client?: any
|
|
103
|
-
): Promise<JobDetail> {
|
|
104
|
-
const api = client || getAPIInstance()
|
|
105
|
-
const response = await api.cfg_accounts_rq_jobs.retrieve(id)
|
|
106
|
-
try {
|
|
107
|
-
return JobDetailSchema.parse(response)
|
|
108
|
-
} catch (error) {
|
|
109
|
-
// Zod validation error - log detailed information
|
|
110
|
-
consola.error('❌ Zod Validation Failed');
|
|
111
|
-
consola.box(`getRqJobsRetrieve\nPath: /cfg/rq/jobs/{id}/\nMethod: GET`);
|
|
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: 'getRqJobsRetrieve',
|
|
131
|
-
path: '/cfg/rq/jobs/{id}/',
|
|
132
|
-
method: 'GET',
|
|
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
|
-
* Delete job
|
|
155
|
-
*
|
|
156
|
-
* @method DELETE
|
|
157
|
-
* @path /cfg/rq/jobs/{id}/
|
|
158
|
-
*/
|
|
159
|
-
export async function deleteRqJobsDestroy( id: string, client?: any
|
|
160
|
-
): Promise<JobActionResponse> {
|
|
161
|
-
const api = client || getAPIInstance()
|
|
162
|
-
const response = await api.cfg_accounts_rq_jobs.destroy(id)
|
|
163
|
-
try {
|
|
164
|
-
return JobActionResponseSchema.parse(response)
|
|
165
|
-
} catch (error) {
|
|
166
|
-
// Zod validation error - log detailed information
|
|
167
|
-
consola.error('❌ Zod Validation Failed');
|
|
168
|
-
consola.box(`deleteRqJobsDestroy\nPath: /cfg/rq/jobs/{id}/\nMethod: DELETE`);
|
|
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: 'deleteRqJobsDestroy',
|
|
188
|
-
path: '/cfg/rq/jobs/{id}/',
|
|
189
|
-
method: 'DELETE',
|
|
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 job
|
|
212
|
-
*
|
|
213
|
-
* @method POST
|
|
214
|
-
* @path /cfg/rq/jobs/{id}/cancel/
|
|
215
|
-
*/
|
|
216
|
-
export async function createRqJobsCancelCreate( id: string, data: JobListRequest, client?: any
|
|
217
|
-
): Promise<JobActionResponse> {
|
|
218
|
-
const api = client || getAPIInstance()
|
|
219
|
-
const response = await api.cfg_accounts_rq_jobs.cancelCreate(id, data)
|
|
220
|
-
try {
|
|
221
|
-
return JobActionResponseSchema.parse(response)
|
|
222
|
-
} catch (error) {
|
|
223
|
-
// Zod validation error - log detailed information
|
|
224
|
-
consola.error('❌ Zod Validation Failed');
|
|
225
|
-
consola.box(`createRqJobsCancelCreate\nPath: /cfg/rq/jobs/{id}/cancel/\nMethod: POST`);
|
|
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: 'createRqJobsCancelCreate',
|
|
245
|
-
path: '/cfg/rq/jobs/{id}/cancel/',
|
|
246
|
-
method: 'POST',
|
|
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
|
-
|
|
267
|
-
/**
|
|
268
|
-
* Requeue job
|
|
269
|
-
*
|
|
270
|
-
* @method POST
|
|
271
|
-
* @path /cfg/rq/jobs/{id}/requeue/
|
|
272
|
-
*/
|
|
273
|
-
export async function createRqJobsRequeueCreate( id: string, data: JobListRequest, client?: any
|
|
274
|
-
): Promise<JobActionResponse> {
|
|
275
|
-
const api = client || getAPIInstance()
|
|
276
|
-
const response = await api.cfg_accounts_rq_jobs.requeueCreate(id, data)
|
|
277
|
-
try {
|
|
278
|
-
return JobActionResponseSchema.parse(response)
|
|
279
|
-
} catch (error) {
|
|
280
|
-
// Zod validation error - log detailed information
|
|
281
|
-
consola.error('❌ Zod Validation Failed');
|
|
282
|
-
consola.box(`createRqJobsRequeueCreate\nPath: /cfg/rq/jobs/{id}/requeue/\nMethod: POST`);
|
|
283
|
-
|
|
284
|
-
if (error instanceof Error && 'issues' in error && Array.isArray((error as any).issues)) {
|
|
285
|
-
consola.error('Validation Issues:');
|
|
286
|
-
(error as any).issues.forEach((issue: any, index: number) => {
|
|
287
|
-
consola.error(` ${index + 1}. ${issue.path.join('.') || 'root'}`);
|
|
288
|
-
consola.error(` ├─ Message: ${issue.message}`);
|
|
289
|
-
if (issue.expected) consola.error(` ├─ Expected: ${issue.expected}`);
|
|
290
|
-
if (issue.received) consola.error(` └─ Received: ${issue.received}`);
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
consola.error('Response data:', response);
|
|
295
|
-
|
|
296
|
-
// Dispatch browser CustomEvent (only if window is defined)
|
|
297
|
-
if (typeof window !== 'undefined' && error instanceof Error && 'issues' in error) {
|
|
298
|
-
try {
|
|
299
|
-
const event = new CustomEvent('zod-validation-error', {
|
|
300
|
-
detail: {
|
|
301
|
-
operation: 'createRqJobsRequeueCreate',
|
|
302
|
-
path: '/cfg/rq/jobs/{id}/requeue/',
|
|
303
|
-
method: 'POST',
|
|
304
|
-
error: error,
|
|
305
|
-
response: response,
|
|
306
|
-
timestamp: new Date(),
|
|
307
|
-
},
|
|
308
|
-
bubbles: true,
|
|
309
|
-
cancelable: false,
|
|
310
|
-
});
|
|
311
|
-
window.dispatchEvent(event);
|
|
312
|
-
} catch (eventError) {
|
|
313
|
-
// Silently fail - event dispatch should never crash the app
|
|
314
|
-
consola.warn('Failed to dispatch validation error event:', eventError);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
// Re-throw the error
|
|
319
|
-
throw error;
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
|