{
  "$id": "https://elicitra.eigen.rest/developers/v6/schemas/mcp/campaign_review_draft.output.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "additionalProperties": false,
      "properties": {
        "campaignKey": {
          "maxLength": 128,
          "minLength": 1,
          "type": "string"
        },
        "draftReady": {
          "type": "boolean"
        },
        "editorUrl": {
          "maxLength": 2048,
          "type": "string"
        },
        "issues": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "enum": [
                  "CAMPAIGN_NOT_DRAFT",
                  "INTAKE_TITLE_REQUIRED",
                  "INTAKE_HEADLINE_REQUIRED",
                  "INTAKE_CTA_REQUIRED",
                  "PUBLISH_PROVIDER_NOT_PUBLISHED",
                  "PUBLISH_PROVIDER_STALE",
                  "PUBLISH_PROVIDER_ERROR",
                  "PUBLISH_CHANNEL_PROMPT_NOT_READY",
                  "PUBLISH_TEXT_CHAT_BUDGET_NOT_READY",
                  "PUBLISH_KNOWLEDGE_BASE_NOT_READY",
                  "PUBLISH_KNOWLEDGE_BASE_TIER_UNAVAILABLE",
                  "PUBLISH_CALLER_NUMBER_REQUIRED",
                  "PUBLISH_CALLER_NUMBER_UNAVAILABLE",
                  "PUBLISH_CALLER_NUMBER_TIER_UNAVAILABLE",
                  "PUBLISH_QUICK_ANSWERS_NOT_READY",
                  "ACCESS_CONFIGURATION_REQUIRED"
                ],
                "type": "string"
              },
              "message": {
                "maxLength": 1024,
                "type": "string"
              },
              "path": {
                "maxLength": 512,
                "type": "string"
              }
            },
            "required": [
              "path",
              "code",
              "message"
            ],
            "type": "object"
          },
          "maxItems": 20,
          "type": "array"
        },
        "operatorActions": {
          "items": {
            "enum": [
              "open_campaign_editor",
              "configure_access",
              "prepare_scenario",
              "assign_caller_number",
              "review_quick_answers",
              "publish_campaign"
            ],
            "type": "string"
          },
          "maxItems": 10,
          "type": "array"
        },
        "publishReadiness": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "anyOf": [
                {
                  "enum": [
                    "CAMPAIGN_NOT_DRAFT",
                    "INTAKE_TITLE_REQUIRED",
                    "INTAKE_HEADLINE_REQUIRED",
                    "INTAKE_CTA_REQUIRED",
                    "PUBLISH_PROVIDER_NOT_PUBLISHED",
                    "PUBLISH_PROVIDER_STALE",
                    "PUBLISH_PROVIDER_ERROR",
                    "PUBLISH_CHANNEL_PROMPT_NOT_READY",
                    "PUBLISH_TEXT_CHAT_BUDGET_NOT_READY",
                    "PUBLISH_KNOWLEDGE_BASE_NOT_READY",
                    "PUBLISH_KNOWLEDGE_BASE_TIER_UNAVAILABLE",
                    "PUBLISH_CALLER_NUMBER_REQUIRED",
                    "PUBLISH_CALLER_NUMBER_UNAVAILABLE",
                    "PUBLISH_CALLER_NUMBER_TIER_UNAVAILABLE",
                    "PUBLISH_QUICK_ANSWERS_NOT_READY",
                    "ACCESS_CONFIGURATION_REQUIRED"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "ready": {
              "type": "boolean"
            }
          },
          "required": [
            "ready",
            "code"
          ],
          "type": "object"
        },
        "revision": {
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991,
          "type": "integer"
        },
        "warnings": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "enum": [
                  "CAMPAIGN_NOT_DRAFT",
                  "INTAKE_TITLE_REQUIRED",
                  "INTAKE_HEADLINE_REQUIRED",
                  "INTAKE_CTA_REQUIRED",
                  "PUBLISH_PROVIDER_NOT_PUBLISHED",
                  "PUBLISH_PROVIDER_STALE",
                  "PUBLISH_PROVIDER_ERROR",
                  "PUBLISH_CHANNEL_PROMPT_NOT_READY",
                  "PUBLISH_TEXT_CHAT_BUDGET_NOT_READY",
                  "PUBLISH_KNOWLEDGE_BASE_NOT_READY",
                  "PUBLISH_KNOWLEDGE_BASE_TIER_UNAVAILABLE",
                  "PUBLISH_CALLER_NUMBER_REQUIRED",
                  "PUBLISH_CALLER_NUMBER_UNAVAILABLE",
                  "PUBLISH_CALLER_NUMBER_TIER_UNAVAILABLE",
                  "PUBLISH_QUICK_ANSWERS_NOT_READY",
                  "ACCESS_CONFIGURATION_REQUIRED"
                ],
                "type": "string"
              },
              "message": {
                "maxLength": 1024,
                "type": "string"
              },
              "path": {
                "maxLength": 512,
                "type": "string"
              }
            },
            "required": [
              "path",
              "code",
              "message"
            ],
            "type": "object"
          },
          "maxItems": 20,
          "type": "array"
        }
      },
      "required": [
        "campaignKey",
        "revision",
        "draftReady",
        "publishReadiness",
        "issues",
        "warnings",
        "operatorActions",
        "editorUrl"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "code": {
          "enum": [
            "NOT_FOUND",
            "REVISION_CONFLICT",
            "SCENARIO_LOCKED",
            "CAMPAIGN_LOCKED",
            "VALIDATION_FAILED",
            "QUOTA_EXCEEDED",
            "TOOL_NOT_AVAILABLE",
            "IDEMPOTENCY_KEY_REUSED",
            "REMOVAL_ACKNOWLEDGEMENT_REQUIRED",
            "UNAUTHORIZED",
            "FORBIDDEN",
            "RATE_LIMITED",
            "SERVICE_UNAVAILABLE"
          ],
          "type": "string"
        },
        "currentRevision": {
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991,
          "type": "integer"
        },
        "docsUrl": {
          "maxLength": 2048,
          "type": "string"
        },
        "editorUrl": {
          "maxLength": 2048,
          "type": "string"
        },
        "field": {
          "maxLength": 256,
          "type": "string"
        },
        "issues": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "maxLength": 128,
                "type": "string"
              },
              "message": {
                "maxLength": 1024,
                "type": "string"
              },
              "path": {
                "maxLength": 512,
                "type": "string"
              }
            },
            "required": [
              "path",
              "code",
              "message"
            ],
            "type": "object"
          },
          "maxItems": 100,
          "type": "array"
        },
        "message": {
          "maxLength": 1024,
          "minLength": 1,
          "type": "string"
        },
        "retryable": {
          "type": "boolean"
        },
        "studioUrl": {
          "maxLength": 2048,
          "type": "string"
        }
      },
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "type": "object"
    }
  ],
  "title": "campaign_review_draft output",
  "type": "object"
}
