{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "vclaw-video-core/video/artifacts/execution-report",
  "type": "object",
  "required": [
    "projectSlug",
    "productionMode",
    "operationKind",
    "routeId",
    "status",
    "dryRun",
    "generatedAt",
    "blockers",
    "executedSteps"
  ],
  "properties": {
    "projectSlug": {
      "type": "string"
    },
    "productionMode": {
      "type": "string",
      "enum": [
        "storyboard",
        "director"
      ]
    },
    "operationKind": {
      "type": "string",
      "enum": [
        "text-to-video",
        "image-to-video",
        "frames-to-video",
        "ingredients-to-video",
        "video-to-video",
        "extend",
        "edit",
        "add-audio"
      ]
    },
    "routeId": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "veo-useapi",
        "runway-useapi",
        "dreamina-useapi",
        "seedance-direct",
        "magnific-rest",
        "seedance-modelark",
        "reapi-seedance",
        null
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "dry-run-complete",
        "live-submitted",
        "blocked"
      ]
    },
    "dryRun": {
      "type": "boolean"
    },
    "generatedAt": {
      "type": "string"
    },
    "blockers": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "executedSteps": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "laneLease": {
      "type": "object",
      "required": [
        "laneId",
        "ticketId",
        "requestHash",
        "limit"
      ],
      "additionalProperties": false,
      "properties": {
        "laneId": {
          "type": "string",
          "minLength": 1
        },
        "ticketId": {
          "type": "string",
          "minLength": 1
        },
        "requestHash": {
          "type": "string",
          "minLength": 1
        },
        "limit": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "poll": {
      "description": "The last execute-status result for this report. `actualCost` is the bill as the transport stated it (VideoExecutionPollResult.actualCost), absent when it stated none.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "lastCheckedAt",
        "status",
        "issues"
      ],
      "properties": {
        "lastCheckedAt": {
          "type": "string",
          "format": "date-time"
        },
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "completed",
            "failed"
          ]
        },
        "issues": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "outputsIngested": {
          "type": "integer",
          "minimum": 0
        },
        "rawResult": {},
        "actualCost": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "currency",
            "amount"
          ],
          "properties": {
            "currency": {
              "type": "string",
              "minLength": 1
            },
            "amount": {
              "type": "number"
            }
          }
        }
      }
    }
  },
  "additionalProperties": true
}
