/// import { IncomingHttpHeaders } from 'http'; import { JsonObject } from 'type-fest'; import Bot, { OnRequest } from './bot/Bot'; import Context from './context/Context'; import SessionStore from './session/SessionStore'; import { Connector } from './bot/Connector'; import { LineConnectorOptions } from './line/LineConnector'; import { MessengerConnectorOptions } from './messenger/MessengerConnector'; import { SlackConnectorOptions } from './slack/SlackConnector'; import { TelegramConnectorOptions } from './telegram/TelegramConnector'; import { ViberConnectorOptions } from './viber/ViberConnector'; import { WhatsappConnectorOptions } from './whatsapp/WhatsappConnector'; export declare type Action = {}, RAP extends Record = {}> = (context: C, props: Props & P) => void | Action | Promise | void>; export declare type Props = { next?: Action; error?: Error; }; export declare type Plugin = (context: C) => void; export declare enum Channel { Messenger = "messenger", Line = "line", Slack = "slack", Telegram = "telegram", Viber = "viber", Whatsapp = "whatsapp" } export declare enum SessionDriver { Memory = "memory", File = "file", Redis = "redis", Mongo = "mongo" } export declare type SessionConfig = { driver: string; expiresIn?: number; stores: { memory?: { maxSize?: number; }; file?: { dirname?: string; }; redis?: { port?: number; host?: string; password?: string; db?: number; }; mongo?: { url?: string; collectionName?: string; }; } | { [P in Exclude]?: SessionStore; }; }; declare type ChannelCommonConfig = { enabled: boolean; path?: string; sync?: boolean; onRequest?: OnRequest; }; export declare type BottenderConfig = { plugins?: Plugin[]; session?: SessionConfig; initialState?: JsonObject; channels?: { messenger?: MessengerConnectorOptions & ChannelCommonConfig; line?: LineConnectorOptions & ChannelCommonConfig; telegram?: TelegramConnectorOptions & ChannelCommonConfig; slack?: SlackConnectorOptions & ChannelCommonConfig; viber?: ViberConnectorOptions & ChannelCommonConfig; whatsapp?: WhatsappConnectorOptions & ChannelCommonConfig; } | { [key in Exclude]?: { connector: Connector; } & ChannelCommonConfig; }; }; export declare type RequestContext = {}> = { id?: string; method: string; path: string; query: Record; headers: IncomingHttpHeaders & H; rawBody: string; body: B; params: Record; url: string; }; export declare type Client = object; export { Event } from './context/Event'; export declare type ChannelBot = { webhookPath: string; bot: Bot; }; //# sourceMappingURL=types.d.ts.map