Skip to content

Commit

Permalink
Updated botbuilder-dialogs with core changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevenic committed Apr 1, 2018
1 parent 411ddcc commit 1c73515
Show file tree
Hide file tree
Showing 54 changed files with 115 additions and 139 deletions.
4 changes: 2 additions & 2 deletions libraries/botbuilder-dialogs/lib/compositeControl.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { BotContext } from 'botbuilder';
import { TurnContext } from 'botbuilder';
import { Dialog } from './dialog';
import { DialogContext, DialogResult } from './dialogContext';
import { DialogSet } from './dialogSet';
/**
*
*/
export declare class CompositeControl<R = any, O = {}, C extends BotContext = BotContext> implements Dialog<C> {
export declare class CompositeControl<R = any, O = {}, C extends TurnContext = TurnContext> implements Dialog<C> {
protected dialogs: DialogSet<C>;
protected dialogId: string;
protected defaultOptions: O;
Expand Down
2 changes: 1 addition & 1 deletion libraries/botbuilder-dialogs/lib/compositeControl.js.map

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

4 changes: 2 additions & 2 deletions libraries/botbuilder-dialogs/lib/control.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { BotContext } from 'botbuilder';
import { TurnContext } from 'botbuilder';
import { Dialog } from './dialog';
import { DialogContext, DialogResult } from './dialogContext';
/**
*
*/
export declare abstract class Control<R = any, O = {}, C extends BotContext = BotContext> implements Dialog<C> {
export declare abstract class Control<R = any, O = {}, C extends TurnContext = TurnContext> implements Dialog<C> {
protected defaultOptions: O;
/**
* Creates a new Control instance.
Expand Down
4 changes: 2 additions & 2 deletions libraries/botbuilder-dialogs/lib/dialog.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { BotContext, Promiseable } from 'botbuilder';
import { TurnContext, Promiseable } from 'botbuilder';
import { DialogContext } from './dialogContext';
/**
* Interface of Dialog objects that can be added to a `DialogSet`. The dialog should generally
* be a singleton and added to a dialog set using `DialogSet.add()` at which point it will be
* assigned a unique ID.
*/
export interface Dialog<C extends BotContext> {
export interface Dialog<C extends TurnContext> {
/**
* Method called when a new dialog has been pushed onto the stack and is being activated.
* @param dc The dialog context for the current turn of conversation.
Expand Down
10 changes: 2 additions & 8 deletions libraries/botbuilder-dialogs/lib/dialogContext.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { BotContext, BatchOutput, Activity } from 'botbuilder';
import { TurnContext, Activity } from 'botbuilder';
import { DialogInstance } from './dialog';
import { DialogSet } from './dialogSet';
import { PromptOptions } from './prompts/index';
Expand All @@ -28,16 +28,10 @@ export interface DialogResult<T = any> {
*/
result?: T;
}
export declare class DialogContext<C extends BotContext> {
export declare class DialogContext<C extends TurnContext> {
readonly dialogs: DialogSet<C>;
readonly context: C;
readonly stack: DialogInstance[];
/**
* Allows for batch based responses from the bot. Optional to use but you should add `BatchOutput`
* to your adapters middleware stack if you do, otherwise you'll need to manually call
* `dc.batch.flush()` somewhere within your bots logic.
*/
readonly batch: BatchOutput;
/**
* Creates a new DialogContext instance.
* @param dialogs Parent dialog set.
Expand Down
9 changes: 0 additions & 9 deletions libraries/botbuilder-dialogs/lib/dialogContext.js

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

2 changes: 1 addition & 1 deletion libraries/botbuilder-dialogs/lib/dialogContext.js.map

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

4 changes: 2 additions & 2 deletions libraries/botbuilder-dialogs/lib/dialogSet.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { BotContext } from 'botbuilder';
import { TurnContext } from 'botbuilder';
import { Dialog } from './dialog';
import { Waterfall, WaterfallStep } from './waterfall';
import { DialogContext } from './dialogContext';
Expand Down Expand Up @@ -42,7 +42,7 @@ import { DialogContext } from './dialogContext';
* });
* ```
*/
export declare class DialogSet<C extends BotContext = BotContext> {
export declare class DialogSet<C extends TurnContext = TurnContext> {
private readonly dialogs;
/**
* Adds a new dialog to the set and returns the added dialog.
Expand Down
2 changes: 1 addition & 1 deletion libraries/botbuilder-dialogs/lib/dialogSet.js.map

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

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { BotContext, Attachment } from 'botbuilder';
import { TurnContext, Attachment } from 'botbuilder';
import { DialogContext } from '../dialogContext';
import { Prompt, PromptOptions, PromptValidator } from './prompt';
/**
Expand All @@ -32,7 +32,7 @@ import { Prompt, PromptOptions, PromptValidator } from './prompt';
* ]);
* ```
*/
export declare class AttachmentPrompt<C extends BotContext> extends Prompt<C, Attachment[]> {
export declare class AttachmentPrompt<C extends TurnContext> extends Prompt<C, Attachment[]> {
private prompt;
/**
* Creates a new instance of the prompt.
Expand Down
Loading

0 comments on commit 1c73515

Please sign in to comment.