Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interfaces.alexa.presentation.apl.GoBackCommand does not work #744

Open
vlthrasher opened this issue Nov 21, 2024 · 0 comments
Open

interfaces.alexa.presentation.apl.GoBackCommand does not work #744

vlthrasher opened this issue Nov 21, 2024 · 0 comments

Comments

@vlthrasher
Copy link

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ x ] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

The current definition of the interfaces.alexa.presentation.apl.GoBackCommand (from the alexa-apis-for-nodejs repo) does not work.

  • It enforces the type value to be GoBack but all of the backstack documentation suggests it should be Back:GoBack
  • It enforces the backValue property to be a string but when the backType is count or index it should be a number.

Expected Behavior

  • Developers should be able to successfully build a command for the ExecuteCommands directive that returns the user to the previous screen via the backstack without needing to hack the typescript.

Current Behavior

  • Developers following the typescript structure build a command that does not successfully execute
  • In order for developers to successfully execute the back command they have to hack around the typescript

Possible Solution

  • The alexa-apis-for-nodejs repo where the type is defined suggests it is auto-genned from the documentation. The applicable documentation should be updated and the repo regenerated to update the type definition.

Steps to Reproduce (for bugs)

  • Implement two APL pages that extend the backstack extension
  • On the second page, trigger a SendEvent command
  • From the skill, receive the SendEvent command and return a response with an ExecuteCommands directive
    • Include the Back command as currently specified in the ask-sdk-model
  • Run the code and see the the command does not successfully execute (fails silently).
  • Update the Back command to match the context below (hacking the typescript as necessary)
  • Rerun the code and see the command now successfully returns the user to the first APL doc.

Context

We are having to hack our typescript with as unknown as Command in order to allow the successful definition to be used.

    return {
        type: 'Alexa.Presentation.APL.ExecuteCommands',
        commands: [{
            type: 'Back:GoBack',
            backType: 'count',
            backValue: 1,
        } as unknown as Command], //
        token
    }

This leaves us unprotected from future changes and updates.

Your Environment

  • ASK SDK for Node.js used: 2.14.0
  • ASK SDK Model: 1.86.0

Node.js Info

  • Node.js version used for development: 18.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant