1 | import { MicrosoftAppCredentials } from 'botframework-connector';
|
2 | import { Activity, Middleware, TurnContext, BotState, UserState, ConversationState, Storage } from 'botbuilder-core';
|
3 |
|
4 | declare abstract class InterceptionMiddleware implements Middleware {
|
5 | |
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | onTurn(turnContext: TurnContext, next: () => Promise<void>): Promise<void>;
|
12 | protected abstract inbound(turnContext: TurnContext, traceActivity: Partial<Activity>): Promise<any>;
|
13 | protected abstract outbound(turnContext: TurnContext, traceActivities: Partial<Activity>[]): Promise<any>;
|
14 | protected abstract traceState(turnContext: TurnContext): Promise<any>;
|
15 | private invokeInbound;
|
16 | private invokeOutbound;
|
17 | private invokeTraceState;
|
18 | }
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | export declare class InspectionMiddleware extends InterceptionMiddleware {
|
27 | private static readonly command;
|
28 | private readonly inspectionState;
|
29 | private readonly inspectionStateAccessor;
|
30 | private readonly userState;
|
31 | private readonly conversationState;
|
32 | private readonly credentials;
|
33 | |
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 | constructor(inspectionState: InspectionState, userState?: UserState, conversationState?: ConversationState, credentials?: Partial<MicrosoftAppCredentials>);
|
42 | /**
|
43 | * Indentifies open and attach commands and calls the appropriate method.
|
44 | *
|
45 | * @param turnContext The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
|
46 | * @returns True if the command is open or attached, otherwise false.
|
47 | */
|
48 | processCommand(turnContext: TurnContext): Promise<any>;
|
49 | /**
|
50 | * Processes inbound activities.
|
51 | *
|
52 | * @param turnContext The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
|
53 | * @param traceActivity The trace activity.
|
54 | * @returns {Promise<any>} A promise representing the asynchronous operation.
|
55 | */
|
56 | protected inbound(turnContext: TurnContext, traceActivity: Partial<Activity>): Promise<any>;
|
57 | |
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 | protected outbound(turnContext: TurnContext, traceActivities: Partial<Activity>[]): Promise<any>;
|
64 | |
65 |
|
66 |
|
67 |
|
68 |
|
69 | protected traceState(turnContext: TurnContext): Promise<any>;
|
70 | |
71 |
|
72 |
|
73 | private processOpenCommand;
|
74 | |
75 |
|
76 |
|
77 | private processAttachCommand;
|
78 | |
79 |
|
80 |
|
81 | private openCommand;
|
82 | |
83 |
|
84 |
|
85 | private attachCommand;
|
86 | |
87 |
|
88 |
|
89 | private findSession;
|
90 | |
91 |
|
92 |
|
93 | private invokeSend;
|
94 | |
95 |
|
96 |
|
97 | private cleanUpSession;
|
98 | |
99 |
|
100 |
|
101 | private getAttachId;
|
102 | }
|
103 |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 | export declare class InspectionState extends BotState {
|
111 | |
112 |
|
113 |
|
114 |
|
115 |
|
116 | constructor(storage: Storage);
|
117 | /**
|
118 | * Gets the key to use when reading and writing state to and from storage.
|
119 | *
|
120 | * @param _turnContext The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
|
121 | * @returns The storage key.
|
122 | */
|
123 | protected getStorageKey(_turnContext: TurnContext): string;
|
124 | }
|
125 | export {};
|
126 |
|
\ | No newline at end of file |