From c7b750b09989ac1d07dd836756a0c7c5285ca4b0 Mon Sep 17 00:00:00 2001 From: Huarch Date: Wed, 4 Nov 2026 14:27:35 +0800 Subject: [PATCH] chore(api): sync SCADA replay contract --- openapi/openapi.json | 1758 ++++++++++++++++++++++++++++++++- src/generated/server-api.d.ts | 1065 +++++++++++++++++++- 2 files changed, 2817 insertions(+), 6 deletions(-) diff --git a/openapi/openapi.json b/openapi/openapi.json index 0c157ae..dc5c813 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -304,6 +304,9 @@ "title": "Name", "type": "string" }, + "settings": { + "$ref": "#/components/schemas/ProjectSettings" + }, "status": { "default": "active", "enum": [ @@ -373,6 +376,9 @@ "title": "Project Id", "type": "string" }, + "settings": { + "$ref": "#/components/schemas/ProjectSettings" + }, "status": { "title": "Status", "type": "string" @@ -469,6 +475,17 @@ ], "title": "Name" }, + "settings": { + "anyOf": [ + { + "$ref": "#/components/schemas/ProjectSettings" + }, + { + "type": "null" + } + ], + "description": "按顶层键合并项目配置;省略的键保持原值,嵌套对象整体替换" + }, "status": { "anyOf": [ { @@ -6670,6 +6687,9 @@ "title": "Project Role", "type": "string" }, + "settings": { + "$ref": "#/components/schemas/ProjectSettings" + }, "status": { "title": "Status", "type": "string" @@ -6726,6 +6746,41 @@ "title": "ProjectProvisionResponse", "type": "object" }, + "ProjectSettings": { + "additionalProperties": { + "$ref": "#/components/schemas/JsonValue" + }, + "description": "Extensible, non-secret project parameters stored in MetaDB as JSON.", + "properties": { + "scada_monitoring": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScadaMonitoringSettings" + }, + { + "type": "null" + } + ], + "description": "主动监测使用的项目设备角色;不创建定时任务" + }, + "scada_monitoring_interval_seconds": { + "anyOf": [ + { + "maximum": 31536000.0, + "minimum": 60.0, + "type": "integer" + }, + { + "type": "null" + } + ], + "description": "SCADA 主动监测演示步长,单位秒;null 表示未配置", + "title": "Scada Monitoring Interval Seconds" + } + }, + "title": "ProjectSettings", + "type": "object" + }, "ProjectSummaryResponse": { "properties": { "code": { @@ -7327,6 +7382,245 @@ "title": "ScadaLatestReadingsResponse", "type": "object" }, + "ScadaMonitoringResult": { + "additionalProperties": false, + "properties": { + "batch_sequence": { + "minimum": 1.0, + "title": "Batch Sequence", + "type": "integer" + }, + "burst_detection": { + "additionalProperties": true, + "title": "Burst Detection", + "type": "object" + }, + "detail": { + "maxLength": 1000, + "minLength": 1, + "title": "Detail", + "type": "string" + }, + "knowledge_cutoff": { + "format": "date-time", + "title": "Knowledge Cutoff", + "type": "string" + }, + "monitoring_id": { + "format": "uuid", + "title": "Monitoring Id", + "type": "string" + }, + "outlet_flow": { + "additionalProperties": true, + "title": "Outlet Flow", + "type": "object" + }, + "period_end": { + "format": "date-time", + "title": "Period End", + "type": "string" + }, + "period_start": { + "format": "date-time", + "title": "Period Start", + "type": "string" + }, + "pressure": { + "additionalProperties": true, + "title": "Pressure", + "type": "object" + }, + "role_gaps": { + "items": { + "type": "string" + }, + "title": "Role Gaps", + "type": "array" + }, + "rule_version": { + "maxLength": 80, + "minLength": 1, + "title": "Rule Version", + "type": "string" + }, + "status": { + "enum": [ + "normal", + "attention", + "insufficient_data", + "suspected_burst" + ], + "title": "Status", + "type": "string" + }, + "task_id": { + "anyOf": [ + { + "format": "uuid", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Task Id" + } + }, + "required": [ + "monitoring_id", + "period_start", + "period_end", + "knowledge_cutoff", + "batch_sequence", + "rule_version", + "status", + "detail", + "pressure", + "outlet_flow", + "burst_detection" + ], + "title": "ScadaMonitoringResult", + "type": "object" + }, + "ScadaMonitoringSettings": { + "additionalProperties": false, + "description": "Project-owned device roles used by the manual SCADA monitoring demo.", + "properties": { + "outlet_flow_device_ids": { + "items": { + "type": "string" + }, + "maxItems": 20, + "title": "Outlet Flow Device Ids", + "type": "array" + }, + "pressure_device_ids": { + "items": { + "type": "string" + }, + "maxItems": 20, + "title": "Pressure Device Ids", + "type": "array" + }, + "rule_version": { + "default": "burst-monitor-v1", + "maxLength": 80, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_.-]+$", + "title": "Rule Version", + "type": "string" + } + }, + "title": "ScadaMonitoringSettings", + "type": "object" + }, + "ScadaQualityRange": { + "additionalProperties": false, + "properties": { + "lower": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Lower" + }, + "upper": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Upper" + } + }, + "title": "ScadaQualityRange", + "type": "object" + }, + "ScadaRawPage": { + "additionalProperties": false, + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/ScadaRawReading" + }, + "title": "Items", + "type": "array" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor" + }, + "scanned_through": { + "format": "date-time", + "title": "Scanned Through", + "type": "string" + } + }, + "required": [ + "items", + "next_cursor", + "scanned_through" + ], + "title": "ScadaRawPage", + "type": "object" + }, + "ScadaRawReading": { + "additionalProperties": false, + "properties": { + "device_id": { + "title": "Device Id", + "type": "string" + }, + "monitored_value": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Monitored Value" + }, + "quality": { + "default": "unvalidated", + "enum": [ + "unvalidated", + "missing", + "invalid" + ], + "title": "Quality", + "type": "string" + }, + "time": { + "format": "date-time", + "title": "Time", + "type": "string" + } + }, + "required": [ + "time", + "device_id", + "monitored_value" + ], + "title": "ScadaRawReading", + "type": "object" + }, "ScadaReadingBatchItem": { "properties": { "cleaned_value": { @@ -7369,6 +7663,550 @@ "title": "ScadaReadingBatchItem", "type": "object" }, + "ScadaReplayCapabilities": { + "additionalProperties": false, + "properties": { + "available": { + "title": "Available", + "type": "boolean" + }, + "burst_monitoring_ready": { + "default": false, + "title": "Burst Monitoring Ready", + "type": "boolean" + }, + "burst_monitoring_reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Burst Monitoring Reason" + }, + "can_write": { + "title": "Can Write", + "type": "boolean" + }, + "current": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScadaReplaySnapshot" + }, + { + "type": "null" + } + ] + }, + "monitoring_interval_seconds": { + "anyOf": [ + { + "maximum": 31536000.0, + "minimum": 60.0, + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Monitoring Interval Seconds" + }, + "reason": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Reason" + } + }, + "required": [ + "available", + "can_write" + ], + "title": "ScadaReplayCapabilities", + "type": "object" + }, + "ScadaReplayCommand": { + "additionalProperties": false, + "properties": { + "action": { + "enum": [ + "step", + "stop", + "retry" + ], + "title": "Action", + "type": "string" + }, + "expected_revision": { + "minimum": 1.0, + "title": "Expected Revision", + "type": "integer" + }, + "request_id": { + "format": "uuid", + "title": "Request Id", + "type": "string" + } + }, + "required": [ + "request_id", + "expected_revision", + "action" + ], + "title": "ScadaReplayCommand", + "type": "object" + }, + "ScadaReplayCreate": { + "additionalProperties": false, + "properties": { + "device_ids": { + "items": { + "type": "string" + }, + "maxItems": 500, + "minItems": 1, + "title": "Device Ids", + "type": "array" + }, + "end_time": { + "format": "date-time", + "title": "End Time", + "type": "string" + }, + "quality_ranges": { + "additionalProperties": { + "$ref": "#/components/schemas/ScadaQualityRange" + }, + "title": "Quality Ranges", + "type": "object" + }, + "request_id": { + "format": "uuid", + "title": "Request Id", + "type": "string" + }, + "rules": { + "items": { + "$ref": "#/components/schemas/ScadaReplayRule" + }, + "maxItems": 30, + "minItems": 1, + "title": "Rules", + "type": "array" + }, + "start_time": { + "format": "date-time", + "title": "Start Time", + "type": "string" + } + }, + "required": [ + "request_id", + "start_time", + "end_time", + "device_ids", + "rules" + ], + "title": "ScadaReplayCreate", + "type": "object" + }, + "ScadaReplayEventsPage": { + "additionalProperties": false, + "properties": { + "items": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "title": "Items", + "type": "array" + }, + "next_offset": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Next Offset" + } + }, + "required": [ + "items", + "next_offset" + ], + "title": "ScadaReplayEventsPage", + "type": "object" + }, + "ScadaReplayReadings": { + "additionalProperties": false, + "properties": { + "items": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "title": "Items", + "type": "array" + }, + "through": { + "format": "date-time", + "title": "Through", + "type": "string" + } + }, + "required": [ + "items", + "through" + ], + "title": "ScadaReplayReadings", + "type": "object" + }, + "ScadaReplayRule": { + "additionalProperties": false, + "properties": { + "consecutive_samples": { + "default": 1, + "maximum": 20.0, + "minimum": 1.0, + "title": "Consecutive Samples", + "type": "integer" + }, + "device_ids": { + "items": { + "type": "string" + }, + "maxItems": 500, + "minItems": 1, + "title": "Device Ids", + "type": "array" + }, + "direction": { + "default": "both", + "enum": [ + "both", + "increase", + "decrease" + ], + "title": "Direction", + "type": "string" + }, + "kind": { + "enum": [ + "relative_change", + "bounds" + ], + "title": "Kind", + "type": "string" + }, + "lower": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Lower" + }, + "metric_name": { + "default": "", + "maxLength": 80, + "title": "Metric Name", + "type": "string" + }, + "minimum_devices": { + "default": 1, + "maximum": 500.0, + "minimum": 1.0, + "title": "Minimum Devices", + "type": "integer" + }, + "minimum_samples": { + "default": 3, + "maximum": 96.0, + "minimum": 1.0, + "title": "Minimum Samples", + "type": "integer" + }, + "recovery_samples": { + "default": 2, + "maximum": 20.0, + "minimum": 1.0, + "title": "Recovery Samples", + "type": "integer" + }, + "rule_id": { + "maxLength": 80, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "title": "Rule Id", + "type": "string" + }, + "threshold": { + "anyOf": [ + { + "exclusiveMinimum": 0.0, + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Threshold" + }, + "unit": { + "maxLength": 40, + "minLength": 1, + "title": "Unit", + "type": "string" + }, + "upper": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "title": "Upper" + }, + "window_samples": { + "default": 4, + "maximum": 96.0, + "minimum": 1.0, + "title": "Window Samples", + "type": "integer" + } + }, + "required": [ + "rule_id", + "device_ids", + "kind", + "unit" + ], + "title": "ScadaReplayRule", + "type": "object" + }, + "ScadaReplaySnapshot": { + "additionalProperties": false, + "properties": { + "active_events": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "title": "Active Events", + "type": "array" + }, + "anomaly_count": { + "default": 0, + "title": "Anomaly Count", + "type": "integer" + }, + "created_at": { + "format": "date-time", + "title": "Created At", + "type": "string" + }, + "delivered_until": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Delivered Until" + }, + "devices": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "title": "Devices", + "type": "array" + }, + "end_time": { + "format": "date-time", + "title": "End Time", + "type": "string" + }, + "error": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Error" + }, + "last_monitoring": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScadaMonitoringResult" + }, + { + "type": "null" + } + ] + }, + "latest": { + "items": { + "additionalProperties": true, + "type": "object" + }, + "title": "Latest", + "type": "array" + }, + "monitoring_count": { + "default": 0, + "title": "Monitoring Count", + "type": "integer" + }, + "monitoring_interval_seconds": { + "anyOf": [ + { + "maximum": 31536000.0, + "minimum": 60.0, + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Monitoring Interval Seconds" + }, + "processed_count": { + "default": 0, + "title": "Processed Count", + "type": "integer" + }, + "processed_until": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Processed Until" + }, + "project_id": { + "format": "uuid", + "title": "Project Id", + "type": "string" + }, + "replay_id": { + "format": "uuid", + "title": "Replay Id", + "type": "string" + }, + "revision": { + "title": "Revision", + "type": "integer" + }, + "rules": { + "items": { + "$ref": "#/components/schemas/ScadaReplayRule" + }, + "title": "Rules", + "type": "array" + }, + "start_time": { + "format": "date-time", + "title": "Start Time", + "type": "string" + }, + "status": { + "enum": [ + "ready", + "paused", + "completed", + "stopped", + "failed" + ], + "title": "Status", + "type": "string" + }, + "step_pending": { + "default": false, + "title": "Step Pending", + "type": "boolean" + }, + "updated_at": { + "format": "date-time", + "title": "Updated At", + "type": "string" + }, + "virtual_now": { + "format": "date-time", + "title": "Virtual Now", + "type": "string" + } + }, + "required": [ + "replay_id", + "project_id", + "revision", + "status", + "start_time", + "end_time", + "virtual_now", + "devices", + "rules", + "latest", + "active_events", + "created_at", + "updated_at" + ], + "title": "ScadaReplaySnapshot", + "type": "object" + }, + "ScadaReplayTaskContext": { + "additionalProperties": false, + "properties": { + "batch_sequence": { + "minimum": 1.0, + "title": "Batch Sequence", + "type": "integer" + }, + "knowledge_cutoff": { + "format": "date-time", + "title": "Knowledge Cutoff", + "type": "string" + }, + "replay_id": { + "format": "uuid", + "title": "Replay Id", + "type": "string" + } + }, + "required": [ + "replay_id", + "knowledge_cutoff", + "batch_sequence" + ], + "title": "ScadaReplayTaskContext", + "type": "object" + }, "SensorPlacementExportRequest": { "properties": { "adjustment_status": { @@ -7960,7 +8798,15 @@ "type": "string" }, "source": { - "$ref": "#/components/schemas/WorkbenchAlertSource" + "anyOf": [ + { + "$ref": "#/components/schemas/WorkbenchAlertSource" + }, + { + "$ref": "#/components/schemas/WorkbenchScadaReplaySource" + } + ], + "title": "Source" }, "title": { "minLength": 1, @@ -8031,7 +8877,15 @@ "type": "string" }, "source": { - "$ref": "#/components/schemas/WorkbenchAlertSource" + "anyOf": [ + { + "$ref": "#/components/schemas/WorkbenchAlertSource" + }, + { + "$ref": "#/components/schemas/WorkbenchScadaReplaySource" + } + ], + "title": "Source" }, "status": { "enum": [ @@ -9373,6 +10227,16 @@ ], "title": "Kind", "type": "string" + }, + "replay_context": { + "anyOf": [ + { + "$ref": "#/components/schemas/ScadaReplayTaskContext" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -9777,7 +10641,15 @@ "type": "string" }, "source": { - "$ref": "#/components/schemas/WorkbenchAlertSource" + "anyOf": [ + { + "$ref": "#/components/schemas/WorkbenchAlertSource" + }, + { + "$ref": "#/components/schemas/WorkbenchScadaReplaySource" + } + ], + "title": "Source" }, "title": { "minLength": 1, @@ -10385,6 +11257,39 @@ "title": "WorkbenchRuntimeWorkOrder", "type": "object" }, + "WorkbenchScadaReplaySource": { + "additionalProperties": false, + "properties": { + "batch_sequence": { + "minimum": 1.0, + "title": "Batch Sequence", + "type": "integer" + }, + "kind": { + "const": "scada_replay", + "title": "Kind", + "type": "string" + }, + "replay_id": { + "minLength": 1, + "title": "Replay Id", + "type": "string" + }, + "rule_id": { + "minLength": 1, + "title": "Rule Id", + "type": "string" + } + }, + "required": [ + "kind", + "replay_id", + "rule_id", + "batch_sequence" + ], + "title": "WorkbenchScadaReplaySource", + "type": "object" + }, "WorkbenchSyncSnapshot": { "additionalProperties": false, "properties": { @@ -41258,6 +42163,681 @@ ] } }, + "/api/v1/scada-replays": { + "post": { + "operationId": "post_scada_replays", + "parameters": [ + { + "in": "header", + "name": "X-Project-Id", + "required": true, + "schema": { + "title": "X-Project-Id", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScadaReplayCreate" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScadaReplaySnapshot" + } + } + }, + "description": "Successful Response" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Authentication required" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Insufficient permission" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Resource not found" + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Resource conflict" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Validation error" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Dependency unavailable" + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + } + ], + "summary": "Create Replay", + "tags": [ + "SCADA Replay" + ] + } + }, + "/api/v1/scada-replays/capabilities": { + "get": { + "operationId": "get_scada_replays_capabilities", + "parameters": [ + { + "in": "header", + "name": "X-Project-Id", + "required": true, + "schema": { + "title": "X-Project-Id", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScadaReplayCapabilities" + } + } + }, + "description": "Successful Response" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Authentication required" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Insufficient permission" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Resource not found" + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Resource conflict" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Validation error" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Dependency unavailable" + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + } + ], + "summary": "Replay Capabilities", + "tags": [ + "SCADA Replay" + ] + } + }, + "/api/v1/scada-replays/{replay_id}": { + "get": { + "operationId": "get_scada_replays_replay_id", + "parameters": [ + { + "in": "path", + "name": "replay_id", + "required": true, + "schema": { + "format": "uuid", + "title": "Replay Id", + "type": "string" + } + }, + { + "in": "header", + "name": "X-Project-Id", + "required": true, + "schema": { + "title": "X-Project-Id", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScadaReplaySnapshot" + } + } + }, + "description": "Successful Response" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Authentication required" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Insufficient permission" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Resource not found" + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Resource conflict" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Validation error" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Dependency unavailable" + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + } + ], + "summary": "Get Replay", + "tags": [ + "SCADA Replay" + ] + } + }, + "/api/v1/scada-replays/{replay_id}/commands": { + "post": { + "operationId": "post_scada_replays_replay_id_commands", + "parameters": [ + { + "in": "path", + "name": "replay_id", + "required": true, + "schema": { + "format": "uuid", + "title": "Replay Id", + "type": "string" + } + }, + { + "in": "header", + "name": "X-Project-Id", + "required": true, + "schema": { + "title": "X-Project-Id", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScadaReplayCommand" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScadaReplaySnapshot" + } + } + }, + "description": "Successful Response" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Authentication required" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Insufficient permission" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Resource not found" + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Resource conflict" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Validation error" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Dependency unavailable" + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + } + ], + "summary": "Replay Command", + "tags": [ + "SCADA Replay" + ] + } + }, + "/api/v1/scada-replays/{replay_id}/events": { + "get": { + "operationId": "get_scada_replays_replay_id_events", + "parameters": [ + { + "in": "path", + "name": "replay_id", + "required": true, + "schema": { + "format": "uuid", + "title": "Replay Id", + "type": "string" + } + }, + { + "in": "query", + "name": "offset", + "required": false, + "schema": { + "default": 0, + "minimum": 0, + "title": "Offset", + "type": "integer" + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 100, + "maximum": 200, + "minimum": 1, + "title": "Limit", + "type": "integer" + } + }, + { + "in": "header", + "name": "X-Project-Id", + "required": true, + "schema": { + "title": "X-Project-Id", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScadaReplayEventsPage" + } + } + }, + "description": "Successful Response" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Authentication required" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Insufficient permission" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Resource not found" + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Resource conflict" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Validation error" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Dependency unavailable" + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + } + ], + "summary": "Replay Events", + "tags": [ + "SCADA Replay" + ] + } + }, + "/api/v1/scada-replays/{replay_id}/observations": { + "get": { + "operationId": "get_scada_replays_replay_id_observations", + "parameters": [ + { + "in": "path", + "name": "replay_id", + "required": true, + "schema": { + "format": "uuid", + "title": "Replay Id", + "type": "string" + } + }, + { + "in": "query", + "name": "through", + "required": true, + "schema": { + "format": "date-time", + "title": "Through", + "type": "string" + } + }, + { + "in": "header", + "name": "X-Project-Id", + "required": true, + "schema": { + "title": "X-Project-Id", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScadaReplayReadings" + } + } + }, + "description": "Successful Response" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Authentication required" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Insufficient permission" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Resource not found" + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Resource conflict" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Validation error" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Dependency unavailable" + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + } + ], + "summary": "Replay Observations", + "tags": [ + "SCADA Replay" + ] + } + }, "/api/v1/sensor-placement-candidates/{node_id}": { "get": { "operationId": "get_sensor_placement_candidates_node_id", @@ -49361,6 +50941,178 @@ ] } }, + "/api/v1/timeseries/scada-readings/raw": { + "get": { + "operationId": "get_timeseries_scada_readings_raw", + "parameters": [ + { + "in": "query", + "name": "start_time", + "required": true, + "schema": { + "format": "date-time", + "title": "Start Time", + "type": "string" + } + }, + { + "in": "query", + "name": "end_time", + "required": true, + "schema": { + "format": "date-time", + "title": "End Time", + "type": "string" + } + }, + { + "in": "query", + "name": "device_ids", + "required": true, + "schema": { + "title": "Device Ids", + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 500, + "maximum": 500, + "minimum": 1, + "title": "Limit", + "type": "integer" + } + }, + { + "in": "query", + "name": "cursor", + "required": false, + "schema": { + "anyOf": [ + { + "maxLength": 2048, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Cursor" + } + }, + { + "in": "query", + "name": "replay_id", + "required": false, + "schema": { + "anyOf": [ + { + "format": "uuid", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Replay Id" + } + }, + { + "in": "header", + "name": "X-Project-Id", + "required": true, + "schema": { + "title": "X-Project-Id", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScadaRawPage" + } + } + }, + "description": "Successful Response" + }, + "401": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Authentication required" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Insufficient permission" + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Resource not found" + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Resource conflict" + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Validation error" + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProblemDetails" + } + } + }, + "description": "Dependency unavailable" + } + }, + "security": [ + { + "OAuth2PasswordBearer": [] + } + ], + "summary": "按时间顺序分页读取 SCADA 原始值", + "tags": [ + "TimescaleDB - SCADA" + ] + } + }, "/api/v1/timeseries/scada-readings/{device_id}/field": { "patch": { "description": "更新指定设备的字段值\n\n更新SCADA设备在特定时间的某个字段监测数据。\n\nArgs:\n device_id: 设备ID\n time: 数据时间戳\n field: 字段名称\n value: 字段新值\n\nReturns:\n 更新结果信息\n\nRaises:\n HTTPException: 当字段不存在或更新失败时返回400错误", diff --git a/src/generated/server-api.d.ts b/src/generated/server-api.d.ts index 17631d0..137a907 100644 --- a/src/generated/server-api.d.ts +++ b/src/generated/server-api.d.ts @@ -4071,6 +4071,108 @@ export interface paths { patch?: never; trace?: never; }; + "/api/v1/scada-replays": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Create Replay */ + post: operations["post_scada_replays"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/scada-replays/capabilities": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Replay Capabilities */ + get: operations["get_scada_replays_capabilities"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/scada-replays/{replay_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get Replay */ + get: operations["get_scada_replays_replay_id"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/scada-replays/{replay_id}/commands": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Replay Command */ + post: operations["post_scada_replays_replay_id_commands"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/scada-replays/{replay_id}/events": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Replay Events */ + get: operations["get_scada_replays_replay_id_events"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/scada-replays/{replay_id}/observations": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Replay Observations */ + get: operations["get_scada_replays_replay_id_observations"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/api/v1/sensor-placement-candidates/{node_id}": { parameters: { query?: never; @@ -5131,6 +5233,23 @@ export interface paths { patch?: never; trace?: never; }; + "/api/v1/timeseries/scada-readings/raw": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** 按时间顺序分页读取 SCADA 原始值 */ + get: operations["get_timeseries_scada_readings_raw"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/api/v1/timeseries/scada-readings/{device_id}/field": { parameters: { query?: never; @@ -5769,6 +5888,7 @@ export interface components { } | null; /** Name */ name: string; + settings?: components["schemas"]["ProjectSettings"]; /** * Status * @default active @@ -5801,6 +5921,7 @@ export interface components { * Format: uuid */ project_id: string; + settings?: components["schemas"]["ProjectSettings"]; /** Status */ status: string; /** @@ -5824,6 +5945,8 @@ export interface components { } | null; /** Name */ name?: string | null; + /** @description 按顶层键合并项目配置;省略的键保持原值,嵌套对象整体替换 */ + settings?: components["schemas"]["ProjectSettings"] | null; /** Status */ status?: ("active" | "inactive" | "archived") | null; }; @@ -8157,6 +8280,7 @@ export interface components { project_id: string; /** Project Role */ project_role: string; + settings?: components["schemas"]["ProjectSettings"]; /** Status */ status: string; }; @@ -8174,6 +8298,21 @@ export interface components { /** Timescale Database */ timescale_database: string; }; + /** + * ProjectSettings + * @description Extensible, non-secret project parameters stored in MetaDB as JSON. + */ + ProjectSettings: { + /** @description 主动监测使用的项目设备角色;不创建定时任务 */ + scada_monitoring?: components["schemas"]["ScadaMonitoringSettings"] | null; + /** + * Scada Monitoring Interval Seconds + * @description SCADA 主动监测演示步长,单位秒;null 表示未配置 + */ + scada_monitoring_interval_seconds?: number | null; + } & { + [key: string]: components["schemas"]["JsonValue"]; + }; /** ProjectSummaryResponse */ ProjectSummaryResponse: { /** Code */ @@ -8358,6 +8497,108 @@ export interface components { /** Total */ total: number; }; + /** ScadaMonitoringResult */ + ScadaMonitoringResult: { + /** Batch Sequence */ + batch_sequence: number; + /** Burst Detection */ + burst_detection: { + [key: string]: unknown; + }; + /** Detail */ + detail: string; + /** + * Knowledge Cutoff + * Format: date-time + */ + knowledge_cutoff: string; + /** + * Monitoring Id + * Format: uuid + */ + monitoring_id: string; + /** Outlet Flow */ + outlet_flow: { + [key: string]: unknown; + }; + /** + * Period End + * Format: date-time + */ + period_end: string; + /** + * Period Start + * Format: date-time + */ + period_start: string; + /** Pressure */ + pressure: { + [key: string]: unknown; + }; + /** Role Gaps */ + role_gaps?: string[]; + /** Rule Version */ + rule_version: string; + /** + * Status + * @enum {string} + */ + status: "normal" | "attention" | "insufficient_data" | "suspected_burst"; + /** Task Id */ + task_id?: string | null; + }; + /** + * ScadaMonitoringSettings + * @description Project-owned device roles used by the manual SCADA monitoring demo. + */ + ScadaMonitoringSettings: { + /** Outlet Flow Device Ids */ + outlet_flow_device_ids?: string[]; + /** Pressure Device Ids */ + pressure_device_ids?: string[]; + /** + * Rule Version + * @default burst-monitor-v1 + */ + rule_version: string; + }; + /** ScadaQualityRange */ + ScadaQualityRange: { + /** Lower */ + lower?: number | null; + /** Upper */ + upper?: number | null; + }; + /** ScadaRawPage */ + ScadaRawPage: { + /** Items */ + items: components["schemas"]["ScadaRawReading"][]; + /** Next Cursor */ + next_cursor: string | null; + /** + * Scanned Through + * Format: date-time + */ + scanned_through: string; + }; + /** ScadaRawReading */ + ScadaRawReading: { + /** Device Id */ + device_id: string; + /** Monitored Value */ + monitored_value: number | null; + /** + * Quality + * @default unvalidated + * @enum {string} + */ + quality: "unvalidated" | "missing" | "invalid"; + /** + * Time + * Format: date-time + */ + time: string; + }; /** ScadaReadingBatchItem */ ScadaReadingBatchItem: { /** Cleaned Value */ @@ -8372,6 +8613,246 @@ export interface components { */ time: string; }; + /** ScadaReplayCapabilities */ + ScadaReplayCapabilities: { + /** Available */ + available: boolean; + /** + * Burst Monitoring Ready + * @default false + */ + burst_monitoring_ready: boolean; + /** Burst Monitoring Reason */ + burst_monitoring_reason?: string | null; + /** Can Write */ + can_write: boolean; + current?: components["schemas"]["ScadaReplaySnapshot"] | null; + /** Monitoring Interval Seconds */ + monitoring_interval_seconds?: number | null; + /** Reason */ + reason?: string | null; + }; + /** ScadaReplayCommand */ + ScadaReplayCommand: { + /** + * Action + * @enum {string} + */ + action: "step" | "stop" | "retry"; + /** Expected Revision */ + expected_revision: number; + /** + * Request Id + * Format: uuid + */ + request_id: string; + }; + /** ScadaReplayCreate */ + ScadaReplayCreate: { + /** Device Ids */ + device_ids: string[]; + /** + * End Time + * Format: date-time + */ + end_time: string; + /** Quality Ranges */ + quality_ranges?: { + [key: string]: components["schemas"]["ScadaQualityRange"]; + }; + /** + * Request Id + * Format: uuid + */ + request_id: string; + /** Rules */ + rules: components["schemas"]["ScadaReplayRule"][]; + /** + * Start Time + * Format: date-time + */ + start_time: string; + }; + /** ScadaReplayEventsPage */ + ScadaReplayEventsPage: { + /** Items */ + items: { + [key: string]: unknown; + }[]; + /** Next Offset */ + next_offset: number | null; + }; + /** ScadaReplayReadings */ + ScadaReplayReadings: { + /** Items */ + items: { + [key: string]: unknown; + }[]; + /** + * Through + * Format: date-time + */ + through: string; + }; + /** ScadaReplayRule */ + ScadaReplayRule: { + /** + * Consecutive Samples + * @default 1 + */ + consecutive_samples: number; + /** Device Ids */ + device_ids: string[]; + /** + * Direction + * @default both + * @enum {string} + */ + direction: "both" | "increase" | "decrease"; + /** + * Kind + * @enum {string} + */ + kind: "relative_change" | "bounds"; + /** Lower */ + lower?: number | null; + /** + * Metric Name + * @default + */ + metric_name: string; + /** + * Minimum Devices + * @default 1 + */ + minimum_devices: number; + /** + * Minimum Samples + * @default 3 + */ + minimum_samples: number; + /** + * Recovery Samples + * @default 2 + */ + recovery_samples: number; + /** Rule Id */ + rule_id: string; + /** Threshold */ + threshold?: number | null; + /** Unit */ + unit: string; + /** Upper */ + upper?: number | null; + /** + * Window Samples + * @default 4 + */ + window_samples: number; + }; + /** ScadaReplaySnapshot */ + ScadaReplaySnapshot: { + /** Active Events */ + active_events: { + [key: string]: unknown; + }[]; + /** + * Anomaly Count + * @default 0 + */ + anomaly_count: number; + /** + * Created At + * Format: date-time + */ + created_at: string; + /** Delivered Until */ + delivered_until?: string | null; + /** Devices */ + devices: { + [key: string]: unknown; + }[]; + /** + * End Time + * Format: date-time + */ + end_time: string; + /** Error */ + error?: string | null; + last_monitoring?: components["schemas"]["ScadaMonitoringResult"] | null; + /** Latest */ + latest: { + [key: string]: unknown; + }[]; + /** + * Monitoring Count + * @default 0 + */ + monitoring_count: number; + /** Monitoring Interval Seconds */ + monitoring_interval_seconds?: number | null; + /** + * Processed Count + * @default 0 + */ + processed_count: number; + /** Processed Until */ + processed_until?: string | null; + /** + * Project Id + * Format: uuid + */ + project_id: string; + /** + * Replay Id + * Format: uuid + */ + replay_id: string; + /** Revision */ + revision: number; + /** Rules */ + rules: components["schemas"]["ScadaReplayRule"][]; + /** + * Start Time + * Format: date-time + */ + start_time: string; + /** + * Status + * @enum {string} + */ + status: "ready" | "paused" | "completed" | "stopped" | "failed"; + /** + * Step Pending + * @default false + */ + step_pending: boolean; + /** + * Updated At + * Format: date-time + */ + updated_at: string; + /** + * Virtual Now + * Format: date-time + */ + virtual_now: string; + }; + /** ScadaReplayTaskContext */ + ScadaReplayTaskContext: { + /** Batch Sequence */ + batch_sequence: number; + /** + * Knowledge Cutoff + * Format: date-time + */ + knowledge_cutoff: string; + /** + * Replay Id + * Format: uuid + */ + replay_id: string; + }; /** SensorPlacementExportRequest */ SensorPlacementExportRequest: { /** Adjustment Status */ @@ -8594,7 +9075,8 @@ export interface components { * @enum {string} */ severity: "warning" | "critical"; - source: components["schemas"]["WorkbenchAlertSource"]; + /** Source */ + source: components["schemas"]["WorkbenchAlertSource"] | components["schemas"]["WorkbenchScadaReplaySource"]; /** Title */ title: string; }; @@ -8620,7 +9102,8 @@ export interface components { * @enum {string} */ severity: "warning" | "critical"; - source: components["schemas"]["WorkbenchAlertSource"]; + /** Source */ + source: components["schemas"]["WorkbenchAlertSource"] | components["schemas"]["WorkbenchScadaReplaySource"]; /** * Status * @enum {string} @@ -9075,6 +9558,7 @@ export interface components { * @enum {string} */ kind: "schedule" | "external_system" | "operator" | "agent"; + replay_context?: components["schemas"]["ScadaReplayTaskContext"] | null; }; /** TaskTrigger */ TaskTrigger: { @@ -9235,7 +9719,8 @@ export interface components { * @enum {string} */ severity: "warning" | "critical"; - source: components["schemas"]["WorkbenchAlertSource"]; + /** Source */ + source: components["schemas"]["WorkbenchAlertSource"] | components["schemas"]["WorkbenchScadaReplaySource"]; /** Title */ title: string; }; @@ -9471,6 +9956,20 @@ export interface components { */ updated_at: string; }; + /** WorkbenchScadaReplaySource */ + WorkbenchScadaReplaySource: { + /** Batch Sequence */ + batch_sequence: number; + /** + * Kind + * @constant + */ + kind: "scada_replay"; + /** Replay Id */ + replay_id: string; + /** Rule Id */ + rule_id: string; + }; /** WorkbenchSyncSnapshot */ WorkbenchSyncSnapshot: { /** Event Cursor */ @@ -30933,6 +31432,483 @@ export interface operations { }; }; }; + post_scada_replays: { + parameters: { + query?: never; + header: { + "X-Project-Id": string; + }; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ScadaReplayCreate"]; + }; + }; + responses: { + /** @description Successful Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ScadaReplaySnapshot"]; + }; + }; + /** @description Authentication required */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Insufficient permission */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Resource conflict */ + 409: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Validation error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Dependency unavailable */ + 503: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + }; + }; + get_scada_replays_capabilities: { + parameters: { + query?: never; + header: { + "X-Project-Id": string; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ScadaReplayCapabilities"]; + }; + }; + /** @description Authentication required */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Insufficient permission */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Resource conflict */ + 409: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Validation error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Dependency unavailable */ + 503: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + }; + }; + get_scada_replays_replay_id: { + parameters: { + query?: never; + header: { + "X-Project-Id": string; + }; + path: { + replay_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ScadaReplaySnapshot"]; + }; + }; + /** @description Authentication required */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Insufficient permission */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Resource conflict */ + 409: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Validation error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Dependency unavailable */ + 503: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + }; + }; + post_scada_replays_replay_id_commands: { + parameters: { + query?: never; + header: { + "X-Project-Id": string; + }; + path: { + replay_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ScadaReplayCommand"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ScadaReplaySnapshot"]; + }; + }; + /** @description Authentication required */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Insufficient permission */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Resource conflict */ + 409: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Validation error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Dependency unavailable */ + 503: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + }; + }; + get_scada_replays_replay_id_events: { + parameters: { + query?: { + offset?: number; + limit?: number; + }; + header: { + "X-Project-Id": string; + }; + path: { + replay_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ScadaReplayEventsPage"]; + }; + }; + /** @description Authentication required */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Insufficient permission */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Resource conflict */ + 409: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Validation error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Dependency unavailable */ + 503: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + }; + }; + get_scada_replays_replay_id_observations: { + parameters: { + query: { + through: string; + }; + header: { + "X-Project-Id": string; + }; + path: { + replay_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ScadaReplayReadings"]; + }; + }; + /** @description Authentication required */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Insufficient permission */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Resource conflict */ + 409: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Validation error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Dependency unavailable */ + 503: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + }; + }; get_sensor_placement_candidates_node_id: { parameters: { query?: never; @@ -36446,6 +37422,89 @@ export interface operations { }; }; }; + get_timeseries_scada_readings_raw: { + parameters: { + query: { + start_time: string; + end_time: string; + device_ids: string; + limit?: number; + cursor?: string | null; + replay_id?: string | null; + }; + header: { + "X-Project-Id": string; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ScadaRawPage"]; + }; + }; + /** @description Authentication required */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Insufficient permission */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Resource not found */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Resource conflict */ + 409: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Validation error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + /** @description Dependency unavailable */ + 503: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ProblemDetails"]; + }; + }; + }; + }; patch_timeseries_scada_readings_device_id_field: { parameters: { query: {