ultracart_rest_api_v2_typescript 4.0.137 → 4.0.138
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/.openapi-generator/FILES +1 -0
- package/README.md +3 -2
- package/dist/models/Conversation.d.ts +7 -0
- package/dist/models/Conversation.js +3 -0
- package/dist/models/ConversationSentiment.d.ts +67 -0
- package/dist/models/ConversationSentiment.js +61 -0
- package/dist/models/ConversationSummary.d.ts +7 -0
- package/dist/models/ConversationSummary.js +3 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/models/Conversation.ts +14 -0
- package/src/models/ConversationSentiment.ts +109 -0
- package/src/models/ConversationSummary.ts +14 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -192,6 +192,7 @@ src/models/ConversationPermissionsResponse.ts
|
|
|
192
192
|
src/models/ConversationResponse.ts
|
|
193
193
|
src/models/ConversationSearchRequest.ts
|
|
194
194
|
src/models/ConversationSearchResponse.ts
|
|
195
|
+
src/models/ConversationSentiment.ts
|
|
195
196
|
src/models/ConversationStartRequest.ts
|
|
196
197
|
src/models/ConversationStartResponse.ts
|
|
197
198
|
src/models/ConversationSummary.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## ultracart_rest_api_v2_typescript@4.0.
|
|
1
|
+
## ultracart_rest_api_v2_typescript@4.0.138
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install ultracart_rest_api_v2_typescript@4.0.
|
|
39
|
+
npm install ultracart_rest_api_v2_typescript@4.0.138 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -54,6 +54,7 @@ Not every change is committed to every SDK.
|
|
|
54
54
|
|
|
55
55
|
| Version | Date | Comments |
|
|
56
56
|
| --: | :-: | --- |
|
|
57
|
+
| 4.0.138 | 03/01/2023 | convo - add sentiment record to conversation obj |
|
|
57
58
|
| 4.0.137 | 02/22/2023 | convo - customer initiated flag on engagement |
|
|
58
59
|
| 4.0.136 | 02/20/2023 | refund reasons |
|
|
59
60
|
| 4.0.135 | 02/17/2023 | convo api - smsUnsubscribeConversation method |
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { ConversationMessage } from './ConversationMessage';
|
|
13
13
|
import { ConversationParticipant } from './ConversationParticipant';
|
|
14
|
+
import { ConversationSentiment } from './ConversationSentiment';
|
|
14
15
|
/**
|
|
15
16
|
*
|
|
16
17
|
* @export
|
|
@@ -107,6 +108,12 @@ export interface Conversation {
|
|
|
107
108
|
* @memberof Conversation
|
|
108
109
|
*/
|
|
109
110
|
participants?: Array<ConversationParticipant>;
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
* @type {ConversationSentiment}
|
|
114
|
+
* @memberof Conversation
|
|
115
|
+
*/
|
|
116
|
+
sentiment?: ConversationSentiment;
|
|
110
117
|
/**
|
|
111
118
|
* Start of the conversation date/time
|
|
112
119
|
* @type {string}
|
|
@@ -17,6 +17,7 @@ exports.ConversationToJSON = exports.ConversationFromJSONTyped = exports.Convers
|
|
|
17
17
|
var runtime_1 = require("../runtime");
|
|
18
18
|
var ConversationMessage_1 = require("./ConversationMessage");
|
|
19
19
|
var ConversationParticipant_1 = require("./ConversationParticipant");
|
|
20
|
+
var ConversationSentiment_1 = require("./ConversationSentiment");
|
|
20
21
|
/**
|
|
21
22
|
* @export
|
|
22
23
|
*/
|
|
@@ -48,6 +49,7 @@ function ConversationFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
48
49
|
'message_count': !(0, runtime_1.exists)(json, 'message_count') ? undefined : json['message_count'],
|
|
49
50
|
'messages': !(0, runtime_1.exists)(json, 'messages') ? undefined : (json['messages'].map(ConversationMessage_1.ConversationMessageFromJSON)),
|
|
50
51
|
'participants': !(0, runtime_1.exists)(json, 'participants') ? undefined : (json['participants'].map(ConversationParticipant_1.ConversationParticipantFromJSON)),
|
|
52
|
+
'sentiment': !(0, runtime_1.exists)(json, 'sentiment') ? undefined : (0, ConversationSentiment_1.ConversationSentimentFromJSON)(json['sentiment']),
|
|
51
53
|
'start_dts': !(0, runtime_1.exists)(json, 'start_dts') ? undefined : json['start_dts'],
|
|
52
54
|
'unread_messages': !(0, runtime_1.exists)(json, 'unread_messages') ? undefined : json['unread_messages'],
|
|
53
55
|
'visible': !(0, runtime_1.exists)(json, 'visible') ? undefined : json['visible'],
|
|
@@ -77,6 +79,7 @@ function ConversationToJSON(value) {
|
|
|
77
79
|
'message_count': value.message_count,
|
|
78
80
|
'messages': value.messages === undefined ? undefined : (value.messages.map(ConversationMessage_1.ConversationMessageToJSON)),
|
|
79
81
|
'participants': value.participants === undefined ? undefined : (value.participants.map(ConversationParticipant_1.ConversationParticipantToJSON)),
|
|
82
|
+
'sentiment': (0, ConversationSentiment_1.ConversationSentimentToJSON)(value.sentiment),
|
|
80
83
|
'start_dts': value.start_dts,
|
|
81
84
|
'unread_messages': value.unread_messages,
|
|
82
85
|
'visible': value.visible,
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UltraCart Rest API V2
|
|
3
|
+
* UltraCart REST API Version 2
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.0.0
|
|
6
|
+
* Contact: support@ultracart.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ConversationSentiment
|
|
16
|
+
*/
|
|
17
|
+
export interface ConversationSentiment {
|
|
18
|
+
/**
|
|
19
|
+
* The last time the detect sentiment was run on this conversation
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ConversationSentiment
|
|
22
|
+
*/
|
|
23
|
+
last_detect_sentiment?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The mixed score
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ConversationSentiment
|
|
28
|
+
*/
|
|
29
|
+
mixed?: number;
|
|
30
|
+
/**
|
|
31
|
+
* The negative score
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof ConversationSentiment
|
|
34
|
+
*/
|
|
35
|
+
negative?: number;
|
|
36
|
+
/**
|
|
37
|
+
* The neutral score
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof ConversationSentiment
|
|
40
|
+
*/
|
|
41
|
+
neutral?: number;
|
|
42
|
+
/**
|
|
43
|
+
* The positive score
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof ConversationSentiment
|
|
46
|
+
*/
|
|
47
|
+
positive?: number;
|
|
48
|
+
/**
|
|
49
|
+
* The overall sentiment
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof ConversationSentiment
|
|
52
|
+
*/
|
|
53
|
+
sentiment?: ConversationSentimentSentimentEnum;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @export
|
|
57
|
+
*/
|
|
58
|
+
export declare const ConversationSentimentSentimentEnum: {
|
|
59
|
+
readonly Positive: "POSITIVE";
|
|
60
|
+
readonly Neutral: "NEUTRAL";
|
|
61
|
+
readonly Negative: "NEGATIVE";
|
|
62
|
+
readonly Mixed: "MIXED";
|
|
63
|
+
};
|
|
64
|
+
export type ConversationSentimentSentimentEnum = typeof ConversationSentimentSentimentEnum[keyof typeof ConversationSentimentSentimentEnum];
|
|
65
|
+
export declare function ConversationSentimentFromJSON(json: any): ConversationSentiment;
|
|
66
|
+
export declare function ConversationSentimentFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationSentiment;
|
|
67
|
+
export declare function ConversationSentimentToJSON(value?: ConversationSentiment | null): any;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* UltraCart Rest API V2
|
|
6
|
+
* UltraCart REST API Version 2
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.0.0
|
|
9
|
+
* Contact: support@ultracart.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ConversationSentimentToJSON = exports.ConversationSentimentFromJSONTyped = exports.ConversationSentimentFromJSON = exports.ConversationSentimentSentimentEnum = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* @export
|
|
20
|
+
*/
|
|
21
|
+
exports.ConversationSentimentSentimentEnum = {
|
|
22
|
+
Positive: 'POSITIVE',
|
|
23
|
+
Neutral: 'NEUTRAL',
|
|
24
|
+
Negative: 'NEGATIVE',
|
|
25
|
+
Mixed: 'MIXED'
|
|
26
|
+
};
|
|
27
|
+
function ConversationSentimentFromJSON(json) {
|
|
28
|
+
return ConversationSentimentFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
exports.ConversationSentimentFromJSON = ConversationSentimentFromJSON;
|
|
31
|
+
function ConversationSentimentFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if ((json === undefined) || (json === null)) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'last_detect_sentiment': !(0, runtime_1.exists)(json, 'last_detect_sentiment') ? undefined : json['last_detect_sentiment'],
|
|
37
|
+
'mixed': !(0, runtime_1.exists)(json, 'mixed') ? undefined : json['mixed'],
|
|
38
|
+
'negative': !(0, runtime_1.exists)(json, 'negative') ? undefined : json['negative'],
|
|
39
|
+
'neutral': !(0, runtime_1.exists)(json, 'neutral') ? undefined : json['neutral'],
|
|
40
|
+
'positive': !(0, runtime_1.exists)(json, 'positive') ? undefined : json['positive'],
|
|
41
|
+
'sentiment': !(0, runtime_1.exists)(json, 'sentiment') ? undefined : json['sentiment'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
exports.ConversationSentimentFromJSONTyped = ConversationSentimentFromJSONTyped;
|
|
45
|
+
function ConversationSentimentToJSON(value) {
|
|
46
|
+
if (value === undefined) {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
if (value === null) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'last_detect_sentiment': value.last_detect_sentiment,
|
|
54
|
+
'mixed': value.mixed,
|
|
55
|
+
'negative': value.negative,
|
|
56
|
+
'neutral': value.neutral,
|
|
57
|
+
'positive': value.positive,
|
|
58
|
+
'sentiment': value.sentiment,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
exports.ConversationSentimentToJSON = ConversationSentimentToJSON;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import { ConversationParticipant } from './ConversationParticipant';
|
|
13
|
+
import { ConversationSentiment } from './ConversationSentiment';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
15
16
|
* @export
|
|
@@ -94,6 +95,12 @@ export interface ConversationSummary {
|
|
|
94
95
|
* @memberof ConversationSummary
|
|
95
96
|
*/
|
|
96
97
|
participants?: Array<ConversationParticipant>;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @type {ConversationSentiment}
|
|
101
|
+
* @memberof ConversationSummary
|
|
102
|
+
*/
|
|
103
|
+
sentiment?: ConversationSentiment;
|
|
97
104
|
/**
|
|
98
105
|
* Start of the conversation date/time
|
|
99
106
|
* @type {string}
|
|
@@ -16,6 +16,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.ConversationSummaryToJSON = exports.ConversationSummaryFromJSONTyped = exports.ConversationSummaryFromJSON = exports.ConversationSummaryMediumEnum = void 0;
|
|
17
17
|
var runtime_1 = require("../runtime");
|
|
18
18
|
var ConversationParticipant_1 = require("./ConversationParticipant");
|
|
19
|
+
var ConversationSentiment_1 = require("./ConversationSentiment");
|
|
19
20
|
/**
|
|
20
21
|
* @export
|
|
21
22
|
*/
|
|
@@ -45,6 +46,7 @@ function ConversationSummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
45
46
|
'merchant_id': !(0, runtime_1.exists)(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
46
47
|
'message_count': !(0, runtime_1.exists)(json, 'message_count') ? undefined : json['message_count'],
|
|
47
48
|
'participants': !(0, runtime_1.exists)(json, 'participants') ? undefined : (json['participants'].map(ConversationParticipant_1.ConversationParticipantFromJSON)),
|
|
49
|
+
'sentiment': !(0, runtime_1.exists)(json, 'sentiment') ? undefined : (0, ConversationSentiment_1.ConversationSentimentFromJSON)(json['sentiment']),
|
|
48
50
|
'start_dts': !(0, runtime_1.exists)(json, 'start_dts') ? undefined : json['start_dts'],
|
|
49
51
|
'unread_messages': !(0, runtime_1.exists)(json, 'unread_messages') ? undefined : json['unread_messages'],
|
|
50
52
|
'visible': !(0, runtime_1.exists)(json, 'visible') ? undefined : json['visible'],
|
|
@@ -72,6 +74,7 @@ function ConversationSummaryToJSON(value) {
|
|
|
72
74
|
'merchant_id': value.merchant_id,
|
|
73
75
|
'message_count': value.message_count,
|
|
74
76
|
'participants': value.participants === undefined ? undefined : (value.participants.map(ConversationParticipant_1.ConversationParticipantToJSON)),
|
|
77
|
+
'sentiment': (0, ConversationSentiment_1.ConversationSentimentToJSON)(value.sentiment),
|
|
75
78
|
'start_dts': value.start_dts,
|
|
76
79
|
'unread_messages': value.unread_messages,
|
|
77
80
|
'visible': value.visible,
|
package/dist/models/index.d.ts
CHANGED
|
@@ -167,6 +167,7 @@ export * from './ConversationPermissionsResponse';
|
|
|
167
167
|
export * from './ConversationResponse';
|
|
168
168
|
export * from './ConversationSearchRequest';
|
|
169
169
|
export * from './ConversationSearchResponse';
|
|
170
|
+
export * from './ConversationSentiment';
|
|
170
171
|
export * from './ConversationStartRequest';
|
|
171
172
|
export * from './ConversationStartResponse';
|
|
172
173
|
export * from './ConversationSummary';
|
package/dist/models/index.js
CHANGED
|
@@ -185,6 +185,7 @@ __exportStar(require("./ConversationPermissionsResponse"), exports);
|
|
|
185
185
|
__exportStar(require("./ConversationResponse"), exports);
|
|
186
186
|
__exportStar(require("./ConversationSearchRequest"), exports);
|
|
187
187
|
__exportStar(require("./ConversationSearchResponse"), exports);
|
|
188
|
+
__exportStar(require("./ConversationSentiment"), exports);
|
|
188
189
|
__exportStar(require("./ConversationStartRequest"), exports);
|
|
189
190
|
__exportStar(require("./ConversationStartResponse"), exports);
|
|
190
191
|
__exportStar(require("./ConversationSummary"), exports);
|
package/package.json
CHANGED
|
@@ -25,6 +25,12 @@ import {
|
|
|
25
25
|
ConversationParticipantFromJSONTyped,
|
|
26
26
|
ConversationParticipantToJSON,
|
|
27
27
|
} from './ConversationParticipant';
|
|
28
|
+
import {
|
|
29
|
+
ConversationSentiment,
|
|
30
|
+
ConversationSentimentFromJSON,
|
|
31
|
+
ConversationSentimentFromJSONTyped,
|
|
32
|
+
ConversationSentimentToJSON,
|
|
33
|
+
} from './ConversationSentiment';
|
|
28
34
|
|
|
29
35
|
/**
|
|
30
36
|
*
|
|
@@ -122,6 +128,12 @@ export interface Conversation {
|
|
|
122
128
|
* @memberof Conversation
|
|
123
129
|
*/
|
|
124
130
|
participants?: Array<ConversationParticipant>;
|
|
131
|
+
/**
|
|
132
|
+
*
|
|
133
|
+
* @type {ConversationSentiment}
|
|
134
|
+
* @memberof Conversation
|
|
135
|
+
*/
|
|
136
|
+
sentiment?: ConversationSentiment;
|
|
125
137
|
/**
|
|
126
138
|
* Start of the conversation date/time
|
|
127
139
|
* @type {string}
|
|
@@ -178,6 +190,7 @@ export function ConversationFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
178
190
|
'message_count': !exists(json, 'message_count') ? undefined : json['message_count'],
|
|
179
191
|
'messages': !exists(json, 'messages') ? undefined : ((json['messages'] as Array<any>).map(ConversationMessageFromJSON)),
|
|
180
192
|
'participants': !exists(json, 'participants') ? undefined : ((json['participants'] as Array<any>).map(ConversationParticipantFromJSON)),
|
|
193
|
+
'sentiment': !exists(json, 'sentiment') ? undefined : ConversationSentimentFromJSON(json['sentiment']),
|
|
181
194
|
'start_dts': !exists(json, 'start_dts') ? undefined : json['start_dts'],
|
|
182
195
|
'unread_messages': !exists(json, 'unread_messages') ? undefined : json['unread_messages'],
|
|
183
196
|
'visible': !exists(json, 'visible') ? undefined : json['visible'],
|
|
@@ -208,6 +221,7 @@ export function ConversationToJSON(value?: Conversation | null): any {
|
|
|
208
221
|
'message_count': value.message_count,
|
|
209
222
|
'messages': value.messages === undefined ? undefined : ((value.messages as Array<any>).map(ConversationMessageToJSON)),
|
|
210
223
|
'participants': value.participants === undefined ? undefined : ((value.participants as Array<any>).map(ConversationParticipantToJSON)),
|
|
224
|
+
'sentiment': ConversationSentimentToJSON(value.sentiment),
|
|
211
225
|
'start_dts': value.start_dts,
|
|
212
226
|
'unread_messages': value.unread_messages,
|
|
213
227
|
'visible': value.visible,
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* UltraCart Rest API V2
|
|
5
|
+
* UltraCart REST API Version 2
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
* Contact: support@ultracart.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { exists, mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ConversationSentiment
|
|
20
|
+
*/
|
|
21
|
+
export interface ConversationSentiment {
|
|
22
|
+
/**
|
|
23
|
+
* The last time the detect sentiment was run on this conversation
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ConversationSentiment
|
|
26
|
+
*/
|
|
27
|
+
last_detect_sentiment?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The mixed score
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ConversationSentiment
|
|
32
|
+
*/
|
|
33
|
+
mixed?: number;
|
|
34
|
+
/**
|
|
35
|
+
* The negative score
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof ConversationSentiment
|
|
38
|
+
*/
|
|
39
|
+
negative?: number;
|
|
40
|
+
/**
|
|
41
|
+
* The neutral score
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof ConversationSentiment
|
|
44
|
+
*/
|
|
45
|
+
neutral?: number;
|
|
46
|
+
/**
|
|
47
|
+
* The positive score
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof ConversationSentiment
|
|
50
|
+
*/
|
|
51
|
+
positive?: number;
|
|
52
|
+
/**
|
|
53
|
+
* The overall sentiment
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof ConversationSentiment
|
|
56
|
+
*/
|
|
57
|
+
sentiment?: ConversationSentimentSentimentEnum;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
export const ConversationSentimentSentimentEnum = {
|
|
65
|
+
Positive: 'POSITIVE',
|
|
66
|
+
Neutral: 'NEUTRAL',
|
|
67
|
+
Negative: 'NEGATIVE',
|
|
68
|
+
Mixed: 'MIXED'
|
|
69
|
+
} as const;
|
|
70
|
+
export type ConversationSentimentSentimentEnum = typeof ConversationSentimentSentimentEnum[keyof typeof ConversationSentimentSentimentEnum];
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
export function ConversationSentimentFromJSON(json: any): ConversationSentiment {
|
|
74
|
+
return ConversationSentimentFromJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function ConversationSentimentFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationSentiment {
|
|
78
|
+
if ((json === undefined) || (json === null)) {
|
|
79
|
+
return json;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'last_detect_sentiment': !exists(json, 'last_detect_sentiment') ? undefined : json['last_detect_sentiment'],
|
|
84
|
+
'mixed': !exists(json, 'mixed') ? undefined : json['mixed'],
|
|
85
|
+
'negative': !exists(json, 'negative') ? undefined : json['negative'],
|
|
86
|
+
'neutral': !exists(json, 'neutral') ? undefined : json['neutral'],
|
|
87
|
+
'positive': !exists(json, 'positive') ? undefined : json['positive'],
|
|
88
|
+
'sentiment': !exists(json, 'sentiment') ? undefined : json['sentiment'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function ConversationSentimentToJSON(value?: ConversationSentiment | null): any {
|
|
93
|
+
if (value === undefined) {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
if (value === null) {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
|
|
101
|
+
'last_detect_sentiment': value.last_detect_sentiment,
|
|
102
|
+
'mixed': value.mixed,
|
|
103
|
+
'negative': value.negative,
|
|
104
|
+
'neutral': value.neutral,
|
|
105
|
+
'positive': value.positive,
|
|
106
|
+
'sentiment': value.sentiment,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
@@ -19,6 +19,12 @@ import {
|
|
|
19
19
|
ConversationParticipantFromJSONTyped,
|
|
20
20
|
ConversationParticipantToJSON,
|
|
21
21
|
} from './ConversationParticipant';
|
|
22
|
+
import {
|
|
23
|
+
ConversationSentiment,
|
|
24
|
+
ConversationSentimentFromJSON,
|
|
25
|
+
ConversationSentimentFromJSONTyped,
|
|
26
|
+
ConversationSentimentToJSON,
|
|
27
|
+
} from './ConversationSentiment';
|
|
22
28
|
|
|
23
29
|
/**
|
|
24
30
|
*
|
|
@@ -104,6 +110,12 @@ export interface ConversationSummary {
|
|
|
104
110
|
* @memberof ConversationSummary
|
|
105
111
|
*/
|
|
106
112
|
participants?: Array<ConversationParticipant>;
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
* @type {ConversationSentiment}
|
|
116
|
+
* @memberof ConversationSummary
|
|
117
|
+
*/
|
|
118
|
+
sentiment?: ConversationSentiment;
|
|
107
119
|
/**
|
|
108
120
|
* Start of the conversation date/time
|
|
109
121
|
* @type {string}
|
|
@@ -158,6 +170,7 @@ export function ConversationSummaryFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
158
170
|
'merchant_id': !exists(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
159
171
|
'message_count': !exists(json, 'message_count') ? undefined : json['message_count'],
|
|
160
172
|
'participants': !exists(json, 'participants') ? undefined : ((json['participants'] as Array<any>).map(ConversationParticipantFromJSON)),
|
|
173
|
+
'sentiment': !exists(json, 'sentiment') ? undefined : ConversationSentimentFromJSON(json['sentiment']),
|
|
161
174
|
'start_dts': !exists(json, 'start_dts') ? undefined : json['start_dts'],
|
|
162
175
|
'unread_messages': !exists(json, 'unread_messages') ? undefined : json['unread_messages'],
|
|
163
176
|
'visible': !exists(json, 'visible') ? undefined : json['visible'],
|
|
@@ -186,6 +199,7 @@ export function ConversationSummaryToJSON(value?: ConversationSummary | null): a
|
|
|
186
199
|
'merchant_id': value.merchant_id,
|
|
187
200
|
'message_count': value.message_count,
|
|
188
201
|
'participants': value.participants === undefined ? undefined : ((value.participants as Array<any>).map(ConversationParticipantToJSON)),
|
|
202
|
+
'sentiment': ConversationSentimentToJSON(value.sentiment),
|
|
189
203
|
'start_dts': value.start_dts,
|
|
190
204
|
'unread_messages': value.unread_messages,
|
|
191
205
|
'visible': value.visible,
|
package/src/models/index.ts
CHANGED
|
@@ -169,6 +169,7 @@ export * from './ConversationPermissionsResponse';
|
|
|
169
169
|
export * from './ConversationResponse';
|
|
170
170
|
export * from './ConversationSearchRequest';
|
|
171
171
|
export * from './ConversationSearchResponse';
|
|
172
|
+
export * from './ConversationSentiment';
|
|
172
173
|
export * from './ConversationStartRequest';
|
|
173
174
|
export * from './ConversationStartResponse';
|
|
174
175
|
export * from './ConversationSummary';
|