ultracart_rest_api_v2_typescript 4.0.35-RC → 4.0.38-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 (32) hide show
  1. package/.openapi-generator/FILES +3 -0
  2. package/README.md +5 -2
  3. package/dist/apis/ConversationApi.d.ts +32 -5
  4. package/dist/apis/ConversationApi.js +58 -1
  5. package/dist/models/AutoOrderItem.d.ts +12 -0
  6. package/dist/models/AutoOrderItem.js +4 -0
  7. package/dist/models/ConversationAgentAuth.d.ts +57 -0
  8. package/dist/models/ConversationAgentAuth.js +52 -0
  9. package/dist/models/ConversationAgentAuthResponse.d.ts +22 -6
  10. package/dist/models/ConversationAgentAuthResponse.js +14 -6
  11. package/dist/models/ConversationMessage.d.ts +7 -0
  12. package/dist/models/ConversationMessage.js +3 -0
  13. package/dist/models/ConversationMessageTransportStatus.d.ts +33 -0
  14. package/dist/models/ConversationMessageTransportStatus.js +44 -0
  15. package/dist/models/ConversationResponse.d.ts +55 -0
  16. package/dist/models/ConversationResponse.js +54 -0
  17. package/dist/models/ConversationStartResponse.d.ts +3 -8
  18. package/dist/models/ConversationStartResponse.js +3 -4
  19. package/dist/models/EmailCommseqPostcard.d.ts +1 -1
  20. package/dist/models/index.d.ts +3 -0
  21. package/dist/models/index.js +3 -0
  22. package/package.json +1 -1
  23. package/src/apis/ConversationApi.ts +68 -8
  24. package/src/models/AutoOrderItem.ts +16 -0
  25. package/src/models/ConversationAgentAuth.ts +96 -0
  26. package/src/models/ConversationAgentAuthResponse.ts +53 -12
  27. package/src/models/ConversationMessage.ts +15 -0
  28. package/src/models/ConversationMessageTransportStatus.ts +64 -0
  29. package/src/models/ConversationResponse.ts +113 -0
  30. package/src/models/ConversationStartResponse.ts +11 -12
  31. package/src/models/EmailCommseqPostcard.ts +1 -1
  32. package/src/models/index.ts +3 -0
@@ -140,9 +140,12 @@ src/models/CheckoutSetupBrowserKeyResponse.ts
140
140
  src/models/CheckoutStateProvinceResponse.ts
141
141
  src/models/CityStateZip.ts
142
142
  src/models/Conversation.ts
143
+ src/models/ConversationAgentAuth.ts
143
144
  src/models/ConversationAgentAuthResponse.ts
144
145
  src/models/ConversationMessage.ts
146
+ src/models/ConversationMessageTransportStatus.ts
145
147
  src/models/ConversationParticipant.ts
148
+ src/models/ConversationResponse.ts
146
149
  src/models/ConversationStartRequest.ts
147
150
  src/models/ConversationStartResponse.ts
148
151
  src/models/ConversationSummary.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## ultracart_rest_api_v2_typescript@4.0.35-RC
1
+ ## ultracart_rest_api_v2_typescript@4.0.38-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.35-RC --save
39
+ npm install ultracart_rest_api_v2_typescript@4.0.38-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.38-RC | 07/21/2022 | conversation bugfix for poor response objects |
58
+ | 4.0.37-RC | 07/20/2022 | conversation participant name added |
59
+ | 4.0.36-RC | 07/18/2022 | twilio dev |
57
60
  | 4.0.35-RC | 07/14/2022 | Add channel storefront_oid to the customer activity record |
58
61
  | 4.0.34-RC | 07/11/2022 | Customer API - mergeCustomer method |
59
62
  | 4.0.33-RC | 07/05/2022 | docs update |
@@ -10,10 +10,13 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { Conversation, ConversationAgentAuthResponse, ConversationStartRequest, ConversationStartResponse, ConversationsResponse } from '../models';
13
+ import { ConversationAgentAuthResponse, ConversationResponse, ConversationStartRequest, ConversationStartResponse, ConversationsResponse } from '../models';
14
14
  export interface GetConversationRequest {
15
15
  conversationUuid: string;
16
16
  }
