ultracart_rest_api_v2_typescript 4.1.26 → 4.1.28

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.
@@ -675,6 +675,7 @@ src/models/OauthTokenResponse.ts
675
675
  src/models/Order.ts
676
676
  src/models/OrderAffiliate.ts
677
677
  src/models/OrderAffiliateLedger.ts
678
+ src/models/OrderAssignToAffiliateRequest.ts
678
679
  src/models/OrderAutoOrder.ts
679
680
  src/models/OrderBilling.ts
680
681
  src/models/OrderBuysafe.ts
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # UltraCart Typescript SDK
2
- ## ultracart_rest_api_v2_typescript@4.1.26
2
+ ## ultracart_rest_api_v2_typescript@4.1.28
3
3
 
4
4
  Every API method call has a sample for every language SDK. See https://github.com/UltraCart/sdk_samples
5
5
 
6
6
  Installation
7
7
 
8
8
  ```
9
- npm install ultracart_rest_api_v2_typescript@4.1.26 --save
9
+ npm install ultracart_rest_api_v2_typescript@4.1.28 --save
10
10
  ```
11
11
 
12
12
  ```typescript
@@ -85,6 +85,8 @@ Not every change is committed to every SDK.
85
85
 
86
86
  | Version | Date | Comments |
87
87
  | --: | :-: | --- |
88
+ | 4.1.28 | 11/07/2025 | OrderApi.assignToAffiliate |
89
+ | 4.1.27 | 11/06/2025 | conversation ai knowledge base changes |
88
90
  | 4.1.26 | 10/20/2025 | conversation api bug fixes |
89
91
  | 4.1.25 | 10/20/2025 | conversation api bug fix for bad url on agent profile kb upload |
90
92
  | 4.1.24 | 10/20/2025 | new perm flag on conversation virtual agent capabilities |
@@ -10,11 +10,16 @@
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, OrderEdiDocumentsResponse, OrderFormat, OrderFormatResponse, OrderInvoiceResponse, OrderPackingSlipResponse, OrderProcessPaymentRequest, OrderProcessPaymentResponse, OrderQuery, OrderQueryBatch, OrderRefundableResponse, OrderReplacement, OrderReplacementResponse, OrderResponse, OrderTokenResponse, OrderValidationRequest, OrderValidationResponse, OrdersResponse, ReplaceOrderItemIdRequest } from '../models';
13
+ import { AccountsReceivableRetryConfig, AccountsReceivableRetryConfigResponse, AccountsReceivableRetryStatsResponse, BaseResponse, Order, OrderAssignToAffiliateRequest, OrderByTokenQuery, OrderEdiDocumentsResponse, OrderFormat, OrderFormatResponse, OrderInvoiceResponse, OrderPackingSlipResponse, OrderProcessPaymentRequest, OrderProcessPaymentResponse, OrderQuery, OrderQueryBatch, OrderRefundableResponse, OrderReplacement, OrderReplacementResponse, OrderResponse, OrderTokenResponse, OrderValidationRequest, OrderValidationResponse, OrdersResponse, ReplaceOrderItemIdRequest } from '../models';
14
14
  export interface AdjustOrderTotalRequest {
15
15
  orderId: string;
16
16
  desiredTotal: string;
17
17
  }
18
+ export interface AssignToAffiliateRequest {
19
+ orderId: string;
20
+ assignToAffiliateRequest: OrderAssignToAffiliateRequest;
21
+ expand?: string;
22
+ }
18
23
  export interface BlockRefundOnOrderRequest {
19
24
  orderId: string;
20
25
  blockReason?: string;
@@ -181,6 +186,22 @@ export interface OrderApiInterface {
181
186
  * Adjusts an order total
182
187
  */
183
188
  adjustOrderTotal(requestParameters: AdjustOrderTotalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseResponse>;
189
+ /**
190
+ * Assigns an order to an affiliate.
191
+ * @summary Assigns an order to an affiliate
192
+ * @param {string} orderId The order id to assign to the affiliate.
193
+ * @param {OrderAssignToAffiliateRequest} assignToAffiliateRequest Assign to affiliate request
194
+ * @param {string} [expand] The object expansion to perform on the result. See documentation for examples
195
+ * @param {*} [options] Override http request option.
196
+ * @throws {RequiredError}
197
+ * @memberof OrderApiInterface
198
+ */
199
+ assignToAffiliateRaw(requestParameters: AssignToAffiliateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>>;
200
+ /**
201
+ * Assigns an order to an affiliate.
202
+ * Assigns an order to an affiliate
203
+ */
204
+ assignToAffiliate(requestParameters: AssignToAffiliateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
184
205
  /**
185
206
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
186
207
  * @summary Set a refund block on an order
@@ -661,6 +682,16 @@ export declare class OrderApi extends runtime.BaseAPI implements OrderApiInterfa
661
682
  * Adjusts an order total
662
683
  */
663
684
  adjustOrderTotal(requestParameters: AdjustOrderTotalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseResponse>;
685
+ /**
686
+ * Assigns an order to an affiliate.
687
+ * Assigns an order to an affiliate
688
+ */
689
+ assignToAffiliateRaw(requestParameters: AssignToAffiliateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>>;
690
+ /**
691
+ * Assigns an order to an affiliate.
692
+ * Assigns an order to an affiliate
693
+ */
694
+ assignToAffiliate(requestParameters: AssignToAffiliateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
664
695
  /**
665
696
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
666
697
  * Set a refund block on an order
@@ -137,6 +137,73 @@ var OrderApi = /** @class */ (function (_super) {
137
137
  });
138
138
  });
139
139
  };
140
+ /**
141
+ * Assigns an order to an affiliate.
142
+ * Assigns an order to an affiliate
143
+ */
144
+ OrderApi.prototype.assignToAffiliateRaw = function (requestParameters, initOverrides) {
145
+ return __awaiter(this, void 0, void 0, function () {
146
+ var queryParameters, headerParameters, _a, _b, response;
147
+ return __generator(this, function (_c) {
148
+ switch (_c.label) {
149
+ case 0:
150
+ if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
151
+ throw new runtime.RequiredError('orderId', 'Required parameter requestParameters.orderId was null or undefined when calling assignToAffiliate.');
152
+ }
153
+ if (requestParameters.assignToAffiliateRequest === null || requestParameters.assignToAffiliateRequest === undefined) {
154
+ throw new runtime.RequiredError('assignToAffiliateRequest', 'Required parameter requestParameters.assignToAffiliateRequest was null or undefined when calling assignToAffiliate.');
155
+ }
156
+ queryParameters = {};
157
+ if (requestParameters.expand !== undefined) {
158
+ queryParameters['_expand'] = requestParameters.expand;
159
+ }
160
+ headerParameters = {};
161
+ headerParameters['Content-Type'] = 'application/json';
162
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
163
+ // oauth required
164
+ _a = headerParameters;
165
+ _b = "Authorization";
166
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["order_write"])];
167
+ case 1:
168
+ // oauth required
169
+ _a[_b] = _c.sent();
170
+ _c.label = 2;
171
+ case 2:
172
+ if (this.configuration && this.configuration.apiKey) {
173
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
174
+ }
175
+ return [4 /*yield*/, this.request({
176
+ path: "/order/orders/{order_id}/assignToAffiliate".replace("{".concat("order_id", "}"), encodeURIComponent(String(requestParameters.orderId))),
177
+ method: 'POST',
178
+ headers: headerParameters,
179
+ query: queryParameters,
180
+ body: (0, models_1.OrderAssignToAffiliateRequestToJSON)(requestParameters.assignToAffiliateRequest),
181
+ }, initOverrides)];
182
+ case 3:
183
+ response = _c.sent();
184
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.OrderResponseFromJSON)(jsonValue); })];
185
+ }
186
+ });
187
+ });
188
+ };
189
+ /**
190
+ * Assigns an order to an affiliate.
191
+ * Assigns an order to an affiliate
192
+ */
193
+ OrderApi.prototype.assignToAffiliate = function (requestParameters, initOverrides) {
194
+ return __awaiter(this, void 0, void 0, function () {
195
+ var response;
196
+ return __generator(this, function (_a) {
197
+ switch (_a.label) {
198
+ case 0: return [4 /*yield*/, this.assignToAffiliateRaw(requestParameters, initOverrides)];
199
+ case 1:
200
+ response = _a.sent();
201
+ return [4 /*yield*/, response.value()];
202
+ case 2: return [2 /*return*/, _a.sent()];
203
+ }
204
+ });
205
+ });
206
+ };
140
207
  /**
141
208
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
142
209
  * Set a refund block on an order
@@ -15,6 +15,12 @@
15
15
  * @interface ConversationInsertKnowledgeBaseDocumentRequest
16
16
  */
17
17
  export interface ConversationInsertKnowledgeBaseDocumentRequest {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ConversationInsertKnowledgeBaseDocumentRequest
22
+ */
23
+ original_file_name?: string;
18
24
  /**
19
25
  *
20
26
  * @type {string}
@@ -32,6 +32,7 @@ function ConversationInsertKnowledgeBaseDocumentRequestFromJSONTyped(json, ignor
32
32
  return json;
33
33
  }
34
34
  return {
35
+ 'original_file_name': !(0, runtime_1.exists)(json, 'original_file_name') ? undefined : json['original_file_name'],
35
36
  'presigned_url': !(0, runtime_1.exists)(json, 'presigned_url') ? undefined : json['presigned_url'],
36
37
  };
37
38
  }
@@ -44,6 +45,7 @@ function ConversationInsertKnowledgeBaseDocumentRequestToJSON(value) {
44
45
  return null;
45
46
  }
46
47
  return {
48
+ 'original_file_name': value.original_file_name,
47
49
  'presigned_url': value.presigned_url,
48
50
  };
49
51
  }
@@ -57,6 +57,12 @@ export interface ConversationKnowledgeBaseDocument {
57
57
  * @memberof ConversationKnowledgeBaseDocument
58
58
  */
59
59
  s3_key?: string;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof ConversationKnowledgeBaseDocument
64
+ */
65
+ s3_url?: string;
60
66
  }
61
67
  /**
62
68
  * Check if a given object implements the ConversationKnowledgeBaseDocument interface.
@@ -39,6 +39,7 @@ function ConversationKnowledgeBaseDocumentFromJSONTyped(json, ignoreDiscriminato
39
39
  'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : json['metadata'],
40
40
  'mime_type': !(0, runtime_1.exists)(json, 'mime_type') ? undefined : json['mime_type'],
41
41
  's3_key': !(0, runtime_1.exists)(json, 's3_key') ? undefined : json['s3_key'],
42
+ 's3_url': !(0, runtime_1.exists)(json, 's3_url') ? undefined : json['s3_url'],
42
43
  };
43
44
  }
44
45
  exports.ConversationKnowledgeBaseDocumentFromJSONTyped = ConversationKnowledgeBaseDocumentFromJSONTyped;
@@ -57,6 +58,7 @@ function ConversationKnowledgeBaseDocumentToJSON(value) {
57
58
  'metadata': value.metadata,
58
59
  'mime_type': value.mime_type,
59
60
  's3_key': value.s3_key,
61
+ 's3_url': value.s3_url,
60
62
  };
61
63
  }
62
64
  exports.ConversationKnowledgeBaseDocumentToJSON = ConversationKnowledgeBaseDocumentToJSON;
@@ -0,0 +1,43 @@
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 OrderAssignToAffiliateRequest
16
+ */
17
+ export interface OrderAssignToAffiliateRequest {
18
+ /**
19
+ * Affiliate email to associate with the order
20
+ * @type {string}
21
+ * @memberof OrderAssignToAffiliateRequest
22
+ */
23
+ affiliate_email?: string;
24
+ /**
25
+ * Affiliate id to associate with the order
26
+ * @type {number}
27
+ * @memberof OrderAssignToAffiliateRequest
28
+ */
29
+ affiliate_id?: number;
30
+ /**
31
+ * Affiliate sub id to associate with the order
32
+ * @type {string}
33
+ * @memberof OrderAssignToAffiliateRequest
34
+ */
35
+ affiliate_sub_id?: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the OrderAssignToAffiliateRequest interface.
39
+ */
40
+ export declare function instanceOfOrderAssignToAffiliateRequest(value: object): boolean;
41
+ export declare function OrderAssignToAffiliateRequestFromJSON(json: any): OrderAssignToAffiliateRequest;
42
+ export declare function OrderAssignToAffiliateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderAssignToAffiliateRequest;
43
+ export declare function OrderAssignToAffiliateRequestToJSON(value?: OrderAssignToAffiliateRequest | 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.OrderAssignToAffiliateRequestToJSON = exports.OrderAssignToAffiliateRequestFromJSONTyped = exports.OrderAssignToAffiliateRequestFromJSON = exports.instanceOfOrderAssignToAffiliateRequest = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ /**
19
+ * Check if a given object implements the OrderAssignToAffiliateRequest interface.
20
+ */
21
+ function instanceOfOrderAssignToAffiliateRequest(value) {
22
+ var isInstance = true;
23
+ return isInstance;
24
+ }
25
+ exports.instanceOfOrderAssignToAffiliateRequest = instanceOfOrderAssignToAffiliateRequest;
26
+ function OrderAssignToAffiliateRequestFromJSON(json) {
27
+ return OrderAssignToAffiliateRequestFromJSONTyped(json, false);
28
+ }
29
+ exports.OrderAssignToAffiliateRequestFromJSON = OrderAssignToAffiliateRequestFromJSON;
30
+ function OrderAssignToAffiliateRequestFromJSONTyped(json, ignoreDiscriminator) {
31
+ if ((json === undefined) || (json === null)) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'affiliate_email': !(0, runtime_1.exists)(json, 'affiliate_email') ? undefined : json['affiliate_email'],
36
+ 'affiliate_id': !(0, runtime_1.exists)(json, 'affiliate_id') ? undefined : json['affiliate_id'],
37
+ 'affiliate_sub_id': !(0, runtime_1.exists)(json, 'affiliate_sub_id') ? undefined : json['affiliate_sub_id'],
38
+ };
39
+ }
40
+ exports.OrderAssignToAffiliateRequestFromJSONTyped = OrderAssignToAffiliateRequestFromJSONTyped;
41
+ function OrderAssignToAffiliateRequestToJSON(value) {
42
+ if (value === undefined) {
43
+ return undefined;
44
+ }
45
+ if (value === null) {
46
+ return null;
47
+ }
48
+ return {
49
+ 'affiliate_email': value.affiliate_email,
50
+ 'affiliate_id': value.affiliate_id,
51
+ 'affiliate_sub_id': value.affiliate_sub_id,
52
+ };
53
+ }
54
+ exports.OrderAssignToAffiliateRequestToJSON = OrderAssignToAffiliateRequestToJSON;
@@ -180,6 +180,7 @@ export declare const OrderPaymentPaymentMethodEnum: {
180
180
  readonly GooglePay: "Google Pay";
181
181
  readonly HealthBenefitCard: "Health Benefit Card";
182
182
  readonly PayPalFastlane: "PayPal Fastlane";
183
+ readonly Klarna: "Klarna";
183
184
  };
184
185
  export type OrderPaymentPaymentMethodEnum = typeof OrderPaymentPaymentMethodEnum[keyof typeof OrderPaymentPaymentMethodEnum];
185
186
  /**
@@ -58,7 +58,8 @@ exports.OrderPaymentPaymentMethodEnum = {
58
58
  ApplePay: 'Apple Pay',
59
59
  GooglePay: 'Google Pay',
60
60
  HealthBenefitCard: 'Health Benefit Card',
61
- PayPalFastlane: 'PayPal Fastlane'
61
+ PayPalFastlane: 'PayPal Fastlane',
62
+ Klarna: 'Klarna'
62
63
  };
63
64
  /**
64
65
  * @export
@@ -649,6 +649,7 @@ export * from './OauthTokenResponse';
649
649
  export * from './Order';
650
650
  export * from './OrderAffiliate';
651
651
  export * from './OrderAffiliateLedger';
652
+ export * from './OrderAssignToAffiliateRequest';
652
653
  export * from './OrderAutoOrder';
653
654
  export * from './OrderBilling';
654
655
  export * from './OrderBuysafe';
@@ -667,6 +667,7 @@ __exportStar(require("./OauthTokenResponse"), exports);
667
667
  __exportStar(require("./Order"), exports);
668
668
  __exportStar(require("./OrderAffiliate"), exports);
669
669
  __exportStar(require("./OrderAffiliateLedger"), exports);
670
+ __exportStar(require("./OrderAssignToAffiliateRequest"), exports);
670
671
  __exportStar(require("./OrderAutoOrder"), exports);
671
672
  __exportStar(require("./OrderBilling"), exports);
672
673
  __exportStar(require("./OrderBuysafe"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "4.1.26",
3
+ "version": "4.1.28",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "repository": {
@@ -33,6 +33,9 @@ import {
33
33
  Order,
34
34
  OrderFromJSON,
35
35
  OrderToJSON,
36
+ OrderAssignToAffiliateRequest,
37
+ OrderAssignToAffiliateRequestFromJSON,
38
+ OrderAssignToAffiliateRequestToJSON,
36
39
  OrderByTokenQuery,
37
40
  OrderByTokenQueryFromJSON,
38
41
  OrderByTokenQueryToJSON,
@@ -97,6 +100,12 @@ export interface AdjustOrderTotalRequest {
97
100
  desiredTotal: string;
98
101
  }
99
102
 
103
+ export interface AssignToAffiliateRequest {
104
+ orderId: string;
105
+ assignToAffiliateRequest: OrderAssignToAffiliateRequest;
106
+ expand?: string;
107
+ }
108
+
100
109
  export interface BlockRefundOnOrderRequest {
101
110
  orderId: string;
102
111
  blockReason?: string;
@@ -293,6 +302,24 @@ export interface OrderApiInterface {
293
302
  */
294
303
  adjustOrderTotal(requestParameters: AdjustOrderTotalRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BaseResponse>;
295
304
 
305
+ /**
306
+ * Assigns an order to an affiliate.
307
+ * @summary Assigns an order to an affiliate
308
+ * @param {string} orderId The order id to assign to the affiliate.
309
+ * @param {OrderAssignToAffiliateRequest} assignToAffiliateRequest Assign to affiliate request
310
+ * @param {string} [expand] The object expansion to perform on the result. See documentation for examples
311
+ * @param {*} [options] Override http request option.
312
+ * @throws {RequiredError}
313
+ * @memberof OrderApiInterface
314
+ */
315
+ assignToAffiliateRaw(requestParameters: AssignToAffiliateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>>;
316
+
317
+ /**
318
+ * Assigns an order to an affiliate.
319
+ * Assigns an order to an affiliate
320
+ */
321
+ assignToAffiliate(requestParameters: AssignToAffiliateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse>;
322
+
296
323
  /**
297
324
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
298
325
  * @summary Set a refund block on an order
@@ -868,6 +895,58 @@ export class OrderApi extends runtime.BaseAPI implements OrderApiInterface {
868
895
  return await response.value();
869
896
  }
870
897
 
898
+ /**
899
+ * Assigns an order to an affiliate.
900
+ * Assigns an order to an affiliate
901
+ */
902
+ async assignToAffiliateRaw(requestParameters: AssignToAffiliateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrderResponse>> {
903
+ if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
904
+ throw new runtime.RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling assignToAffiliate.');
905
+ }
906
+
907
+ if (requestParameters.assignToAffiliateRequest === null || requestParameters.assignToAffiliateRequest === undefined) {
908
+ throw new runtime.RequiredError('assignToAffiliateRequest','Required parameter requestParameters.assignToAffiliateRequest was null or undefined when calling assignToAffiliate.');
909
+ }
910
+
911
+ const queryParameters: any = {};
912
+
913
+ if (requestParameters.expand !== undefined) {
914
+ queryParameters['_expand'] = requestParameters.expand;
915
+ }
916
+
917
+ const headerParameters: runtime.HTTPHeaders = {};
918
+
919
+ headerParameters['Content-Type'] = 'application/json';
920
+
921
+ if (this.configuration && this.configuration.accessToken) {
922
+ // oauth required
923
+ headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["order_write"]);
924
+ }
925
+
926
+ if (this.configuration && this.configuration.apiKey) {
927
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
928
+ }
929
+
930
+ const response = await this.request({
931
+ path: `/order/orders/{order_id}/assignToAffiliate`.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters.orderId))),
932
+ method: 'POST',
933
+ headers: headerParameters,
934
+ query: queryParameters,
935
+ body: OrderAssignToAffiliateRequestToJSON(requestParameters.assignToAffiliateRequest),
936
+ }, initOverrides);
937
+
938
+ return new runtime.JSONApiResponse(response, (jsonValue) => OrderResponseFromJSON(jsonValue));
939
+ }
940
+
941
+ /**
942
+ * Assigns an order to an affiliate.
943
+ * Assigns an order to an affiliate
944
+ */
945
+ async assignToAffiliate(requestParameters: AssignToAffiliateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrderResponse> {
946
+ const response = await this.assignToAffiliateRaw(requestParameters, initOverrides);
947
+ return await response.value();
948
+ }
949
+
871
950
  /**
872
951
  * Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
873
952
  * Set a refund block on an order
@@ -19,6 +19,12 @@ import { exists, mapValues } from '../runtime';
19
19
  * @interface ConversationInsertKnowledgeBaseDocumentRequest
20
20
  */
21
21
  export interface ConversationInsertKnowledgeBaseDocumentRequest {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ConversationInsertKnowledgeBaseDocumentRequest
26
+ */
27
+ original_file_name?: string;
22
28
  /**
23
29
  *
24
30
  * @type {string}
@@ -48,6 +54,7 @@ export function ConversationInsertKnowledgeBaseDocumentRequestFromJSONTyped(json
48
54
  }
49
55
  return {
50
56
 
57
+ 'original_file_name': !exists(json, 'original_file_name') ? undefined : json['original_file_name'],
51
58
  'presigned_url': !exists(json, 'presigned_url') ? undefined : json['presigned_url'],
52
59
  };
53
60
  }
@@ -61,6 +68,7 @@ export function ConversationInsertKnowledgeBaseDocumentRequestToJSON(value?: Con
61
68
  }
62
69
  return {
63
70
 
71
+ 'original_file_name': value.original_file_name,
64
72
  'presigned_url': value.presigned_url,
65
73
  };
66
74
  }
@@ -61,6 +61,12 @@ export interface ConversationKnowledgeBaseDocument {
61
61
  * @memberof ConversationKnowledgeBaseDocument
62
62
  */
63
63
  s3_key?: string;
64
+ /**
65
+ *
66
+ * @type {string}
67
+ * @memberof ConversationKnowledgeBaseDocument
68
+ */
69
+ s3_url?: string;
64
70
  }
65
71
 
66
72
 
@@ -91,6 +97,7 @@ export function ConversationKnowledgeBaseDocumentFromJSONTyped(json: any, ignore
91
97
  'metadata': !exists(json, 'metadata') ? undefined : json['metadata'],
92
98
  'mime_type': !exists(json, 'mime_type') ? undefined : json['mime_type'],
93
99
  's3_key': !exists(json, 's3_key') ? undefined : json['s3_key'],
100
+ 's3_url': !exists(json, 's3_url') ? undefined : json['s3_url'],
94
101
  };
95
102
  }
96
103
 
@@ -110,6 +117,7 @@ export function ConversationKnowledgeBaseDocumentToJSON(value?: ConversationKnow
110
117
  'metadata': value.metadata,
111
118
  'mime_type': value.mime_type,
112
119
  's3_key': value.s3_key,
120
+ 's3_url': value.s3_url,
113
121
  };
114
122
  }
115
123
 
@@ -0,0 +1,83 @@
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 OrderAssignToAffiliateRequest
20
+ */
21
+ export interface OrderAssignToAffiliateRequest {
22
+ /**
23
+ * Affiliate email to associate with the order
24
+ * @type {string}
25
+ * @memberof OrderAssignToAffiliateRequest
26
+ */
27
+ affiliate_email?: string;
28
+ /**
29
+ * Affiliate id to associate with the order
30
+ * @type {number}
31
+ * @memberof OrderAssignToAffiliateRequest
32
+ */
33
+ affiliate_id?: number;
34
+ /**
35
+ * Affiliate sub id to associate with the order
36
+ * @type {string}
37
+ * @memberof OrderAssignToAffiliateRequest
38
+ */
39
+ affiliate_sub_id?: string;
40
+ }
41
+
42
+
43
+
44
+ /**
45
+ * Check if a given object implements the OrderAssignToAffiliateRequest interface.
46
+ */
47
+ export function instanceOfOrderAssignToAffiliateRequest(value: object): boolean {
48
+ let isInstance = true;
49
+
50
+ return isInstance;
51
+ }
52
+
53
+ export function OrderAssignToAffiliateRequestFromJSON(json: any): OrderAssignToAffiliateRequest {
54
+ return OrderAssignToAffiliateRequestFromJSONTyped(json, false);
55
+ }
56
+
57
+ export function OrderAssignToAffiliateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderAssignToAffiliateRequest {
58
+ if ((json === undefined) || (json === null)) {
59
+ return json;
60
+ }
61
+ return {
62
+
63
+ 'affiliate_email': !exists(json, 'affiliate_email') ? undefined : json['affiliate_email'],
64
+ 'affiliate_id': !exists(json, 'affiliate_id') ? undefined : json['affiliate_id'],
65
+ 'affiliate_sub_id': !exists(json, 'affiliate_sub_id') ? undefined : json['affiliate_sub_id'],
66
+ };
67
+ }
68
+
69
+ export function OrderAssignToAffiliateRequestToJSON(value?: OrderAssignToAffiliateRequest | null): any {
70
+ if (value === undefined) {
71
+ return undefined;
72
+ }
73
+ if (value === null) {
74
+ return null;
75
+ }
76
+ return {
77
+
78
+ 'affiliate_email': value.affiliate_email,
79
+ 'affiliate_id': value.affiliate_id,
80
+ 'affiliate_sub_id': value.affiliate_sub_id,
81
+ };
82
+ }
83
+
@@ -232,7 +232,8 @@ export const OrderPaymentPaymentMethodEnum = {
232
232
  ApplePay: 'Apple Pay',
233
233
  GooglePay: 'Google Pay',
234
234
  HealthBenefitCard: 'Health Benefit Card',
235
- PayPalFastlane: 'PayPal Fastlane'
235
+ PayPalFastlane: 'PayPal Fastlane',
236
+ Klarna: 'Klarna'
236
237
  } as const;
237
238
  export type OrderPaymentPaymentMethodEnum = typeof OrderPaymentPaymentMethodEnum[keyof typeof OrderPaymentPaymentMethodEnum];
238
239
 
@@ -651,6 +651,7 @@ export * from './OauthTokenResponse';
651
651
  export * from './Order';
652
652
  export * from './OrderAffiliate';
653
653
  export * from './OrderAffiliateLedger';
654
+ export * from './OrderAssignToAffiliateRequest';
654
655
  export * from './OrderAutoOrder';
655
656
  export * from './OrderBilling';
656
657
  export * from './OrderBuysafe';