ultracart_rest_api_v2_typescript 4.0.137 → 4.0.139

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.
@@ -192,6 +192,7 @@ src/models/ConversationPermissionsResponse.ts
192
192
  src/models/ConversationResponse.ts
193
193
  src/models/ConversationSearchRequest.ts
194
194
  src/models/ConversationSearchResponse.ts
195
+ src/models/ConversationSentiment.ts
195
196
  src/models/ConversationStartRequest.ts
196
197
  src/models/ConversationStartResponse.ts
197
198
  src/models/ConversationSummary.ts
@@ -582,6 +583,8 @@ src/models/OrderCoupon.ts
582
583
  src/models/OrderDigitalItem.ts
583
584
  src/models/OrderDigitalOrder.ts
584
585
  src/models/OrderEdi.ts
586
+ src/models/OrderEdiDocument.ts
587
+ src/models/OrderEdiDocumentsResponse.ts
585
588
  src/models/OrderFormat.ts
586
589
  src/models/OrderFormatResponse.ts
587
590
  src/models/OrderFraudScore.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## ultracart_rest_api_v2_typescript@4.0.137
1
+ ## ultracart_rest_api_v2_typescript@4.0.139
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.137 --save
39
+ npm install ultracart_rest_api_v2_typescript@4.0.139 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -54,6 +54,8 @@ Not every change is committed to every SDK.
54
54
 
55
55
  | Version | Date | Comments |
56
56
  | --: | :-: | --- |
57
+ | 4.0.139 | 03/14/2023 | order.getOrderEdiDocuments |
58
+ | 4.0.138 | 03/01/2023 | convo - add sentiment record to conversation obj |
57
59
  | 4.0.137 | 02/22/2023 | convo - customer initiated flag on engagement |
58
60
  | 4.0.136 | 02/20/2023 | refund reasons |
59
61
  | 4.0.135 | 02/17/2023 | convo api - smsUnsubscribeConversation method |
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { AccountsReceivableRetryConfig, AccountsReceivableRetryConfigResponse, AccountsReceivableRetryStatsResponse, BaseResponse, Order, OrderByTokenQuery, OrderFormat, OrderFormatResponse, OrderInvoiceResponse, OrderPackingSlipResponse, OrderProcessPaymentRequest, OrderProcessPaymentResponse, OrderQuery, OrderQueryBatch, OrderRefundableResponse, OrderReplacement, OrderReplacementResponse, OrderResponse, OrderTokenResponse, OrdersResponse } from '../models';
13
+ import { AccountsReceivableRetryConfig, AccountsReceivableRetryConfigResponse, AccountsReceivableRetryStatsResponse, BaseResponse, Order, OrderByTokenQuery, OrderEdiDocumentsResponse, OrderFormat, OrderFormatResponse, OrderInvoiceResponse, OrderPackingSlipResponse, OrderProcessPaymentRequest, OrderProcessPaymentResponse, OrderQuery, OrderQueryBatch, OrderRefundableResponse, OrderReplacement, OrderReplacementResponse, OrderResponse, OrderTokenResponse, OrdersResponse } from '../models';
14
14
  export interface AdjustOrderTotalRequest {
15
15
  orderId: string;
16
16
  desiredTotal: string;
@@ -54,6 +54,9 @@ export interface GetOrderByTokenRequest {
54
54
  orderByTokenQuery: OrderByTokenQuery;
55
55
  expand?: string;
56
56
  }
57
+ export interface GetOrderEdiDocumentsRequest {
58
+ orderId: string;
59
+ }
57
60
  export interface GetOrdersRequest {
58
61
  orderId?: string;
59
62
  paymentMethod?: string;
@@ -333,6 +336,20 @@ export interface OrderApiInterface {
333
336
  * Retrieve an order using a token
334
337
  */
335
338
  getOrderByToken(requestParameters: GetOrderByTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
339
+ /**
340
+ * Retrieve EDI documents associated with this order.
341
+ * @summary Retrieve EDI documents associated with this order.
342
+ * @param {string} orderId The order id to retrieve EDI documents for.
343
+ * @param {*} [options] Override http request option.
344
+ * @throws {RequiredError}
345
+ * @memberof OrderApiInterface
346
+ */
347
+ getOrderEdiDocumentsRaw(requestParameters: GetOrderEdiDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderEdiDocumentsResponse>>;
348
+ /**
349
+ * Retrieve EDI documents associated with this order.
350
+ * Retrieve EDI documents associated with this order.
351
+ */
352
+ getOrderEdiDocuments(requestParameters: GetOrderEdiDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderEdiDocumentsResponse>;
336
353
  /**
337
354
  * Retrieves a group of orders from the account. If no parameters are specified, the API call will fail with a bad request error. Always specify some parameters to limit the scope of the orders returned to ones you are truly interested in. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
338
355
  * @summary Retrieve orders
@@ -684,6 +701,16 @@ export declare class OrderApi extends runtime.BaseAPI implements OrderApiInterfa
684
701
  * Retrieve an order using a token
685
702
  */
686
703
  getOrderByToken(requestParameters: GetOrderByTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
704
+ /**
705
+ * Retrieve EDI documents associated with this order.
706
+ * Retrieve EDI documents associated with this order.
707
+ */
708
+ getOrderEdiDocumentsRaw(requestParameters: GetOrderEdiDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderEdiDocumentsResponse>>;
709
+ /**
710
+ * Retrieve EDI documents associated with this order.
711
+ * Retrieve EDI documents associated with this order.
712
+ */
713
+ getOrderEdiDocuments(requestParameters: GetOrderEdiDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderEdiDocumentsResponse>;
687
714
  /**
688
715
  * Retrieves a group of orders from the account. If no parameters are specified, the API call will fail with a bad request error. Always specify some parameters to limit the scope of the orders returned to ones you are truly interested in. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
689
716
  * Retrieve orders
@@ -863,6 +863,65 @@ var OrderApi = /** @class */ (function (_super) {
863
863
  });
864
864
  });
865
865
  };
866
+ /**
867
+ * Retrieve EDI documents associated with this order.
868
+ * Retrieve EDI documents associated with this order.
869
+ */
870
+ OrderApi.prototype.getOrderEdiDocumentsRaw = function (requestParameters, initOverrides) {
871
+ return __awaiter(this, void 0, void 0, function () {
872
+ var queryParameters, headerParameters, _a, _b, response;
873
+ return __generator(this, function (_c) {
874
+ switch (_c.label) {
875
+ case 0:
876
+ if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
877
+ throw new runtime.RequiredError('orderId', 'Required parameter requestParameters.orderId was null or undefined when calling getOrderEdiDocuments.');
878
+ }
879
+ queryParameters = {};
880
+ headerParameters = {};
881
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
882
+ // oauth required
883
+ _a = headerParameters;
884
+ _b = "Authorization";
885
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["order_write"])];
886
+ case 1:
887
+ // oauth required
888
+ _a[_b] = _c.sent();
889
+ _c.label = 2;
890
+ case 2:
891
+ if (this.configuration && this.configuration.apiKey) {
892
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
893
+ }
894
+ return [4 /*yield*/, this.request({
895
+ path: "/order/orders/{order_id}/edi".replace("{".concat("order_id", "}"), encodeURIComponent(String(requestParameters.orderId))),
896
+ method: 'GET',
897
+ headers: headerParameters,
898
+ query: queryParameters,
899
+ }, initOverrides)];
900
+ case 3:
901
+ response = _c.sent();
902
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.OrderEdiDocumentsResponseFromJSON)(jsonValue); })];
903
+ }
904
+ });
905
+ });
906
+ };
907
+ /**
908
+ * Retrieve EDI documents associated with this order.
909
+ * Retrieve EDI documents associated with this order.
910
+ */
911
+ OrderApi.prototype.getOrderEdiDocuments = function (requestParameters, initOverrides) {
912
+ return __awaiter(this, void 0, void 0, function () {
913
+ var response;
914
+ return __generator(this, function (_a) {
915
+ switch (_a.label) {
916
+ case 0: return [4 /*yield*/, this.getOrderEdiDocumentsRaw(requestParameters, initOverrides)];
917
+ case 1:
918
+ response = _a.sent();
919
+ return [4 /*yield*/, response.value()];
920
+ case 2: return [2 /*return*/, _a.sent()];
921
+ }
922
+ });
923
+ });
924
+ };
866
925
  /**
867
926
  * Retrieves a group of orders from the account. If no parameters are specified, the API call will fail with a bad request error. Always specify some parameters to limit the scope of the orders returned to ones you are truly interested in. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
868
927
  * Retrieve orders
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import { ConversationMessage } from './ConversationMessage';
13
13
  import { ConversationParticipant } from './ConversationParticipant';
14
+ import { ConversationSentiment } from './ConversationSentiment';
14
15
  /**
15
16
  *
16
17
  * @export
@@ -107,6 +108,12 @@ export interface Conversation {
107
108
  * @memberof Conversation
108
109
  */
