import type { HistoryEntry } from "openclaw/plugin-sdk/reply-history"; import type { SessionInfo, AttachmentInfo, UploadProgress } from "@meet-im/meet-bot-jssdk"; import type { z } from "zod"; import { MeetConfigSchema, MeetAccountConfigSchema, MeetChannelConfigSchema, MeetGroupConfigSchema, MeetExecApprovalConfigSchema } from "./config-schema.js"; export type MeetConfig = z.infer; export type MeetAccountConfig = z.infer; export type MeetChannelConfig = z.infer; export type MeetGroupConfig = z.infer; export type MeetExecApprovalConfig = z.infer; export type { AttachmentInfo, UploadProgress }; export type ResolvedMeetAccount = { accountId: string; enabled: boolean; configured: boolean; name?: string; apiEndpoint?: string; apiToken?: string; config: MeetConfig; }; export type MeetReplyContext = { messageId: string; senderId?: string; senderName?: string; content?: string; timestamp?: number; mediaPaths?: string[]; }; export type MeetMention = { userId: string; name: string; }; export type MeetMessageContext = { chatId: string; threadId?: string; messageId: string; senderId: string; senderOpenId: string; senderName?: string; chatType: "direct" | "channel"; mentionedBot: boolean; hasAnyMention?: boolean; content: string; /** 原始消息内容(enrichContextWithUserNames 修改 content 前的值),用于 CommandBody */ rawBody?: string; contentType: string; placeholder?: string; rawPayload?: string; sessionInfo: SessionInfo; timestamp?: number; atIds?: number[]; mentions?: MeetMention[]; replyContext?: MeetReplyContext; media?: MeetMediaAttachment[]; }; export type MeetSendResult = { messageId: string; chatId: string; }; export type MeetProbeResult = { ok: boolean; error?: string; botId?: string; }; export type MeetMediaInfo = { path: string; contentType?: string; placeholder: string; }; /** * 入站消息中的媒体附件信息 */ export type MeetMediaAttachment = { fileId: string | number; fileName?: string; fileSize?: number; mimeType?: string; fileUrl?: string; }; export type MeetHistoryMediaMeta = { fileId: string | number; fileName?: string; fileSize?: number; fileUrl?: string; mimeType?: string; }; export type MeetHistoryEntry = HistoryEntry & { meetMediaMeta?: MeetHistoryMediaMeta[]; }; /** * 文件上传结果 */ export type MeetUploadResult = { fileID: number; path: string; size: number; };