{
  "openapi": "3.1.0",
  "info": {
    "title": "RACO Agent Pack and Agent Turn API",
    "version": "2.0.0",
    "description": "Canonical JSON API for authoring collections Agent Packs, deciding no-send Agent Turns, recording verified outcomes, and managing reviewed action proposals. Agent Turn calls never send messages or execute external actions."
  },
  "servers": [
    {
      "url": "https://us-central1-collections-ee444.cloudfunctions.net/racoApi",
      "description": "RACO Firebase Function"
    }
  ],
  "tags": [
    { "name": "Agent Turns" },
    { "name": "Agent Packs" },
    { "name": "Outcome Events" },
    { "name": "Action Proposals" },
    { "name": "Projects" },
    { "name": "External Access" }
  ],
  "paths": {
    "/raco/agent-turns/decide": {
      "post": {
        "tags": ["Agent Turns"],
        "summary": "Decide one live no-send Agent Turn",
        "description": "Requires editor or owner live-decision permission, or a RACO client with agent_turn_decide. Loads an eligible active canary Agent Pack and fresh server-resolved trusted context. Caller-supplied policy, account facts, legal trust, provider payloads, and internal state are rejected.",
        "security": [{ "FirebaseBearer": [] }, { "RacoClient": [] }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentTurnDecideRequest" } } } },
        "responses": {
          "200": { "description": "No-send decision and optional reply", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentTurnResponse" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthenticated" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "412": { "$ref": "#/components/responses/FailedPrecondition" },
          "429": { "$ref": "#/components/responses/RateLimited" }
        }
      }
    },
    "/raco/agent-turns/simulate": {
      "post": {
        "tags": ["Agent Turns"],
        "summary": "Simulate one no-send turn against an exact draft revision",
        "description": "Requires Firebase project membership with run_simulation. Viewers, editors, and owners may simulate; external RACO clients cannot.",
        "security": [{ "FirebaseBearer": [] }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentTurnSimulateRequest" } } } },
        "responses": {
          "200": { "description": "No-send simulation and optional reply", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentTurnResponse" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthenticated" },
          "403": { "$ref": "#/components/responses/Forbidden" },
          "412": { "$ref": "#/components/responses/FailedPrecondition" }
        }
      }
    },
    "/raco/events": {
      "post": {
        "tags": ["Outcome Events"],
        "summary": "Ingest one verified outcome event",
        "description": "Accepts only the closed outcome taxonomy and event-specific typed data. Raw messages, transcripts, credentials, provider payloads, and unknown fields are rejected.",
        "security": [{ "FirebaseBearer": [] }, { "RacoClient": [] }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OutcomeEventRequest" } } } },
        "responses": {
          "200": { "description": "Event accepted or safely replayed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoSendResponse" } } } },
          "400": { "$ref": "#/components/responses/BadRequest" },
          "401": { "$ref": "#/components/responses/Unauthenticated" },
          "403": { "$ref": "#/components/responses/Forbidden" }
        }
      }
    },
    "/raco/action-proposals/create": {
      "post": {
        "tags": ["Action Proposals"],
        "summary": "Create a bounded action proposal without executing it",
        "security": [{ "FirebaseBearer": [] }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActionProposalCreateRequest" } } } },
        "responses": { "200": { "description": "Versioned proposal state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoSendResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "403": { "$ref": "#/components/responses/Forbidden" } }
      }
    },
    "/raco/action-proposals/read": {
      "post": {
        "tags": ["Action Proposals"],
        "summary": "Read one action proposal",
        "security": [{ "FirebaseBearer": [] }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActionProposalReadRequest" } } } },
        "responses": { "200": { "description": "Versioned proposal state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoSendResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } }
      }
    },
    "/raco/action-proposals/approve": {
      "post": {
        "tags": ["Action Proposals"],
        "summary": "Approve one proposal with optimistic version binding",
        "security": [{ "FirebaseBearer": [] }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActionProposalTransitionRequest" } } } },
        "responses": { "200": { "description": "Approved proposal state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoSendResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "403": { "$ref": "#/components/responses/Forbidden" }, "409": { "$ref": "#/components/responses/Conflict" } }
      }
    },
    "/raco/action-proposals/reject": {
      "post": {
        "tags": ["Action Proposals"],
        "summary": "Reject one proposal with a closed reason code",
        "security": [{ "FirebaseBearer": [] }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActionProposalRejectRequest" } } } },
        "responses": { "200": { "description": "Rejected proposal state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoSendResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "403": { "$ref": "#/components/responses/Forbidden" }, "409": { "$ref": "#/components/responses/Conflict" } }
      }
    },
    "/raco/action-proposals/execute": {
      "post": {
        "tags": ["Action Proposals"],
        "summary": "Advance an approved proposal to execution state",
        "description": "This lifecycle route validates approval and version state. It does not imply that an external adapter or delivery channel exists.",
        "security": [{ "FirebaseBearer": [] }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActionProposalTransitionRequest" } } } },
        "responses": { "200": { "description": "Proposal execution lifecycle state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoSendResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "403": { "$ref": "#/components/responses/Forbidden" }, "409": { "$ref": "#/components/responses/Conflict" }, "412": { "$ref": "#/components/responses/FailedPrecondition" } }
      }
    },
    "/raco/agent-packs/draft/read": {
      "post": {
        "tags": ["Agent Packs"],
        "summary": "Read the project Agent Pack draft",
        "security": [{ "FirebaseBearer": [] }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectIdRequest" } } } },
        "responses": { "200": { "description": "Draft and revision receipt", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoSendResponse" } } } }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } }
      }
    },
    "/raco/agent-packs/draft/save": {
      "post": {
        "tags": ["Agent Packs"],
        "summary": "Save a normalized Agent Pack draft with compare-and-swap",
        "security": [{ "FirebaseBearer": [] }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentPackSaveRequest" } } } },
        "responses": { "200": { "description": "Saved draft and revision receipt", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoSendResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "403": { "$ref": "#/components/responses/Forbidden" }, "409": { "$ref": "#/components/responses/Conflict" } }
      }
    },
    "/raco/agent-packs/active/read": {
      "post": {
        "tags": ["Agent Packs"],
        "summary": "Read immutable active Agent Pack and launch provenance",
        "security": [{ "FirebaseBearer": [] }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectIdRequest" } } } },
        "responses": { "200": { "description": "Active Agent Pack and trusted launch state", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoSendResponse" } } } }, "403": { "$ref": "#/components/responses/Forbidden" }, "404": { "$ref": "#/components/responses/NotFound" } }
      }
    },
    "/raco/agent-packs/canary/activate": {
      "post": {
        "tags": ["Agent Packs"],
        "summary": "Activate an approved immutable draft as a canary",
        "description": "Fails closed unless trusted evaluation evidence and canary configuration are bound to the exact draft revision and hash.",
        "security": [{ "FirebaseBearer": [] }],
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentPackActivateRequest" } } } },
        "responses": { "200": { "description": "Trusted canary launch receipt", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoSendResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "403": { "$ref": "#/components/responses/Forbidden" }, "412": { "$ref": "#/components/responses/FailedPrecondition" } }
      }
    },
    "/raco/projects": { "$ref": "#/components/pathItems/ProjectOperation" },
    "/raco/projects/create": { "$ref": "#/components/pathItems/ProjectOperation" },
    "/raco/projects/read": { "$ref": "#/components/pathItems/ProjectOperation" },
    "/raco/projects/update": { "$ref": "#/components/pathItems/ProjectOperation" },
    "/raco/projects/archive": { "$ref": "#/components/pathItems/ProjectOperation" },
    "/raco/projects/llm/read": { "$ref": "#/components/pathItems/ProjectOperation" },
    "/raco/projects/llm/update": { "$ref": "#/components/pathItems/ProjectOperation" },
    "/raco/projects/members": { "$ref": "#/components/pathItems/ProjectOperation" },
    "/raco/projects/members/upsert": { "$ref": "#/components/pathItems/ProjectOperation" },
    "/raco/projects/members/remove": { "$ref": "#/components/pathItems/ProjectOperation" },
    "/raco/external/clients": { "$ref": "#/components/pathItems/ExternalAccessOperation" },
    "/raco/external/clients/create": { "$ref": "#/components/pathItems/ExternalAccessOperation" },
    "/raco/external/clients/rotate": { "$ref": "#/components/pathItems/ExternalAccessOperation" },
    "/raco/external/clients/revoke": { "$ref": "#/components/pathItems/ExternalAccessOperation" },
    "/raco/external/audit": { "$ref": "#/components/pathItems/ExternalAccessOperation" }
  },
  "components": {
    "securitySchemes": {
      "FirebaseBearer": { "type": "http", "scheme": "bearer", "bearerFormat": "Firebase ID token" },
      "RacoClient": { "type": "apiKey", "in": "header", "name": "Authorization", "description": "Authorization: RacoClient <clientId>:<clientSecret>" }
    },
    "responses": {
      "BadRequest": { "description": "Invalid or unsupported input", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } },
      "Unauthenticated": { "description": "Authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } },
      "Forbidden": { "description": "Project permission or client scope denied", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } },
      "NotFound": { "description": "Exact route or project-scoped resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } },
      "Conflict": { "description": "Optimistic version or revision changed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } },
      "FailedPrecondition": { "description": "Policy, launch, canary, approval, or trusted-context prerequisite missing", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } },
      "RateLimited": { "description": "Principal rate limit or durable quota exceeded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }
    },
    "pathItems": {
      "ProjectOperation": {
        "post": {
          "tags": ["Projects"],
          "summary": "Project-scoped support operation selected by the exact path",
          "security": [{ "FirebaseBearer": [] }],
          "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectSupportRequest" } } } },
          "responses": { "200": { "description": "Project-scoped no-send response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoSendResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "403": { "$ref": "#/components/responses/Forbidden" } }
        }
      },
      "ExternalAccessOperation": {
        "post": {
          "tags": ["External Access"],
          "summary": "Manage scoped external clients or read redacted client audit events",
          "security": [{ "FirebaseBearer": [] }],
          "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalAccessRequest" } } } },
          "responses": { "200": { "description": "Project-scoped no-send response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NoSendResponse" } } } }, "400": { "$ref": "#/components/responses/BadRequest" }, "403": { "$ref": "#/components/responses/Forbidden" } }
        }
      }
    },
    "schemas": {
      "SafeId": { "type": "string", "minLength": 1, "maxLength": 160, "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$" },
      "ProjectIdRequest": { "type": "object", "additionalProperties": false, "required": ["projectId"], "properties": { "projectId": { "allOf": [{ "$ref": "#/components/schemas/SafeId" }], "maxLength": 80 } } },
      "AgentTurnDecideRequest": {
        "type": "object", "additionalProperties": false,
        "required": ["schemaVersion", "projectId", "caseId", "conversationId", "messageId", "channel", "debtorMessage", "idempotencyKey"],
        "properties": {
          "schemaVersion": { "const": "raco_agent_turn_request_v1" },
          "projectId": { "type": "string", "minLength": 1, "maxLength": 80 },
          "caseId": { "type": "string", "minLength": 1, "maxLength": 120 },
          "conversationId": { "type": "string", "minLength": 1, "maxLength": 120 },
          "messageId": { "type": "string", "minLength": 1, "maxLength": 100 },
          "channel": { "type": "string", "enum": ["sms", "email", "chat", "voice", "whatsapp", "other"] },
          "debtorMessage": { "type": "string", "minLength": 1, "maxLength": 2000 },
          "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 160 }
        }
      },
      "AgentTurnSimulateRequest": {
        "type": "object", "additionalProperties": false,
        "required": ["schemaVersion", "projectId", "caseId", "conversationId", "messageId", "channel", "debtorMessage", "expectedDraftRevision"],
        "properties": {
          "schemaVersion": { "const": "raco_agent_turn_request_v1" },
          "projectId": { "type": "string", "minLength": 1, "maxLength": 80 },
          "caseId": { "type": "string", "minLength": 1, "maxLength": 120 },
          "conversationId": { "type": "string", "minLength": 1, "maxLength": 120 },
          "messageId": { "type": "string", "minLength": 1, "maxLength": 100 },
          "channel": { "type": "string", "enum": ["sms", "email", "chat", "voice", "whatsapp", "other"] },
          "debtorMessage": { "type": "string", "minLength": 1, "maxLength": 2000 },
          "expectedDraftRevision": { "type": "integer", "minimum": 1, "maximum": 1000000000 },
          "accountFactFixtures": { "type": "object", "maxProperties": 80, "additionalProperties": { "type": ["string", "number", "boolean"] } },
          "stateFixtures": { "type": "object", "maxProperties": 32, "propertyNames": { "pattern": "^(conversationState|outcomeState|behaviorState)(\\.[A-Za-z][A-Za-z0-9_]{0,79}){1,4}$" }, "additionalProperties": { "type": ["string", "integer", "boolean"] } }
        }
      },
      "AgentTurnResponse": {
        "type": "object", "additionalProperties": false,
        "required": ["ok", "sent", "status", "decision", "reply", "api"],
        "properties": {
          "ok": { "const": true }, "sent": { "const": false }, "status": { "type": "string", "enum": ["decided", "simulated"] },
          "decision": { "type": "object", "description": "Redacted Agent Turn decision", "additionalProperties": true },
          "reply": { "type": ["object", "null"], "description": "Validated no-send reply or null", "additionalProperties": true },
          "api": { "type": "object", "additionalProperties": true }
        }
      },
      "OutcomeEventRequest": {
        "type": "object", "additionalProperties": false,
        "required": ["eventId", "eventType", "projectId", "caseId", "conversationId", "occurredAt", "source", "correlation", "idempotencyKey", "data"],
        "properties": {
          "eventId": { "$ref": "#/components/schemas/SafeId" },
          "eventType": { "type": "string", "enum": ["message.delivered", "message.failed", "payment.succeeded", "payment.failed", "promise.recorded", "promise.kept", "promise.broken", "review.approved", "review.rejected", "contact.opted_out", "dispute.opened", "case.handed_off"] },
          "projectId": { "type": "string", "maxLength": 80 }, "caseId": { "type": "string", "maxLength": 120 }, "conversationId": { "type": "string", "maxLength": 120 },
          "occurredAt": { "type": "string", "format": "date-time", "maxLength": 40 }, "source": { "type": "string", "maxLength": 120 },
          "correlation": { "type": "object", "additionalProperties": false, "minProperties": 1, "properties": { "decisionId": { "type": "string", "maxLength": 120 }, "messageId": { "type": "string", "maxLength": 120 }, "connectorExecutionId": { "type": "string", "maxLength": 120 }, "externalId": { "type": "string", "maxLength": 160 } } },
          "idempotencyKey": { "type": "string", "maxLength": 160 }, "data": { "type": "object", "description": "Closed event-specific typed data" }
        }
      },
      "ActionProposalCreateRequest": { "type": "object", "additionalProperties": false, "required": ["projectId", "caseId", "conversationId", "decisionId", "actionId", "idempotencyKey"], "properties": { "projectId": { "type": "string", "maxLength": 80 }, "caseId": { "type": "string", "maxLength": 120 }, "conversationId": { "type": "string", "maxLength": 120 }, "decisionId": { "type": "string", "maxLength": 120 }, "actionId": { "type": "string", "maxLength": 80 }, "idempotencyKey": { "type": "string", "maxLength": 160 } } },
      "ActionProposalReadRequest": { "type": "object", "additionalProperties": false, "required": ["projectId", "proposalId"], "properties": { "projectId": { "type": "string", "maxLength": 80 }, "proposalId": { "type": "string", "maxLength": 120 } } },
      "ActionProposalTransitionRequest": { "type": "object", "additionalProperties": false, "required": ["projectId", "proposalId", "expectedVersion", "idempotencyKey"], "properties": { "projectId": { "type": "string", "maxLength": 80 }, "proposalId": { "type": "string", "maxLength": 120 }, "expectedVersion": { "type": "integer", "minimum": 1, "maximum": 1000000 }, "idempotencyKey": { "type": "string", "maxLength": 160 } } },
      "ActionProposalRejectRequest": { "type": "object", "additionalProperties": false, "required": ["projectId", "proposalId", "expectedVersion", "idempotencyKey", "reasonCode"], "properties": { "projectId": { "type": "string", "maxLength": 80 }, "proposalId": { "type": "string", "maxLength": 120 }, "expectedVersion": { "type": "integer", "minimum": 1, "maximum": 1000000 }, "idempotencyKey": { "type": "string", "maxLength": 160 }, "reasonCode": { "type": "string", "enum": ["policy_blocked", "compliance_blocked", "account_data_stale", "action_not_authorized", "duplicate_proposal"] } } },
      "AgentPackSaveRequest": { "type": "object", "additionalProperties": false, "required": ["projectId", "agentPack", "expectedRevision", "idempotencyKey"], "properties": { "projectId": { "type": "string", "maxLength": 80 }, "agentPack": { "$ref": "#/components/schemas/AgentPack" }, "expectedRevision": { "type": "integer", "minimum": 0, "maximum": 1000000000 }, "idempotencyKey": { "type": "string", "maxLength": 160 } } },
      "AgentPackActivateRequest": { "type": "object", "additionalProperties": false, "required": ["projectId", "expectedDraftRevision", "evidenceId", "configurationId", "idempotencyKey"], "properties": { "projectId": { "type": "string", "maxLength": 80 }, "expectedDraftRevision": { "type": "integer", "minimum": 1, "maximum": 1000000000 }, "evidenceId": { "type": "string", "maxLength": 120 }, "configurationId": { "type": "string", "maxLength": 120 }, "idempotencyKey": { "type": "string", "maxLength": 160 } } },
      "AgentPack": { "type": "object", "description": "Closed raco_agent_pack_v2 document. Business behavior is authored through intentDefinitions, accountStages, paymentStrategies, escalationPolicies, conversationPlans, actionDefinitions, response, memory, identity, accountFacts, and compliance.", "required": ["schemaVersion", "packId", "versionId", "status"], "properties": { "schemaVersion": { "const": "raco_agent_pack_v2" }, "packId": { "type": "string", "maxLength": 80 }, "versionId": { "type": "string", "maxLength": 120 }, "status": { "const": "draft" } }, "additionalProperties": true },
      "ProjectSupportRequest": { "type": "object", "additionalProperties": false, "properties": { "operation": { "type": "string", "enum": ["list", "create", "read", "update", "archive", "list_members", "upsert_member", "remove_member", "read_llm", "update_llm"] }, "projectId": { "type": "string", "maxLength": 80 }, "projectName": { "type": "string", "maxLength": 80 }, "memberUid": { "type": "string", "maxLength": 160 }, "memberEmail": { "type": "string", "format": "email", "maxLength": 240 }, "role": { "type": "string", "enum": ["editor", "viewer"] }, "llmNegotiator": { "$ref": "#/components/schemas/LlmNegotiatorSettings" } } },
      "ExternalAccessRequest": { "type": "object", "additionalProperties": false, "properties": { "operation": { "type": "string", "enum": ["list_clients", "create_client", "rotate_client", "revoke_client", "list_audit"] }, "projectId": { "type": "string", "maxLength": 80 }, "clientId": { "type": "string", "maxLength": 80 }, "label": { "type": "string", "maxLength": 80 }, "scopes": { "type": "array", "maxItems": 2, "items": { "type": "string", "enum": ["agent_turn_decide", "event_ingest"] } }, "allowedOrigins": { "type": "array", "maxItems": 12, "items": { "type": "string", "maxLength": 200 } }, "rateLimitPerMinute": { "type": "integer", "minimum": 1, "maximum": 300 } } },
      "LlmNegotiatorSettings": { "type": "object", "description": "Provider-neutral project configuration. Credentials are write-only and never returned.", "additionalProperties": false, "properties": { "activeProvider": { "type": "string", "enum": ["openai", "anthropic"] }, "openAI": { "$ref": "#/components/schemas/ProviderSettings" }, "anthropic": { "$ref": "#/components/schemas/ProviderSettings" }, "fallback": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" }, "provider": { "type": "string", "enum": ["openai", "anthropic"] } } } } },
      "ProviderSettings": { "type": "object", "additionalProperties": false, "properties": { "apiKey": { "type": "string", "writeOnly": true, "maxLength": 500 }, "clearApiKey": { "type": "boolean" }, "model": { "type": "string", "maxLength": 120 }, "baseUrl": { "type": "string", "maxLength": 400 }, "reasoningEffort": { "type": "string", "enum": ["minimal", "low", "medium", "high"] } } },
      "NoSendResponse": { "type": "object", "required": ["ok", "sent"], "properties": { "ok": { "type": "boolean" }, "sent": { "const": false }, "api": { "type": "object", "additionalProperties": true } }, "additionalProperties": true },
      "ErrorResponse": { "type": "object", "required": ["ok", "error"], "properties": { "ok": { "const": false }, "error": { "type": "object", "required": ["code", "message"], "properties": { "code": { "type": "string" }, "message": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }
    }
  }
}
