ultracart_rest_api_v2_typescript 4.1.33 → 4.1.35

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.
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # UltraCart Typescript SDK
2
- ## ultracart_rest_api_v2_typescript@4.1.33
2
+ ## ultracart_rest_api_v2_typescript@4.1.35
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.33 --save
9
+ npm install ultracart_rest_api_v2_typescript@4.1.35 --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.35 | 12/02/2025 | caching option added to getCustomers, created new method searchCustomers |
89
+ | 4.1.34 | 12/02/2025 | coupons - added optional free specific shipping method to two coupons |
88
90
  | 4.1.33 | 11/26/2025 | conversation - AI agent profile fields |
89
91
  | 4.1.32 | 11/20/2025 | conversion api bug fix on incorrect signature |
90
92
  | 4.1.31 | 11/20/2025 | conversation - AI agent mcp server tools function |
@@ -112,6 +112,16 @@ export interface MergeCustomerRequest {
112
112
  export interface SearchCustomerProfileValuesRequest {
113
113
  lookupRequest: LookupRequest;
114
114
  }
115
+ export interface SearchCustomersRequest {
116
+ searchString?: string;
117
+ signupDtsStart?: string;
118
+ signupDtsEnd?: string;
119
+ limit?: number;
120
+ offset?: number;
121
+ since?: string;
122
+ sort?: string;
123
+ expand?: string;
124
+ }
115
125
  export interface UpdateCustomerRequest {
116
126
  customerProfileOid: number;
117
127
  customer: Customer;
@@ -460,6 +470,27 @@ export interface CustomerApiInterface {
460
470
  * Searches for all matching values (using POST)
461
471
  */
462
472
  searchCustomerProfileValues(requestParameters: SearchCustomerProfileValuesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LookupResponse>;
473
+ /**
474
+ * Retrieves customers from the account by matching the search value against most customer fields. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. This search also goes against the cache so updates should not be performed with these result objects. Always re-query the individual customer profile if you are going to make updates.
475
+ * @summary Search for customers
476
+ * @param {string} [searchString] Search
477
+ * @param {string} [signupDtsStart] Signup date start
478
+ * @param {string} [signupDtsEnd] Signup date end
479
+ * @param {number} [limit] The maximum number of records to return on this one API call. (Max 200)
480
+ * @param {number} [offset] Pagination of the record set. Offset is a zero based index.
481
+ * @param {string} [since] Fetch customers that have been created/modified since this date/time.
482
+ * @param {string} [sort] The sort order of the customers. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
483
+ * @param {string} [expand] The object expansion to perform on the result. See documentation for examples
484
+ * @param {*} [options] Override http request option.
485
+ * @throws {RequiredError}
486
+ * @memberof CustomerApiInterface
487
+ */
488
+ searchCustomersRaw(requestParameters: SearchCustomersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomersResponse>>;
489
+ /**
490
+ * Retrieves customers from the account by matching the search value against most customer fields. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. This search also goes against the cache so updates should not be performed with these result objects. Always re-query the individual customer profile if you are going to make updates.
491
+ * Search for customers
492
+ */
493
+ searchCustomers(requestParameters: SearchCustomersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomersResponse>;
463
494
  /**
464
495
  * Update a customer on the UltraCart account.
465
496
  * @summary Update a customer
@@ -724,6 +755,16 @@ export declare class CustomerApi extends runtime.BaseAPI implements CustomerApiI
724
755
  * Searches for all matching values (using POST)
725
756
  */
726
757
  searchCustomerProfileValues(requestParameters: SearchCustomerProfileValuesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LookupResponse>;
758
+ /**
759
+ * Retrieves customers from the account by matching the search value against most customer fields. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. This search also goes against the cache so updates should not be performed with these result objects. Always re-query the individual customer profile if you are going to make updates.
760
+ * Search for customers
761
+ */
762
+ searchCustomersRaw(requestParameters: SearchCustomersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomersResponse>>;
763
+ /**
764
+ * Retrieves customers from the account by matching the search value against most customer fields. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. This search also goes against the cache so updates should not be performed with these result objects. Always re-query the individual customer profile if you are going to make updates.
765
+ * Search for customers
766
+ */
767
+ searchCustomers(requestParameters?: SearchCustomersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomersResponse>;
727
768
  /**
728
769
  * Update a customer on the UltraCart account.
729
770
  * Update a customer
@@ -1403,6 +1403,87 @@ var CustomerApi = /** @class */ (function (_super) {
1403
1403
  });
1404
1404
  });
1405
1405
  };
1406
+ /**
1407
+ * Retrieves customers from the account by matching the search value against most customer fields. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. This search also goes against the cache so updates should not be performed with these result objects. Always re-query the individual customer profile if you are going to make updates.
1408
+ * Search for customers
1409
+ */
1410
+ CustomerApi.prototype.searchCustomersRaw = function (requestParameters, initOverrides) {
1411
+ return __awaiter(this, void 0, void 0, function () {
1412
+ var queryParameters, headerParameters, _a, _b, response;
1413
+ return __generator(this, function (_c) {
1414
+ switch (_c.label) {
1415
+ case 0:
1416
+ queryParameters = {};
1417
+ if (requestParameters.searchString !== undefined) {
1418
+ queryParameters['search_string'] = requestParameters.searchString;
1419
+ }
1420
+ if (requestParameters.signupDtsStart !== undefined) {
1421
+ queryParameters['signup_dts_start'] = requestParameters.signupDtsStart;
1422
+ }
1423
+ if (requestParameters.signupDtsEnd !== undefined) {
1424
+ queryParameters['signup_dts_end'] = requestParameters.signupDtsEnd;
1425
+ }
1426
+ if (requestParameters.limit !== undefined) {
1427
+ queryParameters['_limit'] = requestParameters.limit;
1428
+ }
1429
+ if (requestParameters.offset !== undefined) {
1430
+ queryParameters['_offset'] = requestParameters.offset;
1431
+ }
1432
+ if (requestParameters.since !== undefined) {
1433
+ queryParameters['_since'] = requestParameters.since;
1434
+ }
1435
+ if (requestParameters.sort !== undefined) {
1436
+ queryParameters['_sort'] = requestParameters.sort;
1437
+ }
1438
+ if (requestParameters.expand !== undefined) {
1439
+ queryParameters['_expand'] = requestParameters.expand;
1440
+ }
1441
+ headerParameters = {};
1442
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
1443
+ // oauth required
1444
+ _a = headerParameters;
1445
+ _b = "Authorization";
1446
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["customer_read"])];
1447
+ case 1:
1448
+ // oauth required
1449
+ _a[_b] = _c.sent();
1450
+ _c.label = 2;
1451
+ case 2:
1452
+ if (this.configuration && this.configuration.apiKey) {
1453
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
1454
+ }
1455
+ return [4 /*yield*/, this.request({
1456
+ path: "/customer/customers/search",
1457
+ method: 'GET',
1458
+ headers: headerParameters,
1459
+ query: queryParameters,
1460
+ }, initOverrides)];
1461
+ case 3:
1462
+ response = _c.sent();
1463
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.CustomersResponseFromJSON)(jsonValue); })];
1464
+ }
1465
+ });
1466
+ });
1467
+ };
1468
+ /**
1469
+ * Retrieves customers from the account by matching the search value against most customer fields. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. This search also goes against the cache so updates should not be performed with these result objects. Always re-query the individual customer profile if you are going to make updates.
1470
+ * Search for customers
1471
+ */
1472
+ CustomerApi.prototype.searchCustomers = function (requestParameters, initOverrides) {
1473
+ if (requestParameters === void 0) { requestParameters = {}; }
1474
+ return __awaiter(this, void 0, void 0, function () {
1475
+ var response;
1476
+ return __generator(this, function (_a) {
1477
+ switch (_a.label) {
1478
+ case 0: return [4 /*yield*/, this.searchCustomersRaw(requestParameters, initOverrides)];
1479
+ case 1:
1480
+ response = _a.sent();
1481
+ return [4 /*yield*/, response.value()];
1482
+ case 2: return [2 /*return*/, _a.sent()];
1483
+ }
1484
+ });
1485
+ });
1486
+ };
1406
1487
  /**
1407
1488
  * Update a customer on the UltraCart account.
1408
1489
  * Update a customer
@@ -39,6 +39,12 @@ export interface CouponFreeItemWithItemPurchaseAndFreeShipping {
39
39
  * @memberof CouponFreeItemWithItemPurchaseAndFreeShipping
40
40
  */
