{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pyload/json-schema/pyload-package-data-schema.json",
  "title": "PackageData",
  "x-generated": "2026-10-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pyload-openapi.json#/components/schemas/PackageData",
  "properties": {
    "pid": {
      "title": "Pid",
      "type": "integer"
    },
    "name": {
      "title": "Name",
      "type": "string"
    },
    "folder": {
      "title": "Folder",
      "type": "string"
    },
    "site": {
      "title": "Site",
      "type": "string"
    },
    "password": {
      "title": "Password",
      "type": "string"
    },
    "dest": {
      "title": "Dest",
      "type": "integer"
    },
    "order": {
      "title": "Order",
      "type": "integer"
    },
    "linksdone": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Linksdone"
    },
    "sizedone": {
      "anyOf": [
        {
          "format": "int64",
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Sizedone"
    },
    "sizetotal": {
      "anyOf": [
        {
          "format": "int64",
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Sizetotal"
    },
    "linkstotal": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Linkstotal"
    },
    "links": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/FileData"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Links"
    },
    "fids": {
      "anyOf": [
        {
          "items": {
            "type": "integer"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Fids"
    }
  },
  "required": [
    "pid",
    "name",
    "folder",
    "site",
    "password",
    "dest",
    "order"
  ],
  "type": "object",
  "$defs": {
    "DownloadStatus": {
      "type": "integer",
      "enum": [
        9,
        11,
        10,
        12,
        8,
        0,
        1,
        2,
        13,
        3,
        4,
        7,
        6,
        14,
        5
      ],
      "x-enum-varnames": [
        "ABORTED",
        "CUSTOM",
        "DECRYPTING",
        "DOWNLOADING",
        "FAILED",
        "FINISHED",
        "OFFLINE",
        "ONLINE",
        "PROCESSING",
        "QUEUED",
        "SKIPPED",
        "STARTING",
        "TEMPOFFLINE",
        "UNKNOWN",
        "WAITING"
      ]
    },
    "FileData": {
      "properties": {
        "fid": {
          "title": "Fid",
          "type": "integer"
        },
        "url": {
          "title": "Url",
          "type": "string"
        },
        "name": {
          "title": "Name",
          "type": "string"
        },
        "plugin": {
          "title": "Plugin",
          "type": "string"
        },
        "size": {
          "format": "int64",
          "title": "Size",
          "type": "integer"
        },
        "format_size": {
          "title": "Format Size",
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/DownloadStatus"
        },
        "statusmsg": {
          "title": "Statusmsg",
          "type": "string"
        },
        "package_id": {
          "title": "Package Id",
          "type": "integer"
        },
        "error": {
          "title": "Error",
          "type": "string"
        },
        "order": {
          "title": "Order",
          "type": "integer"
        }
      },
      "required": [
        "fid",
        "url",
        "name",
        "plugin",
        "size",
        "format_size",
        "status",
        "statusmsg",
        "package_id",
        "error",
        "order"
      ],
      "title": "FileData",
      "type": "object"
    }
  }
}