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