41
41
  required_purchase_items?: Array<string>;
42
+ /**
43
+ * One or more shipping methods that may be used with this coupon. If not specified or empty, methods that are marked as qualifies for free shipping will be the only free methods
44
+ * @type {Array<string>}
45
+ * @memberof CouponFreeItemWithItemPurchaseAndFreeShipping
46
+ */
47
+ shipping_methods?: Array<string>;
42
48
  }
43
49
  /**
44
50
  * Check if a given object implements the CouponFreeItemWithItemPurchaseAndFreeShipping interface.
@@ -36,6 +36,7 @@ function CouponFreeItemWithItemPurchaseAndFreeShippingFromJSONTyped(json, ignore
36
36
  'limit': !(0, runtime_1.exists)(json, 'limit') ? undefined : json['limit'],
37
37
  'match_required_purchase_item_to_free_item': !(0, runtime_1.exists)(json, 'match_required_purchase_item_to_free_item') ? undefined : json['match_required_purchase_item_to_free_item'],
38
38
  'required_purchase_items': !(0, runtime_1.exists)(json, 'required_purchase_items') ? undefined : json['required_purchase_items'],
39
+ 'shipping_methods': !(0, runtime_1.exists)(json, 'shipping_methods') ? undefined : json['shipping_methods'],
39
40
  };
40
41
  }
41
42
  exports.CouponFreeItemWithItemPurchaseAndFreeShippingFromJSONTyped = CouponFreeItemWithItemPurchaseAndFreeShippingFromJSONTyped;
@@ -51,6 +52,7 @@ function CouponFreeItemWithItemPurchaseAndFreeShippingToJSON(value) {
51
52
  'limit': value.limit,
52
53
  'match_required_purchase_item_to_free_item': value.match_required_purchase_item_to_free_item,
53
54
  'required_purchase_items': value.required_purchase_items,
55
+ 'shipping_methods': value.shipping_methods,
54
56
  };
55
57
  }
56
58
  exports.CouponFreeItemWithItemPurchaseAndFreeShippingToJSON = CouponFreeItemWithItemPurchaseAndFreeShippingToJSON;
@@ -45,6 +45,12 @@ export interface CouponPercentOffItemsAndFreeShipping {
45
45
  * @memberof CouponPercentOffItemsAndFreeShipping
46
46
  */
