feat(workbench): persist operational workflows and events

This commit is contained in:
2026-09-24 04:19:02 +08:00
parent baff7dfe9e
commit 9335bdc1ea
66 changed files with 16580 additions and 238 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
"contracts": {
"server": {
"file": "server-v1.openapi.json",
"sha256": "de342f10ac2949eb337513b1d1cb6b595083be2fad2860c9ccd92eebe2758e6b"
"sha256": "3669e1b9ba31dad83f9c53028fd974b8bacac0f9d3069f644e49254baf6bb82f"
}
}
}
+303
View File
@@ -251,6 +251,19 @@
],
"title": "Assignee"
},
"location": {
"anyOf": [
{
"maxLength": 200,
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"title": "Location"
},
"priority": {
"default": "normal",
"enum": [
@@ -267,6 +280,19 @@
"title": "Request Id",
"type": "string"
},
"scenario_code": {
"anyOf": [
{
"maxLength": 128,
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"title": "Scenario Code"
},
"scheduled_at": {
"anyOf": [
{
@@ -285,12 +311,29 @@
"draft",
"open",
"in_progress",
"awaiting_reply",
"completed",
"cancelled"
],
"title": "Status",
"type": "string"
},
"subtasks": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/WorkbenchRuntimeWorkOrderSubtask"
},
"maxItems": 50,
"minItems": 1,
"type": "array"
},
{
"type": "null"
}
],
"title": "Subtasks"
},
"summary": {
"maxLength": 4000,
"minLength": 1,
@@ -302,6 +345,16 @@
"minLength": 1,
"title": "Title",
"type": "string"
},
"work_order_type": {
"default": "general",
"enum": [
"general",
"water_quality_complaint",
"burst_report"
],
"title": "Work Order Type",
"type": "string"
}
},
"required": [
@@ -1586,16 +1639,44 @@
"title": "Clear Assignee",
"type": "boolean"
},
"clear_location": {
"default": false,
"title": "Clear Location",
"type": "boolean"
},
"clear_scenario_code": {
"default": false,
"title": "Clear Scenario Code",
"type": "boolean"
},
"clear_scheduled_at": {
"default": false,
"title": "Clear Scheduled At",
"type": "boolean"
},
"clear_subtasks": {
"default": false,
"title": "Clear Subtasks",
"type": "boolean"
},
"expected_revision": {
"minimum": 1.0,
"title": "Expected Revision",
"type": "integer"
},
"location": {
"anyOf": [
{
"maxLength": 200,
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"title": "Location"
},
"priority": {
"anyOf": [
{
@@ -1618,6 +1699,19 @@
"title": "Request Id",
"type": "string"
},
"scenario_code": {
"anyOf": [
{
"maxLength": 128,
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"title": "Scenario Code"
},
"scheduled_at": {
"anyOf": [
{
@@ -1637,6 +1731,7 @@
"draft",
"open",
"in_progress",
"awaiting_reply",
"completed",
"cancelled"
],
@@ -1648,6 +1743,22 @@
],
"title": "Status"
},
"subtasks": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/WorkbenchRuntimeWorkOrderSubtask"
},
"maxItems": 50,
"minItems": 1,
"type": "array"
},
{
"type": "null"
}
],
"title": "Subtasks"
},
"summary": {
"anyOf": [
{
@@ -1705,6 +1816,17 @@
"title": "Created By",
"type": "string"
},
"location": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Location"
},
"origin": {
"const": "synthetic",
"title": "Origin",
@@ -1730,6 +1852,17 @@
"title": "Revision",
"type": "integer"
},
"scenario_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Scenario Code"
},
"scheduled_at": {
"anyOf": [
{
@@ -1747,12 +1880,29 @@
"draft",
"open",
"in_progress",
"awaiting_reply",
"completed",
"cancelled"
],
"title": "Status",
"type": "string"
},
"subtasks": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/WorkbenchRuntimeWorkOrderSubtask"
},
"maxItems": 50,
"minItems": 1,
"type": "array"
},
{
"type": "null"
}
],
"title": "Subtasks"
},
"summary": {
"title": "Summary",
"type": "string"
@@ -1774,6 +1924,16 @@
"format": "uuid",
"title": "Work Order Id",
"type": "string"
},
"work_order_type": {
"default": "general",
"enum": [
"general",
"water_quality_complaint",
"burst_report"
],
"title": "Work Order Type",
"type": "string"
}
},
"required": [
@@ -1824,6 +1984,149 @@
],
"title": "WorkOrderPage",
"type": "object"
},
"WorkbenchRuntimeWorkOrderStage": {
"additionalProperties": false,
"properties": {
"description": {
"minLength": 1,
"title": "Description",
"type": "string"
},
"id": {
"minLength": 1,
"title": "Id",
"type": "string"
},
"owner": {
"minLength": 1,
"title": "Owner",
"type": "string"
},
"sequence": {
"minimum": 1.0,
"title": "Sequence",
"type": "integer"
},
"status": {
"enum": [
"done",
"current",
"pending",
"blocked",
"skipped"
],
"title": "Status",
"type": "string"
},
"time_label": {
"minLength": 1,
"title": "Time Label",
"type": "string"
},
"title": {
"minLength": 1,
"title": "Title",
"type": "string"
}
},
"required": [
"id",
"sequence",
"title",
"status",
"owner",
"time_label",
"description"
],
"title": "WorkbenchRuntimeWorkOrderStage",
"type": "object"
},
"WorkbenchRuntimeWorkOrderSubtask": {
"additionalProperties": false,
"properties": {
"assignee": {
"minLength": 1,
"title": "Assignee",
"type": "string"
},
"duration_minutes": {
"minimum": 1.0,
"title": "Duration Minutes",
"type": "integer"
},
"id": {
"minLength": 1,
"title": "Id",
"type": "string"
},
"location": {
"minLength": 1,
"title": "Location",
"type": "string"
},
"reply_requirements": {
"items": {
"minLength": 1,
"type": "string"
},
"title": "Reply Requirements",
"type": "array"
},
"reply_window_minutes": {
"minimum": 1.0,
"title": "Reply Window Minutes",
"type": "integer"
},
"scheduled_at": {
"format": "date-time",
"title": "Scheduled At",
"type": "string"
},
"stages": {
"items": {
"$ref": "#/components/schemas/WorkbenchRuntimeWorkOrderStage"
},
"title": "Stages",
"type": "array"
},
"status": {
"enum": [
"pending",
"running",
"blocked",
"completed",
"cancelled"
],
"title": "Status",
"type": "string"
},
"summary": {
"minLength": 1,
"title": "Summary",
"type": "string"
},
"title": {
"minLength": 1,
"title": "Title",
"type": "string"
}
},
"required": [
"id",
"title",
"summary",
"status",
"scheduled_at",
"location",
"assignee",
"duration_minutes",
"reply_window_minutes",
"stages",
"reply_requirements"
],
"title": "WorkbenchRuntimeWorkOrderSubtask",
"type": "object"
}
}
},
File diff suppressed because it is too large Load Diff