UNPKG

1.23 kBTypeScriptView Raw
1/**
2 * Copyright (c) Microsoft Corporation. All rights reserved.
3 * Licensed under the MIT License.
4 */
5import { Activity, ConversationAccount, Transcript, TurnContext } from 'botbuilder-core';
6/**
7 * Contains utility methods for creating various event types.
8 */
9export declare class EventFactory {
10 /**
11 * Create handoff initiation event.
12 *
13 * @param context The context object for the turn.
14 * @param handoffContext Agent hub-specific context.
15 * @param transcript Transcript of the conversation.
16 * @returns The handoff event activity.
17 */
18 static createHandoffInitiation<T = unknown>(context: TurnContext, handoffContext: T, transcript?: Transcript): Activity;
19 /**
20 * Create handoff status event.
21 *
22 * @param conversation Conversation being handed over.
23 * @param state State, possible values are: "accepted", "failed", "completed".
24 * @param message Additional message for failed handoff.
25 * @returns The handoff event activity.
26 */
27 static createHandoffStatus(conversation: ConversationAccount, state: string, message?: string): Activity;
28 /**
29 * @private
30 */
31 private static createHandoffEvent;
32}
33//# sourceMappingURL=eventFactory.d.ts.map
\No newline at end of file