47
47
  items?: Array<string>;
48
+ /**
49
+ * One or more shipping methods that may be used with this coupon. If not specified or empty, methods that are marked as qualifies for free shipping will be the only free methods
50
+ * @type {Array<string>}
51
+ * @memberof CouponPercentOffItemsAndFreeShipping
52
+ */
53
+ shipping_methods?: Array<string>;
48
54
  }
49
55
  /**
50
56
  * Check if a given object implements the CouponPercentOffItemsAndFreeShipping interface.
@@ -37,6 +37,7 @@ function CouponPercentOffItemsAndFreeShippingFromJSONTyped(json, ignoreDiscrimin
37
37
  'excluded_items': !(0, runtime_1.exists)(json, 'excluded_items') ? undefined : json['excluded_items'],
38
38
  'item_tags': !(0, runtime_1.exists)(json, 'item_tags') ? undefined : json['item_tags'],
39
39
  'items': !(0, runtime_1.exists)(json, 'items') ? undefined : json['items'],
40
+ 'shipping_methods': !(0, runtime_1.exists)(json, 'shipping_methods') ? undefined : json['shipping_methods'],
40
41
  };
41
42
  }
42
43
  exports.CouponPercentOffItemsAndFreeShippingFromJSONTyped = CouponPercentOffItemsAndFreeShippingFromJSONTyped;
@@ -53,6 +54,7 @@ function CouponPercentOffItemsAndFreeShippingToJSON(value) {
53
54
  'excluded_items': value.excluded_items,
54
55
  'item_tags': value.item_tags,
55
56
  'items': value.items,
57
+ 'shipping_methods': value.shipping_methods,
56
58
  };
57
59
  }
58
60
  exports.CouponPercentOffItemsAndFreeShippingToJSON = CouponPercentOffItemsAndFreeShippingToJSON;
@@ -123,6 +123,12 @@ export interface CustomerQuery {
123
123
  * @memberof CustomerQuery
124
124
  */
