ultracart_rest_api_v2_typescript 4.0.50-RC → 4.0.51-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/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/ConversationSummary.d.ts +14 -0
- package/dist/models/ConversationSummary.js +10 -1
- package/package.json +1 -1
- package/src/apis/ConversationApi.ts +6 -0
- package/src/models/Conversation.ts +83 -0
- package/src/models/ConversationSummary.ts +19 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## ultracart_rest_api_v2_typescript@4.0.
|
|
1
|
+
## ultracart_rest_api_v2_typescript@4.0.51-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.51-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.51-RC | 08/05/2022 | conversations query by medium and stats fixes |
|
|
57
58
|
| 4.0.50-RC | 08/03/2022 | conversation summary participants |
|
|
58
59
|
| 4.0.49-RC | 08/03/2022 | more conversation events |
|
|
59
60
|
| 4.0.48-RC | 08/02/2022 | storefront communication sequence test method |
|
|
@@ -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;
|
|
@@ -58,6 +58,12 @@ export interface ConversationSummary {
|
|
|
58
58
|
* @memberof ConversationSummary
|
|
59
59
|
*/
|
|
60
60
|
last_message_dts?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The communication medium of the customer.
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof ConversationSummary
|
|
65
|
+
*/
|
|
66
|
+
medium?: ConversationSummaryMediumEnum;
|
|
61
67
|
/**
|
|
62
68
|
*
|
|
63
69
|
* @type {string}
|
|
@@ -95,6 +101,14 @@ export interface ConversationSummary {
|
|
|
95
101
|
*/
|
|
96
102
|
visible?: boolean;
|
|
97
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];
|
|
98
112
|
export declare function ConversationSummaryFromJSON(json: any): ConversationSummary;
|
|
99
113
|
export declare function ConversationSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationSummary;
|
|
100
114
|
export declare function ConversationSummaryToJSON(value?: ConversationSummary | null): any;
|
|
@@ -13,9 +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
18
|
var ConversationParticipant_1 = require("./ConversationParticipant");
|
|
19
|
+
/**
|
|
20
|
+
* @export
|
|
21
|
+
*/
|
|
22
|
+
exports.ConversationSummaryMediumEnum = {
|
|
23
|
+
Sms: 'sms',
|
|
24
|
+
Websocket: 'websocket'
|
|
25
|
+
};
|
|
19
26
|
function ConversationSummaryFromJSON(json) {
|
|
20
27
|
return ConversationSummaryFromJSONTyped(json, false);
|
|
21
28
|
}
|
|
@@ -32,6 +39,7 @@ function ConversationSummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
32
39
|
'last_conversation_participant_arn': !(0, runtime_1.exists)(json, 'last_conversation_participant_arn') ? undefined : json['last_conversation_participant_arn'],
|
|
33
40
|
'last_conversation_participant_name': !(0, runtime_1.exists)(json, 'last_conversation_participant_name') ? undefined : json['last_conversation_participant_name'],
|
|
34
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'],
|
|
35
43
|
'merchant_id': !(0, runtime_1.exists)(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
36
44
|
'message_count': !(0, runtime_1.exists)(json, 'message_count') ? undefined : json['message_count'],
|
|
37
45
|
'participants': !(0, runtime_1.exists)(json, 'participants') ? undefined : (json['participants'].map(ConversationParticipant_1.ConversationParticipantFromJSON)),
|
|
@@ -56,6 +64,7 @@ function ConversationSummaryToJSON(value) {
|
|
|
56
64
|
'last_conversation_participant_arn': value.last_conversation_participant_arn,
|
|
57
65
|
'last_conversation_participant_name': value.last_conversation_participant_name,
|
|
58
66
|
'last_message_dts': value.last_message_dts,
|
|
67
|
+
'medium': value.medium,
|
|
59
68
|
'merchant_id': value.merchant_id,
|
|
60
69
|
'message_count': value.message_count,
|
|
61
70
|
'participants': value.participants === undefined ? undefined : (value.participants.map(ConversationParticipant_1.ConversationParticipantToJSON)),
|
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
|
|
|
@@ -68,6 +68,12 @@ export interface ConversationSummary {
|
|
|
68
68
|
* @memberof ConversationSummary
|
|
69
69
|
*/
|
|
70
70
|
last_message_dts?: string;
|
|
71
|
+
/**
|
|
72
|
+
* The communication medium of the customer.
|
|
73
|
+
* @type {string}
|
|
74
|
+
* @memberof ConversationSummary
|
|
75
|
+
*/
|
|
76
|
+
medium?: ConversationSummaryMediumEnum;
|
|
71
77
|
/**
|
|
72
78
|
*
|
|
73
79
|
* @type {string}
|
|
@@ -106,6 +112,17 @@ export interface ConversationSummary {
|
|
|
106
112
|
visible?: boolean;
|
|
107
113
|
}
|
|
108
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
|
+
|
|
109
126
|
export function ConversationSummaryFromJSON(json: any): ConversationSummary {
|
|
110
127
|
return ConversationSummaryFromJSONTyped(json, false);
|
|
111
128
|
}
|
|
@@ -123,6 +140,7 @@ export function ConversationSummaryFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
123
140
|
'last_conversation_participant_arn': !exists(json, 'last_conversation_participant_arn') ? undefined : json['last_conversation_participant_arn'],
|
|
124
141
|
'last_conversation_participant_name': !exists(json, 'last_conversation_participant_name') ? undefined : json['last_conversation_participant_name'],
|
|
125
142
|
'last_message_dts': !exists(json, 'last_message_dts') ? undefined : json['last_message_dts'],
|
|
143
|
+
'medium': !exists(json, 'medium') ? undefined : json['medium'],
|
|
126
144
|
'merchant_id': !exists(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
127
145
|
'message_count': !exists(json, 'message_count') ? undefined : json['message_count'],
|
|
128
146
|
'participants': !exists(json, 'participants') ? undefined : ((json['participants'] as Array<any>).map(ConversationParticipantFromJSON)),
|
|
@@ -148,6 +166,7 @@ export function ConversationSummaryToJSON(value?: ConversationSummary | null): a
|
|
|
148
166
|
'last_conversation_participant_arn': value.last_conversation_participant_arn,
|
|
149
167
|
'last_conversation_participant_name': value.last_conversation_participant_name,
|
|
150
168
|
'last_message_dts': value.last_message_dts,
|
|
169
|
+
'medium': value.medium,
|
|
151
170
|
'merchant_id': value.merchant_id,
|
|
152
171
|
'message_count': value.message_count,
|
|
153
172
|
'participants': value.participants === undefined ? undefined : ((value.participants as Array<any>).map(ConversationParticipantToJSON)),
|