UNPKG

botbuilder-dialogs-adaptive

Version:

Rule system for the Microsoft BotBuilder dialog system.

61 lines 2.83 kB
import { ActionChangeType } from '../actionChangeType'; import { BoolProperty, EnumProperty } from '../properties'; import { BoolExpression, EnumExpression } from 'adaptive-expressions'; import { Converter, ConverterFactory, Dialog, DialogConfiguration, DialogContext, DialogDependencies, DialogTurnResult } from 'botbuilder-dialogs'; export interface EditActionsConfiguration extends DialogConfiguration { actions?: string[] | Dialog[]; changeType?: EnumProperty<ActionChangeType>; disabled?: BoolProperty; } /** * Class which allows you to edit the current actions. */ export declare class EditActions<O extends object = {}> extends Dialog<O> implements DialogDependencies, EditActionsConfiguration { static $kind: string; constructor(); /** * Initializes a new instance of the [EditActions](xref:botbuilder-dialogs-adaptive.EditActions) class. * * @param changeType [ActionChangeType](xref:botbuilder-dialogs-adaptive.ActionChangeType), type of change to apply to the active actions. * @param actions Optional. Child [Dialog](xref:botbuilder-dialogs.Dialog) dependencies so they can be added to the containers dialogset. */ constructor(changeType: ActionChangeType, actions?: Dialog[]); /** * The actions to update the dialog with. */ actions: Dialog[]; /** * The type of change to make to the dialogs list of actions. */ changeType: EnumExpression<ActionChangeType>; /** * 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 EditActionsConfiguration): Converter | ConverterFactory; /** * Gets the child [Dialog](xref:botbuilder-dialogs.Dialog) dependencies so they can be added to the containers [Dialog](xref:botbuilder-dialogs.Dialog) set. * * @returns The child [Dialog](xref:botbuilder-dialogs.Dialog) dependencies. */ getDependencies(): Dialog[]; /** * 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>; /** * @protected * Builds the compute Id for the [Dialog](xref:botbuilder-dialogs.Dialog). * @returns A `string` representing the compute Id. */ protected onComputeId(): string; } //# sourceMappingURL=editActions.d.ts.map