ultracart_rest_api_v2_typescript 4.0.50-RC → 4.0.53-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.
Files changed (36) hide show
  1. package/.openapi-generator/FILES +2 -0
  2. package/README.md +5 -2
  3. package/dist/apis/ConversationApi.d.ts +2 -0
  4. package/dist/apis/ConversationApi.js +3 -0
  5. package/dist/models/Conversation.d.ts +62 -0
  6. package/dist/models/Conversation.js +26 -1
  7. package/dist/models/ConversationEventReadMessage.d.ts +39 -0
  8. package/dist/models/ConversationEventReadMessage.js +46 -0
  9. package/dist/models/ConversationMessage.d.ts +18 -0
  10. package/dist/models/ConversationMessage.js +6 -0
  11. package/dist/models/ConversationMessageTransportStatus.d.ts +19 -2
  12. package/dist/models/ConversationMessageTransportStatus.js +17 -1
  13. package/dist/models/ConversationParticipant.d.ts +6 -0
  14. package/dist/models/ConversationParticipant.js +2 -0
  15. package/dist/models/ConversationSummary.d.ts +14 -0
  16. package/dist/models/ConversationSummary.js +10 -1
  17. package/dist/models/ConversationWebsocketMessage.d.ts +8 -0
  18. package/dist/models/ConversationWebsocketMessage.js +5 -1
  19. package/dist/models/Coupon.d.ts +3 -2
  20. package/dist/models/Coupon.js +3 -2
  21. package/dist/models/CouponNoDiscount.d.ts +27 -0
  22. package/dist/models/CouponNoDiscount.js +42 -0
  23. package/dist/models/index.d.ts +2 -0
  24. package/dist/models/index.js +2 -0
  25. package/package.json +1 -1
  26. package/src/apis/ConversationApi.ts +6 -0
  27. package/src/models/Conversation.ts +83 -0
  28. package/src/models/ConversationEventReadMessage.ts +72 -0
  29. package/src/models/ConversationMessage.ts +24 -0
  30. package/src/models/ConversationMessageTransportStatus.ts +22 -2
  31. package/src/models/ConversationParticipant.ts +8 -0
  32. package/src/models/ConversationSummary.ts +19 -0
  33. package/src/models/ConversationWebsocketMessage.ts +16 -1
  34. package/src/models/Coupon.ts +10 -4
  35. package/src/models/CouponNoDiscount.ts +56 -0
  36. package/src/models/index.ts +2 -0
@@ -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/ConversationEventReadMessage.ts
148
149
  src/models/ConversationEventTyping.ts
149
150
  src/models/ConversationMessage.ts
150
151
  src/models/ConversationMessageTransportStatus.ts
@@ -199,6 +200,7 @@ src/models/CouponFreeShippingWithSubtotal.ts
199
200
  src/models/CouponItemSearchResult.ts
200
201
  src/models/CouponItemSearchResultsResponse.ts
201
202
  src/models/CouponMultipleAmountsOffItems.ts
203
+ src/models/CouponNoDiscount.ts
202
204
  src/models/CouponPercentOffItemWithItemsQuantityPurchase.ts
203
205
  src/models/CouponPercentOffItems.ts
204
206
  src/models/CouponPercentOffItemsAndFreeShipping.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## ultracart_rest_api_v2_typescript@4.0.50-RC
1
+ ## ultracart_rest_api_v2_typescript@4.0.53-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.50-RC --save
39
+ npm install ultracart_rest_api_v2_typescript@4.0.53-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.53-RC | 08/10/2022 | conversation event refactoring |
58
+ | 4.0.52-RC | 08/05/2022 | conversation adjustments for ES integration |
59
+ | 4.0.51-RC | 08/05/2022 | conversations query by medium and stats fixes |
57
60
  | 4.0.50-RC | 08/03/2022 | conversation summary participants |
58
61
  | 4.0.49-RC | 08/03/2022 | more conversation events |
59
62
  | 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;
