{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rendley-com/json-schema/rendley-com-types-library-upload-schema.json",
  "title": "types.LibraryUpload",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rendley-com-openapi.json#/components/schemas/types.LibraryUpload",
  "properties": {
    "created_at": {
      "type": "string"
    },
    "deduplicated": {
      "description": "Deduplicated marks a proxy-upload response that resolved to an existing\nasset with identical content instead of storing a second copy.",
      "type": "boolean"
    },
    "download_url": {
      "description": "DownloadUrl is a presigned GET that forces a browser download\n(Content-Disposition: attachment) under the original filename.\nExpires like Url.",
      "type": "string"
    },
    "duration": {
      "type": "number"
    },
    "file_hash": {
      "type": "string"
    },
    "file_size": {
      "type": "integer"
    },
    "id": {
      "type": "string"
    },
    "media_id": {
      "description": "MediaID is the upload's storage_key; clients reuse it as the editor media\nid when bridging a library asset into a project, so ids stay stable.",
      "type": "string"
    },
    "mime_type": {
      "type": "string"
    },
    "original_file_name": {
      "type": "string"
    },
    "source": {
      "type": "string"
    },
    "status": {
      "allOf": [
        {
          "$ref": "#/$defs/types.UploadStatus"
        }
      ],
      "description": "Status is set on an async import response: \"importing\"."
    },
    "tags": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "thumbnail_url": {
      "description": "ThumbnailUrl is a presigned GET for the server-generated poster (video\nfirst frame / GIF still). Empty when none exists. Expires like Url.",
      "type": "string"
    },
    "url": {
      "description": "Url is a presigned GET for the asset bytes. Expires — never persist it.",
      "type": "string"
    },
    "workspace_id": {
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "types.UploadStatus": {
      "enum": [
        "uploading",
        "importing",
        "complete",
        "failed"
      ],
      "type": "string",
      "x-enum-varnames": [
        "UploadStatusUploading",
        "UploadStatusImporting",
        "UploadStatusComplete",
        "UploadStatusFailed"
      ]
    }
  }
}