{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/comp-ai/json-schema/comp-ai-trigger-auto-answer-response-dto-schema.json",
  "title": "TriggerAutoAnswerResponseDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/comp-ai-questionnaire-api-openapi.yml#/components/schemas/TriggerAutoAnswerResponseDto",
  "type": "object",
  "properties": {
    "questionnaireId": {
      "type": "string",
      "description": "The questionnaire whose answers are being generated."
    },
    "runId": {
      "type": "string",
      "description": "Background run identifier for the generation job (Trigger.dev run id)."
    },
    "publicAccessToken": {
      "type": "string",
      "description": "Token for tracking the run via Trigger.dev realtime. Optional — MCP/agent clients should poll GET /v1/questionnaire/:id instead."
    },
    "status": {
      "type": "string",
      "description": "Always 'generating' on a successful trigger. Poll GET /v1/questionnaire/:id; answers are ready once answeredQuestions equals totalQuestions."
    },
    "totalQuestions": {
      "type": "number",
      "description": "Total number of questions in the questionnaire."
    },
    "answeredQuestions": {
      "type": "number",
      "description": "Questions already answered at the moment generation was triggered (answers without a value are (re)generated)."
    },
    "message": {
      "type": "string",
      "description": "Human-readable summary of what to do next."
    }
  },
  "required": [
    "questionnaireId",
    "runId",
    "publicAccessToken",
    "status",
    "totalQuestions",
    "answeredQuestions",
    "message"
  ]
}