ultracart_rest_api_v2_typescript 4.0.49-RC → 4.0.50-RC
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/README.md +3 -2
- package/dist/models/ConversationSummary.d.ts +7 -0
- package/dist/models/ConversationSummary.js +3 -0
- package/dist/models/ConversationWebsocketMessage.d.ts +7 -0
- package/dist/models/ConversationWebsocketMessage.js +4 -1
- package/package.json +1 -1
- package/src/models/ConversationSummary.ts +15 -0
- package/src/models/ConversationWebsocketMessage.ts +10 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## ultracart_rest_api_v2_typescript@4.0.
|
|
1
|
+
## ultracart_rest_api_v2_typescript@4.0.50-RC
|
|
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.50-RC --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.50-RC | 08/03/2022 | conversation summary participants |
|
|
57
58
|
| 4.0.49-RC | 08/03/2022 | more conversation events |
|
|
58
59
|
| 4.0.48-RC | 08/02/2022 | storefront communication sequence test method |
|
|
59
60
|
| 4.0.47-RC | 08/01/2022 | conversation event refinement |
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import { ConversationParticipant } from './ConversationParticipant';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
@@ -69,6 +70,12 @@ export interface ConversationSummary {
|
|
|
69
70
|
* @memberof ConversationSummary
|
|
70
71
|
*/
|
|
71
72
|
message_count?: number;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {Array<ConversationParticipant>}
|
|
76
|
+
* @memberof ConversationSummary
|
|
77
|
+
*/
|
|
78
|
+
participants?: Array<ConversationParticipant>;
|
|
72
79
|
/**
|
|
73
80
|
* Start of the conversation date/time
|
|
74
81
|
* @type {string}
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.ConversationSummaryToJSON = exports.ConversationSummaryFromJSONTyped = exports.ConversationSummaryFromJSON = void 0;
|
|
17
17
|
var runtime_1 = require("../runtime");
|
|
18
|
+
var ConversationParticipant_1 = require("./ConversationParticipant");
|
|
18
19
|
function ConversationSummaryFromJSON(json) {
|
|
19
20
|
return ConversationSummaryFromJSONTyped(json, false);
|
|
20
21
|
}
|
|
@@ -33,6 +34,7 @@ function ConversationSummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
33
34
|
'last_message_dts': !(0, runtime_1.exists)(json, 'last_message_dts') ? undefined : json['last_message_dts'],
|
|
34
35
|
'merchant_id': !(0, runtime_1.exists)(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
35
36
|
'message_count': !(0, runtime_1.exists)(json, 'message_count') ? undefined : json['message_count'],
|
|
37
|
+
'participants': !(0, runtime_1.exists)(json, 'participants') ? undefined : (json['participants'].map(ConversationParticipant_1.ConversationParticipantFromJSON)),
|
|
36
38
|
'start_dts': !(0, runtime_1.exists)(json, 'start_dts') ? undefined : json['start_dts'],
|
|
37
39
|
'unread_messages': !(0, runtime_1.exists)(json, 'unread_messages') ? undefined : json['unread_messages'],
|
|
38
40
|
'visible': !(0, runtime_1.exists)(json, 'visible') ? undefined : json['visible'],
|
|
@@ -56,6 +58,7 @@ function ConversationSummaryToJSON(value) {
|
|
|
56
58
|
'last_message_dts': value.last_message_dts,
|
|
57
59
|
'merchant_id': value.merchant_id,
|
|
58
60
|
'message_count': value.message_count,
|
|
61
|
+
'participants': value.participants === undefined ? undefined : (value.participants.map(ConversationParticipant_1.ConversationParticipantToJSON)),
|
|
59
62
|
'start_dts': value.start_dts,
|
|
60
63
|
'unread_messages': value.unread_messages,
|
|
61
64
|
'visible': value.visible,
|
|
@@ -45,6 +45,12 @@ export interface ConversationWebsocketMessage {
|
|
|
45
45
|
* @memberof ConversationWebsocketMessage
|
|
46
46
|
*/
|
|
47
47
|
event_new_message?: ConversationSummary;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {ConversationSummary}
|
|
51
|
+
* @memberof ConversationWebsocketMessage
|
|
52
|
+
*/
|
|
53
|
+
event_participant_update?: ConversationSummary;
|
|
48
54
|
/**
|
|
49
55
|
*
|
|
50
56
|
* @type {ConversationEventQueuePosition}
|
|
@@ -106,6 +112,7 @@ export declare const ConversationWebsocketMessageEventTypeEnum: {
|
|
|
106
112
|
readonly UpdatedMessage: "updated message";
|
|
107
113
|
readonly QueueStatusUpdate: "queue status update";
|
|
108
114
|
readonly Rrweb: "rrweb";
|
|
115
|
+
readonly ParticipantUpdate: "participant update";
|
|
109
116
|
};
|
|
110
117
|
export declare type ConversationWebsocketMessageEventTypeEnum = typeof ConversationWebsocketMessageEventTypeEnum[keyof typeof ConversationWebsocketMessageEventTypeEnum];
|
|
111
118
|
/**
|
|
@@ -32,7 +32,8 @@ exports.ConversationWebsocketMessageEventTypeEnum = {
|
|
|
32
32
|
NewMessage: 'new message',
|
|
33
33
|
UpdatedMessage: 'updated message',
|
|
34
34
|
QueueStatusUpdate: 'queue status update',
|
|
35
|
-
Rrweb: 'rrweb'
|
|
35
|
+
Rrweb: 'rrweb',
|
|
36
|
+
ParticipantUpdate: 'participant update'
|
|
36
37
|
};
|
|
37
38
|
/**
|
|
38
39
|
* @export
|
|
@@ -56,6 +57,7 @@ function ConversationWebsocketMessageFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
56
57
|
'event_conversation_closed': !(0, runtime_1.exists)(json, 'event_conversation_closed') ? undefined : (0, ConversationSummary_1.ConversationSummaryFromJSON)(json['event_conversation_closed']),
|
|
57
58
|
'event_new_conversation': !(0, runtime_1.exists)(json, 'event_new_conversation') ? undefined : (0, ConversationSummary_1.ConversationSummaryFromJSON)(json['event_new_conversation']),
|
|
58
59
|
'event_new_message': !(0, runtime_1.exists)(json, 'event_new_message') ? undefined : (0, ConversationSummary_1.ConversationSummaryFromJSON)(json['event_new_message']),
|
|
60
|
+
'event_participant_update': !(0, runtime_1.exists)(json, 'event_participant_update') ? undefined : (0, ConversationSummary_1.ConversationSummaryFromJSON)(json['event_participant_update']),
|
|
59
61
|
'event_queue_position': !(0, runtime_1.exists)(json, 'event_queue_position') ? undefined : (0, ConversationEventQueuePosition_1.ConversationEventQueuePositionFromJSON)(json['event_queue_position']),
|
|
60
62
|
'event_queue_status_update': !(0, runtime_1.exists)(json, 'event_queue_status_update') ? undefined : (0, ConversationWebchatQueueStatus_1.ConversationWebchatQueueStatusFromJSON)(json['event_queue_status_update']),
|
|
61
63
|
'event_rrweb': !(0, runtime_1.exists)(json, 'event_rrweb') ? undefined : (0, ConversationEventRRWeb_1.ConversationEventRRWebFromJSON)(json['event_rrweb']),
|
|
@@ -79,6 +81,7 @@ function ConversationWebsocketMessageToJSON(value) {
|
|
|
79
81
|
'event_conversation_closed': (0, ConversationSummary_1.ConversationSummaryToJSON)(value.event_conversation_closed),
|
|
80
82
|
'event_new_conversation': (0, ConversationSummary_1.ConversationSummaryToJSON)(value.event_new_conversation),
|
|
81
83
|
'event_new_message': (0, ConversationSummary_1.ConversationSummaryToJSON)(value.event_new_message),
|
|
84
|
+
'event_participant_update': (0, ConversationSummary_1.ConversationSummaryToJSON)(value.event_participant_update),
|
|
82
85
|
'event_queue_position': (0, ConversationEventQueuePosition_1.ConversationEventQueuePositionToJSON)(value.event_queue_position),
|
|
83
86
|
'event_queue_status_update': (0, ConversationWebchatQueueStatus_1.ConversationWebchatQueueStatusToJSON)(value.event_queue_status_update),
|
|
84
87
|
'event_rrweb': (0, ConversationEventRRWeb_1.ConversationEventRRWebToJSON)(value.event_rrweb),
|
package/package.json
CHANGED
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
ConversationParticipant,
|
|
18
|
+
ConversationParticipantFromJSON,
|
|
19
|
+
ConversationParticipantFromJSONTyped,
|
|
20
|
+
ConversationParticipantToJSON,
|
|
21
|
+
} from './ConversationParticipant';
|
|
22
|
+
|
|
16
23
|
/**
|
|
17
24
|
*
|
|
18
25
|
* @export
|
|
@@ -73,6 +80,12 @@ export interface ConversationSummary {
|
|
|
73
80
|
* @memberof ConversationSummary
|
|
74
81
|
*/
|
|
75
82
|
message_count?: number;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {Array<ConversationParticipant>}
|
|
86
|
+
* @memberof ConversationSummary
|
|
87
|
+
*/
|
|
88
|
+
participants?: Array<ConversationParticipant>;
|
|
76
89
|
/**
|
|
77
90
|
* Start of the conversation date/time
|
|
78
91
|
* @type {string}
|
|
@@ -112,6 +125,7 @@ export function ConversationSummaryFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
112
125
|
'last_message_dts': !exists(json, 'last_message_dts') ? undefined : json['last_message_dts'],
|
|
113
126
|
'merchant_id': !exists(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
114
127
|
'message_count': !exists(json, 'message_count') ? undefined : json['message_count'],
|
|
128
|
+
'participants': !exists(json, 'participants') ? undefined : ((json['participants'] as Array<any>).map(ConversationParticipantFromJSON)),
|
|
115
129
|
'start_dts': !exists(json, 'start_dts') ? undefined : json['start_dts'],
|
|
116
130
|
'unread_messages': !exists(json, 'unread_messages') ? undefined : json['unread_messages'],
|
|
117
131
|
'visible': !exists(json, 'visible') ? undefined : json['visible'],
|
|
@@ -136,6 +150,7 @@ export function ConversationSummaryToJSON(value?: ConversationSummary | null): a
|
|
|
136
150
|
'last_message_dts': value.last_message_dts,
|
|
137
151
|
'merchant_id': value.merchant_id,
|
|
138
152
|
'message_count': value.message_count,
|
|
153
|
+
'participants': value.participants === undefined ? undefined : ((value.participants as Array<any>).map(ConversationParticipantToJSON)),
|
|
139
154
|
'start_dts': value.start_dts,
|
|
140
155
|
'unread_messages': value.unread_messages,
|
|
141
156
|
'visible': value.visible,
|
|
@@ -80,6 +80,12 @@ export interface ConversationWebsocketMessage {
|
|
|
80
80
|
* @memberof ConversationWebsocketMessage
|
|
81
81
|
*/
|
|
82
82
|
event_new_message?: ConversationSummary;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {ConversationSummary}
|
|
86
|
+
* @memberof ConversationWebsocketMessage
|
|
87
|
+
*/
|
|
88
|
+
event_participant_update?: ConversationSummary;
|
|
83
89
|
/**
|
|
84
90
|
*
|
|
85
91
|
* @type {ConversationEventQueuePosition}
|
|
@@ -142,7 +148,8 @@ export const ConversationWebsocketMessageEventTypeEnum = {
|
|
|
142
148
|
NewMessage: 'new message',
|
|
143
149
|
UpdatedMessage: 'updated message',
|
|
144
150
|
QueueStatusUpdate: 'queue status update',
|
|
145
|
-
Rrweb: 'rrweb'
|
|
151
|
+
Rrweb: 'rrweb',
|
|
152
|
+
ParticipantUpdate: 'participant update'
|
|
146
153
|
} as const;
|
|
147
154
|
export type ConversationWebsocketMessageEventTypeEnum = typeof ConversationWebsocketMessageEventTypeEnum[keyof typeof ConversationWebsocketMessageEventTypeEnum];
|
|
148
155
|
|
|
@@ -172,6 +179,7 @@ export function ConversationWebsocketMessageFromJSONTyped(json: any, ignoreDiscr
|
|
|
172
179
|
'event_conversation_closed': !exists(json, 'event_conversation_closed') ? undefined : ConversationSummaryFromJSON(json['event_conversation_closed']),
|
|
173
180
|
'event_new_conversation': !exists(json, 'event_new_conversation') ? undefined : ConversationSummaryFromJSON(json['event_new_conversation']),
|
|
174
181
|
'event_new_message': !exists(json, 'event_new_message') ? undefined : ConversationSummaryFromJSON(json['event_new_message']),
|
|
182
|
+
'event_participant_update': !exists(json, 'event_participant_update') ? undefined : ConversationSummaryFromJSON(json['event_participant_update']),
|
|
175
183
|
'event_queue_position': !exists(json, 'event_queue_position') ? undefined : ConversationEventQueuePositionFromJSON(json['event_queue_position']),
|
|
176
184
|
'event_queue_status_update': !exists(json, 'event_queue_status_update') ? undefined : ConversationWebchatQueueStatusFromJSON(json['event_queue_status_update']),
|
|
177
185
|
'event_rrweb': !exists(json, 'event_rrweb') ? undefined : ConversationEventRRWebFromJSON(json['event_rrweb']),
|
|
@@ -196,6 +204,7 @@ export function ConversationWebsocketMessageToJSON(value?: ConversationWebsocket
|
|
|
196
204
|
'event_conversation_closed': ConversationSummaryToJSON(value.event_conversation_closed),
|
|
197
205
|
'event_new_conversation': ConversationSummaryToJSON(value.event_new_conversation),
|
|
198
206
|
'event_new_message': ConversationSummaryToJSON(value.event_new_message),
|
|
207
|
+
'event_participant_update': ConversationSummaryToJSON(value.event_participant_update),
|
|
199
208
|
'event_queue_position': ConversationEventQueuePositionToJSON(value.event_queue_position),
|
|
200
209
|
'event_queue_status_update': ConversationWebchatQueueStatusToJSON(value.event_queue_status_update),
|
|
201
210
|
'event_rrweb': ConversationEventRRWebToJSON(value.event_rrweb),
|