{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hireeli-io/json-schema/hireeli-io-onsite-proposal-response-schema.json",
  "title": "OnsiteProposalResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hireeli-io-openapi.json#/components/schemas/OnsiteProposalResponse",
  "type": "object",
  "required": [
    "decision",
    "resourceId",
    "status",
    "prepared",
    "selected",
    "approvalRequired",
    "nextAction",
    "changedByThisRequest"
  ],
  "properties": {
    "decision": {
      "type": "string",
      "enum": [
        "prepare"
      ]
    },
    "resourceId": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "ready",
        "no_match",
        "connection_required"
      ]
    },
    "prepared": {
      "type": "boolean"
    },
    "selected": {
      "type": "object",
      "required": [
        "changeId",
        "promptId",
        "pageUrl",
        "reused",
        "workflowStatus",
        "applicationMode"
      ],
      "properties": {
        "changeId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "promptId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "pageUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "reused": {
          "type": "boolean"
        },
        "workflowStatus": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "draft",
            "approved",
            "applying",
            "reverting"
          ]
        },
        "applicationMode": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "native_wordpress",
            "manual_cms_handoff"
          ]
        }
      },
      "additionalProperties": false
    },
    "previewEndpoint": {
      "type": [
        "string",
        "null"
      ]
    },
    "decisionEndpoint": {
      "type": [
        "string",
        "null"
      ]
    },
    "approvalRequired": {
      "type": "boolean"
    },
    "nextAction": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "approve",
        "apply",
        "publish_handoff_then_verify",
        "wait"
      ]
    },
    "nextActionHint": {
      "type": [
        "string",
        "null"
      ]
    },
    "changedByThisRequest": {
      "type": "boolean",
      "enum": [
        false
      ]
    },
    "caps": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": true
    },
    "audit_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    }
  },
  "additionalProperties": false
}