Class ScriptHandlers
Defined in File script_handlers.hpp
Class Documentation
-
class ScriptHandlers
HTTP handlers for the per-entity Scripts collection.
PR-403 commit 24: 8 script routes migrated to the typed RouteRegistry API. Every handler returns
<T>(or apair<T, ResponseAttachments>for routes that need to emit 201 + Location). The HATEOAS_linksenvelope on the list endpoint is now a typeddto::HateoasLinkssub-struct so the JSON, schema, and reader paths all flow through the single descriptor. Wire format is unchanged byte-for-byte.Public Functions
-
ScriptHandlers(HandlerContext &ctx, ScriptManager *script_manager)
-
http::Result<std::pair<dto::ScriptUploadResponse, http::ResponseAttachments>> upload_script(const http::TypedRequest &req, const http::MultipartBody &body)
POST /{entity}/scripts - multipart upload, returns 201 + Location.
-
http::Result<dto::ScriptList> list_scripts(const http::TypedRequest &req)
GET /{entity}/scripts - list scripts, typed HATEOAS envelope.
-
http::Result<dto::ScriptMetadata> get_script(const http::TypedRequest &req)
GET /{entity}/scripts/{script_id} - get a single script.
-
http::Result<http::NoContent> delete_script(const http::TypedRequest &req)
DELETE /{entity}/scripts/{script_id} - delete a script, 204.
-
http::Result<std::pair<dto::ScriptExecution, http::ResponseAttachments>> start_execution(const http::TypedRequest &req)
POST /{entity}/scripts/{script_id}/executions - start, returns 202 + Location.
-
http::Result<dto::ScriptExecution> get_execution(const http::TypedRequest &req)
GET /{entity}/scripts/{script_id}/executions/{execution_id} - get status.
-
http::Result<dto::ScriptExecution> control_execution(const http::TypedRequest &req, const dto::ScriptControlRequest &body)
PUT /{entity}/scripts/{script_id}/executions/{execution_id} - control execution.
-
http::Result<http::NoContent> delete_execution(const http::TypedRequest &req)
DELETE /{entity}/scripts/{script_id}/executions/{execution_id} - remove record, 204.
-
ScriptHandlers(HandlerContext &ctx, ScriptManager *script_manager)