{
  "openapi": "3.1.0",
  "info": {
    "title": "金门六合彩系统 · 公开核验数据接口",
    "version": "3.3.6",
    "description": "只读静态公开数据接口，无需登录，不提供后台或未公开号码。记录保留来源、补生成标识和真实时间；GitHub/OTS 为可选接入，以逐期实际状态为准。本地回执不等于独立区块链时间证明。 Collector routes use public static files only. Use unconditional GET; errors may be HTML. No credentials, CORS guarantee, pagination or unpublished numbers."
  },
  "servers": [
    {
      "url": "https://kinmen6.com",
      "description": "Primary public static site"
    },
    {
      "url": "https://jinmen6.com",
      "description": "Backup public static site"
    }
  ],
  "paths": {
    "/public/latest.json": {
      "get": {
        "summary": "读取最新已公开状态",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "公开材料；未到公开时刻不会提供未揭晓数据",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/State"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request. Production Nginx error bodies may be HTML, not JSON."
          },
          "404": {
            "description": "Not published or not found. Production Nginx error bodies may be HTML, not JSON."
          },
          "405": {
            "description": "Method not allowed; use GET or HEAD. Production Nginx error bodies may be HTML, not JSON."
          },
          "503": {
            "description": "Temporary server failure. Production Nginx error bodies may be HTML, not JSON."
          }
        }
      },
      "head": {
        "summary": "Read public file headers",
        "security": [],
        "responses": {
          "200": {
            "description": "Headers only"
          },
          "404": {
            "description": "Not published or not found"
          }
        }
      }
    },
    "/public/commits/{commit}.json": {
      "get": {
        "summary": "读取固定公开提交材料",
        "security": [],
        "parameters": [
          {
            "name": "commit",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-f0-9]{40,64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "公开材料；未到公开时刻不会提供未揭晓数据",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Commit"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request. Production Nginx error bodies may be HTML, not JSON."
          },
          "404": {
            "description": "Not published or not found. Production Nginx error bodies may be HTML, not JSON."
          },
          "405": {
            "description": "Method not allowed; use GET or HEAD. Production Nginx error bodies may be HTML, not JSON."
          },
          "503": {
            "description": "Temporary server failure. Production Nginx error bodies may be HTML, not JSON."
          }
        }
      },
      "head": {
        "summary": "Read public file headers",
        "security": [],
        "responses": {
          "200": {
            "description": "Headers only"
          },
          "404": {
            "description": "Not published or not found"
          }
        }
      }
    },
    "/public/receipts/{issue}/{phase}.json": {
      "get": {
        "summary": "下载本地公开时间回执",
        "security": [],
        "parameters": [
          {
            "name": "issue",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(?:[0-9]{4}-[0-9]{3}|[0-9]{3,})$"
            }
          },
          {
            "name": "phase",
            "in": "path",
            "required": true,
            "schema": {
              "enum": [
                "precommit",
                "revealed"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "公开材料；未到公开时刻不会提供未揭晓数据",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                }
              }
            }
          },
          "400": {
            "description": "Malformed request. Production Nginx error bodies may be HTML, not JSON."
          },
          "404": {
            "description": "Not published or not found. Production Nginx error bodies may be HTML, not JSON."
          },
          "405": {
            "description": "Method not allowed; use GET or HEAD. Production Nginx error bodies may be HTML, not JSON."
          },
          "503": {
            "description": "Temporary server failure. Production Nginx error bodies may be HTML, not JSON."
          }
        }
      },
      "head": {
        "summary": "Read public file headers",
        "security": [],
        "responses": {
          "200": {
            "description": "Headers only"
          },
          "404": {
            "description": "Not published or not found"
          }
        }
      }
    },
    "/assets/demo-history.json": {
      "get": {
        "summary": "读取打包的历史基线",
        "description": "打包时导出的历史基线，包含2020-01-01起已经公开的历史材料；新日期通过私有服务增量补齐，不包含当期待开奖秘密。补齐与完整运行记录通过isHistoricalDemo和precommitted区分。",
        "responses": {
          "200": {
            "description": "历史样本及完整公开核验输入",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoryArchive"
                }
              }
            }
          }
        }
      },
      "head": {
        "summary": "Read public file headers",
        "security": [],
        "responses": {
          "200": {
            "description": "Headers only"
          },
          "404": {
            "description": "Not published or not found"
          }
        }
      }
    },
    "/public/history.json": {
      "get": {
        "summary": "读取已公开年度历史归档",
        "description": "静态公开归档，包含已结束日期试运行材料和已完整揭晓的运行记录；不包含待开奖秘密。按archiveVersion变化获取，失败可回退打包基线。",
        "responses": {
          "200": {
            "description": "CLASSROOM-HISTORY-1，archiveVersion、count、startDate、endDate、issues",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoryArchive"
                }
              }
            }
          },
          "404": {
            "description": "Not published or not found. Production Nginx error bodies may be HTML, not JSON."
          },
          "503": {
            "description": "Temporary server failure. Production Nginx error bodies may be HTML, not JSON."
          }
        }
      },
      "head": {
        "summary": "Read public file headers",
        "security": [],
        "responses": {
          "200": {
            "description": "Headers only"
          },
          "404": {
            "description": "Not published or not found"
          }
        }
      }
    },
    "/public/feeds/results.json": {
      "get": {
        "summary": "最近最多50期完整公开运行结果，包含明确标记的当天补生成结果；全量历史另见 history.json",
        "security": [],
        "responses": {
          "200": {
            "description": "仅含公开系统资料",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultsFeed"
                }
              }
            }
          },
          "404": {
            "description": "Not published or not found. Production Nginx error bodies may be HTML, not JSON."
          },
          "405": {
            "description": "Method not allowed; use GET or HEAD. Production Nginx error bodies may be HTML, not JSON."
          }
        }
      },
      "head": {
        "summary": "Read public file headers",
        "security": [],
        "responses": {
          "200": {
            "description": "Headers only"
          },
          "404": {
            "description": "Not published or not found"
          }
        }
      }
    },
    "/public/feeds/events.json": {
      "get": {
        "summary": "当天承诺与完整揭晓事件，附公开版本号",
        "security": [],
        "responses": {
          "200": {
            "description": "仅含公开系统资料",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Not published or not found. Production Nginx error bodies may be HTML, not JSON."
          },
          "405": {
            "description": "Method not allowed; use GET or HEAD. Production Nginx error bodies may be HTML, not JSON."
          }
        }
      },
      "head": {
        "summary": "Read public file headers",
        "security": [],
        "responses": {
          "200": {
            "description": "Headers only"
          },
          "404": {
            "description": "Not published or not found"
          }
        }
      }
    },
    "/public/feeds/results.xml": {
      "get": {
        "summary": "开奖结果RSS 2.0，稳定GUID",
        "security": [],
        "responses": {
          "200": {
            "description": "仅含公开系统资料",
            "content": {
              "application/rss+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Not published or not found. Production Nginx error bodies may be HTML, not JSON."
          },
          "405": {
            "description": "Method not allowed; use GET or HEAD. Production Nginx error bodies may be HTML, not JSON."
          }
        }
      },
      "head": {
        "summary": "Read public file headers",
        "security": [],
        "responses": {
          "200": {
            "description": "Headers only"
          },
          "404": {
            "description": "Not published or not found"
          }
        }
      }
    },
    "/public/feeds/issues/{issue}.json": {
      "get": {
        "summary": "完整结果固定记录，年度期号",
        "security": [],
        "responses": {
          "200": {
            "description": "仅含公开系统资料",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Not published or not found. Production Nginx error bodies may be HTML, not JSON."
          },
          "405": {
            "description": "Method not allowed; use GET or HEAD. Production Nginx error bodies may be HTML, not JSON."
          }
        },
        "parameters": [
          {
            "name": "issue",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{4}-[0-9]{3}$"
            },
            "description": "如2026-285；跨年不复用"
          }
        ]
      },
      "head": {
        "summary": "Read public file headers",
        "security": [],
        "responses": {
          "200": {
            "description": "Headers only"
          },
          "404": {
            "description": "Not published or not found"
          }
        }
      }
    },
    "/public/collector/live.json": {
      "get": {
        "summary": "Collector: 读取最新已公开状态",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "公开材料；未到公开时刻不会提供未揭晓数据",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/State"
                }
              }
            }
          },
          "404": {
            "description": "Not published or not found. Production Nginx error bodies may be HTML, not JSON."
          },
          "405": {
            "description": "Method not allowed; use GET or HEAD. Production Nginx error bodies may be HTML, not JSON."
          },
          "429": {
            "description": "Collector rate limit exceeded; back off before retrying. Production Nginx error bodies may be HTML, not JSON."
          },
          "503": {
            "description": "Temporary server failure. Production Nginx error bodies may be HTML, not JSON."
          }
        },
        "description": "Already-disclosed balls only. Use currentDay.id, liveDraw.numbers and the matching issues record. A final result in live need not wait for results."
      },
      "head": {
        "summary": "Read headers only",
        "security": [],
        "responses": {
          "200": {
            "description": "Headers for the current public file"
          },
          "429": {
            "description": "Collector rate limit exceeded"
          }
        }
      }
    },
    "/public/collector/results.json": {
      "get": {
        "summary": "Collector: 最近最多50期完整公开运行结果，包含明确标记的当天补生成结果；全量历史另见 history.json",
        "security": [],
        "responses": {
          "200": {
            "description": "仅含公开系统资料",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResultsFeed"
                }
              }
            }
          },
          "404": {
            "description": "Not published or not found. Production Nginx error bodies may be HTML, not JSON."
          },
          "405": {
            "description": "Method not allowed; use GET or HEAD. Production Nginx error bodies may be HTML, not JSON."
          },
          "429": {
            "description": "Collector rate limit exceeded; back off before retrying. Production Nginx error bodies may be HTML, not JSON."
          },
          "503": {
            "description": "Temporary server failure. Production Nginx error bodies may be HTML, not JSON."
          }
        },
        "description": "Up to 50 eligible completed records, not all history. currentResult is today or null; latest may be older. expectedUpdateAt may be null; use live for freshness."
      },
      "head": {
        "summary": "Read headers only",
        "security": [],
        "responses": {
          "200": {
            "description": "Headers for the current public file"
          },
          "429": {
            "description": "Collector rate limit exceeded"
          }
        }
      }
    },
    "/public/collector/history.json": {
      "get": {
        "summary": "Collector: 读取已公开年度历史归档",
        "description": "Full public history. Save archiveVersion and fetch again only when live.historyVersion changes. No query parameters or pagination.",
        "responses": {
          "200": {
            "description": "CLASSROOM-HISTORY-1，archiveVersion、count、startDate、endDate、issues",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoryArchive"
                }
              }
            }
          },
          "404": {
            "description": "Not published or not found. Production Nginx error bodies may be HTML, not JSON."
          },
          "405": {
            "description": "Method not allowed; use GET or HEAD. Production Nginx error bodies may be HTML, not JSON."
          },
          "429": {
            "description": "Collector rate limit exceeded; back off before retrying. Production Nginx error bodies may be HTML, not JSON."
          },
          "503": {
            "description": "Temporary server failure. Production Nginx error bodies may be HTML, not JSON."
          }
        }
      },
      "head": {
        "summary": "Read headers only",
        "security": [],
        "responses": {
          "200": {
            "description": "Headers for the current public file"
          },
          "429": {
            "description": "Collector rate limit exceeded"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      },
      "Evidence": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "precommit": {
            "type": "string"
          },
          "preRecordedAt": {
            "type": "string"
          },
          "receipt": {
            "type": "string"
          },
          "revealed": {
            "type": "string"
          },
          "revealedRecordedAt": {
            "type": "string"
          }
        }
      },
      "PendingDraw": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^(?:[0-9]{4}-[0-9]{3}|[0-9]{3,})$"
          },
          "commitment": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "seed": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "revealAt": {
            "type": "integer",
            "minimum": 0
          },
          "closeAt": {
            "type": "integer",
            "minimum": 0
          },
          "phase": {
            "enum": [
              "preparing",
              "open",
              "closed",
              "drawing"
            ]
          },
          "evidence": {
            "$ref": "#/components/schemas/Evidence"
          },
          "drawDate": {
            "type": "string",
            "format": "date"
          },
          "year": {
            "type": "integer"
          },
          "issueNumber": {
            "type": "string",
            "pattern": "^[0-9]{3}$"
          },
          "publicationAt": {
            "type": "integer"
          },
          "latePublication": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "commitment",
          "phase"
        ]
      },
      "PrecommitRecord": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^(?:[0-9]{4}-[0-9]{3}|[0-9]{3,})$"
          },
          "commitment": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "seed": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "commitAlgorithm": {
            "type": "string"
          },
          "drawDate": {
            "type": "string",
            "format": "date"
          },
          "year": {
            "type": "integer"
          },
          "issueNumber": {
            "type": "string",
            "pattern": "^[0-9]{3}$"
          }
        },
        "required": [
          "id",
          "commitment"
        ]
      },
      "Receipt": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "format": {
            "const": "CLASSROOM-LOCAL-RECEIPT-1"
          },
          "isOpenTimestamps": {
            "const": false
          },
          "trust": {
            "type": "string"
          },
          "issue": {
            "type": "string",
            "pattern": "^(?:[0-9]{4}-[0-9]{3}|[0-9]{3,})$"
          },
          "phase": {
            "enum": [
              "precommit",
              "revealed"
            ]
          },
          "recordSha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "recordedAt": {
            "type": "string",
            "format": "date-time"
          },
          "gitCommit": {
            "type": "string"
          }
        },
        "required": [
          "format",
          "isOpenTimestamps",
          "issue",
          "phase",
          "recordSha256",
          "recordedAt",
          "gitCommit"
        ]
      },
      "RevealedRecord": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^(?:[0-9]{4}-[0-9]{3}|[0-9]{3,})$"
          },
          "commitment": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "seed": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "salt": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "密码学盲盒因子，仅在全部号码正式揭晓后公开"
          },
          "numbers": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 49
            },
            "minItems": 6,
            "maxItems": 6,
            "uniqueItems": true
          },
          "special": {
            "type": "integer",
            "minimum": 1,
            "maximum": 49
          },
          "commitAlgorithm": {
            "type": "string"
          },
          "revealedAt": {
            "type": "string",
            "format": "date-time"
          },
          "drawingStartedAt": {
            "type": "integer",
            "minimum": 0
          },
          "displayedAt": {
            "type": "string",
            "format": "date-time"
          },
          "releaseTrigger": {
            "type": "string"
          },
          "scheduledRevealAt": {
            "type": "integer",
            "minimum": 0,
            "description": "计划开奖时间，Unix毫秒；恢复后不覆盖，实际开始基准另见drawingStartedAt。旧期可能缺失。"
          },
          "drawDate": {
            "type": "string",
            "format": "date"
          },
          "year": {
            "type": "integer"
          },
          "issueNumber": {
            "type": "string",
            "pattern": "^[0-9]{3}$"
          }
        },
        "required": [
          "id",
          "commitment",
          "seed",
          "salt",
          "numbers",
          "special",
          "revealedAt"
        ]
      },
      "Issue": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^(?:[0-9]{4}-[0-9]{3}|[0-9]{3,})$"
          },
          "commitment": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "seed": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "salt": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "密码学盲盒因子，仅在全部号码正式揭晓后公开"
          },
          "numbers": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 49
            },
            "minItems": 6,
            "maxItems": 6,
            "uniqueItems": true
          },
          "special": {
            "type": "integer",
            "minimum": 1,
            "maximum": 49
          },
          "commitAlgorithm": {
            "type": "string"
          },
          "revealedAt": {
            "type": "string",
            "format": "date-time"
          },
          "drawingStartedAt": {
            "type": "integer",
            "minimum": 0
          },
          "time": {
            "type": "string"
          },
          "precommitted": {
            "type": "boolean"
          },
          "evidenceStatus": {
            "enum": [
              "recording",
              "recorded",
              "retrying"
            ]
          },
          "evidence": {
            "$ref": "#/components/schemas/Evidence"
          },
          "scheduledRevealAt": {
            "type": "integer",
            "minimum": 0,
            "description": "计划开奖时间，Unix毫秒；恢复后不覆盖，实际开始基准另见drawingStartedAt。旧期可能缺失。"
          },
          "drawDate": {
            "type": "string",
            "format": "date"
          },
          "year": {
            "type": "integer"
          },
          "issueNumber": {
            "type": "string",
            "pattern": "^[0-9]{3}$"
          }
        },
        "required": [
          "id",
          "commitment",
          "seed",
          "salt",
          "numbers",
          "special",
          "revealedAt"
        ]
      },
      "LiveDraw": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^(?:[0-9]{4}-[0-9]{3}|[0-9]{3,})$"
          },
          "commitment": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "seed": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "revealAt": {
            "type": "integer",
            "minimum": 0
          },
          "closeAt": {
            "type": "integer",
            "minimum": 0
          },
          "phase": {
            "enum": [
              "preparing",
              "open",
              "closed",
              "drawing"
            ]
          },
          "evidence": {
            "$ref": "#/components/schemas/Evidence"
          },
          "startedAt": {
            "type": "integer",
            "minimum": 0
          },
          "numbers": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 49
            },
            "minItems": 0,
            "maxItems": 6,
            "uniqueItems": true
          },
          "special": {
            "type": "null"
          },
          "nextBallAt": {
            "type": "integer",
            "minimum": 0
          },
          "completeAt": {
            "type": "integer",
            "minimum": 0
          },
          "drawDate": {
            "type": "string",
            "format": "date"
          },
          "year": {
            "type": "integer"
          },
          "issueNumber": {
            "type": "string",
            "pattern": "^[0-9]{3}$"
          },
          "publicationAt": {
            "type": "integer"
          },
          "latePublication": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "commitment",
          "numbers",
          "special",
          "startedAt",
          "nextBallAt",
          "completeAt"
        ]
      },
      "State": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "sequence": {
            "type": "integer",
            "minimum": 0
          },
          "ballMs": {
            "type": "integer",
            "minimum": 0
          },
          "specialMs": {
            "type": "integer",
            "minimum": 0
          },
          "serverNow": {
            "type": "integer",
            "minimum": 0
          },
          "publicationVersion": {
            "type": "integer",
            "minimum": 0
          },
          "expectedUpdateAt": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "type": "string"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "pendingDraw": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PendingDraw"
              },
              {
                "type": "null"
              }
            ]
          },
          "liveDraw": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LiveDraw"
              },
              {
                "type": "null"
              }
            ]
          },
          "issues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Issue"
            }
          },
          "schedule": {
            "const": "BEIJING-DAILY-1"
          },
          "currentDay": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "number": {
                "type": "string"
              },
              "year": {
                "type": "integer"
              },
              "date": {
                "type": "string",
                "format": "date"
              },
              "startAt": {
                "type": "integer"
              },
              "publishAt": {
                "type": "integer"
              },
              "closeAt": {
                "type": "integer"
              },
              "revealAt": {
                "type": "integer"
              },
              "endAt": {
                "type": "integer"
              },
              "skipped": {
                "type": "boolean"
              }
            }
          },
          "nextPublicationAt": {
            "type": "integer"
          },
          "nextTransitionAt": {
            "type": "integer"
          },
          "historyVersion": {
            "type": "string",
            "description": "公开年度归档版本；变化后刷新/public/history.json"
          }
        },
        "required": [
          "sequence",
          "status",
          "pendingDraw",
          "liveDraw",
          "issues",
          "publicationVersion",
          "publishedAt",
          "expectedUpdateAt"
        ]
      },
      "CommitEntry": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "issue": {
            "type": "string",
            "pattern": "^(?:[0-9]{4}-[0-9]{3}|[0-9]{3,})$"
          },
          "phase": {
            "enum": [
              "precommit",
              "revealed"
            ]
          },
          "record": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/PrecommitRecord"
              },
              {
                "$ref": "#/components/schemas/RevealedRecord"
              }
            ]
          },
          "receipt": {
            "$ref": "#/components/schemas/Receipt"
          },
          "commit": {
            "type": "string"
          },
          "previousHash": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "entryHash": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "issue",
          "phase",
          "record",
          "receipt",
          "commit"
        ]
      },
      "Commit": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "entry": {
            "$ref": "#/components/schemas/CommitEntry"
          },
          "content": {
            "type": "string"
          },
          "parent": {
            "type": "string"
          }
        },
        "required": [
          "entry",
          "content",
          "parent"
        ]
      },
      "HistoryArchive": {
        "type": "object",
        "required": [
          "format",
          "archiveVersion",
          "count",
          "startDate",
          "endDate",
          "issues"
        ],
        "properties": {
          "format": {
            "type": "string",
            "enum": [
              "CLASSROOM-HISTORY-1"
            ]
          },
          "archiveVersion": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "drawDate",
                "commitment",
                "seed",
                "salt",
                "numbers",
                "special",
                "revealedAt"
              ],
              "description": "完整公开核验材料。isHistoricalDemo=true表示补齐记录；此类记录precommitted=false、evidence为空，generatedAt保留实际生成时间。真实完整运行记录保留实际存证字段。"
            }
          }
        }
      },
      "ResultsFeed": {
        "type": "object",
        "required": [
          "format",
          "publicationVersion",
          "publishedAt",
          "timezone",
          "currentDay",
          "currentResult",
          "latestIsCurrent",
          "latest",
          "items"
        ],
        "properties": {
          "format": {
            "type": "string",
            "const": "KINMEN-PUBLIC-FEED-1"
          },
          "publicationVersion": {
            "type": "integer"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time"
          },
          "timezone": {
            "type": "string",
            "const": "Asia/Shanghai"
          },
          "currentDay": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "date": {
                "type": "string",
                "format": "date"
              },
              "phase": {
                "type": "string",
                "enum": [
                  "awaiting",
                  "committed",
                  "drawing",
                  "completed",
                  "skipped"
                ]
              }
            }
          },
          "currentResult": {
            "type": [
              "object",
              "null"
            ],
            "description": "仅在公开快照当天已有完整结果时返回；否则 null。不是昨日结果。"
          },
          "latest": {
            "type": [
              "object",
              "null"
            ],
            "description": "最近完整运行结果，可能属于昨日；补生成结果含 backfilled:true、precommitted:false、generatedAt。"
          },
          "latestIsCurrent": {
            "type": "boolean"
          },
          "expectedUpdateAt": {
            "type": [
              "integer",
              "null"
            ],
            "description": "下一次预期状态更新时间，Unix 毫秒；不保证固定抓取延迟。"
          },
          "suggestedPollIntervalMs": {
            "type": "integer",
            "const": 2000
          },
          "items": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "object"
            }
          },
          "simulation": {
            "type": "boolean",
            "description": "保留既有系统数据来源标记，不冒称其他官方彩票结果。"
          }
        }
      }
    }
  }
}
