UNPKG

1.26 kBTypeScriptView Raw
1import { AbstractInteractionsProvider } from './InteractionsProvider';
2import { InteractionsOptions, AWSLexProviderOptions, InteractionsResponse, InteractionsMessage } from '../types';
3import { PostTextCommandOutput, PostContentCommandOutput } from '@aws-sdk/client-lex-runtime-service';
4interface PostContentCommandOutputFormatted extends Omit<PostContentCommandOutput, 'audioStream'> {
5 audioStream?: Uint8Array;
6}
7declare type AWSLexProviderSendResponse = PostTextCommandOutput | PostContentCommandOutputFormatted;
8export declare class AWSLexProvider extends AbstractInteractionsProvider {
9 private lexRuntimeServiceClient;
10 private _botsCompleteCallback;
11 constructor(options?: InteractionsOptions);
12 getProviderName(): string;
13 configure(config?: AWSLexProviderOptions): AWSLexProviderOptions;
14 /**
15 * @private
16 * @deprecated
17 * This is used internally by 'sendMessage' to call onComplete callback
18 * for a bot if configured
19 */
20 reportBotStatus(data: AWSLexProviderSendResponse, botname: string): void;
21 sendMessage(botname: string, message: string | InteractionsMessage): Promise<InteractionsResponse>;
22 onComplete(botname: string, callback: (err: any, confirmation: any) => void): void;
23}
24export {};