UNPKG

2.62 kBTypeScriptView Raw
1/**
2 * @module botbuilder
3 */
4/**
5 * Copyright (c) Microsoft Corporation. All rights reserved.
6 * Licensed under the MIT License.
7 */
8import { Activity, BotFrameworkSkill, InvokeResponse, SkillConversationIdFactoryBase } from 'botbuilder-core';
9import { ICredentialProvider } from 'botframework-connector';
10import { BotFrameworkHttpClient } from '../botFrameworkHttpClient';
11/**
12 * A BotFrameworkHttpClient specialized for Skills that encapsulates Conversation ID generation.
13 */
14export declare class SkillHttpClient extends BotFrameworkHttpClient {
15 private readonly conversationIdFactory;
16 /**
17 * Creates a new instance of the [SkillHttpClient](xref:botbuilder-core.SkillHttpClient) class.
18 * @param credentialProvider An instance of [ICredentialProvider](xref:botframework-connector.ICredentialProvider).
19 * @param conversationIdFactory An instance of a class derived from [SkillConversationIdFactoryBase](xref:botbuilder-core.SkillConversationIdFactoryBase).
20 * @param channelService Optional. The channel service.
21 */
22 constructor(credentialProvider: ICredentialProvider, conversationIdFactory: SkillConversationIdFactoryBase, channelService?: string);
23 /**
24 * Uses the SkillConversationIdFactory to create or retrieve a Skill Conversation Id, and sends the activity.
25 * @template T The type of body in the InvokeResponse.
26 * @param originatingAudience The OAuth audience scope, used during token retrieval. (Either https://api.botframework.com or bot app id.)
27 * @param fromBotId The MicrosoftAppId of the bot sending the activity.
28 * @param toSkill The skill to create the Conversation Id for.
29 * @param callbackUrl The callback Url for the skill host.
30 * @param activity The activity to send.
31 */
32 postToSkill<T>(originatingAudience: string, fromBotId: string, toSkill: BotFrameworkSkill, callbackUrl: string, activity: Activity): Promise<InvokeResponse<T>>;
33 /**
34 * Uses the SkillConversationIdFactory to create or retrieve a Skill Conversation Id, and sends the activity.
35 * @deprecated This overload is deprecated. Please use SkillHttpClient.postToSkill() that takes an `originatingAudience`.
36 * @param fromBotId The MicrosoftAppId of the bot sending the activity.
37 * @param toSkill The skill to create the Conversation Id for.
38 * @param callbackUrl The callback Url for the skill host.
39 * @param activity The activity to send.
40 */
41 postToSkill(fromBotId: string, toSkill: BotFrameworkSkill, callbackUrl: string, activity: Activity): Promise<InvokeResponse>;
42}
43//# sourceMappingURL=skillHttpClient.d.ts.map
\No newline at end of file