1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import { MicrosoftAppCredentials } from 'botframework-connector';
|
9 | import { Activity, Middleware, TurnContext, BotState, UserState, ConversationState, Storage } from 'botbuilder-core';
|
10 |
|
11 | declare abstract class InterceptionMiddleware implements Middleware {
|
12 | |
13 |
|
14 |
|
15 |
|
16 | onTurn(turnContext: TurnContext, next: () => Promise<void>): Promise<void>;
|
17 | protected abstract inbound(turnContext: TurnContext, traceActivity: Partial<Activity>): Promise<any>;
|
18 | protected abstract outbound(turnContext: TurnContext, traceActivities: Partial<Activity>[]): Promise<any>;
|
19 | protected abstract traceState(turnContext: TurnContext): Promise<any>;
|
20 | private invokeInbound;
|
21 | private invokeOutbound;
|
22 | private invokeTraceState;
|
23 | }
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | export declare class InspectionMiddleware extends InterceptionMiddleware {
|
32 | private static readonly command;
|
33 | private readonly inspectionState;
|
34 | private readonly inspectionStateAccessor;
|
35 | private readonly userState;
|
36 | private readonly conversationState;
|
37 | private readonly credentials;
|
38 | |
39 |
|
40 |
|
41 | constructor(inspectionState: InspectionState, userState?: UserState, conversationState?: ConversationState, credentials?: Partial<MicrosoftAppCredentials>);
|
42 | processCommand(turnContext: TurnContext): Promise<any>;
|
43 | protected inbound(turnContext: TurnContext, traceActivity: Partial<Activity>): Promise<any>;
|
44 | protected outbound(turnContext: TurnContext, traceActivities: Partial<Activity>[]): Promise<any>;
|
45 | protected traceState(turnContext: TurnContext): Promise<any>;
|
46 | private processOpenCommand;
|
47 | private processAttachCommand;
|
48 | private openCommand;
|
49 | private attachCommand;
|
50 | private findSession;
|
51 | private invokeSend;
|
52 | private cleanUpSession;
|
53 | private getAttachId;
|
54 | }
|
55 | /**
|
56 | * InspectionState for use by the InspectionMiddleware for emulator inspection of runtime Activities and BotState.
|
57 | *
|
58 | * @remarks
|
59 | * InspectionState for use by the InspectionMiddleware for emulator inspection of runtime Activities and BotState.
|
60 | *
|
61 | */
|
62 | export declare class InspectionState extends BotState {
|
63 | constructor(storage: Storage);
|
64 | protected getStorageKey(turnContext: TurnContext): string;
|
65 | }
|
66 | export {};
|
67 |
|
\ | No newline at end of file |