mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 16:40:42 +00:00
58 lines
1.2 KiB
TypeScript
58 lines
1.2 KiB
TypeScript
export type PluginHookMessageContext = {
|
|
channelId: string;
|
|
accountId?: string;
|
|
conversationId?: string;
|
|
};
|
|
|
|
export type PluginHookInboundClaimContext = PluginHookMessageContext & {
|
|
parentConversationId?: string;
|
|
senderId?: string;
|
|
messageId?: string;
|
|
};
|
|
|
|
export type PluginHookInboundClaimEvent = {
|
|
content: string;
|
|
body?: string;
|
|
bodyForAgent?: string;
|
|
transcript?: string;
|
|
timestamp?: number;
|
|
channel: string;
|
|
accountId?: string;
|
|
conversationId?: string;
|
|
parentConversationId?: string;
|
|
senderId?: string;
|
|
senderName?: string;
|
|
senderUsername?: string;
|
|
threadId?: string | number;
|
|
messageId?: string;
|
|
isGroup: boolean;
|
|
commandAuthorized?: boolean;
|
|
wasMentioned?: boolean;
|
|
metadata?: Record<string, unknown>;
|
|
};
|
|
|
|
export type PluginHookMessageReceivedEvent = {
|
|
from: string;
|
|
content: string;
|
|
timestamp?: number;
|
|
metadata?: Record<string, unknown>;
|
|
};
|
|
|
|
export type PluginHookMessageSendingEvent = {
|
|
to: string;
|
|
content: string;
|
|
metadata?: Record<string, unknown>;
|
|
};
|
|
|
|
export type PluginHookMessageSendingResult = {
|
|
content?: string;
|
|
cancel?: boolean;
|
|
};
|
|
|
|
export type PluginHookMessageSentEvent = {
|
|
to: string;
|
|
content: string;
|
|
success: boolean;
|
|
error?: string;
|
|
};
|