-
Notifications
You must be signed in to change notification settings - Fork 737
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update getDeviceId to check for optional device field (#535)
This commit includes the following changes: - update getDeviceId method to check for optional device field - update ask-sdk-model package version in some packages' dev dependencies - update doc to include a ASK-SDK-Utilities page (fixes #532)
- Loading branch information
Showing
6 changed files
with
71 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
***************** | ||
ASK SDK Utilities | ||
***************** | ||
|
||
The SDK provides mutiple utility functions that aims to reduce boilerplate code so that you can focus on skill business logic. | ||
|
||
RequestEnvelopeUtils | ||
==================== | ||
|
||
The ``RequestEnvelopeUtils`` provides functions for getting frequently used attributes from the ``RequestEnvelope`` with error checking logic. | ||
|
||
Available Methods | ||
----------------- | ||
|
||
.. code-block:: typescript | ||
getLocale(requestEnvelope: RequestEnvelope): string; | ||
getRequestType(requestEnvelope: RequestEnvelope): string; | ||
getIntentName(requestEnvelope: RequestEnvelope): string; | ||
getAccountLinkingAccessToken(requestEnvelope: RequestEnvelope): string; | ||
getApiAccessToken(requestEnvelope: RequestEnvelope): string; | ||
getDeviceId(requestEnvelope: RequestEnvelope): string; | ||
getDialogState(requestEnvelope: RequestEnvelope): string; | ||
getSlot(requestEnvelope: RequestEnvelope, slotName: string): Slot; | ||
getSlotValue(requestEnvelope: RequestEnvelope, slotName: string): string; | ||
getSupportedInterfaces(requestEnvelope: RequestEnvelope): SupportedInterfaces; | ||
isNewSession(requestEnvelope: RequestEnvelope): boolean; | ||
SsmlUtils | ||
========= | ||
|
||
The ``SsmlUtils`` provides a function for escaping invalid SSML characters in a speech string. | ||
|
||
Available Methods | ||
----------------- | ||
|
||
.. code-block:: typescript | ||
escapeXmlCharacters(input: string): string | ||
ViewportUtils | ||
============= | ||
|
||
The ``ViewportUtils`` provides functions for checking the viewport profile and other device characteristics such as display size or dpi in the ``RequestEnvelope``. | ||
|
||
Available Methods | ||
----------------- | ||
|
||
.. code-block:: typescript | ||
getViewportOrientation(width: number, height: number): ViewportOrientation; | ||
getViewportSizeGroup(size: number): ViewportSizeGroup; | ||
getViewportDpiGroup(dpi: number): ViewportDpiGroup; | ||
getViewportProfile(requestEnvelope: RequestEnvelope): ViewportProfile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters