Files
next-tjwater-server/contracts/view-command.schema.json
T
jiang 05183aff93
Generic Container CI/CD / test-build-publish (push) Successful in 3m53s
Server CI/CD v2 / build-test-publish-and-deploy (push) Successful in 3m52s
feat: extend operational investigation workflows
2026-10-30 17:30:19 +08:00

664 lines
19 KiB
JSON

{
"anyOf": [
{
"type": "object",
"properties": {
"action": {
"type": "string",
"const": "locate_features"
},
"layer": {
"type": "string",
"enum": [
"junctions",
"pipes",
"valves",
"pumps",
"tanks",
"reservoirs",
"scada"
]
},
"feature_ids": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"minItems": 1,
"maxItems": 100
}
},
"required": [
"action",
"layer",
"feature_ids"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"action": {
"type": "string",
"const": "zoom_to_map"
},
"center": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": [
{
"type": "number",
"minimum": -180,
"maximum": 180
},
{
"type": "number",
"minimum": -90,
"maximum": 90
}
]
},
"zoom": {
"type": "number",
"minimum": 0,
"maximum": 24
}
},
"required": [
"action",
"center",
"zoom"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"action": {
"type": "string",
"const": "render_scada_analysis"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"device_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"level": {
"type": "string",
"enum": [
"high",
"medium",
"low",
"unrated"
]
}
},
"required": [
"device_id",
"level"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 100
}
},
"required": [
"action",
"items"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"action": {
"type": "string",
"const": "clear_scada_analysis"
}
},
"required": [
"action"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"action": {
"type": "string",
"const": "highlight_features"
},
"layer": {
"type": "string",
"enum": [
"junctions",
"pipes",
"valves",
"pumps",
"tanks",
"reservoirs",
"scada"
]
},
"feature_ids": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"minItems": 1,
"maxItems": 100
},
"effect": {
"type": "string",
"enum": [
"steady",
"pulse"
]
}
},
"required": [
"action",
"layer",
"feature_ids",
"effect"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"action": {
"type": "string",
"const": "clear_highlights"
}
},
"required": [
"action"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"action": {
"type": "string",
"const": "open_chart"
},
"chart_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"chart": {
"type": "object",
"properties": {
"title": {
"type": "string",
"maxLength": 200
},
"chart_type": {
"type": "string",
"enum": [
"line",
"bar"
]
},
"x_data": {
"type": "array",
"items": {
"type": "string",
"maxLength": 128
},
"minItems": 1,
"maxItems": 100
},
"series": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 128
},
"data": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 1,
"maxItems": 100
}
},
"required": [
"name",
"data"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 8
}
},
"required": [
"title",
"chart_type",
"x_data",
"series"
],
"additionalProperties": false
},
"evidence_refs": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"minItems": 0,
"maxItems": 100
}
},
"required": [
"action",
"chart_id",
"chart",
"evidence_refs"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"action": {
"type": "string",
"const": "close_chart"
},
"chart_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
}
},
"required": [
"action",
"chart_id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"action": {
"type": "string",
"const": "set_overlay"
},
"overlay_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"title": {
"type": "string",
"minLength": 1,
"maxLength": 200
},
"mode": {
"type": "string",
"enum": [
"geometry",
"heatmap"
]
},
"evidence_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"data": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "FeatureCollection"
},
"features": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "Feature"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"properties": {
"anyOf": [
{
"type": "object",
"additionalProperties": {}
},
{
"type": "null"
}
]
},
"geometry": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "Point"
},
"coordinates": {
"type": "array",
"minItems": 2,
"items": [
{
"type": "number",
"minimum": -180,
"maximum": 180
},
{
"type": "number",
"minimum": -90,
"maximum": 90
}
],
"additionalItems": {
"type": "number"
}
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "MultiPoint"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"minItems": 2,
"items": [
{
"type": "number",
"minimum": -180,
"maximum": 180
},
{
"type": "number",
"minimum": -90,
"maximum": 90
}
],
"additionalItems": {
"type": "number"
}
},
"minItems": 1,
"maxItems": 20000
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "LineString"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"minItems": 2,
"items": [
{
"type": "number",
"minimum": -180,
"maximum": 180
},
{
"type": "number",
"minimum": -90,
"maximum": 90
}
],
"additionalItems": {
"type": "number"
}
},
"minItems": 2,
"maxItems": 20000
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "MultiLineString"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"minItems": 2,
"items": [
{
"type": "number",
"minimum": -180,
"maximum": 180
},
{
"type": "number",
"minimum": -90,
"maximum": 90
}
],
"additionalItems": {
"type": "number"
}
},
"minItems": 2,
"maxItems": 20000
},
"minItems": 1,
"maxItems": 20000
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "Polygon"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"minItems": 2,
"items": [
{
"type": "number",
"minimum": -180,
"maximum": 180
},
{
"type": "number",
"minimum": -90,
"maximum": 90
}
],
"additionalItems": {
"type": "number"
}
},
"minItems": 4,
"maxItems": 20000
},
"minItems": 1,
"maxItems": 20000
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "MultiPolygon"
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"minItems": 2,
"items": [
{
"type": "number",
"minimum": -180,
"maximum": 180
},
{
"type": "number",
"minimum": -90,
"maximum": 90
}
],
"additionalItems": {
"type": "number"
}
},
"minItems": 4,
"maxItems": 20000
},
"minItems": 1,
"maxItems": 20000
},
"minItems": 1,
"maxItems": 20000
}
},
"required": [
"type",
"coordinates"
],
"additionalProperties": false
}
]
}
},
"required": [
"type",
"properties",
"geometry"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 1000
}
},
"required": [
"type",
"features"
],
"additionalProperties": false
}
},
"required": [
"action",
"overlay_id",
"title",
"mode",
"evidence_id",
"data"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"action": {
"type": "string",
"const": "clear_overlay"
},
"overlay_id": {
"type": "string",
"minLength": 1,
"maxLength": 128
}
},
"required": [
"action",
"overlay_id"
],
"additionalProperties": false
}
],
"$schema": "http://json-schema.org/draft-07/schema#"
}