{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/post-mesh-com/json-schema/post-mesh-com-post-summary-schema.json",
  "title": "PostSummary",
  "description": "投稿の概要（一覧用）",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/post-mesh-com-openapi.json#/components/schemas/PostSummary",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "投稿 ID"
    },
    "title": {
      "type": "string",
      "description": "投稿タイトル（YouTube タイトルまたはキャプション先頭 30 文字）"
    },
    "status": {
      "$ref": "#/$defs/PostListStatus"
    },
    "category": {
      "$ref": "#/$defs/PostCategory"
    },
    "platforms": {
      "type": "array",
      "description": "プラットフォームごとのステータス",
      "items": {
        "type": "object",
        "properties": {
          "platform": {
            "$ref": "#/$defs/Platform"
          },
          "status": {
            "$ref": "#/$defs/PostListStatus"
          }
        },
        "required": [
          "platform",
          "status"
        ]
      }
    },
    "display_at": {
      "type": "string",
      "format": "date-time",
      "description": "表示日時。一覧の並び順に使う日時です。予約済みの投稿と予約日時つきの下書きでは予約日時、予約日時のない下書きでは最後に保存した日時になります。"
    }
  },
  "required": [
    "id",
    "title",
    "status",
    "category",
    "platforms",
    "display_at"
  ],
  "$defs": {
    "Platform": {
      "type": "string",
      "enum": [
        "youtube",
        "tiktok",
        "instagram",
        "threads",
        "x",
        "facebook"
      ],
      "description": "SNS プラットフォーム"
    },
    "PostCategory": {
      "type": "string",
      "enum": [
        "video",
        "image",
        "text",
        "tree"
      ],
      "description": "投稿のコンテンツ種別: video（動画）/ image（画像）/ text（テキスト）/ tree（ツリー投稿）"
    },
    "PostListStatus": {
      "type": "string",
      "enum": [
        "posted",
        "scheduled",
        "processing",
        "failed",
        "draft"
      ],
      "description": "投稿ステータス: posted（投稿済み）/ scheduled（予約済み）/ processing（処理中）/ failed（失敗）/ draft（下書き）"
    }
  }
}