UNPKG

botbuilder-dialogs-adaptive

Version:

Rule system for the Microsoft BotBuilder dialog system.

58 lines 2.2 kB
/** * @module botbuilder-dialogs-adaptive */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { BoolProperty } from '../properties'; import { ValueExpression, StringExpression, BoolExpression } from 'adaptive-expressions'; import { Converter, ConverterFactory, Dialog, DialogConfiguration, DialogContext, DialogTurnResult } from 'botbuilder-dialogs'; declare type AssignmentInput<T> = { property: string; value: T; }; export interface PropertyAssignment { property: StringExpression; value: ValueExpression; } export interface SetPropertiesConfiguration extends DialogConfiguration { assignments?: AssignmentInput<unknown>[] | PropertyAssignment[]; disabled?: BoolProperty; } /** * Sets properties with the result of evaluating a value expression. */ export declare class SetProperties<O extends object = {}> extends Dialog<O> implements SetPropertiesConfiguration { static $kind: string; constructor(); /** * Additional property settings as property/value pairs. */ assignments: PropertyAssignment[]; /** * 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 SetPropertiesConfiguration): 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>; /** * @protected * Builds the compute Id for the [Dialog](xref:botbuilder-dialogs.Dialog). * @returns A `string` representing the compute Id. */ protected onComputeId(): string; } export {}; //# sourceMappingURL=setProperties.d.ts.map