ultracart_rest_api_v2_typescript 4.0.48-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.
@@ -145,6 +145,7 @@ src/models/ConversationAgentAuth.ts
145
145
  src/models/ConversationAgentAuthResponse.ts
146
146
  src/models/ConversationEventQueuePosition.ts
147
147
  src/models/ConversationEventRRWeb.ts
148
+ src/models/ConversationEventTyping.ts
148
149
  src/models/ConversationMessage.ts
149
150
  src/models/ConversationMessageTransportStatus.ts
150
151
  src/models/ConversationMultimediaUploadUrl.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## ultracart_rest_api_v2_typescript@4.0.48-RC
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.48-RC --save
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,9 @@ 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 |
58
+ | 4.0.50-RC | 08/03/2022 | conversation summary participants |
59
+ | 4.0.49-RC | 08/03/2022 | more conversation events |
57
60
  | 4.0.48-RC | 08/02/2022 | storefront communication sequence test method |
58
61
  | 4.0.47-RC | 08/01/2022 | conversation event refinement |
59
62
  | 4.0.46-RC | 07/29/2022 | conversation development |
@@ -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;
@@ -0,0 +1,39 @@
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 ConversationEventTyping
16
+ */
17
+ export interface ConversationEventTyping {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ConversationEventTyping
22
+ */
23
+ author_conversation_participant_arn?: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof ConversationEventTyping
28
+ */
29
+ author_conversation_participant_name?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof ConversationEventTyping
34
+ */
35
+ value?: string;
36
+ }
37
+ export declare function ConversationEventTypingFromJSON(json: any): ConversationEventTyping;
38
+ export declare function ConversationEventTypingFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationEventTyping;
39
+ export declare function ConversationEventTypingToJSON(value?: ConversationEventTyping | null): any;
@@ -0,0 +1,46 @@
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.ConversationEventTypingToJSON = exports.ConversationEventTypingFromJSONTyped = exports.ConversationEventTypingFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ function ConversationEventTypingFromJSON(json) {
19
+ return ConversationEventTypingFromJSONTyped(json, false);
20
+ }
21
+ exports.ConversationEventTypingFromJSON = ConversationEventTypingFromJSON;
22
+ function ConversationEventTypingFromJSONTyped(json, ignoreDiscriminator) {
23
+ if ((json === undefined) || (json === null)) {
24
+ return json;
25
+ }
26
+ return {
27
+ 'author_conversation_participant_arn': !(0, runtime_1.exists)(json, 'author_conversation_participant_arn') ? undefined : json['author_conversation_participant_arn'],
28
+ 'author_conversation_participant_name': !(0, runtime_1.exists)(json, 'author_conversation_participant_name') ? undefined : json['author_conversation_participant_name'],
29
+ 'value': !(0, runtime_1.exists)(json, 'value') ? undefined : json['value'],
30
+ };
31
+ }
32
+ exports.ConversationEventTypingFromJSONTyped = ConversationEventTypingFromJSONTyped;
33
+ function ConversationEventTypingToJSON(value) {
34
+ if (value === undefined) {
35
+ return undefined;
36
+ }
37
+ if (value === null) {
38
+ return null;
39
+ }
40
+ return {
41
+ 'author_conversation_participant_arn': value.author_conversation_participant_arn,
42
+ 'author_conversation_participant_name': value.author_conversation_participant_name,
43
+ 'value': value.value,
44
+ };
45
+ }
46
+ exports.ConversationEventTypingToJSON = ConversationEventTypingToJSON;
@@ -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,
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import { ConversationEventQueuePosition } from './ConversationEventQueuePosition';
13
13
  import { ConversationEventRRWeb } from './ConversationEventRRWeb';
14
+ import { ConversationEventTyping } from './ConversationEventTyping';
14
15
  import { ConversationMessage } from './ConversationMessage';
15
16
  import { ConversationSummary } from './ConversationSummary';
16
17
  import { ConversationWebchatQueueStatus } from './ConversationWebchatQueueStatus';
