@botonic/plugin-flow-builder
Version:
Botonic plugin for **Hubtype Flow Builder**: run and bridge flow-driven logic from bots on the **current** line.
35 lines (34 loc) • 1.84 kB
TypeScript
import { BotonicContext, BotonicRequestInput, ResolvedPlugins } from '@botonic/core';
import { MessagingChannel } from '@botonic/shared';
import { BotonicPluginFlowBuilder, FlowContent } from '../../index';
import { BotonicPluginFlowBuilderOptions } from '../../types';
export declare function createFlowBuilderPlugin({ flow, trackEvent, getKnowledgeBaseResponse, getAiAgentResponse, inShadowing, contentFilters, disableAIAgentInFirstInteraction, }: BotonicPluginFlowBuilderOptions): BotonicPluginFlowBuilder;
interface RequestArgs {
input: Partial<BotonicRequestInput>;
plugins?: ResolvedPlugins;
provider?: MessagingChannel;
isFirstInteraction?: boolean;
extraData?: Record<string, unknown>;
shadowing?: boolean;
user?: {
locale: string;
country: string;
systemLocale: string;
};
hubtypeCaseId?: string;
captureUserInputId?: string;
bot_interaction_id?: string;
}
export declare function createRequest({ input, plugins, provider, isFirstInteraction, user, extraData, shadowing, hubtypeCaseId, captureUserInputId, bot_interaction_id: botInteractionId, }: RequestArgs): BotonicContext;
export declare function getContentsAfterPreAndBotonicInit(botonicContext: BotonicContext, flowBuilderPlugin: BotonicPluginFlowBuilder): Promise<FlowContent[]>;
export declare function getActionRequest(botonicContext: BotonicContext): BotonicContext;
interface FlowBuilderPluginAndGetContentsArgs {
flowBuilderOptions: BotonicPluginFlowBuilderOptions;
requestArgs: RequestArgs;
}
export declare function createFlowBuilderPluginAndGetContents({ flowBuilderOptions, requestArgs, }: FlowBuilderPluginAndGetContentsArgs): Promise<{
contents: FlowContent[];
botonicContext: BotonicContext;
flowBuilderPluginPost: (botonicContext: BotonicContext) => void;
}>;
export {};