UNPKG

853 BTypeScriptView Raw
1import { INodeBuffer, INodeSocket } from 'botframework-streaming';
2import { Request, Response } from './interfaces';
3import { TurnContext } from 'botbuilder-core';
4/**
5 * BotFrameworkHttpAdapter is the interface that describes a Bot Framework
6 * adapter that operates on HTTP requests.
7 */
8export interface BotFrameworkHttpAdapter {
9 /**
10 * Process a web request by applying a logic callback function.
11 */
12 process(req: Request, res: Response, logic: (context: TurnContext) => Promise<void>): Promise<void>;
13 /**
14 * Handle a web socket connection by applying a logic callback function to
15 * each streaming request.
16 */
17 process(req: Request, socket: INodeSocket, head: INodeBuffer, logic: (context: TurnContext) => Promise<void>): Promise<void>;
18}
19//# sourceMappingURL=botFrameworkHttpAdapter.d.ts.map