Node.js Client Library Release Notes

The Actions On Google client library for Dialogflow and Actions SDK is a NodeJS module that helps you build your fulfillment whether you're using Dialogflow or the Actions SDK.

See the GitHub repo for more information.

Installation

To install the client library, run the following command:

cd <nodejs-project-dir>/
npm install actions-on-google --save

Release Notes

6/21/2018

Version 2.2.0

  • Added support for async middleware.
  • Added parameter to middleware to expose extra framework data.
  • Verified JWT is generated before sending report state.
  • Added headers parameter to smart home service handler.
  • Removed options check in API call methods.

5/31/2018

Version 2.1.3

  • Added deprecation notice for conv.user.id.

5/21/2018

Version 2.1.2

  • Added error handling for common.stringify.

5/9/2018

Version 2.1.1

  • Made v2 the default version if version is not specified.

5/8/2018

Version 2.1.0

  • Various fixes and improvements for reference documentation.
  • Converted lambda header keys to lowercase.
  • Consolidated common conversation types.
  • Added intent array matching.
  • Added screen surface capability shortcut.
  • Added ability to send back headers.
  • Added clearer examples for GitHub readme.
  • Regenerated transaction types to support new transaction features.
  • Added ROUTINES to GoogleActionsV2TriggerContextTimeContextFrequency.
  • Added deprecated fields previously not generated.
  • Added support for profile retrieval.
  • Added support for Table card response type.
  • Added service for Smart Home.
  • Added clearer examples for GitHub readme.

Version 1.11.0

Last feature release for v1:

  • Added support for followup events.
  • Fixed type annotation bugs.
  • Changed No userStorage Found to debug message.
  • Removed en_* locale warning from askForSignIn.
  • Fixed MEDIA_STATUS enum being incorrect.

4/16/2018

Version 2.0.1

  • Excluded npm packed extracted contents from npm publish.

Version 2.0.0

Changes from Major Version 1:

  • Rewrote to use TypeScript with main API intended for JavaScript.
  • Separated app instance to a cross conversational app instance and a per conversation conv instance.
  • Redesigned objects to use an API backbone from protobufs that define the Conversation API.
  • Redesigned API to be overloaded and sent through conv.ask so that it can build the response for the developer incrementally.
  • Redesigned API to use more idiomatic JavaScript.
  • Created frameworks system to support different platforms seamlessly.
  • Created clear separations of services so APIs are distinctly separate.
  • Added new modular architecture that allows plugins to extend functionality.
  • Dropped support for Actions SDK v1 and various legacy features.

Changes from Alpha:

  • Removed plugins and utils from library repo.
  • Various bug fixes.
  • Added support for all features from v1 besides legacy features.
  • Cleaned up arguments and create separate status parsing out.
  • Added ability to send raw JSON.
  • Added fallback handler.
  • Added status and error customization for Dialogflow verification.
  • Added support for Dialogflow followup events.

3/8/2018

Version 1.10.0

  • Updated carousel and lists to issue a warning instead of an error for item limits.
  • Added BrowseCarousel to the client library.
  • Added WEB_BROWSER surface capability.
  • Added support for media response.
  • Added support for Package Entitlements.

2/26/2018

Version 1.9.0

  • Added support for askToDeepLink.
  • Added askForPlace.
  • Added error message for Dialogflow v2 webhook requests.
  • Added a call to action to debug intent error.
  • Handled error if userStorage is invalid JSON.
  • Added console binding for debug logs.
  • Added imageDisplayOptions to Carousel.
  • Escalated deprecation logs to warnings.
  • Removed unnecessary semicolons.

2/5/2018

Version 1.8.2

  • Corrected token verification for google-auth-library.
  • Added package version logging.

1/30/2018

Version 1.8.1

  • Fixed argument values of reprompts.

1/25/2018

Version 1.8.0

  • Updated dependency google-auth-library.
  • Added a JSON output script for coverage.
  • Updated error output type for ImageDisplayOption.
  • Added DIRECT tokenization type.
  • Added object-curly-spacing eslint rule.
  • Updated description of CROPPED image display option.
  • Ran CI on node version 6 and 8.

12/28/2017

