{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/damdafa-com/json-schema/damdafa-com-render-job-schema.json",
  "title": "RenderJob",
  "description": "Validation schema for reading RenderJob from Firestore (with ID).",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mockupper-damdafa-com-openapi.json#/components/schemas/RenderJob",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "userId": {
      "type": "string",
      "title": "Userid"
    },
    "projectId": {
      "type": "string",
      "title": "Projectid"
    },
    "versionId": {
      "type": "string",
      "title": "Versionid"
    },
    "groupId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Groupid"
    },
    "screenIds": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Screenids"
    },
    "batchId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Batchid"
    },
    "assetsPath": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Assetspath"
    },
    "locales": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Locales"
    },
    "platforms": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/Platform"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Platforms"
    },
    "generationId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Generationid"
    },
    "quality": {
      "anyOf": [
        {
          "$ref": "#/$defs/GenerationQuality"
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "processing",
        "completed",
        "failed"
      ],
      "title": "Status"
    },
    "resultUrl": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Resulturl"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error"
    },
    "errorCode": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "internal_error",
            "unauthorized",
            "forbidden",
            "authentication_failed",
            "access_denied",
            "not_found",
            "conflict",
            "job_in_progress",
            "rate_limit_exceeded",
            "validation_error",
            "quota_exceeded",
            "premium_required",
            "insufficient_balance",
            "timeout",
            "service_unavailable",
            "external_service_error",
            "auth_required",
            "invalid_token",
            "auth_failed",
            "auth_or_device_required",
            "verification_failed",
            "signature_content_mismatch",
            "cancelled",
            "email_not_verified"
          ]
        },
        {
          "type": "string",
          "const": "canvas_url_not_found"
        },
        {
          "type": "null"
        }
      ],
      "title": "Errorcode"
    },
    "warning": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Warning"
    },
    "progress": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Progress"
    },
    "failedTargets": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/RenderJobFailedTarget"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Failedtargets"
    },
    "createdAt": {
      "title": "Createdat"
    },
    "updatedAt": {
      "title": "Updatedat"
    }
  },
  "type": "object",
  "required": [
    "id",
    "userId",
    "projectId",
    "versionId",
    "status",
    "createdAt",
    "updatedAt"
  ],
  "$defs": {
    "GenerationQuality": {
      "type": "string",
      "enum": [
        "draft",
        "standard",
        "pro"
      ],
      "title": "GenerationQuality"
    },
    "Platform": {
      "type": "string",
      "enum": [
        "iphone",
        "ipad",
        "androidPhone",
        "androidTablet"
      ],
      "title": "Platform"
    },
    "RenderJobFailedTarget": {
      "properties": {
        "locale": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Locale"
        },
        "screenId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Screenid"
        },
        "platform": {
          "anyOf": [
            {
              "$ref": "#/$defs/Platform"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "title": "RenderJobFailedTarget"
    }
  }
}