mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-26 17:32:16 +00:00
* feat(feishu): add chat members/info tool support * Feishu: harden chat tool schema and coverage --------- Co-authored-by: Nereo <nereo@Nereos-Mac-mini.local> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
25 lines
948 B
TypeScript
25 lines
948 B
TypeScript
import { Type, type Static } from "@sinclair/typebox";
|
|
|
|
const CHAT_ACTION_VALUES = ["members", "info"] as const;
|
|
const MEMBER_ID_TYPE_VALUES = ["open_id", "user_id", "union_id"] as const;
|
|
|
|
export const FeishuChatSchema = Type.Object({
|
|
action: Type.Unsafe<(typeof CHAT_ACTION_VALUES)[number]>({
|
|
type: "string",
|
|
enum: [...CHAT_ACTION_VALUES],
|
|
description: "Action to run: members | info",
|
|
}),
|
|
chat_id: Type.String({ description: "Chat ID (from URL or event payload)" }),
|
|
page_size: Type.Optional(Type.Number({ description: "Page size (1-100, default 50)" })),
|
|
page_token: Type.Optional(Type.String({ description: "Pagination token" })),
|
|
member_id_type: Type.Optional(
|
|
Type.Unsafe<(typeof MEMBER_ID_TYPE_VALUES)[number]>({
|
|
type: "string",
|
|
enum: [...MEMBER_ID_TYPE_VALUES],
|
|
description: "Member ID type (default: open_id)",
|
|
}),
|
|
),
|
|
});
|
|
|
|
export type FeishuChatParams = Static<typeof FeishuChatSchema>;
|