@@ -44,6 +45,12 @@ export interface ConversationWebsocketMessage {
44
45
  * @memberof ConversationWebsocketMessage
45
46
  */
46
47
  event_new_message?: ConversationSummary;
48
+ /**
49
+ *
50
+ * @type {ConversationSummary}
51
+ * @memberof ConversationWebsocketMessage
52
+ */
53
+ event_participant_update?: ConversationSummary;
47
54
  /**
48
55
  *
49
56
  * @type {ConversationEventQueuePosition}
@@ -68,6 +75,12 @@ export interface ConversationWebsocketMessage {
68
75
  * @memberof ConversationWebsocketMessage
69
76
  */
70
77
  event_type?: ConversationWebsocketMessageEventTypeEnum;
78
+ /**
79
+ *
80
+ * @type {ConversationEventTyping}
81
+ * @memberof ConversationWebsocketMessage
82
+ */
83
+ event_typing?: ConversationEventTyping;
71
84
  /**
72
85
  *
73
86
  * @type {ConversationMessage}
@@ -99,6 +112,7 @@ export declare const ConversationWebsocketMessageEventTypeEnum: {
99
112
  readonly UpdatedMessage: "updated message";
100
113
  readonly QueueStatusUpdate: "queue status update";
101
114
  readonly Rrweb: "rrweb";
115
+ readonly ParticipantUpdate: "participant update";
102
116
  };
103
117
  export declare type ConversationWebsocketMessageEventTypeEnum = typeof ConversationWebsocketMessageEventTypeEnum[keyof typeof ConversationWebsocketMessageEventTypeEnum];
104
118
  /**
@@ -17,6 +17,7 @@ exports.ConversationWebsocketMessageToJSON = exports.ConversationWebsocketMessag
17
17
  var runtime_1 = require("../runtime");
18
18
  var ConversationEventQueuePosition_1 = require("./ConversationEventQueuePosition");
19
19
  var ConversationEventRRWeb_1 = require("./ConversationEventRRWeb");
20
+ var ConversationEventTyping_1 = require("./ConversationEventTyping");
20
21
  var ConversationMessage_1 = require("./ConversationMessage");
21
22
  var ConversationSummary_1 = require("./ConversationSummary");
22
23
  var ConversationWebchatQueueStatus_1 = require("./ConversationWebchatQueueStatus");
@@ -31,7 +32,8 @@ exports.ConversationWebsocketMessageEventTypeEnum = {
31
32
  NewMessage: 'new message',
32
33
  UpdatedMessage: 'updated message',
33
34
  QueueStatusUpdate: 'queue status update',
34
- Rrweb: 'rrweb'
35
+ Rrweb: 'rrweb',
36
+ ParticipantUpdate: 'participant update'
35
37
  };
36
38
  /**
37
39
  * @export
@@ -55,10 +57,12 @@ function ConversationWebsocketMessageFromJSONTyped(json, ignoreDiscriminator) {
55
57
  'event_conversation_closed': !(0, runtime_1.exists)(json, 'event_conversation_closed') ? undefined : (0, ConversationSummary_1.ConversationSummaryFromJSON)(json['event_conversation_closed']),
56
58
  'event_new_conversation': !(0, runtime_1.exists)(json, 'event_new_conversation') ? undefined : (0, ConversationSummary_1.ConversationSummaryFromJSON)(json['event_new_conversation']),
57
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']),
58
61
  'event_queue_position': !(0, runtime_1.exists)(json, 'event_queue_position') ? undefined : (0, ConversationEventQueuePosition_1.ConversationEventQueuePositionFromJSON)(json['event_queue_position']),
59
62
  'event_queue_status_update': !(0, runtime_1.exists)(json, 'event_queue_status_update') ? undefined : (0, ConversationWebchatQueueStatus_1.ConversationWebchatQueueStatusFromJSON)(json['event_queue_status_update']),
60
63
  'event_rrweb': !(0, runtime_1.exists)(json, 'event_rrweb') ? undefined : (0, ConversationEventRRWeb_1.ConversationEventRRWebFromJSON)(json['event_rrweb']),
61
64
  'event_type': !(0, runtime_1.exists)(json, 'event_type') ? undefined : json['event_type'],
65
+ 'event_typing': !(0, runtime_1.exists)(json, 'event_typing') ? undefined : (0, ConversationEventTyping_1.ConversationEventTypingFromJSON)(json['event_typing']),
62
66
  'event_updated_message': !(0, runtime_1.exists)(json, 'event_updated_message') ? undefined : (0, ConversationMessage_1.ConversationMessageFromJSON)(json['event_updated_message']),
63
67
  'message': !(0, runtime_1.exists)(json, 'message') ? undefined : (0, ConversationMessage_1.ConversationMessageFromJSON)(json['message']),
64
68
  'type': !(0, runtime_1.exists)(json, 'type') ? undefined : json['type'],
@@ -77,10 +81,12 @@ function ConversationWebsocketMessageToJSON(value) {
77
81
  'event_conversation_closed': (0, ConversationSummary_1.ConversationSummaryToJSON)(value.event_conversation_closed),
78
82
  'event_new_conversation': (0, ConversationSummary_1.ConversationSummaryToJSON)(value.event_new_conversation),
79
83
  'event_new_message': (0, ConversationSummary_1.ConversationSummaryToJSON)(value.event_new_message),
84
+ 'event_participant_update': (0, ConversationSummary_1.ConversationSummaryToJSON)(value.event_participant_update),
80
85
  'event_queue_position': (0, ConversationEventQueuePosition_1.ConversationEventQueuePositionToJSON)(value.event_queue_position),
81
86
  'event_queue_status_update': (0, ConversationWebchatQueueStatus_1.ConversationWebchatQueueStatusToJSON)(value.event_queue_status_update),
82
87
  'event_rrweb': (0, ConversationEventRRWeb_1.ConversationEventRRWebToJSON)(value.event_rrweb),
83
88
  'event_type': value.event_type,
89
+ 'event_typing': (0, ConversationEventTyping_1.ConversationEventTypingToJSON)(value.event_typing),
84
90
  'event_updated_message': (0, ConversationMessage_1.ConversationMessageToJSON)(value.event_updated_message),
85
91
  'message': (0, ConversationMessage_1.ConversationMessageToJSON)(value.message),
86
92
  'type': value.type,
@@ -120,6 +120,7 @@ export * from './ConversationAgentAuth';
120
120
  export * from './ConversationAgentAuthResponse';
121
121
  export * from './ConversationEventQueuePosition';
122
122
  export * from './ConversationEventRRWeb';
123
+ export * from './ConversationEventTyping';
123
124
  export * from './ConversationMessage';
124
125
  export * from './ConversationMessageTransportStatus';
125
126
  export * from './ConversationMultimediaUploadUrl';
@@ -138,6 +138,7 @@ __exportStar(require("./ConversationAgentAuth"), exports);
138
138
  __exportStar(require("./ConversationAgentAuthResponse"), exports);
139
139
  __exportStar(require("./ConversationEventQueuePosition"), exports);
140
140
  __exportStar(require("./ConversationEventRRWeb"), exports);
141
+ __exportStar(require("./ConversationEventTyping"), exports);
141
142
  __exportStar(require("./ConversationMessage"), exports);
142
143
  __exportStar(require("./ConversationMessageTransportStatus"), exports);
143
144
  __exportStar(require("./ConversationMultimediaUploadUrl"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "4.0.48-RC",
3
+ "version": "4.0.51-RC",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "repository": {
@@ -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
 
@@ -0,0 +1,72 @@
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 ConversationEventTyping
20
+ */
21
+ export interface ConversationEventTyping {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ConversationEventTyping
26
+ */
27
+ author_conversation_participant_arn?: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ConversationEventTyping
32
+ */
33
+ author_conversation_participant_name?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ConversationEventTyping
38
+ */
39
+ value?: string;
40
+ }
41
+
42
+ export function ConversationEventTypingFromJSON(json: any): ConversationEventTyping {
43
+ return ConversationEventTypingFromJSONTyped(json, false);
44
+ }
45
+
46
+ export function ConversationEventTypingFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationEventTyping {
47
+ if ((json === undefined) || (json === null)) {
48
+ return json;
49
+ }
50
+ return {
51
+
52
+ 'author_conversation_participant_arn': !exists(json, 'author_conversation_participant_arn') ? undefined : json['author_conversation_participant_arn'],
53
+ 'author_conversation_participant_name': !exists(json, 'author_conversation_participant_name') ? undefined : json['author_conversation_participant_name'],
54
+ 'value': !exists(json, 'value') ? undefined : json['value'],
55
+ };
56
+ }
57
+
58
+ export function ConversationEventTypingToJSON(value?: ConversationEventTyping | null): any {
59
+ if (value === undefined) {
60
+ return undefined;
61
+ }
62
+ if (value === null) {
63
+ return null;
64
+ }
65
+ return {
66
+
67
+ 'author_conversation_participant_arn': value.author_conversation_participant_arn,
68
+ 'author_conversation_participant_name': value.author_conversation_participant_name,
69
+ 'value': value.value,
70
+ };
71
+ }
72
+
@@ -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,
@@ -25,6 +25,12 @@ import {
25
25
  ConversationEventRRWebFromJSONTyped,
26
26
  ConversationEventRRWebToJSON,
27
27
  } from './ConversationEventRRWeb';
28
+ import {
29
+ ConversationEventTyping,
30
+ ConversationEventTypingFromJSON,
31
+ ConversationEventTypingFromJSONTyped,
32
+ ConversationEventTypingToJSON,
33
+ } from './ConversationEventTyping';
28
34
  import {
29
35
  ConversationMessage,
30
36
  ConversationMessageFromJSON,
@@ -74,6 +80,12 @@ export interface ConversationWebsocketMessage {
74
80
  * @memberof ConversationWebsocketMessage
75
81
  */
76
82
  event_new_message?: ConversationSummary;
83
+ /**
84
+ *
85
+ * @type {ConversationSummary}
86
+ * @memberof ConversationWebsocketMessage
87
+ */
88
+ event_participant_update?: ConversationSummary;
77
89
  /**
78
90
  *
79
91
  * @type {ConversationEventQueuePosition}
@@ -98,6 +110,12 @@ export interface ConversationWebsocketMessage {
98
110
  * @memberof ConversationWebsocketMessage
99
111
  */
100
112
  event_type?: ConversationWebsocketMessageEventTypeEnum;
113
+ /**
114
+ *
115
+ * @type {ConversationEventTyping}
116
+ * @memberof ConversationWebsocketMessage
117
+ */
118
+ event_typing?: ConversationEventTyping;
101
119
  /**
102
120
  *
103
121
  * @type {ConversationMessage}
@@ -130,7 +148,8 @@ export const ConversationWebsocketMessageEventTypeEnum = {
130
148
  NewMessage: 'new message',
131
149
  UpdatedMessage: 'updated message',
132
150
  QueueStatusUpdate: 'queue status update',
133
- Rrweb: 'rrweb'
151
+ Rrweb: 'rrweb',
152
+ ParticipantUpdate: 'participant update'
134
153
  } as const;
135
154
  export type ConversationWebsocketMessageEventTypeEnum = typeof ConversationWebsocketMessageEventTypeEnum[keyof typeof ConversationWebsocketMessageEventTypeEnum];
136
155
 
@@ -160,10 +179,12 @@ export function ConversationWebsocketMessageFromJSONTyped(json: any, ignoreDiscr
160
179
  'event_conversation_closed': !exists(json, 'event_conversation_closed') ? undefined : ConversationSummaryFromJSON(json['event_conversation_closed']),
161
180
  'event_new_conversation': !exists(json, 'event_new_conversation') ? undefined : ConversationSummaryFromJSON(json['event_new_conversation']),
162
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']),
163
183
  'event_queue_position': !exists(json, 'event_queue_position') ? undefined : ConversationEventQueuePositionFromJSON(json['event_queue_position']),
164
184
  'event_queue_status_update': !exists(json, 'event_queue_status_update') ? undefined : ConversationWebchatQueueStatusFromJSON(json['event_queue_status_update']),
165
185
  'event_rrweb': !exists(json, 'event_rrweb') ? undefined : ConversationEventRRWebFromJSON(json['event_rrweb']),
166
186
  'event_type': !exists(json, 'event_type') ? undefined : json['event_type'],
187
+ 'event_typing': !exists(json, 'event_typing') ? undefined : ConversationEventTypingFromJSON(json['event_typing']),
167
188
  'event_updated_message': !exists(json, 'event_updated_message') ? undefined : ConversationMessageFromJSON(json['event_updated_message']),
168
189
  'message': !exists(json, 'message') ? undefined : ConversationMessageFromJSON(json['message']),
169
190
  'type': !exists(json, 'type') ? undefined : json['type'],
@@ -183,10 +204,12 @@ export function ConversationWebsocketMessageToJSON(value?: ConversationWebsocket
183
204
  'event_conversation_closed': ConversationSummaryToJSON(value.event_conversation_closed),
184
205
  'event_new_conversation': ConversationSummaryToJSON(value.event_new_conversation),
185
206
  'event_new_message': ConversationSummaryToJSON(value.event_new_message),
207
+ 'event_participant_update': ConversationSummaryToJSON(value.event_participant_update),
186
208
  'event_queue_position': ConversationEventQueuePositionToJSON(value.event_queue_position),
187
209
  'event_queue_status_update': ConversationWebchatQueueStatusToJSON(value.event_queue_status_update),
188
210
  'event_rrweb': ConversationEventRRWebToJSON(value.event_rrweb),
189
211
  'event_type': value.event_type,
212
+ 'event_typing': ConversationEventTypingToJSON(value.event_typing),
190
213
  'event_updated_message': ConversationMessageToJSON(value.event_updated_message),
191
214
  'message': ConversationMessageToJSON(value.message),
192
215
  'type': value.type,
@@ -122,6 +122,7 @@ export * from './ConversationAgentAuth';
122
122
  export * from './ConversationAgentAuthResponse';
123
123
  export * from './ConversationEventQueuePosition';
124
124
  export * from './ConversationEventRRWeb';
125
+ export * from './ConversationEventTyping';
125
126
  export * from './ConversationMessage';
126
127
  export * from './ConversationMessageTransportStatus';
127
128
  export * from './ConversationMultimediaUploadUrl';