{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/akeda-ru/json-schema/akeda-ru-chat-forwarded-attachment-schema.json",
  "title": "ChatForwardedAttachment",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/akeda-ru-chat-api-openapi.yml#/components/schemas/ChatForwardedAttachment",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "conversation_id",
    "message_id",
    "original_name",
    "content_type",
    "size_bytes",
    "sha256_hex",
    "media_kind",
    "duration_ms",
    "waveform",
    "status",
    "scan_status",
    "created_at",
    "content_url"
  ],
  "properties": {
    "id": {
      "$ref": "#/$defs/UUID"
    },
    "conversation_id": {
      "$ref": "#/$defs/UUID"
    },
    "message_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "original_name": {
      "type": "string"
    },
    "content_type": {
      "type": "string"
    },
    "size_bytes": {
      "type": "integer",
      "format": "int64",
      "minimum": 1
    },
    "sha256_hex": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "media_kind": {
      "type": "string",
      "enum": [
        "voice",
        "video_circle",
        "image",
        "video",
        "file"
      ]
    },
    "duration_ms": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int64",
      "minimum": 0,
      "maximum": 600000
    },
    "waveform": {
      "type": "array",
      "maxItems": 64,
      "items": {
        "type": "integer",
        "minimum": 0,
        "maximum": 1000
      }
    },
    "status": {
      "type": "string",
      "enum": [
        "quarantined",
        "ready",
        "failed",
        "deleted"
      ]
    },
    "scan_status": {
      "type": "string",
      "enum": [
        "pending",
        "clean",
        "infected",
        "unavailable",
        "skipped"
      ]
    },
    "scan_error_code": {
      "type": "string"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "content_url": {
      "type": "string"
    }
  },
  "$defs": {
    "UUID": {
      "type": "string",
      "format": "uuid"
    }
  }
}