ultracart_rest_api_v2_typescript 4.0.49-RC → 4.0.52-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 +5 -2
- package/dist/apis/ConversationApi.d.ts +2 -0
- package/dist/apis/ConversationApi.js +3 -0
- package/dist/models/Conversation.d.ts +62 -0
- package/dist/models/Conversation.js +26 -1
- package/dist/models/ConversationMessage.d.ts +12 -0
- package/dist/models/ConversationMessage.js +4 -0
- package/dist/models/ConversationSummary.d.ts +21 -0
- package/dist/models/ConversationSummary.js +13 -1
- package/dist/models/ConversationWebsocketMessage.d.ts +7 -0
- package/dist/models/ConversationWebsocketMessage.js +4 -1
- package/package.json +1 -1
- package/src/apis/ConversationApi.ts +6 -0
- package/src/models/Conversation.ts +83 -0
- package/src/models/ConversationMessage.ts +16 -0
- package/src/models/ConversationSummary.ts +34 -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.52-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.52-RC --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -54,6 +54,9 @@ Not every change is committed to every SDK.
|
|
|
54
54
|
|
|
55
55
|
| Version | Date | Comments |
|
|
56
56
|
| --: | :-: | --- |
|
|
57
|
+
| 4.0.52-RC | 08/05/2022 | conversation adjustments for ES integration |
|
|
58
|
+
| 4.0.51-RC | 08/05/2022 | conversations query by medium and stats fixes |
|
|
59
|
+
| 4.0.50-RC | 08/03/2022 | conversation summary participants |
|
|
57
60
|
| 4.0.49-RC | 08/03/2022 | more conversation events |
|
|
58
61
|
| 4.0.48-RC | 08/02/2022 | storefront communication sequence test method |
|
|
59
62
|
| 4.0.47-RC | 08/01/2022 | conversation event refinement |
|
|
@@ -18,6 +18,7 @@ export interface GetConversationMultimediaUploadUrlRequest {
|
|
|
18
18
|
extension: string;
|
|
19
19
|
}
|
|
20
20
|
export interface GetConversationsRequest {
|
|
21
|
+
medium?: string;
|
|
21
22
|
limit?: number;
|
|
22
23
|
offset?: number;
|
|
23
24
|
}
|
|
@@ -98,6 +99,7 @@ export interface ConversationApiInterface {
|
|
|
98
99
|
/**
|
|
99
100
|
* Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
|
|
100
101
|
* @summary Retrieve a list of conversation summaries newest to oldest
|
|
102
|
+
* @param {string} [medium]
|
|
101
103
|
* @param {number} [limit] The maximum number of records to return on this one API call. (Max 200)
|
|
102
104
|
* @param {number} [offset] Pagination of the record set. Offset is a zero based index.
|
|
103
105
|
* @param {*} [options] Override http request option.
|
|
@@ -316,6 +316,9 @@ var ConversationApi = /** @class */ (function (_super) {
|
|
|
316
316
|
switch (_c.label) {
|
|
317
317
|
case 0:
|
|
318
318
|
queryParameters = {};
|
|
319
|
+
if (requestParameters.medium !== undefined) {
|
|
320
|
+
queryParameters['medium'] = requestParameters.medium;
|
|
321
|
+
}
|
|
319
322
|
if (requestParameters.limit !== undefined) {
|
|
320
323
|
queryParameters['_limit'] = requestParameters.limit;
|
|
321
324
|
}
|
|
@@ -35,12 +35,48 @@ export interface Conversation {
|
|
|
35
35
|
* @memberof Conversation
|
|
36
36
|
*/
|
|
37
37
|
conversation_uuid?: string;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof Conversation
|
|
42
|
+
*/
|
|
43
|
+
last_conversation_message_body?: string;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof Conversation
|
|
48
|
+
*/
|
|
49
|
+
last_conversation_participant_arn?: string;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof Conversation
|
|
54
|
+
*/
|
|
55
|
+
last_conversation_participant_name?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Last message date/time
|
|
58
|
+
* @type {string}
|
|
59
|
+
* @memberof Conversation
|
|
60
|
+
*/
|
|
61
|
+
last_message_dts?: string;
|
|
62
|
+
/**
|
|
63
|
+
* The communication medium of the customer.
|
|
64
|
+
* @type {string}
|
|
65
|
+
* @memberof Conversation
|
|
66
|
+
*/
|
|
67
|
+
medium?: ConversationMediumEnum;
|
|
38
68
|
/**
|
|
39
69
|
*
|
|
40
70
|
* @type {string}
|
|
41
71
|
* @memberof Conversation
|
|
42
72
|
*/
|
|
43
73
|
merchant_id?: string;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @type {number}
|
|
77
|
+
* @memberof Conversation
|
|
78
|
+
*/
|
|
79
|
+
message_count?: number;
|
|
44
80
|
/**
|
|
45
81
|
*
|
|
46
82
|
* @type {Array<ConversationMessage>}
|
|
@@ -53,7 +89,33 @@ export interface Conversation {
|
|
|
53
89
|
* @memberof Conversation
|
|
54
90
|
*/
|
|
55
91
|
participants?: Array<ConversationParticipant>;
|
|
92
|
+
/**
|
|
93
|
+
* Start of the conversation date/time
|
|
94
|
+
* @type {string}
|
|
95
|
+
* @memberof Conversation
|
|
96
|
+
*/
|
|
97
|
+
start_dts?: string;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @type {boolean}
|
|
101
|
+
* @memberof Conversation
|
|
102
|
+
*/
|
|
103
|
+
unread_messages?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @type {boolean}
|
|
107
|
+
* @memberof Conversation
|
|
108
|
+
*/
|
|
109
|
+
visible?: boolean;
|
|
56
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* @export
|
|
113
|
+
*/
|
|
114
|
+
export declare const ConversationMediumEnum: {
|
|
115
|
+
readonly Sms: "sms";
|
|
116
|
+
readonly Websocket: "websocket";
|
|
117
|
+
};
|
|
118
|
+
export declare type ConversationMediumEnum = typeof ConversationMediumEnum[keyof typeof ConversationMediumEnum];
|
|
57
119
|
export declare function ConversationFromJSON(json: any): Conversation;
|
|
58
120
|
export declare function ConversationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Conversation;
|
|
59
121
|
export declare function ConversationToJSON(value?: Conversation | null): any;
|
|
@@ -13,10 +13,17 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.ConversationToJSON = exports.ConversationFromJSONTyped = exports.ConversationFromJSON = void 0;
|
|
16
|
+
exports.ConversationToJSON = exports.ConversationFromJSONTyped = exports.ConversationFromJSON = exports.ConversationMediumEnum = void 0;
|
|
17
17
|
var runtime_1 = require("../runtime");
|
|
18
18
|
var ConversationMessage_1 = require("./ConversationMessage");
|
|
19
19
|
var ConversationParticipant_1 = require("./ConversationParticipant");
|
|
20
|
+
/**
|
|
21
|
+
* @export
|
|
22
|
+
*/
|
|
23
|
+
exports.ConversationMediumEnum = {
|
|
24
|
+
Sms: 'sms',
|
|
25
|
+
Websocket: 'websocket'
|
|
26
|
+
};
|
|
20
27
|
function ConversationFromJSON(json) {
|
|
21
28
|
return ConversationFromJSONTyped(json, false);
|
|
22
29
|
}
|
|
@@ -29,9 +36,18 @@ function ConversationFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
29
36
|
'closed': !(0, runtime_1.exists)(json, 'closed') ? undefined : json['closed'],
|
|
30
37
|
'conversation_arn': !(0, runtime_1.exists)(json, 'conversation_arn') ? undefined : json['conversation_arn'],
|
|
31
38
|
'conversation_uuid': !(0, runtime_1.exists)(json, 'conversation_uuid') ? undefined : json['conversation_uuid'],
|
|
39
|
+
'last_conversation_message_body': !(0, runtime_1.exists)(json, 'last_conversation_message_body') ? undefined : json['last_conversation_message_body'],
|
|
40
|
+
'last_conversation_participant_arn': !(0, runtime_1.exists)(json, 'last_conversation_participant_arn') ? undefined : json['last_conversation_participant_arn'],
|
|
41
|
+
'last_conversation_participant_name': !(0, runtime_1.exists)(json, 'last_conversation_participant_name') ? undefined : json['last_conversation_participant_name'],
|
|
42
|
+
'last_message_dts': !(0, runtime_1.exists)(json, 'last_message_dts') ? undefined : json['last_message_dts'],
|
|
43
|
+
'medium': !(0, runtime_1.exists)(json, 'medium') ? undefined : json['medium'],
|
|
32
44
|
'merchant_id': !(0, runtime_1.exists)(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
45
|
+
'message_count': !(0, runtime_1.exists)(json, 'message_count') ? undefined : json['message_count'],
|
|
33
46
|
'messages': !(0, runtime_1.exists)(json, 'messages') ? undefined : (json['messages'].map(ConversationMessage_1.ConversationMessageFromJSON)),
|
|
34
47
|
'participants': !(0, runtime_1.exists)(json, 'participants') ? undefined : (json['participants'].map(ConversationParticipant_1.ConversationParticipantFromJSON)),
|
|
48
|
+
'start_dts': !(0, runtime_1.exists)(json, 'start_dts') ? undefined : json['start_dts'],
|
|
49
|
+
'unread_messages': !(0, runtime_1.exists)(json, 'unread_messages') ? undefined : json['unread_messages'],
|
|
50
|
+
'visible': !(0, runtime_1.exists)(json, 'visible') ? undefined : json['visible'],
|
|
35
51
|
};
|
|
36
52
|
}
|
|
37
53
|
exports.ConversationFromJSONTyped = ConversationFromJSONTyped;
|
|
@@ -46,9 +62,18 @@ function ConversationToJSON(value) {
|
|
|
46
62
|
'closed': value.closed,
|
|
47
63
|
'conversation_arn': value.conversation_arn,
|
|
48
64
|
'conversation_uuid': value.conversation_uuid,
|
|
65
|
+
'last_conversation_message_body': value.last_conversation_message_body,
|
|
66
|
+
'last_conversation_participant_arn': value.last_conversation_participant_arn,
|
|
67
|
+
'last_conversation_participant_name': value.last_conversation_participant_name,
|
|
68
|
+
'last_message_dts': value.last_message_dts,
|
|
69
|
+
'medium': value.medium,
|
|
49
70
|
'merchant_id': value.merchant_id,
|
|
71
|
+
'message_count': value.message_count,
|
|
50
72
|
'messages': value.messages === undefined ? undefined : (value.messages.map(ConversationMessage_1.ConversationMessageToJSON)),
|
|
51
73
|
'participants': value.participants === undefined ? undefined : (value.participants.map(ConversationParticipant_1.ConversationParticipantToJSON)),
|
|
74
|
+
'start_dts': value.start_dts,
|
|
75
|
+
'unread_messages': value.unread_messages,
|
|
76
|
+
'visible': value.visible,
|
|
52
77
|
};
|
|
53
78
|
}
|
|
54
79
|
exports.ConversationToJSON = ConversationToJSON;
|
|
@@ -40,12 +40,24 @@ export interface ConversationMessage {
|
|
|
40
40
|
* @memberof ConversationMessage
|
|
41
41
|
*/
|
|
42
42
|
client_message_id?: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof ConversationMessage
|
|
47
|
+
*/
|
|
48
|
+
conversation_message_uuid?: string;
|
|
43
49
|
/**
|
|
44
50
|
*
|
|
45
51
|
* @type {Array<string>}
|
|
46
52
|
* @memberof ConversationMessage
|
|
47
53
|
*/
|
|
48
54
|
media_urls?: Array<string>;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof ConversationMessage
|
|
59
|
+
*/
|
|
60
|
+
merchant_id?: string;
|
|
49
61
|
/**
|
|
50
62
|
* Message date/time
|
|
51
63
|
* @type {string}
|
|
@@ -36,7 +36,9 @@ function ConversationMessageFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
36
|
'author_conversation_participant_name': !(0, runtime_1.exists)(json, 'author_conversation_participant_name') ? undefined : json['author_conversation_participant_name'],
|
|
37
37
|
'body': !(0, runtime_1.exists)(json, 'body') ? undefined : json['body'],
|
|
38
38
|
'client_message_id': !(0, runtime_1.exists)(json, 'client_message_id') ? undefined : json['client_message_id'],
|
|
39
|
+
'conversation_message_uuid': !(0, runtime_1.exists)(json, 'conversation_message_uuid') ? undefined : json['conversation_message_uuid'],
|
|
39
40
|
'media_urls': !(0, runtime_1.exists)(json, 'media_urls') ? undefined : json['media_urls'],
|
|
41
|
+
'merchant_id': !(0, runtime_1.exists)(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
40
42
|
'message_dts': !(0, runtime_1.exists)(json, 'message_dts') ? undefined : json['message_dts'],
|
|
41
43
|
'transport_statuses': !(0, runtime_1.exists)(json, 'transport_statuses') ? undefined : (json['transport_statuses'].map(ConversationMessageTransportStatus_1.ConversationMessageTransportStatusFromJSON)),
|
|
42
44
|
'type': !(0, runtime_1.exists)(json, 'type') ? undefined : json['type'],
|
|
@@ -56,7 +58,9 @@ function ConversationMessageToJSON(value) {
|
|
|
56
58
|
'author_conversation_participant_name': value.author_conversation_participant_name,
|
|
57
59
|
'body': value.body,
|
|
58
60
|
'client_message_id': value.client_message_id,
|
|
61
|
+
'conversation_message_uuid': value.conversation_message_uuid,
|
|
59
62
|
'media_urls': value.media_urls,
|
|
63
|
+
'merchant_id': value.merchant_id,
|
|
60
64
|
'message_dts': value.message_dts,
|
|
61
65
|
'transport_statuses': value.transport_statuses === undefined ? undefined : (value.transport_statuses.map(ConversationMessageTransportStatus_1.ConversationMessageTransportStatusToJSON)),
|
|
62
66
|
'type': value.type,
|
|
@@ -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
|
|
@@ -57,6 +58,12 @@ export interface ConversationSummary {
|
|
|
57
58
|
* @memberof ConversationSummary
|
|
58
59
|
*/
|
|
59
60
|
last_message_dts?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The communication medium of the customer.
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof ConversationSummary
|
|
65
|
+
*/
|
|
66
|
+
medium?: ConversationSummaryMediumEnum;
|
|
60
67
|
/**
|
|
61
68
|
*
|
|
62
69
|
* @type {string}
|
|
@@ -69,6 +76,12 @@ export interface ConversationSummary {
|
|
|
69
76
|
* @memberof ConversationSummary
|
|
70
77
|
*/
|
|
71
78
|
message_count?: number;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {Array<ConversationParticipant>}
|
|
82
|
+
* @memberof ConversationSummary
|
|
83
|
+
*/
|
|
84
|
+
participants?: Array<ConversationParticipant>;
|
|
72
85
|
/**
|
|
73
86
|
* Start of the conversation date/time
|
|
74
87
|
* @type {string}
|
|
@@ -88,6 +101,14 @@ export interface ConversationSummary {
|
|
|
88
101
|
*/
|
|
89
102
|
visible?: boolean;
|
|
90
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* @export
|
|
106
|
+
*/
|
|
107
|
+
export declare const ConversationSummaryMediumEnum: {
|
|
108
|
+
readonly Sms: "sms";
|
|
109
|
+
readonly Websocket: "websocket";
|
|
110
|
+
};
|
|
111
|
+
export declare type ConversationSummaryMediumEnum = typeof ConversationSummaryMediumEnum[keyof typeof ConversationSummaryMediumEnum];
|
|
91
112
|
export declare function ConversationSummaryFromJSON(json: any): ConversationSummary;
|
|
92
113
|
export declare function ConversationSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationSummary;
|
|
93
114
|
export declare function ConversationSummaryToJSON(value?: ConversationSummary | null): any;
|
|
@@ -13,8 +13,16 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.ConversationSummaryToJSON = exports.ConversationSummaryFromJSONTyped = exports.ConversationSummaryFromJSON = void 0;
|
|
16
|
+
exports.ConversationSummaryToJSON = exports.ConversationSummaryFromJSONTyped = exports.ConversationSummaryFromJSON = exports.ConversationSummaryMediumEnum = void 0;
|
|
17
17
|
var runtime_1 = require("../runtime");
|
|
18
|
+
var ConversationParticipant_1 = require("./ConversationParticipant");
|
|
19
|
+
/**
|
|
20
|
+
* @export
|
|
21
|
+
*/
|
|
22
|
+
exports.ConversationSummaryMediumEnum = {
|
|
23
|
+
Sms: 'sms',
|
|
24
|
+
Websocket: 'websocket'
|
|
25
|
+
};
|
|
18
26
|
function ConversationSummaryFromJSON(json) {
|
|
19
27
|
return ConversationSummaryFromJSONTyped(json, false);
|
|
20
28
|
}
|
|
@@ -31,8 +39,10 @@ function ConversationSummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
31
39
|
'last_conversation_participant_arn': !(0, runtime_1.exists)(json, 'last_conversation_participant_arn') ? undefined : json['last_conversation_participant_arn'],
|
|
32
40
|
'last_conversation_participant_name': !(0, runtime_1.exists)(json, 'last_conversation_participant_name') ? undefined : json['last_conversation_participant_name'],
|
|
33
41
|
'last_message_dts': !(0, runtime_1.exists)(json, 'last_message_dts') ? undefined : json['last_message_dts'],
|
|
42
|
+
'medium': !(0, runtime_1.exists)(json, 'medium') ? undefined : json['medium'],
|
|
34
43
|
'merchant_id': !(0, runtime_1.exists)(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
35
44
|
'message_count': !(0, runtime_1.exists)(json, 'message_count') ? undefined : json['message_count'],
|
|
45
|
+
'participants': !(0, runtime_1.exists)(json, 'participants') ? undefined : (json['participants'].map(ConversationParticipant_1.ConversationParticipantFromJSON)),
|
|
36
46
|
'start_dts': !(0, runtime_1.exists)(json, 'start_dts') ? undefined : json['start_dts'],
|
|
37
47
|
'unread_messages': !(0, runtime_1.exists)(json, 'unread_messages') ? undefined : json['unread_messages'],
|
|
38
48
|
'visible': !(0, runtime_1.exists)(json, 'visible') ? undefined : json['visible'],
|
|
@@ -54,8 +64,10 @@ function ConversationSummaryToJSON(value) {
|
|
|
54
64
|
'last_conversation_participant_arn': value.last_conversation_participant_arn,
|
|
55
65
|
'last_conversation_participant_name': value.last_conversation_participant_name,
|
|
56
66
|
'last_message_dts': value.last_message_dts,
|
|
67
|
+
'medium': value.medium,
|
|
57
68
|
'merchant_id': value.merchant_id,
|
|
58
69
|
'message_count': value.message_count,
|
|
70
|
+
'participants': value.participants === undefined ? undefined : (value.participants.map(ConversationParticipant_1.ConversationParticipantToJSON)),
|
|
59
71
|
'start_dts': value.start_dts,
|
|
60
72
|
'unread_messages': value.unread_messages,
|
|
61
73
|
'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
|
@@ -53,6 +53,7 @@ export interface GetConversationMultimediaUploadUrlRequest {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
export interface GetConversationsRequest {
|
|
56
|
+
medium?: string;
|
|
56
57
|
limit?: number;
|
|
57
58
|
offset?: number;
|
|
58
59
|
}
|
|
@@ -146,6 +147,7 @@ export interface ConversationApiInterface {
|
|
|
146
147
|
/**
|
|
147
148
|
* Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
|
|
148
149
|
* @summary Retrieve a list of conversation summaries newest to oldest
|
|
150
|
+
* @param {string} [medium]
|
|
149
151
|
* @param {number} [limit] The maximum number of records to return on this one API call. (Max 200)
|
|
150
152
|
* @param {number} [offset] Pagination of the record set. Offset is a zero based index.
|
|
151
153
|
* @param {*} [options] Override http request option.
|
|
@@ -395,6 +397,10 @@ export class ConversationApi extends runtime.BaseAPI implements ConversationApiI
|
|
|
395
397
|
async getConversationsRaw(requestParameters: GetConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationsResponse>> {
|
|
396
398
|
const queryParameters: any = {};
|
|
397
399
|
|
|
400
|
+
if (requestParameters.medium !== undefined) {
|
|
401
|
+
queryParameters['medium'] = requestParameters.medium;
|
|
402
|
+
}
|
|
403
|
+
|
|
398
404
|
if (requestParameters.limit !== undefined) {
|
|
399
405
|
queryParameters['_limit'] = requestParameters.limit;
|
|
400
406
|
}
|
|
@@ -50,12 +50,48 @@ export interface Conversation {
|
|
|
50
50
|
* @memberof Conversation
|
|
51
51
|
*/
|
|
52
52
|
conversation_uuid?: string;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @memberof Conversation
|
|
57
|
+
*/
|
|
58
|
+
last_conversation_message_body?: string;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @memberof Conversation
|
|
63
|
+
*/
|
|
64
|
+
last_conversation_participant_arn?: string;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {string}
|
|
68
|
+
* @memberof Conversation
|
|
69
|
+
*/
|
|
70
|
+
last_conversation_participant_name?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Last message date/time
|
|
73
|
+
* @type {string}
|
|
74
|
+
* @memberof Conversation
|
|
75
|
+
*/
|
|
76
|
+
last_message_dts?: string;
|
|
77
|
+
/**
|
|
78
|
+
* The communication medium of the customer.
|
|
79
|
+
* @type {string}
|
|
80
|
+
* @memberof Conversation
|
|
81
|
+
*/
|
|
82
|
+
medium?: ConversationMediumEnum;
|
|
53
83
|
/**
|
|
54
84
|
*
|
|
55
85
|
* @type {string}
|
|
56
86
|
* @memberof Conversation
|
|
57
87
|
*/
|
|
58
88
|
merchant_id?: string;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @type {number}
|
|
92
|
+
* @memberof Conversation
|
|
93
|
+
*/
|
|
94
|
+
message_count?: number;
|
|
59
95
|
/**
|
|
60
96
|
*
|
|
61
97
|
* @type {Array<ConversationMessage>}
|
|
@@ -68,8 +104,37 @@ export interface Conversation {
|
|
|
68
104
|
* @memberof Conversation
|
|
69
105
|
*/
|
|
70
106
|
participants?: Array<ConversationParticipant>;
|
|
107
|
+
/**
|
|
108
|
+
* Start of the conversation date/time
|
|
109
|
+
* @type {string}
|
|
110
|
+
* @memberof Conversation
|
|
111
|
+
*/
|
|
112
|
+
start_dts?: string;
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
* @type {boolean}
|
|
116
|
+
* @memberof Conversation
|
|
117
|
+
*/
|
|
118
|
+
unread_messages?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
* @type {boolean}
|
|
122
|
+
* @memberof Conversation
|
|
123
|
+
*/
|
|
124
|
+
visible?: boolean;
|
|
71
125
|
}
|
|
72
126
|
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @export
|
|
130
|
+
*/
|
|
131
|
+
export const ConversationMediumEnum = {
|
|
132
|
+
Sms: 'sms',
|
|
133
|
+
Websocket: 'websocket'
|
|
134
|
+
} as const;
|
|
135
|
+
export type ConversationMediumEnum = typeof ConversationMediumEnum[keyof typeof ConversationMediumEnum];
|
|
136
|
+
|
|
137
|
+
|
|
73
138
|
export function ConversationFromJSON(json: any): Conversation {
|
|
74
139
|
return ConversationFromJSONTyped(json, false);
|
|
75
140
|
}
|
|
@@ -83,9 +148,18 @@ export function ConversationFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
83
148
|
'closed': !exists(json, 'closed') ? undefined : json['closed'],
|
|
84
149
|
'conversation_arn': !exists(json, 'conversation_arn') ? undefined : json['conversation_arn'],
|
|
85
150
|
'conversation_uuid': !exists(json, 'conversation_uuid') ? undefined : json['conversation_uuid'],
|
|
151
|
+
'last_conversation_message_body': !exists(json, 'last_conversation_message_body') ? undefined : json['last_conversation_message_body'],
|
|
152
|
+
'last_conversation_participant_arn': !exists(json, 'last_conversation_participant_arn') ? undefined : json['last_conversation_participant_arn'],
|
|
153
|
+
'last_conversation_participant_name': !exists(json, 'last_conversation_participant_name') ? undefined : json['last_conversation_participant_name'],
|
|
154
|
+
'last_message_dts': !exists(json, 'last_message_dts') ? undefined : json['last_message_dts'],
|
|
155
|
+
'medium': !exists(json, 'medium') ? undefined : json['medium'],
|
|
86
156
|
'merchant_id': !exists(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
157
|
+
'message_count': !exists(json, 'message_count') ? undefined : json['message_count'],
|
|
87
158
|
'messages': !exists(json, 'messages') ? undefined : ((json['messages'] as Array<any>).map(ConversationMessageFromJSON)),
|
|
88
159
|
'participants': !exists(json, 'participants') ? undefined : ((json['participants'] as Array<any>).map(ConversationParticipantFromJSON)),
|
|
160
|
+
'start_dts': !exists(json, 'start_dts') ? undefined : json['start_dts'],
|
|
161
|
+
'unread_messages': !exists(json, 'unread_messages') ? undefined : json['unread_messages'],
|
|
162
|
+
'visible': !exists(json, 'visible') ? undefined : json['visible'],
|
|
89
163
|
};
|
|
90
164
|
}
|
|
91
165
|
|
|
@@ -101,9 +175,18 @@ export function ConversationToJSON(value?: Conversation | null): any {
|
|
|
101
175
|
'closed': value.closed,
|
|
102
176
|
'conversation_arn': value.conversation_arn,
|
|
103
177
|
'conversation_uuid': value.conversation_uuid,
|
|
178
|
+
'last_conversation_message_body': value.last_conversation_message_body,
|
|
179
|
+
'last_conversation_participant_arn': value.last_conversation_participant_arn,
|
|
180
|
+
'last_conversation_participant_name': value.last_conversation_participant_name,
|
|
181
|
+
'last_message_dts': value.last_message_dts,
|
|
182
|
+
'medium': value.medium,
|
|
104
183
|
'merchant_id': value.merchant_id,
|
|
184
|
+
'message_count': value.message_count,
|
|
105
185
|
'messages': value.messages === undefined ? undefined : ((value.messages as Array<any>).map(ConversationMessageToJSON)),
|
|
106
186
|
'participants': value.participants === undefined ? undefined : ((value.participants as Array<any>).map(ConversationParticipantToJSON)),
|
|
187
|
+
'start_dts': value.start_dts,
|
|
188
|
+
'unread_messages': value.unread_messages,
|
|
189
|
+
'visible': value.visible,
|
|
107
190
|
};
|
|
108
191
|
}
|
|
109
192
|
|
|
@@ -50,12 +50,24 @@ export interface ConversationMessage {
|
|
|
50
50
|
* @memberof ConversationMessage
|
|
51
51
|
*/
|
|
52
52
|
client_message_id?: string;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @memberof ConversationMessage
|
|
57
|
+
*/
|
|
58
|
+
conversation_message_uuid?: string;
|
|
53
59
|
/**
|
|
54
60
|
*
|
|
55
61
|
* @type {Array<string>}
|
|
56
62
|
* @memberof ConversationMessage
|
|
57
63
|
*/
|
|
58
64
|
media_urls?: Array<string>;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {string}
|
|
68
|
+
* @memberof ConversationMessage
|
|
69
|
+
*/
|
|
70
|
+
merchant_id?: string;
|
|
59
71
|
/**
|
|
60
72
|
* Message date/time
|
|
61
73
|
* @type {string}
|
|
@@ -107,7 +119,9 @@ export function ConversationMessageFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
107
119
|
'author_conversation_participant_name': !exists(json, 'author_conversation_participant_name') ? undefined : json['author_conversation_participant_name'],
|
|
108
120
|
'body': !exists(json, 'body') ? undefined : json['body'],
|
|
109
121
|
'client_message_id': !exists(json, 'client_message_id') ? undefined : json['client_message_id'],
|
|
122
|
+
'conversation_message_uuid': !exists(json, 'conversation_message_uuid') ? undefined : json['conversation_message_uuid'],
|
|
110
123
|
'media_urls': !exists(json, 'media_urls') ? undefined : json['media_urls'],
|
|
124
|
+
'merchant_id': !exists(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
111
125
|
'message_dts': !exists(json, 'message_dts') ? undefined : json['message_dts'],
|
|
112
126
|
'transport_statuses': !exists(json, 'transport_statuses') ? undefined : ((json['transport_statuses'] as Array<any>).map(ConversationMessageTransportStatusFromJSON)),
|
|
113
127
|
'type': !exists(json, 'type') ? undefined : json['type'],
|
|
@@ -128,7 +142,9 @@ export function ConversationMessageToJSON(value?: ConversationMessage | null): a
|
|
|
128
142
|
'author_conversation_participant_name': value.author_conversation_participant_name,
|
|
129
143
|
'body': value.body,
|
|
130
144
|
'client_message_id': value.client_message_id,
|
|
145
|
+
'conversation_message_uuid': value.conversation_message_uuid,
|
|
131
146
|
'media_urls': value.media_urls,
|
|
147
|
+
'merchant_id': value.merchant_id,
|
|
132
148
|
'message_dts': value.message_dts,
|
|
133
149
|
'transport_statuses': value.transport_statuses === undefined ? undefined : ((value.transport_statuses as Array<any>).map(ConversationMessageTransportStatusToJSON)),
|
|
134
150
|
'type': value.type,
|
|
@@ -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
|
|
@@ -61,6 +68,12 @@ export interface ConversationSummary {
|
|
|
61
68
|
* @memberof ConversationSummary
|
|
62
69
|
*/
|
|
63
70
|
last_message_dts?: string;
|
|
71
|
+
/**
|
|
72
|
+
* The communication medium of the customer.
|
|
73
|
+
* @type {string}
|
|
74
|
+
* @memberof ConversationSummary
|
|
75
|
+
*/
|
|
76
|
+
medium?: ConversationSummaryMediumEnum;
|
|
64
77
|
/**
|
|
65
78
|
*
|
|
66
79
|
* @type {string}
|
|
@@ -73,6 +86,12 @@ export interface ConversationSummary {
|
|
|
73
86
|
* @memberof ConversationSummary
|
|
74
87
|
*/
|
|
75
88
|
message_count?: number;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @type {Array<ConversationParticipant>}
|
|
92
|
+
* @memberof ConversationSummary
|
|
93
|
+
*/
|
|
94
|
+
participants?: Array<ConversationParticipant>;
|
|
76
95
|
/**
|
|
77
96
|
* Start of the conversation date/time
|
|
78
97
|
* @type {string}
|
|
@@ -93,6 +112,17 @@ export interface ConversationSummary {
|
|
|
93
112
|
visible?: boolean;
|
|
94
113
|
}
|
|
95
114
|
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @export
|
|
118
|
+
*/
|
|
119
|
+
export const ConversationSummaryMediumEnum = {
|
|
120
|
+
Sms: 'sms',
|
|
121
|
+
Websocket: 'websocket'
|
|
122
|
+
} as const;
|
|
123
|
+
export type ConversationSummaryMediumEnum = typeof ConversationSummaryMediumEnum[keyof typeof ConversationSummaryMediumEnum];
|
|
124
|
+
|
|
125
|
+
|
|
96
126
|
export function ConversationSummaryFromJSON(json: any): ConversationSummary {
|
|
97
127
|
return ConversationSummaryFromJSONTyped(json, false);
|
|
98
128
|
}
|
|
@@ -110,8 +140,10 @@ export function ConversationSummaryFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
110
140
|
'last_conversation_participant_arn': !exists(json, 'last_conversation_participant_arn') ? undefined : json['last_conversation_participant_arn'],
|
|
111
141
|
'last_conversation_participant_name': !exists(json, 'last_conversation_participant_name') ? undefined : json['last_conversation_participant_name'],
|
|
112
142
|
'last_message_dts': !exists(json, 'last_message_dts') ? undefined : json['last_message_dts'],
|
|
143
|
+
'medium': !exists(json, 'medium') ? undefined : json['medium'],
|
|
113
144
|
'merchant_id': !exists(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
114
145
|
'message_count': !exists(json, 'message_count') ? undefined : json['message_count'],
|
|
146
|
+
'participants': !exists(json, 'participants') ? undefined : ((json['participants'] as Array<any>).map(ConversationParticipantFromJSON)),
|
|
115
147
|
'start_dts': !exists(json, 'start_dts') ? undefined : json['start_dts'],
|
|
116
148
|
'unread_messages': !exists(json, 'unread_messages') ? undefined : json['unread_messages'],
|
|
117
149
|
'visible': !exists(json, 'visible') ? undefined : json['visible'],
|
|
@@ -134,8 +166,10 @@ export function ConversationSummaryToJSON(value?: ConversationSummary | null): a
|
|
|
134
166
|
'last_conversation_participant_arn': value.last_conversation_participant_arn,
|
|
135
167
|
'last_conversation_participant_name': value.last_conversation_participant_name,
|
|
136
168
|
'last_message_dts': value.last_message_dts,
|
|
169
|
+
'medium': value.medium,
|
|
137
170
|
'merchant_id': value.merchant_id,
|
|
138
171
|
'message_count': value.message_count,
|
|
172
|
+
'participants': value.participants === undefined ? undefined : ((value.participants as Array<any>).map(ConversationParticipantToJSON)),
|
|
139
173
|
'start_dts': value.start_dts,
|
|
140
174
|
'unread_messages': value.unread_messages,
|
|
141
175
|
'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),
|