17
+ export interface GetConversationMultimediaUploadUrlRequest {
18
+ extension: string;
19
+ }
17
20
  export interface GetConversationsRequest {
18
21
  limit?: number;
19
22
  offset?: number;
@@ -55,12 +58,26 @@ export interface ConversationApiInterface {
55
58
  * @throws {RequiredError}
56
59
  * @memberof ConversationApiInterface
57
60
  */
58
- getConversationRaw(requestParameters: GetConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Conversation>>;
61
+ getConversationRaw(requestParameters: GetConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationResponse>>;
59
62
  /**
60
63
  * Retrieve a conversation including the participants and messages
61
64
  * Retrieve a conversation
62
65
  */
63
- getConversation(requestParameters: GetConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Conversation>;
66
+ getConversation(requestParameters: GetConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationResponse>;
67
+ /**
68
+ * Get a presigned conersation multimedia upload URL
69
+ * @summary Get a presigned conersation multimedia upload URL
70
+ * @param {string} extension
71
+ * @param {*} [options] Override http request option.
72
+ * @throws {RequiredError}
73
+ * @memberof ConversationApiInterface
74
+ */
75
+ getConversationMultimediaUploadUrlRaw(requestParameters: GetConversationMultimediaUploadUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
76
+ /**
77
+ * Get a presigned conersation multimedia upload URL
78
+ * Get a presigned conersation multimedia upload URL
79
+ */
80
+ getConversationMultimediaUploadUrl(requestParameters: GetConversationMultimediaUploadUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
64
81
  /**
65
82
  * Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
66
83
  * @summary Retrieve a list of conversation summaries newest to oldest
@@ -137,12 +154,22 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
137
154
  * Retrieve a conversation including the participants and messages
138
155
  * Retrieve a conversation
139
156
  */
140
- getConversationRaw(requestParameters: GetConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Conversation>>;
157
+ getConversationRaw(requestParameters: GetConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationResponse>>;
141
158
  /**
142
159
  * Retrieve a conversation including the participants and messages
143
160
  * Retrieve a conversation
144
161
  */
145
- getConversation(requestParameters: GetConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Conversation>;
162
+ getConversation(requestParameters: GetConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationResponse>;
163
+ /**
164
+ * Get a presigned conersation multimedia upload URL
165
+ * Get a presigned conersation multimedia upload URL
166
+ */
167
+ getConversationMultimediaUploadUrlRaw(requestParameters: GetConversationMultimediaUploadUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
168
+ /**
169
+ * Get a presigned conersation multimedia upload URL
170
+ * Get a presigned conersation multimedia upload URL
171
+ */
172
+ getConversationMultimediaUploadUrl(requestParameters: GetConversationMultimediaUploadUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
146
173
  /**
147
174
  * Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
148
175
  * Retrieve a list of conversation summaries newest to oldest
@@ -167,7 +167,7 @@ var ConversationApi = /** @class */ (function (_super) {
167
167
  }, initOverrides)];
168
168
  case 3:
169
169
  response = _c.sent();
170
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationFromJSON)(jsonValue); })];
170
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ConversationResponseFromJSON)(jsonValue); })];
171
171
  }
172
172
  });
173
173
  });
@@ -190,6 +190,63 @@ var ConversationApi = /** @class */ (function (_super) {
190
190
  });
191
191
  });
192
192
  };
