UNPKG

1.17 kBPlain TextView Raw
1/*
2 * Copyright 2017-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
5 * the License. A copy of the License is located at
6 *
7 * http://aws.amazon.com/apache2.0/
8 *
9 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
10 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
11 * and limitations under the License.
12 */
13import { InteractionsOptions } from './Interactions';
14import { InteractionsResponse } from './Response';
15
16export interface InteractionsProvider {
17 // configure your provider
18 configure(config: object): object;
19
20 // return 'Interactions'
21 getCategory(): string;
22
23 // return the name of your provider
24 getProviderName(): string;
25
26 sendMessage(botname: string, message: string | Object): Promise<object>;
27
28 onComplete(
29 botname: string,
30 callback: (err: any, confirmation: InteractionsResponse) => void
31 );
32}
33
34export interface InteractionsProviders {
35 [key: string]: InteractionsProvider;
36}