Version 1.7.0

  • Fixed handleRequestAsync jsdoc example.
  • Added notice to askFor that works only for en_* locales.
  • Allowed whitespace padding in SSML input.
  • Added tests for app.data behavior.
  • Added notice that Dialogflow v2 is not supported.
  • Standardized class declaration syntax.
  • Set Dialogflow speech for SSML in SimpleResponse.
  • Added @private to getArgumentCommon.
  • Added max-len 100 eslint rule.
  • Exposed ImageDisplay enum on AssistantApp instances.
  • Added no-magic-numbers eslint rule.
  • Moved Enums to prototype of AssistantApp.
  • Added stricter eslint autofix rules.
  • Added @private type annotation to ANY_TYPE_PROPERTY_.
  • Added note about Brand Verification.
  • Added description for ImageDisplays enum.
  • Fixed typo in example for askForSignIn.

11/21/2017

Version 1.6.1

  • Added custom transaction token type.
  • Added JSDoc for ImageDisplayOptions.

11/15/2017

Version 1.6.0

  • Added support for Updates API.
  • Added support for imageDisplayOption in BasicCard.
  • Added support for userStorage and lastSeen.
  • Added handleRequestAsync() for Promise support.
  • Fixed bugs for transactions.
  • Updated transaction enums to match documentation.
  • Renamed isRequestFromAssistant to isRequestFromGoogle.

10/13/2017

Version 1.5.1

  • Fixed buildLineItem parameters mixup.
  • Fixed isRequestFromAssistant JSDoc return description.
  • Added linting rules for JSDoc and fixed existing violations.

10/10/2017

Version 1.5.0

  • Renamed API.AI references to Dialogflow.

10/4/2017

Version 1.4.0

  • Fixed no input prompts sent with rich responses.
  • Added support for new NO_INPUT and CANCEL intents.
  • Added support for NEW_SURFACE intent.

9/19/2017

Version 1.3.1

9/07/2017

Version 1.3.0

8/15/2017

Version 1.2.1

  • Refactored the AssistantApp base class.
  • Refactored getter methods and error handling, adding better logs.
  • "Data extraction" now happens in the classes' constructor, no longer requires a call to handleRequest().
  • Updated documentation.
  • Added validation to suggestion chips.
  • REGION_NOT_SUPPORTED now has the correct string value.

7/18/2017

Version 1.2.0

  • Added "delivery address" in the order object. To specify one, use addLocation().
  • Removed "CREATED" as a valid state for OrderState.
  • Added locale as part of the request. You can obtain it with a call to getUserLocale().
  • Added support for customerInfoProperties.
  • Better code coverage for tests.
  • Bug fixes.

5/22/2017

** Version 1.1.1 **

  • Refactored Proto3 conversion to subclasses.

5/17/2017

** Version 1.1.0 **

  • Added support for more AoG surfaces, including builders for rich visual responses, and accessors for app surface capabilities and user input types.
  • Added support for Transactions APIs, including builders for Orders, Carts, LineItems, and OrderUpdates, as well as responses for checking transaction requirements, getting user delivery address, and confirming a transaction.
  • Added conversation helpers to ask for a user confirmation, a date and time, and in-dialog sign in.

4/11/2017

Version 1.0.9

  • Added a getContextArgument() method.
  • Added a getContext() method to retrieve a particular context.
  • Fixed getArgument() method.

3/9/2017

Version 1.0.8

  • Defensive check for conversation type in ActionsSDK request.

2/16/2017

Version 1.0.7

  • Defensive check for originalRequest object in ApiAiAssistant constructor.

2/15/2017

Version 1.0.6

  • Added ‘getContexts()’ method.

1/11/2017

Version 1.0.5

  • Improved error handling for getArgument() method.
  • Fixed error handling for getUser() method.

12/16/2016

Version 1.0.4

  • Documentation fixes.
  • Improved debug logging.
  • Improved support for SSML syntax.

12/09/2016

Version 1.0.3

  • Removed support for inDialogTriggers in the Actions SDK.
  • Changed ActionsSdkAssistant.ask method parameters.

12/08/2016

Version 1.0.2

  • Initial public launch of the client library on GitHub and NPM.