193
+ /**
194
+ * Get a presigned conersation multimedia upload URL
195
+ * Get a presigned conersation multimedia upload URL
196
+ */
197
+ ConversationApi.prototype.getConversationMultimediaUploadUrlRaw = function (requestParameters, initOverrides) {
198
+ return __awaiter(this, void 0, void 0, function () {
199
+ var queryParameters, headerParameters, _a, _b, response;
200
+ return __generator(this, function (_c) {
201
+ switch (_c.label) {
202
+ case 0:
203
+ if (requestParameters.extension === null || requestParameters.extension === undefined) {
204
+ throw new runtime.RequiredError('extension', 'Required parameter requestParameters.extension was null or undefined when calling getConversationMultimediaUploadUrl.');
205
+ }
206
+ queryParameters = {};
207
+ headerParameters = {};
208
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
209
+ // oauth required
210
+ _a = headerParameters;
211
+ _b = "Authorization";
212
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_write"])];
213
+ case 1:
214
+ // oauth required
215
+ _a[_b] = _c.sent();
216
+ _c.label = 2;
217
+ case 2:
218
+ if (this.configuration && this.configuration.apiKey) {
219
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
220
+ }
221
+ return [4 /*yield*/, this.request({
222
+ path: "/conversation/upload_url/{extension}".replace("{".concat("extension", "}"), encodeURIComponent(String(requestParameters.extension))),
223
+ method: 'GET',
224
+ headers: headerParameters,
225
+ query: queryParameters,
226
+ }, initOverrides)];
227
+ case 3:
228
+ response = _c.sent();
229
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
230
+ }
231
+ });
232
+ });
233
+ };
234
+ /**
235
+ * Get a presigned conersation multimedia upload URL
236
+ * Get a presigned conersation multimedia upload URL
237
+ */
238
+ ConversationApi.prototype.getConversationMultimediaUploadUrl = function (requestParameters, initOverrides) {
239
+ return __awaiter(this, void 0, void 0, function () {
240
+ return __generator(this, function (_a) {
241
+ switch (_a.label) {
242
+ case 0: return [4 /*yield*/, this.getConversationMultimediaUploadUrlRaw(requestParameters, initOverrides)];
243
+ case 1:
244
+ _a.sent();
245
+ return [2 /*return*/];
246
+ }
247
+ });
248
+ });
249
+ };
193
250
  /**
194
251
  * Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
195
252
  * Retrieve a list of conversation summaries newest to oldest
@@ -60,6 +60,12 @@ export interface AutoOrderItem {
60
60
  * @memberof AutoOrderItem
61
61
  */
62
62
  auto_order_item_oid?: number;
63
+ /**
64
+ * Date/time of the first order of this item. Null if item added to auto order and has not been rebilled yet.
65
+ * @type {string}
66
+ * @memberof AutoOrderItem
67
+ */
68
+ first_order_dts?: string;
63
69
  /**
64
70
  * Frequency of the rebill if not a fixed schedule
65
71
  * @type {string}
@@ -126,6 +132,12 @@ export interface AutoOrderItem {
126
132
  * @memberof AutoOrderItem
127
133
  */
128
134
  original_quantity?: number;
