import { JsonObject } from 'type-fest'; import Context from '../context/Context'; import line from '../line/routes'; import messenger from '../messenger/routes'; import slack from '../slack/routes'; import telegram from '../telegram/routes'; import viber from '../viber/routes'; import whatsapp from '../whatsapp/routes'; import { Action, Props } from '../types'; declare type MatchPattern = string | Array | RegExp; declare type RoutePattern = '*' | RoutePredicate; export declare type RoutePredicate = (context: C) => boolean | JsonObject | Promise; declare type Route = { predicate: RoutePredicate; action: Action; }; declare function router(routes: Route[]): (context: C, props?: Props) => Promise | undefined>; declare function route(pattern: RoutePattern, action: Action): { predicate: RoutePredicate; action: Action; }; declare function text(pattern: MatchPattern, action: Action): { predicate: (context: C) => any; action: Action; }; declare function payload(pattern: MatchPattern, action: Action): { predicate: (context: C) => any; action: Action; }; declare function platform(pattern: MatchPattern, action: Action): { predicate: (context: C) => boolean; action: Action; } | { predicate: (context: C) => RegExpExecArray | null; action: Action; }; export default router; export { router, route, text, payload, platform, line, messenger, slack, telegram, viber, whatsapp, }; //# sourceMappingURL=index.d.ts.map