109
110
  participants?: Array<ConversationParticipant>;
111
+ /**
112
+ *
113
+ * @type {ConversationSentiment}
114
+ * @memberof Conversation
115
+ */
116
+ sentiment?: ConversationSentiment;
110
117
  /**
111
118
  * Start of the conversation date/time
112
119
  * @type {string}
@@ -17,6 +17,7 @@ exports.ConversationToJSON = exports.ConversationFromJSONTyped = exports.Convers
17
17
  var runtime_1 = require("../runtime");
18
18
  var ConversationMessage_1 = require("./ConversationMessage");
19
19
  var ConversationParticipant_1 = require("./ConversationParticipant");
20
+ var ConversationSentiment_1 = require("./ConversationSentiment");
20
21
  /**
21
22
  * @export
22
23
  */
@@ -48,6 +49,7 @@ function ConversationFromJSONTyped(json, ignoreDiscriminator) {
48
49
  'message_count': !(0, runtime_1.exists)(json, 'message_count') ? undefined : json['message_count'],
49
50
  'messages': !(0, runtime_1.exists)(json, 'messages') ? undefined : (json['messages'].map(ConversationMessage_1.ConversationMessageFromJSON)),
50
51
  'participants': !(0, runtime_1.exists)(json, 'participants') ? undefined : (json['participants'].map(ConversationParticipant_1.ConversationParticipantFromJSON)),
52
+ 'sentiment': !(0, runtime_1.exists)(json, 'sentiment') ? undefined : (0, ConversationSentiment_1.ConversationSentimentFromJSON)(json['sentiment']),
51
53
  'start_dts': !(0, runtime_1.exists)(json, 'start_dts') ? undefined : json['start_dts'],
52
54
  'unread_messages': !(0, runtime_1.exists)(json, 'unread_messages') ? undefined : json['unread_messages'],
53
55
  'visible': !(0, runtime_1.exists)(json, 'visible') ? undefined : json['visible'],
@@ -77,6 +79,7 @@ function ConversationToJSON(value) {
77
79
  'message_count': value.message_count,
78
80
  'messages': value.messages === undefined ? undefined : (value.messages.map(ConversationMessage_1.ConversationMessageToJSON)),
79
81
  'participants': value.participants === undefined ? undefined : (value.participants.map(ConversationParticipant_1.ConversationParticipantToJSON)),
82
+ 'sentiment': (0, ConversationSentiment_1.ConversationSentimentToJSON)(value.sentiment),
80
83
  'start_dts': value.start_dts,
81
84
  'unread_messages': value.unread_messages,
82
85
  'visible': value.visible,
@@ -0,0 +1,67 @@
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 ConversationSentiment
16
+ */
17
+ export interface ConversationSentiment {
18
+ /**
19
+ * The last time the detect sentiment was run on this conversation
20
+ * @type {string}
21
+ * @memberof ConversationSentiment
22
+ */
23
+ last_detect_sentiment?: string;
24
+ /**
25
+ * The mixed score
26
+ * @type {number}
27
+ * @memberof ConversationSentiment
28
+ */
29
+ mixed?: number;
30
+ /**
31
+ * The negative score
32
+ * @type {number}
33
+ * @memberof ConversationSentiment
34
+ */
35
+ negative?: number;
36
+ /**
37
+ * The neutral score
38
+ * @type {number}
39
+ * @memberof ConversationSentiment
40
+ */
41
+ neutral?: number;
42
+ /**
43
+ * The positive score
44
+ * @type {number}
45
+ * @memberof ConversationSentiment
46
+ */
47
+ positive?: number;
48
+ /**
49
+ * The overall sentiment
50
+ * @type {string}
51
+ * @memberof ConversationSentiment
52
+ */
53
+ sentiment?: ConversationSentimentSentimentEnum;
54
+ }
55
+ /**
56
+ * @export
57
+ */
58
+ export declare const ConversationSentimentSentimentEnum: {
59
+ readonly Positive: "POSITIVE";
60
+ readonly Neutral: "NEUTRAL";
61
+ readonly Negative: "NEGATIVE";
62
+ readonly Mixed: "MIXED";
63
+ };
64
+ export type ConversationSentimentSentimentEnum = typeof ConversationSentimentSentimentEnum[keyof typeof ConversationSentimentSentimentEnum];
65
+ export declare function ConversationSentimentFromJSON(json: any): ConversationSentiment;
66
+ export declare function ConversationSentimentFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationSentiment;
67
+ export declare function ConversationSentimentToJSON(value?: ConversationSentiment | null): any;
@@ -0,0 +1,61 @@
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.ConversationSentimentToJSON = exports.ConversationSentimentFromJSONTyped = exports.ConversationSentimentFromJSON = exports.ConversationSentimentSentimentEnum = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * @export
20
+ */
21
+ exports.ConversationSentimentSentimentEnum = {
22
+ Positive: 'POSITIVE',
23
+ Neutral: 'NEUTRAL',
24
+ Negative: 'NEGATIVE',
25
+ Mixed: 'MIXED'
26
+ };
27
+ function ConversationSentimentFromJSON(json) {
28
+ return ConversationSentimentFromJSONTyped(json, false);
29
+ }
30
+ exports.ConversationSentimentFromJSON = ConversationSentimentFromJSON;
31
+ function ConversationSentimentFromJSONTyped(json, ignoreDiscriminator) {
32
+ if ((json === undefined) || (json === null)) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'last_detect_sentiment': !(0, runtime_1.exists)(json, 'last_detect_sentiment') ? undefined : json['last_detect_sentiment'],
37
+ 'mixed': !(0, runtime_1.exists)(json, 'mixed') ? undefined : json['mixed'],
38
+ 'negative': !(0, runtime_1.exists)(json, 'negative') ? undefined : json['negative'],
39
+ 'neutral': !(0, runtime_1.exists)(json, 'neutral') ? undefined : json['neutral'],
40
+ 'positive': !(0, runtime_1.exists)(json, 'positive') ? undefined : json['positive'],
41
+ 'sentiment': !(0, runtime_1.exists)(json, 'sentiment') ? undefined : json['sentiment'],
42
+ };
43
+ }
44
+ exports.ConversationSentimentFromJSONTyped = ConversationSentimentFromJSONTyped;
45
+ function ConversationSentimentToJSON(value) {
46
+ if (value === undefined) {
47
+ return undefined;
48
+ }
49
+ if (value === null) {
50
+ return null;
51
+ }
52
+ return {
53
+ 'last_detect_sentiment': value.last_detect_sentiment,
54
+ 'mixed': value.mixed,
55
+ 'negative': value.negative,
56
+ 'neutral': value.neutral,
57
+ 'positive': value.positive,
58
+ 'sentiment': value.sentiment,
59
+ };
60
+ }
61
+ exports.ConversationSentimentToJSON = ConversationSentimentToJSON;
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { ConversationParticipant } from './ConversationParticipant';
13
+ import { ConversationSentiment } from './ConversationSentiment';
13
14
  /**
14
15
  *
15
16
  * @export
@@ -94,6 +95,12 @@ export interface ConversationSummary {
94
95
  * @memberof ConversationSummary
95
96
  */
96
97
  participants?: Array<ConversationParticipant>;
98
+ /**
99
+ *
100
+ * @type {ConversationSentiment}
101
+ * @memberof ConversationSummary
102
+ */
103
+ sentiment?: ConversationSentiment;
97
104
  /**
98
105
  * Start of the conversation date/time
99
106
  * @type {string}
@@ -16,6 +16,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
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
+ var ConversationSentiment_1 = require("./ConversationSentiment");
19
20
  /**
20
21
  * @export
21
22
  */
@@ -45,6 +46,7 @@ function ConversationSummaryFromJSONTyped(json, ignoreDiscriminator) {
45
46
  'merchant_id': !(0, runtime_1.exists)(json, 'merchant_id') ? undefined : json['merchant_id'],
46
47
  'message_count': !(0, runtime_1.exists)(json, 'message_count') ? undefined : json['message_count'],
47
48
  'participants': !(0, runtime_1.exists)(json, 'participants') ? undefined : (json['participants'].map(ConversationParticipant_1.ConversationParticipantFromJSON)),
49
+ 'sentiment': !(0, runtime_1.exists)(json, 'sentiment') ? undefined : (0, ConversationSentiment_1.ConversationSentimentFromJSON)(json['sentiment']),
48
50
  'start_dts': !(0, runtime_1.exists)(json, 'start_dts') ? undefined : json['start_dts'],
49
51
  'unread_messages': !(0, runtime_1.exists)(json, 'unread_messages') ? undefined : json['unread_messages'],
50
52
  'visible': !(0, runtime_1.exists)(json, 'visible') ? undefined : json['visible'],
@@ -72,6 +74,7 @@ function ConversationSummaryToJSON(value) {
72
74
  'merchant_id': value.merchant_id,
73
75
  'message_count': value.message_count,
74
76
  'participants': value.participants === undefined ? undefined : (value.participants.map(ConversationParticipant_1.ConversationParticipantToJSON)),
77
+ 'sentiment': (0, ConversationSentiment_1.ConversationSentimentToJSON)(value.sentiment),
75
78
  'start_dts': value.start_dts,
76
79
  'unread_messages': value.unread_messages,
77
80
  'visible': value.visible,
@@ -0,0 +1,113 @@
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 OrderEdiDocument
16
+ */
17
+ export interface OrderEdiDocument {
18
+ /**
19
+ * Direction the document flowed
20
+ * @type {string}
21
+ * @memberof OrderEdiDocument
22
+ */
23
+ direction?: OrderEdiDocumentDirectionEnum;
24
+ /**
25
+ * Date/time the document was created/received
26
+ * @type {string}
27
+ * @memberof OrderEdiDocument
28
+ */
29
+ doc_dts?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof OrderEdiDocument
34
+ */
35
+ document?: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof OrderEdiDocument
40
+ */
41
+ document_type_description?: string;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof OrderEdiDocument
46
+ */
47
+ document_type_number?: number;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof OrderEdiDocument
52
+ */
53
+ external_id?: string;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof OrderEdiDocument
58
+ */
59
+ functional_acknowledgement?: string;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof OrderEdiDocument
64
+ */
65
+ functional_acknowledgement_dts?: string;
66
+ /**
67
+ *
68
+ * @type {boolean}
69
+ * @memberof OrderEdiDocument
70
+ */
71
+ functional_acknowledgement_pending?: boolean;
72
+ /**
73
+ *
74
+ * @type {number}
75
+ * @memberof OrderEdiDocument
76
+ */
77
+ group_control_number?: number;
78
+ /**
79
+ *
80
+ * @type {string}
81
+ * @memberof OrderEdiDocument
82
+ */
83
+ internal_id?: string;
84
+ /**
85
+ *
86
+ * @type {string}
87
+ * @memberof OrderEdiDocument
88
+ */
89
+ merchant_id?: string;
90
+ /**
91
+ *
92
+ * @type {string}
93
+ * @memberof OrderEdiDocument
94
+ */
95
+ order_id?: string;
96
+ /**
97
+ *
98
+ * @type {boolean}
99
+ * @memberof OrderEdiDocument
100
+ */
101
+ test_mode?: boolean;
102
+ }
103
+ /**
104
+ * @export
105
+ */
106
+ export declare const OrderEdiDocumentDirectionEnum: {
107
+ readonly Inbound: "inbound";
108
+ readonly Outbound: "outbound";
109
+ };
110
+ export type OrderEdiDocumentDirectionEnum = typeof OrderEdiDocumentDirectionEnum[keyof typeof OrderEdiDocumentDirectionEnum];
111
+ export declare function OrderEdiDocumentFromJSON(json: any): OrderEdiDocument;
112
+ export declare function OrderEdiDocumentFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderEdiDocument;
113
+ export declare function OrderEdiDocumentToJSON(value?: OrderEdiDocument | null): any;
@@ -0,0 +1,75 @@
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.OrderEdiDocumentToJSON = exports.OrderEdiDocumentFromJSONTyped = exports.OrderEdiDocumentFromJSON = exports.OrderEdiDocumentDirectionEnum = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * @export
20
+ */
21
+ exports.OrderEdiDocumentDirectionEnum = {
22
+ Inbound: 'inbound',
23
+ Outbound: 'outbound'
24
+ };
25
+ function OrderEdiDocumentFromJSON(json) {
26
+ return OrderEdiDocumentFromJSONTyped(json, false);
27
+ }
28
+ exports.OrderEdiDocumentFromJSON = OrderEdiDocumentFromJSON;
29
+ function OrderEdiDocumentFromJSONTyped(json, ignoreDiscriminator) {
30
+ if ((json === undefined) || (json === null)) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'direction': !(0, runtime_1.exists)(json, 'direction') ? undefined : json['direction'],
35
+ 'doc_dts': !(0, runtime_1.exists)(json, 'doc_dts') ? undefined : json['doc_dts'],
36
+ 'document': !(0, runtime_1.exists)(json, 'document') ? undefined : json['document'],
37
+ 'document_type_description': !(0, runtime_1.exists)(json, 'document_type_description') ? undefined : json['document_type_description'],
38
+ 'document_type_number': !(0, runtime_1.exists)(json, 'document_type_number') ? undefined : json['document_type_number'],
39
+ 'external_id': !(0, runtime_1.exists)(json, 'external_id') ? undefined : json['external_id'],
40
+ 'functional_acknowledgement': !(0, runtime_1.exists)(json, 'functional_acknowledgement') ? undefined : json['functional_acknowledgement'],
41
+ 'functional_acknowledgement_dts': !(0, runtime_1.exists)(json, 'functional_acknowledgement_dts') ? undefined : json['functional_acknowledgement_dts'],
42
+ 'functional_acknowledgement_pending': !(0, runtime_1.exists)(json, 'functional_acknowledgement_pending') ? undefined : json['functional_acknowledgement_pending'],
43
+ 'group_control_number': !(0, runtime_1.exists)(json, 'group_control_number') ? undefined : json['group_control_number'],
44
+ 'internal_id': !(0, runtime_1.exists)(json, 'internal_id') ? undefined : json['internal_id'],
45
+ 'merchant_id': !(0, runtime_1.exists)(json, 'merchant_id') ? undefined : json['merchant_id'],
46
+ 'order_id': !(0, runtime_1.exists)(json, 'order_id') ? undefined : json['order_id'],
47
+ 'test_mode': !(0, runtime_1.exists)(json, 'test_mode') ? undefined : json['test_mode'],
48
+ };
49
+ }
50
+ exports.OrderEdiDocumentFromJSONTyped = OrderEdiDocumentFromJSONTyped;
51
+ function OrderEdiDocumentToJSON(value) {
52
+ if (value === undefined) {
53
+ return undefined;
54
+ }
55
+ if (value === null) {
56
+ return null;
57
+ }
58
+ return {
59
+ 'direction': value.direction,
60
+ 'doc_dts': value.doc_dts,
61
+ 'document': value.document,
62
+ 'document_type_description': value.document_type_description,
63
+ 'document_type_number': value.document_type_number,
64
+ 'external_id': value.external_id,
65
+ 'functional_acknowledgement': value.functional_acknowledgement,
66
+ 'functional_acknowledgement_dts': value.functional_acknowledgement_dts,
67
+ 'functional_acknowledgement_pending': value.functional_acknowledgement_pending,
68
+ 'group_control_number': value.group_control_number,
69
+ 'internal_id': value.internal_id,
70
+ 'merchant_id': value.merchant_id,
71
+ 'order_id': value.order_id,
72
+ 'test_mode': value.test_mode,
73
+ };
74
+ }
75
+ exports.OrderEdiDocumentToJSON = OrderEdiDocumentToJSON;
@@ -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 { ModelError } from './ModelError';
13
+ import { OrderEdiDocument } from './OrderEdiDocument';
14
+ import { ResponseMetadata } from './ResponseMetadata';
15
+ import { Warning } from './Warning';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface OrderEdiDocumentsResponse
20
+ */
21
+ export interface OrderEdiDocumentsResponse {
22
+ /**
23
+ * edi_documents
24
+ * @type {Array<OrderEdiDocument>}
25
+ * @memberof OrderEdiDocumentsResponse
26
+ */
27
+ ediDocuments?: Array<OrderEdiDocument>;
28
+ /**
29
+ *
30
+ * @type {ModelError}
31
+ * @memberof OrderEdiDocumentsResponse
32
+ */
33
+ error?: ModelError;
34
+ /**
35
+ *
36
+ * @type {ResponseMetadata}
37
+ * @memberof OrderEdiDocumentsResponse
38
+ */
39
+ metadata?: ResponseMetadata;
40
+ /**
41
+ * Indicates if API call was successful
42
+ * @type {boolean}
43
+ * @memberof OrderEdiDocumentsResponse
44
+ */
45
+ success?: boolean;
46
+ /**
47
+ *
48
+ * @type {Warning}
49
+ * @memberof OrderEdiDocumentsResponse
50
+ */
51
+ warning?: Warning;
52
+ }
53
+ export declare function OrderEdiDocumentsResponseFromJSON(json: any): OrderEdiDocumentsResponse;
54
+ export declare function OrderEdiDocumentsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderEdiDocumentsResponse;
55
+ export declare function OrderEdiDocumentsResponseToJSON(value?: OrderEdiDocumentsResponse | null): any;
@@ -0,0 +1,54 @@
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.OrderEdiDocumentsResponseToJSON = exports.OrderEdiDocumentsResponseFromJSONTyped = exports.OrderEdiDocumentsResponseFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ var ModelError_1 = require("./ModelError");
19
+ var OrderEdiDocument_1 = require("./OrderEdiDocument");
20
+ var ResponseMetadata_1 = require("./ResponseMetadata");
21
+ var Warning_1 = require("./Warning");
22
+ function OrderEdiDocumentsResponseFromJSON(json) {
23
+ return OrderEdiDocumentsResponseFromJSONTyped(json, false);
24
+ }
25
+ exports.OrderEdiDocumentsResponseFromJSON = OrderEdiDocumentsResponseFromJSON;
26
+ function OrderEdiDocumentsResponseFromJSONTyped(json, ignoreDiscriminator) {
27
+ if ((json === undefined) || (json === null)) {
28
+ return json;
29
+ }
30
+ return {
31
+ 'ediDocuments': !(0, runtime_1.exists)(json, 'ediDocuments') ? undefined : (json['ediDocuments'].map(OrderEdiDocument_1.OrderEdiDocumentFromJSON)),
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']),
36
+ };
37
+ }
38
+ exports.OrderEdiDocumentsResponseFromJSONTyped = OrderEdiDocumentsResponseFromJSONTyped;
39
+ function OrderEdiDocumentsResponseToJSON(value) {
40
+ if (value === undefined) {
41
+ return undefined;
42
+ }
43
+ if (value === null) {
44
+ return null;
45
+ }
46
+ return {
47
+ 'ediDocuments': value.ediDocuments === undefined ? undefined : (value.ediDocuments.map(OrderEdiDocument_1.OrderEdiDocumentToJSON)),
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),
52
+ };
53
+ }
54
+ exports.OrderEdiDocumentsResponseToJSON = OrderEdiDocumentsResponseToJSON;
@@ -167,6 +167,7 @@ export * from './ConversationPermissionsResponse';
167
167
  export * from './ConversationResponse';
168
168
  export * from './ConversationSearchRequest';
169
169
  export * from './ConversationSearchResponse';
170
+ export * from './ConversationSentiment';
170
171
  export * from './ConversationStartRequest';
171
172
  export * from './ConversationStartResponse';
172
173
  export * from './ConversationSummary';
@@ -557,6 +558,8 @@ export * from './OrderCoupon';
557
558
  export * from './OrderDigitalItem';
558
559
  export * from './OrderDigitalOrder';
559
560
  export * from './OrderEdi';
561
+ export * from './OrderEdiDocument';
562
+ export * from './OrderEdiDocumentsResponse';
560
563
  export * from './OrderFormat';
561
564
  export * from './OrderFormatResponse';
562
565
  export * from './OrderFraudScore';
@@ -185,6 +185,7 @@ __exportStar(require("./ConversationPermissionsResponse"), exports);
185
185
  __exportStar(require("./ConversationResponse"), exports);
186
186
  __exportStar(require("./ConversationSearchRequest"), exports);
187
187
  __exportStar(require("./ConversationSearchResponse"), exports);
188
+ __exportStar(require("./ConversationSentiment"), exports);
188
189
  __exportStar(require("./ConversationStartRequest"), exports);
189
190
  __exportStar(require("./ConversationStartResponse"), exports);
190
191
  __exportStar(require("./ConversationSummary"), exports);
@@ -575,6 +576,8 @@ __exportStar(require("./OrderCoupon"), exports);
575
576
  __exportStar(require("./OrderDigitalItem"), exports);
576
577
  __exportStar(require("./OrderDigitalOrder"), exports);
577
578
  __exportStar(require("./OrderEdi"), exports);
579
+ __exportStar(require("./OrderEdiDocument"), exports);
580
+ __exportStar(require("./OrderEdiDocumentsResponse"), exports);
578
581
  __exportStar(require("./OrderFormat"), exports);
579
582
  __exportStar(require("./OrderFormatResponse"), exports);
580
583
  __exportStar(require("./OrderFraudScore"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "4.0.137",
3
+ "version": "4.0.139",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "repository": {
@@ -36,6 +36,9 @@ import {
36
36
  OrderByTokenQuery,
37
37
  OrderByTokenQueryFromJSON,
38
38
  OrderByTokenQueryToJSON,
39
+ OrderEdiDocumentsResponse,
40
+ OrderEdiDocumentsResponseFromJSON,
41
+ OrderEdiDocumentsResponseToJSON,
39
42
  OrderFormat,
40
43
  OrderFormatFromJSON,
41
44
  OrderFormatToJSON,
@@ -135,6 +138,10 @@ export interface GetOrderByTokenRequest {
135
138
  expand?: string;
136
139
  }
137
140
 
141
+ export interface GetOrderEdiDocumentsRequest {
142
+ orderId: string;
143
+ }
144
+
138
145
  export interface GetOrdersRequest {
139
146
  orderId?: string;
140
147
  paymentMethod?: string;
@@ -452,6 +459,22 @@ export interface OrderApiInterface {
452
459
  */
453
460
  getOrderByToken(requestParameters: GetOrderByTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
454
461
 
462
+ /**
463
+ * Retrieve EDI documents associated with this order.
464
+ * @summary Retrieve EDI documents associated with this order.
465
+ * @param {string} orderId The order id to retrieve EDI documents for.
466
+ * @param {*} [options] Override http request option.
467
+ * @throws {RequiredError}
468
+ * @memberof OrderApiInterface
469
+ */
470
+ getOrderEdiDocumentsRaw(requestParameters: GetOrderEdiDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderEdiDocumentsResponse>>;
471
+
472
+ /**
473
+ * Retrieve EDI documents associated with this order.
474
+ * Retrieve EDI documents associated with this order.
475
+ */
476
+ getOrderEdiDocuments(requestParameters: GetOrderEdiDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderEdiDocumentsResponse>;
477
+
455
478
  /**
456
479
  * Retrieves a group of orders from the account. If no parameters are specified, the API call will fail with a bad request error. Always specify some parameters to limit the scope of the orders returned to ones you are truly interested in. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
457
480
  * @summary Retrieve orders
@@ -1261,6 +1284,47 @@ export class OrderApi extends runtime.BaseAPI implements OrderApiInterface {
1261
1284
  return await response.value();
1262
1285
  }
1263
1286
 
1287
+ /**
1288
+ * Retrieve EDI documents associated with this order.
1289
+ * Retrieve EDI documents associated with this order.
1290
+ */
1291
+ async getOrderEdiDocumentsRaw(requestParameters: GetOrderEdiDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderEdiDocumentsResponse>> {
1292
+ if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
1293
+ throw new runtime.RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling getOrderEdiDocuments.');
1294
+ }
1295
+
1296
+ const queryParameters: any = {};
1297
+
1298
+ const headerParameters: runtime.HTTPHeaders = {};
1299
+
1300
+ if (this.configuration && this.configuration.accessToken) {
1301
+ // oauth required
1302
+ headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["order_write"]);
1303
+ }
1304
+
1305
+ if (this.configuration && this.configuration.apiKey) {
1306
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
1307
+ }
1308
+
1309
+ const response = await this.request({
1310
+ path: `/order/orders/{order_id}/edi`.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters.orderId))),
1311
+ method: 'GET',
1312
+ headers: headerParameters,
1313
+ query: queryParameters,
1314
+ }, initOverrides);
1315
+
1316
+ return new runtime.JSONApiResponse(response, (jsonValue) => OrderEdiDocumentsResponseFromJSON(jsonValue));
1317
+ }
1318
+
1319
+ /**
1320
+ * Retrieve EDI documents associated with this order.
1321
+ * Retrieve EDI documents associated with this order.
1322
+ */
1323
+ async getOrderEdiDocuments(requestParameters: GetOrderEdiDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderEdiDocumentsResponse> {
1324
+ const response = await this.getOrderEdiDocumentsRaw(requestParameters, initOverrides);
1325
+ return await response.value();
1326
+ }
1327
+
1264
1328
  /**
1265
1329
  * Retrieves a group of orders from the account. If no parameters are specified, the API call will fail with a bad request error. Always specify some parameters to limit the scope of the orders returned to ones you are truly interested in. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
1266
1330
  * Retrieve orders
@@ -25,6 +25,12 @@ import {
25
25
  ConversationParticipantFromJSONTyped,
26
26
  ConversationParticipantToJSON,
27
27
  } from './ConversationParticipant';
28
+ import {
29
+ ConversationSentiment,
30
+ ConversationSentimentFromJSON,
31
+ ConversationSentimentFromJSONTyped,
32
+ ConversationSentimentToJSON,
33
+ } from './ConversationSentiment';
28
34
 
29
35
  /**
30
36
  *
@@ -122,6 +128,12 @@ export interface Conversation {
122
128
  * @memberof Conversation
123
129
  */
124
130
  participants?: Array<ConversationParticipant>;
131
+ /**
132
+ *
133
+ * @type {ConversationSentiment}
134
+ * @memberof Conversation
135
+ */
136
+ sentiment?: ConversationSentiment;
125
137
  /**
126
138
  * Start of the conversation date/time
127
139
  * @type {string}
@@ -178,6 +190,7 @@ export function ConversationFromJSONTyped(json: any, ignoreDiscriminator: boolea
178
190
  'message_count': !exists(json, 'message_count') ? undefined : json['message_count'],
179
191
  'messages': !exists(json, 'messages') ? undefined : ((json['messages'] as Array<any>).map(ConversationMessageFromJSON)),
180
192
  'participants': !exists(json, 'participants') ? undefined : ((json['participants'] as Array<any>).map(ConversationParticipantFromJSON)),
193
+ 'sentiment': !exists(json, 'sentiment') ? undefined : ConversationSentimentFromJSON(json['sentiment']),
181
194
  'start_dts': !exists(json, 'start_dts') ? undefined : json['start_dts'],
182
195
  'unread_messages': !exists(json, 'unread_messages') ? undefined : json['unread_messages'],
183
196
  'visible': !exists(json, 'visible') ? undefined : json['visible'],
@@ -208,6 +221,7 @@ export function ConversationToJSON(value?: Conversation | null): any {
208
221
  'message_count': value.message_count,
209
222
  'messages': value.messages === undefined ? undefined : ((value.messages as Array<any>).map(ConversationMessageToJSON)),
210
223
  'participants': value.participants === undefined ? undefined : ((value.participants as Array<any>).map(ConversationParticipantToJSON)),
224
+ 'sentiment': ConversationSentimentToJSON(value.sentiment),
211
225
  'start_dts': value.start_dts,
212
226
  'unread_messages': value.unread_messages,
213
227
  'visible': value.visible,
@@ -0,0 +1,109 @@
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 ConversationSentiment
20
+ */
21
+ export interface ConversationSentiment {
22
+ /**
23
+ * The last time the detect sentiment was run on this conversation
24
+ * @type {string}
25
+ * @memberof ConversationSentiment
26
+ */
27
+ last_detect_sentiment?: string;
28
+ /**
29
+ * The mixed score
30
+ * @type {number}
31
+ * @memberof ConversationSentiment
32
+ */
33
+ mixed?: number;
34
+ /**
35
+ * The negative score
36
+ * @type {number}
37
+ * @memberof ConversationSentiment
38
+ */
39
+ negative?: number;
40
+ /**
41
+ * The neutral score
42
+ * @type {number}
43
+ * @memberof ConversationSentiment
44
+ */
45
+ neutral?: number;
46
+ /**
47
+ * The positive score
48
+ * @type {number}
49
+ * @memberof ConversationSentiment
50
+ */
51
+ positive?: number;
52
+ /**
53
+ * The overall sentiment
54
+ * @type {string}
55
+ * @memberof ConversationSentiment
56
+ */
57
+ sentiment?: ConversationSentimentSentimentEnum;
58
+ }
59
+
60
+
61
+ /**
62
+ * @export
63
+ */
64
+ export const ConversationSentimentSentimentEnum = {
65
+ Positive: 'POSITIVE',
66
+ Neutral: 'NEUTRAL',
67
+ Negative: 'NEGATIVE',
68
+ Mixed: 'MIXED'
69
+ } as const;
70
+ export type ConversationSentimentSentimentEnum = typeof ConversationSentimentSentimentEnum[keyof typeof ConversationSentimentSentimentEnum];
71
+
72
+
73
+ export function ConversationSentimentFromJSON(json: any): ConversationSentiment {
74
+ return ConversationSentimentFromJSONTyped(json, false);
75
+ }
76
+
77
+ export function ConversationSentimentFromJSONTyped(json: any, ignoreDiscriminator: boolean): ConversationSentiment {
78
+ if ((json === undefined) || (json === null)) {
79
+ return json;
80
+ }
81
+ return {
82
+
83
+ 'last_detect_sentiment': !exists(json, 'last_detect_sentiment') ? undefined : json['last_detect_sentiment'],
84
+ 'mixed': !exists(json, 'mixed') ? undefined : json['mixed'],
85
+ 'negative': !exists(json, 'negative') ? undefined : json['negative'],
86
+ 'neutral': !exists(json, 'neutral') ? undefined : json['neutral'],
87
+ 'positive': !exists(json, 'positive') ? undefined : json['positive'],
88
+ 'sentiment': !exists(json, 'sentiment') ? undefined : json['sentiment'],
89
+ };
90
+ }
91
+
92
+ export function ConversationSentimentToJSON(value?: ConversationSentiment | null): any {
93
+ if (value === undefined) {
94
+ return undefined;
95
+ }
96
+ if (value === null) {
97
+ return null;
98
+ }
99
+ return {
100
+
101
+ 'last_detect_sentiment': value.last_detect_sentiment,
102
+ 'mixed': value.mixed,
103
+ 'negative': value.negative,
104
+ 'neutral': value.neutral,
105
+ 'positive': value.positive,
106
+ 'sentiment': value.sentiment,
107
+ };
108
+ }
109
+
@@ -19,6 +19,12 @@ import {
19
19
  ConversationParticipantFromJSONTyped,
20
20
  ConversationParticipantToJSON,
21
21
  } from './ConversationParticipant';
22
+ import {
23
+ ConversationSentiment,
24
+ ConversationSentimentFromJSON,
25
+ ConversationSentimentFromJSONTyped,
26
+ ConversationSentimentToJSON,
27
+ } from './ConversationSentiment';
22
28
 
23
29
  /**
24
30
  *
@@ -104,6 +110,12 @@ export interface ConversationSummary {
104
110
  * @memberof ConversationSummary
105
111
  */
106
112
  participants?: Array<ConversationParticipant>;
113
+ /**
114
+ *
115
+ * @type {ConversationSentiment}
116
+ * @memberof ConversationSummary
117
+ */
118
+ sentiment?: ConversationSentiment;
107
119
  /**
108
120
  * Start of the conversation date/time
109
121
  * @type {string}
@@ -158,6 +170,7 @@ export function ConversationSummaryFromJSONTyped(json: any, ignoreDiscriminator:
158
170
  'merchant_id': !exists(json, 'merchant_id') ? undefined : json['merchant_id'],
159
171
  'message_count': !exists(json, 'message_count') ? undefined : json['message_count'],
160
172
  'participants': !exists(json, 'participants') ? undefined : ((json['participants'] as Array<any>).map(ConversationParticipantFromJSON)),
173
+ 'sentiment': !exists(json, 'sentiment') ? undefined : ConversationSentimentFromJSON(json['sentiment']),
161
174
  'start_dts': !exists(json, 'start_dts') ? undefined : json['start_dts'],
162
175
  'unread_messages': !exists(json, 'unread_messages') ? undefined : json['unread_messages'],
163
176
  'visible': !exists(json, 'visible') ? undefined : json['visible'],
@@ -186,6 +199,7 @@ export function ConversationSummaryToJSON(value?: ConversationSummary | null): a
186
199
  'merchant_id': value.merchant_id,
187
200
  'message_count': value.message_count,
188
201
  'participants': value.participants === undefined ? undefined : ((value.participants as Array<any>).map(ConversationParticipantToJSON)),
202
+ 'sentiment': ConversationSentimentToJSON(value.sentiment),
189
203
  'start_dts': value.start_dts,
190
204
  'unread_messages': value.unread_messages,
191
205
  'visible': value.visible,
@@ -0,0 +1,171 @@
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 OrderEdiDocument
20
+ */
21
+ export interface OrderEdiDocument {
22
+ /**
23
+ * Direction the document flowed
24
+ * @type {string}
25
+ * @memberof OrderEdiDocument
26
+ */
27
+ direction?: OrderEdiDocumentDirectionEnum;
28
+ /**
29
+ * Date/time the document was created/received
30
+ * @type {string}
31
+ * @memberof OrderEdiDocument
32
+ */
33
+ doc_dts?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof OrderEdiDocument
38
+ */
39
+ document?: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof OrderEdiDocument
44
+ */
45
+ document_type_description?: string;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof OrderEdiDocument
50
+ */
51
+ document_type_number?: number;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof OrderEdiDocument
56
+ */
57
+ external_id?: string;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof OrderEdiDocument
62
+ */
63
+ functional_acknowledgement?: string;
64
+ /**
65
+ *
66
+ * @type {string}
67
+ * @memberof OrderEdiDocument
68
+ */
69
+ functional_acknowledgement_dts?: string;
70
+ /**
71
+ *
72
+ * @type {boolean}
73
+ * @memberof OrderEdiDocument
74
+ */
75
+ functional_acknowledgement_pending?: boolean;
76
+ /**
77
+ *
78
+ * @type {number}
79
+ * @memberof OrderEdiDocument
80
+ */
81
+ group_control_number?: number;
82
+ /**
83
+ *
84
+ * @type {string}
85
+ * @memberof OrderEdiDocument
86
+ */
87
+ internal_id?: string;
88
+ /**
89
+ *
90
+ * @type {string}
91
+ * @memberof OrderEdiDocument
92
+ */
93
+ merchant_id?: string;
94
+ /**
95
+ *
96
+ * @type {string}
97
+ * @memberof OrderEdiDocument
98
+ */
99
+ order_id?: string;
100
+ /**
101
+ *
102
+ * @type {boolean}
103
+ * @memberof OrderEdiDocument
104
+ */
105
+ test_mode?: boolean;
106
+ }
107
+
108
+
109
+ /**
110
+ * @export
111
+ */
112
+ export const OrderEdiDocumentDirectionEnum = {
113
+ Inbound: 'inbound',
114
+ Outbound: 'outbound'
115
+ } as const;
116
+ export type OrderEdiDocumentDirectionEnum = typeof OrderEdiDocumentDirectionEnum[keyof typeof OrderEdiDocumentDirectionEnum];
117
+
118
+
119
+ export function OrderEdiDocumentFromJSON(json: any): OrderEdiDocument {
120
+ return OrderEdiDocumentFromJSONTyped(json, false);
121
+ }
122
+
123
+ export function OrderEdiDocumentFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderEdiDocument {
124
+ if ((json === undefined) || (json === null)) {
125
+ return json;
126
+ }
127
+ return {
128
+
129
+ 'direction': !exists(json, 'direction') ? undefined : json['direction'],
130
+ 'doc_dts': !exists(json, 'doc_dts') ? undefined : json['doc_dts'],
131
+ 'document': !exists(json, 'document') ? undefined : json['document'],
132
+ 'document_type_description': !exists(json, 'document_type_description') ? undefined : json['document_type_description'],
133
+ 'document_type_number': !exists(json, 'document_type_number') ? undefined : json['document_type_number'],
134
+ 'external_id': !exists(json, 'external_id') ? undefined : json['external_id'],
135
+ 'functional_acknowledgement': !exists(json, 'functional_acknowledgement') ? undefined : json['functional_acknowledgement'],
136
+ 'functional_acknowledgement_dts': !exists(json, 'functional_acknowledgement_dts') ? undefined : json['functional_acknowledgement_dts'],
137
+ 'functional_acknowledgement_pending': !exists(json, 'functional_acknowledgement_pending') ? undefined : json['functional_acknowledgement_pending'],
138
+ 'group_control_number': !exists(json, 'group_control_number') ? undefined : json['group_control_number'],
139
+ 'internal_id': !exists(json, 'internal_id') ? undefined : json['internal_id'],
140
+ 'merchant_id': !exists(json, 'merchant_id') ? undefined : json['merchant_id'],
141
+ 'order_id': !exists(json, 'order_id') ? undefined : json['order_id'],
142
+ 'test_mode': !exists(json, 'test_mode') ? undefined : json['test_mode'],
143
+ };
144
+ }
145
+
146
+ export function OrderEdiDocumentToJSON(value?: OrderEdiDocument | null): any {
147
+ if (value === undefined) {
148
+ return undefined;
149
+ }
150
+ if (value === null) {
151
+ return null;
152
+ }
153
+ return {
154
+
155
+ 'direction': value.direction,
156
+ 'doc_dts': value.doc_dts,
157
+ 'document': value.document,
158
+ 'document_type_description': value.document_type_description,
159
+ 'document_type_number': value.document_type_number,
160
+ 'external_id': value.external_id,
161
+ 'functional_acknowledgement': value.functional_acknowledgement,
162
+ 'functional_acknowledgement_dts': value.functional_acknowledgement_dts,
163
+ 'functional_acknowledgement_pending': value.functional_acknowledgement_pending,
164
+ 'group_control_number': value.group_control_number,
165
+ 'internal_id': value.internal_id,
166
+ 'merchant_id': value.merchant_id,
167
+ 'order_id': value.order_id,
168
+ 'test_mode': value.test_mode,
169
+ };
170
+ }
171
+
@@ -0,0 +1,113 @@
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
+ import {
17
+ ModelError,
18
+ ModelErrorFromJSON,
19
+ ModelErrorFromJSONTyped,
20
+ ModelErrorToJSON,
21
+ } from './ModelError';
22
+ import {
23
+ OrderEdiDocument,
24
+ OrderEdiDocumentFromJSON,
25
+ OrderEdiDocumentFromJSONTyped,
26
+ OrderEdiDocumentToJSON,
27
+ } from './OrderEdiDocument';
28
+ import {
29
+ ResponseMetadata,
30
+ ResponseMetadataFromJSON,
31
+ ResponseMetadataFromJSONTyped,
32
+ ResponseMetadataToJSON,
33
+ } from './ResponseMetadata';
34
+ import {
35
+ Warning,
36
+ WarningFromJSON,
37
+ WarningFromJSONTyped,
38
+ WarningToJSON,
39
+ } from './Warning';
40
+
41
+ /**
42
+ *
43
+ * @export
44
+ * @interface OrderEdiDocumentsResponse
45
+ */
46
+ export interface OrderEdiDocumentsResponse {
47
+ /**
48
+ * edi_documents
49
+ * @type {Array<OrderEdiDocument>}
50
+ * @memberof OrderEdiDocumentsResponse
51
+ */
52
+ ediDocuments?: Array<OrderEdiDocument>;
53
+ /**
54
+ *
55
+ * @type {ModelError}
56
+ * @memberof OrderEdiDocumentsResponse
57
+ */
58
+ error?: ModelError;
59
+ /**
60
+ *
61
+ * @type {ResponseMetadata}
62
+ * @memberof OrderEdiDocumentsResponse
63
+ */
64
+ metadata?: ResponseMetadata;
65
+ /**
66
+ * Indicates if API call was successful
67
+ * @type {boolean}
68
+ * @memberof OrderEdiDocumentsResponse
69
+ */
70
+ success?: boolean;
71
+ /**
72
+ *
73
+ * @type {Warning}
74
+ * @memberof OrderEdiDocumentsResponse
75
+ */
76
+ warning?: Warning;
77
+ }
78
+
79
+ export function OrderEdiDocumentsResponseFromJSON(json: any): OrderEdiDocumentsResponse {
80
+ return OrderEdiDocumentsResponseFromJSONTyped(json, false);
81
+ }
82
+
83
+ export function OrderEdiDocumentsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderEdiDocumentsResponse {
84
+ if ((json === undefined) || (json === null)) {
85
+ return json;
86
+ }
87
+ return {
88
+
89
+ 'ediDocuments': !exists(json, 'ediDocuments') ? undefined : ((json['ediDocuments'] as Array<any>).map(OrderEdiDocumentFromJSON)),
90
+ 'error': !exists(json, 'error') ? undefined : ModelErrorFromJSON(json['error']),
91
+ 'metadata': !exists(json, 'metadata') ? undefined : ResponseMetadataFromJSON(json['metadata']),
92
+ 'success': !exists(json, 'success') ? undefined : json['success'],
93
+ 'warning': !exists(json, 'warning') ? undefined : WarningFromJSON(json['warning']),
94
+ };
95
+ }
96
+
97
+ export function OrderEdiDocumentsResponseToJSON(value?: OrderEdiDocumentsResponse | null): any {
98
+ if (value === undefined) {
99
+ return undefined;
100
+ }
101
+ if (value === null) {
102
+ return null;
103
+ }
104
+ return {
105
+
106
+ 'ediDocuments': value.ediDocuments === undefined ? undefined : ((value.ediDocuments as Array<any>).map(OrderEdiDocumentToJSON)),
107
+ 'error': ModelErrorToJSON(value.error),
108
+ 'metadata': ResponseMetadataToJSON(value.metadata),
109
+ 'success': value.success,
110
+ 'warning': WarningToJSON(value.warning),
111
+ };
112
+ }
113
+
@@ -169,6 +169,7 @@ export * from './ConversationPermissionsResponse';
169
169
  export * from './ConversationResponse';
170
170
  export * from './ConversationSearchRequest';
171
171
  export * from './ConversationSearchResponse';
172
+ export * from './ConversationSentiment';
172
173
  export * from './ConversationStartRequest';
173
174
  export * from './ConversationStartResponse';
174
175
  export * from './ConversationSummary';
@@ -559,6 +560,8 @@ export * from './OrderCoupon';
559
560
  export * from './OrderDigitalItem';
560
561
  export * from './OrderDigitalOrder';
561
562
  export * from './OrderEdi';
563
+ export * from './OrderEdiDocument';
564
+ export * from './OrderEdiDocumentsResponse';
562
565
  export * from './OrderFormat';
563
566
  export * from './OrderFormatResponse';
564
567
  export * from './OrderFraudScore';