stentor-models 1.56.76 → 1.56.80
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.
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
2
|
import { KnowledgeBaseResult } from "./KnowledgeBase";
|
|
3
|
-
import { BaseRequest } from "./Request";
|
|
3
|
+
import { BaseRequest, SentimentedRequest } from "./Request";
|
|
4
4
|
import { InputUnknownID, InputUnknownRequestType } from "./Types";
|
|
5
5
|
/**
|
|
6
6
|
* Request when a user requests something not in the interaction model.
|
|
7
7
|
*/
|
|
8
|
-
export interface InputUnknownRequest extends BaseRequest {
|
|
8
|
+
export interface InputUnknownRequest extends BaseRequest, SentimentedRequest {
|
|
9
9
|
type: InputUnknownRequestType;
|
|
10
10
|
/**
|
|
11
11
|
* Input Unknowns have a constant intentId.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! Copyright (c) 2019, XAPPmedia */
|
|
2
2
|
import { DateTime, DateTimeRange, Duration } from "../DateTime";
|
|
3
3
|
import { Data } from "../Handler";
|
|
4
|
-
import { BaseRequest } from "./Request";
|
|
4
|
+
import { BaseRequest, SentimentedRequest } from "./Request";
|
|
5
5
|
import { IntentRequestType } from "./Types";
|
|
6
6
|
import { KnowledgeAnswer, KnowledgeBaseResult } from "./KnowledgeBase";
|
|
7
7
|
export declare type RequestSlotValues = string | number | object | DateTimeRange | DateTime | Duration | (string)[];
|
|
@@ -75,7 +75,7 @@ export interface RequestSlotMap {
|
|
|
75
75
|
*
|
|
76
76
|
* For Alexa see {@link https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/handling-requests-sent-by-alexa#intentrequest}
|
|
77
77
|
*/
|
|
78
|
-
export interface IntentRequest extends BaseRequest {
|
|
78
|
+
export interface IntentRequest extends BaseRequest, SentimentedRequest {
|
|
79
79
|
/**
|
|
80
80
|
* The type of an intent request is always "INTENT_REQUEST"
|
|
81
81
|
*/
|
package/lib/Request/Request.d.ts
CHANGED
|
@@ -114,6 +114,31 @@ export interface BaseRequest {
|
|
|
114
114
|
*/
|
|
115
115
|
attributes?: Record<string, unknown>;
|
|
116
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* A request with sentiment analysis information
|
|
119
|
+
*/
|
|
120
|
+
export interface SentimentedRequest {
|
|
121
|
+
/**
|
|
122
|
+
* An analysis on the user's query text sentiment
|
|
123
|
+
*/
|
|
124
|
+
sentimentAnalysis?: {
|
|
125
|
+
/**
|
|
126
|
+
* An abstracted measure of the sentiment.
|
|
127
|
+
*
|
|
128
|
+
* * POSITIVE - Query has positive sentiment
|
|
129
|
+
* * NEUTRAL - Query has either positive or negative sentiment
|
|
130
|
+
* * NEGATIVE - Query has negative sentiment
|
|
131
|
+
* * MIXED - Query has both positive and negative sentiment
|
|
132
|
+
*/
|
|
133
|
+
sentiment: "POSITIVE" | "NEUTRAL" | "NEGATIVE" | "MIXED";
|
|
134
|
+
/**
|
|
135
|
+
* The original payload from the sentiment analysis engine stringified
|
|
136
|
+
*
|
|
137
|
+
* You can use `JSON.parse` on this data to extract more information.
|
|
138
|
+
*/
|
|
139
|
+
original?: string;
|
|
140
|
+
};
|
|
141
|
+
}
|
|
117
142
|
export interface ApiAccessData {
|
|
118
143
|
apiBaseUrl: string;
|
|
119
144
|
apiAuthToken: string;
|
|
@@ -46,7 +46,7 @@ export interface ResponseData {
|
|
|
46
46
|
/**
|
|
47
47
|
* Provides context to the user for select system responses.
|
|
48
48
|
*
|
|
49
|
-
* Used for SURFACE_CHANGE, ACCOUNT_LINK,
|
|
49
|
+
* Used for SURFACE_CHANGE, ACCOUNT_LINK, or generically to pass information to the client surface.
|
|
50
50
|
*/
|
|
51
51
|
content?: string;
|
|
52
52
|
/**
|
|
@@ -56,7 +56,7 @@ export interface ResponseData {
|
|
|
56
56
|
*/
|
|
57
57
|
title?: string;
|
|
58
58
|
/**
|
|
59
|
-
* If a request ({@link see IntentRequest.canFulfill}) has
|
|
59
|
+
* If a request ({@link see IntentRequest.canFulfill}) has canFulfill as true,
|
|
60
60
|
* this provides information about it's ability to fulfill the request.
|
|
61
61
|
*
|
|
62
62
|
*/
|
|
@@ -112,7 +112,7 @@ export interface SimpleResponse<T = string | ResponseOutput> extends Partial<Act
|
|
|
112
112
|
/**
|
|
113
113
|
* System responses to perform account links, control media, surface changes, and permission requests.
|
|
114
114
|
*/
|
|
115
|
-
system?: "ACCOUNT_LINK" | "MEDIA_ENQUEUE" | "MEDIA_STOP" | "
|
|
115
|
+
system?: "ACCOUNT_LINK" | "HANDOFF" | "MEDIA_ENQUEUE" | "MEDIA_STOP" | "PERMISSION_EMAIL" | "PERMISSION_LIST" | "PERMISSION_LOCATION_COARSE" | "PERMISSION_LOCATION_PRECISE" | "PERMISSION_NOTIFICATION" | "PERMISSION_PHONE_NUMBER" | "SURFACE_CHANGE" | "SURFACE_CLOSE" | "SURFACE_MINIMIZE" | "SURFACE_RESET" | "TRANSACTION_DECISION" | "TRANSACTION_DELIVERY_ADDRESS" | "TRANSACTION_REQUIREMENTS_CHECK" | "TRANSACTION_STATUS" | "TRANSFER_CALL";
|
|
116
116
|
/**
|
|
117
117
|
* Supplemental data to augment the response.
|
|
118
118
|
*/
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.56.
|
|
7
|
+
"version": "1.56.80",
|
|
8
8
|
"description": "Models for 📣 stentor",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"typings": "lib/index",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@xapp/patterns": "1.40.260"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "9aa313f608b16a86eeb82b5a9fba894ec2c648bb"
|
|
37
37
|
}
|