mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 09:40:43 +00:00
60 lines
1.4 KiB
TypeScript
60 lines
1.4 KiB
TypeScript
import type { ReplyPayload } from "../auto-reply/reply-payload.js";
|
|
|
|
export type PluginConversationBindingRequestParams = {
|
|
summary?: string;
|
|
detachHint?: string;
|
|
data?: Record<string, unknown>;
|
|
};
|
|
|
|
export type PluginConversationBindingResolutionDecision = "allow-once" | "allow-always" | "deny";
|
|
|
|
export type PluginConversationBinding = {
|
|
bindingId: string;
|
|
pluginId: string;
|
|
pluginName?: string;
|
|
pluginRoot: string;
|
|
channel: string;
|
|
accountId: string;
|
|
conversationId: string;
|
|
parentConversationId?: string;
|
|
threadId?: string | number;
|
|
boundAt: number;
|
|
summary?: string;
|
|
detachHint?: string;
|
|
data?: Record<string, unknown>;
|
|
};
|
|
|
|
export type PluginConversationBindingRequestResult =
|
|
| {
|
|
status: "bound";
|
|
binding: PluginConversationBinding;
|
|
}
|
|
| {
|
|
status: "pending";
|
|
approvalId: string;
|
|
reply: ReplyPayload;
|
|
}
|
|
| {
|
|
status: "error";
|
|
message: string;
|
|
};
|
|
|
|
export type PluginConversationBindingResolvedEvent = {
|
|
status: "approved" | "denied";
|
|
binding?: PluginConversationBinding;
|
|
decision: PluginConversationBindingResolutionDecision;
|
|
request: {
|
|
summary?: string;
|
|
detachHint?: string;
|
|
data?: Record<string, unknown>;
|
|
requestedBySenderId?: string;
|
|
conversation: {
|
|
channel: string;
|
|
accountId: string;
|
|
conversationId: string;
|
|
parentConversationId?: string;
|
|
threadId?: string | number;
|
|
};
|
|
};
|
|
};
|