Documentation - v1.2.0-alpha.3
    Preparing search index...

    Prompts a user to enter a datetime expression.

    By default the prompt will return to the calling dialog a DateTimeResolution[] .

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    defaultLocale: string

    The prompts default locale that should be recognized.

    EndOfTurn: DialogTurnResult = ...

    Gets a default end-of-turn result.

    This result indicates that a dialog (or a logical step within a dialog) has completed processing for the current turn, is still active, and is waiting for more input.

    Accessors

    Methods

    • Helper function to compose an output activity containing a set of choices.

      Parameters

      • prompt: string | Activity

        The prompt to append the users choices to.

      • channelId: string

        ID of the channel the prompt is being sent to.

      • choices: (string | Choice)[]

        List of choices to append.

      • style: ListStyle

        Configured style for the list of choices.

      • Optionaloptions: ChoiceFactoryOptions

        (Optional) options to configure the underlying ChoiceFactory call.

      • OptionalconversationType: string

        (Optional) the type of the conversation.

      Returns Activity

      The composed activity ready to send to the user.

    • Called when a prompt dialog is the active dialog and the user replied with a new activity.

      Parameters

      • dialogContext: DialogContext

        The DialogContext for the current turn of conversation.

      Returns Promise<DialogTurnResult<any>>

      A Promise representing the asynchronous operation.

      If the task is successful, the result indicates whether the dialog is still active after the turn has been processed by the dialog. The prompt generally continues to receive the user's replies until it accepts the user's reply as valid input for the prompt.

    • An encoded string used to aid in the detection of agent changes on re-deployment.

      Returns string

      Unique string which should only change when dialog has changed in a way that should restart the dialog.

      This defaults to returning the dialog's id but can be overridden to provide more precise change detection logic. Any dialog on the stack that has its version change will result in a versionChanged event will be raised. If this event is not handled by the agent, an error will be thrown resulting in the agent error handler logic being run.

      Returning an empty string will disable version tracking for the component all together.

    • Called when a unique ID needs to be computed for a dialog.

      Returns string

      SHOULD be overridden to provide a more contextually relevant ID. The preferred pattern for ID's is <dialog type>(this.hashedLabel('<dialog args>')).

    • Called after an event was bubbled to all parents and wasn't handled.

      Parameters

      Returns Promise<boolean>

      Whether the event is handled by the current dialog and further processing should stop.

      This is a good place to perform default processing logic for an event. Returning true will prevent any processing of the event by child dialogs.

    • Called before an event is bubbled to its parent.

      Parameters

      • dialogContext: DialogContext

        The DialogContext for the current turn of conversation.

      • event: DialogEvent

        DialogEvent, the event being raised.

      Returns Promise<boolean>

      Whether the event is handled by the current dialog and further processing should stop.

      This is a good place to perform interception of an event as returning true will prevent any further bubbling of the event to the dialogs parents and will also prevent any child dialogs from performing their default processing.

    • Prompts the user for input.

      Parameters

      • context: TurnContext

        TurnContext, context for the current turn of conversation with the user.

      • state: any

        Contains state for the current instance of the prompt on the dialog stack.

      • options: PromptOptions

        A PromptOptions object constructed from the options initially provided in the call to Prompt.

      • isRetry: boolean

        true if this is the first time this prompt dialog instance on the stack is prompting the user for input; otherwise, false.

      Returns Promise<void>

      A Promise representing the asynchronous operation.

    • Called when a prompt dialog resumes being the active dialog on the dialog stack, such as when the previous active dialog on the stack completes.

      Parameters

      • dialogContext: DialogContext

        The DialogContext for the current turn of the conversation.

      • _reason: DialogReason

        An enum indicating why the dialog resumed.

      • Optional_result: any

        Optional, value returned from the previous dialog on the stack. The type of the value returned is dependent on the previous dialog.

      Returns Promise<DialogTurnResult<any>>

      A Promise representing the asynchronous operation.

      If the task is successful, the result indicates whether the dialog is still active after the turn has been processed by the dialog.