From c63806b094e25859921fcefab21d49da33d39b41 Mon Sep 17 00:00:00 2001 From: ReaperOfVeriod Date: Sun, 25 Oct 2026 04:48:01 +0100 Subject: [PATCH] feat: add chat send contract --- contracts/v1/chat-send-request.json | 13 +++++++++++++ contracts/v1/chat-send-response.json | 13 +++++++++++++ fixtures/v1/chat-send.response.json | 5 +++++ 3 files changed, 31 insertions(+) create mode 100644 contracts/v1/chat-send-request.json create mode 100644 contracts/v1/chat-send-response.json create mode 100644 fixtures/v1/chat-send.response.json diff --git a/contracts/v1/chat-send-request.json b/contracts/v1/chat-send-request.json new file mode 100644 index 0000000..7b05b4f --- /dev/null +++ b/contracts/v1/chat-send-request.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://trixie.reaperofveriod.nl/contracts/v1/chat-send-request.json", + "title": "Twitch chat send request", + "type": "object", + "additionalProperties": false, + "required": ["identity", "message"], + "properties": { + "identity": { "enum": ["streamer", "bot"] }, + "message": { "type": "string", "minLength": 1, "maxLength": 500 }, + "reply_parent_message_id": { "type": "string", "maxLength": 128 } + } +} diff --git a/contracts/v1/chat-send-response.json b/contracts/v1/chat-send-response.json new file mode 100644 index 0000000..7267a41 --- /dev/null +++ b/contracts/v1/chat-send-response.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://trixie.reaperofveriod.nl/contracts/v1/chat-send-response.json", + "title": "Twitch chat send response", + "type": "object", + "additionalProperties": false, + "required": ["message_id", "is_sent"], + "properties": { + "message_id": { "type": "string", "minLength": 1 }, + "is_sent": { "type": "boolean" }, + "drop_reason": { "type": ["string", "null"] } + } +} diff --git a/fixtures/v1/chat-send.response.json b/fixtures/v1/chat-send.response.json new file mode 100644 index 0000000..cfe02dc --- /dev/null +++ b/fixtures/v1/chat-send.response.json @@ -0,0 +1,5 @@ +{ + "message_id": "synthetic-message-id", + "is_sent": true, + "drop_reason": null +}