Skip to content

Commit

Permalink
feat: Support ibm-watson v6 (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
Naktibalda authored Feb 22, 2021
1 parent 005fcdd commit 32675fc
Show file tree
Hide file tree
Showing 14 changed files with 3,056 additions and 6,602 deletions.
3 changes: 1 addition & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ env:
es6: true
node: true
jest: true
extends:
extends:
- 'plugin:@typescript-eslint/recommended'
- 'prettier/@typescript-eslint'
- 'plugin:prettier/recommended'

parser: '@typescript-eslint/parser'
Expand Down
5 changes: 2 additions & 3 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
*/
import Botkit = require('botkit');
import AssistantV1 = require('ibm-watson/assistant/v1');
import { MessageParams, MessageResponse } from 'ibm-watson/assistant/v1';
import { Context } from 'ibm-watson/assistant/v1';
import { Context, MessageParams, MessageResponse } from 'ibm-watson/assistant/v1';
import { Storage } from 'botbuilder';
import { BotkitMessage } from 'botkit';
export interface WatsonMiddlewareConfig extends AssistantV1.Options {
Expand All @@ -41,7 +40,7 @@ export declare class WatsonMiddleware {
private storage;
private readonly minimumConfidence;
private readonly ignoreType;
constructor(config: WatsonMiddlewareConfig);
constructor({ iam_apikey, minimum_confidence, storage, ...config }: WatsonMiddlewareConfig);
hear(patterns: string[], message: Botkit.BotkitMessage): boolean;
before(message: Botkit.BotkitMessage, payload: MessageParams): Promise<MessageParams>;
after(message: Botkit.BotkitMessage, response: MessageResponse): Promise<MessageResponse>;
Expand Down
39 changes: 28 additions & 11 deletions lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lib/utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/utils.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 32675fc

Please sign in to comment.