refactor: share reaction schemas and notes

This commit is contained in:
Peter Steinberger
2026-01-07 04:24:11 +01:00
parent 654e14df31
commit 8ef0609f8e
11 changed files with 81 additions and 40 deletions

View File

@@ -1,11 +1,13 @@
import { Type } from "@sinclair/typebox";
import { createReactionSchema } from "./reaction-schema.js";
export const TelegramToolSchema = Type.Union([
Type.Object({
action: Type.Literal("react"),
chatId: Type.Union([Type.String(), Type.Number()]),
messageId: Type.Union([Type.String(), Type.Number()]),
emoji: Type.String(),
remove: Type.Optional(Type.Boolean()),
createReactionSchema({
ids: {
chatId: Type.Union([Type.String(), Type.Number()]),
messageId: Type.Union([Type.String(), Type.Number()]),
},
includeRemove: true,
}),
]);