UNPKG

botbuilder-dialogs-adaptive

Version:

Rule system for the Microsoft BotBuilder dialog system.

59 lines 2.34 kB
/** * @module botbuilder-dialogs-adaptive */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { Activity } from 'botbuilder'; import { BoolExpression } from 'adaptive-expressions'; import { BoolProperty, TemplateInterfaceProperty } from '../properties'; import { Converter, ConverterFactory, Dialog, DialogConfiguration, DialogContext, DialogStateManager, DialogTurnResult, TemplateInterface } from 'botbuilder-dialogs'; declare type D = DialogStateManager & { utterance: string; }; export interface SendActivityConfiguration extends DialogConfiguration { activity?: TemplateInterfaceProperty<Partial<Activity>, D>; disabled?: BoolProperty; } /** * Send an activity back to the user. */ export declare class SendActivity<O extends object = {}> extends Dialog<O> implements SendActivityConfiguration { static $kind: string; /** * Creates a new [SendActivity](xref:botbuilder-dialogs-adaptive.SendActivity) instance. * * @param activity [Activity](xref:botframework-schema.Activity) or message text to send the user. */ constructor(activity?: Partial<Activity> | string); /** * Gets or sets template for the activity. */ activity: TemplateInterface<Partial<Activity>, D & O>; /** * 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 SendActivityConfiguration): Converter | ConverterFactory; /** * Starts a new [Dialog](xref:botbuilder-dialogs.Dialog) and pushes it onto the dialog stack. * * @param dc The `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; } export {}; //# sourceMappingURL=sendActivity.d.ts.map