Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BSTVirtualAlexa

Programmatic interface for interacting with the Virtual Alexa.

Hierarchy

  • BSTVirtualAlexa

Index

Constructors

constructor

  • new BSTVirtualAlexa(skillURL: string, interactionModel?: string, intentSchemaFile?: string, sampleUtterancesFile?: string, applicationID?: string, locale?: string, userId?: string): BSTVirtualAlexa
  • Creates a new Alexa emulator

    Parameters

    • skillURL: string

      The URL the skill is listening that this emulator should interact with

    • Optional interactionModel: string

      The path to the interaction model file - defaults to {@link BSTAlexa.DefaultInteractionModelLocation}.

    • Optional intentSchemaFile: string

      The path to the intent schema file - defaults to {@link BSTAlexa.DefaultIntentSchemaLocation}.

    • Optional sampleUtterancesFile: string

      The path to the samples utterances file - defaults to {@link BSTAlexa.DefaultSampleUtterancesLocation}.

    • Optional applicationID: string

      The application ID. Just makes one up if none is defined.

    • Optional locale: string
    • Optional userId: string

    Returns BSTVirtualAlexa

Properties

Static DefaultIntentSchemaLocation

DefaultIntentSchemaLocation: string = "speechAssets/IntentSchema.json"

Static DefaultInteractionModelLocation

DefaultInteractionModelLocation: string = "models/en-US.json"

Static DefaultSampleUtterancesLocation

DefaultSampleUtterancesLocation: string = "speechAssets/SampleUtterances.txt"

Methods

context

  • context(): SkillContext

deleteSession

  • deleteSession(): void

intended

  • intended(intentName: string, slots?: object, callback?: function): BSTVirtualAlexa
  • Emulates the specified intent coming from the Alexa device.

    Parameters

    • intentName: string

      The name of the intent - must exactly match the IntentSchema

    • Optional slots: object

      A key-value dictionary of slots in the form { "slotName": "slotValue" }

      • [id: string]: string
    • Optional callback: function

      Returns any error, along the response and request JSON associated with this call

        • (error: any, response: any, request: any): void
        • Parameters

          • error: any
          • response: any
          • request: any

          Returns void

    Returns BSTVirtualAlexa

    Itself

launched

  • Emulates the specified skill being launched

    Parameters

    • Optional callback: function

      Returns any error, along the response and request JSON associated with this call

        • (error: any, response: any, request: any): void
        • Parameters

          • error: any
          • response: any
          • request: any

          Returns void

    Returns BSTVirtualAlexa

    Itself

spoken

  • Emulates the specified phrase being said to an Alexa device.

    Parameters

    • phrase: string
    • Optional callback: function

      Returns any error, along the response and request JSON associated with this call

        • (error: any, response: any, request: any): void
        • Parameters

          • error: any
          • response: any
          • request: any

          Returns void

    Returns BSTVirtualAlexa

    Itself

start

  • start(createdEmptyInteractionModelIfNeeded?: boolean): void

Object literals

Static DefaultInteractionModel

DefaultInteractionModel: object

interactionModel

interactionModel: object

languageModel

languageModel: object

intents

intents: undefined[] = []

invocationName

invocationName: string = ""

Generated using TypeDoc