125
125
  qb_class?: string;
126
+ /**
127
+ * Query Target
128
+ * @type {string}
129
+ * @memberof CustomerQuery
130
+ */
131
+ query_target?: CustomerQueryQueryTargetEnum;
126
132
  /**
127
133
  * QuickBooks name to import this customer as
128
134
  * @type {string}
@@ -196,6 +202,14 @@ export interface CustomerQuery {
196
202
  */
197
203
  signup_dts_start?: string;
198
204
  }
205
+ /**
206
+ * @export
207
+ */
208
+ export declare const CustomerQueryQueryTargetEnum: {
209
+ readonly Origin: "origin";
210
+ readonly Cache: "cache";
211
+ };
212
+ export type CustomerQueryQueryTargetEnum = typeof CustomerQueryQueryTargetEnum[keyof typeof CustomerQueryQueryTargetEnum];
199
213
  /**
200
214
  * Check if a given object implements the CustomerQuery interface.
201
215
  */
@@ -13,8 +13,15 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.CustomerQueryToJSON = exports.CustomerQueryFromJSONTyped = exports.CustomerQueryFromJSON = exports.instanceOfCustomerQuery = void 0;
16
+ exports.CustomerQueryToJSON = exports.CustomerQueryFromJSONTyped = exports.CustomerQueryFromJSON = exports.instanceOfCustomerQuery = exports.CustomerQueryQueryTargetEnum = void 0;
17
17
  var runtime_1 = require("../runtime");
18
+ /**
19
+ * @export
20
+ */
21
+ exports.CustomerQueryQueryTargetEnum = {
22
+ Origin: 'origin',
23
+ Cache: 'cache'
24
+ };
18
25
  /**
19
26
  * Check if a given object implements the CustomerQuery interface.
20
27
  */
