{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"MCLadder public match webhook v1","description":"Latest committed public state, not an audit of every transition. At-least-once delivery; deduplicate id and apply only newer numeric-string revision per matchId. Removed events contain no participant data. PublicMatch uses the anonymous developer API v1 Match DTO.","type":"object","additionalProperties":false,"required":["id","type","revision","occurredAt","matchId","data"],"properties":{"id":{"type":"string","format":"uuid"},"type":{"enum":["match.published","match.updated","match.removed"]},"revision":{"type":"string","pattern":"^[1-9][0-9]{0,18}$","description":"PostgreSQL positive BIGINT sequence, compare as BigInt, not a floating-point number. Gaps are normal."},"occurredAt":{"type":"string","format":"date-time"},"matchId":{"type":"string","format":"uuid"},"data":{"anyOf":[{"$ref":"#/$defs/PublicMatch"},{"type":"null"}]}},"oneOf":[{"properties":{"type":{"enum":["match.published","match.updated"]},"data":{"$ref":"#/$defs/PublicMatch"}}},{"properties":{"type":{"const":"match.removed"},"data":{"type":"null"}}}],"$defs":{"PublicMatch":{"type":"object","additionalProperties":false,"required":["id","shortId","mode","map","seasonId","startedAt","endedAt","durationSeconds","condition","participants"],"properties":{"id":{"type":["string","null"]},"shortId":{"type":["string","null"]},"mode":{"enum":["solo","duo",null]},"map":{"type":["string","null"]},"seasonId":{"type":["number","null"]},"startedAt":{"type":["string","null"],"format":"date-time"},"endedAt":{"type":["string","null"],"format":"date-time"},"durationSeconds":{"type":["number","null"]},"condition":{"type":["string","null"]},"participants":{"type":"array","items":{"$ref":"#/$defs/Participant"}}}},"Participant":{"type":"object","additionalProperties":false,"required":["uuid","name","result","ratingRevealed","eloBefore","eloAfter"],"properties":{"country":{"type":["string","null"]},"uuid":{"type":["string","null"]},"name":{"type":["string","null"]},"result":{"enum":["WIN","LOSS","DRAW","VOID",null]},"ratingRevealed":{"type":"boolean"},"eloBefore":{"type":["number","null"]},"eloAfter":{"type":["number","null"]}}}}}