import { MicrosoftAppCredentials } from 'botframework-connector'; import { Activity, Middleware, TurnContext, BotState, UserState, ConversationState, Storage } from 'botbuilder-core'; /** @private */ declare abstract class InterceptionMiddleware implements Middleware { /** * Implement middleware signature * * @param turnContext {TurnContext} An incoming TurnContext object. * @param next {function} The next delegate function. */ onTurn(turnContext: TurnContext, next: () => Promise): Promise; protected abstract inbound(turnContext: TurnContext, traceActivity: Partial): Promise; protected abstract outbound(turnContext: TurnContext, traceActivities: Partial[]): Promise; protected abstract traceState(turnContext: TurnContext): Promise; private invokeInbound; private invokeOutbound; private invokeTraceState; } /** * InspectionMiddleware for emulator inspection of runtime Activities and BotState. * * @remarks * InspectionMiddleware for emulator inspection of runtime Activities and BotState. * * @deprecated This class will be removed in a future version of the framework. */ export declare class InspectionMiddleware extends InterceptionMiddleware { private static readonly command; private readonly inspectionState; private readonly inspectionStateAccessor; private readonly userState; private readonly conversationState; private readonly credentials; /** * Create the Inspection middleware for sending trace activities out to an emulator session * * @param inspectionState A state management object for inspection state. * @param userState A state management object for user state. * @param conversationState A state management object for conversation state. * @param credentials The authentication credentials. */ constructor(inspectionState: InspectionState, userState?: UserState, conversationState?: ConversationState, credentials?: Partial); /** * Indentifies open and attach commands and calls the appropriate method. * * @param turnContext The [TurnContext](xref:botbuilder-core.TurnContext) for this turn. * @returns True if the command is open or attached, otherwise false. */ processCommand(turnContext: TurnContext): Promise; /** * Processes inbound activities. * * @param turnContext The [TurnContext](xref:botbuilder-core.TurnContext) for this turn. * @param traceActivity The trace activity. * @returns {Promise} A promise representing the asynchronous operation. */ protected inbound(turnContext: TurnContext, traceActivity: Partial): Promise; /** * Processes outbound activities. * * @param turnContext The [TurnContext](xref:botbuilder-core.TurnContext) for this turn. * @param traceActivities A collection of trace activities. */ protected outbound(turnContext: TurnContext, traceActivities: Partial[]): Promise; /** * Processes the state management object. * * @param turnContext The [TurnContext](xref:botbuilder-core.TurnContext) for this turn. */ protected traceState(turnContext: TurnContext): Promise; /** * @private */ private processOpenCommand; /** * @private */ private processAttachCommand; /** * @private */ private openCommand; /** * @private */ private attachCommand; /** * @private */ private findSession; /** * @private */ private invokeSend; /** * @private */ private cleanUpSession; /** * @private */ private getAttachId; } /** * InspectionState for use by the InspectionMiddleware for emulator inspection of runtime Activities and BotState. * * @remarks * InspectionState for use by the InspectionMiddleware for emulator inspection of runtime Activities and BotState. * * @deprecated This class will be removed in a future version of the framework. */ export declare class InspectionState extends BotState { /** * Creates a new instance of the [InspectionState](xref:botbuilder.InspectionState) class. * * @param storage The [Storage](xref:botbuilder-core.Storage) layer this state management object will use to store and retrieve state. */ constructor(storage: Storage); /** * Gets the key to use when reading and writing state to and from storage. * * @param _turnContext The [TurnContext](xref:botbuilder-core.TurnContext) for this turn. * @returns The storage key. */ protected getStorageKey(_turnContext: TurnContext): string; } export {}; //# sourceMappingURL=inspectionMiddleware.d.ts.map