135
+ /**
136
+ * True if paused. This field is an object instead of a primitive for backwards compatibility.
137
+ * @type {boolean}
138
+ * @memberof AutoOrderItem
139
+ */
140
+ paused?: boolean;
129
141
  /**
130
142
  * The PayPal Payer ID tied to this item
131
143
  * @type {string}
@@ -52,6 +52,7 @@ function AutoOrderItemFromJSONTyped(json, ignoreDiscriminator) {
52
52
  'arbitrary_unit_cost': !(0, runtime_1.exists)(json, 'arbitrary_unit_cost') ? undefined : json['arbitrary_unit_cost'],
53
53
  'arbitrary_unit_cost_remaining_orders': !(0, runtime_1.exists)(json, 'arbitrary_unit_cost_remaining_orders') ? undefined : json['arbitrary_unit_cost_remaining_orders'],
54
54
  'auto_order_item_oid': !(0, runtime_1.exists)(json, 'auto_order_item_oid') ? undefined : json['auto_order_item_oid'],
55
+ 'first_order_dts': !(0, runtime_1.exists)(json, 'first_order_dts') ? undefined : json['first_order_dts'],
55
56
  'frequency': !(0, runtime_1.exists)(json, 'frequency') ? undefined : json['frequency'],
56
57
  'future_schedules': !(0, runtime_1.exists)(json, 'future_schedules') ? undefined : (json['future_schedules'].map(AutoOrderItemFutureSchedule_1.AutoOrderItemFutureScheduleFromJSON)),
57
58
  'last_order_dts': !(0, runtime_1.exists)(json, 'last_order_dts') ? undefined : json['last_order_dts'],
@@ -63,6 +64,7 @@ function AutoOrderItemFromJSONTyped(json, ignoreDiscriminator) {
63
64
  'options': !(0, runtime_1.exists)(json, 'options') ? undefined : (json['options'].map(AutoOrderItemOption_1.AutoOrderItemOptionFromJSON)),
64
65
  'original_item_id': !(0, runtime_1.exists)(json, 'original_item_id') ? undefined : json['original_item_id'],
65
66
  'original_quantity': !(0, runtime_1.exists)(json, 'original_quantity') ? undefined : json['original_quantity'],
67
+ 'paused': !(0, runtime_1.exists)(json, 'paused') ? undefined : json['paused'],
66
68
  'paypal_payer_id': !(0, runtime_1.exists)(json, 'paypal_payer_id') ? undefined : json['paypal_payer_id'],
67
69
  'paypal_recurring_payment_profile_id': !(0, runtime_1.exists)(json, 'paypal_recurring_payment_profile_id') ? undefined : json['paypal_recurring_payment_profile_id'],
68
70
  'preshipment_notice_sent': !(0, runtime_1.exists)(json, 'preshipment_notice_sent') ? undefined : json['preshipment_notice_sent'],
@@ -87,6 +89,7 @@ function AutoOrderItemToJSON(value) {
87
89
  'arbitrary_unit_cost': value.arbitrary_unit_cost,
88
90
  'arbitrary_unit_cost_remaining_orders': value.arbitrary_unit_cost_remaining_orders,
89
91
  'auto_order_item_oid': value.auto_order_item_oid,
92
+ 'first_order_dts': value.first_order_dts,
90
93
  'frequency': value.frequency,
91
94
  'future_schedules': value.future_schedules === undefined ? undefined : (value.future_schedules.map(AutoOrderItemFutureSchedule_1.AutoOrderItemFutureScheduleToJSON)),
92
95
  'last_order_dts': value.last_order_dts,
@@ -98,6 +101,7 @@ function AutoOrderItemToJSON(value) {
98
101
  'options': value.options === undefined ? undefined : (value.options.map(AutoOrderItemOption_1.AutoOrderItemOptionToJSON)),
99
102
  'original_item_id': value.original_item_id,
100
103
  'original_quantity': value.original_quantity,
104
+ 'paused': value.paused,
101
105
  'paypal_payer_id': value.paypal_payer_id,
102
106
  'paypal_recurring_payment_profile_id': value.paypal_recurring_payment_profile_id,
103
107
  'preshipment_notice_sent': value.preshipment_notice_sent,
@@ -0,0 +1,57 @@
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 ConversationAgentAuth
16
+ */
17
+ export interface ConversationAgentAuth {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ConversationAgentAuth
22
+ */
23
+ conversation_participant_arn?: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof ConversationAgentAuth
28
+ */
29
+ conversation_participant_name?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof ConversationAgentAuth
34
+ */
35
+ jwt?: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof ConversationAgentAuth
40
+ */
41
+ merchant_id?: string;
42
+ /**
43
+ *
44
+ * @type {Array<string>}
45
+ * @memberof ConversationAgentAuth
46
+ */
47
+ twilio_phone_numbers?: Array<string>;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof ConversationAgentAuth
52
+ */
53
+ websocket_url?: string;
54
+ }
55
+ export declare function ConversationAgentAuthFromJSON(json: any): ConversationAgentAuth;
56
+ export declare function ConversationAgentAuthFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationAgentAuth;
57
+ export declare function ConversationAgentAuthToJSON(value?: ConversationAgentAuth | null): any;
@@ -0,0 +1,52 @@
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.ConversationAgentAuthToJSON = exports.ConversationAgentAuthFromJSONTyped = exports.ConversationAgentAuthFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ function ConversationAgentAuthFromJSON(json) {
19
+ return ConversationAgentAuthFromJSONTyped(json, false);
20
+ }
21
+ exports.ConversationAgentAuthFromJSON = ConversationAgentAuthFromJSON;
22
+ function ConversationAgentAuthFromJSONTyped(json, ignoreDiscriminator) {
23
+ if ((json === undefined) || (json === null)) {
24
+ return json;
25
+ }
26
+ return {
27
+ 'conversation_participant_arn': !(0, runtime_1.exists)(json, 'conversation_participant_arn') ? undefined : json['conversation_participant_arn'],
28
+ 'conversation_participant_name': !(0, runtime_1.exists)(json, 'conversation_participant_name') ? undefined : json['conversation_participant_name'],
29
+ 'jwt': !(0, runtime_1.exists)(json, 'jwt') ? undefined : json['jwt'],
30
+ 'merchant_id': !(0, runtime_1.exists)(json, 'merchant_id') ? undefined : json['merchant_id'],
31
+ 'twilio_phone_numbers': !(0, runtime_1.exists)(json, 'twilio_phone_numbers') ? undefined : json['twilio_phone_numbers'],
32
+ 'websocket_url': !(0, runtime_1.exists)(json, 'websocket_url') ? undefined : json['websocket_url'],
33
+ };
34
+ }
35
+ exports.ConversationAgentAuthFromJSONTyped = ConversationAgentAuthFromJSONTyped;
36
+ function ConversationAgentAuthToJSON(value) {
37
+ if (value === undefined) {
38
+ return undefined;
39
+ }
40
+ if (value === null) {
41
+ return null;
42
+ }
43
+ return {
44
+ 'conversation_participant_arn': value.conversation_participant_arn,
45
+ 'conversation_participant_name': value.conversation_participant_name,
46
+ 'jwt': value.jwt,
47
+ 'merchant_id': value.merchant_id,
48
+ 'twilio_phone_numbers': value.twilio_phone_numbers,
49
+ 'websocket_url': value.websocket_url,
50
+ };
51
+ }
52
+ exports.ConversationAgentAuthToJSON = ConversationAgentAuthToJSON;
@@ -9,6 +9,10 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { ConversationAgentAuth } from './ConversationAgentAuth';
13
+ import { ModelError } from './ModelError';
14
+ import { ResponseMetadata } from './ResponseMetadata';
15
+ import { Warning } from './Warning';
12
16
  /**
13
17
  *
14
18
  * @export
@@ -17,22 +21,34 @@
17
21
  export interface ConversationAgentAuthResponse {
18
22
  /**
19
23
  *
20
- * @type {string}
24
+ * @type {ConversationAgentAuth}
21
25
  * @memberof ConversationAgentAuthResponse
22
26
  */
