import type { MessageHandlersMap as BotMessageHandlersMap, EventHandlersMap as BotEventHandlersMap, StateExpiredHandlersMap as BotStateExpiredHandlersMap, HookHandlersMap as BotHookHandlersMap, WorkflowHandlersMap as BotWorkflowHandlersMap, ActionHandlersMap as BotActionHandlersMap, BotHandlers } from '../bot'; import * as utils from '../utils'; import { BasePlugin, PluginRuntimeProps } from './common'; import { ActionHandlers, MessageHandlers, EventHandlers, StateExpiredHandlers, HookHandlers, WorkflowHandlers, HookHandlersMap, WorkflowHandlersMap } from './server/types'; export type PluginImplementationProps = { actions: ActionHandlers; }; export declare class PluginImplementation implements BotHandlers { readonly props: PluginImplementationProps; private _runtimeProps; private _actionHandlers; private _messageHandlers; private _eventHandlers; private _stateExpiredHandlers; private _hookHandlers; private _workflowHandlers; private _registerOrder; constructor(props: PluginImplementationProps); initialize(props: PluginRuntimeProps): this; private get _runtime(); private _getTools; get actionHandlers(): BotActionHandlersMap; get messageHandlers(): BotMessageHandlersMap; get eventHandlers(): BotEventHandlersMap; get stateExpiredHandlers(): BotStateExpiredHandlersMap; get hookHandlers(): BotHookHandlersMap; get workflowHandlers(): BotWorkflowHandlersMap; readonly on: { message: >>(type: T, handler: MessageHandlers[T]) => void; event: >>(type: T, handler: EventHandlers[T]) => void; stateExpired: >>(type: T, handler: StateExpiredHandlers[T]) => void; beforeIncomingEvent: ["before_incoming_event"]>>(type: T, handler: HookHandlers["before_incoming_event"][T]) => void; beforeIncomingMessage: ["before_incoming_message"]>>(type: T, handler: HookHandlers["before_incoming_message"][T]) => void; beforeOutgoingMessage: ["before_outgoing_message"]>>(type: T, handler: HookHandlers["before_outgoing_message"][T]) => void; beforeOutgoingCallAction: ["before_outgoing_call_action"]>>(type: T, handler: HookHandlers["before_outgoing_call_action"][T]) => void; /** * # EXPERIMENTAL * This API is experimental and may change in the future. */ beforeIncomingCallAction: ["before_incoming_call_action"]>>(type: T, handler: HookHandlers["before_incoming_call_action"][T]) => void; afterIncomingEvent: ["after_incoming_event"]>>(type: T, handler: HookHandlers["after_incoming_event"][T]) => void; afterIncomingMessage: ["after_incoming_message"]>>(type: T, handler: HookHandlers["after_incoming_message"][T]) => void; afterOutgoingMessage: ["after_outgoing_message"]>>(type: T, handler: HookHandlers["after_outgoing_message"][T]) => void; afterOutgoingCallAction: ["after_outgoing_call_action"]>>(type: T, handler: HookHandlers["after_outgoing_call_action"][T]) => void; /** * # EXPERIMENTAL * This API is experimental and may change in the future. */ afterIncomingCallAction: ["after_incoming_call_action"]>>(type: T, handler: HookHandlers["after_incoming_call_action"][T]) => void; /** * # EXPERIMENTAL * This API is experimental and may change in the future. */ workflowStart: ["started"]>>(type: T, handler: WorkflowHandlers[T]) => void; /** * # EXPERIMENTAL * This API is experimental and may change in the future. */ workflowContinue: ["continued"]>>(type: T, handler: WorkflowHandlers[T]) => void; /** * # EXPERIMENTAL * This API is experimental and may change in the future. */ workflowTimeout: ["timed_out"]>>(type: T, handler: WorkflowHandlers[T]) => void; }; /** * checks if the actual event resolves to the target event */ private _eventResolvesTo; private _stripAliasPrefix; }