@@ -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 ConversationEventReadMessage
16
+ */
17
+ export interface ConversationEventReadMessage {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ConversationEventReadMessage
22
+ */
23
+ conversation_message_uuid?: string;
24
+ /**
25
+ * Message date/time
26
+ * @type {string}
27
+ * @memberof ConversationEventReadMessage
28
+ */
29
+ message_dts?: string;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof ConversationEventReadMessage
34
+ */
35
+ message_epoch?: number;
36
+ }
37
+ export declare function ConversationEventReadMessageFromJSON(json: any): ConversationEventReadMessage;
38
+ export declare function ConversationEventReadMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationEventReadMessage;
39
+ export declare function ConversationEventReadMessageToJSON(value?: ConversationEventReadMessage | 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.ConversationEventReadMessageToJSON = exports.ConversationEventReadMessageFromJSONTyped = exports.ConversationEventReadMessageFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ function ConversationEventReadMessageFromJSON(json) {
19
+ return ConversationEventReadMessageFromJSONTyped(json, false);
20
+ }
21
+ exports.ConversationEventReadMessageFromJSON = ConversationEventReadMessageFromJSON;
22
+ function ConversationEventReadMessageFromJSONTyped(json, ignoreDiscriminator) {
23
+ if ((json === undefined) || (json === null)) {
24
+ return json;
25
+ }
26
+ return {
27
+ 'conversation_message_uuid': !(0, runtime_1.exists)(json, 'conversation_message_uuid') ? undefined : json['conversation_message_uuid'],
28
+ 'message_dts': !(0, runtime_1.exists)(json, 'message_dts') ? undefined : json['message_dts'],
29
+ 'message_epoch': !(0, runtime_1.exists)(json, 'message_epoch') ? undefined : json['message_epoch'],
30
+ };
31
+ }
32
+ exports.ConversationEventReadMessageFromJSONTyped = ConversationEventReadMessageFromJSONTyped;
33
+ function ConversationEventReadMessageToJSON(value) {
34
+ if (value === undefined) {
35
+ return undefined;
36
+ }
37
+ if (value === null) {
38
+ return null;
39
+ }
40
+ return {
41
+ 'conversation_message_uuid': value.conversation_message_uuid,
42
+ 'message_dts': value.message_dts,
43
+ 'message_epoch': value.message_epoch,
44
+ };
45
+ }
46
+ exports.ConversationEventReadMessageToJSON = ConversationEventReadMessageToJSON;
@@ -40,18 +40,36 @@ 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}
52
64
  * @memberof ConversationMessage
53
65
  */
54
66
  message_dts?: string;
67
+ /**
68
+ * Message epoch milliseconds
69
+ * @type {number}
70
+ * @memberof ConversationMessage
71
+ */
72
+ message_epoch?: number;
55
73
  /**
56
74
  *
57
75
  * @type {Array<ConversationMessageTransportStatus>}
@@ -36,8 +36,11 @@ 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'],
43
+ 'message_epoch': !(0, runtime_1.exists)(json, 'message_epoch') ? undefined : json['message_epoch'],
41
44
  'transport_statuses': !(0, runtime_1.exists)(json, 'transport_statuses') ? undefined : (json['transport_statuses'].map(ConversationMessageTransportStatus_1.ConversationMessageTransportStatusFromJSON)),
42
45
  'type': !(0, runtime_1.exists)(json, 'type') ? undefined : json['type'],
43
46
  'upload_keys': !(0, runtime_1.exists)(json, 'upload_keys') ? undefined : json['upload_keys'],
@@ -56,8 +59,11 @@ function ConversationMessageToJSON(value) {
56
59
  'author_conversation_participant_name': value.author_conversation_participant_name,
57
60
  'body': value.body,
58
61
  'client_message_id': value.client_message_id,
62
+ 'conversation_message_uuid': value.conversation_message_uuid,
59
63
  'media_urls': value.media_urls,
64
+ 'merchant_id': value.merchant_id,
60
65
  'message_dts': value.message_dts,
66
+ 'message_epoch': value.message_epoch,
61
67
  'transport_statuses': value.transport_statuses === undefined ? undefined : (value.transport_statuses.map(ConversationMessageTransportStatus_1.ConversationMessageTransportStatusToJSON)),
62
68
  'type': value.type,
63
69
  'upload_keys': value.upload_keys,
@@ -22,12 +22,29 @@ export interface ConversationMessageTransportStatus {
22
22
  */
