{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tubearchivist/json-schema/tubearchivist-download-item-schema.json",
  "title": "DownloadItem",
  "description": "serialize download item",
  "x-generated": "2026-10-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tubearchivist-openapi.yml#/components/schemas/DownloadItem",
  "type": "object",
  "properties": {
    "auto_start": {
      "type": "boolean"
    },
    "channel_id": {
      "type": "string"
    },
    "channel_indexed": {
      "type": "boolean"
    },
    "channel_name": {
      "type": "string"
    },
    "duration": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "published": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "$ref": "#/$defs/DownloadItemStatusEnum"
    },
    "timestamp": {
      "type": [
        "integer",
        "null"
      ]
    },
    "title": {
      "type": "string"
    },
    "vid_thumb_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "vid_type": {
      "$ref": "#/$defs/DownloadItemVidTypeEnum"
    },
    "youtube_id": {
      "type": "string"
    },
    "_index": {
      "type": "string",
      "title": " index"
    },
    "_score": {
      "type": "integer",
      "title": " score"
    }
  },
  "required": [
    "channel_id",
    "channel_indexed",
    "channel_name",
    "duration",
    "published",
    "timestamp",
    "title",
    "vid_thumb_url",
    "vid_type",
    "youtube_id"
  ],
  "$defs": {
    "DownloadItemStatusEnum": {
      "enum": [
        "pending",
        "ignore"
      ],
      "type": "string",
      "description": "* `pending` - pending\n* `ignore` - ignore"
    },
    "DownloadItemVidTypeEnum": {
      "enum": [
        "videos",
        "streams",
        "shorts",
        "unknown"
      ],
      "type": "string",
      "description": "* `videos` - videos\n* `streams` - streams\n* `shorts` - shorts\n* `unknown` - unknown"
    }
  }
}