Options
All
  • Public
  • Public/Protected
  • All
Menu

Module dialog

The dialog engine is what processes conversations. It orchestrates the conversationnal flow logic.

Index

Functions

createId

  • Create a session Id from an Event Destination

    Parameters

    • eventDestination: EventDestination

      The event used to create the Dialog Session Id

    Returns string

deleteSession

  • deleteSession(sessionId: string): Promise<void>
  • Deletes a session

    Parameters

    • sessionId: string

      The Id of the session to delete

    Returns Promise<void>

jumpTo

  • jumpTo(sessionId: string, event: Event, flowName: string, nodeName?: undefined | string): Promise<void>
  • Jumps to a specific flow and optionaly a specific node. This is useful when the default flow behaviour needs to be bypassed.

    Parameters

    • sessionId: string

      The Id of the the current Dialog Session. If the session doesn't exists, it will be created with this Id.

    • event: Event

      The event to be processed

    • flowName: string

      The name of the flow to jump to

    • Optional nodeName: undefined | string

      The name of the optionnal node to jump to. The node will default to the starting node of the flow if this value is omitted.

    Returns Promise<void>

processEvent

  • processEvent(sessionId: string, event: IncomingEvent): Promise<void>
  • Calls the dialog engine to start processing an event.

    Parameters

    • sessionId: string
    • event: IncomingEvent

      The event to be processed by the dialog engine

    Returns Promise<void>

Generated using TypeDoc