ask-sdk-core
Advanced tools
Comparing version 2.5.2 to 2.6.0
@@ -6,2 +6,14 @@ # Change Log | ||
# [2.6.0](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/compare/v2.5.2...v2.6.0) (2019-05-29) | ||
### Features | ||
* add getUserId util function ([f898423](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/commit/f898423)) | ||
* Add support for the HUB_LANDSCAPE_SMALL (Echo Show 5) viewport ([#557](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/issues/557)) ([707b0b2](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/commit/707b0b2)) | ||
## [2.5.2](https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/compare/v2.5.1...v2.5.2) (2019-04-24) | ||
@@ -8,0 +20,0 @@ |
@@ -70,2 +70,13 @@ import { RequestEnvelope, Slot, SupportedInterfaces } from 'ask-sdk-model'; | ||
/** | ||
* Retrieves the user ID from the request. | ||
* | ||
* The method retrieves the userId property from the input request. This value uniquely identifies the user | ||
* and is generally used as input for some Alexa-specific API calls. More information about this can be found here: | ||
* https://developer.amazon.com/docs/custom-skills/request-and-response-json-reference.html#system-object | ||
* | ||
* @param {RequestEnvelope} requestEnvelope | ||
* @return {string} | ||
*/ | ||
export declare function getUserId(requestEnvelope: RequestEnvelope): string; | ||
/** | ||
* Retrieves the dialog state from the request. | ||
@@ -72,0 +83,0 @@ * |
@@ -105,2 +105,16 @@ "use strict"; | ||
/** | ||
* Retrieves the user ID from the request. | ||
* | ||
* The method retrieves the userId property from the input request. This value uniquely identifies the user | ||
* and is generally used as input for some Alexa-specific API calls. More information about this can be found here: | ||
* https://developer.amazon.com/docs/custom-skills/request-and-response-json-reference.html#system-object | ||
* | ||
* @param {RequestEnvelope} requestEnvelope | ||
* @return {string} | ||
*/ | ||
function getUserId(requestEnvelope) { | ||
return requestEnvelope.context.System.user ? requestEnvelope.context.System.user.userId : null; | ||
} | ||
exports.getUserId = getUserId; | ||
/** | ||
* Retrieves the dialog state from the request. | ||
@@ -107,0 +121,0 @@ * |
import { RequestEnvelope } from 'ask-sdk-model'; | ||
export declare type ViewportProfile = 'HUB-ROUND-SMALL' | 'HUB-LANDSCAPE-MEDIUM' | 'HUB-LANDSCAPE-LARGE' | 'MOBILE-LANDSCAPE-SMALL' | 'MOBILE-PORTRAIT-SMALL' | 'MOBILE-LANDSCAPE-MEDIUM' | 'MOBILE-PORTRAIT-MEDIUM' | 'TV-LANDSCAPE-XLARGE' | 'TV-PORTRAIT-MEDIUM' | 'TV-LANDSCAPE-MEDIUM' | 'UNKNOWN-VIEWPORT-PROFILE'; | ||
export declare type ViewportProfile = 'HUB-ROUND-SMALL' | 'HUB-LANDSCAPE-SMALL' | 'HUB-LANDSCAPE-MEDIUM' | 'HUB-LANDSCAPE-LARGE' | 'MOBILE-LANDSCAPE-SMALL' | 'MOBILE-PORTRAIT-SMALL' | 'MOBILE-LANDSCAPE-MEDIUM' | 'MOBILE-PORTRAIT-MEDIUM' | 'TV-LANDSCAPE-XLARGE' | 'TV-PORTRAIT-MEDIUM' | 'TV-LANDSCAPE-MEDIUM' | 'UNKNOWN-VIEWPORT-PROFILE'; | ||
export declare type ViewportOrientation = 'EQUAL' | 'LANDSCAPE' | 'PORTRAIT'; | ||
@@ -4,0 +4,0 @@ export declare type ViewportSizeGroup = 'XSMALL' | 'SMALL' | 'MEDIUM' | 'LARGE' | 'XLARGE'; |
@@ -120,2 +120,9 @@ "use strict"; | ||
&& exports.ViewportSizeGroupOrder.indexOf(pixelWidthSizeGroup) <= exports.ViewportSizeGroupOrder.indexOf('MEDIUM') | ||
&& exports.ViewportSizeGroupOrder.indexOf(pixelHeightSizeGroup) <= exports.ViewportSizeGroupOrder.indexOf('XSMALL')) { | ||
return 'HUB-LANDSCAPE-SMALL'; | ||
} | ||
if (shape === 'RECTANGLE' | ||
&& viewportOrientation === 'LANDSCAPE' | ||
&& viewportDpiGroup === 'LOW' | ||
&& exports.ViewportSizeGroupOrder.indexOf(pixelWidthSizeGroup) <= exports.ViewportSizeGroupOrder.indexOf('MEDIUM') | ||
&& exports.ViewportSizeGroupOrder.indexOf(pixelHeightSizeGroup) <= exports.ViewportSizeGroupOrder.indexOf('SMALL')) { | ||
@@ -122,0 +129,0 @@ return 'HUB-LANDSCAPE-MEDIUM'; |
{ | ||
"name": "ask-sdk-core", | ||
"version": "2.5.2", | ||
"version": "2.6.0", | ||
"description": "Core package for Alexa Skills Kit SDK", | ||
@@ -52,3 +52,3 @@ "main": "dist/index.js", | ||
"homepage": "https://github.com/alexa/alexa-skill-sdk-for-nodejs#readme", | ||
"gitHead": "9f760e09799e5451b6c5e9860decd756a2e7b18a" | ||
"gitHead": "976e0a1d03588f471cdd1c201d037867619e5487" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
161774
2436