@xapp/stentor-alexa-lib 1.58.25 → 1.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Guards.js +12 -13
- package/lib/Guards.js.map +1 -1
- package/package.json +6 -6
package/lib/Guards.js
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.isAlexaRequestBody = isAlexaRequestBody;
|
|
4
|
+
exports.isLaunchRequest = isLaunchRequest;
|
|
5
|
+
exports.isAudioPlayerRequest = isAudioPlayerRequest;
|
|
6
|
+
exports.isPlaybackControllerRequest = isPlaybackControllerRequest;
|
|
7
|
+
exports.isIntentRequest = isIntentRequest;
|
|
8
|
+
exports.isSSMLOutput = isSSMLOutput;
|
|
9
|
+
exports.isAudioPlayerPlayDirective = isAudioPlayerPlayDirective;
|
|
10
|
+
exports.isVideoAppLaunchDirective = isVideoAppLaunchDirective;
|
|
11
|
+
exports.isRenderDocumentDirective = isRenderDocumentDirective;
|
|
12
|
+
exports.isInteractionModel = isInteractionModel;
|
|
13
|
+
exports.isInteractionModelWrapper = isInteractionModelWrapper;
|
|
14
|
+
exports.isAlexaChannelData = isAlexaChannelData;
|
|
4
15
|
const index_1 = require("./index");
|
|
5
16
|
const ALEXA = require("./Constants");
|
|
6
17
|
/**
|
|
@@ -16,7 +27,6 @@ function isAlexaRequestBody(requestBody) {
|
|
|
16
27
|
requestBody.context !== undefined &&
|
|
17
28
|
requestBody.request !== undefined);
|
|
18
29
|
}
|
|
19
|
-
exports.isAlexaRequestBody = isAlexaRequestBody;
|
|
20
30
|
/**
|
|
21
31
|
* Determine if the request is a LaunchRequest
|
|
22
32
|
*
|
|
@@ -27,7 +37,6 @@ exports.isAlexaRequestBody = isAlexaRequestBody;
|
|
|
27
37
|
function isLaunchRequest(request) {
|
|
28
38
|
return !!request && request.type === ALEXA.LAUNCH_REQUEST;
|
|
29
39
|
}
|
|
30
|
-
exports.isLaunchRequest = isLaunchRequest;
|
|
31
40
|
/**
|
|
32
41
|
* Is the request from Alexa an AudioPlayer request
|
|
33
42
|
*
|
|
@@ -48,7 +57,6 @@ function isAudioPlayerRequest(request) {
|
|
|
48
57
|
return false;
|
|
49
58
|
}
|
|
50
59
|
}
|
|
51
|
-
exports.isAudioPlayerRequest = isAudioPlayerRequest;
|
|
52
60
|
/**
|
|
53
61
|
* Is the request from Alexa a PlaybackController request
|
|
54
62
|
*
|
|
@@ -67,7 +75,6 @@ function isPlaybackControllerRequest(request) {
|
|
|
67
75
|
return false;
|
|
68
76
|
}
|
|
69
77
|
}
|
|
70
|
-
exports.isPlaybackControllerRequest = isPlaybackControllerRequest;
|
|
71
78
|
/**
|
|
72
79
|
* Is the request from Alexa an Intent request
|
|
73
80
|
*
|
|
@@ -83,7 +90,6 @@ function isIntentRequest(request) {
|
|
|
83
90
|
return false;
|
|
84
91
|
}
|
|
85
92
|
}
|
|
86
|
-
exports.isIntentRequest = isIntentRequest;
|
|
87
93
|
/**
|
|
88
94
|
* Determines if the output speech is SSML
|
|
89
95
|
*
|
|
@@ -94,7 +100,6 @@ exports.isIntentRequest = isIntentRequest;
|
|
|
94
100
|
function isSSMLOutput(outputSpeech) {
|
|
95
101
|
return outputSpeech.type === index_1.SSML_TYPE;
|
|
96
102
|
}
|
|
97
|
-
exports.isSSMLOutput = isSSMLOutput;
|
|
98
103
|
/**
|
|
99
104
|
* Determines if the directive is a AudioPlayerPlayDirective
|
|
100
105
|
*
|
|
@@ -105,7 +110,6 @@ exports.isSSMLOutput = isSSMLOutput;
|
|
|
105
110
|
function isAudioPlayerPlayDirective(directive) {
|
|
106
111
|
return directive.type === ALEXA.AUDIO_PLAYER_PLAY;
|
|
107
112
|
}
|
|
108
|
-
exports.isAudioPlayerPlayDirective = isAudioPlayerPlayDirective;
|
|
109
113
|
/**
|
|
110
114
|
* Determines if the directive is a VideoAppDirective
|
|
111
115
|
*
|
|
@@ -116,7 +120,6 @@ exports.isAudioPlayerPlayDirective = isAudioPlayerPlayDirective;
|
|
|
116
120
|
function isVideoAppLaunchDirective(directive) {
|
|
117
121
|
return directive.type === ALEXA.VIDEO_APP_LAUNCH;
|
|
118
122
|
}
|
|
119
|
-
exports.isVideoAppLaunchDirective = isVideoAppLaunchDirective;
|
|
120
123
|
/**
|
|
121
124
|
* Determines if the directive is a RenderDocumentDirective for the Alexa Presentation Language
|
|
122
125
|
*
|
|
@@ -127,7 +130,6 @@ exports.isVideoAppLaunchDirective = isVideoAppLaunchDirective;
|
|
|
127
130
|
function isRenderDocumentDirective(json) {
|
|
128
131
|
return !!json && json.type === "Alexa.Presentation.APL.RenderDocument";
|
|
129
132
|
}
|
|
130
|
-
exports.isRenderDocumentDirective = isRenderDocumentDirective;
|
|
131
133
|
/**
|
|
132
134
|
* Guard to check if the object is an interaction model.
|
|
133
135
|
*
|
|
@@ -138,7 +140,6 @@ exports.isRenderDocumentDirective = isRenderDocumentDirective;
|
|
|
138
140
|
function isInteractionModel(json) {
|
|
139
141
|
return !!json && json.languageModel !== undefined;
|
|
140
142
|
}
|
|
141
|
-
exports.isInteractionModel = isInteractionModel;
|
|
142
143
|
/**
|
|
143
144
|
* Guard to check if the object is an interaction model wrapper
|
|
144
145
|
* that is seen in the Alexa Skills Kit console JSON editor.
|
|
@@ -148,7 +149,6 @@ exports.isInteractionModel = isInteractionModel;
|
|
|
148
149
|
function isInteractionModelWrapper(json) {
|
|
149
150
|
return !!json && typeof json.interactionModel === "object";
|
|
150
151
|
}
|
|
151
|
-
exports.isInteractionModelWrapper = isInteractionModelWrapper;
|
|
152
152
|
/**
|
|
153
153
|
* Is the channel data for Alexa.
|
|
154
154
|
*
|
|
@@ -159,5 +159,4 @@ exports.isInteractionModelWrapper = isInteractionModelWrapper;
|
|
|
159
159
|
function isAlexaChannelData(data) {
|
|
160
160
|
return !!data && data.type === ALEXA.ALEXA_PLATFORM;
|
|
161
161
|
}
|
|
162
|
-
exports.isAlexaChannelData = isAlexaChannelData;
|
|
163
162
|
//# sourceMappingURL=Guards.js.map
|
package/lib/Guards.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Guards.js","sourceRoot":"","sources":["../src/Guards.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Guards.js","sourceRoot":"","sources":["../src/Guards.ts"],"names":[],"mappings":";;AA8BA,gDAOC;AASD,0CAEC;AASD,oDAYC;AASD,kEAUC;AASD,0CAOC;AASD,oCAEC;AASD,gEAEC;AASD,8DAEC;AAQD,8DAEC;AASD,gDAEC;AAQD,8DAEC;AASD,gDAEC;AA/KD,mCAeiB;AACjB,qCAAqC;AAGrC;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAAC,WAAgB;IAC/C,OAAO,CACH,WAAW,KAAK,SAAS;QACzB,WAAW,CAAC,OAAO,KAAK,SAAS;QACjC,WAAW,CAAC,OAAO,KAAK,SAAS;QACjC,WAAW,CAAC,OAAO,KAAK,SAAS,CACpC,CAAC;AACN,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,eAAe,CAAC,OAAgB;IAC5C,OAAO,CAAC,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK,CAAC,cAAc,CAAC;AAC9D,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,OAAgB;IACjD,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;QACnB,KAAK,KAAK,CAAC,6BAA6B,CAAC;QACzC,KAAK,KAAK,CAAC,8BAA8B,CAAC;QAC1C,KAAK,KAAK,CAAC,6BAA6B,CAAC;QACzC,KAAK,KAAK,CAAC,qCAAqC,CAAC;QACjD,KAAK,KAAK,CAAC,4BAA4B,CAAC;QACxC,KAAK,KAAK,CAAC,4BAA4B;YACnC,OAAO,IAAI,CAAC;QAChB;YACI,OAAO,KAAK,CAAC;IACrB,CAAC;AACL,CAAC;AAED;;;;;;G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C,IAAK,CAAC,gBAAgB,KAAK,QAAQ,CAAC;AAC1F,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAAC,IAAiB;IAChD,OAAO,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,cAAc,CAAC;AACxD,CAAC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.59.0",
|
|
8
8
|
"description": "Models & constants for the Alexa Channel",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"main": "lib/index",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"@xapp/config": "0.2.3",
|
|
20
20
|
"chai": "4.4.1",
|
|
21
21
|
"mocha": "10.4.0",
|
|
22
|
-
"stentor-constants": "1.59.
|
|
23
|
-
"stentor-models": "1.59.
|
|
24
|
-
"stentor-utils": "1.59.
|
|
22
|
+
"stentor-constants": "1.59.70",
|
|
23
|
+
"stentor-models": "1.59.70",
|
|
24
|
+
"stentor-utils": "1.59.70",
|
|
25
25
|
"ts-node": "10.9.2",
|
|
26
|
-
"typescript": "5.
|
|
26
|
+
"typescript": "5.5.2"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"ask-sdk-model": "1.86.0",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"clean": "rm -rf ./lib/*",
|
|
40
40
|
"test": "mocha --recursive -r ts-node/register \"./src/**/*.test.ts\""
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "8675831565d23ea748dbba9423e5f0d8cc42771f"
|
|
43
43
|
}
|