23
- conversation_participant_arn?: string;
27
+ agent_auth?: ConversationAgentAuth;
24
28
  /**
25
29
  *
26
- * @type {string}
30
+ * @type {ModelError}
27
31
  * @memberof ConversationAgentAuthResponse
28
32
  */
29
- jwt?: string;
33
+ error?: ModelError;
30
34
  /**
31
35
  *
32
- * @type {string}
36
+ * @type {ResponseMetadata}
33
37
  * @memberof ConversationAgentAuthResponse
34
38
  */
35
- websocket_url?: string;
39
+ metadata?: ResponseMetadata;
40
+ /**
41
+ * Indicates if API call was successful
42
+ * @type {boolean}
43
+ * @memberof ConversationAgentAuthResponse
44
+ */
45
+ success?: boolean;
46
+ /**
47
+ *
48
+ * @type {Warning}
49
+ * @memberof ConversationAgentAuthResponse
50
+ */
51
+ warning?: Warning;
36
52
  }
37
53
  export declare function ConversationAgentAuthResponseFromJSON(json: any): ConversationAgentAuthResponse;
38
54
  export declare function ConversationAgentAuthResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationAgentAuthResponse;
@@ -15,6 +15,10 @@
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.ConversationAgentAuthResponseToJSON = exports.ConversationAgentAuthResponseFromJSONTyped = exports.ConversationAgentAuthResponseFromJSON = void 0;
17
17
  var runtime_1 = require("../runtime");
18
+ var ConversationAgentAuth_1 = require("./ConversationAgentAuth");
19
+ var ModelError_1 = require("./ModelError");
20
+ var ResponseMetadata_1 = require("./ResponseMetadata");
21
+ var Warning_1 = require("./Warning");
18
22
  function ConversationAgentAuthResponseFromJSON(json) {
19
23
  return ConversationAgentAuthResponseFromJSONTyped(json, false);
20
24
  }
@@ -24,9 +28,11 @@ function ConversationAgentAuthResponseFromJSONTyped(json, ignoreDiscriminator) {
24
28
  return json;
25
29
  }