23
23
  conversation_participant_arn?: string;
24
24
  /**
25
- *
25
+ * The status of the message transport
26
26
  * @type {string}
27
27
  * @memberof ConversationMessageTransportStatus
28
28
  */
29
- status?: string;
29
+ status?: ConversationMessageTransportStatusStatusEnum;
30
30
  }
31
+ /**
32
+ * @export
33
+ */
34
+ export declare const ConversationMessageTransportStatusStatusEnum: {
35
+ readonly Accepted: "accepted";
36
+ readonly Scheduled: "scheduled";
37
+ readonly Queued: "queued";
38
+ readonly Sending: "sending";
39
+ readonly Sent: "sent";
40
+ readonly Read: "read";
41
+ readonly TwilioCredentialsMissing: "TWILIO_CREDENTIALS_MISSING";
42
+ readonly SentToTwilio: "SENT_TO_TWILIO";
43
+ readonly TwilioError: "TWILIO_ERROR";
44
+ readonly SentToPinpoint: "SENT_TO_PINPOINT";
45
+ readonly PinpointError: "PINPOINT_ERROR";
46
+ };
47
+ export declare type ConversationMessageTransportStatusStatusEnum = typeof ConversationMessageTransportStatusStatusEnum[keyof typeof ConversationMessageTransportStatusStatusEnum];
31
48
  export declare function ConversationMessageTransportStatusFromJSON(json: any): ConversationMessageTransportStatus;
32
49
  export declare function ConversationMessageTransportStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationMessageTransportStatus;
33
50
  export declare function ConversationMessageTransportStatusToJSON(value?: ConversationMessageTransportStatus | null): any;
@@ -13,8 +13,24 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.ConversationMessageTransportStatusToJSON = exports.ConversationMessageTransportStatusFromJSONTyped = exports.ConversationMessageTransportStatusFromJSON = void 0;
16
+ exports.ConversationMessageTransportStatusToJSON = exports.ConversationMessageTransportStatusFromJSONTyped = exports.ConversationMessageTransportStatusFromJSON = exports.ConversationMessageTransportStatusStatusEnum = void 0;
17
17
  var runtime_1 = require("../runtime");
18
+ /**
19
+ * @export
20
+ */
21
+ exports.ConversationMessageTransportStatusStatusEnum = {
22
+ Accepted: 'accepted',
23
+ Scheduled: 'scheduled',
24
+ Queued: 'queued',
25
+ Sending: 'sending',
26
+ Sent: 'sent',
27
+ Read: 'read',
28
+ TwilioCredentialsMissing: 'TWILIO_CREDENTIALS_MISSING',
29
+ SentToTwilio: 'SENT_TO_TWILIO',
30
+ TwilioError: 'TWILIO_ERROR',
31
+ SentToPinpoint: 'SENT_TO_PINPOINT',
32
+ PinpointError: 'PINPOINT_ERROR'
33
+ };
18
34
  function ConversationMessageTransportStatusFromJSON(json) {
19
35
  return ConversationMessageTransportStatusFromJSONTyped(json, false);
20
36
  }
@@ -57,6 +57,12 @@ export interface ConversationParticipant {
57
57
  * @memberof ConversationParticipant
58
58
  */
59
59
  status?: string;
60
+ /**
61
+ *
62
+ * @type {number}
63
+ * @memberof ConversationParticipant
64
+ */
65
+ unread_messages?: number;
60
66
  }
61
67
  export declare function ConversationParticipantFromJSON(json: any): ConversationParticipant;
62
68
  export declare function ConversationParticipantFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationParticipant;