@@ -50,6 +57,7 @@ function CustomerQueryFromJSONTyped(json, ignoreDiscriminator) {
50
57
  'pricing_tier_name': !(0, runtime_1.exists)(json, 'pricing_tier_name') ? undefined : json['pricing_tier_name'],
51
58
  'pricing_tier_oid': !(0, runtime_1.exists)(json, 'pricing_tier_oid') ? undefined : json['pricing_tier_oid'],
52
59
  'qb_class': !(0, runtime_1.exists)(json, 'qb_class') ? undefined : json['qb_class'],
60
+ 'query_target': !(0, runtime_1.exists)(json, 'query_target') ? undefined : json['query_target'],
53
61
  'quickbooks_code': !(0, runtime_1.exists)(json, 'quickbooks_code') ? undefined : json['quickbooks_code'],
54
62
  'shipping_city': !(0, runtime_1.exists)(json, 'shipping_city') ? undefined : json['shipping_city'],
55
63
  'shipping_company': !(0, runtime_1.exists)(json, 'shipping_company') ? undefined : json['shipping_company'],
@@ -91,6 +99,7 @@ function CustomerQueryToJSON(value) {
91
99
  'pricing_tier_name': value.pricing_tier_name,
92
100
  'pricing_tier_oid': value.pricing_tier_oid,
93
101
  'qb_class': value.qb_class,
102
+ 'query_target': value.query_target,
94
103
  'quickbooks_code': value.quickbooks_code,
95
104
  'shipping_city': value.shipping_city,
96
105
  'shipping_company': value.shipping_company,
@@ -15,6 +15,24 @@
15
15
  * @interface EmailCommseqEmail
16
16
  */
17
17
  export interface EmailCommseqEmail {
18
+ /**
19
+ *
20
+ * @type {boolean}
21
+ * @memberof EmailCommseqEmail
22
+ */
23
+ ai_generation?: boolean;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof EmailCommseqEmail
28
+ */
29
+ ai_generation_prompt?: string;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof EmailCommseqEmail
34
+ */
35
+ ai_generation_user_id?: number;
18
36
  /**
19
37
  * Deleted
20
38
  * @type {boolean}
@@ -32,6 +32,9 @@ function EmailCommseqEmailFromJSONTyped(json, ignoreDiscriminator) {
32
32
  return json;
33
33
  }
34
34
  return {
35
+ 'ai_generation': !(0, runtime_1.exists)(json, 'ai_generation') ? undefined : json['ai_generation'],
36
+ 'ai_generation_prompt': !(0, runtime_1.exists)(json, 'ai_generation_prompt') ? undefined : json['ai_generation_prompt'],
37
+ 'ai_generation_user_id': !(0, runtime_1.exists)(json, 'ai_generation_user_id') ? undefined : json['ai_generation_user_id'],
35
38
  'deleted': !(0, runtime_1.exists)(json, 'deleted') ? undefined : json['deleted'],
36
39
  'edited_by_user': !(0, runtime_1.exists)(json, 'edited_by_user') ? undefined : json['edited_by_user'],
37
40
  'email_communication_sequence_email_uuid': !(0, runtime_1.exists)(json, 'email_communication_sequence_email_uuid') ? undefined : json['email_communication_sequence_email_uuid'],
@@ -77,6 +80,9 @@ function EmailCommseqEmailToJSON(value) {
77
80
  return null;
78
81
  }
79
82
  return {
83
+ 'ai_generation': value.ai_generation,
84
+ 'ai_generation_prompt': value.ai_generation_prompt,
85
+ 'ai_generation_user_id': value.ai_generation_user_id,
80
86
  'deleted': value.deleted,
81
87
  'edited_by_user': value.edited_by_user,
82
88
  'email_communication_sequence_email_uuid': value.email_communication_sequence_email_uuid,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "4.1.33",
3
+ "version": "4.1.35",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "repository": {
@@ -211,6 +211,17 @@ export interface SearchCustomerProfileValuesRequest {
211
211
  lookupRequest: LookupRequest;
212
212
  }
213
213
 
214
+ export interface SearchCustomersRequest {
215
+ searchString?: string;
216
+ signupDtsStart?: string;
217
+ signupDtsEnd?: string;
218
+ limit?: number;
219
+ offset?: number;
220
+ since?: string;
221
+ sort?: string;
222
+ expand?: string;
223
+ }
224
+
214
225
  export interface UpdateCustomerRequest {
215
226
  customerProfileOid: number;
216
227
  customer: Customer;
@@ -603,6 +614,29 @@ export interface CustomerApiInterface {
603
614
  */
604
615
  searchCustomerProfileValues(requestParameters: SearchCustomerProfileValuesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LookupResponse>;
605
616
 
617
+ /**
618
+ * Retrieves customers from the account by matching the search value against most customer fields. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. This search also goes against the cache so updates should not be performed with these result objects. Always re-query the individual customer profile if you are going to make updates.
619
+ * @summary Search for customers
620
+ * @param {string} [searchString] Search
621
+ * @param {string} [signupDtsStart] Signup date start
622
+ * @param {string} [signupDtsEnd] Signup date end
623
+ * @param {number} [limit] The maximum number of records to return on this one API call. (Max 200)
624
+ * @param {number} [offset] Pagination of the record set. Offset is a zero based index.
625
+ * @param {string} [since] Fetch customers that have been created/modified since this date/time.
626
+ * @param {string} [sort] The sort order of the customers. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
627
+ * @param {string} [expand] The object expansion to perform on the result. See documentation for examples
628
+ * @param {*} [options] Override http request option.
629
+ * @throws {RequiredError}
630
+ * @memberof CustomerApiInterface
631
+ */
632
+ searchCustomersRaw(requestParameters: SearchCustomersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomersResponse>>;
633
+
634
+ /**
635
+ * Retrieves customers from the account by matching the search value against most customer fields. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. This search also goes against the cache so updates should not be performed with these result objects. Always re-query the individual customer profile if you are going to make updates.
636
+ * Search for customers
637
+ */
638
+ searchCustomers(requestParameters: SearchCustomersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomersResponse>;
639
+
606
640
  /**
607
641
  * Update a customer on the UltraCart account.
608
642
  * @summary Update a customer
@@ -1702,6 +1736,75 @@ export class CustomerApi extends runtime.BaseAPI implements CustomerApiInterface
1702
1736
  return await response.value();
1703
1737
  }
1704
1738
 
1739
+ /**
1740
+ * Retrieves customers from the account by matching the search value against most customer fields. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. This search also goes against the cache so updates should not be performed with these result objects. Always re-query the individual customer profile if you are going to make updates.
1741
+ * Search for customers
1742
+ */
1743
+ async searchCustomersRaw(requestParameters: SearchCustomersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomersResponse>> {
1744
+ const queryParameters: any = {};
1745
+
1746
+ if (requestParameters.searchString !== undefined) {
1747
+ queryParameters['search_string'] = requestParameters.searchString;
1748
+ }
1749
+
1750
+ if (requestParameters.signupDtsStart !== undefined) {
1751
+ queryParameters['signup_dts_start'] = requestParameters.signupDtsStart;
1752
+ }
1753
+
1754
+ if (requestParameters.signupDtsEnd !== undefined) {
1755
+ queryParameters['signup_dts_end'] = requestParameters.signupDtsEnd;
1756
+ }
1757
+
1758
+ if (requestParameters.limit !== undefined) {
1759
+ queryParameters['_limit'] = requestParameters.limit;
1760
+ }
1761
+
1762
+ if (requestParameters.offset !== undefined) {
1763
+ queryParameters['_offset'] = requestParameters.offset;
1764
+ }
1765
+
1766
+ if (requestParameters.since !== undefined) {
1767
+ queryParameters['_since'] = requestParameters.since;
1768
+ }
1769
+
1770
+ if (requestParameters.sort !== undefined) {
1771
+ queryParameters['_sort'] = requestParameters.sort;
1772
+ }
1773
+
1774
+ if (requestParameters.expand !== undefined) {
1775
+ queryParameters['_expand'] = requestParameters.expand;
1776
+ }
1777
+
1778
+ const headerParameters: runtime.HTTPHeaders = {};
1779
+
1780
+ if (this.configuration && this.configuration.accessToken) {
1781
+ // oauth required
1782
+ headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["customer_read"]);
1783
+ }
1784
+
1785
+ if (this.configuration && this.configuration.apiKey) {
1786
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
1787
+ }
1788
+
1789
+ const response = await this.request({
1790
+ path: `/customer/customers/search`,
1791
+ method: 'GET',
1792
+ headers: headerParameters,
1793
+ query: queryParameters,
1794
+ }, initOverrides);
1795
+
1796
+ return new runtime.JSONApiResponse(response, (jsonValue) => CustomersResponseFromJSON(jsonValue));
1797
+ }
1798
+
1799
+ /**
1800
+ * Retrieves customers from the account by matching the search value against most customer fields. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. This search also goes against the cache so updates should not be performed with these result objects. Always re-query the individual customer profile if you are going to make updates.
1801
+ * Search for customers
1802
+ */
1803
+ async searchCustomers(requestParameters: SearchCustomersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomersResponse> {
1804
+ const response = await this.searchCustomersRaw(requestParameters, initOverrides);
1805
+ return await response.value();
1806
+ }
1807
+
1705
1808
  /**
1706
1809
  * Update a customer on the UltraCart account.
1707
1810
  * Update a customer
@@ -43,6 +43,12 @@ export interface CouponFreeItemWithItemPurchaseAndFreeShipping {
43
43
  * @memberof CouponFreeItemWithItemPurchaseAndFreeShipping
44
44
  */
45
45
  required_purchase_items?: Array<string>;
46
+ /**
47
+ * One or more shipping methods that may be used with this coupon. If not specified or empty, methods that are marked as qualifies for free shipping will be the only free methods
48
+ * @type {Array<string>}
49
+ * @memberof CouponFreeItemWithItemPurchaseAndFreeShipping
50
+ */
51
+ shipping_methods?: Array<string>;
46
52
  }
47
53
 
48
54
 
@@ -70,6 +76,7 @@ export function CouponFreeItemWithItemPurchaseAndFreeShippingFromJSONTyped(json:
70
76
  'limit': !exists(json, 'limit') ? undefined : json['limit'],
71
77
  'match_required_purchase_item_to_free_item': !exists(json, 'match_required_purchase_item_to_free_item') ? undefined : json['match_required_purchase_item_to_free_item'],
72
78
  'required_purchase_items': !exists(json, 'required_purchase_items') ? undefined : json['required_purchase_items'],
79
+ 'shipping_methods': !exists(json, 'shipping_methods') ? undefined : json['shipping_methods'],
73
80
  };
74
81
  }
75
82
 
@@ -86,6 +93,7 @@ export function CouponFreeItemWithItemPurchaseAndFreeShippingToJSON(value?: Coup
86
93
  'limit': value.limit,
87
94
  'match_required_purchase_item_to_free_item': value.match_required_purchase_item_to_free_item,
88
95
  'required_purchase_items': value.required_purchase_items,
96
+ 'shipping_methods': value.shipping_methods,
89
97
  };
90
98
  }
91
99
 
@@ -49,6 +49,12 @@ export interface CouponPercentOffItemsAndFreeShipping {
49
49
  * @memberof CouponPercentOffItemsAndFreeShipping
50
50
  */
51
51
  items?: Array<string>;
52
+ /**
53
+ * One or more shipping methods that may be used with this coupon. If not specified or empty, methods that are marked as qualifies for free shipping will be the only free methods
54
+ * @type {Array<string>}
55
+ * @memberof CouponPercentOffItemsAndFreeShipping
56
+ */
57
+ shipping_methods?: Array<string>;
52
58
  }
53
59
 
54
60
 
@@ -77,6 +83,7 @@ export function CouponPercentOffItemsAndFreeShippingFromJSONTyped(json: any, ign
77
83
  'excluded_items': !exists(json, 'excluded_items') ? undefined : json['excluded_items'],
78
84
  'item_tags': !exists(json, 'item_tags') ? undefined : json['item_tags'],
79
85
  'items': !exists(json, 'items') ? undefined : json['items'],
86
+ 'shipping_methods': !exists(json, 'shipping_methods') ? undefined : json['shipping_methods'],
80
87
  };
81
88
  }
82
89
 
@@ -94,6 +101,7 @@ export function CouponPercentOffItemsAndFreeShippingToJSON(value?: CouponPercent
94
101
  'excluded_items': value.excluded_items,
95
102
  'item_tags': value.item_tags,
96
103
  'items': value.items,
104
+ 'shipping_methods': value.shipping_methods,
97
105
  };
98
106
  }
99
107
 
@@ -127,6 +127,12 @@ export interface CustomerQuery {
127
127
  * @memberof CustomerQuery
128
128
  */
129
129
  qb_class?: string;
130
+ /**
131
+ * Query Target
132
+ * @type {string}
133
+ * @memberof CustomerQuery
134
+ */
135
+ query_target?: CustomerQueryQueryTargetEnum;
130
136
  /**
131
137
  * QuickBooks name to import this customer as
132
138
  * @type {string}
@@ -203,6 +209,16 @@ export interface CustomerQuery {
203
209
 
204
210
 
205
211
 
212
+ /**
213
+ * @export
214
+ */
215
+ export const CustomerQueryQueryTargetEnum = {
216
+ Origin: 'origin',
217
+ Cache: 'cache'
218
+ } as const;
219
+ export type CustomerQueryQueryTargetEnum = typeof CustomerQueryQueryTargetEnum[keyof typeof CustomerQueryQueryTargetEnum];
220
+
221
+
206
222
  /**
207
223
  * Check if a given object implements the CustomerQuery interface.
208
224
  */
@@ -240,6 +256,7 @@ export function CustomerQueryFromJSONTyped(json: any, ignoreDiscriminator: boole
240
256
  'pricing_tier_name': !exists(json, 'pricing_tier_name') ? undefined : json['pricing_tier_name'],
241
257
  'pricing_tier_oid': !exists(json, 'pricing_tier_oid') ? undefined : json['pricing_tier_oid'],
242
258
  'qb_class': !exists(json, 'qb_class') ? undefined : json['qb_class'],
259
+ 'query_target': !exists(json, 'query_target') ? undefined : json['query_target'],
243
260
  'quickbooks_code': !exists(json, 'quickbooks_code') ? undefined : json['quickbooks_code'],
244
261
  'shipping_city': !exists(json, 'shipping_city') ? undefined : json['shipping_city'],
245
262
  'shipping_company': !exists(json, 'shipping_company') ? undefined : json['shipping_company'],
@@ -282,6 +299,7 @@ export function CustomerQueryToJSON(value?: CustomerQuery | null): any {
282
299
  'pricing_tier_name': value.pricing_tier_name,
283
300
  'pricing_tier_oid': value.pricing_tier_oid,
284
301
  'qb_class': value.qb_class,
302
+ 'query_target': value.query_target,
285
303
  'quickbooks_code': value.quickbooks_code,
286
304
  'shipping_city': value.shipping_city,
287
305
  'shipping_company': value.shipping_company,
@@ -19,6 +19,24 @@ import { exists, mapValues } from '../runtime';
19
19
  * @interface EmailCommseqEmail
20
20
  */
21
21
  export interface EmailCommseqEmail {
22
+ /**
23
+ *
24
+ * @type {boolean}
25
+ * @memberof EmailCommseqEmail
26
+ */
27
+ ai_generation?: boolean;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof EmailCommseqEmail
32
+ */
33
+ ai_generation_prompt?: string;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof EmailCommseqEmail
38
+ */
39
+ ai_generation_user_id?: number;
22
40
  /**
23
41
  * Deleted
24
42
  * @type {boolean}
@@ -246,6 +264,9 @@ export function EmailCommseqEmailFromJSONTyped(json: any, ignoreDiscriminator: b
246
264
  }
247
265
  return {
248
266
 
267
+ 'ai_generation': !exists(json, 'ai_generation') ? undefined : json['ai_generation'],
268
+ 'ai_generation_prompt': !exists(json, 'ai_generation_prompt') ? undefined : json['ai_generation_prompt'],
269
+ 'ai_generation_user_id': !exists(json, 'ai_generation_user_id') ? undefined : json['ai_generation_user_id'],
249
270
  'deleted': !exists(json, 'deleted') ? undefined : json['deleted'],
250
271
  'edited_by_user': !exists(json, 'edited_by_user') ? undefined : json['edited_by_user'],
251
272
  'email_communication_sequence_email_uuid': !exists(json, 'email_communication_sequence_email_uuid') ? undefined : json['email_communication_sequence_email_uuid'],
@@ -292,6 +313,9 @@ export function EmailCommseqEmailToJSON(value?: EmailCommseqEmail | null): any {
292
313
  }
293
314
  return {
294
315
 
316
+ 'ai_generation': value.ai_generation,
317
+ 'ai_generation_prompt': value.ai_generation_prompt,
318
+ 'ai_generation_user_id': value.ai_generation_user_id,
295
319
  'deleted': value.deleted,
296
320
  'edited_by_user': value.edited_by_user,
297
321
  'email_communication_sequence_email_uuid': value.email_communication_sequence_email_uuid,