{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flashdata-dev/json-schema/flashdata-dev-console-job-schema.json",
  "title": "ConsoleJob",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flashdata-dev-jobs-api-openapi.yml#/components/schemas/ConsoleJob",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "createdAt",
    "credits",
    "durationMs",
    "error",
    "id",
    "params",
    "progress",
    "result",
    "source",
    "status",
    "updatedAt",
    "videoId"
  ],
  "properties": {
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "credits": {
      "type": "number",
      "multipleOf": 0.001
    },
    "durationMs": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "error": {
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "type": "string"
    },
    "params": {
      "type": "object",
      "additionalProperties": true
    },
    "progress": {
      "type": "integer",
      "minimum": 0
    },
    "result": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": true
    },
    "source": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "completed",
        "failed",
        "pending",
        "processing"
      ]
    },
    "updatedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "videoId": {
      "type": [
        "string",
        "null"
      ]
    },
    "links": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/JobLink"
      }
    }
  },
  "$defs": {
    "JobLink": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "rel",
        "href",
        "method"
      ],
      "properties": {
        "rel": {
          "type": "string",
          "enum": [
            "self",
            "results",
            "content",
            "download"
          ]
        },
        "href": {
          "type": "string",
          "format": "uri"
        },
        "method": {
          "type": "string",
          "const": "GET"
        },
        "expires_at": {
          "type": "string",
          "format": "date-time"
        },
        "filename": {
          "type": "string"
        },
        "content_type": {
          "type": "string"
        },
        "size_bytes": {
          "type": "integer",
          "minimum": 1
        }
      }
    }
  }
}