@@ -31,6 +31,7 @@ function ConversationParticipantFromJSONTyped(json, ignoreDiscriminator) {
31
31
  'last_message_dts': !(0, runtime_1.exists)(json, 'last_message_dts') ? undefined : json['last_message_dts'],
32
32
  'left_dts': !(0, runtime_1.exists)(json, 'left_dts') ? undefined : json['left_dts'],
33
33
  'status': !(0, runtime_1.exists)(json, 'status') ? undefined : json['status'],
34
+ 'unread_messages': !(0, runtime_1.exists)(json, 'unread_messages') ? undefined : json['unread_messages'],
34
35
  };
35
36
  }
36
37
  exports.ConversationParticipantFromJSONTyped = ConversationParticipantFromJSONTyped;
@@ -49,6 +50,7 @@ function ConversationParticipantToJSON(value) {
49
50
  'last_message_dts': value.last_message_dts,
50
51
  'left_dts': value.left_dts,
51
52
  'status': value.status,
53
+ 'unread_messages': value.unread_messages,
52
54
  };
53
55
  }
54
56
  exports.ConversationParticipantToJSON = ConversationParticipantToJSON;
@@ -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)),
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import { ConversationEventQueuePosition } from './ConversationEventQueuePosition';
13
13
  import { ConversationEventRRWeb } from './ConversationEventRRWeb';
14
+ import { ConversationEventReadMessage } from './ConversationEventReadMessage';
14
15
  import { ConversationEventTyping } from './ConversationEventTyping';
15
16
  import { ConversationMessage } from './ConversationMessage';
16
17
  import { ConversationSummary } from './ConversationSummary';
