{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/antwork-io/json-schema/antwork-io-media-list-schema.json",
  "title": "MediaList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/antwork-io-media-api-openapi.yml#/components/schemas/MediaList",
  "type": "object",
  "required": [
    "object",
    "media",
    "nextCursor"
  ],
  "properties": {
    "object": {
      "const": "list"
    },
    "media": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Media"
      }
    },
    "nextCursor": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "$defs": {
    "Media": {
      "type": "object",
      "required": [
        "object",
        "id",
        "workspaceId",
        "url",
        "name",
        "type"
      ],
      "properties": {
        "object": {
          "const": "media"
        },
        "id": {
          "type": "string"
        },
        "workspaceId": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "description": "What `media` on a post takes."
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "image",
            "video",
            "document"
          ]
        },
        "size": {
          "type": "integer"
        },
        "durationSec": {
          "type": [
            "number",
            "null"
          ]
        },
        "uploadedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      }
    }
  }
}