stentor-models 1.56.79 → 1.56.84

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
  */
@@ -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;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "1.56.79",
7
+ "version": "1.56.84",
8
8
  "description": "Models for 📣 stentor",
9
9
  "types": "lib/index",
10
10
  "typings": "lib/index",
@@ -17,7 +17,7 @@
17
17
  "node": "^10 || ^12 || ^14 || ^16.0.0"
18
18
  },
19
19
  "devDependencies": {
20
- "@microsoft/api-extractor": "7.30.0",
20
+ "@microsoft/api-extractor": "7.31.1",
21
21
  "@rollup/plugin-typescript": "8.5.0",
22
22
  "@xapp/config": "0.2.3",
23
23
  "rollup": "2.79.0",
@@ -33,5 +33,5 @@
33
33
  "dependencies": {
34
34
  "@xapp/patterns": "1.40.260"
35
35
  },
36
- "gitHead": "322fe965bb5f17ab21f3d13855934782de7ff1bd"
36
+ "gitHead": "7b63a80fadb639d604c928bbd1587b10e5eb825d"
37
37
  }