26
30
  return {
27
- 'conversation_participant_arn': !(0, runtime_1.exists)(json, 'conversation_participant_arn') ? undefined : json['conversation_participant_arn'],
28
- 'jwt': !(0, runtime_1.exists)(json, 'jwt') ? undefined : json['jwt'],
29
- 'websocket_url': !(0, runtime_1.exists)(json, 'websocket_url') ? undefined : json['websocket_url'],
31
+ 'agent_auth': !(0, runtime_1.exists)(json, 'agent_auth') ? undefined : (0, ConversationAgentAuth_1.ConversationAgentAuthFromJSON)(json['agent_auth']),
32
+ 'error': !(0, runtime_1.exists)(json, 'error') ? undefined : (0, ModelError_1.ModelErrorFromJSON)(json['error']),
33
+ 'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : (0, ResponseMetadata_1.ResponseMetadataFromJSON)(json['metadata']),
34
+ 'success': !(0, runtime_1.exists)(json, 'success') ? undefined : json['success'],
35
+ 'warning': !(0, runtime_1.exists)(json, 'warning') ? undefined : (0, Warning_1.WarningFromJSON)(json['warning']),
30
36
  };
31
37
  }
32
38
  exports.ConversationAgentAuthResponseFromJSONTyped = ConversationAgentAuthResponseFromJSONTyped;
@@ -38,9 +44,11 @@ function ConversationAgentAuthResponseToJSON(value) {
38
44
  return null;
39
45
  }
40
46
  return {
41
- 'conversation_participant_arn': value.conversation_participant_arn,
42
- 'jwt': value.jwt,
43
- 'websocket_url': value.websocket_url,
47
+ 'agent_auth': (0, ConversationAgentAuth_1.ConversationAgentAuthToJSON)(value.agent_auth),
48
+ 'error': (0, ModelError_1.ModelErrorToJSON)(value.error),
49
+ 'metadata': (0, ResponseMetadata_1.ResponseMetadataToJSON)(value.metadata),
50
+ 'success': value.success,
51
+ 'warning': (0, Warning_1.WarningToJSON)(value.warning),
44
52
  };
45
53
  }
46
54
  exports.ConversationAgentAuthResponseToJSON = ConversationAgentAuthResponseToJSON;
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { ConversationMessageTransportStatus } from './ConversationMessageTransportStatus';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -45,6 +46,12 @@ export interface ConversationMessage {
45
46
  * @memberof ConversationMessage
46
47
  */
47
48
  message_dts?: string;
49
+ /**
50
+ *
51
+ * @type {Array<ConversationMessageTransportStatus>}
52
+ * @memberof ConversationMessage
53
+ */
54
+ transport_statuses?: Array<ConversationMessageTransportStatus>;
48
55
  }
49
56
  export declare function ConversationMessageFromJSON(json: any): ConversationMessage;
50
57
  export declare function ConversationMessageFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationMessage;
@@ -15,6 +15,7 @@
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.ConversationMessageToJSON = exports.ConversationMessageFromJSONTyped = exports.ConversationMessageFromJSON = void 0;
17
17
  var runtime_1 = require("../runtime");
18
+ var ConversationMessageTransportStatus_1 = require("./ConversationMessageTransportStatus");
18
19
  function ConversationMessageFromJSON(json) {
19
20
  return ConversationMessageFromJSONTyped(json, false);
20
21
  }
@@ -29,6 +30,7 @@ function ConversationMessageFromJSONTyped(json, ignoreDiscriminator) {
29
30
  'body': !(0, runtime_1.exists)(json, 'body') ? undefined : json['body'],
30
31
  'media_urls': !(0, runtime_1.exists)(json, 'media_urls') ? undefined : json['media_urls'],
31
32
  'message_dts': !(0, runtime_1.exists)(json, 'message_dts') ? undefined : json['message_dts'],
33
+ 'transport_statuses': !(0, runtime_1.exists)(json, 'transport_statuses') ? undefined : (json['transport_statuses'].map(ConversationMessageTransportStatus_1.ConversationMessageTransportStatusFromJSON)),
32
34
  };
33
35
  }
34
36
  exports.ConversationMessageFromJSONTyped = ConversationMessageFromJSONTyped;
