diff --git a/.env.example b/.env.example index 9a1b3c2..6262dc0 100644 --- a/.env.example +++ b/.env.example @@ -7,8 +7,8 @@ NEXTAUTH_URL="https://frontend.example.com/" BACKEND_URL="https://server.example.com" AGENT_URL="https://agent.example.com" MAP_URL="https://geoserver.example.com/geoserver" -MAP_WORKSPACE="tjwater" -MAP_EXTENT="13490131,3630016,13525879,3666968.25" -NETWORK_NAME="tjwater" +MAP_WORKSPACE="tjwater_next" +MAP_EXTENT="13508801.93,3608163.35,13555650.64,3633685.14" +NETWORK_NAME="tjwater_next" MAPBOX_TOKEN="replace-with-public-mapbox-token" TIANDITU_TOKEN="replace-with-public-tianditu-token" diff --git a/contracts/manifest.json b/contracts/manifest.json index cc5d561..d250204 100644 --- a/contracts/manifest.json +++ b/contracts/manifest.json @@ -7,7 +7,7 @@ }, "server": { "file": "server-v1.openapi.json", - "sha256": "ac9b6fac185dfd999f1791cba51eb482df17a427b361963250aafa5fb1a276b4" + "sha256": "404a196c0177faed2aa5b46ee86430a034dfe990e0a77a43428a727748a882b6" } } } diff --git a/contracts/server-v1.openapi.json b/contracts/server-v1.openapi.json index 5c176bc..a53537d 100644 --- a/contracts/server-v1.openapi.json +++ b/contracts/server-v1.openapi.json @@ -532,32 +532,6 @@ "title": "Body_post_timeseries_realtime_simulation_results", "type": "object" }, - "Body_post_timeseries_schemes_simulation_results": { - "properties": { - "link_result_list": { - "description": "管道模拟结果列表", - "items": { - "type": "object" - }, - "title": "Link Result List", - "type": "array" - }, - "node_result_list": { - "description": "节点模拟结果列表", - "items": { - "type": "object" - }, - "title": "Node Result List", - "type": "array" - } - }, - "required": [ - "node_result_list", - "link_result_list" - ], - "title": "Body_post_timeseries_schemes_simulation_results", - "type": "object" - }, "BurstDetectionRequestRest": { "properties": { "data_source": { @@ -686,29 +660,18 @@ "description": "传感器节点列表", "title": "Sensor Nodes" }, - "simulation_scheme_name": { + "simulation_run_id": { "anyOf": [ { + "format": "uuid", "type": "string" }, { "type": "null" } ], - "description": "模拟方案名称", - "title": "Simulation Scheme Name" - }, - "simulation_scheme_type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "模拟方案类型", - "title": "Simulation Scheme Type" + "description": "分析模拟运行 ID", + "title": "Simulation Run Id" }, "target_time": { "anyOf": [ @@ -931,32 +894,21 @@ "type": "null" } ], - "description": "方案名称", + "description": "爆管定位运行名称", "title": "Scheme Name" }, - "simulation_scheme_name": { + "simulation_run_id": { "anyOf": [ { + "format": "uuid", "type": "string" }, { "type": "null" } ], - "description": "模拟方案名称", - "title": "Simulation Scheme Name" - }, - "simulation_scheme_type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "模拟方案类型", - "title": "Simulation Scheme Type" + "description": "分析模拟运行 ID", + "title": "Simulation Run Id" }, "use_scada_flow": { "default": false, @@ -1597,11 +1549,11 @@ "title": "Page[ProjectSummaryResponse]", "type": "object" }, - "Page_dict_Any__Any__": { + "Page_SensorPlacementSchemeResponse_": { "properties": { "items": { "items": { - "type": "object" + "$ref": "#/components/schemas/SensorPlacementSchemeResponse" }, "title": "Items", "type": "array" @@ -1625,7 +1577,7 @@ "limit", "offset" ], - "title": "Page[dict[Any, Any]]", + "title": "Page[SensorPlacementSchemeResponse]", "type": "object" }, "Page_dict_str__Any__": { @@ -1659,77 +1611,6 @@ "title": "Page[dict[str, Any]]", "type": "object" }, - "Page_dict_str__list_str___": { - "properties": { - "items": { - "items": { - "additionalProperties": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": "object" - }, - "title": "Items", - "type": "array" - }, - "limit": { - "title": "Limit", - "type": "integer" - }, - "offset": { - "title": "Offset", - "type": "integer" - }, - "total": { - "title": "Total", - "type": "integer" - } - }, - "required": [ - "items", - "total", - "limit", - "offset" - ], - "title": "Page[dict[str, list[str]]]", - "type": "object" - }, - "Page_list_str__": { - "properties": { - "items": { - "items": { - "items": { - "type": "string" - }, - "type": "array" - }, - "title": "Items", - "type": "array" - }, - "limit": { - "title": "Limit", - "type": "integer" - }, - "offset": { - "title": "Offset", - "type": "integer" - }, - "total": { - "title": "Total", - "type": "integer" - } - }, - "required": [ - "items", - "total", - "limit", - "offset" - ], - "title": "Page[list[str]]", - "type": "object" - }, "Page_str_": { "properties": { "items": { @@ -1761,47 +1642,6 @@ "title": "Page[str]", "type": "object" }, - "Page_tuple_int__str__": { - "properties": { - "items": { - "items": { - "maxItems": 2, - "minItems": 2, - "prefixItems": [ - { - "type": "integer" - }, - { - "type": "string" - } - ], - "type": "array" - }, - "title": "Items", - "type": "array" - }, - "limit": { - "title": "Limit", - "type": "integer" - }, - "offset": { - "title": "Offset", - "type": "integer" - }, - "total": { - "title": "Total", - "type": "integer" - } - }, - "required": [ - "items", - "total", - "limit", - "offset" - ], - "title": "Page[tuple[int, str]]", - "type": "object" - }, "PressureRegulationRest": { "properties": { "duration": { @@ -1859,32 +1699,6 @@ "title": "PressureRegulationRest", "type": "object" }, - "PressureSensorPlacementRest": { - "properties": { - "min_diameter": { - "default": 0, - "description": "最小管径限制", - "title": "Min Diameter", - "type": "integer" - }, - "scheme_name": { - "description": "方案名称", - "title": "Scheme Name", - "type": "string" - }, - "sensor_number": { - "description": "传感器数量", - "title": "Sensor Number", - "type": "integer" - } - }, - "required": [ - "scheme_name", - "sensor_number" - ], - "title": "PressureSensorPlacementRest", - "type": "object" - }, "ProblemDetails": { "description": "RFC 9457 compatible error response used by the REST contract.", "properties": { @@ -2417,18 +2231,18 @@ "title": "Adjustment Status", "type": "object" }, - "sensor_location": { + "sensor_locations": { "items": { "type": "string" }, "maxItems": 200, "minItems": 1, - "title": "Sensor Location", + "title": "Sensor Locations", "type": "array" } }, "required": [ - "sensor_location" + "sensor_locations" ], "title": "SensorPlacementExportRequest", "type": "object" @@ -2449,10 +2263,10 @@ "title": "Min Diameter", "type": "integer" }, - "scheme_name": { - "maxLength": 32, + "run_name": { + "maxLength": 64, "minLength": 1, - "title": "Scheme Name", + "title": "Run Name", "type": "string" }, "sensor_count": { @@ -2468,7 +2282,7 @@ } }, "required": [ - "scheme_name", + "run_name", "sensor_type", "method", "sensor_count" @@ -2483,34 +2297,39 @@ "title": "Can Edit", "type": "boolean" }, - "create_time": { + "created_at": { "format": "date-time", - "title": "Create Time", + "title": "Created At", "type": "string" }, - "id": { - "title": "Id", - "type": "integer" + "created_by": { + "title": "Created By", + "type": "string" }, "min_diameter": { "title": "Min Diameter", "type": "integer" }, - "scheme_name": { - "title": "Scheme Name", + "name": { + "title": "Name", "type": "string" }, - "sensor_location": { + "run_id": { + "format": "uuid", + "title": "Run Id", + "type": "string" + }, + "sensor_count": { + "title": "Sensor Count", + "type": "integer" + }, + "sensor_locations": { "items": { "type": "string" }, - "title": "Sensor Location", + "title": "Sensor Locations", "type": "array" }, - "sensor_number": { - "title": "Sensor Number", - "type": "integer" - }, "sensor_points": { "items": { "$ref": "#/components/schemas/SensorPointResponse" @@ -2518,19 +2337,20 @@ "title": "Sensor Points", "type": "array" }, - "username": { - "title": "Username", + "status": { + "title": "Status", "type": "string" } }, "required": [ - "id", - "scheme_name", - "sensor_number", + "run_id", + "name", + "sensor_count", "min_diameter", - "username", - "create_time", - "sensor_location", + "created_by", + "created_at", + "status", + "sensor_locations", "sensor_points" ], "title": "SensorPlacementSchemeResponse", @@ -2538,28 +2358,28 @@ }, "SensorPlacementUpdateRequest": { "properties": { - "expected_sensor_location": { + "expected_sensor_locations": { "items": { "type": "string" }, "maxItems": 200, "minItems": 1, - "title": "Expected Sensor Location", + "title": "Expected Sensor Locations", "type": "array" }, - "sensor_location": { + "sensor_locations": { "items": { "type": "string" }, "maxItems": 200, "minItems": 1, - "title": "Sensor Location", + "title": "Sensor Locations", "type": "array" } }, "required": [ - "expected_sensor_location", - "sensor_location" + "expected_sensor_locations", + "sensor_locations" ], "title": "SensorPlacementUpdateRequest", "type": "object" @@ -5007,226 +4827,6 @@ ] } }, - "/api/v1/all-extension-data-keys": { - "get": { - "description": "获取指定网络的所有扩展数据的键列表", - "operationId": "get_all_extension_data_keys", - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_str_" - } - } - }, - "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": "获取所有扩展数据键", - "tags": [ - "Extension" - ] - } - }, - "/api/v1/all-extension-datas": { - "get": { - "description": "获取指定网络的所有扩展数据", - "operationId": "get_all_extension_datas", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Response Get All Extension Datas", - "type": "object" - } - } - }, - "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": "获取所有扩展数据", - "tags": [ - "Extension" - ] - } - }, "/api/v1/all-scada-properties": { "get": { "description": "获取指定水网中所有SCADA点的属性信息", @@ -5469,6 +5069,338 @@ ] } }, + "/api/v1/analysis/runs": { + "get": { + "description": "获取所有方案信息\n\n返回项目中所有方案的详细信息", + "operationId": "get_analysis_runs", + "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/JsonValue" + } + } + }, + "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": "获取分析运行列表", + "tags": [ + "Project Data" + ] + } + }, + "/api/v1/analysis/runs/{run_id}": { + "get": { + "description": "获取所有爆管定位结果\n\n返回项目中所有的爆管定位分析结果", + "operationId": "get_analysis_runs_run_id", + "parameters": [ + { + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "format": "uuid", + "title": "Run 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/JsonValue" + } + } + }, + "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": "获取分析运行", + "tags": [ + "Project Data" + ] + } + }, + "/api/v1/analysis/runs/{run_id}/results": { + "get": { + "description": "根据爆管事件ID查询爆管定位结果\n\n参数:\n burst_incident: 爆管事件的唯一标识符", + "operationId": "get_analysis_runs_run_id_results", + "parameters": [ + { + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "format": "uuid", + "title": "Run Id", + "type": "string" + } + }, + { + "description": "结果类型", + "in": "query", + "name": "result_type", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "结果类型", + "title": "Result Type" + } + }, + { + "in": "header", + "name": "X-Project-Id", + "required": true, + "schema": { + "title": "X-Project-Id", + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonValue" + } + } + }, + "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": "获取分析结果", + "tags": [ + "Project Data" + ] + } + }, "/api/v1/audit-events": { "post": { "operationId": "post_audit_events", @@ -6626,125 +6558,6 @@ } }, "/api/v1/burst-locations": { - "get": { - "description": "获取网络中所有爆管定位的分析结果", - "operationId": "get_burst_locations", - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_dict_Any__Any__" - } - } - }, - "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": "获取所有爆管定位结果", - "tags": [ - "Misc" - ] - }, "post": { "description": "基于压力和流量数据定位管网中的爆管位置", "operationId": "post_burst_locations", @@ -6854,213 +6667,6 @@ ] } }, - "/api/v1/burst-locations/database-view": { - "get": { - "description": "使用连接池查询所有爆管定位结果", - "operationId": "get_burst_locations_database_view", - "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/JsonValue" - } - } - }, - "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": "获取爆管定位结果", - "tags": [ - "Project Data" - ] - } - }, - "/api/v1/burst-locations/{burst_incident}": { - "get": { - "description": "根据爆管事件ID查询对应的爆管定位结果", - "operationId": "get_burst_locations_burst_incident", - "parameters": [ - { - "description": "爆管事件ID", - "in": "path", - "name": "burst_incident", - "required": true, - "schema": { - "description": "爆管事件ID", - "title": "Burst Incident", - "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/JsonValue" - } - } - }, - "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": "按事件查询爆管定位结果", - "tags": [ - "Project Data" - ] - } - }, "/api/v1/contaminant-simulations": { "post": { "description": "对管网中的污染物扩散进行模拟,评估污染源对管网的影响范围和浓度分布。支持指定污染源位置、污染浓度和扩散模式。", @@ -7427,105 +7033,6 @@ ] } }, - "/api/v1/current-operation-ids": { - "get": { - "description": "获取网络当前的操作ID", - "operationId": "get_current_operation_ids", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Response Get Current Operation Ids", - "type": "integer" - } - } - }, - "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": "获取当前操作ID", - "tags": [ - "Snapshots" - ] - } - }, "/api/v1/curves": { "delete": { "description": "从网络中删除指定的曲线", @@ -8826,1134 +8333,6 @@ ] } }, - "/api/v1/district-metering-area-generation-runs": { - "post": { - "description": "根据参数自动生成水网的DMA分区方案", - "operationId": "post_district_metering_area_generation_runs", - "parameters": [ - { - "description": "分区数量", - "in": "query", - "name": "part_count", - "required": true, - "schema": { - "description": "分区数量", - "exclusiveMinimum": 0, - "title": "Part Count", - "type": "integer" - } - }, - { - "description": "分区类型", - "in": "query", - "name": "part_type", - "required": true, - "schema": { - "description": "分区类型", - "title": "Part Type", - "type": "integer" - } - }, - { - "description": "膨胀参数", - "in": "query", - "name": "inflate_delta", - "required": true, - "schema": { - "description": "膨胀参数", - "title": "Inflate Delta", - "type": "number" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "生成DMA分区", - "tags": [ - "Regions & DMAs" - ] - } - }, - "/api/v1/district-metering-areas": { - "delete": { - "description": "删除指定的区域计量(DMA)", - "operationId": "delete_district_metering_areas", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "204": { - "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": "删除DMA", - "tags": [ - "Regions & DMAs" - ] - }, - "get": { - "description": "获取指定水网中所有DMA的详细信息", - "operationId": "get_district_metering_areas", - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_dict_str__Any__" - } - } - }, - "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": "获取所有DMA", - "tags": [ - "Regions & DMAs" - ] - }, - "patch": { - "description": "修改指定DMA的属性信息", - "operationId": "patch_district_metering_areas", - "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/JsonValue" - } - } - }, - "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": "设置DMA属性", - "tags": [ - "Regions & DMAs" - ] - }, - "post": { - "description": "向水网添加一个新的区域计量(DMA)", - "operationId": "post_district_metering_areas", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "添加新DMA", - "tags": [ - "Regions & DMAs" - ] - } - }, - "/api/v1/district-metering-areas/detail": { - "get": { - "description": "获取指定ID的区域计量(DMA)详细信息", - "operationId": "get_district_metering_areas_detail", - "parameters": [ - { - "description": "DMA ID", - "in": "query", - "name": "id", - "required": true, - "schema": { - "description": "DMA ID", - "title": "Id", - "type": "string" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Response Get District Metering Areas Detail", - "type": "object" - } - } - }, - "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": "获取DMA信息", - "tags": [ - "Regions & DMAs" - ] - } - }, - "/api/v1/district-metering-areas/for-network": { - "post": { - "description": "为整个水网计算区域计量(DMA)分区方案", - "operationId": "post_district_metering_areas_for_network", - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_list_str__" - } - } - }, - "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": "计算整网DMA分区", - "tags": [ - "Regions & DMAs" - ] - } - }, - "/api/v1/district-metering-areas/for-nodes": { - "post": { - "description": "为指定节点集计算区域计量(DMA)分区方案", - "operationId": "post_district_metering_areas_for_nodes", - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_list_str__" - } - } - }, - "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": "计算节点DMA分区", - "tags": [ - "Regions & DMAs" - ] - } - }, - "/api/v1/district-metering-areas/for-region": { - "post": { - "description": "为指定区域计算区域计量(DMA)分区方案", - "operationId": "post_district_metering_areas_for_region", - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_list_str__" - } - } - }, - "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": "计算区域内DMA分区", - "tags": [ - "Regions & DMAs" - ] - } - }, - "/api/v1/district-metering-areas/ids": { - "get": { - "description": "获取指定水网中所有DMA的ID列表", - "operationId": "get_district_metering_areas_ids", - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_str_" - } - } - }, - "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": "获取所有DMA ID", - "tags": [ - "Regions & DMAs" - ] - } - }, "/api/v1/element-properties": { "get": { "description": "获取指定元素的属性信息", @@ -10720,219 +9099,6 @@ ] } }, - "/api/v1/extension-datas": { - "get": { - "description": "获取指定网络中指定键的扩展数据值", - "operationId": "get_extension_datas", - "parameters": [ - { - "description": "扩展数据键", - "in": "query", - "name": "key", - "required": true, - "schema": { - "description": "扩展数据键", - "title": "Key", - "type": "string" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Response Get Extension Datas" - } - } - }, - "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": "获取指定扩展数据", - "tags": [ - "Extension" - ] - }, - "patch": { - "description": "设置指定网络中的扩展数据", - "operationId": "patch_extension_datas", - "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/JsonValue" - } - } - }, - "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": "设置扩展数据", - "tags": [ - "Extension" - ] - } - }, "/api/v1/flushing-analyses": { "post": { "description": "高级版本的冲洗分析,支持按状态和设置值控制多个可选阀门,指定排污节点,并设置固定的冲洗流量。返回纯文本格式的分析结果。", @@ -15157,202 +13323,6 @@ ] } }, - "/api/v1/network-command-batches": { - "post": { - "description": "执行多个网络操作命令", - "operationId": "post_network_command_batches", - "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/JsonValue" - } - } - }, - "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": "执行批量命令", - "tags": [ - "Snapshots" - ] - } - }, - "/api/v1/network-command-batches/compressed": { - "post": { - "description": "执行压缩的批量命令", - "operationId": "post_network_command_batches_compressed", - "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/JsonValue" - } - } - }, - "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": "执行压缩批量命令", - "tags": [ - "Snapshots" - ] - } - }, "/api/v1/network-in-extents": { "get": { "description": "获取指定地理范围内的网络节点和管线", @@ -16215,127 +14185,6 @@ ] } }, - "/api/v1/network-pipe-risk-probability-nows": { - "get": { - "description": "获取指定网络中所有管道的当前风险概率值", - "operationId": "get_network_pipe_risk_probability_nows", - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_dict_str__Any__" - } - } - }, - "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": "获取整个网络的管道风险概率", - "tags": [ - "Risk" - ] - } - }, "/api/v1/network-schemas/backdrop": { "get": { "description": "获取网络中背景对象的架构定义", @@ -16744,108 +14593,6 @@ ] } }, - "/api/v1/network-schemas/district-metering-area": { - "get": { - "description": "获取指定水网的区域计量(DMA)属性架构定义", - "operationId": "get_network_schemas_district_metering_area", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "additionalProperties": { - "type": "object" - }, - "title": "Response Get Network Schemas District Metering Area", - "type": "object" - } - } - }, - "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": "获取DMA属性架构", - "tags": [ - "Regions & DMAs" - ] - } - }, "/api/v1/network-schemas/emitter": { "get": { "description": "获取网络中发射器对象的架构定义", @@ -18174,7 +15921,6 @@ }, "/api/v1/network-schemas/region": { "get": { - "description": "获取指定水网的区域属性架构定义", "operationId": "get_network_schemas_region", "parameters": [ { @@ -18378,7 +16124,6 @@ }, "/api/v1/network-schemas/scada-device": { "get": { - "description": "获取SCADA设备的数据架构\n\n返回SCADA设备表的字段定义和类型信息。\n\nArgs:\n network: 管网名称(或数据库名称)\n \nReturns:\n SCADA设备的字段架构信息", "operationId": "get_network_schemas_scada_device", "parameters": [ { @@ -18472,417 +16217,9 @@ "OAuth2PasswordBearer": [] } ], - "summary": "获取SCADA设备架构", + "summary": "获取 SCADA 设备结构", "tags": [ - "SCADA设备" - ] - } - }, - "/api/v1/network-schemas/scada-device-data": { - "get": { - "description": "获取SCADA设备数据的表结构\n\n返回SCADA设备数据表的字段定义和类型信息。\n\nArgs:\n network: 管网名称(或数据库名称)\n \nReturns:\n SCADA设备数据的字段架构信息", - "operationId": "get_network_schemas_scada_device_data", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "additionalProperties": { - "type": "object" - }, - "title": "Response Get Network Schemas Scada Device Data", - "type": "object" - } - } - }, - "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": [ - "SCADA设备数据" - ] - } - }, - "/api/v1/network-schemas/scada-element": { - "get": { - "description": "获取SCADA元素映射的表结构\n\n返回SCADA元素映射表的字段定义和类型信息。\n\nArgs:\n network: 管网名称(或数据库名称)\n \nReturns:\n SCADA元素映射的字段架构信息", - "operationId": "get_network_schemas_scada_element", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "additionalProperties": { - "type": "object" - }, - "title": "Response Get Network Schemas Scada Element", - "type": "object" - } - } - }, - "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": [ - "SCADA元素映射" - ] - } - }, - "/api/v1/network-schemas/scheme": { - "get": { - "description": "获取指定网络的方案模式定义", - "operationId": "get_network_schemas_scheme", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "additionalProperties": { - "type": "object" - }, - "title": "Response Get Network Schemas Scheme", - "type": "object" - } - } - }, - "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": "获取方案模式", - "tags": [ - "Schemes" - ] - } - }, - "/api/v1/network-schemas/service-area": { - "get": { - "description": "获取指定水网的服务区属性架构定义", - "operationId": "get_network_schemas_service_area", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "additionalProperties": { - "type": "object" - }, - "title": "Response Get Network Schemas Service Area", - "type": "object" - } - } - }, - "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": "获取服务区属性架构", - "tags": [ - "Regions & DMAs" + "SCADA Metadata" ] } }, @@ -19600,108 +16937,6 @@ ] } }, - "/api/v1/network-schemas/virtual-district": { - "get": { - "description": "获取指定水网的虚拟分区属性架构定义", - "operationId": "get_network_schemas_virtual_district", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "additionalProperties": { - "type": "object" - }, - "title": "Response Get Network Schemas Virtual District", - "type": "object" - } - } - }, - "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": "获取虚拟分区属性架构", - "tags": [ - "Regions & DMAs" - ] - } - }, "/api/v1/node-coords": { "get": { "description": "获取指定节点的地理坐标(X, Y)", @@ -20505,127 +17740,6 @@ ] } }, - "/api/v1/operations": { - "patch": { - "description": "选择并恢复到指定的操作", - "operationId": "patch_operations", - "parameters": [ - { - "description": "操作ID", - "in": "query", - "name": "operation", - "required": true, - "schema": { - "description": "操作ID", - "title": "Operation", - "type": "integer" - } - }, - { - "description": "是否丢弃当前更改", - "in": "query", - "name": "discard", - "required": false, - "schema": { - "default": false, - "description": "是否丢弃当前更改", - "title": "Discard", - "type": "boolean" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "选择操作", - "tags": [ - "Snapshots" - ] - } - }, "/api/v1/outputs": { "get": { "description": "导出指定路径的模拟输出文件内容。参数应为绝对路径。", @@ -22119,138 +19233,6 @@ ] } }, - "/api/v1/pipes-risk-probabilities": { - "get": { - "description": "批量获取多条管道的风险概率值", - "operationId": "get_pipes_risk_probabilities", - "parameters": [ - { - "description": "逗号分隔的管道ID列表", - "in": "query", - "name": "pipe_ids", - "required": true, - "schema": { - "description": "逗号分隔的管道ID列表", - "title": "Pipe Ids", - "type": "string" - } - }, - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_dict_str__Any__" - } - } - }, - "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": "批量获取多条管道风险概率", - "tags": [ - "Risk" - ] - } - }, "/api/v1/pipes/diameter": { "get": { "description": "获取指定管道的管径", @@ -23753,325 +20735,6 @@ ] } }, - "/api/v1/pipes/risk-probability": { - "get": { - "description": "获取指定管道的风险概率历史数据", - "operationId": "get_pipes_risk_probability", - "parameters": [ - { - "description": "管道ID", - "in": "query", - "name": "pipe_id", - "required": true, - "schema": { - "description": "管道ID", - "title": "Pipe Id", - "type": "string" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Response Get Pipes Risk Probability", - "type": "object" - } - } - }, - "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": "获取管道风险概率历史", - "tags": [ - "Risk" - ] - } - }, - "/api/v1/pipes/risk-probability-geometries": { - "get": { - "description": "获取指定网络中管道的风险相关几何数据", - "operationId": "get_pipes_risk_probability_geometries", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Response Get Pipes Risk Probability Geometries", - "type": "object" - } - } - }, - "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": "获取管道风险几何信息", - "tags": [ - "Risk" - ] - } - }, - "/api/v1/pipes/risk-probability-now": { - "get": { - "description": "获取指定管道当前时刻的风险概率值", - "operationId": "get_pipes_risk_probability_now", - "parameters": [ - { - "description": "管道ID", - "in": "query", - "name": "pipe_id", - "required": true, - "schema": { - "description": "管道ID", - "title": "Pipe Id", - "type": "string" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Response Get Pipes Risk Probability Now", - "type": "object" - } - } - }, - "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": "获取管道当前风险概率", - "tags": [ - "Risk" - ] - } - }, "/api/v1/pipes/roughness": { "get": { "description": "获取指定管道的粗糙度", @@ -24772,486 +21435,6 @@ ] } }, - "/api/v1/pressure-sensor-placement-kmeans": { - "post": { - "description": "高级版本的压力传感器放置分析,通过JSON请求体提供详细参数。基于KMeans聚类算法确定最优放置位置。", - "operationId": "post_pressure_sensor_placement_kmeans", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PressureSensorPlacementRest", - "description": "传感器放置分析参数" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "压力传感器放置-KMeans聚类分析(高级)", - "tags": [ - "Simulation Control" - ] - } - }, - "/api/v1/pressure-sensor-placement-kmeans-calculations": { - "post": { - "description": "基于KMeans聚类算法,为指定管网项目确定压力传感器的最优放置位置。此为基础版本。", - "operationId": "post_pressure_sensor_placement_kmeans_calculations", - "parameters": [ - { - "description": "放置方案名称", - "in": "query", - "name": "scheme_name", - "required": true, - "schema": { - "description": "放置方案名称", - "title": "Scheme Name", - "type": "string" - } - }, - { - "description": "传感器数量", - "in": "query", - "name": "sensor_number", - "required": true, - "schema": { - "description": "传感器数量", - "title": "Sensor Number", - "type": "integer" - } - }, - { - "description": "最小管径限制(毫米)", - "in": "query", - "name": "min_diameter", - "required": true, - "schema": { - "description": "最小管径限制(毫米)", - "title": "Min Diameter", - "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/JsonValue" - } - } - }, - "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": "压力传感器放置-KMeans聚类分析(基础)", - "tags": [ - "Simulation Control" - ] - } - }, - "/api/v1/pressure-sensor-placement-sensitivities": { - "post": { - "description": "高级版本的压力传感器放置分析,通过JSON请求体提供详细参数。基于灵敏度分析方法确定最优放置位置。", - "operationId": "post_pressure_sensor_placement_sensitivities", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PressureSensorPlacementRest", - "description": "传感器放置分析参数" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "压力传感器放置-灵敏度分析(高级)", - "tags": [ - "Simulation Control" - ] - } - }, - "/api/v1/pressure-sensor-placement-sensitivity-calculations": { - "post": { - "description": "基于灵敏度分析方法,为指定管网项目确定最优的压力传感器放置位置。此为基础版本。", - "operationId": "post_pressure_sensor_placement_sensitivity_calculations", - "parameters": [ - { - "description": "放置方案名称", - "in": "query", - "name": "scheme_name", - "required": true, - "schema": { - "description": "放置方案名称", - "title": "Scheme Name", - "type": "string" - } - }, - { - "description": "传感器数量", - "in": "query", - "name": "sensor_number", - "required": true, - "schema": { - "description": "传感器数量", - "title": "Sensor Number", - "type": "integer" - } - }, - { - "description": "最小管径限制(毫米)", - "in": "query", - "name": "min_diameter", - "required": true, - "schema": { - "description": "最小管径限制(毫米)", - "title": "Min Diameter", - "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/JsonValue" - } - } - }, - "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": "压力传感器放置-灵敏度分析(基础)", - "tags": [ - "Simulation Control" - ] - } - }, "/api/v1/project-codes": { "get": { "description": "获取服务器上所有可用的供水管网项目名称列表。", @@ -29361,107 +25544,8 @@ ] } }, - "/api/v1/redos": { - "post": { - "description": "重做网络上被撤销的操作", - "operationId": "post_redos", - "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/JsonValue" - } - } - }, - "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": "重做操作", - "tags": [ - "Snapshots" - ] - } - }, "/api/v1/regions": { "delete": { - "description": "删除指定的区域", "operationId": "delete_regions", "parameters": [ { @@ -29549,8 +25633,125 @@ "Regions & DMAs" ] }, + "get": { + "operationId": "get_regions", + "parameters": [ + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 100, + "maximum": 1000, + "minimum": 1, + "title": "Limit", + "type": "integer" + } + }, + { + "in": "query", + "name": "offset", + "required": false, + "schema": { + "default": 0, + "minimum": 0, + "title": "Offset", + "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/Page_dict_str__Any__" + } + } + }, + "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": "获取区域列表", + "tags": [ + "Regions & DMAs" + ] + }, "patch": { - "description": "修改指定区域的属性信息", "operationId": "patch_regions", "parameters": [ { @@ -29640,13 +25841,12 @@ "OAuth2PasswordBearer": [] } ], - "summary": "设置区域属性", + "summary": "修改区域", "tags": [ "Regions & DMAs" ] }, "post": { - "description": "向水网添加一个新的区域", "operationId": "post_regions", "parameters": [ { @@ -29736,7 +25936,7 @@ "OAuth2PasswordBearer": [] } ], - "summary": "添加新区域", + "summary": "添加区域", "tags": [ "Regions & DMAs" ] @@ -29744,16 +25944,15 @@ }, "/api/v1/regions/detail": { "get": { - "description": "获取指定ID的区域详细信息", "operationId": "get_regions_detail", "parameters": [ { - "description": "区域ID", + "description": "区域 ID", "in": "query", "name": "id", "required": true, "schema": { - "description": "区域ID", + "description": "区域 ID", "title": "Id", "type": "string" } @@ -29852,6 +26051,137 @@ ] } }, + "/api/v1/regions/nodes": { + "get": { + "operationId": "get_regions_nodes", + "parameters": [ + { + "description": "区域 ID", + "in": "query", + "name": "id", + "required": true, + "schema": { + "description": "区域 ID", + "title": "Id", + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 100, + "maximum": 1000, + "minimum": 1, + "title": "Limit", + "type": "integer" + } + }, + { + "in": "query", + "name": "offset", + "required": false, + "schema": { + "default": 0, + "minimum": 0, + "title": "Offset", + "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/Page_str_" + } + } + }, + "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": "获取区域节点", + "tags": [ + "Regions & DMAs" + ] + } + }, "/api/v1/reservoirs": { "delete": { "description": "从指定供水网络中删除指定的水库/水源节点", @@ -31735,212 +28065,6 @@ ] } }, - "/api/v1/restore-operations": { - "get": { - "description": "获取网络的恢复操作ID", - "operationId": "get_restore_operations", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Response Get Restore Operations", - "type": "integer" - } - } - }, - "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": "获取恢复操作ID", - "tags": [ - "Snapshots" - ] - }, - "patch": { - "description": "设置网络的恢复操作ID", - "operationId": "patch_restore_operations", - "parameters": [ - { - "description": "操作ID", - "in": "query", - "name": "operation", - "required": true, - "schema": { - "description": "操作ID", - "title": "Operation", - "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/JsonValue" - } - } - }, - "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": "设置恢复操作ID", - "tags": [ - "Snapshots" - ] - } - }, "/api/v1/rule-properties": { "get": { "description": "获取指定网络中的规则属性信息", @@ -32238,687 +28362,8 @@ ] } }, - "/api/v1/scada-device-cleaning-runs": { - "post": { - "description": "清空SCADA设备表\n\n删除指定管网中所有的SCADA设备。\n\nArgs:\n network: 管网名称(或数据库名称)\n \nReturns:\n 变更集合信息", - "operationId": "post_scada_device_cleaning_runs", - "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/JsonValue" - } - } - }, - "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": [ - "SCADA设备" - ] - } - }, - "/api/v1/scada-device-data-cleaning-runs": { - "post": { - "description": "清空SCADA设备数据表\n\n删除指定管网中所有SCADA设备的数据。\n\nArgs:\n network: 管网名称(或数据库名称)\n \nReturns:\n 变更集合信息", - "operationId": "post_scada_device_data_cleaning_runs", - "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/JsonValue" - } - } - }, - "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": [ - "SCADA设备数据" - ] - } - }, - "/api/v1/scada-device-datas": { - "delete": { - "description": "删除SCADA设备数据\n\n删除指定SCADA设备的数据记录。\n\nArgs:\n network: 管网名称(或数据库名称)\n req: 请求体,包含要删除的数据ID\n \nReturns:\n 变更集合信息", - "operationId": "delete_scada_device_datas", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "204": { - "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": [ - "SCADA设备数据" - ] - }, - "patch": { - "description": "更新SCADA设备数据\n\n修改指定SCADA设备的数据。\n\nArgs:\n network: 管网名称(或数据库名称)\n req: 请求体,包含要更新的数据\n \nReturns:\n 变更集合信息", - "operationId": "patch_scada_device_datas", - "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/JsonValue" - } - } - }, - "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": [ - "SCADA设备数据" - ] - }, - "post": { - "description": "添加新的SCADA设备数据\n\n为指定SCADA设备添加新的数据记录。\n\nArgs:\n network: 管网名称(或数据库名称)\n req: 请求体,包含新数据的内容\n \nReturns:\n 变更集合信息", - "operationId": "post_scada_device_datas", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": [ - "SCADA设备数据" - ] - } - }, - "/api/v1/scada-device-datas/detail": { - "get": { - "description": "获取单个SCADA设备的数据\n\n查询指定设备的监测数据或配置数据。\n\nArgs:\n network: 管网名称(或数据库名称)\n device_id: SCADA设备ID\n \nReturns:\n SCADA设备数据", - "operationId": "get_scada_device_datas_detail", - "parameters": [ - { - "description": "SCADA设备ID", - "in": "query", - "name": "device_id", - "required": true, - "schema": { - "description": "SCADA设备ID", - "title": "Device Id", - "type": "string" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Response Get Scada Device Datas Detail", - "type": "object" - } - } - }, - "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": [ - "SCADA设备数据" - ] - } - }, "/api/v1/scada-devices": { - "delete": { - "description": "删除SCADA设备\n\n从指定管网中删除一个SCADA设备。\n\nArgs:\n network: 管网名称(或数据库名称)\n req: 请求体,包含要删除的设备ID\n \nReturns:\n 变更集合信息", - "operationId": "delete_scada_devices", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "204": { - "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": [ - "SCADA设备" - ] - }, "get": { - "description": "获取指定管网所有SCADA设备的完整信息\n\nArgs:\n network: 管网名称(或数据库名称)\n \nReturns:\n SCADA设备信息列表", "operationId": "get_scada_devices", "parameters": [ { @@ -33031,217 +28476,24 @@ "OAuth2PasswordBearer": [] } ], - "summary": "获取所有SCADA设备", + "summary": "获取 SCADA 设备列表", "tags": [ - "SCADA设备" - ] - }, - "patch": { - "description": "更新SCADA设备信息\n\n修改指定SCADA设备的属性。\n\nArgs:\n network: 管网名称(或数据库名称)\n req: 请求体,包含要更新的设备属性\n \nReturns:\n 变更集合信息", - "operationId": "patch_scada_devices", - "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/JsonValue" - } - } - }, - "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": [ - "SCADA设备" - ] - }, - "post": { - "description": "添加新的SCADA设备\n\n在指定管网中添加一个新的SCADA设备。\n\nArgs:\n network: 管网名称(或数据库名称)\n req: 请求体,包含新设备的属性\n \nReturns:\n 变更集合信息", - "operationId": "post_scada_devices", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": [ - "SCADA设备" + "SCADA Metadata" ] } }, "/api/v1/scada-devices/detail": { "get": { - "description": "获取单个SCADA设备的信息\n\n根据设备ID查询该设备的详细信息。\n\nArgs:\n network: 管网名称(或数据库名称)\n id: SCADA设备ID\n \nReturns:\n SCADA设备信息", "operationId": "get_scada_devices_detail", "parameters": [ { - "description": "SCADA设备ID", + "description": "SCADA 设备 ID", "in": "query", - "name": "id", + "name": "device_id", "required": true, "schema": { - "description": "SCADA设备ID", - "title": "Id", + "description": "SCADA 设备 ID", + "title": "Device Id", "type": "string" } }, @@ -33333,963 +28585,9 @@ "OAuth2PasswordBearer": [] } ], - "summary": "获取SCADA设备", + "summary": "获取 SCADA 设备", "tags": [ - "SCADA设备" - ] - } - }, - "/api/v1/scada-devices/ids": { - "get": { - "description": "获取指定管网所有SCADA设备的ID列表\n\nArgs:\n network: 管网名称(或数据库名称)\n \nReturns:\n SCADA设备ID列表", - "operationId": "get_scada_devices_ids", - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_str_" - } - } - }, - "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设备ID", - "tags": [ - "SCADA设备" - ] - } - }, - "/api/v1/scada-element-cleaning-runs": { - "post": { - "description": "清空SCADA元素映射表\n\n删除指定管网中所有的SCADA元素映射。\n\nArgs:\n network: 管网名称(或数据库名称)\n \nReturns:\n 变更集合信息", - "operationId": "post_scada_element_cleaning_runs", - "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/JsonValue" - } - } - }, - "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": [ - "SCADA元素映射" - ] - } - }, - "/api/v1/scada-elements": { - "delete": { - "description": "删除SCADA元素映射\n\n移除SCADA设备与管网元素的映射关系。\n\nArgs:\n network: 管网名称(或数据库名称)\n req: 请求体,包含要删除的映射ID\n \nReturns:\n 变更集合信息", - "operationId": "delete_scada_elements", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "204": { - "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": [ - "SCADA元素映射" - ] - }, - "get": { - "description": "获取指定管网所有SCADA元素映射\n\n查询所有SCADA设备与管网元素(节点/管道)的映射关系。\n\nArgs:\n network: 管网名称(或数据库名称)\n \nReturns:\n SCADA元素映射列表", - "operationId": "get_scada_elements", - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_dict_str__Any__" - } - } - }, - "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": [ - "SCADA元素映射" - ] - }, - "patch": { - "description": "更新SCADA元素映射\n\n修改SCADA设备与管网元素的映射关系。\n\nArgs:\n network: 管网名称(或数据库名称)\n req: 请求体,包含要更新的映射信息\n \nReturns:\n 变更集合信息", - "operationId": "patch_scada_elements", - "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/JsonValue" - } - } - }, - "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": [ - "SCADA元素映射" - ] - }, - "post": { - "description": "添加新的SCADA元素映射\n\n创建SCADA设备与管网元素的新映射关系。\n\nArgs:\n network: 管网名称(或数据库名称)\n req: 请求体,包含新映射的信息\n \nReturns:\n 变更集合信息", - "operationId": "post_scada_elements", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": [ - "SCADA元素映射" - ] - } - }, - "/api/v1/scada-elements/detail": { - "get": { - "description": "获取单个SCADA元素映射的信息\n\n根据ID查询特定的SCADA设备与管网元素的映射关系。\n\nArgs:\n network: 管网名称(或数据库名称)\n id: SCADA元素映射ID\n \nReturns:\n SCADA元素映射信息", - "operationId": "get_scada_elements_detail", - "parameters": [ - { - "description": "SCADA元素映射ID", - "in": "query", - "name": "id", - "required": true, - "schema": { - "description": "SCADA元素映射ID", - "title": "Id", - "type": "string" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Response Get Scada Elements Detail", - "type": "object" - } - } - }, - "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": [ - "SCADA元素映射" - ] - } - }, - "/api/v1/scada-info": { - "get": { - "description": "获取指定管网所有SCADA的信息\n\n查询该管网下所有已配置的SCADA的完整信息。\n\nArgs:\n network: 管网名称(或数据库名称)\n \nReturns:\n SCADA信息列表", - "operationId": "get_scada_info", - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_dict_str__Any__" - } - } - }, - "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": [ - "SCADA信息" - ] - } - }, - "/api/v1/scada-info-schemas": { - "get": { - "description": "获取SCADA信息表的结构\n\n返回SCADA信息表的字段定义和类型信息。\n\nArgs:\n network: 管网名称(或数据库名称)\n \nReturns:\n SCADA信息的字段架构信息", - "operationId": "get_scada_info_schemas", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "additionalProperties": { - "type": "object" - }, - "title": "Response Get Scada Info Schemas", - "type": "object" - } - } - }, - "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": [ - "SCADA信息" + "SCADA Metadata" ] } }, @@ -34391,116 +28689,6 @@ ] } }, - "/api/v1/scada-info/detail": { - "get": { - "description": "获取单个SCADA信息\n\n根据ID查询SCADA的详细配置信息。\n\nArgs:\n network: 管网名称(或数据库名称)\n id: SCADA信息ID\n \nReturns:\n SCADA信息详情", - "operationId": "get_scada_info_detail", - "parameters": [ - { - "description": "SCADA信息ID", - "in": "query", - "name": "id", - "required": true, - "schema": { - "description": "SCADA信息ID", - "title": "Id", - "type": "string" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Response Get Scada Info Detail", - "type": "object" - } - } - }, - "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": [ - "SCADA信息" - ] - } - }, "/api/v1/scada-properties": { "get": { "description": "获取指定SCADA点的属性信息", @@ -34721,500 +28909,6 @@ ] } }, - "/api/v1/schemes": { - "get": { - "description": "获取指定网络的所有方案信息", - "operationId": "get_schemes", - "parameters": [ - { - "description": "方案类型;为空时返回全部类型", - "in": "query", - "name": "scheme_type", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "方案类型;为空时返回全部类型", - "title": "Scheme Type" - } - }, - { - "description": "查询日期(可选)", - "in": "query", - "name": "query_date", - "required": false, - "schema": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "description": "查询日期(可选)", - "title": "Query Date" - } - }, - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_dict_Any__Any__" - } - } - }, - "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": "获取所有方案", - "tags": [ - "Schemes" - ] - } - }, - "/api/v1/schemes/detail": { - "get": { - "description": "根据名称获取指定的方案信息", - "operationId": "get_schemes_detail", - "parameters": [ - { - "description": "方案名称", - "in": "query", - "name": "schema_name", - "required": true, - "schema": { - "description": "方案名称", - "title": "Schema Name", - "type": "string" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Response Get Schemes Detail", - "type": "object" - } - } - }, - "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": "获取单个方案", - "tags": [ - "Schemes" - ] - } - }, - "/api/v1/schemes/list-with-connection": { - "get": { - "description": "使用连接池查询所有方案信息", - "operationId": "get_schemes_list_with_connection", - "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/JsonValue" - } - } - }, - "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": "获取方案列表", - "tags": [ - "Project Data" - ] - } - }, - "/api/v1/schemes/{scheme_name}": { - "get": { - "description": "按方案类型获取指定方案详情", - "operationId": "get_schemes_scheme_name", - "parameters": [ - { - "description": "方案名称", - "in": "path", - "name": "scheme_name", - "required": true, - "schema": { - "description": "方案名称", - "title": "Scheme Name", - "type": "string" - } - }, - { - "description": "方案类型;为空时返回通用方案详情", - "in": "query", - "name": "scheme_type", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "方案类型;为空时返回通用方案详情", - "title": "Scheme Type" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Response Get Schemes Scheme Name", - "type": "object" - } - } - }, - "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": "获取方案详情", - "tags": [ - "Schemes" - ] - } - }, "/api/v1/sensor-placement-candidates/{node_id}": { "get": { "operationId": "get_sensor_placement_candidates_node_id", @@ -35323,9 +29017,127 @@ ] } }, - "/api/v1/sensor-placement-optimization-runs": { + "/api/v1/sensor-placement-runs": { + "get": { + "operationId": "get_sensor_placement_runs", + "parameters": [ + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "default": 100, + "maximum": 1000, + "minimum": 1, + "title": "Limit", + "type": "integer" + } + }, + { + "in": "query", + "name": "offset", + "required": false, + "schema": { + "default": 0, + "minimum": 0, + "title": "Offset", + "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/Page_SensorPlacementSchemeResponse_" + } + } + }, + "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": "获取监测点优化运行", + "tags": [ + "Sensor Placement" + ] + }, "post": { - "operationId": "post_sensor_placement_optimization_runs", + "operationId": "post_sensor_placement_runs", "parameters": [ { "in": "header", @@ -35430,291 +29242,18 @@ ] } }, - "/api/v1/sensor-placement-schemes": { + "/api/v1/sensor-placement-runs/{run_id}": { "get": { - "description": "获取网络中所有传感器的放置位置信息", - "operationId": "get_sensor_placement_schemes", - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_dict_Any__Any__" - } - } - }, - "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": "获取所有传感器位置", - "tags": [ - "Misc" - ] - }, - "post": { - "description": "创建新的传感器放置方案,支持灵敏度分析和KMeans聚类两种方法。根据指定的方法自动计算最优的传感器放置位置。", - "operationId": "post_sensor_placement_schemes", - "parameters": [ - { - "description": "放置方案名称", - "in": "query", - "name": "scheme_name", - "required": true, - "schema": { - "description": "放置方案名称", - "title": "Scheme Name", - "type": "string" - } - }, - { - "description": "传感器类型", - "in": "query", - "name": "sensor_type", - "required": true, - "schema": { - "description": "传感器类型", - "title": "Sensor Type", - "type": "string" - } - }, - { - "description": "放置方法('sensitivity'或'kmeans')", - "in": "query", - "name": "method", - "required": true, - "schema": { - "description": "放置方法('sensitivity'或'kmeans')", - "title": "Method", - "type": "string" - } - }, - { - "description": "传感器数量", - "in": "query", - "name": "sensor_count", - "required": true, - "schema": { - "description": "传感器数量", - "title": "Sensor Count", - "type": "integer" - } - }, - { - "description": "最小管径限制(毫米),默认0", - "in": "query", - "name": "min_diameter", - "required": false, - "schema": { - "default": 0, - "description": "最小管径限制(毫米),默认0", - "title": "Min Diameter", - "type": "integer" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "title": "Response Post Sensor Placement Schemes", - "type": "string" - } - } - }, - "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": "传感器放置方案创建", - "tags": [ - "Simulation Control" - ] - } - }, - "/api/v1/sensor-placement-schemes/{scheme_id}": { - "get": { - "operationId": "get_sensor_placement_schemes_scheme_id", + "operationId": "get_sensor_placement_runs_run_id", "parameters": [ { "in": "path", - "name": "scheme_id", + "name": "run_id", "required": true, "schema": { - "title": "Scheme Id", - "type": "integer" + "format": "uuid", + "title": "Run Id", + "type": "string" } }, { @@ -35810,15 +29349,16 @@ ] }, "put": { - "operationId": "put_sensor_placement_schemes_scheme_id", + "operationId": "put_sensor_placement_runs_run_id", "parameters": [ { "in": "path", - "name": "scheme_id", + "name": "run_id", "required": true, "schema": { - "title": "Scheme Id", - "type": "integer" + "format": "uuid", + "title": "Run Id", + "type": "string" } }, { @@ -35924,17 +29464,18 @@ ] } }, - "/api/v1/sensor-placement-schemes/{scheme_id}/exports/excel": { + "/api/v1/sensor-placement-runs/{run_id}/exports/excel": { "post": { - "operationId": "post_sensor_placement_schemes_scheme_id_exports_excel", + "operationId": "post_sensor_placement_runs_run_id_exports_excel", "parameters": [ { "in": "path", - "name": "scheme_id", + "name": "run_id", "required": true, "schema": { - "title": "Scheme Id", - "type": "integer" + "format": "uuid", + "title": "Run Id", + "type": "string" } }, { @@ -36040,748 +29581,6 @@ ] } }, - "/api/v1/service-area-calculations": { - "post": { - "description": "计算指定水网的服务区分区,返回全部时间步结果", - "operationId": "post_service_area_calculations", - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_dict_str__list_str___" - } - } - }, - "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": "计算服务区", - "tags": [ - "Regions & DMAs" - ] - } - }, - "/api/v1/service-area-generation-runs": { - "post": { - "description": "根据参数自动生成水网的服务区分区", - "operationId": "post_service_area_generation_runs", - "parameters": [ - { - "description": "膨胀参数", - "in": "query", - "name": "inflate_delta", - "required": true, - "schema": { - "description": "膨胀参数", - "title": "Inflate Delta", - "type": "number" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "生成服务区分区", - "tags": [ - "Regions & DMAs" - ] - } - }, - "/api/v1/service-areas": { - "delete": { - "description": "删除指定的服务区", - "operationId": "delete_service_areas", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "204": { - "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": "删除服务区", - "tags": [ - "Regions & DMAs" - ] - }, - "get": { - "description": "获取指定水网中的所有服务区信息", - "operationId": "get_service_areas", - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_dict_str__Any__" - } - } - }, - "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": "获取所有服务区", - "tags": [ - "Regions & DMAs" - ] - }, - "patch": { - "description": "修改指定服务区的属性信息", - "operationId": "patch_service_areas", - "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/JsonValue" - } - } - }, - "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": "设置服务区属性", - "tags": [ - "Regions & DMAs" - ] - }, - "post": { - "description": "向水网添加一个新的服务区", - "operationId": "post_service_areas", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "添加新服务区", - "tags": [ - "Regions & DMAs" - ] - } - }, - "/api/v1/service-areas/detail": { - "get": { - "description": "获取指定ID的服务区详细信息", - "operationId": "get_service_areas_detail", - "parameters": [ - { - "description": "服务区ID", - "in": "query", - "name": "id", - "required": true, - "schema": { - "description": "服务区ID", - "title": "Id", - "type": "string" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Response Get Service Areas Detail", - "type": "object" - } - } - }, - "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": "获取服务区信息", - "tags": [ - "Regions & DMAs" - ] - } - }, "/api/v1/simulation-runs": { "post": { "description": "根据指定的开始时间和持续时间,手动运行水力模拟。开始时间必须是显式带时区的 ISO 8601 / RFC3339 时间。", @@ -36895,897 +29694,6 @@ ] } }, - "/api/v1/snapshot-for-current-operations": { - "get": { - "description": "检查当前操作的快照是否存在", - "operationId": "get_snapshot_for_current_operations", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Response Get Snapshot For Current Operations", - "type": "boolean" - } - } - }, - "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": "检查当前操作快照是否存在", - "tags": [ - "Snapshots" - ] - }, - "post": { - "description": "为当前操作创建快照", - "operationId": "post_snapshot_for_current_operations", - "parameters": [ - { - "description": "快照标签", - "in": "query", - "name": "tag", - "required": true, - "schema": { - "description": "快照标签", - "title": "Tag", - "type": "string" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "为当前操作创建快照", - "tags": [ - "Snapshots" - ] - } - }, - "/api/v1/snapshot-for-operations": { - "get": { - "description": "检查指定操作ID的快照是否存在", - "operationId": "get_snapshot_for_operations", - "parameters": [ - { - "description": "操作ID", - "in": "query", - "name": "operation", - "required": true, - "schema": { - "description": "操作ID", - "title": "Operation", - "type": "integer" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Response Get Snapshot For Operations", - "type": "boolean" - } - } - }, - "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": "检查操作快照是否存在", - "tags": [ - "Snapshots" - ] - }, - "post": { - "description": "为指定的操作创建快照", - "operationId": "post_snapshot_for_operations", - "parameters": [ - { - "description": "操作ID", - "in": "query", - "name": "operation", - "required": true, - "schema": { - "description": "操作ID", - "title": "Operation", - "type": "integer" - } - }, - { - "description": "快照标签", - "in": "query", - "name": "tag", - "required": true, - "schema": { - "description": "快照标签", - "title": "Tag", - "type": "string" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "为操作创建快照", - "tags": [ - "Snapshots" - ] - } - }, - "/api/v1/snapshots": { - "get": { - "description": "获取网络中的所有快照", - "operationId": "get_snapshots", - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_tuple_int__str__" - } - } - }, - "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": "获取快照列表", - "tags": [ - "Snapshots" - ] - }, - "patch": { - "description": "选择并恢复到指定的快照", - "operationId": "patch_snapshots", - "parameters": [ - { - "description": "快照标签", - "in": "query", - "name": "tag", - "required": true, - "schema": { - "description": "快照标签", - "title": "Tag", - "type": "string" - } - }, - { - "description": "是否丢弃当前更改", - "in": "query", - "name": "discard", - "required": false, - "schema": { - "default": false, - "description": "是否丢弃当前更改", - "title": "Discard", - "type": "boolean" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "选择快照", - "tags": [ - "Snapshots" - ] - }, - "post": { - "description": "为网络创建一个快照", - "operationId": "post_snapshots", - "parameters": [ - { - "description": "快照标签", - "in": "query", - "name": "tag", - "required": true, - "schema": { - "description": "快照标签", - "title": "Tag", - "type": "string" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "创建快照", - "tags": [ - "Snapshots" - ] - } - }, - "/api/v1/snapshots/existence": { - "get": { - "description": "检查指定标签的快照是否存在", - "operationId": "get_snapshots_existence", - "parameters": [ - { - "description": "快照标签", - "in": "query", - "name": "tag", - "required": true, - "schema": { - "description": "快照标签", - "title": "Tag", - "type": "string" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Response Get Snapshots Existence", - "type": "boolean" - } - } - }, - "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": "检查快照是否存在", - "tags": [ - "Snapshots" - ] - } - }, "/api/v1/sources": { "delete": { "description": "从网络中删除指定节点的水源", @@ -38511,149 +30419,6 @@ ] } }, - "/api/v1/sub-district-metering-areas": { - "post": { - "description": "为指定DMA生成子DMA分区", - "operationId": "post_sub_district_metering_areas", - "parameters": [ - { - "description": "DMA ID", - "in": "query", - "name": "dma", - "required": true, - "schema": { - "description": "DMA ID", - "title": "Dma", - "type": "string" - } - }, - { - "description": "分区数量", - "in": "query", - "name": "part_count", - "required": true, - "schema": { - "description": "分区数量", - "exclusiveMinimum": 0, - "title": "Part Count", - "type": "integer" - } - }, - { - "description": "分区类型", - "in": "query", - "name": "part_type", - "required": true, - "schema": { - "description": "分区类型", - "title": "Part Type", - "type": "integer" - } - }, - { - "description": "膨胀参数", - "in": "query", - "name": "inflate_delta", - "required": true, - "schema": { - "description": "膨胀参数", - "title": "Inflate Delta", - "type": "number" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "生成DMA子分区", - "tags": [ - "Regions & DMAs" - ] - } - }, "/api/v1/tags": { "get": { "description": "获取指定水网中的所有标签信息", @@ -42624,6 +34389,552 @@ ] } }, + "/api/v1/timeseries/analysis/runs/{run_id}/links/{link_id}": { + "get": { + "operationId": "get_timeseries_analysis_runs_run_id_links_link_id", + "parameters": [ + { + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "format": "uuid", + "title": "Run Id", + "type": "string" + } + }, + { + "in": "path", + "name": "link_id", + "required": true, + "schema": { + "title": "Link Id", + "type": "string" + } + }, + { + "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": "field", + "required": true, + "schema": { + "title": "Field", + "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/JsonValue" + } + } + }, + "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 Analysis Link Series", + "tags": [ + "TimescaleDB - Analysis" + ] + } + }, + "/api/v1/timeseries/analysis/runs/{run_id}/nodes/{node_id}": { + "get": { + "operationId": "get_timeseries_analysis_runs_run_id_nodes_node_id", + "parameters": [ + { + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "format": "uuid", + "title": "Run Id", + "type": "string" + } + }, + { + "in": "path", + "name": "node_id", + "required": true, + "schema": { + "title": "Node Id", + "type": "string" + } + }, + { + "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": "field", + "required": true, + "schema": { + "title": "Field", + "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/JsonValue" + } + } + }, + "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 Analysis Node Series", + "tags": [ + "TimescaleDB - Analysis" + ] + } + }, + "/api/v1/timeseries/analysis/runs/{run_id}/results": { + "post": { + "operationId": "post_timeseries_analysis_runs_run_id_results", + "parameters": [ + { + "description": "分析运行 ID", + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "description": "分析运行 ID", + "format": "uuid", + "title": "Run Id", + "type": "string" + } + }, + { + "in": "header", + "name": "X-Project-Id", + "required": true, + "schema": { + "title": "X-Project-Id", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "title": "Payload", + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonValue" + } + } + }, + "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": "Store Analysis Results", + "tags": [ + "TimescaleDB - Analysis" + ] + } + }, + "/api/v1/timeseries/analysis/runs/{run_id}/values": { + "get": { + "operationId": "get_timeseries_analysis_runs_run_id_values", + "parameters": [ + { + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "format": "uuid", + "title": "Run Id", + "type": "string" + } + }, + { + "in": "query", + "name": "result_time", + "required": true, + "schema": { + "format": "date-time", + "title": "Result Time", + "type": "string" + } + }, + { + "in": "query", + "name": "element_type", + "required": true, + "schema": { + "pattern": "^(node|link)$", + "title": "Element Type", + "type": "string" + } + }, + { + "in": "query", + "name": "field", + "required": true, + "schema": { + "title": "Field", + "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/JsonValue" + } + } + }, + "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 Analysis Values At Time", + "tags": [ + "TimescaleDB - Analysis" + ] + } + }, "/api/v1/timeseries/realtime/links": { "delete": { "description": "按时间范围删除实时管道数据。start_time 和 end_time 必须显式带时区;允许传 UTC+8,服务端按请求中的绝对时间删除对应 UTC 数据。", @@ -44632,1751 +36943,6 @@ ] } }, - "/api/v1/timeseries/schemes/links": { - "delete": { - "description": "删除指定方案和时间范围内的管道数据\n\n删除在指定方案和时间范围内的所有管道模拟数据。\n\nArgs:\n scheme_type: 方案类型\n scheme_name: 方案名称\n start_time: 删除开始时间\n end_time: 删除结束时间\n\nReturns:\n 删除结果信息", - "operationId": "delete_timeseries_schemes_links", - "parameters": [ - { - "description": "方案类型", - "in": "query", - "name": "scheme_type", - "required": true, - "schema": { - "description": "方案类型", - "title": "Scheme Type", - "type": "string" - } - }, - { - "description": "方案名称", - "in": "query", - "name": "scheme_name", - "required": true, - "schema": { - "description": "方案名称", - "title": "Scheme Name", - "type": "string" - } - }, - { - "description": "删除开始时间", - "in": "query", - "name": "start_time", - "required": true, - "schema": { - "description": "删除开始时间", - "format": "date-time", - "title": "Start Time", - "type": "string" - } - }, - { - "description": "删除结束时间", - "in": "query", - "name": "end_time", - "required": true, - "schema": { - "description": "删除结束时间", - "format": "date-time", - "title": "End Time", - "type": "string" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "204": { - "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": "删除方案管道数据", - "tags": [ - "TimescaleDB - Scheme" - ] - }, - "get": { - "description": "查询指定方案和时间范围内的管道数据\n\n根据方案和时间范围查询管道的模拟值。\n\nArgs:\n scheme_type: 方案类型\n scheme_name: 方案名称\n start_time: 查询开始时间\n end_time: 查询结束时间\n\nReturns:\n 方案管道数据列表", - "operationId": "get_timeseries_schemes_links", - "parameters": [ - { - "description": "方案类型", - "in": "query", - "name": "scheme_type", - "required": true, - "schema": { - "description": "方案类型", - "title": "Scheme Type", - "type": "string" - } - }, - { - "description": "方案名称", - "in": "query", - "name": "scheme_name", - "required": true, - "schema": { - "description": "方案名称", - "title": "Scheme Name", - "type": "string" - } - }, - { - "description": "查询开始时间", - "in": "query", - "name": "start_time", - "required": true, - "schema": { - "description": "查询开始时间", - "format": "date-time", - "title": "Start Time", - "type": "string" - } - }, - { - "description": "查询结束时间", - "in": "query", - "name": "end_time", - "required": true, - "schema": { - "description": "查询结束时间", - "format": "date-time", - "title": "End Time", - "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/JsonValue" - } - } - }, - "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": "查询方案管道数据", - "tags": [ - "TimescaleDB - Scheme" - ] - } - }, - "/api/v1/timeseries/schemes/links/batches": { - "post": { - "description": "批量插入方案管道数据\n\n将特定方案的管道模拟数据批量插入时间序列数据库。\n\nArgs:\n data: 方案管道数据列表\n\nReturns:\n 插入成功的记录数", - "operationId": "post_timeseries_schemes_links_batches", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "description": "方案管道数据列表", - "items": { - "type": "object" - }, - "title": "Data", - "type": "array" - } - } - }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "批量插入方案管道数据", - "tags": [ - "TimescaleDB - Scheme" - ] - } - }, - "/api/v1/timeseries/schemes/links/{link_id}/field": { - "get": { - "description": "查询指定方案管道的特定字段数据\n\n查询特定方案中指定管道在时间范围内的特定字段值。\n\nArgs:\n link_id: 管道ID\n scheme_type: 方案类型\n scheme_name: 方案名称\n start_time: 查询开始时间\n end_time: 查询结束时间\n field: 字段名称\n\nReturns:\n 字段数据列表\n\nRaises:\n HTTPException: 当查询参数无效时返回400错误", - "operationId": "get_timeseries_schemes_links_link_id_field", - "parameters": [ - { - "description": "管道ID", - "in": "path", - "name": "link_id", - "required": true, - "schema": { - "description": "管道ID", - "title": "Link Id", - "type": "string" - } - }, - { - "description": "方案类型", - "in": "query", - "name": "scheme_type", - "required": true, - "schema": { - "description": "方案类型", - "title": "Scheme Type", - "type": "string" - } - }, - { - "description": "方案名称", - "in": "query", - "name": "scheme_name", - "required": true, - "schema": { - "description": "方案名称", - "title": "Scheme Name", - "type": "string" - } - }, - { - "description": "查询开始时间", - "in": "query", - "name": "start_time", - "required": true, - "schema": { - "description": "查询开始时间", - "format": "date-time", - "title": "Start Time", - "type": "string" - } - }, - { - "description": "查询结束时间", - "in": "query", - "name": "end_time", - "required": true, - "schema": { - "description": "查询结束时间", - "format": "date-time", - "title": "End Time", - "type": "string" - } - }, - { - "description": "要查询的字段名称", - "in": "query", - "name": "field", - "required": true, - "schema": { - "description": "要查询的字段名称", - "title": "Field", - "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/JsonValue" - } - } - }, - "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": "查询方案管道字段数据", - "tags": [ - "TimescaleDB - Scheme" - ] - }, - "patch": { - "description": "更新指定方案管道的字段值\n\n更新特定方案中指定管道在某个时间的字段数据。\n\nArgs:\n link_id: 管道ID\n scheme_type: 方案类型\n scheme_name: 方案名称\n time: 数据时间戳\n field: 字段名称\n value: 字段新值\n\nReturns:\n 更新结果信息\n\nRaises:\n HTTPException: 当字段不存在或更新失败时返回400错误", - "operationId": "patch_timeseries_schemes_links_link_id_field", - "parameters": [ - { - "description": "管道ID", - "in": "path", - "name": "link_id", - "required": true, - "schema": { - "description": "管道ID", - "title": "Link Id", - "type": "string" - } - }, - { - "description": "方案类型", - "in": "query", - "name": "scheme_type", - "required": true, - "schema": { - "description": "方案类型", - "title": "Scheme Type", - "type": "string" - } - }, - { - "description": "方案名称", - "in": "query", - "name": "scheme_name", - "required": true, - "schema": { - "description": "方案名称", - "title": "Scheme Name", - "type": "string" - } - }, - { - "description": "更新数据的时间戳", - "in": "query", - "name": "time", - "required": true, - "schema": { - "description": "更新数据的时间戳", - "format": "date-time", - "title": "Time", - "type": "string" - } - }, - { - "description": "要更新的字段名称", - "in": "query", - "name": "field", - "required": true, - "schema": { - "description": "要更新的字段名称", - "title": "Field", - "type": "string" - } - }, - { - "description": "更新的字段值", - "in": "query", - "name": "value", - "required": true, - "schema": { - "description": "更新的字段值", - "title": "Value", - "type": "number" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "更新方案管道字段", - "tags": [ - "TimescaleDB - Scheme" - ] - } - }, - "/api/v1/timeseries/schemes/nodes": { - "delete": { - "description": "删除指定方案和时间范围内的节点数据\n\n删除在指定方案和时间范围内的所有节点模拟数据。\n\nArgs:\n scheme_type: 方案类型\n scheme_name: 方案名称\n start_time: 删除开始时间\n end_time: 删除结束时间\n\nReturns:\n 删除结果信息", - "operationId": "delete_timeseries_schemes_nodes", - "parameters": [ - { - "description": "方案类型", - "in": "query", - "name": "scheme_type", - "required": true, - "schema": { - "description": "方案类型", - "title": "Scheme Type", - "type": "string" - } - }, - { - "description": "方案名称", - "in": "query", - "name": "scheme_name", - "required": true, - "schema": { - "description": "方案名称", - "title": "Scheme Name", - "type": "string" - } - }, - { - "description": "删除开始时间", - "in": "query", - "name": "start_time", - "required": true, - "schema": { - "description": "删除开始时间", - "format": "date-time", - "title": "Start Time", - "type": "string" - } - }, - { - "description": "删除结束时间", - "in": "query", - "name": "end_time", - "required": true, - "schema": { - "description": "删除结束时间", - "format": "date-time", - "title": "End Time", - "type": "string" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "204": { - "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": "删除方案节点数据", - "tags": [ - "TimescaleDB - Scheme" - ] - } - }, - "/api/v1/timeseries/schemes/nodes/batches": { - "post": { - "description": "批量插入方案节点数据\n\n将特定方案的节点模拟数据批量插入时间序列数据库。\n\nArgs:\n data: 方案节点数据列表\n\nReturns:\n 插入成功的记录数", - "operationId": "post_timeseries_schemes_nodes_batches", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "description": "方案节点数据列表", - "items": { - "type": "object" - }, - "title": "Data", - "type": "array" - } - } - }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "批量插入方案节点数据", - "tags": [ - "TimescaleDB - Scheme" - ] - } - }, - "/api/v1/timeseries/schemes/nodes/{node_id}/field": { - "get": { - "description": "查询指定方案节点的特定字段数据\n\n查询特定方案中指定节点在时间范围内的特定字段值。\n\nArgs:\n node_id: 节点ID\n scheme_type: 方案类型\n scheme_name: 方案名称\n start_time: 查询开始时间\n end_time: 查询结束时间\n field: 字段名称\n\nReturns:\n 字段数据列表\n\nRaises:\n HTTPException: 当查询参数无效时返回400错误", - "operationId": "get_timeseries_schemes_nodes_node_id_field", - "parameters": [ - { - "description": "节点ID", - "in": "path", - "name": "node_id", - "required": true, - "schema": { - "description": "节点ID", - "title": "Node Id", - "type": "string" - } - }, - { - "description": "方案类型", - "in": "query", - "name": "scheme_type", - "required": true, - "schema": { - "description": "方案类型", - "title": "Scheme Type", - "type": "string" - } - }, - { - "description": "方案名称", - "in": "query", - "name": "scheme_name", - "required": true, - "schema": { - "description": "方案名称", - "title": "Scheme Name", - "type": "string" - } - }, - { - "description": "查询开始时间", - "in": "query", - "name": "start_time", - "required": true, - "schema": { - "description": "查询开始时间", - "format": "date-time", - "title": "Start Time", - "type": "string" - } - }, - { - "description": "查询结束时间", - "in": "query", - "name": "end_time", - "required": true, - "schema": { - "description": "查询结束时间", - "format": "date-time", - "title": "End Time", - "type": "string" - } - }, - { - "description": "要查询的字段名称", - "in": "query", - "name": "field", - "required": true, - "schema": { - "description": "要查询的字段名称", - "title": "Field", - "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/JsonValue" - } - } - }, - "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": "查询方案节点字段数据", - "tags": [ - "TimescaleDB - Scheme" - ] - }, - "patch": { - "description": "更新指定方案节点的字段值\n\n更新特定方案中指定节点在某个时间的字段数据。\n\nArgs:\n node_id: 节点ID\n scheme_type: 方案类型\n scheme_name: 方案名称\n time: 数据时间戳\n field: 字段名称\n value: 字段新值\n\nReturns:\n 更新结果信息\n\nRaises:\n HTTPException: 当字段不存在或更新失败时返回400错误", - "operationId": "patch_timeseries_schemes_nodes_node_id_field", - "parameters": [ - { - "description": "节点ID", - "in": "path", - "name": "node_id", - "required": true, - "schema": { - "description": "节点ID", - "title": "Node Id", - "type": "string" - } - }, - { - "description": "方案类型", - "in": "query", - "name": "scheme_type", - "required": true, - "schema": { - "description": "方案类型", - "title": "Scheme Type", - "type": "string" - } - }, - { - "description": "方案名称", - "in": "query", - "name": "scheme_name", - "required": true, - "schema": { - "description": "方案名称", - "title": "Scheme Name", - "type": "string" - } - }, - { - "description": "更新数据的时间戳", - "in": "query", - "name": "time", - "required": true, - "schema": { - "description": "更新数据的时间戳", - "format": "date-time", - "title": "Time", - "type": "string" - } - }, - { - "description": "要更新的字段名称", - "in": "query", - "name": "field", - "required": true, - "schema": { - "description": "要更新的字段名称", - "title": "Field", - "type": "string" - } - }, - { - "description": "更新的字段值", - "in": "query", - "name": "value", - "required": true, - "schema": { - "description": "更新的字段值", - "title": "Value", - "type": "number" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "更新方案节点字段", - "tags": [ - "TimescaleDB - Scheme" - ] - } - }, - "/api/v1/timeseries/schemes/records": { - "get": { - "description": "按指定方案、时间和属性查询所有方案数据\n\n查询在特定方案和时间点,所有指定类型元素的特定属性值。\n\nArgs:\n scheme_type: 方案类型\n scheme_name: 方案名称\n query_time: 查询时间\n type: 元素类型(pipe或junction)\n property: 属性名称\n\nReturns:\n 查询结果列表\n\nRaises:\n HTTPException: 当查询参数无效时返回400错误", - "operationId": "get_timeseries_schemes_records", - "parameters": [ - { - "description": "方案类型", - "in": "query", - "name": "scheme_type", - "required": true, - "schema": { - "description": "方案类型", - "title": "Scheme Type", - "type": "string" - } - }, - { - "description": "方案名称", - "in": "query", - "name": "scheme_name", - "required": true, - "schema": { - "description": "方案名称", - "title": "Scheme Name", - "type": "string" - } - }, - { - "description": "查询时间", - "in": "query", - "name": "query_time", - "required": true, - "schema": { - "description": "查询时间", - "title": "Query Time", - "type": "string" - } - }, - { - "description": "元素类型,pipe(管道)或 junction(节点)", - "in": "query", - "name": "type", - "required": true, - "schema": { - "description": "元素类型,pipe(管道)或 junction(节点)", - "title": "Type", - "type": "string" - } - }, - { - "description": "要查询的属性名称", - "in": "query", - "name": "property", - "required": true, - "schema": { - "description": "要查询的属性名称", - "title": "Property", - "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/JsonValue" - } - } - }, - "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": "按方案、时间和属性查询数据", - "tags": [ - "TimescaleDB - Scheme" - ] - } - }, - "/api/v1/timeseries/schemes/simulation-results": { - "get": { - "description": "按指定ID和时间查询方案模拟结果\n\n查询特定方案中的元素在某一时间点的模拟数据。\n\nArgs:\n scheme_type: 方案类型\n scheme_name: 方案名称\n id: 元素ID\n type: 元素类型(pipe或junction)\n query_time: 查询时间\n\nReturns:\n 模拟结果数据\n\nRaises:\n HTTPException: 当查询参数无效时返回400错误", - "operationId": "get_timeseries_schemes_simulation_results", - "parameters": [ - { - "description": "方案类型", - "in": "query", - "name": "scheme_type", - "required": true, - "schema": { - "description": "方案类型", - "title": "Scheme Type", - "type": "string" - } - }, - { - "description": "方案名称", - "in": "query", - "name": "scheme_name", - "required": true, - "schema": { - "description": "方案名称", - "title": "Scheme Name", - "type": "string" - } - }, - { - "description": "元素ID(管道ID或节点ID)", - "in": "query", - "name": "id", - "required": true, - "schema": { - "description": "元素ID(管道ID或节点ID)", - "title": "Id", - "type": "string" - } - }, - { - "description": "元素类型,pipe(管道)或 junction(节点)", - "in": "query", - "name": "type", - "required": true, - "schema": { - "description": "元素类型,pipe(管道)或 junction(节点)", - "title": "Type", - "type": "string" - } - }, - { - "description": "查询时间", - "in": "query", - "name": "query_time", - "required": true, - "schema": { - "description": "查询时间", - "title": "Query Time", - "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/JsonValue" - } - } - }, - "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": "按ID和时间查询方案模拟数据", - "tags": [ - "TimescaleDB - Scheme" - ] - }, - "post": { - "description": "存储方案模拟结果到时间序列数据库\n\n将特定方案的节点和管道模拟计算结果批量存储到TimescaleDB数据库。\n\nArgs:\n scheme_type: 方案类型\n scheme_name: 方案名称\n node_result_list: 节点模拟结果列表\n link_result_list: 管道模拟结果列表\n result_start_time: 模拟结果对应的起始时间\n\nReturns:\n 存储结果信息", - "operationId": "post_timeseries_schemes_simulation_results", - "parameters": [ - { - "description": "方案类型", - "in": "query", - "name": "scheme_type", - "required": true, - "schema": { - "description": "方案类型", - "title": "Scheme Type", - "type": "string" - } - }, - { - "description": "方案名称", - "in": "query", - "name": "scheme_name", - "required": true, - "schema": { - "description": "方案名称", - "title": "Scheme Name", - "type": "string" - } - }, - { - "description": "模拟结果开始时间", - "in": "query", - "name": "result_start_time", - "required": true, - "schema": { - "description": "模拟结果开始时间", - "title": "Result Start Time", - "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/Body_post_timeseries_schemes_simulation_results" - } - } - }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "存储方案模拟结果", - "tags": [ - "TimescaleDB - Scheme" - ] - } - }, "/api/v1/timeseries/views/element-scada-readings": { "get": { "description": "获取link/node关联的SCADA监测值\n\n根据传入的link/node id,匹配SCADA信息,\n如果存在关联的SCADA device_id,获取实际的监测数据。\n\nArgs:\n element_id: 管网元素ID\n start_time: 查询开始时间\n end_time: 查询结束时间\n use_cleaned: 是否使用清洗后的数据,默认为False使用原始数据\n timescale_conn: TimescaleDB连接\n postgres_conn: PostgreSQL连接\n \nReturns:\n 管网元素关联的SCADA监测数据\n \nRaises:\n HTTPException: 当查询参数无效时返回400错误,未找到关联数据返回404错误", @@ -46524,7 +37090,7 @@ }, "/api/v1/timeseries/views/element-simulations": { "get": { - "description": "获取link/node模拟值\n\n根据传入的featureInfos,找到关联的link/node,\n并根据对应的type,查询对应的模拟数据。支持查询实时或方案数据。\n\nArgs:\n start_time: 查询开始时间\n end_time: 查询结束时间\n feature_infos: 格式为 \"element_id1:type1,element_id2:type2\"\n 例如: \"P1:pipe,J1:junction\"\n scheme_type: 方案类型,若为空则查询实时数据\n scheme_name: 方案名称,若为空则查询实时数据\n timescale_conn: TimescaleDB连接\n \nReturns:\n 管网元素的模拟数据\n \nRaises:\n HTTPException: 当feature_infos为空返回400错误,未找到数据返回404错误,其他错误返回400错误", + "description": "获取link/node模拟值\n\n根据传入的featureInfos,找到关联的link/node,\n并根据对应的type,查询对应的模拟数据。支持查询实时或分析运行数据。\n\nArgs:\n start_time: 查询开始时间\n end_time: 查询结束时间\n feature_infos: 格式为 \"element_id1:type1,element_id2:type2\"\n 例如: \"P1:pipe,J1:junction\"\n run_id: 分析运行 ID,若为空则查询实时数据\n timescale_conn: TimescaleDB连接\n \nReturns:\n 管网元素的模拟数据\n \nRaises:\n HTTPException: 当feature_infos为空返回400错误,未找到数据返回404错误,其他错误返回400错误", "operationId": "get_timeseries_views_element_simulations", "parameters": [ { @@ -46563,25 +37129,22 @@ } }, { - "description": "方案类型,若为空则查询实时数据", + "description": "分析运行 ID;为空时查询实时数据", "in": "query", - "name": "scheme_type", + "name": "run_id", "required": false, "schema": { - "description": "方案类型,若为空则查询实时数据", - "title": "Scheme Type", - "type": "string" - } - }, - { - "description": "方案名称,若为空则查询实时数据", - "in": "query", - "name": "scheme_name", - "required": false, - "schema": { - "description": "方案名称,若为空则查询实时数据", - "title": "Scheme Name", - "type": "string" + "anyOf": [ + { + "format": "uuid", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "分析运行 ID;为空时查询实时数据", + "title": "Run Id" } }, { @@ -46679,7 +37242,7 @@ }, "/api/v1/timeseries/views/scada-simulations": { "get": { - "description": "获取SCADA关联的link/node模拟值\n\n根据传入的SCADA device_ids,找到关联的link/node,\n并根据对应的type,查询对应的模拟数据。支持查询实时或方案数据。\n\nArgs:\n start_time: 查询开始时间\n end_time: 查询结束时间\n device_ids: SCADA设备ID列表,用逗号分隔\n scheme_type: 方案类型,若为空则查询实时数据\n scheme_name: 方案名称,若为空则查询实时数据\n timescale_conn: TimescaleDB连接\n postgres_conn: PostgreSQL连接\n \nReturns:\n SCADA关联的模拟数据\n \nRaises:\n HTTPException: 当查询参数无效时返回400错误,未找到数据时返回404错误", + "description": "获取SCADA关联的link/node模拟值\n\n根据传入的SCADA device_ids,找到关联的link/node,\n并根据对应的type,查询对应的模拟数据。支持查询实时或分析运行数据。\n\nArgs:\n start_time: 查询开始时间\n end_time: 查询结束时间\n device_ids: SCADA设备ID列表,用逗号分隔\n run_id: 分析运行 ID,若为空则查询实时数据\n timescale_conn: TimescaleDB连接\n postgres_conn: PostgreSQL连接\n \nReturns:\n SCADA关联的模拟数据\n \nRaises:\n HTTPException: 当查询参数无效时返回400错误,未找到数据时返回404错误", "operationId": "get_timeseries_views_scada_simulations", "parameters": [ { @@ -46718,25 +37281,22 @@ } }, { - "description": "方案类型,若为空则查询实时数据", + "description": "分析运行 ID;为空时查询实时数据", "in": "query", - "name": "scheme_type", + "name": "run_id", "required": false, "schema": { - "description": "方案类型,若为空则查询实时数据", - "title": "Scheme Type", - "type": "string" - } - }, - { - "description": "方案名称,若为空则查询实时数据", - "in": "query", - "name": "scheme_name", - "required": false, - "schema": { - "description": "方案名称,若为空则查询实时数据", - "title": "Scheme Name", - "type": "string" + "anyOf": [ + { + "format": "uuid", + "type": "string" + }, + { + "type": "null" + } + ], + "description": "分析运行 ID;为空时查询实时数据", + "title": "Run Id" } }, { @@ -47129,104 +37689,6 @@ ] } }, - "/api/v1/undos": { - "post": { - "description": "撤销网络上最后的一个操作", - "operationId": "post_undos", - "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/JsonValue" - } - } - }, - "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": "撤销操作", - "tags": [ - "Snapshots" - ] - } - }, "/api/v1/valve-closure-analyses": { "post": { "description": "高级版本的阀门关闭分析,支持同时关闭多个阀门,并在指定持续时间内进行模拟。返回纯文本格式的分析结果。", @@ -49522,744 +39984,6 @@ ] } }, - "/api/v1/virtual-district-calculations": { - "post": { - "description": "根据指定的压力监测节点作为中心节点计算虚拟分区方案", - "operationId": "post_virtual_district_calculations", - "parameters": [ - { - "description": "压力监测节点ID列表", - "in": "query", - "name": "centers", - "required": true, - "schema": { - "description": "压力监测节点ID列表", - "items": { - "type": "string" - }, - "title": "Centers", - "type": "array" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "additionalProperties": { - "items": {}, - "type": "array" - }, - "title": "Response Post Virtual District Calculations", - "type": "object" - } - } - }, - "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": "计算虚拟分区", - "tags": [ - "Regions & DMAs" - ] - } - }, - "/api/v1/virtual-district-generation-runs": { - "post": { - "description": "根据参数自动生成虚拟分区方案", - "operationId": "post_virtual_district_generation_runs", - "parameters": [ - { - "description": "膨胀参数", - "in": "query", - "name": "inflate_delta", - "required": true, - "schema": { - "description": "膨胀参数", - "title": "Inflate Delta", - "type": "number" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "生成虚拟分区", - "tags": [ - "Regions & DMAs" - ] - } - }, - "/api/v1/virtual-districts": { - "delete": { - "description": "删除指定的虚拟分区", - "operationId": "delete_virtual_districts", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "204": { - "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": "删除虚拟分区", - "tags": [ - "Regions & DMAs" - ] - }, - "get": { - "description": "获取指定水网中的所有虚拟分区信息", - "operationId": "get_virtual_districts", - "parameters": [ - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 100, - "maximum": 1000, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - }, - { - "in": "query", - "name": "offset", - "required": false, - "schema": { - "default": 0, - "minimum": 0, - "title": "Offset", - "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/Page_dict_str__Any__" - } - } - }, - "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": "获取所有虚拟分区", - "tags": [ - "Regions & DMAs" - ] - }, - "patch": { - "description": "修改指定虚拟分区的属性信息", - "operationId": "patch_virtual_districts", - "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/JsonValue" - } - } - }, - "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": "设置虚拟分区属性", - "tags": [ - "Regions & DMAs" - ] - }, - "post": { - "description": "向水网添加一个新的虚拟分区", - "operationId": "post_virtual_districts", - "parameters": [ - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonValue" - } - } - }, - "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": "添加新虚拟分区", - "tags": [ - "Regions & DMAs" - ] - } - }, - "/api/v1/virtual-districts/detail": { - "get": { - "description": "获取指定ID的虚拟分区详细信息", - "operationId": "get_virtual_districts_detail", - "parameters": [ - { - "description": "虚拟分区ID", - "in": "query", - "name": "id", - "required": true, - "schema": { - "description": "虚拟分区ID", - "title": "Id", - "type": "string" - } - }, - { - "in": "header", - "name": "X-Project-Id", - "required": true, - "schema": { - "title": "X-Project-Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "title": "Response Get Virtual Districts Detail", - "type": "object" - } - } - }, - "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": "获取虚拟分区信息", - "tags": [ - "Regions & DMAs" - ] - } - }, "/api/v1/visual-elements": { "delete": { "description": "从网络中删除指定的图形元素", @@ -51002,115 +40726,6 @@ "Web Search" ] } - }, - "/api/v1/with-servers": { - "post": { - "description": "将网络与服务器同步到指定操作", - "operationId": "post_with_servers", - "parameters": [ - { - "description": "目标操作ID", - "in": "query", - "name": "operation", - "required": true, - "schema": { - "description": "目标操作ID", - "title": "Operation", - "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/JsonValue" - } - } - }, - "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": "与服务器同步", - "tags": [ - "Snapshots" - ] - } } } } diff --git a/scripts/generate-runtime-config.mjs b/scripts/generate-runtime-config.mjs index 3e74911..68d7d33 100644 --- a/scripts/generate-runtime-config.mjs +++ b/scripts/generate-runtime-config.mjs @@ -9,22 +9,22 @@ loadEnvConfig(projectDir, process.env.NODE_ENV !== "production"); const parseExtent = (value) => { if (!value) { - return [13508849, 3608036, 13555781, 3633813]; + return [13508801.93, 3608163.35, 13555650.64, 3633685.14]; } const extent = value.split(",").map(Number); return extent.length === 4 && extent.every(Number.isFinite) ? extent - : [13508849, 3608036, 13555781, 3633813]; + : [13508801.93, 3608163.35, 13555650.64, 3633685.14]; }; const config = { BACKEND_URL: process.env.BACKEND_URL || "http://127.0.0.1:8000", AGENT_URL: process.env.AGENT_URL || "http://127.0.0.1:8788", MAP_URL: process.env.MAP_URL || "http://127.0.0.1:8080/geoserver", - MAP_WORKSPACE: process.env.MAP_WORKSPACE || "tjwater", + MAP_WORKSPACE: process.env.MAP_WORKSPACE || "tjwater_next", MAP_EXTENT: parseExtent(process.env.MAP_EXTENT), - NETWORK_NAME: process.env.NETWORK_NAME || "tjwater", + NETWORK_NAME: process.env.NETWORK_NAME || "tjwater_next", MAPBOX_TOKEN: process.env.MAPBOX_TOKEN || "", TIANDITU_TOKEN: process.env.TIANDITU_TOKEN || "", }; diff --git a/src/components/chat/ChatToolCallBlock.tsx b/src/components/chat/ChatToolCallBlock.tsx index 2b63abb..9b16f12 100644 --- a/src/components/chat/ChatToolCallBlock.tsx +++ b/src/components/chat/ChatToolCallBlock.tsx @@ -45,12 +45,12 @@ type ToolMeta = { const LOCATE_TOOL_TO_LAYER: Record = { locate_features: "", - locate_junctions: "geo_junctions_mat", - locate_pipes: "geo_pipes_mat", - locate_valves: "geo_valves", - locate_reservoirs: "geo_reservoirs", - locate_pumps: "geo_pumps", - locate_tanks: "geo_tanks", + locate_junctions: "junctions", + locate_pipes: "pipes", + locate_valves: "valves", + locate_reservoirs: "reservoirs", + locate_pumps: "pumps", + locate_tanks: "tanks", }; const LOCATE_LINE_TOOLS = new Set(["locate_pipes"]); @@ -672,22 +672,22 @@ export const ChatToolCallBlock: React.FC = ({ switch (featureType) { case "junction": case "junctions": - return { layer: "geo_junctions_mat", geometryKind: "point" }; + return { layer: "junctions", geometryKind: "point" }; case "pipe": case "pipes": - return { layer: "geo_pipes_mat", geometryKind: "line" }; + return { layer: "pipes", geometryKind: "line" }; case "valve": case "valves": - return { layer: "geo_valves", geometryKind: "point" }; + return { layer: "valves", geometryKind: "point" }; case "reservoir": case "reservoirs": - return { layer: "geo_reservoirs", geometryKind: "point" }; + return { layer: "reservoirs", geometryKind: "point" }; case "pump": case "pumps": - return { layer: "geo_pumps", geometryKind: "point" }; + return { layer: "pumps", geometryKind: "point" }; case "tank": case "tanks": - return { layer: "geo_tanks", geometryKind: "point" }; + return { layer: "tanks", geometryKind: "point" }; default: return null; } diff --git a/src/components/chat/hooks/useAgentToolActions.ts b/src/components/chat/hooks/useAgentToolActions.ts index b3ec0da..e5c5e8e 100644 --- a/src/components/chat/hooks/useAgentToolActions.ts +++ b/src/components/chat/hooks/useAgentToolActions.ts @@ -22,30 +22,30 @@ const FEATURE_TYPE_MAP: Record< string, { layer: string; geometryKind: "point" | "line"; label: string } > = { - junction: { layer: "geo_junctions_mat", geometryKind: "point", label: "节点" }, - junctions: { layer: "geo_junctions_mat", geometryKind: "point", label: "节点" }, - pipe: { layer: "geo_pipes_mat", geometryKind: "line", label: "管道" }, - pipes: { layer: "geo_pipes_mat", geometryKind: "line", label: "管道" }, - valve: { layer: "geo_valves", geometryKind: "point", label: "阀门" }, - valves: { layer: "geo_valves", geometryKind: "point", label: "阀门" }, - reservoir: { layer: "geo_reservoirs", geometryKind: "point", label: "水源" }, - reservoirs: { layer: "geo_reservoirs", geometryKind: "point", label: "水源" }, - pump: { layer: "geo_pumps", geometryKind: "point", label: "泵站" }, - pumps: { layer: "geo_pumps", geometryKind: "point", label: "泵站" }, - tank: { layer: "geo_tanks", geometryKind: "point", label: "水池" }, - tanks: { layer: "geo_tanks", geometryKind: "point", label: "水池" }, + junction: { layer: "junctions", geometryKind: "point", label: "节点" }, + junctions: { layer: "junctions", geometryKind: "point", label: "节点" }, + pipe: { layer: "pipes", geometryKind: "line", label: "管道" }, + pipes: { layer: "pipes", geometryKind: "line", label: "管道" }, + valve: { layer: "valves", geometryKind: "point", label: "阀门" }, + valves: { layer: "valves", geometryKind: "point", label: "阀门" }, + reservoir: { layer: "reservoirs", geometryKind: "point", label: "水源" }, + reservoirs: { layer: "reservoirs", geometryKind: "point", label: "水源" }, + pump: { layer: "pumps", geometryKind: "point", label: "泵站" }, + pumps: { layer: "pumps", geometryKind: "point", label: "泵站" }, + tank: { layer: "tanks", geometryKind: "point", label: "水池" }, + tanks: { layer: "tanks", geometryKind: "point", label: "水池" }, }; const LOCATE_TOOL_CONFIG: Record< string, { layer: string; geometryKind: "point" | "line"; label: string } > = { - locate_pipes: { layer: "geo_pipes_mat", geometryKind: "line", label: "管道" }, - locate_junctions: { layer: "geo_junctions_mat", geometryKind: "point", label: "节点" }, - locate_valves: { layer: "geo_valves", geometryKind: "point", label: "阀门" }, - locate_reservoirs: { layer: "geo_reservoirs", geometryKind: "point", label: "水源" }, - locate_pumps: { layer: "geo_pumps", geometryKind: "point", label: "泵站" }, - locate_tanks: { layer: "geo_tanks", geometryKind: "point", label: "水池" }, + locate_pipes: { layer: "pipes", geometryKind: "line", label: "管道" }, + locate_junctions: { layer: "junctions", geometryKind: "point", label: "节点" }, + locate_valves: { layer: "valves", geometryKind: "point", label: "阀门" }, + locate_reservoirs: { layer: "reservoirs", geometryKind: "point", label: "水源" }, + locate_pumps: { layer: "pumps", geometryKind: "point", label: "泵站" }, + locate_tanks: { layer: "tanks", geometryKind: "point", label: "水池" }, }; const LOCATE_ID_PARAM_KEYS = [ diff --git a/src/components/olmap/BurstDetection/DetectionResults.tsx b/src/components/olmap/BurstDetection/DetectionResults.tsx index 516b4d3..74f911b 100644 --- a/src/components/olmap/BurstDetection/DetectionResults.tsx +++ b/src/components/olmap/BurstDetection/DetectionResults.tsx @@ -179,10 +179,7 @@ const DetectionResults: React.FC = ({ result, state, onStateChange }) => const locateSensors = async (sensorIds: string[]) => { if (!map || sensorIds.length === 0) return; - let features = await queryFeaturesByIds(sensorIds, "geo_junctions_mat"); - if (features.length === 0) { - features = await queryFeaturesByIds(sensorIds, "geo_junctions"); - } + const features = await queryFeaturesByIds(sensorIds, "junctions"); if (features.length === 0) return; setHighlightFeatures(features); const format = new GeoJSON(); diff --git a/src/components/olmap/BurstDetection/SchemeQuery.tsx b/src/components/olmap/BurstDetection/SchemeQuery.tsx index 03dcde4..6db84a4 100644 --- a/src/components/olmap/BurstDetection/SchemeQuery.tsx +++ b/src/components/olmap/BurstDetection/SchemeQuery.tsx @@ -21,7 +21,7 @@ import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs"; import dayjs, { Dayjs } from "dayjs"; import "dayjs/locale/zh-cn"; import { useNotification } from "@refinedev/core"; -import { api } from "@/lib/api"; +import { getAnalysisScheme, listAnalysisSchemes } from "@/lib/analysisRuns"; import { NETWORK_NAME } from "@config/config"; import { useControllableObjectState } from "@components/olmap/core/useControllableState"; import { SchemeQueryEmptyState } from "@components/olmap/common/PanelEmptyState"; @@ -42,7 +42,7 @@ interface Props { export interface BurstDetectionSchemeQueryState { queryAll: boolean; queryDate: Dayjs | null; - expandedId: number | null; + expandedId: string | null; hasQueried: boolean; } @@ -130,15 +130,12 @@ const SchemeQuery: React.FC = ({ const handleQuery = async () => { setLoading(true); try { - const params: Record = { - scheme_type: "burst_detection", - }; - if (!queryAll && queryDate) { - params.query_date = queryDate.startOf("day").toISOString(); - } - - const response = await api.get("/api/v1/schemes", { params }); - const nextSchemes = response.data as BurstDetectionSchemeRecord[]; + const nextSchemes = (await listAnalysisSchemes({ + runType: "burst_detection", + queryDate: !queryAll && queryDate + ? queryDate.format("YYYY-MM-DD") + : undefined, + })) as BurstDetectionSchemeRecord[]; setSchemes(nextSchemes); setQueryField("hasQueried", true); open?.({ @@ -157,13 +154,9 @@ const SchemeQuery: React.FC = ({ } }; - const handleViewSchemeResult = async (schemeName: string) => { + const handleViewSchemeResult = async (runId: string) => { try { - const response = await api.get( - `/api/v1/schemes/${encodeURIComponent(schemeName)}`, - { params: { scheme_type: "burst_detection" } }, - ); - const schemeRecord = response.data as BurstDetectionSchemeRecord & { + const schemeRecord = (await getAnalysisScheme(runId)) as BurstDetectionSchemeRecord & { result_payload?: BurstDetectionResult; }; const normalizedResult = @@ -185,7 +178,7 @@ const SchemeQuery: React.FC = ({ open?.({ type: "success", message: "方案加载成功", - description: `已加载方案:${schemeName}`, + description: `已加载方案:${schemeRecord.scheme_name}`, }); } catch (error: any) { open?.({ @@ -398,7 +391,7 @@ const SchemeQuery: React.FC = ({ size="small" className="bg-blue-600 hover:bg-blue-700" sx={{ textTransform: "none", fontWeight: 500 }} - onClick={() => handleViewSchemeResult(scheme.scheme_name)} + onClick={() => handleViewSchemeResult(scheme.scheme_id)} > 查看侦测结果 diff --git a/src/components/olmap/BurstDetection/types.ts b/src/components/olmap/BurstDetection/types.ts index fa88561..0e46614 100644 --- a/src/components/olmap/BurstDetection/types.ts +++ b/src/components/olmap/BurstDetection/types.ts @@ -97,7 +97,7 @@ export interface BurstDetectionSchemeDetail { } export interface BurstDetectionSchemeRecord { - scheme_id: number; + scheme_id: string; scheme_name: string; scheme_type?: string; create_time: string; diff --git a/src/components/olmap/BurstLocation/AnalysisParameters.tsx b/src/components/olmap/BurstLocation/AnalysisParameters.tsx index 01c55aa..0d31f42 100644 --- a/src/components/olmap/BurstLocation/AnalysisParameters.tsx +++ b/src/components/olmap/BurstLocation/AnalysisParameters.tsx @@ -24,6 +24,7 @@ import { useNotification } from "@refinedev/core"; import dayjs, { Dayjs } from "dayjs"; import "dayjs/locale/zh-cn"; import { api } from "@/lib/api"; +import { listAnalysisSchemes } from "@/lib/analysisRuns"; import { NETWORK_NAME, config } from "@config/config"; import { useControllableObjectState } from "@components/olmap/core/useControllableState"; import { useSessionRecoveryDraft } from "@/lib/sessionRecoveryDraft"; @@ -46,7 +47,7 @@ interface Props { } export interface SchemeItem { - scheme_id: number; + scheme_id: string; scheme_name: string; scheme_type: string; create_time: string; @@ -63,7 +64,7 @@ export interface BurstLocationAnalysisParametersState { schemeName: string; dataSource: DataSource; schemes: SchemeItem[]; - selectedSchemeId: number | ""; + selectedSchemeId: string; burstLeakage: number; enableFlow: boolean; burstStartTime: Dayjs | null; @@ -141,12 +142,9 @@ const AnalysisParameters: React.FC = ({ setSchemeLoading(true); try { - const response = await api.get(`${config.BACKEND_URL}/api/v1/schemes`, { - params: { scheme_type: "burst_analysis" }, - }); - const burstSchemes = (response.data as SchemeItem[]).filter( - (scheme) => scheme.scheme_type === "burst_analysis", - ).sort( + const burstSchemes = (await listAnalysisSchemes({ + runType: "burst_analysis", + }) as unknown as SchemeItem[]).sort( (a, b) => dayjs(b.create_time).valueOf() - dayjs(a.create_time).valueOf(), ); @@ -194,7 +192,7 @@ const AnalysisParameters: React.FC = ({ } }; - const handleSchemeSelect = (schemeId: number) => { + const handleSchemeSelect = (schemeId: string) => { setFormField("selectedSchemeId", schemeId); const scheme = schemes.find((item) => item.scheme_id === schemeId); if (scheme) { @@ -253,8 +251,7 @@ const AnalysisParameters: React.FC = ({ scada_burst_start: burstStartTime.toISOString(), scada_burst_end: burstEndTime.toISOString(), use_scada_flow: enableFlow || undefined, - simulation_scheme_name: selectedScheme?.scheme_name, - simulation_scheme_type: selectedScheme?.scheme_type, + simulation_run_id: selectedScheme?.scheme_id, }, ); @@ -370,7 +367,7 @@ const AnalysisParameters: React.FC = ({