{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/buildworkpro-com/json-schema/buildworkpro-com-job-schema.json",
  "title": "Job",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/buildworkpro-com-jobs-api-openapi.yml#/components/schemas/Job",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "resourceType": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "progress": {
      "$ref": "#/$defs/JobProgress"
    },
    "params": {},
    "result": {},
    "errorMessage": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "string"
        }
      ]
    },
    "startedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "completedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "expiresAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "string"
        }
      ]
    }
  },
  "required": [
    "id",
    "type",
    "resourceType",
    "status",
    "createdAt",
    "expiresAt"
  ],
  "$defs": {
    "JobProgress": {
      "type": "object",
      "properties": {
        "processed": {
          "type": "integer"
        },
        "total": {
          "type": "integer"
        },
        "errorsCount": {
          "type": "integer"
        }
      },
      "required": [
        "processed",
        "total",
        "errorsCount"
      ]
    }
  }
}