28 lines
1.6 KiB
JSON
28 lines
1.6 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://go-sip.local/contracts/proposals/task-control-v0.4-proposal.schema.json",
|
|
"title": "Project-local inbound pause/resume/stop commands; external compatibility unverified",
|
|
"$comment": "Replaces only task.control ingress in command-next.v0.1-proposal. Existing command.result egress remains under the v0.1 contract. Pause and stop always require hangup; no active_call_policy or MQ command expiry field.",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["schema_version", "dispatcher_id", "tenant_id", "tenant_key", "trace_id", "issued_at", "command_type", "payload"],
|
|
"properties": {
|
|
"schema_version": {"const": "task-control.v0.4-proposal"},
|
|
"dispatcher_id": {"$ref": "https://go-sip.local/contracts/v1/mq.schema.json#/$defs/dispatcherId"},
|
|
"tenant_id": {"$ref": "https://go-sip.local/contracts/v1/mq.schema.json#/$defs/id"},
|
|
"tenant_key": {"$ref": "https://go-sip.local/contracts/v1/mq.schema.json#/$defs/tenantKey"},
|
|
"trace_id": {"$ref": "https://go-sip.local/contracts/v1/mq.schema.json#/$defs/id"},
|
|
"issued_at": {"$ref": "https://go-sip.local/contracts/v1/mq.schema.json#/$defs/time"},
|
|
"command_type": {"const": "task.control"},
|
|
"payload": {
|
|
"type": "object", "additionalProperties": false,
|
|
"required": ["task_id", "action", "reason"],
|
|
"properties": {
|
|
"task_id": {"type": "string", "pattern": "^[A-Za-z0-9_-]{1,128}$"},
|
|
"action": {"enum": ["pause", "resume", "stop"]},
|
|
"reason": {"type": "string", "minLength": 1, "maxLength": 512}
|
|
}
|
|
}
|
|
}
|
|
}
|