{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://tutti.dev/schemas/events/client-frame.schema.json", "title": "BusinessEventClientFrame", "oneOf": [ { "type": "object", "additionalProperties": false, "required": ["kind", "requestId", "topics"], "properties": { "kind": { "const": "subscribe" }, "requestId": { "type": "string", "minLength": 1 }, "topics": { "type": "array", "minItems": 1, "items": { "type": "string", "pattern": "^[a-z0-9]+(\\.[a-z0-9]+)+$" } }, "scope": { "$ref": "./event-envelope.schema.json#/properties/scope" } } }, { "type": "object", "additionalProperties": false, "required": ["kind", "requestId", "topics"], "properties": { "kind": { "const": "unsubscribe" }, "requestId": { "type": "string", "minLength": 1 }, "topics": { "type": "array", "minItems": 1, "items": { "type": "string", "pattern": "^[a-z0-9]+(\\.[a-z0-9]+)+$" } }, "scope": { "$ref": "./event-envelope.schema.json#/properties/scope" } } }, { "type": "object", "additionalProperties": false, "required": ["kind", "requestId", "event"], "properties": { "kind": { "const": "publish" }, "requestId": { "type": "string", "minLength": 1 }, "event": { "$ref": "./event-envelope.schema.json" } } }, { "type": "object", "additionalProperties": false, "required": ["kind", "requestId", "sentAt"], "properties": { "kind": { "const": "ping" }, "requestId": { "type": "string", "minLength": 1 }, "sentAt": { "type": "string", "minLength": 1, "format": "date-time" } } } ] }