{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.elimi.africa/contracts/events/application.stage_changed.v1.json",
  "title": "application.stage_changed data",
  "description": "data payload for application.stage_changed. Emitted by CAP when the workflow engine advances a stage.",
  "type": "object",
  "additionalProperties": false,
  "required": ["applicationId", "fromStage", "toStage", "outcome"],
  "properties": {
    "applicationId": {
      "type": "string"
    },
    "fromStage": {
      "type": "string"
    },
    "toStage": {
      "type": "string"
    },
    "outcome": {
      "type": "string",
      "description": "Stage history outcome (e.g. approved, rejected, pending)"
    }
  }
}
