Files
chat/schema/s2s/sync.json
user 065b243def docs: add JSON Schema definitions for all message types (draft 2020-12)
C2S (7): send, join, part, nick, topic, mode, ping
S2C (12): message, dm, notice, join, part, quit, nick, topic, mode, system, error, pong
S2S (6): relay, link, unlink, sync, ping, pong

Each message type has its own schema file under schema/{c2s,s2c,s2s}/.
schema/README.md provides an index of all types with descriptions.
2026-02-10 10:25:42 -08:00

70 lines
1.6 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.eeqj.de/sneak/chat/schema/s2s/sync.json",
"title": "S2S Sync",
"description": "State synchronization between federated servers. Sent after link establishment to share channel and user state.",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"type": {
"const": "sync"
},
"ts": {
"type": "string",
"format": "date-time"
},
"origin": {
"type": "string",
"description": "Server sending the sync."
},
"channels": {
"type": "array",
"description": "Channels on the origin server.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"pattern": "^#[a-zA-Z0-9_-]+$"
},
"topic": {
"type": "string"
},
"modes": {
"type": "string"
},
"members": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of nicks in the channel."
}
},
"required": ["name"]
}
},
"users": {
"type": "array",
"description": "Users on the origin server.",
"items": {
"type": "object",
"properties": {
"nick": {
"type": "string"
},
"server": {
"type": "string",
"description": "Home server for this user."
}
},
"required": ["nick"]
}
}
},
"required": ["id", "type", "ts", "origin"]
}