diff --git a/AGENTS.md b/AGENTS.md index 7668559bc..26d698cad 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -257,8 +257,7 @@ async def get_user(self, user_id: str) -> UserDocument: return user # Route: no None check, no HTTPException; the service already raises if missing -@router.get("/{user_id}", response_model=UserResponse, - responses={404: {"model": ErrorResponse}}) +@router.get("/{user_id}", responses={404: {"model": ErrorResponse}}) async def get_user(user_id: str, service: FromDishka[AdminUserService]) -> UserResponse: user = await service.get_user(user_id=user_id) return UserResponse.model_validate(user) @@ -283,7 +282,6 @@ router = APIRouter( @router.post( "/execute", - response_model=ExecutionResponse, responses={ 409: {"model": ErrorResponse, "description": "Duplicate execution"}, 429: {"model": ErrorResponse, "description": "Rate limit exceeded"}, @@ -303,7 +301,7 @@ async def create_execution( Rules: - All routes live in `app/api/routes/`, prefixed with `/api/v1` via `settings.API_V1_STR` - Path ordering: literal paths (`/defaults`) before parameterised ones (`/{user_id}`) in the same router -- Return Pydantic schema models, **never** raw dicts +- Return Pydantic schema models, **never** raw dicts. The return annotation is the response model, so routes set no `response_model=` - Use `responses={}` to document non-200 outcomes - Auth: JWT in an httpOnly cookie plus CSRF double-submit (`X-CSRF-Token` header required for POST, PUT, PATCH and DELETE) - OpenAPI and docs pages are served only when `DEVELOPMENT_MODE` is true diff --git a/backend/app/api/routes/admin/events.py b/backend/app/api/routes/admin/events.py index d7ec0d633..c05f3a72d 100644 --- a/backend/app/api/routes/admin/events.py +++ b/backend/app/api/routes/admin/events.py @@ -135,7 +135,7 @@ async def stream_replay_status( ) -> EventSourceResponse: """Stream the status and progress of a replay session via SSE.""" status = await service.get_replay_sse_status(session_id) - statuses = await sse_service.create_replay_stream(status) + statuses = sse_service.create_replay_stream(status) return EventSourceResponse( ({"data": EventReplayStatusResponse.model_validate(s).model_dump_json()} async for s in statuses), ping=15 ) diff --git a/backend/app/api/routes/admin/executions.py b/backend/app/api/routes/admin/executions.py index 43a404584..8f0e3db9f 100644 --- a/backend/app/api/routes/admin/executions.py +++ b/backend/app/api/routes/admin/executions.py @@ -26,17 +26,16 @@ @router.get( "/", - response_model=AdminExecutionListResponse, responses={403: {"model": ErrorResponse}}, ) async def list_executions( _: Annotated[UserDocument, Depends(admin_user)], service: FromDishka[AdminExecutionService], - status: ExecutionStatus | None = Query(None), - priority: QueuePriority | None = Query(None), - user_id: str | None = Query(None), - limit: int = Query(50, ge=1, le=200), - skip: int = Query(0, ge=0), + status: Annotated[ExecutionStatus | None, Query()] = None, + priority: Annotated[QueuePriority | None, Query()] = None, + user_id: Annotated[str | None, Query()] = None, + limit: Annotated[int, Query(ge=1, le=200)] = 50, + skip: Annotated[int, Query(ge=0)] = 0, ) -> AdminExecutionListResponse: executions, total = await service.list_executions( status=status, @@ -56,7 +55,6 @@ async def list_executions( @router.put( "/{execution_id}/priority", - response_model=AdminExecutionResponse, responses={403: {"model": ErrorResponse}, 404: {"model": ErrorResponse}}, ) async def update_priority( @@ -71,7 +69,6 @@ async def update_priority( @router.get( "/queue", - response_model=QueueStatusResponse, responses={403: {"model": ErrorResponse}}, ) async def get_queue_status( diff --git a/backend/app/api/routes/admin/rate_limits.py b/backend/app/api/routes/admin/rate_limits.py index 7d9a78444..5b33c364f 100644 --- a/backend/app/api/routes/admin/rate_limits.py +++ b/backend/app/api/routes/admin/rate_limits.py @@ -27,14 +27,14 @@ _rate_limit_update = TypeAdapter(UserRateLimitUpdate) -@router.get("/defaults", response_model=list[RateLimitRuleResponse]) +@router.get("/defaults") async def get_default_rate_limit_rules() -> list[RateLimitRuleResponse]: """Get the system-level default rate limit rules applied to all users.""" rules = RateLimitConfig.get_default_config().default_rules return [RateLimitRuleResponse.model_validate(r) for r in rules] -@router.get("/{user_id}", response_model=UserRateLimitsResponse) +@router.get("/{user_id}") async def get_user_rate_limits( admin: Annotated[UserDocument, Depends(admin_user)], admin_user_service: FromDishka[AdminUserService], @@ -45,7 +45,7 @@ async def get_user_rate_limits( return UserRateLimitsResponse.model_validate(result) -@router.put("/{user_id}", response_model=RateLimitUpdateResponse) +@router.put("/{user_id}") async def update_user_rate_limits( admin: Annotated[UserDocument, Depends(admin_user)], admin_user_service: FromDishka[AdminUserService], diff --git a/backend/app/api/routes/admin/settings.py b/backend/app/api/routes/admin/settings.py index 58cd10f6b..c5e8266c9 100644 --- a/backend/app/api/routes/admin/settings.py +++ b/backend/app/api/routes/admin/settings.py @@ -21,7 +21,6 @@ @router.get( "/", - response_model=SystemSettingsSchema, responses={500: {"model": ErrorResponse, "description": "Failed to load system settings"}}, ) async def get_system_settings( @@ -35,7 +34,6 @@ async def get_system_settings( @router.put( "/", - response_model=SystemSettingsSchema, responses={ 400: {"model": ErrorResponse, "description": "Invalid settings values"}, 422: {"model": ErrorResponse, "description": "Settings validation failed"}, @@ -55,7 +53,6 @@ async def update_system_settings( @router.post( "/reset", - response_model=SystemSettingsSchema, responses={500: {"model": ErrorResponse, "description": "Failed to reset settings"}}, ) async def reset_system_settings( diff --git a/backend/app/api/routes/admin/users.py b/backend/app/api/routes/admin/users.py index 4d7ae77a0..6d65f395c 100644 --- a/backend/app/api/routes/admin/users.py +++ b/backend/app/api/routes/admin/users.py @@ -32,7 +32,7 @@ _user_changes = TypeAdapter(UserChanges) -@router.get("/", response_model=UserListResponse) +@router.get("/") async def list_users( admin: Annotated[UserDocument, Depends(admin_user)], admin_user_service: FromDishka[AdminUserService], @@ -64,7 +64,6 @@ async def list_users( @router.post( "/", - response_model=UserResponse, responses={409: {"model": ErrorResponse, "description": "Username already exists"}}, ) async def create_user( @@ -86,7 +85,6 @@ async def create_user( @router.get( "/{user_id}", - response_model=UserResponse, responses={404: {"model": ErrorResponse, "description": "User not found"}}, ) async def get_user( @@ -101,7 +99,6 @@ async def get_user( @router.get( "/{user_id}/overview", - response_model=AdminUserOverview, responses={404: {"model": ErrorResponse, "description": "User not found"}}, ) async def get_user_overview( @@ -116,7 +113,6 @@ async def get_user_overview( @router.put( "/{user_id}", - response_model=UserResponse, responses={ 404: {"model": ErrorResponse, "description": "User not found"}, 409: {"model": ErrorResponse, "description": "Username or email already exists"}, @@ -141,7 +137,6 @@ async def update_user( @router.delete( "/{user_id}", - response_model=DeleteUserResponse, responses={ 400: {"model": ErrorResponse, "description": "Cannot delete your own account"}, 404: {"model": ErrorResponse, "description": "User not found"}, @@ -160,7 +155,6 @@ async def delete_user( @router.post( "/{user_id}/reset-password", - response_model=MessageResponse, responses={404: {"model": ErrorResponse, "description": "User not found"}}, ) async def reset_user_password( @@ -178,7 +172,6 @@ async def reset_user_password( @router.post( "/{user_id}/unlock", - response_model=UnlockResponse, responses={404: {"model": ErrorResponse, "description": "User not found"}}, ) async def unlock_user( diff --git a/backend/app/api/routes/auth.py b/backend/app/api/routes/auth.py index 5e6f9d646..f98dd67e2 100644 --- a/backend/app/api/routes/auth.py +++ b/backend/app/api/routes/auth.py @@ -1,3 +1,5 @@ +from typing import Annotated + import structlog from dishka import FromDishka from dishka.integrations.fastapi import DishkaRoute @@ -20,7 +22,6 @@ @router.post( "/login", - response_model=LoginResponse, responses={ 401: {"model": ErrorResponse, "description": "Invalid username or password"}, 403: {"model": ErrorResponse, "description": "Account deactivated"}, @@ -32,7 +33,7 @@ async def login( response: Response, auth_service: FromDishka[AuthService], logger: FromDishka[structlog.stdlib.BoundLogger], - form_data: OAuth2PasswordRequestForm = Depends(), + form_data: Annotated[OAuth2PasswordRequestForm, Depends()], ) -> LoginResponse: """Authenticate and receive session cookies.""" logger.info( @@ -85,7 +86,6 @@ async def login( @router.post( "/register", - response_model=UserResponse, responses={ 409: {"model": ErrorResponse, "description": "Username or email already registered"}, 422: { @@ -122,7 +122,6 @@ async def register( @router.get( "/me", - response_model=UserResponse, responses={401: {"model": ErrorResponse, "description": "Not authenticated or session invalid"}}, ) async def get_current_user_profile( @@ -150,7 +149,6 @@ async def get_current_user_profile( @router.post( "/logout", - response_model=MessageResponse, responses={403: {"model": ErrorResponse, "description": "CSRF token missing or invalid"}}, ) async def logout( diff --git a/backend/app/api/routes/execution.py b/backend/app/api/routes/execution.py index 34e2305c6..376490d17 100644 --- a/backend/app/api/routes/execution.py +++ b/backend/app/api/routes/execution.py @@ -13,7 +13,6 @@ from app.domain.events import DomainEvent from app.schemas_pydantic.common import ErrorResponse from app.schemas_pydantic.execution import ( - CancelExecutionRequest, CancelResponse, DeleteResponse, ExampleScripts, @@ -42,7 +41,6 @@ async def get_execution_with_access( @router.post( "/execute", - response_model=ExecutionResponse, responses={ 409: { "model": ErrorResponse, @@ -84,7 +82,6 @@ async def create_execution( @router.get( "/executions/{execution_id}/result", - response_model=ExecutionResult, responses={ 403: {"model": ErrorResponse, "description": "Not the owner of this execution"}, 404: {"model": ErrorResponse, "description": "Execution not found"}, @@ -99,7 +96,6 @@ async def get_result( @router.post( "/executions/{execution_id}/cancel", - response_model=CancelResponse, responses={ 400: {"model": ErrorResponse, "description": "Execution is in a terminal state"}, 403: {"model": ErrorResponse, "description": "Not the owner of this execution"}, @@ -109,7 +105,6 @@ async def get_result( async def cancel_execution( execution: Annotated[ExecutionInDB, Depends(get_execution_with_access)], current_user: Annotated[UserDocument, Depends(current_user)], - cancel_request: CancelExecutionRequest, execution_service: FromDishka[ExecutionService], ) -> CancelResponse: """Cancel a running or queued execution.""" @@ -117,14 +112,12 @@ async def cancel_execution( execution_id=execution.execution_id, current_status=execution.status, user_id=current_user.user_id, - reason=cancel_request.reason, ) return CancelResponse.model_validate(result) @router.post( "/executions/{execution_id}/retry", - response_model=ExecutionResponse, responses={ 400: {"model": ErrorResponse, "description": "Execution is still running or queued"}, 403: {"model": ErrorResponse, "description": "Not the owner of this execution"}, @@ -145,7 +138,6 @@ async def retry_execution( @router.get( "/executions/{execution_id}/events", - response_model=list[DomainEvent], responses={ 403: {"model": ErrorResponse, "description": "Not the owner of this execution"}, 404: {"model": ErrorResponse, "description": "Execution not found"}, @@ -164,7 +156,7 @@ async def get_execution_events( return events -@router.get("/user/executions", response_model=ExecutionListResponse) +@router.get("/user/executions") async def get_user_executions( current_user: Annotated[UserDocument, Depends(current_user)], execution_service: FromDishka[ExecutionService], @@ -198,16 +190,16 @@ async def get_user_executions( ) -@router.get("/example-scripts", response_model=ExampleScripts) +@router.get("/example-scripts") async def get_example_scripts( execution_service: FromDishka[ExecutionService], ) -> ExampleScripts: """Get example scripts for the code editor.""" - scripts = await execution_service.get_example_scripts() + scripts = execution_service.get_example_scripts() return ExampleScripts(scripts=scripts) -@router.get("/k8s-limits", response_model=ResourceLimits) +@router.get("/k8s-limits") async def get_k8s_resource_limits( execution_service: FromDishka[ExecutionService], ) -> ResourceLimits: @@ -216,7 +208,7 @@ async def get_k8s_resource_limits( return ResourceLimits.model_validate(limits) -@router.delete("/executions/{execution_id}", response_model=DeleteResponse) +@router.delete("/executions/{execution_id}") async def delete_execution( execution_id: str, admin: Annotated[UserDocument, Depends(admin_user)], diff --git a/backend/app/api/routes/health.py b/backend/app/api/routes/health.py index f0b04d5a0..b5ce0d0d9 100644 --- a/backend/app/api/routes/health.py +++ b/backend/app/api/routes/health.py @@ -11,7 +11,7 @@ _START_TIME = time.time() -@router.get("/live", response_model=LivenessResponse) +@router.get("/live") async def liveness() -> LivenessResponse: """Basic liveness probe. Does not touch external deps.""" return LivenessResponse( diff --git a/backend/app/api/routes/notifications.py b/backend/app/api/routes/notifications.py index 7938e0297..5c9448282 100644 --- a/backend/app/api/routes/notifications.py +++ b/backend/app/api/routes/notifications.py @@ -17,7 +17,7 @@ router = APIRouter(prefix="/notifications", tags=["notifications"], route_class=DishkaRoute) -@router.get("", response_model=NotificationListResponse) +@router.get("") async def get_notifications( user: Annotated[UserDocument, Depends(current_user)], notification_service: FromDishka[NotificationService], @@ -64,7 +64,7 @@ async def mark_all_read( return Response(status_code=204) -@router.get("/unread-count", response_model=UnreadCountResponse) +@router.get("/unread-count") async def get_unread_count( user: Annotated[UserDocument, Depends(current_user)], notification_service: FromDishka[NotificationService], @@ -74,7 +74,7 @@ async def get_unread_count( return UnreadCountResponse(unread_count=count) -@router.delete("/{notification_id}", response_model=DeleteNotificationResponse) +@router.delete("/{notification_id}") async def delete_notification( notification_id: str, user: Annotated[UserDocument, Depends(current_user)], diff --git a/backend/app/api/routes/saved_scripts.py b/backend/app/api/routes/saved_scripts.py index 7588b9f8b..aa937ccec 100644 --- a/backend/app/api/routes/saved_scripts.py +++ b/backend/app/api/routes/saved_scripts.py @@ -28,7 +28,7 @@ _saved_script_changes = TypeAdapter(SavedScriptChanges) -@router.post("/scripts", response_model=SavedScriptResponse, responses={422: _RUNTIME_NOT_OFFERED}) +@router.post("/scripts", responses={422: _RUNTIME_NOT_OFFERED}) async def create_saved_script( user: Annotated[UserDocument, Depends(current_user)], saved_script: SavedScriptCreateRequest, @@ -46,7 +46,7 @@ async def create_saved_script( return SavedScriptResponse.model_validate(script) -@router.get("/scripts", response_model=SavedScriptListResponse) +@router.get("/scripts") async def list_saved_scripts( user: Annotated[UserDocument, Depends(current_user)], saved_script_service: FromDishka[SavedScriptService], @@ -58,7 +58,6 @@ async def list_saved_scripts( @router.get( "/scripts/{script_id}", - response_model=SavedScriptResponse, responses={404: {"model": ErrorResponse, "description": "Script not found"}}, ) async def get_saved_script( @@ -73,7 +72,6 @@ async def get_saved_script( @router.put( "/scripts/{script_id}", - response_model=SavedScriptResponse, responses={404: {"model": ErrorResponse, "description": "Script not found"}, 422: _RUNTIME_NOT_OFFERED}, ) async def update_saved_script( diff --git a/backend/app/api/routes/user_settings.py b/backend/app/api/routes/user_settings.py index 2a401940c..430da1336 100644 --- a/backend/app/api/routes/user_settings.py +++ b/backend/app/api/routes/user_settings.py @@ -27,7 +27,7 @@ _editor_settings = TypeAdapter(DomainEditorSettings) -@router.get("/", response_model=UserSettings) +@router.get("/") async def get_user_settings( current_user: Annotated[UserDocument, Depends(current_user)], settings_service: FromDishka[UserSettingsService], @@ -37,7 +37,7 @@ async def get_user_settings( return UserSettings.model_validate(domain) -@router.put("/", response_model=UserSettings) +@router.put("/") async def update_user_settings( current_user: Annotated[UserDocument, Depends(current_user)], updates: UserSettingsUpdate, @@ -50,7 +50,7 @@ async def update_user_settings( return UserSettings.model_validate(domain) -@router.put("/theme", response_model=UserSettings) +@router.put("/theme") async def update_theme( current_user: Annotated[UserDocument, Depends(current_user)], update_request: ThemeUpdateRequest, @@ -61,7 +61,7 @@ async def update_theme( return UserSettings.model_validate(domain) -@router.put("/notifications", response_model=UserSettings) +@router.put("/notifications") async def update_notification_settings( current_user: Annotated[UserDocument, Depends(current_user)], notifications: NotificationSettings, @@ -75,7 +75,7 @@ async def update_notification_settings( return UserSettings.model_validate(domain) -@router.put("/editor", response_model=UserSettings) +@router.put("/editor") async def update_editor_settings( current_user: Annotated[UserDocument, Depends(current_user)], editor: EditorSettings, @@ -89,7 +89,7 @@ async def update_editor_settings( return UserSettings.model_validate(domain) -@router.get("/history", response_model=SettingsHistoryResponse) +@router.get("/history") async def get_settings_history( current_user: Annotated[UserDocument, Depends(current_user)], settings_service: FromDishka[UserSettingsService], @@ -101,7 +101,7 @@ async def get_settings_history( return SettingsHistoryResponse(history=entries, limit=limit) -@router.post("/restore", response_model=UserSettings) +@router.post("/restore") async def restore_settings( current_user: Annotated[UserDocument, Depends(current_user)], restore_request: RestoreSettingsRequest, diff --git a/backend/app/domain/events/typed.py b/backend/app/domain/events/typed.py index 73f4c322d..be169626b 100644 --- a/backend/app/domain/events/typed.py +++ b/backend/app/domain/events/typed.py @@ -47,6 +47,8 @@ class BaseEvent(BaseModel): model_config = ConfigDict( from_attributes=True, json_schema_extra={"required": ["event_id", "event_type", "event_version", "timestamp", "metadata"]}, + # Dataclass fields (metadata, resource usage) are checked when built in code, as they are when read from Kafka + revalidate_instances="always", ) event_id: str = Field(default_factory=lambda: str(uuid4())) diff --git a/backend/app/domain/replay/models.py b/backend/app/domain/replay/models.py index 674c83d14..7c4ace193 100644 --- a/backend/app/domain/replay/models.py +++ b/backend/app/domain/replay/models.py @@ -76,10 +76,7 @@ def to_mongo_query(self) -> dict[str, Any]: query["event_type"] = {"$in": list(self.event_types)} if self.exclude_event_types: - if "event_type" in query: - query["event_type"]["$nin"] = list(self.exclude_event_types) - else: - query["event_type"] = {"$nin": list(self.exclude_event_types)} + query.setdefault("event_type", {})["$nin"] = list(self.exclude_event_types) if self.start_time or self.end_time: time_query: dict[str, Any] = {} diff --git a/backend/app/schemas_pydantic/execution.py b/backend/app/schemas_pydantic/execution.py index 43e494236..508e40e12 100644 --- a/backend/app/schemas_pydantic/execution.py +++ b/backend/app/schemas_pydantic/execution.py @@ -131,12 +131,6 @@ class ExampleScripts(BaseModel): scripts: dict[str, str] # lang: str with script -class CancelExecutionRequest(BaseModel): - """Model for cancelling an execution.""" - - reason: str = Field("User requested cancellation", description="Reason for cancellation") - - class ExecutionListResponse(BaseModel): """Model for paginated execution list.""" diff --git a/backend/app/scripts/entrypoint.sh b/backend/app/scripts/entrypoint.sh index f32eeacbc..f797866eb 100644 --- a/backend/app/scripts/entrypoint.sh +++ b/backend/app/scripts/entrypoint.sh @@ -30,10 +30,11 @@ set +e # Keeps the first bytes of a stream and drains the rest, so the script never blocks or fills /tmp. # dd writes each read straight to the file: a buffering head would lose it while a background child holds the pipe. capture() { + DEST=$1 SIZE=0 while [ "$SIZE" -le "$MAX_STREAM_BYTES" ]; do - dd bs=65536 count=1 >> "$1" 2> /dev/null - NEW_SIZE=$(($(wc -c < "$1"))) + dd bs=65536 count=1 >> "$DEST" 2> /dev/null + NEW_SIZE=$(($(wc -c < "$DEST"))) [ "$NEW_SIZE" -eq "$SIZE" ] && break SIZE=$NEW_SIZE done @@ -109,15 +110,18 @@ printf 'exit_code=%d\ncpu_jiffies=%d\nclk_tck=%d\npeak_memory_kb=%d\nwall_second # ---------- write length-prefixed stdout/stderr ---------------------------- emit() { - SIZE=$(($(wc -c < "$3"))) + MARKER=$1 + STREAM=$2 + SOURCE=$3 + SIZE=$(($(wc -c < "$SOURCE"))) if [ "$SIZE" -le "$MAX_STREAM_BYTES" ]; then - printf '%s %d\n' "$1" "$SIZE" - head -c "$SIZE" "$3" + printf '%s %d\n' "$MARKER" "$SIZE" + head -c "$SIZE" "$SOURCE" return fi - NOTICE="[$2 truncated: showing the first $MAX_STREAM_BYTES bytes]" - printf '%s %d\n' "$1" "$((MAX_STREAM_BYTES + ${#NOTICE} + 2))" - head -c "$MAX_STREAM_BYTES" "$3" + NOTICE="[$STREAM truncated: showing the first $MAX_STREAM_BYTES bytes]" + printf '%s %d\n' "$MARKER" "$((MAX_STREAM_BYTES + ${#NOTICE} + 2))" + head -c "$MAX_STREAM_BYTES" "$SOURCE" printf '\n%s\n' "$NOTICE" } diff --git a/backend/app/services/execution_queue.py b/backend/app/services/execution_queue.py index 7c2bef658..b4dd0cde1 100644 --- a/backend/app/services/execution_queue.py +++ b/backend/app/services/execution_queue.py @@ -1,7 +1,6 @@ from __future__ import annotations import time -from typing import Any import redis.asyncio as redis import structlog @@ -124,32 +123,16 @@ def __init__( self._redis = redis_client self._logger = logger self._tracer = tracer - self._schedule_script: Any = None - self._update_priority_script: Any = None - self._reserve_user_slot_script: Any = None - - async def _get_schedule_script(self) -> Any: - if self._schedule_script is None: - self._schedule_script = self._redis.register_script(_TRY_SCHEDULE_LUA) - return self._schedule_script - - async def _get_update_priority_script(self) -> Any: - if self._update_priority_script is None: - self._update_priority_script = self._redis.register_script(_UPDATE_PRIORITY_LUA) - return self._update_priority_script - - async def _get_reserve_user_slot_script(self) -> Any: - if self._reserve_user_slot_script is None: - self._reserve_user_slot_script = self._redis.register_script(_RESERVE_USER_SLOT_LUA) - return self._reserve_user_slot_script + self._schedule_script = redis_client.register_script(_TRY_SCHEDULE_LUA) + self._update_priority_script = redis_client.register_script(_UPDATE_PRIORITY_LUA) + self._reserve_user_slot_script = redis_client.register_script(_RESERVE_USER_SLOT_LUA) async def reserve_user_slot(self, user_id: str, execution_id: str, limit: int) -> bool: """Count an execution against its user's limit; False when the user already has ``limit`` in flight. A reservation lasts as long as a queued event does, so one whose release got lost frees itself. """ - script = await self._get_reserve_user_slot_script() - reserved = await script( + reserved = await self._reserve_user_slot_script( keys=[_user_key(user_id), _owner_key(execution_id)], args=[time.time(), limit, _EVENT_TTL, execution_id, user_id], ) @@ -191,9 +174,8 @@ async def try_schedule(self, max_active: int) -> tuple[str, ExecutionRequestedEv Raises: QueuedRequestLostError: The execution's stored request expired; its slots are already freed. """ - script = await self._get_schedule_script() now = time.time() - result = await script( + result = await self._schedule_script( keys=[_RUNNING_KEY, *_PENDING_KEYS], args=[max_active, now, now + _PROVISIONAL_SLOT_SECONDS] ) if result is None: @@ -241,8 +223,7 @@ async def release(self, execution_id: str) -> None: self._logger.debug("Released execution from active set", execution_id=execution_id) async def update_priority(self, execution_id: str, new_priority: QueuePriority) -> bool: - script = await self._get_update_priority_script() - result = await script( + result = await self._update_priority_script( keys=[_pending_key(new_priority), *_PENDING_KEYS], args=[execution_id], ) diff --git a/backend/app/services/execution_service.py b/backend/app/services/execution_service.py index efe7d5231..c4961dc46 100644 --- a/backend/app/services/execution_service.py +++ b/backend/app/services/execution_service.py @@ -81,7 +81,7 @@ async def get_k8s_resource_limits(self) -> ResourceLimitsDomain: language_limits={lang: await self._runtime_settings.get_language_limits(lang) for lang in runtimes}, ) - async def get_example_scripts(self) -> dict[str, str]: + def get_example_scripts(self) -> dict[str, str]: return self.settings.EXAMPLE_SCRIPTS def _create_event_metadata(self, user_id: str) -> EventMetadata: @@ -209,7 +209,6 @@ async def cancel_execution( execution_id: str, current_status: ExecutionStatus, user_id: str, - reason: str = "User requested cancellation", ) -> CancelResult: """ Cancel a running or queued execution. @@ -218,7 +217,6 @@ async def cancel_execution( execution_id: UUID of the execution. current_status: Current status of the execution. user_id: User requesting cancellation. - reason: Cancellation reason. Returns: CancelResult with status and event info. diff --git a/backend/app/services/k8s_worker/pod_builder.py b/backend/app/services/k8s_worker/pod_builder.py index 7a8a1bc82..4cd20c3b7 100644 --- a/backend/app/services/k8s_worker/pod_builder.py +++ b/backend/app/services/k8s_worker/pod_builder.py @@ -4,6 +4,9 @@ from app.runtime_registry import POD_RUNTIME_CONFIGS, PodRuntimeConfig, at_least from app.settings import Settings +# The ConfigMap key, the mounted file and the command the container runs +_ENTRYPOINT = "entrypoint.sh" + class PodBuilder: def __init__(self, settings: Settings): @@ -44,14 +47,14 @@ def build_config_map( "execution-id": execution_id, }, ), - data={event.runtime_filename: script_content, "entrypoint.sh": entrypoint_content}, + data={event.runtime_filename: script_content, _ENTRYPOINT: entrypoint_content}, ) def _build_container(self, event: ExecutionRequestedEvent, pod_config: PodRuntimeConfig) -> k8s_client.V1Container: execution_id = event.execution_id # Timeout is enforced by activeDeadlineSeconds on the pod spec - container_command = ["/bin/sh", "/entry/entrypoint.sh"] + event.runtime_command + container_command = ["/bin/sh", f"/entry/{_ENTRYPOINT}"] + event.runtime_command # Get resources - prefer the event's values, fallback to settings cpu_request = event.cpu_request or self._settings.K8S_POD_CPU_REQUEST @@ -121,7 +124,7 @@ def _build_pod_spec( name="entrypoint-volume", config_map=k8s_client.V1ConfigMapVolumeSource( name=f"script-{execution_id}", - items=[k8s_client.V1KeyToPath(key="entrypoint.sh", path="entrypoint.sh")], + items=[k8s_client.V1KeyToPath(key=_ENTRYPOINT, path=_ENTRYPOINT)], ), ), k8s_client.V1Volume( diff --git a/backend/app/services/k8s_worker/worker.py b/backend/app/services/k8s_worker/worker.py index 3b4b7902f..245e8bf08 100644 --- a/backend/app/services/k8s_worker/worker.py +++ b/backend/app/services/k8s_worker/worker.py @@ -15,6 +15,8 @@ from .pod_builder import PodBuilder +_SERVER_SIDE_APPLY = "application/apply-patch+yaml" + class KubernetesWorker: """Creates and deletes executor pods, and prepares the executor namespace at startup. @@ -239,7 +241,7 @@ async def _ensure_executor_network_policy(self, namespace: str) -> None: body=policy, field_manager="integr8s", force=True, - _content_type="application/apply-patch+yaml", + _content_type=_SERVER_SIDE_APPLY, ) self.logger.info("NetworkPolicy applied", policy_name=policy_name, namespace=namespace) @@ -262,7 +264,7 @@ async def _apply_namespace(self, namespace: str) -> None: body=body, field_manager="integr8s", force=True, - _content_type="application/apply-patch+yaml", + _content_type=_SERVER_SIDE_APPLY, ) self.logger.info("Namespace applied with Pod Security Admission labels", namespace=namespace) @@ -291,7 +293,7 @@ async def _ensure_resource_quota(self, namespace: str) -> None: body=quota, field_manager="integr8s", force=True, - _content_type="application/apply-patch+yaml", + _content_type=_SERVER_SIDE_APPLY, ) self.logger.info("ResourceQuota applied", quota_name=quota_name, namespace=namespace) @@ -369,7 +371,7 @@ async def ensure_image_pre_puller_daemonset(self) -> None: body=daemonset, field_manager="integr8s", force=True, - _content_type="application/apply-patch+yaml", + _content_type=_SERVER_SIDE_APPLY, ) self.logger.info("DaemonSet applied", daemonset=daemonset_name) diff --git a/backend/app/services/pod_monitor/event_mapper.py b/backend/app/services/pod_monitor/event_mapper.py index 727f35edc..cddbaa2e6 100644 --- a/backend/app/services/pod_monitor/event_mapper.py +++ b/backend/app/services/pod_monitor/event_mapper.py @@ -125,7 +125,7 @@ async def map_pod_event(self, pod: k8s_client.V1Pod, event_type: WatchEventType) # A deleted pod gets what its phase still owes, then its termination, and leaves the cache if event_type == WatchEventType.DELETED: events = [] if prior_phase == phase else await self._map_phase(ctx, prior_phase) - if terminated := await self._map_terminated(ctx): + if terminated := self._map_terminated(ctx): events.append(terminated) self._event_cache.pop(pod_name, None) return events @@ -307,7 +307,9 @@ async def _map_failed(self, ctx: PodContext) -> ExecutionFailedEvent | None: # Use logs data if available, fallback to error_info stdout = logs.stdout if logs else "" stderr = logs.stderr if logs and logs.stderr else error_info.message - exit_code = error_info.exit_code if error_info.exit_code is not None else (logs.exit_code if logs else 1) + exit_code = error_info.exit_code + if exit_code is None: + exit_code = logs.exit_code if logs else 1 evt = ExecutionFailedEvent( execution_id=ctx.execution_id, @@ -327,7 +329,7 @@ async def _map_failed(self, ctx: PodContext) -> ExecutionFailedEvent | None: ) return evt - async def _map_terminated(self, ctx: PodContext) -> PodTerminatedEvent | None: + def _map_terminated(self, ctx: PodContext) -> PodTerminatedEvent | None: """Map deleted pod to terminated event""" container = self._get_main_container(ctx.pod) if not container or not container.state or not container.state.terminated: @@ -442,11 +444,10 @@ def _analyze_failure(self, pod: k8s_client.V1Pod) -> FailureInfo: if status.state and status.state.terminated: terminated = status.state.terminated if terminated.exit_code != 0: - # Prefer explicit messages when available - term_msg = getattr(terminated, "message", None) - status_msg = pod.status.message if getattr(pod, "status", None) else None return self.FailureInfo( - message=term_msg or status_msg or f"Container exited with code {terminated.exit_code}", + message=terminated.message + or pod.status.message + or f"Container exited with code {terminated.exit_code}", error_type=ExecutionErrorType.SCRIPT_ERROR, exit_code=terminated.exit_code, ) @@ -518,7 +519,7 @@ async def _extract_logs(self, pod: k8s_client.V1Pod) -> PodLogs | None: @staticmethod def _parse_termination_message(raw: str) -> dict[str, str]: """Parse key=value metadata from K8s termination message.""" - return dict(line.split("=", 1) for line in raw.strip().splitlines() if "=" in line) + return {key: value for key, sep, value in (line.partition("=") for line in raw.strip().splitlines()) if sep} @staticmethod def _parse_framed_output(logs: bytes) -> tuple[str, str]: diff --git a/backend/app/services/rate_limit_service.py b/backend/app/services/rate_limit_service.py index 34c7b6ecf..6c999d115 100644 --- a/backend/app/services/rate_limit_service.py +++ b/backend/app/services/rate_limit_service.py @@ -127,10 +127,10 @@ async def _apply_rule(self, user_id: str, endpoint: str, rule: RateLimitRule, mu if rule.algorithm == RateLimitAlgorithm.TOKEN_BUCKET: status = await self._check_token_bucket( - user_id, endpoint, effective_limit, rule.window_seconds, rule.burst_multiplier, rule + user_id, endpoint, effective_limit, rule.window_seconds, rule.burst_multiplier ) else: - status = await self._check_sliding_window(user_id, endpoint, effective_limit, rule.window_seconds, rule) + status = await self._check_sliding_window(user_id, endpoint, effective_limit, rule.window_seconds) attributes: dict[str, AttributeValue] = { "rate_limit.endpoint": normalized_endpoint, @@ -142,7 +142,7 @@ async def _apply_rule(self, user_id: str, endpoint: str, rule: RateLimitRule, mu return status async def _check_sliding_window( - self, user_id: str, endpoint: str, limit: int, window_seconds: int, rule: RateLimitRule + self, user_id: str, endpoint: str, limit: int, window_seconds: int ) -> RateLimitStatus: key = f"{self.prefix}sw:{user_id}:{endpoint}" await self._register_user_key(user_id, key) @@ -217,7 +217,7 @@ async def _check_sliding_window( """ async def _check_token_bucket( - self, user_id: str, endpoint: str, limit: int, window_seconds: int, burst_multiplier: float, rule: RateLimitRule + self, user_id: str, endpoint: str, limit: int, window_seconds: int, burst_multiplier: float ) -> RateLimitStatus: key = f"{self.prefix}tb:{user_id}:{endpoint}" max_tokens = int(limit * burst_multiplier) diff --git a/backend/app/services/result_processor/processor.py b/backend/app/services/result_processor/processor.py index 04c37c71d..23b9b357c 100644 --- a/backend/app/services/result_processor/processor.py +++ b/backend/app/services/result_processor/processor.py @@ -181,9 +181,9 @@ async def _store( """ try: written = await self._execution_repo.write_terminal_result(result) - except PyMongoError as e: + except PyMongoError: self.logger.error("Failed to store execution result", execution_id=result.execution_id, exc_info=True) - await self._publish_result_failed(result.execution_id, str(e), metadata.user_id, aggregate_id) + await self._publish_result_failed(result.execution_id, metadata.user_id, aggregate_id) return if not written: self.logger.info( @@ -219,9 +219,7 @@ async def _publish_result_stored( ) await self._producer.produce_or_log(event_to_produce=event, key=execution_id) - async def _publish_result_failed( - self, execution_id: str, error_message: str, user_id: str, aggregate_id: str | None - ) -> None: + async def _publish_result_failed(self, execution_id: str, user_id: str, aggregate_id: str | None) -> None: """Publish result processing failed event.""" event = ResultFailedEvent( execution_id=execution_id, diff --git a/backend/app/services/sse/sse_service.py b/backend/app/services/sse/sse_service.py index 6aa7f447c..76591666a 100644 --- a/backend/app/services/sse/sse_service.py +++ b/backend/app/services/sse/sse_service.py @@ -89,7 +89,7 @@ async def create_notification_stream(self, user_id: str) -> AsyncGenerator[dict[ async for payload in payloads: yield {"event": "notification", "data": _notif_adapter.dump_json(payload).decode()} - async def create_replay_stream( + def create_replay_stream( self, initial_status: DomainReplaySSEPayload ) -> AsyncGenerator[DomainReplaySSEPayload, None]: """Return the replay status stream: the initial status, then each change until a terminal one. diff --git a/backend/tests/e2e/services/execution/test_execution_service.py b/backend/tests/e2e/services/execution/test_execution_service.py index 19ae97787..16ef6b1cf 100644 --- a/backend/tests/e2e/services/execution/test_execution_service.py +++ b/backend/tests/e2e/services/execution/test_execution_service.py @@ -71,9 +71,9 @@ async def test_get_k8s_resource_limits(self, execution_service: ExecutionService class TestGetExampleScripts: """Tests for get_example_scripts method.""" - async def test_get_example_scripts(self, execution_service: ExecutionService) -> None: + def test_get_example_scripts(self, execution_service: ExecutionService) -> None: """Get example scripts returns dictionary with python.""" - examples = await execution_service.get_example_scripts() + examples = execution_service.get_example_scripts() assert isinstance(examples, dict) assert "python" in examples diff --git a/backend/tests/e2e/services/rate_limit/test_rate_limit_service.py b/backend/tests/e2e/services/rate_limit/test_rate_limit_service.py index 1b334637c..bf3bd55b4 100644 --- a/backend/tests/e2e/services/rate_limit/test_rate_limit_service.py +++ b/backend/tests/e2e/services/rate_limit/test_rate_limit_service.py @@ -205,7 +205,7 @@ async def test_sliding_window_pipeline_failure(test_settings: Settings) -> None: ) with pytest.raises(ConnectionError): - await svc._check_sliding_window("user1", "/api/test", int(rule.requests), rule.window_seconds, rule) + await svc._check_sliding_window("user1", "/api/test", int(rule.requests), rule.window_seconds) async def test_token_bucket_invalid_data(svc: RateLimitService) -> None: @@ -221,7 +221,7 @@ async def test_token_bucket_invalid_data(svc: RateLimitService) -> None: ) status = await svc._check_token_bucket( - "user", "/api", int(rule.requests), rule.window_seconds, rule.burst_multiplier or 1.0, rule + "user", "/api", int(rule.requests), rule.window_seconds, rule.burst_multiplier or 1.0 ) assert status.allowed is True diff --git a/backend/tests/e2e/services/test_execution_queue_slots.py b/backend/tests/e2e/services/test_execution_queue_slots.py index a6ea80b7b..34b349fa5 100644 --- a/backend/tests/e2e/services/test_execution_queue_slots.py +++ b/backend/tests/e2e/services/test_execution_queue_slots.py @@ -58,7 +58,7 @@ async def test_scheduling_drops_expired_running_slots( await redis_client.zadd(running, {"lost-release": now - 10}) await redis_client.zadd(pending, {"next": now}) - script = await queue._get_schedule_script() + script = queue._schedule_script result = await script(keys=[running, pending], args=[1, now, now + 60]) assert result[0] == "next" @@ -73,7 +73,7 @@ async def test_scheduling_waits_while_live_slots_fill_the_limit( await redis_client.zadd(running, {"busy": now + 100}) await redis_client.zadd(pending, {"next": now}) - script = await queue._get_schedule_script() + script = queue._schedule_script assert await script(keys=[running, pending], args=[1, now, now + 60]) is None assert await redis_client.zcard(pending) == 1 diff --git a/backend/tests/e2e/test_execution_routes.py b/backend/tests/e2e/test_execution_routes.py index 8f9012bcd..47d26c78e 100644 --- a/backend/tests/e2e/test_execution_routes.py +++ b/backend/tests/e2e/test_execution_routes.py @@ -9,7 +9,6 @@ from app.infrastructure.kafka.topics import RESULT_TYPES from app.runtime_registry import DEFAULT_LANG, DEFAULT_LANG_VERSION, at_least from app.schemas_pydantic.execution import ( - CancelExecutionRequest, CancelResponse, DeleteResponse, ExampleScripts, @@ -169,11 +168,7 @@ async def test_cancel_running_execution( await wait_for_event(exec_response.execution_id, EventType.POD_CREATED) - cancel_req = CancelExecutionRequest(reason="Test cancellation") - cancel_response = await test_user.post( - f"/api/v1/executions/{exec_response.execution_id}/cancel", - json=cancel_req.model_dump(), - ) + cancel_response = await test_user.post(f"/api/v1/executions/{exec_response.execution_id}/cancel") assert cancel_response.status_code == 200 cancel_result = CancelResponse.model_validate(cancel_response.json()) @@ -191,11 +186,7 @@ async def test_cancel_completed_execution_fails(self, test_user: AsyncClient) -> request = ExecutionRequest(script="print('quick')") exec_response, _ = await submit_and_wait(test_user, request) - cancel_req = CancelExecutionRequest(reason="Too late") - cancel_response = await test_user.post( - f"/api/v1/executions/{exec_response.execution_id}/cancel", - json=cancel_req.model_dump(), - ) + cancel_response = await test_user.post(f"/api/v1/executions/{exec_response.execution_id}/cancel") assert cancel_response.status_code == 400 assert "cannot cancel" in cancel_response.json()["detail"].lower() diff --git a/backend/tests/unit/services/sse/test_sse_service.py b/backend/tests/unit/services/sse/test_sse_service.py index 226e3945b..ab9aeb815 100644 --- a/backend/tests/unit/services/sse/test_sse_service.py +++ b/backend/tests/unit/services/sse/test_sse_service.py @@ -255,7 +255,7 @@ async def test_replay_stream_yields_initial_then_live() -> None: created_at=_NOW, ) - agen = await svc.create_replay_stream(initial) + agen = svc.create_replay_stream(initial) assert await agen.__anext__() is initial @@ -313,7 +313,7 @@ async def test_replay_stream_terminal_initial_closes_immediately() -> None: created_at=_NOW, ) - agen = await svc.create_replay_stream(initial) + agen = svc.create_replay_stream(initial) assert await agen.__anext__() is initial diff --git a/backend/tests/unit/services/test_execution_queue.py b/backend/tests/unit/services/test_execution_queue.py index 5f9f3bba5..bf8350b8a 100644 --- a/backend/tests/unit/services/test_execution_queue.py +++ b/backend/tests/unit/services/test_execution_queue.py @@ -81,10 +81,9 @@ async def test_try_schedule_returns_event( enqueued_at = time.time() - 1.5 script = AsyncMock(return_value=[b"e1", str(enqueued_at).encode(), 0]) - mock_redis.register_script = MagicMock(return_value=script) + queue_service._schedule_script = script mock_redis.get = AsyncMock(return_value=event_json) - queue_service._schedule_script = None before = time.time() result = await queue_service.try_schedule(5) @@ -124,9 +123,8 @@ async def test_try_schedule_event_data_expired( ) -> None: """When the event JSON has expired from Redis, try_schedule frees the running slot and raises.""" script = AsyncMock(return_value=[b"e-gone", str(time.time()).encode(), 2]) - mock_redis.register_script = MagicMock(return_value=script) + queue_service._schedule_script = script mock_redis.get = AsyncMock(return_value=None) - queue_service._schedule_script = None with pytest.raises(QueuedRequestLostError) as lost: await queue_service.try_schedule(5) @@ -148,8 +146,7 @@ async def test_release(queue_service: ExecutionQueueService, mock_redis: AsyncMo async def test_update_priority_existing(queue_service: ExecutionQueueService, mock_redis: AsyncMock) -> None: script = AsyncMock(return_value=1) - mock_redis.register_script = MagicMock(return_value=script) - queue_service._update_priority_script = None + queue_service._update_priority_script = script result = await queue_service.update_priority("e1", QueuePriority.HIGH) assert result is True script.assert_called_once() @@ -157,8 +154,7 @@ async def test_update_priority_existing(queue_service: ExecutionQueueService, mo async def test_update_priority_missing(queue_service: ExecutionQueueService, mock_redis: AsyncMock) -> None: script = AsyncMock(return_value=0) - mock_redis.register_script = MagicMock(return_value=script) - queue_service._update_priority_script = None + queue_service._update_priority_script = script result = await queue_service.update_priority("e1", QueuePriority.HIGH) assert result is False @@ -208,7 +204,7 @@ async def test_reserve_user_slot( queue_service: ExecutionQueueService, mock_redis: AsyncMock, script_result: int, expected: bool ) -> None: script = AsyncMock(return_value=script_result) - mock_redis.register_script = MagicMock(return_value=script) + queue_service._reserve_user_slot_script = script assert await queue_service.reserve_user_slot("u1", "e1", 3) is expected diff --git a/docs/reference/openapi.json b/docs/reference/openapi.json index a568e1f11..f3b18169c 100644 --- a/docs/reference/openapi.json +++ b/docs/reference/openapi.json @@ -395,16 +395,6 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CancelExecutionRequest" - } - } - } - }, "responses": { "200": { "description": "Successful Response", @@ -4178,19 +4168,6 @@ ], "title": "Body_login_api_v1_auth_login_post" }, - "CancelExecutionRequest": { - "properties": { - "reason": { - "type": "string", - "title": "Reason", - "description": "Reason for cancellation", - "default": "User requested cancellation" - } - }, - "type": "object", - "title": "CancelExecutionRequest", - "description": "Model for cancelling an execution." - }, "CancelResponse": { "properties": { "execution_id": { diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css index 34047eaec..09e8f6f12 100644 --- a/docs/stylesheets/extra.css +++ b/docs/stylesheets/extra.css @@ -5,119 +5,12 @@ font-size: 0.85em; } -/* Mermaid diagram styling - grey-white-black theme */ +/* Mermaid diagram styling */ .mermaid { text-align: center; margin: 1em 0; } -/* Override Mermaid default blue colors to black/grey */ -.mermaid .node rect, -.mermaid .node circle, -.mermaid .node ellipse, -.mermaid .node polygon, -.mermaid .node path { - fill: #f5f5f5 !important; - stroke: #333 !important; -} - -.mermaid .node .label, -.mermaid .nodeLabel { - color: #000 !important; - fill: #000 !important; -} - -/* Flowchart edges/arrows */ -.mermaid .flowchart-link, -.mermaid .edge-pattern-solid, -.mermaid path.path { - stroke: #333 !important; -} - -.mermaid .arrowheadPath, -.mermaid marker path { - fill: #333 !important; - stroke: #333 !important; -} - -.mermaid .edgeLabel, -.mermaid .edgeLabel rect { - background-color: #fff !important; - fill: #fff !important; -} - -.mermaid .edgeLabel span, -.mermaid .edgeLabel p { - color: #000 !important; - fill: #000 !important; -} - -/* Sequence diagram actors */ -.mermaid .actor { - fill: #f5f5f5 !important; - stroke: #333 !important; -} - -.mermaid .actor-line { - stroke: #333 !important; -} - -.mermaid text.actor { - fill: #000 !important; -} - -/* Sequence diagram signals/messages */ -.mermaid .messageLine0, -.mermaid .messageLine1 { - stroke: #333 !important; -} - -.mermaid .messageText { - fill: #000 !important; -} - -/* Sequence diagram notes */ -.mermaid .note { - fill: #fff !important; - stroke: #333 !important; -} - -.mermaid .noteText { - fill: #000 !important; -} - -/* Sequence diagram loops/rects */ -.mermaid .loopLine { - stroke: #333 !important; -} - -.mermaid .loopText, -.mermaid .loopText span { - fill: #000 !important; - color: #000 !important; -} - -.mermaid rect.rect { - fill: #e8e8e8 !important; - stroke: #333 !important; -} - -/* Subgraphs */ -.mermaid .cluster rect { - fill: #fafafa !important; - stroke: #333 !important; -} - -.mermaid .cluster-label .nodeLabel { - color: #000 !important; - fill: #000 !important; -} - -/* Labels on lines */ -.mermaid .labelText { - fill: #000 !important; -} - /* Grid cards for homepage */ .md-typeset .grid.cards > ul > li { border: 1px solid var(--md-default-fg-color--lightest); @@ -169,8 +62,3 @@ .md-footer-meta { display: none; } - -/* Hide swagger-ui filter input box while keeping filtering active */ -.operation-filter-input { - display: none !important; -} diff --git a/docs/stylesheets/swagger.css b/docs/stylesheets/swagger.css new file mode 100644 index 000000000..f4bec5ddb --- /dev/null +++ b/docs/stylesheets/swagger.css @@ -0,0 +1,4 @@ +/* Swagger UI runs in an iframe; a page that sets filter= shows only its tag, without the box that edits it */ +.operation-filter-input { + display: none; +} diff --git a/frontend/e2e/fixtures.ts b/frontend/e2e/fixtures.ts index ad22279c5..53ff0b9f7 100644 --- a/frontend/e2e/fixtures.ts +++ b/frontend/e2e/fixtures.ts @@ -79,7 +79,9 @@ async function useWithCoverage(page: Page, use: (page: Page) => Promise, t } /** A route handler that never answers, so a test can look at the UI while the request is pending */ -export function holdRequest(): void {} +export function holdRequest(): void { + // Answers nothing, so the request stays pending and the page shows its loading state +} /** Accepts the next confirm() the page shows */ export function acceptDialog(dialog: Dialog): Promise { diff --git a/frontend/eslint.config.js b/frontend/eslint.config.js index 626bbfa1a..06c8e0662 100644 --- a/frontend/eslint.config.js +++ b/frontend/eslint.config.js @@ -80,11 +80,11 @@ export default [ 'error', ...['SvelteLiteral[value=', 'Literal[value=', 'TemplateElement[value.raw='].flatMap((node) => [ { - selector: `${node}/(^|\\s)dark:/]`, + selector: String.raw`${node}/(^|\s)dark:/]`, message: 'The color tokens in app.css switch with .dark on their own; drop the dark: variant.', }, { - selector: `${node}/(^|[\\s:])(text|bg|border|ring|divide|from|to|via|fill|stroke|outline|placeholder|decoration)-(slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-\\d/]`, + selector: String.raw`${node}/(^|[\s:])(text|bg|border|ring|divide|from|to|via|fill|stroke|outline|placeholder|decoration)-(slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-\d/]`, message: 'Use a color token from app.css (fg, muted, accent, danger, ...), not a raw Tailwind palette color.', }, ]), @@ -93,7 +93,7 @@ export default [ message: 'DataTable titles a column by its id; name the column after its API key instead.', }, { - selector: 'SvelteElement[name.name=/^([lL]abel|dt|th)$/] SvelteText[value=/\\w/]', + selector: String.raw`SvelteElement[name.name=/^([lL]abel|dt|th)$/] SvelteText[value=/\w/]`, message: "Label an API field with {fieldTitle('key')}; hand-written text gives it a second name.", }, ], diff --git a/frontend/src/app.css b/frontend/src/app.css index d6064dd87..352df041b 100644 --- a/frontend/src/app.css +++ b/frontend/src/app.css @@ -301,8 +301,6 @@ .cm-editor { @apply font-mono! text-sm border rounded-lg; - - height: 100% !important; } .cm-scroller { diff --git a/frontend/src/lib/api-interceptors.ts b/frontend/src/lib/api-interceptors.ts index 708412e14..960838c25 100644 --- a/frontend/src/lib/api-interceptors.ts +++ b/frontend/src/lib/api-interceptors.ts @@ -61,11 +61,9 @@ export function initializeApiInterceptors(): void { // A body that isn't an ErrorResponse, like a proxy's error page, or no response at all becomes one client.interceptors.error.use((error, response, request, opts) => { const problem = zErrorResponse.safeParse(error); - const failure: ErrorResponse = problem.success - ? problem.data - : response - ? { status: response.status, detail: `HTTP ${response.status}` } - : { status: 0, detail: 'Network error. Check your connection.' }; + let failure: ErrorResponse = { status: 0, detail: 'Network error. Check your connection.' }; + if (problem.success) failure = problem.data; + else if (response) failure = { status: response.status, detail: `HTTP ${response.status}` }; // A 4xx is the API answering as designed, and the user sees it in a toast or the form const line = { method: request?.method ?? opts.method, url: request?.url ?? opts.url, ...failure }; if (failure.status === 0 || failure.status >= 500) @@ -77,7 +75,7 @@ export function initializeApiInterceptors(): void { // --8<-- [start:csrf_injection] // The double-submit pattern: the header echoes the readable csrf_token cookie that login set client.interceptors.request.use((request) => { - const csrfToken = document.cookie.match(/(?:^|;\s*)csrf_token=([^;]*)/)?.[1]; + const csrfToken = /(?:^|;\s*)csrf_token=([^;]*)/.exec(document.cookie)?.[1]; if (request.method !== 'GET' && csrfToken) request.headers.set('X-CSRF-Token', csrfToken); return request; }); diff --git a/frontend/src/lib/api/@faker-js/faker.gen.ts b/frontend/src/lib/api/@faker-js/faker.gen.ts index a56f94994..0bab9acfa 100644 --- a/frontend/src/lib/api/@faker-js/faker.gen.ts +++ b/frontend/src/lib/api/@faker-js/faker.gen.ts @@ -2,7 +2,7 @@ import { faker, type Faker } from '@faker-js/faker'; -import type { AdminExecutionListResponse, AdminExecutionResponse, AdminUserOverview, AuthFailedEvent, BodyLoginApiV1AuthLoginPost, BrowseEventsApiV1AdminEventsBrowsePostData, BrowseEventsApiV1AdminEventsBrowsePostErrors, BrowseEventsApiV1AdminEventsBrowsePostResponses, CancelExecutionApiV1ExecutionsExecutionIdCancelPostData, CancelExecutionApiV1ExecutionsExecutionIdCancelPostErrors, CancelExecutionApiV1ExecutionsExecutionIdCancelPostResponses, CancelExecutionRequest, CancelResponse, CancelStatus, ContainerStatusInfo, CreateExecutionApiV1ExecutePostData, CreateExecutionApiV1ExecutePostErrors, CreateExecutionApiV1ExecutePostResponses, CreateSavedScriptApiV1ScriptsPostData, CreateSavedScriptApiV1ScriptsPostErrors, CreateSavedScriptApiV1ScriptsPostResponses, CreateUserApiV1AdminUsersPostData, CreateUserApiV1AdminUsersPostErrors, CreateUserApiV1AdminUsersPostResponses, DeleteEventApiV1AdminEventsEventIdDeleteData, DeleteEventApiV1AdminEventsEventIdDeleteErrors, DeleteEventApiV1AdminEventsEventIdDeleteResponses, DeleteExecutionApiV1ExecutionsExecutionIdDeleteData, DeleteExecutionApiV1ExecutionsExecutionIdDeleteErrors, DeleteExecutionApiV1ExecutionsExecutionIdDeleteResponses, DeleteNotificationApiV1NotificationsNotificationIdDeleteData, DeleteNotificationApiV1NotificationsNotificationIdDeleteErrors, DeleteNotificationApiV1NotificationsNotificationIdDeleteResponses, DeleteNotificationResponse, DeleteResponse, DeleteSavedScriptApiV1ScriptsScriptIdDeleteData, DeleteSavedScriptApiV1ScriptsScriptIdDeleteErrors, DeleteUserApiV1AdminUsersUserIdDeleteData, DeleteUserApiV1AdminUsersUserIdDeleteErrors, DeleteUserApiV1AdminUsersUserIdDeleteResponses, DeleteUserResponse, DerivedCounts, DlqMessageDiscardedEvent, DlqMessageReceivedEvent, DlqMessageRetriedEvent, EditorSettingsInput, EditorSettingsOutput, EndpointGroup, EndpointUsageStats, Environment, ErrorResponse, EventBrowseRequest, EventBrowseResponse, EventDeleteResponse, EventDetailResponse, EventFilter, EventMetadata, EventReplayRequest, EventReplayResponse, EventReplayStatusResponse, EventReplayStatusResponseWritable, EventStatistics, EventStatsResponse, EventSummary, EventType, EventTypeCount, ExampleScripts, ExecutionAcceptedEvent, ExecutionCancelledEvent, ExecutionCompletedEvent, ExecutionErrorType, ExecutionEventsApiV1EventsExecutionsExecutionIdGetData, ExecutionEventsApiV1EventsExecutionsExecutionIdGetErrors, ExecutionEventsApiV1EventsExecutionsExecutionIdGetResponses, ExecutionFailedEvent, ExecutionListResponse, ExecutionQueuedEvent, ExecutionRequest, ExecutionRequestedEvent, ExecutionResponse, ExecutionResult, ExecutionRunningEvent, ExecutionStartedEvent, ExecutionStatus, ExecutionTimeoutEvent, ExportEventsApiV1AdminEventsExportExportFormatGetData, ExportEventsApiV1AdminEventsExportExportFormatGetErrors, ExportEventsApiV1AdminEventsExportExportFormatGetResponses, ExportFormat, GetCurrentUserProfileApiV1AuthMeGetErrors, GetCurrentUserProfileApiV1AuthMeGetResponses, GetDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetErrors, GetDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetResponses, GetEventDetailApiV1AdminEventsEventIdGetData, GetEventDetailApiV1AdminEventsEventIdGetErrors, GetEventDetailApiV1AdminEventsEventIdGetResponses, GetEventStatsApiV1AdminEventsStatsGetData, GetEventStatsApiV1AdminEventsStatsGetErrors, GetEventStatsApiV1AdminEventsStatsGetResponses, GetExampleScriptsApiV1ExampleScriptsGetErrors, GetExampleScriptsApiV1ExampleScriptsGetResponses, GetExecutionEventsApiV1ExecutionsExecutionIdEventsGetData, GetExecutionEventsApiV1ExecutionsExecutionIdEventsGetErrors, GetExecutionEventsApiV1ExecutionsExecutionIdEventsGetResponses, GetK8sResourceLimitsApiV1K8sLimitsGetErrors, GetK8sResourceLimitsApiV1K8sLimitsGetResponses, GetNotificationsApiV1NotificationsGetData, GetNotificationsApiV1NotificationsGetErrors, GetNotificationsApiV1NotificationsGetResponses, GetQueueStatusApiV1AdminExecutionsQueueGetErrors, GetQueueStatusApiV1AdminExecutionsQueueGetResponses, GetResultApiV1ExecutionsExecutionIdResultGetData, GetResultApiV1ExecutionsExecutionIdResultGetErrors, GetResultApiV1ExecutionsExecutionIdResultGetResponses, GetSavedScriptApiV1ScriptsScriptIdGetData, GetSavedScriptApiV1ScriptsScriptIdGetErrors, GetSavedScriptApiV1ScriptsScriptIdGetResponses, GetSettingsHistoryApiV1UserSettingsHistoryGetData, GetSettingsHistoryApiV1UserSettingsHistoryGetErrors, GetSettingsHistoryApiV1UserSettingsHistoryGetResponses, GetSystemSettingsApiV1AdminSettingsGetErrors, GetSystemSettingsApiV1AdminSettingsGetResponses, GetUnreadCountApiV1NotificationsUnreadCountGetErrors, GetUnreadCountApiV1NotificationsUnreadCountGetResponses, GetUserApiV1AdminUsersUserIdGetData, GetUserApiV1AdminUsersUserIdGetErrors, GetUserApiV1AdminUsersUserIdGetResponses, GetUserExecutionsApiV1UserExecutionsGetData, GetUserExecutionsApiV1UserExecutionsGetErrors, GetUserExecutionsApiV1UserExecutionsGetResponses, GetUserOverviewApiV1AdminUsersUserIdOverviewGetData, GetUserOverviewApiV1AdminUsersUserIdOverviewGetErrors, GetUserOverviewApiV1AdminUsersUserIdOverviewGetResponses, GetUserRateLimitsApiV1AdminRateLimitsUserIdGetData, GetUserRateLimitsApiV1AdminRateLimitsUserIdGetErrors, GetUserRateLimitsApiV1AdminRateLimitsUserIdGetResponses, GetUserSettingsApiV1UserSettingsGetErrors, GetUserSettingsApiV1UserSettingsGetResponses, HourlyEventCount, LanguageInfo, LanguageLimits, ListExecutionsApiV1AdminExecutionsGetData, ListExecutionsApiV1AdminExecutionsGetErrors, ListExecutionsApiV1AdminExecutionsGetResponses, ListSavedScriptsApiV1ScriptsGetErrors, ListSavedScriptsApiV1ScriptsGetResponses, ListUsersApiV1AdminUsersGetData, ListUsersApiV1AdminUsersGetErrors, ListUsersApiV1AdminUsersGetResponses, LivenessApiV1HealthLiveGetErrors, LivenessApiV1HealthLiveGetResponses, LivenessResponse, LoginApiV1AuthLoginPostData, LoginApiV1AuthLoginPostErrors, LoginApiV1AuthLoginPostResponses, LoginMethod, LoginResponse, LogoutApiV1AuthLogoutPostErrors, LogoutApiV1AuthLogoutPostResponses, MarkAllReadApiV1NotificationsMarkAllReadPostErrors, MarkNotificationReadApiV1NotificationsNotificationIdReadPutData, MarkNotificationReadApiV1NotificationsNotificationIdReadPutErrors, MessageResponse, NotificationAllReadEvent, NotificationClickedEvent, NotificationCreatedEvent, NotificationDeliveredEvent, NotificationFailedEvent, NotificationListResponse, NotificationPreferencesUpdatedEvent, NotificationReadEvent, NotificationResponse, NotificationSentEvent, NotificationSettingsInput, NotificationSettingsOutput, NotificationSeverity, NotificationStatus, NotificationStreamApiV1EventsNotificationsStreamGetErrors, NotificationStreamApiV1EventsNotificationsStreamGetResponses, PasswordResetRequest, PodCreatedEvent, PodDeletedEvent, PodFailedEvent, PodRunningEvent, PodScheduledEvent, PodSucceededEvent, PodTerminatedEvent, PriorityUpdateRequest, QueuePriority, QueueStatusResponse, QuotaExceededEvent, RateLimitAlgorithm, RateLimitExceededEvent, RateLimitRuleRequest, RateLimitRuleResponse, RateLimitSummary, RateLimitUpdateRequest, RateLimitUpdateResponse, RegisterApiV1AuthRegisterPostData, RegisterApiV1AuthRegisterPostErrors, RegisterApiV1AuthRegisterPostResponses, ReplayError, ReplayEventsApiV1AdminEventsReplayPostData, ReplayEventsApiV1AdminEventsReplayPostErrors, ReplayEventsApiV1AdminEventsReplayPostResponses, ReplayStatus, ResetSystemSettingsApiV1AdminSettingsResetPostErrors, ResetSystemSettingsApiV1AdminSettingsResetPostResponses, ResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostData, ResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostErrors, ResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostResponses, ResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostData, ResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostErrors, ResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostResponses, ResourceLimitExceededEvent, ResourceLimits, ResourceUsage, ResourceUsageDomain, RestoreSettingsApiV1UserSettingsRestorePostData, RestoreSettingsApiV1UserSettingsRestorePostErrors, RestoreSettingsApiV1UserSettingsRestorePostResponses, RestoreSettingsRequest, ResultFailedEvent, ResultStoredEvent, RetryExecutionApiV1ExecutionsExecutionIdRetryPostData, RetryExecutionApiV1ExecutionsExecutionIdRetryPostErrors, RetryExecutionApiV1ExecutionsExecutionIdRetryPostResponses, SavedScriptCreateRequest, SavedScriptListResponse, SavedScriptResponse, SavedScriptUpdate, ScriptDeletedEvent, ScriptSavedEvent, ScriptSharedEvent, SecurityViolationEvent, ServiceEventCount, ServiceRecoveredEvent, ServiceUnhealthyEvent, SettingsHistoryEntry, SettingsHistoryResponse, SseControlEvent, SseExecutionEventSchema, StorageType, StreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetData, StreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetErrors, StreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetResponses, SystemErrorEvent, SystemSettingsSchemaInput, SystemSettingsSchemaOutput, Theme, ThemeUpdateRequest, UnlockResponse, UnlockUserApiV1AdminUsersUserIdUnlockPostData, UnlockUserApiV1AdminUsersUserIdUnlockPostErrors, UnlockUserApiV1AdminUsersUserIdUnlockPostResponses, UnreadCountResponse, UpdateCustomSettingApiV1UserSettingsCustomKeyPutData, UpdateCustomSettingApiV1UserSettingsCustomKeyPutErrors, UpdateCustomSettingApiV1UserSettingsCustomKeyPutResponses, UpdateEditorSettingsApiV1UserSettingsEditorPutData, UpdateEditorSettingsApiV1UserSettingsEditorPutErrors, UpdateEditorSettingsApiV1UserSettingsEditorPutResponses, UpdateNotificationSettingsApiV1UserSettingsNotificationsPutData, UpdateNotificationSettingsApiV1UserSettingsNotificationsPutErrors, UpdateNotificationSettingsApiV1UserSettingsNotificationsPutResponses, UpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutData, UpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutErrors, UpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutResponses, UpdateSavedScriptApiV1ScriptsScriptIdPutData, UpdateSavedScriptApiV1ScriptsScriptIdPutErrors, UpdateSavedScriptApiV1ScriptsScriptIdPutResponses, UpdateSystemSettingsApiV1AdminSettingsPutData, UpdateSystemSettingsApiV1AdminSettingsPutErrors, UpdateSystemSettingsApiV1AdminSettingsPutResponses, UpdateThemeApiV1UserSettingsThemePutData, UpdateThemeApiV1UserSettingsThemePutErrors, UpdateThemeApiV1UserSettingsThemePutResponses, UpdateUserApiV1AdminUsersUserIdPutData, UpdateUserApiV1AdminUsersUserIdPutErrors, UpdateUserApiV1AdminUsersUserIdPutResponses, UpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutData, UpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutErrors, UpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutResponses, UpdateUserSettingsApiV1UserSettingsPutData, UpdateUserSettingsApiV1UserSettingsPutErrors, UpdateUserSettingsApiV1UserSettingsPutResponses, UserCreate, UserCreateWritable, UserDeletedEvent, UserEventCount, UserListResponse, UserLoggedInEvent, UserLoggedOutEvent, UserLoginEvent, UserRateLimitConfigResponse, UserRateLimitsResponse, UserRegisteredEvent, UserResponse, UserRole, UserSettings, UserSettingsUpdate, UserSettingsUpdatedEvent, UserUpdate, UserUpdatedEvent, UserUpdateWritable } from '../types.gen'; +import type { AdminExecutionListResponse, AdminExecutionResponse, AdminUserOverview, AuthFailedEvent, BodyLoginApiV1AuthLoginPost, BrowseEventsApiV1AdminEventsBrowsePostData, BrowseEventsApiV1AdminEventsBrowsePostErrors, BrowseEventsApiV1AdminEventsBrowsePostResponses, CancelExecutionApiV1ExecutionsExecutionIdCancelPostData, CancelExecutionApiV1ExecutionsExecutionIdCancelPostErrors, CancelExecutionApiV1ExecutionsExecutionIdCancelPostResponses, CancelResponse, CancelStatus, ContainerStatusInfo, CreateExecutionApiV1ExecutePostData, CreateExecutionApiV1ExecutePostErrors, CreateExecutionApiV1ExecutePostResponses, CreateSavedScriptApiV1ScriptsPostData, CreateSavedScriptApiV1ScriptsPostErrors, CreateSavedScriptApiV1ScriptsPostResponses, CreateUserApiV1AdminUsersPostData, CreateUserApiV1AdminUsersPostErrors, CreateUserApiV1AdminUsersPostResponses, DeleteEventApiV1AdminEventsEventIdDeleteData, DeleteEventApiV1AdminEventsEventIdDeleteErrors, DeleteEventApiV1AdminEventsEventIdDeleteResponses, DeleteExecutionApiV1ExecutionsExecutionIdDeleteData, DeleteExecutionApiV1ExecutionsExecutionIdDeleteErrors, DeleteExecutionApiV1ExecutionsExecutionIdDeleteResponses, DeleteNotificationApiV1NotificationsNotificationIdDeleteData, DeleteNotificationApiV1NotificationsNotificationIdDeleteErrors, DeleteNotificationApiV1NotificationsNotificationIdDeleteResponses, DeleteNotificationResponse, DeleteResponse, DeleteSavedScriptApiV1ScriptsScriptIdDeleteData, DeleteSavedScriptApiV1ScriptsScriptIdDeleteErrors, DeleteUserApiV1AdminUsersUserIdDeleteData, DeleteUserApiV1AdminUsersUserIdDeleteErrors, DeleteUserApiV1AdminUsersUserIdDeleteResponses, DeleteUserResponse, DerivedCounts, DlqMessageDiscardedEvent, DlqMessageReceivedEvent, DlqMessageRetriedEvent, EditorSettingsInput, EditorSettingsOutput, EndpointGroup, EndpointUsageStats, Environment, ErrorResponse, EventBrowseRequest, EventBrowseResponse, EventDeleteResponse, EventDetailResponse, EventFilter, EventMetadata, EventReplayRequest, EventReplayResponse, EventReplayStatusResponse, EventReplayStatusResponseWritable, EventStatistics, EventStatsResponse, EventSummary, EventType, EventTypeCount, ExampleScripts, ExecutionAcceptedEvent, ExecutionCancelledEvent, ExecutionCompletedEvent, ExecutionErrorType, ExecutionEventsApiV1EventsExecutionsExecutionIdGetData, ExecutionEventsApiV1EventsExecutionsExecutionIdGetErrors, ExecutionEventsApiV1EventsExecutionsExecutionIdGetResponses, ExecutionFailedEvent, ExecutionListResponse, ExecutionQueuedEvent, ExecutionRequest, ExecutionRequestedEvent, ExecutionResponse, ExecutionResult, ExecutionRunningEvent, ExecutionStartedEvent, ExecutionStatus, ExecutionTimeoutEvent, ExportEventsApiV1AdminEventsExportExportFormatGetData, ExportEventsApiV1AdminEventsExportExportFormatGetErrors, ExportEventsApiV1AdminEventsExportExportFormatGetResponses, ExportFormat, GetCurrentUserProfileApiV1AuthMeGetErrors, GetCurrentUserProfileApiV1AuthMeGetResponses, GetDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetErrors, GetDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetResponses, GetEventDetailApiV1AdminEventsEventIdGetData, GetEventDetailApiV1AdminEventsEventIdGetErrors, GetEventDetailApiV1AdminEventsEventIdGetResponses, GetEventStatsApiV1AdminEventsStatsGetData, GetEventStatsApiV1AdminEventsStatsGetErrors, GetEventStatsApiV1AdminEventsStatsGetResponses, GetExampleScriptsApiV1ExampleScriptsGetErrors, GetExampleScriptsApiV1ExampleScriptsGetResponses, GetExecutionEventsApiV1ExecutionsExecutionIdEventsGetData, GetExecutionEventsApiV1ExecutionsExecutionIdEventsGetErrors, GetExecutionEventsApiV1ExecutionsExecutionIdEventsGetResponses, GetK8sResourceLimitsApiV1K8sLimitsGetErrors, GetK8sResourceLimitsApiV1K8sLimitsGetResponses, GetNotificationsApiV1NotificationsGetData, GetNotificationsApiV1NotificationsGetErrors, GetNotificationsApiV1NotificationsGetResponses, GetQueueStatusApiV1AdminExecutionsQueueGetErrors, GetQueueStatusApiV1AdminExecutionsQueueGetResponses, GetResultApiV1ExecutionsExecutionIdResultGetData, GetResultApiV1ExecutionsExecutionIdResultGetErrors, GetResultApiV1ExecutionsExecutionIdResultGetResponses, GetSavedScriptApiV1ScriptsScriptIdGetData, GetSavedScriptApiV1ScriptsScriptIdGetErrors, GetSavedScriptApiV1ScriptsScriptIdGetResponses, GetSettingsHistoryApiV1UserSettingsHistoryGetData, GetSettingsHistoryApiV1UserSettingsHistoryGetErrors, GetSettingsHistoryApiV1UserSettingsHistoryGetResponses, GetSystemSettingsApiV1AdminSettingsGetErrors, GetSystemSettingsApiV1AdminSettingsGetResponses, GetUnreadCountApiV1NotificationsUnreadCountGetErrors, GetUnreadCountApiV1NotificationsUnreadCountGetResponses, GetUserApiV1AdminUsersUserIdGetData, GetUserApiV1AdminUsersUserIdGetErrors, GetUserApiV1AdminUsersUserIdGetResponses, GetUserExecutionsApiV1UserExecutionsGetData, GetUserExecutionsApiV1UserExecutionsGetErrors, GetUserExecutionsApiV1UserExecutionsGetResponses, GetUserOverviewApiV1AdminUsersUserIdOverviewGetData, GetUserOverviewApiV1AdminUsersUserIdOverviewGetErrors, GetUserOverviewApiV1AdminUsersUserIdOverviewGetResponses, GetUserRateLimitsApiV1AdminRateLimitsUserIdGetData, GetUserRateLimitsApiV1AdminRateLimitsUserIdGetErrors, GetUserRateLimitsApiV1AdminRateLimitsUserIdGetResponses, GetUserSettingsApiV1UserSettingsGetErrors, GetUserSettingsApiV1UserSettingsGetResponses, HourlyEventCount, LanguageInfo, LanguageLimits, ListExecutionsApiV1AdminExecutionsGetData, ListExecutionsApiV1AdminExecutionsGetErrors, ListExecutionsApiV1AdminExecutionsGetResponses, ListSavedScriptsApiV1ScriptsGetErrors, ListSavedScriptsApiV1ScriptsGetResponses, ListUsersApiV1AdminUsersGetData, ListUsersApiV1AdminUsersGetErrors, ListUsersApiV1AdminUsersGetResponses, LivenessApiV1HealthLiveGetErrors, LivenessApiV1HealthLiveGetResponses, LivenessResponse, LoginApiV1AuthLoginPostData, LoginApiV1AuthLoginPostErrors, LoginApiV1AuthLoginPostResponses, LoginMethod, LoginResponse, LogoutApiV1AuthLogoutPostErrors, LogoutApiV1AuthLogoutPostResponses, MarkAllReadApiV1NotificationsMarkAllReadPostErrors, MarkNotificationReadApiV1NotificationsNotificationIdReadPutData, MarkNotificationReadApiV1NotificationsNotificationIdReadPutErrors, MessageResponse, NotificationAllReadEvent, NotificationClickedEvent, NotificationCreatedEvent, NotificationDeliveredEvent, NotificationFailedEvent, NotificationListResponse, NotificationPreferencesUpdatedEvent, NotificationReadEvent, NotificationResponse, NotificationSentEvent, NotificationSettingsInput, NotificationSettingsOutput, NotificationSeverity, NotificationStatus, NotificationStreamApiV1EventsNotificationsStreamGetErrors, NotificationStreamApiV1EventsNotificationsStreamGetResponses, PasswordResetRequest, PodCreatedEvent, PodDeletedEvent, PodFailedEvent, PodRunningEvent, PodScheduledEvent, PodSucceededEvent, PodTerminatedEvent, PriorityUpdateRequest, QueuePriority, QueueStatusResponse, QuotaExceededEvent, RateLimitAlgorithm, RateLimitExceededEvent, RateLimitRuleRequest, RateLimitRuleResponse, RateLimitSummary, RateLimitUpdateRequest, RateLimitUpdateResponse, RegisterApiV1AuthRegisterPostData, RegisterApiV1AuthRegisterPostErrors, RegisterApiV1AuthRegisterPostResponses, ReplayError, ReplayEventsApiV1AdminEventsReplayPostData, ReplayEventsApiV1AdminEventsReplayPostErrors, ReplayEventsApiV1AdminEventsReplayPostResponses, ReplayStatus, ResetSystemSettingsApiV1AdminSettingsResetPostErrors, ResetSystemSettingsApiV1AdminSettingsResetPostResponses, ResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostData, ResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostErrors, ResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostResponses, ResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostData, ResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostErrors, ResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostResponses, ResourceLimitExceededEvent, ResourceLimits, ResourceUsage, ResourceUsageDomain, RestoreSettingsApiV1UserSettingsRestorePostData, RestoreSettingsApiV1UserSettingsRestorePostErrors, RestoreSettingsApiV1UserSettingsRestorePostResponses, RestoreSettingsRequest, ResultFailedEvent, ResultStoredEvent, RetryExecutionApiV1ExecutionsExecutionIdRetryPostData, RetryExecutionApiV1ExecutionsExecutionIdRetryPostErrors, RetryExecutionApiV1ExecutionsExecutionIdRetryPostResponses, SavedScriptCreateRequest, SavedScriptListResponse, SavedScriptResponse, SavedScriptUpdate, ScriptDeletedEvent, ScriptSavedEvent, ScriptSharedEvent, SecurityViolationEvent, ServiceEventCount, ServiceRecoveredEvent, ServiceUnhealthyEvent, SettingsHistoryEntry, SettingsHistoryResponse, SseControlEvent, SseExecutionEventSchema, StorageType, StreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetData, StreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetErrors, StreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetResponses, SystemErrorEvent, SystemSettingsSchemaInput, SystemSettingsSchemaOutput, Theme, ThemeUpdateRequest, UnlockResponse, UnlockUserApiV1AdminUsersUserIdUnlockPostData, UnlockUserApiV1AdminUsersUserIdUnlockPostErrors, UnlockUserApiV1AdminUsersUserIdUnlockPostResponses, UnreadCountResponse, UpdateCustomSettingApiV1UserSettingsCustomKeyPutData, UpdateCustomSettingApiV1UserSettingsCustomKeyPutErrors, UpdateCustomSettingApiV1UserSettingsCustomKeyPutResponses, UpdateEditorSettingsApiV1UserSettingsEditorPutData, UpdateEditorSettingsApiV1UserSettingsEditorPutErrors, UpdateEditorSettingsApiV1UserSettingsEditorPutResponses, UpdateNotificationSettingsApiV1UserSettingsNotificationsPutData, UpdateNotificationSettingsApiV1UserSettingsNotificationsPutErrors, UpdateNotificationSettingsApiV1UserSettingsNotificationsPutResponses, UpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutData, UpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutErrors, UpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutResponses, UpdateSavedScriptApiV1ScriptsScriptIdPutData, UpdateSavedScriptApiV1ScriptsScriptIdPutErrors, UpdateSavedScriptApiV1ScriptsScriptIdPutResponses, UpdateSystemSettingsApiV1AdminSettingsPutData, UpdateSystemSettingsApiV1AdminSettingsPutErrors, UpdateSystemSettingsApiV1AdminSettingsPutResponses, UpdateThemeApiV1UserSettingsThemePutData, UpdateThemeApiV1UserSettingsThemePutErrors, UpdateThemeApiV1UserSettingsThemePutResponses, UpdateUserApiV1AdminUsersUserIdPutData, UpdateUserApiV1AdminUsersUserIdPutErrors, UpdateUserApiV1AdminUsersUserIdPutResponses, UpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutData, UpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutErrors, UpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutResponses, UpdateUserSettingsApiV1UserSettingsPutData, UpdateUserSettingsApiV1UserSettingsPutErrors, UpdateUserSettingsApiV1UserSettingsPutResponses, UserCreate, UserCreateWritable, UserDeletedEvent, UserEventCount, UserListResponse, UserLoggedInEvent, UserLoggedOutEvent, UserLoginEvent, UserRateLimitConfigResponse, UserRateLimitsResponse, UserRegisteredEvent, UserResponse, UserRole, UserSettings, UserSettingsUpdate, UserSettingsUpdatedEvent, UserUpdate, UserUpdatedEvent, UserUpdateWritable } from '../types.gen'; export type Options = { faker?: Faker; @@ -34,13 +34,6 @@ export const fakeBodyLoginApiV1AuthLoginPost = (options?: Options): BodyLoginApi }; }; -export const fakeCancelExecutionRequest = (options?: Options): CancelExecutionRequest => { - const f = options?.faker ?? faker; - return { - ...!resolveCondition(options?.includeOptional ?? true, f) ? {} : { reason: resolveCondition(options?.useDefault ?? false, f) ? 'User requested cancellation' : f.string.sample() } - }; -}; - export const fakeCancelStatus = (options?: Options): CancelStatus => { const f = options?.faker ?? faker; return f.helpers.arrayElement(['already_cancelled', 'cancellation_requested']); @@ -2072,7 +2065,6 @@ export const fakeGetResultApiV1ExecutionsExecutionIdResultGetResponsedefault = ( export const fakeCancelExecutionApiV1ExecutionsExecutionIdCancelPostRequest = (options?: Options): Omit => { const f = options?.faker ?? faker; return { - body: fakeCancelExecutionRequest(options), path: { execution_id: f.string.sample() } diff --git a/frontend/src/lib/api/index.ts b/frontend/src/lib/api/index.ts index 43eb9513d..fa7a92b80 100644 --- a/frontend/src/lib/api/index.ts +++ b/frontend/src/lib/api/index.ts @@ -3,5 +3,5 @@ export { browseEventsApiV1AdminEventsBrowsePostOptions, browseEventsApiV1AdminEventsBrowsePostQueryKey, cancelExecutionApiV1ExecutionsExecutionIdCancelPostMutation, createExecutionApiV1ExecutePostMutation, createSavedScriptApiV1ScriptsPostMutation, createUserApiV1AdminUsersPostMutation, deleteEventApiV1AdminEventsEventIdDeleteMutation, deleteExecutionApiV1ExecutionsExecutionIdDeleteMutation, deleteNotificationApiV1NotificationsNotificationIdDeleteMutation, deleteSavedScriptApiV1ScriptsScriptIdDeleteMutation, deleteUserApiV1AdminUsersUserIdDeleteMutation, exportEventsApiV1AdminEventsExportExportFormatGetOptions, exportEventsApiV1AdminEventsExportExportFormatGetQueryKey, getCurrentUserProfileApiV1AuthMeGetOptions, getCurrentUserProfileApiV1AuthMeGetQueryKey, getDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetOptions, getDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetQueryKey, getEventDetailApiV1AdminEventsEventIdGetOptions, getEventDetailApiV1AdminEventsEventIdGetQueryKey, getEventStatsApiV1AdminEventsStatsGetOptions, getEventStatsApiV1AdminEventsStatsGetQueryKey, getExampleScriptsApiV1ExampleScriptsGetOptions, getExampleScriptsApiV1ExampleScriptsGetQueryKey, getExecutionEventsApiV1ExecutionsExecutionIdEventsGetOptions, getExecutionEventsApiV1ExecutionsExecutionIdEventsGetQueryKey, getK8sResourceLimitsApiV1K8sLimitsGetOptions, getK8sResourceLimitsApiV1K8sLimitsGetQueryKey, getNotificationsApiV1NotificationsGetInfiniteOptions, getNotificationsApiV1NotificationsGetInfiniteQueryKey, getNotificationsApiV1NotificationsGetOptions, getNotificationsApiV1NotificationsGetQueryKey, getQueueStatusApiV1AdminExecutionsQueueGetOptions, getQueueStatusApiV1AdminExecutionsQueueGetQueryKey, getResultApiV1ExecutionsExecutionIdResultGetOptions, getResultApiV1ExecutionsExecutionIdResultGetQueryKey, getSavedScriptApiV1ScriptsScriptIdGetOptions, getSavedScriptApiV1ScriptsScriptIdGetQueryKey, getSettingsHistoryApiV1UserSettingsHistoryGetOptions, getSettingsHistoryApiV1UserSettingsHistoryGetQueryKey, getSystemSettingsApiV1AdminSettingsGetOptions, getSystemSettingsApiV1AdminSettingsGetQueryKey, getUnreadCountApiV1NotificationsUnreadCountGetOptions, getUnreadCountApiV1NotificationsUnreadCountGetQueryKey, getUserApiV1AdminUsersUserIdGetOptions, getUserApiV1AdminUsersUserIdGetQueryKey, getUserExecutionsApiV1UserExecutionsGetOptions, getUserExecutionsApiV1UserExecutionsGetQueryKey, getUserOverviewApiV1AdminUsersUserIdOverviewGetOptions, getUserOverviewApiV1AdminUsersUserIdOverviewGetQueryKey, getUserRateLimitsApiV1AdminRateLimitsUserIdGetOptions, getUserRateLimitsApiV1AdminRateLimitsUserIdGetQueryKey, getUserSettingsApiV1UserSettingsGetOptions, getUserSettingsApiV1UserSettingsGetQueryKey, listExecutionsApiV1AdminExecutionsGetOptions, listExecutionsApiV1AdminExecutionsGetQueryKey, listSavedScriptsApiV1ScriptsGetOptions, listSavedScriptsApiV1ScriptsGetQueryKey, listUsersApiV1AdminUsersGetInfiniteOptions, listUsersApiV1AdminUsersGetInfiniteQueryKey, listUsersApiV1AdminUsersGetOptions, listUsersApiV1AdminUsersGetQueryKey, livenessApiV1HealthLiveGetOptions, livenessApiV1HealthLiveGetQueryKey, loginApiV1AuthLoginPostMutation, logoutApiV1AuthLogoutPostMutation, markAllReadApiV1NotificationsMarkAllReadPostMutation, markNotificationReadApiV1NotificationsNotificationIdReadPutMutation, type QueryKey, registerApiV1AuthRegisterPostMutation, replayEventsApiV1AdminEventsReplayPostMutation, resetSystemSettingsApiV1AdminSettingsResetPostMutation, resetUserPasswordApiV1AdminUsersUserIdResetPasswordPostMutation, resetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostMutation, restoreSettingsApiV1UserSettingsRestorePostMutation, retryExecutionApiV1ExecutionsExecutionIdRetryPostMutation, unlockUserApiV1AdminUsersUserIdUnlockPostMutation, updateCustomSettingApiV1UserSettingsCustomKeyPutMutation, updateEditorSettingsApiV1UserSettingsEditorPutMutation, updateNotificationSettingsApiV1UserSettingsNotificationsPutMutation, updatePriorityApiV1AdminExecutionsExecutionIdPriorityPutMutation, updateSavedScriptApiV1ScriptsScriptIdPutMutation, updateSystemSettingsApiV1AdminSettingsPutMutation, updateThemeApiV1UserSettingsThemePutMutation, updateUserApiV1AdminUsersUserIdPutMutation, updateUserRateLimitsApiV1AdminRateLimitsUserIdPutMutation, updateUserSettingsApiV1UserSettingsPutMutation } from './@tanstack/svelte-query.gen'; export { client, type CreateClientConfig } from './client.gen'; export { browseEventsApiV1AdminEventsBrowsePost, cancelExecutionApiV1ExecutionsExecutionIdCancelPost, createExecutionApiV1ExecutePost, createSavedScriptApiV1ScriptsPost, createUserApiV1AdminUsersPost, deleteEventApiV1AdminEventsEventIdDelete, deleteExecutionApiV1ExecutionsExecutionIdDelete, deleteNotificationApiV1NotificationsNotificationIdDelete, deleteSavedScriptApiV1ScriptsScriptIdDelete, deleteUserApiV1AdminUsersUserIdDelete, executionEventsApiV1EventsExecutionsExecutionIdGet, exportEventsApiV1AdminEventsExportExportFormatGet, getCurrentUserProfileApiV1AuthMeGet, getDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGet, getEventDetailApiV1AdminEventsEventIdGet, getEventStatsApiV1AdminEventsStatsGet, getExampleScriptsApiV1ExampleScriptsGet, getExecutionEventsApiV1ExecutionsExecutionIdEventsGet, getK8sResourceLimitsApiV1K8sLimitsGet, getNotificationsApiV1NotificationsGet, getQueueStatusApiV1AdminExecutionsQueueGet, getResultApiV1ExecutionsExecutionIdResultGet, getSavedScriptApiV1ScriptsScriptIdGet, getSettingsHistoryApiV1UserSettingsHistoryGet, getSystemSettingsApiV1AdminSettingsGet, getUnreadCountApiV1NotificationsUnreadCountGet, getUserApiV1AdminUsersUserIdGet, getUserExecutionsApiV1UserExecutionsGet, getUserOverviewApiV1AdminUsersUserIdOverviewGet, getUserRateLimitsApiV1AdminRateLimitsUserIdGet, getUserSettingsApiV1UserSettingsGet, listExecutionsApiV1AdminExecutionsGet, listSavedScriptsApiV1ScriptsGet, listUsersApiV1AdminUsersGet, livenessApiV1HealthLiveGet, loginApiV1AuthLoginPost, logoutApiV1AuthLogoutPost, markAllReadApiV1NotificationsMarkAllReadPost, markNotificationReadApiV1NotificationsNotificationIdReadPut, notificationStreamApiV1EventsNotificationsStreamGet, type Options, registerApiV1AuthRegisterPost, replayEventsApiV1AdminEventsReplayPost, resetSystemSettingsApiV1AdminSettingsResetPost, resetUserPasswordApiV1AdminUsersUserIdResetPasswordPost, resetUserRateLimitsApiV1AdminRateLimitsUserIdResetPost, restoreSettingsApiV1UserSettingsRestorePost, retryExecutionApiV1ExecutionsExecutionIdRetryPost, streamReplayStatusApiV1AdminEventsReplaySessionIdStatusGet, unlockUserApiV1AdminUsersUserIdUnlockPost, updateCustomSettingApiV1UserSettingsCustomKeyPut, updateEditorSettingsApiV1UserSettingsEditorPut, updateNotificationSettingsApiV1UserSettingsNotificationsPut, updatePriorityApiV1AdminExecutionsExecutionIdPriorityPut, updateSavedScriptApiV1ScriptsScriptIdPut, updateSystemSettingsApiV1AdminSettingsPut, updateThemeApiV1UserSettingsThemePut, updateUserApiV1AdminUsersUserIdPut, updateUserRateLimitsApiV1AdminRateLimitsUserIdPut, updateUserSettingsApiV1UserSettingsPut } from './sdk.gen'; -export { type AdminExecutionListResponse, type AdminExecutionResponse, type AdminUserOverview, type AuthFailedEvent, type BodyLoginApiV1AuthLoginPost, type BrowseEventsApiV1AdminEventsBrowsePostData, type BrowseEventsApiV1AdminEventsBrowsePostError, type BrowseEventsApiV1AdminEventsBrowsePostErrors, type BrowseEventsApiV1AdminEventsBrowsePostResponse, type BrowseEventsApiV1AdminEventsBrowsePostResponses, type CancelExecutionApiV1ExecutionsExecutionIdCancelPostData, type CancelExecutionApiV1ExecutionsExecutionIdCancelPostError, type CancelExecutionApiV1ExecutionsExecutionIdCancelPostErrors, type CancelExecutionApiV1ExecutionsExecutionIdCancelPostResponse, type CancelExecutionApiV1ExecutionsExecutionIdCancelPostResponses, type CancelExecutionRequest, type CancelResponse, CancelStatus, type ClientOptions, type ContainerStatusInfo, type CreateExecutionApiV1ExecutePostData, type CreateExecutionApiV1ExecutePostError, type CreateExecutionApiV1ExecutePostErrors, type CreateExecutionApiV1ExecutePostResponse, type CreateExecutionApiV1ExecutePostResponses, type CreateSavedScriptApiV1ScriptsPostData, type CreateSavedScriptApiV1ScriptsPostError, type CreateSavedScriptApiV1ScriptsPostErrors, type CreateSavedScriptApiV1ScriptsPostResponse, type CreateSavedScriptApiV1ScriptsPostResponses, type CreateUserApiV1AdminUsersPostData, type CreateUserApiV1AdminUsersPostError, type CreateUserApiV1AdminUsersPostErrors, type CreateUserApiV1AdminUsersPostResponse, type CreateUserApiV1AdminUsersPostResponses, type DeleteEventApiV1AdminEventsEventIdDeleteData, type DeleteEventApiV1AdminEventsEventIdDeleteError, type DeleteEventApiV1AdminEventsEventIdDeleteErrors, type DeleteEventApiV1AdminEventsEventIdDeleteResponse, type DeleteEventApiV1AdminEventsEventIdDeleteResponses, type DeleteExecutionApiV1ExecutionsExecutionIdDeleteData, type DeleteExecutionApiV1ExecutionsExecutionIdDeleteError, type DeleteExecutionApiV1ExecutionsExecutionIdDeleteErrors, type DeleteExecutionApiV1ExecutionsExecutionIdDeleteResponse, type DeleteExecutionApiV1ExecutionsExecutionIdDeleteResponses, type DeleteNotificationApiV1NotificationsNotificationIdDeleteData, type DeleteNotificationApiV1NotificationsNotificationIdDeleteError, type DeleteNotificationApiV1NotificationsNotificationIdDeleteErrors, type DeleteNotificationApiV1NotificationsNotificationIdDeleteResponse, type DeleteNotificationApiV1NotificationsNotificationIdDeleteResponses, type DeleteNotificationResponse, type DeleteResponse, type DeleteSavedScriptApiV1ScriptsScriptIdDeleteData, type DeleteSavedScriptApiV1ScriptsScriptIdDeleteError, type DeleteSavedScriptApiV1ScriptsScriptIdDeleteErrors, type DeleteSavedScriptApiV1ScriptsScriptIdDeleteResponse, type DeleteSavedScriptApiV1ScriptsScriptIdDeleteResponses, type DeleteUserApiV1AdminUsersUserIdDeleteData, type DeleteUserApiV1AdminUsersUserIdDeleteError, type DeleteUserApiV1AdminUsersUserIdDeleteErrors, type DeleteUserApiV1AdminUsersUserIdDeleteResponse, type DeleteUserApiV1AdminUsersUserIdDeleteResponses, type DeleteUserResponse, type DerivedCounts, type DlqMessageDiscardedEvent, type DlqMessageReceivedEvent, type DlqMessageRetriedEvent, type EditorSettingsInput, type EditorSettingsOutput, EndpointGroup, type EndpointUsageStats, Environment, type ErrorResponse, type EventBrowseRequest, type EventBrowseResponse, type EventDeleteResponse, type EventDetailResponse, type EventFilter, type EventMetadata, type EventReplayRequest, type EventReplayResponse, type EventReplayStatusResponse, type EventReplayStatusResponseWritable, type EventStatistics, type EventStatsResponse, type EventSummary, EventType, type EventTypeCount, type ExampleScripts, type ExecutionAcceptedEvent, type ExecutionCancelledEvent, type ExecutionCompletedEvent, ExecutionErrorType, type ExecutionEventsApiV1EventsExecutionsExecutionIdGetData, type ExecutionEventsApiV1EventsExecutionsExecutionIdGetError, type ExecutionEventsApiV1EventsExecutionsExecutionIdGetErrors, type ExecutionEventsApiV1EventsExecutionsExecutionIdGetResponse, type ExecutionEventsApiV1EventsExecutionsExecutionIdGetResponses, type ExecutionFailedEvent, type ExecutionListResponse, type ExecutionQueuedEvent, type ExecutionRequest, type ExecutionRequestedEvent, type ExecutionResponse, type ExecutionResult, type ExecutionRunningEvent, type ExecutionStartedEvent, ExecutionStatus, type ExecutionTimeoutEvent, type ExportEventsApiV1AdminEventsExportExportFormatGetData, type ExportEventsApiV1AdminEventsExportExportFormatGetError, type ExportEventsApiV1AdminEventsExportExportFormatGetErrors, type ExportEventsApiV1AdminEventsExportExportFormatGetResponses, ExportFormat, type GetCurrentUserProfileApiV1AuthMeGetData, type GetCurrentUserProfileApiV1AuthMeGetError, type GetCurrentUserProfileApiV1AuthMeGetErrors, type GetCurrentUserProfileApiV1AuthMeGetResponse, type GetCurrentUserProfileApiV1AuthMeGetResponses, type GetDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetData, type GetDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetError, type GetDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetErrors, type GetDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetResponse, type GetDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetResponses, type GetEventDetailApiV1AdminEventsEventIdGetData, type GetEventDetailApiV1AdminEventsEventIdGetError, type GetEventDetailApiV1AdminEventsEventIdGetErrors, type GetEventDetailApiV1AdminEventsEventIdGetResponse, type GetEventDetailApiV1AdminEventsEventIdGetResponses, type GetEventStatsApiV1AdminEventsStatsGetData, type GetEventStatsApiV1AdminEventsStatsGetError, type GetEventStatsApiV1AdminEventsStatsGetErrors, type GetEventStatsApiV1AdminEventsStatsGetResponse, type GetEventStatsApiV1AdminEventsStatsGetResponses, type GetExampleScriptsApiV1ExampleScriptsGetData, type GetExampleScriptsApiV1ExampleScriptsGetError, type GetExampleScriptsApiV1ExampleScriptsGetErrors, type GetExampleScriptsApiV1ExampleScriptsGetResponse, type GetExampleScriptsApiV1ExampleScriptsGetResponses, type GetExecutionEventsApiV1ExecutionsExecutionIdEventsGetData, type GetExecutionEventsApiV1ExecutionsExecutionIdEventsGetError, type GetExecutionEventsApiV1ExecutionsExecutionIdEventsGetErrors, type GetExecutionEventsApiV1ExecutionsExecutionIdEventsGetResponse, type GetExecutionEventsApiV1ExecutionsExecutionIdEventsGetResponses, type GetK8sResourceLimitsApiV1K8sLimitsGetData, type GetK8sResourceLimitsApiV1K8sLimitsGetError, type GetK8sResourceLimitsApiV1K8sLimitsGetErrors, type GetK8sResourceLimitsApiV1K8sLimitsGetResponse, type GetK8sResourceLimitsApiV1K8sLimitsGetResponses, type GetNotificationsApiV1NotificationsGetData, type GetNotificationsApiV1NotificationsGetError, type GetNotificationsApiV1NotificationsGetErrors, type GetNotificationsApiV1NotificationsGetResponse, type GetNotificationsApiV1NotificationsGetResponses, type GetQueueStatusApiV1AdminExecutionsQueueGetData, type GetQueueStatusApiV1AdminExecutionsQueueGetError, type GetQueueStatusApiV1AdminExecutionsQueueGetErrors, type GetQueueStatusApiV1AdminExecutionsQueueGetResponse, type GetQueueStatusApiV1AdminExecutionsQueueGetResponses, type GetResultApiV1ExecutionsExecutionIdResultGetData, type GetResultApiV1ExecutionsExecutionIdResultGetError, type GetResultApiV1ExecutionsExecutionIdResultGetErrors, type GetResultApiV1ExecutionsExecutionIdResultGetResponse, type GetResultApiV1ExecutionsExecutionIdResultGetResponses, type GetSavedScriptApiV1ScriptsScriptIdGetData, type GetSavedScriptApiV1ScriptsScriptIdGetError, type GetSavedScriptApiV1ScriptsScriptIdGetErrors, type GetSavedScriptApiV1ScriptsScriptIdGetResponse, type GetSavedScriptApiV1ScriptsScriptIdGetResponses, type GetSettingsHistoryApiV1UserSettingsHistoryGetData, type GetSettingsHistoryApiV1UserSettingsHistoryGetError, type GetSettingsHistoryApiV1UserSettingsHistoryGetErrors, type GetSettingsHistoryApiV1UserSettingsHistoryGetResponse, type GetSettingsHistoryApiV1UserSettingsHistoryGetResponses, type GetSystemSettingsApiV1AdminSettingsGetData, type GetSystemSettingsApiV1AdminSettingsGetError, type GetSystemSettingsApiV1AdminSettingsGetErrors, type GetSystemSettingsApiV1AdminSettingsGetResponse, type GetSystemSettingsApiV1AdminSettingsGetResponses, type GetUnreadCountApiV1NotificationsUnreadCountGetData, type GetUnreadCountApiV1NotificationsUnreadCountGetError, type GetUnreadCountApiV1NotificationsUnreadCountGetErrors, type GetUnreadCountApiV1NotificationsUnreadCountGetResponse, type GetUnreadCountApiV1NotificationsUnreadCountGetResponses, type GetUserApiV1AdminUsersUserIdGetData, type GetUserApiV1AdminUsersUserIdGetError, type GetUserApiV1AdminUsersUserIdGetErrors, type GetUserApiV1AdminUsersUserIdGetResponse, type GetUserApiV1AdminUsersUserIdGetResponses, type GetUserExecutionsApiV1UserExecutionsGetData, type GetUserExecutionsApiV1UserExecutionsGetError, type GetUserExecutionsApiV1UserExecutionsGetErrors, type GetUserExecutionsApiV1UserExecutionsGetResponse, type GetUserExecutionsApiV1UserExecutionsGetResponses, type GetUserOverviewApiV1AdminUsersUserIdOverviewGetData, type GetUserOverviewApiV1AdminUsersUserIdOverviewGetError, type GetUserOverviewApiV1AdminUsersUserIdOverviewGetErrors, type GetUserOverviewApiV1AdminUsersUserIdOverviewGetResponse, type GetUserOverviewApiV1AdminUsersUserIdOverviewGetResponses, type GetUserRateLimitsApiV1AdminRateLimitsUserIdGetData, type GetUserRateLimitsApiV1AdminRateLimitsUserIdGetError, type GetUserRateLimitsApiV1AdminRateLimitsUserIdGetErrors, type GetUserRateLimitsApiV1AdminRateLimitsUserIdGetResponse, type GetUserRateLimitsApiV1AdminRateLimitsUserIdGetResponses, type GetUserSettingsApiV1UserSettingsGetData, type GetUserSettingsApiV1UserSettingsGetError, type GetUserSettingsApiV1UserSettingsGetErrors, type GetUserSettingsApiV1UserSettingsGetResponse, type GetUserSettingsApiV1UserSettingsGetResponses, type HourlyEventCount, type LanguageInfo, type LanguageLimits, type ListExecutionsApiV1AdminExecutionsGetData, type ListExecutionsApiV1AdminExecutionsGetError, type ListExecutionsApiV1AdminExecutionsGetErrors, type ListExecutionsApiV1AdminExecutionsGetResponse, type ListExecutionsApiV1AdminExecutionsGetResponses, type ListSavedScriptsApiV1ScriptsGetData, type ListSavedScriptsApiV1ScriptsGetError, type ListSavedScriptsApiV1ScriptsGetErrors, type ListSavedScriptsApiV1ScriptsGetResponse, type ListSavedScriptsApiV1ScriptsGetResponses, type ListUsersApiV1AdminUsersGetData, type ListUsersApiV1AdminUsersGetError, type ListUsersApiV1AdminUsersGetErrors, type ListUsersApiV1AdminUsersGetResponse, type ListUsersApiV1AdminUsersGetResponses, type LivenessApiV1HealthLiveGetData, type LivenessApiV1HealthLiveGetError, type LivenessApiV1HealthLiveGetErrors, type LivenessApiV1HealthLiveGetResponse, type LivenessApiV1HealthLiveGetResponses, type LivenessResponse, type LoginApiV1AuthLoginPostData, type LoginApiV1AuthLoginPostError, type LoginApiV1AuthLoginPostErrors, type LoginApiV1AuthLoginPostResponse, type LoginApiV1AuthLoginPostResponses, LoginMethod, type LoginResponse, type LogoutApiV1AuthLogoutPostData, type LogoutApiV1AuthLogoutPostError, type LogoutApiV1AuthLogoutPostErrors, type LogoutApiV1AuthLogoutPostResponse, type LogoutApiV1AuthLogoutPostResponses, type MarkAllReadApiV1NotificationsMarkAllReadPostData, type MarkAllReadApiV1NotificationsMarkAllReadPostError, type MarkAllReadApiV1NotificationsMarkAllReadPostErrors, type MarkAllReadApiV1NotificationsMarkAllReadPostResponse, type MarkAllReadApiV1NotificationsMarkAllReadPostResponses, type MarkNotificationReadApiV1NotificationsNotificationIdReadPutData, type MarkNotificationReadApiV1NotificationsNotificationIdReadPutError, type MarkNotificationReadApiV1NotificationsNotificationIdReadPutErrors, type MarkNotificationReadApiV1NotificationsNotificationIdReadPutResponse, type MarkNotificationReadApiV1NotificationsNotificationIdReadPutResponses, type MessageResponse, type NotificationAllReadEvent, type NotificationClickedEvent, type NotificationCreatedEvent, type NotificationDeliveredEvent, type NotificationFailedEvent, type NotificationListResponse, type NotificationPreferencesUpdatedEvent, type NotificationReadEvent, type NotificationResponse, type NotificationSentEvent, type NotificationSettingsInput, type NotificationSettingsOutput, NotificationSeverity, NotificationStatus, type NotificationStreamApiV1EventsNotificationsStreamGetData, type NotificationStreamApiV1EventsNotificationsStreamGetError, type NotificationStreamApiV1EventsNotificationsStreamGetErrors, type NotificationStreamApiV1EventsNotificationsStreamGetResponse, type NotificationStreamApiV1EventsNotificationsStreamGetResponses, type PasswordResetRequest, type PodCreatedEvent, type PodDeletedEvent, type PodFailedEvent, type PodRunningEvent, type PodScheduledEvent, type PodSucceededEvent, type PodTerminatedEvent, type PriorityUpdateRequest, QueuePriority, type QueueStatusResponse, type QuotaExceededEvent, RateLimitAlgorithm, type RateLimitExceededEvent, type RateLimitRuleRequest, type RateLimitRuleResponse, type RateLimitSummary, type RateLimitUpdateRequest, type RateLimitUpdateResponse, type RegisterApiV1AuthRegisterPostData, type RegisterApiV1AuthRegisterPostError, type RegisterApiV1AuthRegisterPostErrors, type RegisterApiV1AuthRegisterPostResponse, type RegisterApiV1AuthRegisterPostResponses, type ReplayError, type ReplayEventsApiV1AdminEventsReplayPostData, type ReplayEventsApiV1AdminEventsReplayPostError, type ReplayEventsApiV1AdminEventsReplayPostErrors, type ReplayEventsApiV1AdminEventsReplayPostResponse, type ReplayEventsApiV1AdminEventsReplayPostResponses, ReplayStatus, type ResetSystemSettingsApiV1AdminSettingsResetPostData, type ResetSystemSettingsApiV1AdminSettingsResetPostError, type ResetSystemSettingsApiV1AdminSettingsResetPostErrors, type ResetSystemSettingsApiV1AdminSettingsResetPostResponse, type ResetSystemSettingsApiV1AdminSettingsResetPostResponses, type ResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostData, type ResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostError, type ResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostErrors, type ResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostResponse, type ResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostResponses, type ResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostData, type ResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostError, type ResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostErrors, type ResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostResponse, type ResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostResponses, type ResourceLimitExceededEvent, type ResourceLimits, type ResourceUsage, type ResourceUsageDomain, type RestoreSettingsApiV1UserSettingsRestorePostData, type RestoreSettingsApiV1UserSettingsRestorePostError, type RestoreSettingsApiV1UserSettingsRestorePostErrors, type RestoreSettingsApiV1UserSettingsRestorePostResponse, type RestoreSettingsApiV1UserSettingsRestorePostResponses, type RestoreSettingsRequest, type ResultFailedEvent, type ResultStoredEvent, type RetryExecutionApiV1ExecutionsExecutionIdRetryPostData, type RetryExecutionApiV1ExecutionsExecutionIdRetryPostError, type RetryExecutionApiV1ExecutionsExecutionIdRetryPostErrors, type RetryExecutionApiV1ExecutionsExecutionIdRetryPostResponse, type RetryExecutionApiV1ExecutionsExecutionIdRetryPostResponses, type SavedScriptCreateRequest, type SavedScriptListResponse, type SavedScriptResponse, type SavedScriptUpdate, type ScriptDeletedEvent, type ScriptSavedEvent, type ScriptSharedEvent, type SecurityViolationEvent, type ServiceEventCount, type ServiceRecoveredEvent, type ServiceUnhealthyEvent, type SettingsHistoryEntry, type SettingsHistoryResponse, SseControlEvent, type SseExecutionEventSchema, StorageType, type StreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetData, type StreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetError, type StreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetErrors, type StreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetResponse, type StreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetResponses, type SystemErrorEvent, type SystemSettingsSchemaInput, type SystemSettingsSchemaOutput, Theme, type ThemeUpdateRequest, type UnlockResponse, type UnlockUserApiV1AdminUsersUserIdUnlockPostData, type UnlockUserApiV1AdminUsersUserIdUnlockPostError, type UnlockUserApiV1AdminUsersUserIdUnlockPostErrors, type UnlockUserApiV1AdminUsersUserIdUnlockPostResponse, type UnlockUserApiV1AdminUsersUserIdUnlockPostResponses, type UnreadCountResponse, type UpdateCustomSettingApiV1UserSettingsCustomKeyPutData, type UpdateCustomSettingApiV1UserSettingsCustomKeyPutError, type UpdateCustomSettingApiV1UserSettingsCustomKeyPutErrors, type UpdateCustomSettingApiV1UserSettingsCustomKeyPutResponse, type UpdateCustomSettingApiV1UserSettingsCustomKeyPutResponses, type UpdateEditorSettingsApiV1UserSettingsEditorPutData, type UpdateEditorSettingsApiV1UserSettingsEditorPutError, type UpdateEditorSettingsApiV1UserSettingsEditorPutErrors, type UpdateEditorSettingsApiV1UserSettingsEditorPutResponse, type UpdateEditorSettingsApiV1UserSettingsEditorPutResponses, type UpdateNotificationSettingsApiV1UserSettingsNotificationsPutData, type UpdateNotificationSettingsApiV1UserSettingsNotificationsPutError, type UpdateNotificationSettingsApiV1UserSettingsNotificationsPutErrors, type UpdateNotificationSettingsApiV1UserSettingsNotificationsPutResponse, type UpdateNotificationSettingsApiV1UserSettingsNotificationsPutResponses, type UpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutData, type UpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutError, type UpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutErrors, type UpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutResponse, type UpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutResponses, type UpdateSavedScriptApiV1ScriptsScriptIdPutData, type UpdateSavedScriptApiV1ScriptsScriptIdPutError, type UpdateSavedScriptApiV1ScriptsScriptIdPutErrors, type UpdateSavedScriptApiV1ScriptsScriptIdPutResponse, type UpdateSavedScriptApiV1ScriptsScriptIdPutResponses, type UpdateSystemSettingsApiV1AdminSettingsPutData, type UpdateSystemSettingsApiV1AdminSettingsPutError, type UpdateSystemSettingsApiV1AdminSettingsPutErrors, type UpdateSystemSettingsApiV1AdminSettingsPutResponse, type UpdateSystemSettingsApiV1AdminSettingsPutResponses, type UpdateThemeApiV1UserSettingsThemePutData, type UpdateThemeApiV1UserSettingsThemePutError, type UpdateThemeApiV1UserSettingsThemePutErrors, type UpdateThemeApiV1UserSettingsThemePutResponse, type UpdateThemeApiV1UserSettingsThemePutResponses, type UpdateUserApiV1AdminUsersUserIdPutData, type UpdateUserApiV1AdminUsersUserIdPutError, type UpdateUserApiV1AdminUsersUserIdPutErrors, type UpdateUserApiV1AdminUsersUserIdPutResponse, type UpdateUserApiV1AdminUsersUserIdPutResponses, type UpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutData, type UpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutError, type UpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutErrors, type UpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutResponse, type UpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutResponses, type UpdateUserSettingsApiV1UserSettingsPutData, type UpdateUserSettingsApiV1UserSettingsPutError, type UpdateUserSettingsApiV1UserSettingsPutErrors, type UpdateUserSettingsApiV1UserSettingsPutResponse, type UpdateUserSettingsApiV1UserSettingsPutResponses, type UserCreate, type UserCreateWritable, type UserDeletedEvent, type UserEventCount, type UserListResponse, type UserLoggedInEvent, type UserLoggedOutEvent, type UserLoginEvent, type UserRateLimitConfigResponse, type UserRateLimitsResponse, type UserRegisteredEvent, type UserResponse, UserRole, type UserSettings, type UserSettingsUpdate, type UserSettingsUpdatedEvent, type UserUpdate, type UserUpdatedEvent, type UserUpdateWritable } from './types.gen'; -export { zAdminExecutionListResponse, zAdminExecutionResponse, zAdminUserOverview, zAuthFailedEvent, zBodyLoginApiV1AuthLoginPost, zBrowseEventsApiV1AdminEventsBrowsePostBody, zBrowseEventsApiV1AdminEventsBrowsePostResponse, zCancelExecutionApiV1ExecutionsExecutionIdCancelPostBody, zCancelExecutionApiV1ExecutionsExecutionIdCancelPostPath, zCancelExecutionApiV1ExecutionsExecutionIdCancelPostResponse, zCancelExecutionRequest, zCancelResponse, zCancelStatus, zContainerStatusInfo, zCreateExecutionApiV1ExecutePostBody, zCreateExecutionApiV1ExecutePostHeaders, zCreateExecutionApiV1ExecutePostResponse, zCreateSavedScriptApiV1ScriptsPostBody, zCreateSavedScriptApiV1ScriptsPostResponse, zCreateUserApiV1AdminUsersPostBody, zCreateUserApiV1AdminUsersPostResponse, zDeleteEventApiV1AdminEventsEventIdDeletePath, zDeleteEventApiV1AdminEventsEventIdDeleteResponse, zDeleteExecutionApiV1ExecutionsExecutionIdDeletePath, zDeleteExecutionApiV1ExecutionsExecutionIdDeleteResponse, zDeleteNotificationApiV1NotificationsNotificationIdDeletePath, zDeleteNotificationApiV1NotificationsNotificationIdDeleteResponse, zDeleteNotificationResponse, zDeleteResponse, zDeleteSavedScriptApiV1ScriptsScriptIdDeletePath, zDeleteSavedScriptApiV1ScriptsScriptIdDeleteResponse, zDeleteUserApiV1AdminUsersUserIdDeletePath, zDeleteUserApiV1AdminUsersUserIdDeleteQuery, zDeleteUserApiV1AdminUsersUserIdDeleteResponse, zDeleteUserResponse, zDerivedCounts, zDlqMessageDiscardedEvent, zDlqMessageReceivedEvent, zDlqMessageRetriedEvent, zEditorSettingsInput, zEditorSettingsOutput, zEndpointGroup, zEndpointUsageStats, zEnvironment, zErrorResponse, zEventBrowseRequest, zEventBrowseResponse, zEventDeleteResponse, zEventDetailResponse, zEventFilter, zEventMetadata, zEventReplayRequest, zEventReplayResponse, zEventReplayStatusResponse, zEventReplayStatusResponseWritable, zEventStatistics, zEventStatsResponse, zEventSummary, zEventType, zEventTypeCount, zExampleScripts, zExecutionAcceptedEvent, zExecutionCancelledEvent, zExecutionCompletedEvent, zExecutionErrorType, zExecutionEventsApiV1EventsExecutionsExecutionIdGetPath, zExecutionEventsApiV1EventsExecutionsExecutionIdGetResponse, zExecutionFailedEvent, zExecutionListResponse, zExecutionQueuedEvent, zExecutionRequest, zExecutionRequestedEvent, zExecutionResponse, zExecutionResult, zExecutionRunningEvent, zExecutionStartedEvent, zExecutionStatus, zExecutionTimeoutEvent, zExportEventsApiV1AdminEventsExportExportFormatGetPath, zExportEventsApiV1AdminEventsExportExportFormatGetQuery, zExportFormat, zGetCurrentUserProfileApiV1AuthMeGetResponse, zGetDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetResponse, zGetEventDetailApiV1AdminEventsEventIdGetPath, zGetEventDetailApiV1AdminEventsEventIdGetResponse, zGetEventStatsApiV1AdminEventsStatsGetQuery, zGetEventStatsApiV1AdminEventsStatsGetResponse, zGetExampleScriptsApiV1ExampleScriptsGetResponse, zGetExecutionEventsApiV1ExecutionsExecutionIdEventsGetPath, zGetExecutionEventsApiV1ExecutionsExecutionIdEventsGetQuery, zGetExecutionEventsApiV1ExecutionsExecutionIdEventsGetResponse, zGetK8sResourceLimitsApiV1K8sLimitsGetResponse, zGetNotificationsApiV1NotificationsGetQuery, zGetNotificationsApiV1NotificationsGetResponse, zGetQueueStatusApiV1AdminExecutionsQueueGetResponse, zGetResultApiV1ExecutionsExecutionIdResultGetPath, zGetResultApiV1ExecutionsExecutionIdResultGetResponse, zGetSavedScriptApiV1ScriptsScriptIdGetPath, zGetSavedScriptApiV1ScriptsScriptIdGetResponse, zGetSettingsHistoryApiV1UserSettingsHistoryGetQuery, zGetSettingsHistoryApiV1UserSettingsHistoryGetResponse, zGetSystemSettingsApiV1AdminSettingsGetResponse, zGetUnreadCountApiV1NotificationsUnreadCountGetResponse, zGetUserApiV1AdminUsersUserIdGetPath, zGetUserApiV1AdminUsersUserIdGetResponse, zGetUserExecutionsApiV1UserExecutionsGetQuery, zGetUserExecutionsApiV1UserExecutionsGetResponse, zGetUserOverviewApiV1AdminUsersUserIdOverviewGetPath, zGetUserOverviewApiV1AdminUsersUserIdOverviewGetResponse, zGetUserRateLimitsApiV1AdminRateLimitsUserIdGetPath, zGetUserRateLimitsApiV1AdminRateLimitsUserIdGetResponse, zGetUserSettingsApiV1UserSettingsGetResponse, zHourlyEventCount, zLanguageInfo, zLanguageLimits, zListExecutionsApiV1AdminExecutionsGetQuery, zListExecutionsApiV1AdminExecutionsGetResponse, zListSavedScriptsApiV1ScriptsGetResponse, zListUsersApiV1AdminUsersGetQuery, zListUsersApiV1AdminUsersGetResponse, zLivenessApiV1HealthLiveGetResponse, zLivenessResponse, zLoginApiV1AuthLoginPostBody, zLoginApiV1AuthLoginPostResponse, zLoginMethod, zLoginResponse, zLogoutApiV1AuthLogoutPostResponse, zMarkAllReadApiV1NotificationsMarkAllReadPostResponse, zMarkNotificationReadApiV1NotificationsNotificationIdReadPutPath, zMarkNotificationReadApiV1NotificationsNotificationIdReadPutResponse, zMessageResponse, zNotificationAllReadEvent, zNotificationClickedEvent, zNotificationCreatedEvent, zNotificationDeliveredEvent, zNotificationFailedEvent, zNotificationListResponse, zNotificationPreferencesUpdatedEvent, zNotificationReadEvent, zNotificationResponse, zNotificationSentEvent, zNotificationSettingsInput, zNotificationSettingsOutput, zNotificationSeverity, zNotificationStatus, zNotificationStreamApiV1EventsNotificationsStreamGetResponse, zPasswordResetRequest, zPodCreatedEvent, zPodDeletedEvent, zPodFailedEvent, zPodRunningEvent, zPodScheduledEvent, zPodSucceededEvent, zPodTerminatedEvent, zPriorityUpdateRequest, zQueuePriority, zQueueStatusResponse, zQuotaExceededEvent, zRateLimitAlgorithm, zRateLimitExceededEvent, zRateLimitRuleRequest, zRateLimitRuleResponse, zRateLimitSummary, zRateLimitUpdateRequest, zRateLimitUpdateResponse, zRegisterApiV1AuthRegisterPostBody, zRegisterApiV1AuthRegisterPostResponse, zReplayError, zReplayEventsApiV1AdminEventsReplayPostBody, zReplayEventsApiV1AdminEventsReplayPostResponse, zReplayStatus, zResetSystemSettingsApiV1AdminSettingsResetPostResponse, zResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostBody, zResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostPath, zResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostResponse, zResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostPath, zResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostResponse, zResourceLimitExceededEvent, zResourceLimits, zResourceUsage, zResourceUsageDomain, zRestoreSettingsApiV1UserSettingsRestorePostBody, zRestoreSettingsApiV1UserSettingsRestorePostResponse, zRestoreSettingsRequest, zResultFailedEvent, zResultStoredEvent, zRetryExecutionApiV1ExecutionsExecutionIdRetryPostPath, zRetryExecutionApiV1ExecutionsExecutionIdRetryPostResponse, zSavedScriptCreateRequest, zSavedScriptListResponse, zSavedScriptResponse, zSavedScriptUpdate, zScriptDeletedEvent, zScriptSavedEvent, zScriptSharedEvent, zSecurityViolationEvent, zServiceEventCount, zServiceRecoveredEvent, zServiceUnhealthyEvent, zSettingsHistoryEntry, zSettingsHistoryResponse, zSseControlEvent, zSseExecutionEventSchema, zStorageType, zStreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetPath, zStreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetResponse, zSystemErrorEvent, zSystemSettingsSchemaInput, zSystemSettingsSchemaOutput, zTheme, zThemeUpdateRequest, zUnlockResponse, zUnlockUserApiV1AdminUsersUserIdUnlockPostPath, zUnlockUserApiV1AdminUsersUserIdUnlockPostResponse, zUnreadCountResponse, zUpdateCustomSettingApiV1UserSettingsCustomKeyPutBody, zUpdateCustomSettingApiV1UserSettingsCustomKeyPutPath, zUpdateCustomSettingApiV1UserSettingsCustomKeyPutResponse, zUpdateEditorSettingsApiV1UserSettingsEditorPutBody, zUpdateEditorSettingsApiV1UserSettingsEditorPutResponse, zUpdateNotificationSettingsApiV1UserSettingsNotificationsPutBody, zUpdateNotificationSettingsApiV1UserSettingsNotificationsPutResponse, zUpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutBody, zUpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutPath, zUpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutResponse, zUpdateSavedScriptApiV1ScriptsScriptIdPutBody, zUpdateSavedScriptApiV1ScriptsScriptIdPutPath, zUpdateSavedScriptApiV1ScriptsScriptIdPutResponse, zUpdateSystemSettingsApiV1AdminSettingsPutBody, zUpdateSystemSettingsApiV1AdminSettingsPutResponse, zUpdateThemeApiV1UserSettingsThemePutBody, zUpdateThemeApiV1UserSettingsThemePutResponse, zUpdateUserApiV1AdminUsersUserIdPutBody, zUpdateUserApiV1AdminUsersUserIdPutPath, zUpdateUserApiV1AdminUsersUserIdPutResponse, zUpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutBody, zUpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutPath, zUpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutResponse, zUpdateUserSettingsApiV1UserSettingsPutBody, zUpdateUserSettingsApiV1UserSettingsPutResponse, zUserCreate, zUserCreateWritable, zUserDeletedEvent, zUserEventCount, zUserListResponse, zUserLoggedInEvent, zUserLoggedOutEvent, zUserLoginEvent, zUserRateLimitConfigResponse, zUserRateLimitsResponse, zUserRegisteredEvent, zUserResponse, zUserRole, zUserSettings, zUserSettingsUpdate, zUserSettingsUpdatedEvent, zUserUpdate, zUserUpdatedEvent, zUserUpdateWritable } from './zod.gen'; +export { type AdminExecutionListResponse, type AdminExecutionResponse, type AdminUserOverview, type AuthFailedEvent, type BodyLoginApiV1AuthLoginPost, type BrowseEventsApiV1AdminEventsBrowsePostData, type BrowseEventsApiV1AdminEventsBrowsePostError, type BrowseEventsApiV1AdminEventsBrowsePostErrors, type BrowseEventsApiV1AdminEventsBrowsePostResponse, type BrowseEventsApiV1AdminEventsBrowsePostResponses, type CancelExecutionApiV1ExecutionsExecutionIdCancelPostData, type CancelExecutionApiV1ExecutionsExecutionIdCancelPostError, type CancelExecutionApiV1ExecutionsExecutionIdCancelPostErrors, type CancelExecutionApiV1ExecutionsExecutionIdCancelPostResponse, type CancelExecutionApiV1ExecutionsExecutionIdCancelPostResponses, type CancelResponse, CancelStatus, type ClientOptions, type ContainerStatusInfo, type CreateExecutionApiV1ExecutePostData, type CreateExecutionApiV1ExecutePostError, type CreateExecutionApiV1ExecutePostErrors, type CreateExecutionApiV1ExecutePostResponse, type CreateExecutionApiV1ExecutePostResponses, type CreateSavedScriptApiV1ScriptsPostData, type CreateSavedScriptApiV1ScriptsPostError, type CreateSavedScriptApiV1ScriptsPostErrors, type CreateSavedScriptApiV1ScriptsPostResponse, type CreateSavedScriptApiV1ScriptsPostResponses, type CreateUserApiV1AdminUsersPostData, type CreateUserApiV1AdminUsersPostError, type CreateUserApiV1AdminUsersPostErrors, type CreateUserApiV1AdminUsersPostResponse, type CreateUserApiV1AdminUsersPostResponses, type DeleteEventApiV1AdminEventsEventIdDeleteData, type DeleteEventApiV1AdminEventsEventIdDeleteError, type DeleteEventApiV1AdminEventsEventIdDeleteErrors, type DeleteEventApiV1AdminEventsEventIdDeleteResponse, type DeleteEventApiV1AdminEventsEventIdDeleteResponses, type DeleteExecutionApiV1ExecutionsExecutionIdDeleteData, type DeleteExecutionApiV1ExecutionsExecutionIdDeleteError, type DeleteExecutionApiV1ExecutionsExecutionIdDeleteErrors, type DeleteExecutionApiV1ExecutionsExecutionIdDeleteResponse, type DeleteExecutionApiV1ExecutionsExecutionIdDeleteResponses, type DeleteNotificationApiV1NotificationsNotificationIdDeleteData, type DeleteNotificationApiV1NotificationsNotificationIdDeleteError, type DeleteNotificationApiV1NotificationsNotificationIdDeleteErrors, type DeleteNotificationApiV1NotificationsNotificationIdDeleteResponse, type DeleteNotificationApiV1NotificationsNotificationIdDeleteResponses, type DeleteNotificationResponse, type DeleteResponse, type DeleteSavedScriptApiV1ScriptsScriptIdDeleteData, type DeleteSavedScriptApiV1ScriptsScriptIdDeleteError, type DeleteSavedScriptApiV1ScriptsScriptIdDeleteErrors, type DeleteSavedScriptApiV1ScriptsScriptIdDeleteResponse, type DeleteSavedScriptApiV1ScriptsScriptIdDeleteResponses, type DeleteUserApiV1AdminUsersUserIdDeleteData, type DeleteUserApiV1AdminUsersUserIdDeleteError, type DeleteUserApiV1AdminUsersUserIdDeleteErrors, type DeleteUserApiV1AdminUsersUserIdDeleteResponse, type DeleteUserApiV1AdminUsersUserIdDeleteResponses, type DeleteUserResponse, type DerivedCounts, type DlqMessageDiscardedEvent, type DlqMessageReceivedEvent, type DlqMessageRetriedEvent, type EditorSettingsInput, type EditorSettingsOutput, EndpointGroup, type EndpointUsageStats, Environment, type ErrorResponse, type EventBrowseRequest, type EventBrowseResponse, type EventDeleteResponse, type EventDetailResponse, type EventFilter, type EventMetadata, type EventReplayRequest, type EventReplayResponse, type EventReplayStatusResponse, type EventReplayStatusResponseWritable, type EventStatistics, type EventStatsResponse, type EventSummary, EventType, type EventTypeCount, type ExampleScripts, type ExecutionAcceptedEvent, type ExecutionCancelledEvent, type ExecutionCompletedEvent, ExecutionErrorType, type ExecutionEventsApiV1EventsExecutionsExecutionIdGetData, type ExecutionEventsApiV1EventsExecutionsExecutionIdGetError, type ExecutionEventsApiV1EventsExecutionsExecutionIdGetErrors, type ExecutionEventsApiV1EventsExecutionsExecutionIdGetResponse, type ExecutionEventsApiV1EventsExecutionsExecutionIdGetResponses, type ExecutionFailedEvent, type ExecutionListResponse, type ExecutionQueuedEvent, type ExecutionRequest, type ExecutionRequestedEvent, type ExecutionResponse, type ExecutionResult, type ExecutionRunningEvent, type ExecutionStartedEvent, ExecutionStatus, type ExecutionTimeoutEvent, type ExportEventsApiV1AdminEventsExportExportFormatGetData, type ExportEventsApiV1AdminEventsExportExportFormatGetError, type ExportEventsApiV1AdminEventsExportExportFormatGetErrors, type ExportEventsApiV1AdminEventsExportExportFormatGetResponses, ExportFormat, type GetCurrentUserProfileApiV1AuthMeGetData, type GetCurrentUserProfileApiV1AuthMeGetError, type GetCurrentUserProfileApiV1AuthMeGetErrors, type GetCurrentUserProfileApiV1AuthMeGetResponse, type GetCurrentUserProfileApiV1AuthMeGetResponses, type GetDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetData, type GetDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetError, type GetDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetErrors, type GetDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetResponse, type GetDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetResponses, type GetEventDetailApiV1AdminEventsEventIdGetData, type GetEventDetailApiV1AdminEventsEventIdGetError, type GetEventDetailApiV1AdminEventsEventIdGetErrors, type GetEventDetailApiV1AdminEventsEventIdGetResponse, type GetEventDetailApiV1AdminEventsEventIdGetResponses, type GetEventStatsApiV1AdminEventsStatsGetData, type GetEventStatsApiV1AdminEventsStatsGetError, type GetEventStatsApiV1AdminEventsStatsGetErrors, type GetEventStatsApiV1AdminEventsStatsGetResponse, type GetEventStatsApiV1AdminEventsStatsGetResponses, type GetExampleScriptsApiV1ExampleScriptsGetData, type GetExampleScriptsApiV1ExampleScriptsGetError, type GetExampleScriptsApiV1ExampleScriptsGetErrors, type GetExampleScriptsApiV1ExampleScriptsGetResponse, type GetExampleScriptsApiV1ExampleScriptsGetResponses, type GetExecutionEventsApiV1ExecutionsExecutionIdEventsGetData, type GetExecutionEventsApiV1ExecutionsExecutionIdEventsGetError, type GetExecutionEventsApiV1ExecutionsExecutionIdEventsGetErrors, type GetExecutionEventsApiV1ExecutionsExecutionIdEventsGetResponse, type GetExecutionEventsApiV1ExecutionsExecutionIdEventsGetResponses, type GetK8sResourceLimitsApiV1K8sLimitsGetData, type GetK8sResourceLimitsApiV1K8sLimitsGetError, type GetK8sResourceLimitsApiV1K8sLimitsGetErrors, type GetK8sResourceLimitsApiV1K8sLimitsGetResponse, type GetK8sResourceLimitsApiV1K8sLimitsGetResponses, type GetNotificationsApiV1NotificationsGetData, type GetNotificationsApiV1NotificationsGetError, type GetNotificationsApiV1NotificationsGetErrors, type GetNotificationsApiV1NotificationsGetResponse, type GetNotificationsApiV1NotificationsGetResponses, type GetQueueStatusApiV1AdminExecutionsQueueGetData, type GetQueueStatusApiV1AdminExecutionsQueueGetError, type GetQueueStatusApiV1AdminExecutionsQueueGetErrors, type GetQueueStatusApiV1AdminExecutionsQueueGetResponse, type GetQueueStatusApiV1AdminExecutionsQueueGetResponses, type GetResultApiV1ExecutionsExecutionIdResultGetData, type GetResultApiV1ExecutionsExecutionIdResultGetError, type GetResultApiV1ExecutionsExecutionIdResultGetErrors, type GetResultApiV1ExecutionsExecutionIdResultGetResponse, type GetResultApiV1ExecutionsExecutionIdResultGetResponses, type GetSavedScriptApiV1ScriptsScriptIdGetData, type GetSavedScriptApiV1ScriptsScriptIdGetError, type GetSavedScriptApiV1ScriptsScriptIdGetErrors, type GetSavedScriptApiV1ScriptsScriptIdGetResponse, type GetSavedScriptApiV1ScriptsScriptIdGetResponses, type GetSettingsHistoryApiV1UserSettingsHistoryGetData, type GetSettingsHistoryApiV1UserSettingsHistoryGetError, type GetSettingsHistoryApiV1UserSettingsHistoryGetErrors, type GetSettingsHistoryApiV1UserSettingsHistoryGetResponse, type GetSettingsHistoryApiV1UserSettingsHistoryGetResponses, type GetSystemSettingsApiV1AdminSettingsGetData, type GetSystemSettingsApiV1AdminSettingsGetError, type GetSystemSettingsApiV1AdminSettingsGetErrors, type GetSystemSettingsApiV1AdminSettingsGetResponse, type GetSystemSettingsApiV1AdminSettingsGetResponses, type GetUnreadCountApiV1NotificationsUnreadCountGetData, type GetUnreadCountApiV1NotificationsUnreadCountGetError, type GetUnreadCountApiV1NotificationsUnreadCountGetErrors, type GetUnreadCountApiV1NotificationsUnreadCountGetResponse, type GetUnreadCountApiV1NotificationsUnreadCountGetResponses, type GetUserApiV1AdminUsersUserIdGetData, type GetUserApiV1AdminUsersUserIdGetError, type GetUserApiV1AdminUsersUserIdGetErrors, type GetUserApiV1AdminUsersUserIdGetResponse, type GetUserApiV1AdminUsersUserIdGetResponses, type GetUserExecutionsApiV1UserExecutionsGetData, type GetUserExecutionsApiV1UserExecutionsGetError, type GetUserExecutionsApiV1UserExecutionsGetErrors, type GetUserExecutionsApiV1UserExecutionsGetResponse, type GetUserExecutionsApiV1UserExecutionsGetResponses, type GetUserOverviewApiV1AdminUsersUserIdOverviewGetData, type GetUserOverviewApiV1AdminUsersUserIdOverviewGetError, type GetUserOverviewApiV1AdminUsersUserIdOverviewGetErrors, type GetUserOverviewApiV1AdminUsersUserIdOverviewGetResponse, type GetUserOverviewApiV1AdminUsersUserIdOverviewGetResponses, type GetUserRateLimitsApiV1AdminRateLimitsUserIdGetData, type GetUserRateLimitsApiV1AdminRateLimitsUserIdGetError, type GetUserRateLimitsApiV1AdminRateLimitsUserIdGetErrors, type GetUserRateLimitsApiV1AdminRateLimitsUserIdGetResponse, type GetUserRateLimitsApiV1AdminRateLimitsUserIdGetResponses, type GetUserSettingsApiV1UserSettingsGetData, type GetUserSettingsApiV1UserSettingsGetError, type GetUserSettingsApiV1UserSettingsGetErrors, type GetUserSettingsApiV1UserSettingsGetResponse, type GetUserSettingsApiV1UserSettingsGetResponses, type HourlyEventCount, type LanguageInfo, type LanguageLimits, type ListExecutionsApiV1AdminExecutionsGetData, type ListExecutionsApiV1AdminExecutionsGetError, type ListExecutionsApiV1AdminExecutionsGetErrors, type ListExecutionsApiV1AdminExecutionsGetResponse, type ListExecutionsApiV1AdminExecutionsGetResponses, type ListSavedScriptsApiV1ScriptsGetData, type ListSavedScriptsApiV1ScriptsGetError, type ListSavedScriptsApiV1ScriptsGetErrors, type ListSavedScriptsApiV1ScriptsGetResponse, type ListSavedScriptsApiV1ScriptsGetResponses, type ListUsersApiV1AdminUsersGetData, type ListUsersApiV1AdminUsersGetError, type ListUsersApiV1AdminUsersGetErrors, type ListUsersApiV1AdminUsersGetResponse, type ListUsersApiV1AdminUsersGetResponses, type LivenessApiV1HealthLiveGetData, type LivenessApiV1HealthLiveGetError, type LivenessApiV1HealthLiveGetErrors, type LivenessApiV1HealthLiveGetResponse, type LivenessApiV1HealthLiveGetResponses, type LivenessResponse, type LoginApiV1AuthLoginPostData, type LoginApiV1AuthLoginPostError, type LoginApiV1AuthLoginPostErrors, type LoginApiV1AuthLoginPostResponse, type LoginApiV1AuthLoginPostResponses, LoginMethod, type LoginResponse, type LogoutApiV1AuthLogoutPostData, type LogoutApiV1AuthLogoutPostError, type LogoutApiV1AuthLogoutPostErrors, type LogoutApiV1AuthLogoutPostResponse, type LogoutApiV1AuthLogoutPostResponses, type MarkAllReadApiV1NotificationsMarkAllReadPostData, type MarkAllReadApiV1NotificationsMarkAllReadPostError, type MarkAllReadApiV1NotificationsMarkAllReadPostErrors, type MarkAllReadApiV1NotificationsMarkAllReadPostResponse, type MarkAllReadApiV1NotificationsMarkAllReadPostResponses, type MarkNotificationReadApiV1NotificationsNotificationIdReadPutData, type MarkNotificationReadApiV1NotificationsNotificationIdReadPutError, type MarkNotificationReadApiV1NotificationsNotificationIdReadPutErrors, type MarkNotificationReadApiV1NotificationsNotificationIdReadPutResponse, type MarkNotificationReadApiV1NotificationsNotificationIdReadPutResponses, type MessageResponse, type NotificationAllReadEvent, type NotificationClickedEvent, type NotificationCreatedEvent, type NotificationDeliveredEvent, type NotificationFailedEvent, type NotificationListResponse, type NotificationPreferencesUpdatedEvent, type NotificationReadEvent, type NotificationResponse, type NotificationSentEvent, type NotificationSettingsInput, type NotificationSettingsOutput, NotificationSeverity, NotificationStatus, type NotificationStreamApiV1EventsNotificationsStreamGetData, type NotificationStreamApiV1EventsNotificationsStreamGetError, type NotificationStreamApiV1EventsNotificationsStreamGetErrors, type NotificationStreamApiV1EventsNotificationsStreamGetResponse, type NotificationStreamApiV1EventsNotificationsStreamGetResponses, type PasswordResetRequest, type PodCreatedEvent, type PodDeletedEvent, type PodFailedEvent, type PodRunningEvent, type PodScheduledEvent, type PodSucceededEvent, type PodTerminatedEvent, type PriorityUpdateRequest, QueuePriority, type QueueStatusResponse, type QuotaExceededEvent, RateLimitAlgorithm, type RateLimitExceededEvent, type RateLimitRuleRequest, type RateLimitRuleResponse, type RateLimitSummary, type RateLimitUpdateRequest, type RateLimitUpdateResponse, type RegisterApiV1AuthRegisterPostData, type RegisterApiV1AuthRegisterPostError, type RegisterApiV1AuthRegisterPostErrors, type RegisterApiV1AuthRegisterPostResponse, type RegisterApiV1AuthRegisterPostResponses, type ReplayError, type ReplayEventsApiV1AdminEventsReplayPostData, type ReplayEventsApiV1AdminEventsReplayPostError, type ReplayEventsApiV1AdminEventsReplayPostErrors, type ReplayEventsApiV1AdminEventsReplayPostResponse, type ReplayEventsApiV1AdminEventsReplayPostResponses, ReplayStatus, type ResetSystemSettingsApiV1AdminSettingsResetPostData, type ResetSystemSettingsApiV1AdminSettingsResetPostError, type ResetSystemSettingsApiV1AdminSettingsResetPostErrors, type ResetSystemSettingsApiV1AdminSettingsResetPostResponse, type ResetSystemSettingsApiV1AdminSettingsResetPostResponses, type ResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostData, type ResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostError, type ResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostErrors, type ResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostResponse, type ResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostResponses, type ResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostData, type ResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostError, type ResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostErrors, type ResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostResponse, type ResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostResponses, type ResourceLimitExceededEvent, type ResourceLimits, type ResourceUsage, type ResourceUsageDomain, type RestoreSettingsApiV1UserSettingsRestorePostData, type RestoreSettingsApiV1UserSettingsRestorePostError, type RestoreSettingsApiV1UserSettingsRestorePostErrors, type RestoreSettingsApiV1UserSettingsRestorePostResponse, type RestoreSettingsApiV1UserSettingsRestorePostResponses, type RestoreSettingsRequest, type ResultFailedEvent, type ResultStoredEvent, type RetryExecutionApiV1ExecutionsExecutionIdRetryPostData, type RetryExecutionApiV1ExecutionsExecutionIdRetryPostError, type RetryExecutionApiV1ExecutionsExecutionIdRetryPostErrors, type RetryExecutionApiV1ExecutionsExecutionIdRetryPostResponse, type RetryExecutionApiV1ExecutionsExecutionIdRetryPostResponses, type SavedScriptCreateRequest, type SavedScriptListResponse, type SavedScriptResponse, type SavedScriptUpdate, type ScriptDeletedEvent, type ScriptSavedEvent, type ScriptSharedEvent, type SecurityViolationEvent, type ServiceEventCount, type ServiceRecoveredEvent, type ServiceUnhealthyEvent, type SettingsHistoryEntry, type SettingsHistoryResponse, SseControlEvent, type SseExecutionEventSchema, StorageType, type StreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetData, type StreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetError, type StreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetErrors, type StreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetResponse, type StreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetResponses, type SystemErrorEvent, type SystemSettingsSchemaInput, type SystemSettingsSchemaOutput, Theme, type ThemeUpdateRequest, type UnlockResponse, type UnlockUserApiV1AdminUsersUserIdUnlockPostData, type UnlockUserApiV1AdminUsersUserIdUnlockPostError, type UnlockUserApiV1AdminUsersUserIdUnlockPostErrors, type UnlockUserApiV1AdminUsersUserIdUnlockPostResponse, type UnlockUserApiV1AdminUsersUserIdUnlockPostResponses, type UnreadCountResponse, type UpdateCustomSettingApiV1UserSettingsCustomKeyPutData, type UpdateCustomSettingApiV1UserSettingsCustomKeyPutError, type UpdateCustomSettingApiV1UserSettingsCustomKeyPutErrors, type UpdateCustomSettingApiV1UserSettingsCustomKeyPutResponse, type UpdateCustomSettingApiV1UserSettingsCustomKeyPutResponses, type UpdateEditorSettingsApiV1UserSettingsEditorPutData, type UpdateEditorSettingsApiV1UserSettingsEditorPutError, type UpdateEditorSettingsApiV1UserSettingsEditorPutErrors, type UpdateEditorSettingsApiV1UserSettingsEditorPutResponse, type UpdateEditorSettingsApiV1UserSettingsEditorPutResponses, type UpdateNotificationSettingsApiV1UserSettingsNotificationsPutData, type UpdateNotificationSettingsApiV1UserSettingsNotificationsPutError, type UpdateNotificationSettingsApiV1UserSettingsNotificationsPutErrors, type UpdateNotificationSettingsApiV1UserSettingsNotificationsPutResponse, type UpdateNotificationSettingsApiV1UserSettingsNotificationsPutResponses, type UpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutData, type UpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutError, type UpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutErrors, type UpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutResponse, type UpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutResponses, type UpdateSavedScriptApiV1ScriptsScriptIdPutData, type UpdateSavedScriptApiV1ScriptsScriptIdPutError, type UpdateSavedScriptApiV1ScriptsScriptIdPutErrors, type UpdateSavedScriptApiV1ScriptsScriptIdPutResponse, type UpdateSavedScriptApiV1ScriptsScriptIdPutResponses, type UpdateSystemSettingsApiV1AdminSettingsPutData, type UpdateSystemSettingsApiV1AdminSettingsPutError, type UpdateSystemSettingsApiV1AdminSettingsPutErrors, type UpdateSystemSettingsApiV1AdminSettingsPutResponse, type UpdateSystemSettingsApiV1AdminSettingsPutResponses, type UpdateThemeApiV1UserSettingsThemePutData, type UpdateThemeApiV1UserSettingsThemePutError, type UpdateThemeApiV1UserSettingsThemePutErrors, type UpdateThemeApiV1UserSettingsThemePutResponse, type UpdateThemeApiV1UserSettingsThemePutResponses, type UpdateUserApiV1AdminUsersUserIdPutData, type UpdateUserApiV1AdminUsersUserIdPutError, type UpdateUserApiV1AdminUsersUserIdPutErrors, type UpdateUserApiV1AdminUsersUserIdPutResponse, type UpdateUserApiV1AdminUsersUserIdPutResponses, type UpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutData, type UpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutError, type UpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutErrors, type UpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutResponse, type UpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutResponses, type UpdateUserSettingsApiV1UserSettingsPutData, type UpdateUserSettingsApiV1UserSettingsPutError, type UpdateUserSettingsApiV1UserSettingsPutErrors, type UpdateUserSettingsApiV1UserSettingsPutResponse, type UpdateUserSettingsApiV1UserSettingsPutResponses, type UserCreate, type UserCreateWritable, type UserDeletedEvent, type UserEventCount, type UserListResponse, type UserLoggedInEvent, type UserLoggedOutEvent, type UserLoginEvent, type UserRateLimitConfigResponse, type UserRateLimitsResponse, type UserRegisteredEvent, type UserResponse, UserRole, type UserSettings, type UserSettingsUpdate, type UserSettingsUpdatedEvent, type UserUpdate, type UserUpdatedEvent, type UserUpdateWritable } from './types.gen'; +export { zAdminExecutionListResponse, zAdminExecutionResponse, zAdminUserOverview, zAuthFailedEvent, zBodyLoginApiV1AuthLoginPost, zBrowseEventsApiV1AdminEventsBrowsePostBody, zBrowseEventsApiV1AdminEventsBrowsePostResponse, zCancelExecutionApiV1ExecutionsExecutionIdCancelPostPath, zCancelExecutionApiV1ExecutionsExecutionIdCancelPostResponse, zCancelResponse, zCancelStatus, zContainerStatusInfo, zCreateExecutionApiV1ExecutePostBody, zCreateExecutionApiV1ExecutePostHeaders, zCreateExecutionApiV1ExecutePostResponse, zCreateSavedScriptApiV1ScriptsPostBody, zCreateSavedScriptApiV1ScriptsPostResponse, zCreateUserApiV1AdminUsersPostBody, zCreateUserApiV1AdminUsersPostResponse, zDeleteEventApiV1AdminEventsEventIdDeletePath, zDeleteEventApiV1AdminEventsEventIdDeleteResponse, zDeleteExecutionApiV1ExecutionsExecutionIdDeletePath, zDeleteExecutionApiV1ExecutionsExecutionIdDeleteResponse, zDeleteNotificationApiV1NotificationsNotificationIdDeletePath, zDeleteNotificationApiV1NotificationsNotificationIdDeleteResponse, zDeleteNotificationResponse, zDeleteResponse, zDeleteSavedScriptApiV1ScriptsScriptIdDeletePath, zDeleteSavedScriptApiV1ScriptsScriptIdDeleteResponse, zDeleteUserApiV1AdminUsersUserIdDeletePath, zDeleteUserApiV1AdminUsersUserIdDeleteQuery, zDeleteUserApiV1AdminUsersUserIdDeleteResponse, zDeleteUserResponse, zDerivedCounts, zDlqMessageDiscardedEvent, zDlqMessageReceivedEvent, zDlqMessageRetriedEvent, zEditorSettingsInput, zEditorSettingsOutput, zEndpointGroup, zEndpointUsageStats, zEnvironment, zErrorResponse, zEventBrowseRequest, zEventBrowseResponse, zEventDeleteResponse, zEventDetailResponse, zEventFilter, zEventMetadata, zEventReplayRequest, zEventReplayResponse, zEventReplayStatusResponse, zEventReplayStatusResponseWritable, zEventStatistics, zEventStatsResponse, zEventSummary, zEventType, zEventTypeCount, zExampleScripts, zExecutionAcceptedEvent, zExecutionCancelledEvent, zExecutionCompletedEvent, zExecutionErrorType, zExecutionEventsApiV1EventsExecutionsExecutionIdGetPath, zExecutionEventsApiV1EventsExecutionsExecutionIdGetResponse, zExecutionFailedEvent, zExecutionListResponse, zExecutionQueuedEvent, zExecutionRequest, zExecutionRequestedEvent, zExecutionResponse, zExecutionResult, zExecutionRunningEvent, zExecutionStartedEvent, zExecutionStatus, zExecutionTimeoutEvent, zExportEventsApiV1AdminEventsExportExportFormatGetPath, zExportEventsApiV1AdminEventsExportExportFormatGetQuery, zExportFormat, zGetCurrentUserProfileApiV1AuthMeGetResponse, zGetDefaultRateLimitRulesApiV1AdminRateLimitsDefaultsGetResponse, zGetEventDetailApiV1AdminEventsEventIdGetPath, zGetEventDetailApiV1AdminEventsEventIdGetResponse, zGetEventStatsApiV1AdminEventsStatsGetQuery, zGetEventStatsApiV1AdminEventsStatsGetResponse, zGetExampleScriptsApiV1ExampleScriptsGetResponse, zGetExecutionEventsApiV1ExecutionsExecutionIdEventsGetPath, zGetExecutionEventsApiV1ExecutionsExecutionIdEventsGetQuery, zGetExecutionEventsApiV1ExecutionsExecutionIdEventsGetResponse, zGetK8sResourceLimitsApiV1K8sLimitsGetResponse, zGetNotificationsApiV1NotificationsGetQuery, zGetNotificationsApiV1NotificationsGetResponse, zGetQueueStatusApiV1AdminExecutionsQueueGetResponse, zGetResultApiV1ExecutionsExecutionIdResultGetPath, zGetResultApiV1ExecutionsExecutionIdResultGetResponse, zGetSavedScriptApiV1ScriptsScriptIdGetPath, zGetSavedScriptApiV1ScriptsScriptIdGetResponse, zGetSettingsHistoryApiV1UserSettingsHistoryGetQuery, zGetSettingsHistoryApiV1UserSettingsHistoryGetResponse, zGetSystemSettingsApiV1AdminSettingsGetResponse, zGetUnreadCountApiV1NotificationsUnreadCountGetResponse, zGetUserApiV1AdminUsersUserIdGetPath, zGetUserApiV1AdminUsersUserIdGetResponse, zGetUserExecutionsApiV1UserExecutionsGetQuery, zGetUserExecutionsApiV1UserExecutionsGetResponse, zGetUserOverviewApiV1AdminUsersUserIdOverviewGetPath, zGetUserOverviewApiV1AdminUsersUserIdOverviewGetResponse, zGetUserRateLimitsApiV1AdminRateLimitsUserIdGetPath, zGetUserRateLimitsApiV1AdminRateLimitsUserIdGetResponse, zGetUserSettingsApiV1UserSettingsGetResponse, zHourlyEventCount, zLanguageInfo, zLanguageLimits, zListExecutionsApiV1AdminExecutionsGetQuery, zListExecutionsApiV1AdminExecutionsGetResponse, zListSavedScriptsApiV1ScriptsGetResponse, zListUsersApiV1AdminUsersGetQuery, zListUsersApiV1AdminUsersGetResponse, zLivenessApiV1HealthLiveGetResponse, zLivenessResponse, zLoginApiV1AuthLoginPostBody, zLoginApiV1AuthLoginPostResponse, zLoginMethod, zLoginResponse, zLogoutApiV1AuthLogoutPostResponse, zMarkAllReadApiV1NotificationsMarkAllReadPostResponse, zMarkNotificationReadApiV1NotificationsNotificationIdReadPutPath, zMarkNotificationReadApiV1NotificationsNotificationIdReadPutResponse, zMessageResponse, zNotificationAllReadEvent, zNotificationClickedEvent, zNotificationCreatedEvent, zNotificationDeliveredEvent, zNotificationFailedEvent, zNotificationListResponse, zNotificationPreferencesUpdatedEvent, zNotificationReadEvent, zNotificationResponse, zNotificationSentEvent, zNotificationSettingsInput, zNotificationSettingsOutput, zNotificationSeverity, zNotificationStatus, zNotificationStreamApiV1EventsNotificationsStreamGetResponse, zPasswordResetRequest, zPodCreatedEvent, zPodDeletedEvent, zPodFailedEvent, zPodRunningEvent, zPodScheduledEvent, zPodSucceededEvent, zPodTerminatedEvent, zPriorityUpdateRequest, zQueuePriority, zQueueStatusResponse, zQuotaExceededEvent, zRateLimitAlgorithm, zRateLimitExceededEvent, zRateLimitRuleRequest, zRateLimitRuleResponse, zRateLimitSummary, zRateLimitUpdateRequest, zRateLimitUpdateResponse, zRegisterApiV1AuthRegisterPostBody, zRegisterApiV1AuthRegisterPostResponse, zReplayError, zReplayEventsApiV1AdminEventsReplayPostBody, zReplayEventsApiV1AdminEventsReplayPostResponse, zReplayStatus, zResetSystemSettingsApiV1AdminSettingsResetPostResponse, zResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostBody, zResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostPath, zResetUserPasswordApiV1AdminUsersUserIdResetPasswordPostResponse, zResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostPath, zResetUserRateLimitsApiV1AdminRateLimitsUserIdResetPostResponse, zResourceLimitExceededEvent, zResourceLimits, zResourceUsage, zResourceUsageDomain, zRestoreSettingsApiV1UserSettingsRestorePostBody, zRestoreSettingsApiV1UserSettingsRestorePostResponse, zRestoreSettingsRequest, zResultFailedEvent, zResultStoredEvent, zRetryExecutionApiV1ExecutionsExecutionIdRetryPostPath, zRetryExecutionApiV1ExecutionsExecutionIdRetryPostResponse, zSavedScriptCreateRequest, zSavedScriptListResponse, zSavedScriptResponse, zSavedScriptUpdate, zScriptDeletedEvent, zScriptSavedEvent, zScriptSharedEvent, zSecurityViolationEvent, zServiceEventCount, zServiceRecoveredEvent, zServiceUnhealthyEvent, zSettingsHistoryEntry, zSettingsHistoryResponse, zSseControlEvent, zSseExecutionEventSchema, zStorageType, zStreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetPath, zStreamReplayStatusApiV1AdminEventsReplaySessionIdStatusGetResponse, zSystemErrorEvent, zSystemSettingsSchemaInput, zSystemSettingsSchemaOutput, zTheme, zThemeUpdateRequest, zUnlockResponse, zUnlockUserApiV1AdminUsersUserIdUnlockPostPath, zUnlockUserApiV1AdminUsersUserIdUnlockPostResponse, zUnreadCountResponse, zUpdateCustomSettingApiV1UserSettingsCustomKeyPutBody, zUpdateCustomSettingApiV1UserSettingsCustomKeyPutPath, zUpdateCustomSettingApiV1UserSettingsCustomKeyPutResponse, zUpdateEditorSettingsApiV1UserSettingsEditorPutBody, zUpdateEditorSettingsApiV1UserSettingsEditorPutResponse, zUpdateNotificationSettingsApiV1UserSettingsNotificationsPutBody, zUpdateNotificationSettingsApiV1UserSettingsNotificationsPutResponse, zUpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutBody, zUpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutPath, zUpdatePriorityApiV1AdminExecutionsExecutionIdPriorityPutResponse, zUpdateSavedScriptApiV1ScriptsScriptIdPutBody, zUpdateSavedScriptApiV1ScriptsScriptIdPutPath, zUpdateSavedScriptApiV1ScriptsScriptIdPutResponse, zUpdateSystemSettingsApiV1AdminSettingsPutBody, zUpdateSystemSettingsApiV1AdminSettingsPutResponse, zUpdateThemeApiV1UserSettingsThemePutBody, zUpdateThemeApiV1UserSettingsThemePutResponse, zUpdateUserApiV1AdminUsersUserIdPutBody, zUpdateUserApiV1AdminUsersUserIdPutPath, zUpdateUserApiV1AdminUsersUserIdPutResponse, zUpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutBody, zUpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutPath, zUpdateUserRateLimitsApiV1AdminRateLimitsUserIdPutResponse, zUpdateUserSettingsApiV1UserSettingsPutBody, zUpdateUserSettingsApiV1UserSettingsPutResponse, zUserCreate, zUserCreateWritable, zUserDeletedEvent, zUserEventCount, zUserListResponse, zUserLoggedInEvent, zUserLoggedOutEvent, zUserLoginEvent, zUserRateLimitConfigResponse, zUserRateLimitsResponse, zUserRegisteredEvent, zUserResponse, zUserRole, zUserSettings, zUserSettingsUpdate, zUserSettingsUpdatedEvent, zUserUpdate, zUserUpdatedEvent, zUserUpdateWritable } from './zod.gen'; diff --git a/frontend/src/lib/api/sdk.gen.ts b/frontend/src/lib/api/sdk.gen.ts index 2def739c9..325089c5f 100644 --- a/frontend/src/lib/api/sdk.gen.ts +++ b/frontend/src/lib/api/sdk.gen.ts @@ -87,14 +87,7 @@ export const getResultApiV1ExecutionsExecutionIdResultGet = (options: Options): RequestResult => (options.client ?? client).post({ - url: '/api/v1/executions/{execution_id}/cancel', - ...options, - headers: { - 'Content-Type': 'application/json', - ...options.headers - } -}); +export const cancelExecutionApiV1ExecutionsExecutionIdCancelPost = (options: Options): RequestResult => (options.client ?? client).post({ url: '/api/v1/executions/{execution_id}/cancel', ...options }); /** * Retry Execution diff --git a/frontend/src/lib/api/types.gen.ts b/frontend/src/lib/api/types.gen.ts index 230857acb..7bcdf8422 100644 --- a/frontend/src/lib/api/types.gen.ts +++ b/frontend/src/lib/api/types.gen.ts @@ -166,20 +166,6 @@ export type BodyLoginApiV1AuthLoginPost = { client_secret?: string | null; }; -/** - * CancelExecutionRequest - * - * Model for cancelling an execution. - */ -export type CancelExecutionRequest = { - /** - * Reason - * - * Reason for cancellation - */ - reason?: string; -}; - /** * CancelResponse * @@ -4689,7 +4675,7 @@ export type GetResultApiV1ExecutionsExecutionIdResultGetResponses = { export type GetResultApiV1ExecutionsExecutionIdResultGetResponse = GetResultApiV1ExecutionsExecutionIdResultGetResponses[keyof GetResultApiV1ExecutionsExecutionIdResultGetResponses]; export type CancelExecutionApiV1ExecutionsExecutionIdCancelPostData = { - body: CancelExecutionRequest; + body?: never; path: { /** * Execution Id diff --git a/frontend/src/lib/api/zod.gen.ts b/frontend/src/lib/api/zod.gen.ts index e7ed8ee89..dcf7123d7 100644 --- a/frontend/src/lib/api/zod.gen.ts +++ b/frontend/src/lib/api/zod.gen.ts @@ -14,15 +14,6 @@ export const zBodyLoginApiV1AuthLoginPost = z.object({ client_secret: z.nullish(z.string()) }); -/** - * CancelExecutionRequest - * - * Model for cancelling an execution. - */ -export const zCancelExecutionRequest = z.object({ - reason: z._default(z.optional(z.string()), 'User requested cancellation') -}); - /** * CancelStatus * @@ -2202,8 +2193,6 @@ export const zGetResultApiV1ExecutionsExecutionIdResultGetPath = z.object({ */ export const zGetResultApiV1ExecutionsExecutionIdResultGetResponse = zExecutionResult; -export const zCancelExecutionApiV1ExecutionsExecutionIdCancelPostBody = zCancelExecutionRequest; - export const zCancelExecutionApiV1ExecutionsExecutionIdCancelPostPath = z.object({ execution_id: z.string() }); diff --git a/frontend/src/lib/editor/execution.svelte.ts b/frontend/src/lib/editor/execution.svelte.ts index b5ed763a0..2129f9530 100644 --- a/frontend/src/lib/editor/execution.svelte.ts +++ b/frontend/src/lib/editor/execution.svelte.ts @@ -17,20 +17,20 @@ type ActiveStatus = Extract export type ExecutionPhase = 'idle' | 'starting' | ActiveStatus; -const ACTIVE_STATUSES: readonly ExecutionStatus[] = [ +const ACTIVE_STATUSES: ReadonlySet = new Set([ ExecutionStatus.QUEUED, ExecutionStatus.SCHEDULED, ExecutionStatus.RUNNING, -]; +]); -const FAILURE_EVENTS: readonly (EventType | SseControlEvent)[] = [ - EventType.EXECUTION_FAILED, - EventType.EXECUTION_TIMEOUT, - EventType.RESULT_FAILED, -]; +const FAILURE_MESSAGES: Partial> = { + [EventType.EXECUTION_FAILED]: 'Execution failed.', + [EventType.EXECUTION_TIMEOUT]: 'Execution timed out.', + [EventType.RESULT_FAILED]: 'Failed to store execution results.', +}; function isActivePhase(s: ExecutionStatus): s is ActiveStatus { - return ACTIVE_STATUSES.includes(s); + return ACTIVE_STATUSES.has(s); } class ExecutionState { @@ -38,7 +38,7 @@ class ExecutionState { result = $state(null); #streamError = $state(null); #controller: AbortController | null = null; - #start = createMutation(() => createExecutionApiV1ExecutePostMutation()); + readonly #start = createMutation(() => createExecutionApiV1ExecutePostMutation()); get phase(): ExecutionPhase { return this.#start.isPending ? 'starting' : this.#phase; @@ -107,14 +107,10 @@ class ExecutionState { break; } - if (FAILURE_EVENTS.includes(ev.event_type)) { + const failure = FAILURE_MESSAGES[ev.event_type]; + if (failure) { this.result = ev.result; - this.#streamError = - ev.event_type === EventType.EXECUTION_TIMEOUT - ? 'Execution timed out.' - : ev.event_type === EventType.RESULT_FAILED - ? 'Failed to store execution results.' - : 'Execution failed.'; + this.#streamError = failure; terminalReceived = true; break; } diff --git a/frontend/src/lib/formatters.ts b/frontend/src/lib/formatters.ts index dab4df377..e2bdd198f 100644 --- a/frontend/src/lib/formatters.ts +++ b/frontend/src/lib/formatters.ts @@ -2,7 +2,7 @@ import { differenceInSeconds, differenceInMinutes, differenceInHours, difference function validDate(timestamp: string | null | undefined): Date | null { const date = timestamp ? new Date(timestamp) : null; - return date && !isNaN(date.getTime()) ? date : null; + return date && !Number.isNaN(date.getTime()) ? date : null; } /** diff --git a/frontend/src/routes/admin/__tests__/AdminLayout.test.ts b/frontend/src/routes/admin/__tests__/AdminLayout.test.ts index 5371875e5..c65bcbb8d 100644 --- a/frontend/src/routes/admin/__tests__/AdminLayout.test.ts +++ b/frontend/src/routes/admin/__tests__/AdminLayout.test.ts @@ -36,7 +36,7 @@ describe('AdminLayout', () => { expect(screen.getByText('Settings')).toBeInTheDocument(); const adminLinks = screen.getAllByRole('link').filter((l) => l.getAttribute('href')?.startsWith('/admin/')); - expect(adminLinks.length).toBe(4); + expect(adminLinks).toHaveLength(4); const hrefs = adminLinks.map((l) => l.getAttribute('href')); expect(hrefs).toContain('/admin/events'); diff --git a/frontend/src/styles/pages.css b/frontend/src/styles/pages.css index e740c6279..71f0b90cd 100644 --- a/frontend/src/styles/pages.css +++ b/frontend/src/styles/pages.css @@ -56,15 +56,6 @@ position: relative; } - .editor-wrapper .cm-editor { - height: 100% !important; - max-height: 100% !important; - } - - .editor-wrapper .cm-scroller { - overflow: auto !important; - } - .editor-toolbar { position: sticky; top: 0; diff --git a/mkdocs.yml b/mkdocs.yml index 09f7aa41b..789be04af 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -49,7 +49,9 @@ theme: plugins: - search - - swagger-ui-tag + - swagger-ui-tag: + extra_css: + - stylesheets/swagger.css - mermaid2: arguments: securityLevel: loose