@@ -45,6 +47,7 @@ function ConversationMessageToJSON(value) {
45
47
  'body': value.body,
46
48
  'media_urls': value.media_urls,
47
49
  'message_dts': value.message_dts,
50
+ 'transport_statuses': value.transport_statuses === undefined ? undefined : (value.transport_statuses.map(ConversationMessageTransportStatus_1.ConversationMessageTransportStatusToJSON)),
48
51
  };
49
52
  }
50
53
  exports.ConversationMessageToJSON = ConversationMessageToJSON;
@@ -0,0 +1,33 @@
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 ConversationMessageTransportStatus
16
+ */
17
+ export interface ConversationMessageTransportStatus {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ConversationMessageTransportStatus
22
+ */
23
+ conversation_participant_arn?: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof ConversationMessageTransportStatus
28
+ */
29
+ status?: string;
30
+ }
31
+ export declare function ConversationMessageTransportStatusFromJSON(json: any): ConversationMessageTransportStatus;
32
+ export declare function ConversationMessageTransportStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationMessageTransportStatus;
33
+ export declare function ConversationMessageTransportStatusToJSON(value?: ConversationMessageTransportStatus | null): any;
@@ -0,0 +1,44 @@
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.ConversationMessageTransportStatusToJSON = exports.ConversationMessageTransportStatusFromJSONTyped = exports.ConversationMessageTransportStatusFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ function ConversationMessageTransportStatusFromJSON(json) {
19
+ return ConversationMessageTransportStatusFromJSONTyped(json, false);
20
+ }
21
+ exports.ConversationMessageTransportStatusFromJSON = ConversationMessageTransportStatusFromJSON;
22
+ function ConversationMessageTransportStatusFromJSONTyped(json, ignoreDiscriminator) {
23
+ if ((json === undefined) || (json === null)) {
24
+ return json;
25
+ }
26
+ return {
27
+ 'conversation_participant_arn': !(0, runtime_1.exists)(json, 'conversation_participant_arn') ? undefined : json['conversation_participant_arn'],
28
+ 'status': !(0, runtime_1.exists)(json, 'status') ? undefined : json['status'],
29
+ };
30
+ }
31
+ exports.ConversationMessageTransportStatusFromJSONTyped = ConversationMessageTransportStatusFromJSONTyped;
32
+ function ConversationMessageTransportStatusToJSON(value) {
33
+ if (value === undefined) {
34
+ return undefined;
35
+ }
36
+ if (value === null) {
37
+ return null;
38
+ }
39
+ return {
40
+ 'conversation_participant_arn': value.conversation_participant_arn,
41
+ 'status': value.status,
42
+ };
43
+ }
44
+ exports.ConversationMessageTransportStatusToJSON = ConversationMessageTransportStatusToJSON;
@@ -0,0 +1,55 @@
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
+ import { Conversation } from './Conversation';
13
+ import { ModelError } from './ModelError';
14
+ import { ResponseMetadata } from './ResponseMetadata';
15
+ import { Warning } from './Warning';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ConversationResponse
20
+ */
21
+ export interface ConversationResponse {
22
+ /**
23
+ *
24
+ * @type {Conversation}
25
+ * @memberof ConversationResponse
26
+ */
27
+ conversation?: Conversation;
28
+ /**
29
+ *
30
+ * @type {ModelError}
31
+ * @memberof ConversationResponse
32
+ */
33
+ error?: ModelError;
34
+ /**
35
+ *
36
+ * @type {ResponseMetadata}
37
+ * @memberof ConversationResponse
38
+ */
39
+ metadata?: ResponseMetadata;
40
+ /**
41
+ * Indicates if API call was successful
42
+ * @type {boolean}
43
+ * @memberof ConversationResponse
44
+ */
45
+ success?: boolean;
46
+ /**
47
+ *
48
+ * @type {Warning}
49
+ * @memberof ConversationResponse
50
+ */
51
+ warning?: Warning;
52
+ }
53
+ export declare function ConversationResponseFromJSON(json: any): ConversationResponse;
54
+ export declare function ConversationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationResponse;
55
+ export declare function ConversationResponseToJSON(value?: ConversationResponse | null): any;