UNPKG

botbuilder-dialogs-adaptive

Version:

Rule system for the Microsoft BotBuilder dialog system.

63 lines 2.7 kB
/** * @module botbuilder-dialogs-adaptive */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { BoolProperty, UnknownProperty } from '../properties'; import { BoolExpression, ValueExpression } from 'adaptive-expressions'; import { Converter, ConverterFactory, Dialog, DialogConfiguration, DialogContext, DialogTurnResult } from 'botbuilder-dialogs'; export interface EndDialogConfiguration extends DialogConfiguration { value?: UnknownProperty; disabled?: BoolProperty; } /** * Command to end the current [Dialog](xref:botbuilder-dialogs.Dialog), returning the `resultProperty` as the result of the dialog. */ export declare class EndDialog<O extends object = {}> extends Dialog<O> implements EndDialogConfiguration { static $kind: string; /** * Creates a new `EndDialog` instance. * * @param value Optional, a value expression for the result to be returned to the caller. */ constructor(value?: any); /** * A value expression for the result to be returned to the caller. */ value: ValueExpression; /** * An optional expression which if is true will disable this action. */ disabled?: BoolExpression; /** * @param property The key of the conditional selector configuration. * @returns The converter for the selector configuration. */ getConverter(property: keyof EndDialogConfiguration): Converter | ConverterFactory; /** * Starts a new [Dialog](xref:botbuilder-dialogs.Dialog) and pushes it onto the dialog stack. * * @param dc The [DialogContext](xref:botbuilder-dialogs.DialogContext) for the current turn of conversation. * @param _options Optional. Initial information to pass to the dialog. * @returns A `Promise` representing the asynchronous operation. */ beginDialog(dc: DialogContext, _options?: O): Promise<DialogTurnResult>; /** * Ends the parent [Dialog](xref:botbuilder-dialogs.Dialog). * * @param dc The [DialogContext](xref:botbuilder-dialogs.DialogContext) for the current turn of conversation. * @param result Optional. Value returned from the dialog that was called. The type * of the value returned is dependent on the child dialog. * @returns A `Promise` representing the asynchronous operation. */ protected endParentDialog(dc: DialogContext, result?: any): Promise<DialogTurnResult>; /** * @protected * Builds the compute Id for the [Dialog](xref:botbuilder-dialogs.Dialog). * @returns A `string` representing the compute Id. */ protected onComputeId(): string; } //# sourceMappingURL=endDialog.d.ts.map