Files
go-sip/contracts/schema/mq-task-control-request.schema.json
T

90 lines
1.9 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://go-sip.local/contracts/schema/mq-task-control-request.schema.json",
"title": "SaaS to Dispatcher: task.control request; external SaaS compatibility unverified",
"type": "object",
"additionalProperties": false,
"required": [
"event_id",
"event_type",
"dispatcher_id",
"tenant_id",
"issued_at",
"payload"
],
"properties": {
"event_id": {
"$ref": "./common.schema.json#/$defs/event_id"
},
"event_type": {
"const": "task.control"
},
"dispatcher_id": {
"$ref": "./common.schema.json#/$defs/dispatcher_id"
},
"tenant_id": {
"$ref": "./common.schema.json#/$defs/tenant_id"
},
"issued_at": {
"$ref": "./common.schema.json#/$defs/issued_at"
},
"payload": {
"type": "object",
"additionalProperties": false,
"required": [
"task_id",
"action",
"reason"
],
"properties": {
"task_id": {
"$ref": "./common.schema.json#/$defs/task_id"
},
"action": {
"enum": [
"start",
"pause",
"resume",
"stop",
"edit"
]
},
"reason": {
"type": "string",
"minLength": 1
},
"options": {
"type": "object",
"additionalProperties": false,
"properties": {
"active_call_policy": {
"enum": [
"drain",
"hangup"
]
}
}
}
},
"allOf": [
{
"if": {
"properties": {
"action": {
"const": "edit"
}
}
},
"then": {
"not": {
"required": [
"options"
]
}
}
}
]
}
}
}