@@ -63,6 +64,12 @@ export interface ConversationWebsocketMessage {
63
64
  * @memberof ConversationWebsocketMessage
64
65
  */
65
66
  event_queue_status_update?: ConversationWebchatQueueStatus;
67
+ /**
68
+ *
69
+ * @type {ConversationEventReadMessage}
70
+ * @memberof ConversationWebsocketMessage
71
+ */
72
+ event_read_message?: ConversationEventReadMessage;
66
73
  /**
67
74
  *
68
75
  * @type {ConversationEventRRWeb}
@@ -113,6 +120,7 @@ export declare const ConversationWebsocketMessageEventTypeEnum: {
113
120
  readonly QueueStatusUpdate: "queue status update";
114
121
  readonly Rrweb: "rrweb";
115
122
  readonly ParticipantUpdate: "participant update";
123
+ readonly ReadMessage: "read message";
116
124
  };
117
125
  export declare type ConversationWebsocketMessageEventTypeEnum = typeof ConversationWebsocketMessageEventTypeEnum[keyof typeof ConversationWebsocketMessageEventTypeEnum];
118
126
  /**
@@ -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 ConversationEventReadMessage_1 = require("./ConversationEventReadMessage");
20
21
  var ConversationEventTyping_1 = require("./ConversationEventTyping");
21
22
  var ConversationMessage_1 = require("./ConversationMessage");
22
23
  var ConversationSummary_1 = require("./ConversationSummary");
@@ -33,7 +34,8 @@ exports.ConversationWebsocketMessageEventTypeEnum = {
33
34
  UpdatedMessage: 'updated message',
34
35
  QueueStatusUpdate: 'queue status update',
35
36
  Rrweb: 'rrweb',
36
- ParticipantUpdate: 'participant update'
37
+ ParticipantUpdate: 'participant update',
38
+ ReadMessage: 'read message'
37
39
  };
38
40
  /**
39
41
  * @export
@@ -60,6 +62,7 @@ function ConversationWebsocketMessageFromJSONTyped(json, ignoreDiscriminator) {
60
62
  'event_participant_update': !(0, runtime_1.exists)(json, 'event_participant_update') ? undefined : (0, ConversationSummary_1.ConversationSummaryFromJSON)(json['event_participant_update']),
61
63
  'event_queue_position': !(0, runtime_1.exists)(json, 'event_queue_position') ? undefined : (0, ConversationEventQueuePosition_1.ConversationEventQueuePositionFromJSON)(json['event_queue_position']),
62
64
  'event_queue_status_update': !(0, runtime_1.exists)(json, 'event_queue_status_update') ? undefined : (0, ConversationWebchatQueueStatus_1.ConversationWebchatQueueStatusFromJSON)(json['event_queue_status_update']),
65
+ 'event_read_message': !(0, runtime_1.exists)(json, 'event_read_message') ? undefined : (0, ConversationEventReadMessage_1.ConversationEventReadMessageFromJSON)(json['event_read_message']),
63
66
  'event_rrweb': !(0, runtime_1.exists)(json, 'event_rrweb') ? undefined : (0, ConversationEventRRWeb_1.ConversationEventRRWebFromJSON)(json['event_rrweb']),
64
67
  'event_type': !(0, runtime_1.exists)(json, 'event_type') ? undefined : json['event_type'],
65
68
  'event_typing': !(0, runtime_1.exists)(json, 'event_typing') ? undefined : (0, ConversationEventTyping_1.ConversationEventTypingFromJSON)(json['event_typing']),
@@ -84,6 +87,7 @@ function ConversationWebsocketMessageToJSON(value) {
84
87
  'event_participant_update': (0, ConversationSummary_1.ConversationSummaryToJSON)(value.event_participant_update),
85
88
  'event_queue_position': (0, ConversationEventQueuePosition_1.ConversationEventQueuePositionToJSON)(value.event_queue_position),
86
89
  'event_queue_status_update': (0, ConversationWebchatQueueStatus_1.ConversationWebchatQueueStatusToJSON)(value.event_queue_status_update),
90
+ 'event_read_message': (0, ConversationEventReadMessage_1.ConversationEventReadMessageToJSON)(value.event_read_message),
87
91
  'event_rrweb': (0, ConversationEventRRWeb_1.ConversationEventRRWebToJSON)(value.event_rrweb),
88
92
  'event_type': value.event_type,
89
93
  'event_typing': (0, ConversationEventTyping_1.ConversationEventTypingToJSON)(value.event_typing),
@@ -33,6 +33,7 @@ import { CouponFreeShippingSpecificItems } from './CouponFreeShippingSpecificIte
33
33
  import { CouponFreeShippingWithItemsPurchase } from './CouponFreeShippingWithItemsPurchase';
34
34
  import { CouponFreeShippingWithSubtotal } from './CouponFreeShippingWithSubtotal';
35
35
  import { CouponMultipleAmountsOffItems } from './CouponMultipleAmountsOffItems';
36
+ import { CouponNoDiscount } from './CouponNoDiscount';
36
37
  import { CouponPercentOffItemWithItemsQuantityPurchase } from './CouponPercentOffItemWithItemsQuantityPurchase';
37
38
  import { CouponPercentOffItems } from './CouponPercentOffItems';
38
39
  import { CouponPercentOffItemsAndFreeShipping } from './CouponPercentOffItemsAndFreeShipping';
@@ -269,10 +270,10 @@ export interface Coupon {
269
270
  multiple_amounts_off_items?: CouponMultipleAmountsOffItems;
270
271
  /**
271
272
  *
272
- * @type {object}
273
+ * @type {CouponNoDiscount}
273
274
  * @memberof Coupon
274
275
  */
275
- no_discount?: object;
276
+ no_discount?: CouponNoDiscount;
276
277
  /**
277
278
  *
278
279
  * @type {CouponPercentOffItemWithItemsQuantityPurchase}
@@ -39,6 +39,7 @@ var CouponFreeShippingSpecificItems_1 = require("./CouponFreeShippingSpecificIte
39
39
  var CouponFreeShippingWithItemsPurchase_1 = require("./CouponFreeShippingWithItemsPurchase");
40
40
  var CouponFreeShippingWithSubtotal_1 = require("./CouponFreeShippingWithSubtotal");
41
41
  var CouponMultipleAmountsOffItems_1 = require("./CouponMultipleAmountsOffItems");
42
+ var CouponNoDiscount_1 = require("./CouponNoDiscount");
42
43
  var CouponPercentOffItemWithItemsQuantityPurchase_1 = require("./CouponPercentOffItemWithItemsQuantityPurchase");
43
44
  var CouponPercentOffItems_1 = require("./CouponPercentOffItems");
44
45
  var CouponPercentOffItemsAndFreeShipping_1 = require("./CouponPercentOffItemsAndFreeShipping");
@@ -101,7 +102,7 @@ function CouponFromJSONTyped(json, ignoreDiscriminator) {
101
102
  'merchant_code': !(0, runtime_1.exists)(json, 'merchant_code') ? undefined : json['merchant_code'],
102
103
  'merchant_notes': !(0, runtime_1.exists)(json, 'merchant_notes') ? undefined : json['merchant_notes'],
103
104
  'multiple_amounts_off_items': !(0, runtime_1.exists)(json, 'multiple_amounts_off_items') ? undefined : (0, CouponMultipleAmountsOffItems_1.CouponMultipleAmountsOffItemsFromJSON)(json['multiple_amounts_off_items']),
104
- 'no_discount': !(0, runtime_1.exists)(json, 'no_discount') ? undefined : json['no_discount'],
105
+ 'no_discount': !(0, runtime_1.exists)(json, 'no_discount') ? undefined : (0, CouponNoDiscount_1.CouponNoDiscountFromJSON)(json['no_discount']),
105
106
  'percent_off_item_with_items_quantity_purchase': !(0, runtime_1.exists)(json, 'percent_off_item_with_items_quantity_purchase') ? undefined : (0, CouponPercentOffItemWithItemsQuantityPurchase_1.CouponPercentOffItemWithItemsQuantityPurchaseFromJSON)(json['percent_off_item_with_items_quantity_purchase']),
106
107
  'percent_off_items': !(0, runtime_1.exists)(json, 'percent_off_items') ? undefined : (0, CouponPercentOffItems_1.CouponPercentOffItemsFromJSON)(json['percent_off_items']),
107
108
  'percent_off_items_and_free_shipping': !(0, runtime_1.exists)(json, 'percent_off_items_and_free_shipping') ? undefined : (0, CouponPercentOffItemsAndFreeShipping_1.CouponPercentOffItemsAndFreeShippingFromJSON)(json['percent_off_items_and_free_shipping']),
@@ -172,7 +173,7 @@ function CouponToJSON(value) {
172
173
  'merchant_code': value.merchant_code,
173
174
  'merchant_notes': value.merchant_notes,
174
175
  'multiple_amounts_off_items': (0, CouponMultipleAmountsOffItems_1.CouponMultipleAmountsOffItemsToJSON)(value.multiple_amounts_off_items),
175
- 'no_discount': value.no_discount,
176
+ 'no_discount': (0, CouponNoDiscount_1.CouponNoDiscountToJSON)(value.no_discount),
176
177
  'percent_off_item_with_items_quantity_purchase': (0, CouponPercentOffItemWithItemsQuantityPurchase_1.CouponPercentOffItemWithItemsQuantityPurchaseToJSON)(value.percent_off_item_with_items_quantity_purchase),
177
178
  'percent_off_items': (0, CouponPercentOffItems_1.CouponPercentOffItemsToJSON)(value.percent_off_items),
178
179
  'percent_off_items_and_free_shipping': (0, CouponPercentOffItemsAndFreeShipping_1.CouponPercentOffItemsAndFreeShippingToJSON)(value.percent_off_items_and_free_shipping),
@@ -0,0 +1,27 @@
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 CouponNoDiscount
16
+ */
17
+ export interface CouponNoDiscount {
18
+ /**
19
+ * This property does nothing but is included in this object to ensure the object is generated by our sdk builders.
20
+ * @type {boolean}
21
+ * @memberof CouponNoDiscount
22
+ */
23
+ ignore_this_property?: boolean;
24
+ }
25
+ export declare function CouponNoDiscountFromJSON(json: any): CouponNoDiscount;
26
+ export declare function CouponNoDiscountFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponNoDiscount;
27
+ export declare function CouponNoDiscountToJSON(value?: CouponNoDiscount | null): any;