ultracart_rest_api_v2_typescript 4.1.35 → 4.1.37
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/.openapi-generator/FILES +1 -0
- package/README.md +4 -2
- package/dist/apis/ItemApi.d.ts +65 -1
- package/dist/apis/ItemApi.js +133 -0
- package/dist/models/ConversationAgentAuth.d.ts +6 -0
- package/dist/models/ConversationAgentAuth.js +2 -0
- package/dist/models/ConversationPbxAgent.d.ts +6 -0
- package/dist/models/ConversationPbxAgent.js +2 -0
- package/dist/models/ItemRelatedItem.d.ts +2 -0
- package/dist/models/ItemRelatedItem.js +3 -1
- package/dist/models/ItemShippingDistributionCenterResponse.d.ts +59 -0
- package/dist/models/ItemShippingDistributionCenterResponse.js +62 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/ItemApi.ts +160 -0
- package/src/models/ConversationAgentAuth.ts +8 -0
- package/src/models/ConversationPbxAgent.ts +8 -0
- package/src/models/ItemRelatedItem.ts +3 -1
- package/src/models/ItemShippingDistributionCenterResponse.ts +124 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -639,6 +639,7 @@ src/models/ItemShippingCase.ts
|
|
|
639
639
|
src/models/ItemShippingDestinationMarkup.ts
|
|
640
640
|
src/models/ItemShippingDestinationRestriction.ts
|
|
641
641
|
src/models/ItemShippingDistributionCenter.ts
|
|
642
|
+
src/models/ItemShippingDistributionCenterResponse.ts
|
|
642
643
|
src/models/ItemShippingMethod.ts
|
|
643
644
|
src/models/ItemShippingPackageRequirement.ts
|
|
644
645
|
src/models/ItemTag.ts
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# UltraCart Typescript SDK
|
|
2
|
-
## ultracart_rest_api_v2_typescript@4.1.
|
|
2
|
+
## ultracart_rest_api_v2_typescript@4.1.37
|
|
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.
|
|
9
|
+
npm install ultracart_rest_api_v2_typescript@4.1.37 --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.37 | 12/29/2025 | conversations - pbx agent AI flag |
|
|
89
|
+
| 4.1.36 | 12/22/2025 | conversation - agent auth worker token v2 |
|
|
88
90
|
| 4.1.35 | 12/02/2025 | caching option added to getCustomers, created new method searchCustomers |
|
|
89
91
|
| 4.1.34 | 12/02/2025 | coupons - added optional free specific shipping method to two coupons |
|
|
90
92
|
| 4.1.33 | 11/26/2025 | conversation - AI agent profile fields |
|
package/dist/apis/ItemApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { Item, ItemContentAttribute, ItemDigitalItem, ItemDigitalItemResponse, ItemDigitalItemsResponse, ItemInventorySnapshotResponse, ItemResponse, ItemReview, ItemReviewResponse, ItemReviewsResponse, ItemsRequest, ItemsResponse, PricingTiersResponse, TempMultimediaResponse } from '../models';
|
|
13
|
+
import { Item, ItemContentAttribute, ItemDigitalItem, ItemDigitalItemResponse, ItemDigitalItemsResponse, ItemInventorySnapshotResponse, ItemResponse, ItemReview, ItemReviewResponse, ItemReviewsResponse, ItemShippingDistributionCenter, ItemShippingDistributionCenterResponse, ItemsRequest, ItemsResponse, PricingTiersResponse, TempMultimediaResponse } from '../models';
|
|
14
14
|
export interface DeleteDigitalItemRequest {
|
|
15
15
|
digitalItemOid: number;
|
|
16
16
|
}
|
|
@@ -45,6 +45,12 @@ export interface GetItemByMerchantItemIdRequest {
|
|
|
45
45
|
expand?: string;
|
|
46
46
|
placeholders?: boolean;
|
|
47
47
|
}
|
|
48
|
+
export interface GetItemShippingDistributionCenterByCodeRequest {
|
|
49
|
+
merchantItemOid: number;
|
|
50
|
+
distributionCenterCode: string;
|
|
51
|
+
expand?: string;
|
|
52
|
+
placeholders?: boolean;
|
|
53
|
+
}
|
|
48
54
|
export interface GetItemsRequest {
|
|
49
55
|
parentCategoryId?: number;
|
|
50
56
|
parentCategoryPath?: string;
|
|
@@ -99,6 +105,11 @@ export interface UpdateItemRequest {
|
|
|
99
105
|
expand?: string;
|
|
100
106
|
placeholders?: boolean;
|
|
101
107
|
}
|
|
108
|
+
export interface UpdateItemShippingDistributionCenterByCodeRequest {
|
|
109
|
+
merchantItemOid: number;
|
|
110
|
+
distributionCenterCode: string;
|
|
111
|
+
itemShippingDistributionCenter: ItemShippingDistributionCenter;
|
|
112
|
+
}
|
|
102
113
|
export interface UpdateItemsRequest {
|
|
103
114
|
itemsRequest: ItemsRequest;
|
|
104
115
|
expand?: string;
|
|
@@ -255,6 +266,23 @@ export interface ItemApiInterface {
|
|
|
255
266
|
* Retrieve an item by item id
|
|
256
267
|
*/
|
|
257
268
|
getItemByMerchantItemId(requestParameters: GetItemByMerchantItemIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemResponse>;
|
|
269
|
+
/**
|
|
270
|
+
* Retrieve an item shipping distribution center.
|
|
271
|
+
* @summary Retrieve an item shipping distribution center
|
|
272
|
+
* @param {number} merchantItemOid The item oid to retrieve.
|
|
273
|
+
* @param {string} distributionCenterCode
|
|
274
|
+
* @param {string} [expand] The object expansion to perform on the result. See documentation for examples
|
|
275
|
+
* @param {boolean} [placeholders] Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
|
|
276
|
+
* @param {*} [options] Override http request option.
|
|
277
|
+
* @throws {RequiredError}
|
|
278
|
+
* @memberof ItemApiInterface
|
|
279
|
+
*/
|
|
280
|
+
getItemShippingDistributionCenterByCodeRaw(requestParameters: GetItemShippingDistributionCenterByCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ItemShippingDistributionCenterResponse>>;
|
|
281
|
+
/**
|
|
282
|
+
* Retrieve an item shipping distribution center.
|
|
283
|
+
* Retrieve an item shipping distribution center
|
|
284
|
+
*/
|
|
285
|
+
getItemShippingDistributionCenterByCode(requestParameters: GetItemShippingDistributionCenterByCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemShippingDistributionCenterResponse>;
|
|
258
286
|
/**
|
|
259
287
|
* Retrieves a group of items from the account. If no parameters are specified, all items will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
|
260
288
|
* @summary Retrieve items
|
|
@@ -430,6 +458,22 @@ export interface ItemApiInterface {
|
|
|
430
458
|
* Update an item
|
|
431
459
|
*/
|
|
432
460
|
updateItem(requestParameters: UpdateItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemResponse>;
|
|
461
|
+
/**
|
|
462
|
+
* Update an item shipping distribution center
|
|
463
|
+
* @summary Update an item shipping distribution center
|
|
464
|
+
* @param {number} merchantItemOid The item oid to update.
|
|
465
|
+
* @param {string} distributionCenterCode
|
|
466
|
+
* @param {ItemShippingDistributionCenter} itemShippingDistributionCenter Item shipping distribution center
|
|
467
|
+
* @param {*} [options] Override http request option.
|
|
468
|
+
* @throws {RequiredError}
|
|
469
|
+
* @memberof ItemApiInterface
|
|
470
|
+
*/
|
|
471
|
+
updateItemShippingDistributionCenterByCodeRaw(requestParameters: UpdateItemShippingDistributionCenterByCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
472
|
+
/**
|
|
473
|
+
* Update an item shipping distribution center
|
|
474
|
+
* Update an item shipping distribution center
|
|
475
|
+
*/
|
|
476
|
+
updateItemShippingDistributionCenterByCode(requestParameters: UpdateItemShippingDistributionCenterByCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
433
477
|
/**
|
|
434
478
|
* Update multiple item on the UltraCart account.
|
|
435
479
|
* @summary Update multiple items
|
|
@@ -572,6 +616,16 @@ export declare class ItemApi extends runtime.BaseAPI implements ItemApiInterface
|
|
|
572
616
|
* Retrieve an item by item id
|
|
573
617
|
*/
|
|
574
618
|
getItemByMerchantItemId(requestParameters: GetItemByMerchantItemIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemResponse>;
|
|
619
|
+
/**
|
|
620
|
+
* Retrieve an item shipping distribution center.
|
|
621
|
+
* Retrieve an item shipping distribution center
|
|
622
|
+
*/
|
|
623
|
+
getItemShippingDistributionCenterByCodeRaw(requestParameters: GetItemShippingDistributionCenterByCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ItemShippingDistributionCenterResponse>>;
|
|
624
|
+
/**
|
|
625
|
+
* Retrieve an item shipping distribution center.
|
|
626
|
+
* Retrieve an item shipping distribution center
|
|
627
|
+
*/
|
|
628
|
+
getItemShippingDistributionCenterByCode(requestParameters: GetItemShippingDistributionCenterByCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemShippingDistributionCenterResponse>;
|
|
575
629
|
/**
|
|
576
630
|
* Retrieves a group of items from the account. If no parameters are specified, all items will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
|
577
631
|
* Retrieve items
|
|
@@ -682,6 +736,16 @@ export declare class ItemApi extends runtime.BaseAPI implements ItemApiInterface
|
|
|
682
736
|
* Update an item
|
|
683
737
|
*/
|
|
684
738
|
updateItem(requestParameters: UpdateItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemResponse>;
|
|
739
|
+
/**
|
|
740
|
+
* Update an item shipping distribution center
|
|
741
|
+
* Update an item shipping distribution center
|
|
742
|
+
*/
|
|
743
|
+
updateItemShippingDistributionCenterByCodeRaw(requestParameters: UpdateItemShippingDistributionCenterByCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
744
|
+
/**
|
|
745
|
+
* Update an item shipping distribution center
|
|
746
|
+
* Update an item shipping distribution center
|
|
747
|
+
*/
|
|
748
|
+
updateItemShippingDistributionCenterByCode(requestParameters: UpdateItemShippingDistributionCenterByCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
685
749
|
/**
|
|
686
750
|
* Update multiple item on the UltraCart account.
|
|
687
751
|
* Update multiple items
|
package/dist/apis/ItemApi.js
CHANGED
|
@@ -628,6 +628,74 @@ var ItemApi = /** @class */ (function (_super) {
|
|
|
628
628
|
});
|
|
629
629
|
});
|
|
630
630
|
};
|
|
631
|
+
/**
|
|
632
|
+
* Retrieve an item shipping distribution center.
|
|
633
|
+
* Retrieve an item shipping distribution center
|
|
634
|
+
*/
|
|
635
|
+
ItemApi.prototype.getItemShippingDistributionCenterByCodeRaw = function (requestParameters, initOverrides) {
|
|
636
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
637
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
638
|
+
return __generator(this, function (_c) {
|
|
639
|
+
switch (_c.label) {
|
|
640
|
+
case 0:
|
|
641
|
+
if (requestParameters.merchantItemOid === null || requestParameters.merchantItemOid === undefined) {
|
|
642
|
+
throw new runtime.RequiredError('merchantItemOid', 'Required parameter requestParameters.merchantItemOid was null or undefined when calling getItemShippingDistributionCenterByCode.');
|
|
643
|
+
}
|
|
644
|
+
if (requestParameters.distributionCenterCode === null || requestParameters.distributionCenterCode === undefined) {
|
|
645
|
+
throw new runtime.RequiredError('distributionCenterCode', 'Required parameter requestParameters.distributionCenterCode was null or undefined when calling getItemShippingDistributionCenterByCode.');
|
|
646
|
+
}
|
|
647
|
+
queryParameters = {};
|
|
648
|
+
if (requestParameters.expand !== undefined) {
|
|
649
|
+
queryParameters['_expand'] = requestParameters.expand;
|
|
650
|
+
}
|
|
651
|
+
if (requestParameters.placeholders !== undefined) {
|
|
652
|
+
queryParameters['_placeholders'] = requestParameters.placeholders;
|
|
653
|
+
}
|
|
654
|
+
headerParameters = {};
|
|
655
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
656
|
+
// oauth required
|
|
657
|
+
_a = headerParameters;
|
|
658
|
+
_b = "Authorization";
|
|
659
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["item_read"])];
|
|
660
|
+
case 1:
|
|
661
|
+
// oauth required
|
|
662
|
+
_a[_b] = _c.sent();
|
|
663
|
+
_c.label = 2;
|
|
664
|
+
case 2:
|
|
665
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
666
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
667
|
+
}
|
|
668
|
+
return [4 /*yield*/, this.request({
|
|
669
|
+
path: "/item/items/{merchant_item_oid}/shipping/distribution_centers/by_code/{distribution_center_code}".replace("{".concat("merchant_item_oid", "}"), encodeURIComponent(String(requestParameters.merchantItemOid))).replace("{".concat("distribution_center_code", "}"), encodeURIComponent(String(requestParameters.distributionCenterCode))),
|
|
670
|
+
method: 'GET',
|
|
671
|
+
headers: headerParameters,
|
|
672
|
+
query: queryParameters,
|
|
673
|
+
}, initOverrides)];
|
|
674
|
+
case 3:
|
|
675
|
+
response = _c.sent();
|
|
676
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ItemShippingDistributionCenterResponseFromJSON)(jsonValue); })];
|
|
677
|
+
}
|
|
678
|
+
});
|
|
679
|
+
});
|
|
680
|
+
};
|
|
681
|
+
/**
|
|
682
|
+
* Retrieve an item shipping distribution center.
|
|
683
|
+
* Retrieve an item shipping distribution center
|
|
684
|
+
*/
|
|
685
|
+
ItemApi.prototype.getItemShippingDistributionCenterByCode = function (requestParameters, initOverrides) {
|
|
686
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
687
|
+
var response;
|
|
688
|
+
return __generator(this, function (_a) {
|
|
689
|
+
switch (_a.label) {
|
|
690
|
+
case 0: return [4 /*yield*/, this.getItemShippingDistributionCenterByCodeRaw(requestParameters, initOverrides)];
|
|
691
|
+
case 1:
|
|
692
|
+
response = _a.sent();
|
|
693
|
+
return [4 /*yield*/, response.value()];
|
|
694
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
695
|
+
}
|
|
696
|
+
});
|
|
697
|
+
});
|
|
698
|
+
};
|
|
631
699
|
/**
|
|
632
700
|
* Retrieves a group of items from the account. If no parameters are specified, all items will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
|
633
701
|
* Retrieve items
|
|
@@ -1353,6 +1421,71 @@ var ItemApi = /** @class */ (function (_super) {
|
|
|
1353
1421
|
});
|
|
1354
1422
|
});
|
|
1355
1423
|
};
|
|
1424
|
+
/**
|
|
1425
|
+
* Update an item shipping distribution center
|
|
1426
|
+
* Update an item shipping distribution center
|
|
1427
|
+
*/
|
|
1428
|
+
ItemApi.prototype.updateItemShippingDistributionCenterByCodeRaw = function (requestParameters, initOverrides) {
|
|
1429
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1430
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
1431
|
+
return __generator(this, function (_c) {
|
|
1432
|
+
switch (_c.label) {
|
|
1433
|
+
case 0:
|
|
1434
|
+
if (requestParameters.merchantItemOid === null || requestParameters.merchantItemOid === undefined) {
|
|
1435
|
+
throw new runtime.RequiredError('merchantItemOid', 'Required parameter requestParameters.merchantItemOid was null or undefined when calling updateItemShippingDistributionCenterByCode.');
|
|
1436
|
+
}
|
|
1437
|
+
if (requestParameters.distributionCenterCode === null || requestParameters.distributionCenterCode === undefined) {
|
|
1438
|
+
throw new runtime.RequiredError('distributionCenterCode', 'Required parameter requestParameters.distributionCenterCode was null or undefined when calling updateItemShippingDistributionCenterByCode.');
|
|
1439
|
+
}
|
|
1440
|
+
if (requestParameters.itemShippingDistributionCenter === null || requestParameters.itemShippingDistributionCenter === undefined) {
|
|
1441
|
+
throw new runtime.RequiredError('itemShippingDistributionCenter', 'Required parameter requestParameters.itemShippingDistributionCenter was null or undefined when calling updateItemShippingDistributionCenterByCode.');
|
|
1442
|
+
}
|
|
1443
|
+
queryParameters = {};
|
|
1444
|
+
headerParameters = {};
|
|
1445
|
+
headerParameters['Content-Type'] = 'application/json; charset=UTF-8';
|
|
1446
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
1447
|
+
// oauth required
|
|
1448
|
+
_a = headerParameters;
|
|
1449
|
+
_b = "Authorization";
|
|
1450
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["item_write"])];
|
|
1451
|
+
case 1:
|
|
1452
|
+
// oauth required
|
|
1453
|
+
_a[_b] = _c.sent();
|
|
1454
|
+
_c.label = 2;
|
|
1455
|
+
case 2:
|
|
1456
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1457
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
1458
|
+
}
|
|
1459
|
+
return [4 /*yield*/, this.request({
|
|
1460
|
+
path: "/item/items/{merchant_item_oid}/shipping/distribution_centers/by_code/{distribution_center_code}".replace("{".concat("merchant_item_oid", "}"), encodeURIComponent(String(requestParameters.merchantItemOid))).replace("{".concat("distribution_center_code", "}"), encodeURIComponent(String(requestParameters.distributionCenterCode))),
|
|
1461
|
+
method: 'PUT',
|
|
1462
|
+
headers: headerParameters,
|
|
1463
|
+
query: queryParameters,
|
|
1464
|
+
body: (0, models_1.ItemShippingDistributionCenterToJSON)(requestParameters.itemShippingDistributionCenter),
|
|
1465
|
+
}, initOverrides)];
|
|
1466
|
+
case 3:
|
|
1467
|
+
response = _c.sent();
|
|
1468
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
1469
|
+
}
|
|
1470
|
+
});
|
|
1471
|
+
});
|
|
1472
|
+
};
|
|
1473
|
+
/**
|
|
1474
|
+
* Update an item shipping distribution center
|
|
1475
|
+
* Update an item shipping distribution center
|
|
1476
|
+
*/
|
|
1477
|
+
ItemApi.prototype.updateItemShippingDistributionCenterByCode = function (requestParameters, initOverrides) {
|
|
1478
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1479
|
+
return __generator(this, function (_a) {
|
|
1480
|
+
switch (_a.label) {
|
|
1481
|
+
case 0: return [4 /*yield*/, this.updateItemShippingDistributionCenterByCodeRaw(requestParameters, initOverrides)];
|
|
1482
|
+
case 1:
|
|
1483
|
+
_a.sent();
|
|
1484
|
+
return [2 /*return*/];
|
|
1485
|
+
}
|
|
1486
|
+
});
|
|
1487
|
+
});
|
|
1488
|
+
};
|
|
1356
1489
|
/**
|
|
1357
1490
|
* Update multiple item on the UltraCart account.
|
|
1358
1491
|
* Update multiple items
|
|
@@ -88,6 +88,12 @@ export interface ConversationAgentAuth {
|
|
|
88
88
|
* @memberof ConversationAgentAuth
|
|
89
89
|
*/
|
|
90
90
|
pbx_worker_token?: string;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @type {string}
|
|
94
|
+
* @memberof ConversationAgentAuth
|
|
95
|
+
*/
|
|
96
|
+
pbx_worker_token_v2?: string;
|
|
91
97
|
/**
|
|
92
98
|
*
|
|
93
99
|
* @type {Array<ConversationTwilioAccount>}
|
|
@@ -45,6 +45,7 @@ function ConversationAgentAuthFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
45
45
|
'pbx_voice_identity': !(0, runtime_1.exists)(json, 'pbx_voice_identity') ? undefined : json['pbx_voice_identity'],
|
|
46
46
|
'pbx_voice_token': !(0, runtime_1.exists)(json, 'pbx_voice_token') ? undefined : json['pbx_voice_token'],
|
|
47
47
|
'pbx_worker_token': !(0, runtime_1.exists)(json, 'pbx_worker_token') ? undefined : json['pbx_worker_token'],
|
|
48
|
+
'pbx_worker_token_v2': !(0, runtime_1.exists)(json, 'pbx_worker_token_v2') ? undefined : json['pbx_worker_token_v2'],
|
|
48
49
|
'twilio_accounts': !(0, runtime_1.exists)(json, 'twilio_accounts') ? undefined : (json['twilio_accounts'].map(ConversationTwilioAccount_1.ConversationTwilioAccountFromJSON)),
|
|
49
50
|
'user_id': !(0, runtime_1.exists)(json, 'user_id') ? undefined : json['user_id'],
|
|
50
51
|
'websocket_url': !(0, runtime_1.exists)(json, 'websocket_url') ? undefined : json['websocket_url'],
|
|
@@ -71,6 +72,7 @@ function ConversationAgentAuthToJSON(value) {
|
|
|
71
72
|
'pbx_voice_identity': value.pbx_voice_identity,
|
|
72
73
|
'pbx_voice_token': value.pbx_voice_token,
|
|
73
74
|
'pbx_worker_token': value.pbx_worker_token,
|
|
75
|
+
'pbx_worker_token_v2': value.pbx_worker_token_v2,
|
|
74
76
|
'twilio_accounts': value.twilio_accounts === undefined ? undefined : (value.twilio_accounts.map(ConversationTwilioAccount_1.ConversationTwilioAccountToJSON)),
|
|
75
77
|
'user_id': value.user_id,
|
|
76
78
|
'websocket_url': value.websocket_url,
|
|
@@ -15,6 +15,12 @@
|
|
|
15
15
|
* @interface ConversationPbxAgent
|
|
16
16
|
*/
|
|
17
17
|
export interface ConversationPbxAgent {
|
|
18
|
+
/**
|
|
19
|
+
* Flag to indicate if the agent is AI
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof ConversationPbxAgent
|
|
22
|
+
*/
|
|
23
|
+
ai?: boolean;
|
|
18
24
|
/**
|
|
19
25
|
* Cellphone number of agent in E.164 format
|
|
20
26
|
* @type {string}
|
|
@@ -32,6 +32,7 @@ function ConversationPbxAgentFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
32
32
|
return json;
|
|
33
33
|
}
|
|
34
34
|
return {
|
|
35
|
+
'ai': !(0, runtime_1.exists)(json, 'ai') ? undefined : json['ai'],
|
|
35
36
|
'cellphone': !(0, runtime_1.exists)(json, 'cellphone') ? undefined : json['cellphone'],
|
|
36
37
|
'conversation_pbx_agent_uuid': !(0, runtime_1.exists)(json, 'conversation_pbx_agent_uuid') ? undefined : json['conversation_pbx_agent_uuid'],
|
|
37
38
|
'extension': !(0, runtime_1.exists)(json, 'extension') ? undefined : json['extension'],
|
|
@@ -59,6 +60,7 @@ function ConversationPbxAgentToJSON(value) {
|
|
|
59
60
|
return null;
|
|
60
61
|
}
|
|
61
62
|
return {
|
|
63
|
+
'ai': value.ai,
|
|
62
64
|
'cellphone': value.cellphone,
|
|
63
65
|
'conversation_pbx_agent_uuid': value.conversation_pbx_agent_uuid,
|
|
64
66
|
'extension': value.extension,
|
|
@@ -40,6 +40,8 @@ export interface ItemRelatedItem {
|
|
|
40
40
|
export declare const ItemRelatedItemTypeEnum: {
|
|
41
41
|
readonly System: "System";
|
|
42
42
|
readonly UserDefined: "UserDefined";
|
|
43
|
+
readonly Addon: "Addon";
|
|
44
|
+
readonly Complementary: "Complementary";
|
|
43
45
|
};
|
|
44
46
|
export type ItemRelatedItemTypeEnum = typeof ItemRelatedItemTypeEnum[keyof typeof ItemRelatedItemTypeEnum];
|
|
45
47
|
/**
|
|
@@ -20,7 +20,9 @@ var runtime_1 = require("../runtime");
|
|
|
20
20
|
*/
|
|
21
21
|
exports.ItemRelatedItemTypeEnum = {
|
|
22
22
|
System: 'System',
|
|
23
|
-
UserDefined: 'UserDefined'
|
|
23
|
+
UserDefined: 'UserDefined',
|
|
24
|
+
Addon: 'Addon',
|
|
25
|
+
Complementary: 'Complementary'
|
|
24
26
|
};
|
|
25
27
|
/**
|
|
26
28
|
* Check if a given object implements the ItemRelatedItem interface.
|
|
@@ -0,0 +1,59 @@
|
|
|
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 { ItemShippingDistributionCenter } from './ItemShippingDistributionCenter';
|
|
13
|
+
import { ModelError } from './ModelError';
|
|
14
|
+
import { ResponseMetadata } from './ResponseMetadata';
|
|
15
|
+
import { Warning } from './Warning';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ItemShippingDistributionCenterResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface ItemShippingDistributionCenterResponse {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {ModelError}
|
|
25
|
+
* @memberof ItemShippingDistributionCenterResponse
|
|
26
|
+
*/
|
|
27
|
+
error?: ModelError;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {ItemShippingDistributionCenter}
|
|
31
|
+
* @memberof ItemShippingDistributionCenterResponse
|
|
32
|
+
*/
|
|
33
|
+
itemShippingDistributionCenter?: ItemShippingDistributionCenter;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {ResponseMetadata}
|
|
37
|
+
* @memberof ItemShippingDistributionCenterResponse
|
|
38
|
+
*/
|
|
39
|
+
metadata?: ResponseMetadata;
|
|
40
|
+
/**
|
|
41
|
+
* Indicates if API call was successful
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof ItemShippingDistributionCenterResponse
|
|
44
|
+
*/
|
|
45
|
+
success?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {Warning}
|
|
49
|
+
* @memberof ItemShippingDistributionCenterResponse
|
|
50
|
+
*/
|
|
51
|
+
warning?: Warning;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Check if a given object implements the ItemShippingDistributionCenterResponse interface.
|
|
55
|
+
*/
|
|
56
|
+
export declare function instanceOfItemShippingDistributionCenterResponse(value: object): boolean;
|
|
57
|
+
export declare function ItemShippingDistributionCenterResponseFromJSON(json: any): ItemShippingDistributionCenterResponse;
|
|
58
|
+
export declare function ItemShippingDistributionCenterResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ItemShippingDistributionCenterResponse;
|
|
59
|
+
export declare function ItemShippingDistributionCenterResponseToJSON(value?: ItemShippingDistributionCenterResponse | null): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
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.ItemShippingDistributionCenterResponseToJSON = exports.ItemShippingDistributionCenterResponseFromJSONTyped = exports.ItemShippingDistributionCenterResponseFromJSON = exports.instanceOfItemShippingDistributionCenterResponse = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
var ItemShippingDistributionCenter_1 = require("./ItemShippingDistributionCenter");
|
|
19
|
+
var ModelError_1 = require("./ModelError");
|
|
20
|
+
var ResponseMetadata_1 = require("./ResponseMetadata");
|
|
21
|
+
var Warning_1 = require("./Warning");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the ItemShippingDistributionCenterResponse interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfItemShippingDistributionCenterResponse(value) {
|
|
26
|
+
var isInstance = true;
|
|
27
|
+
return isInstance;
|
|
28
|
+
}
|
|
29
|
+
exports.instanceOfItemShippingDistributionCenterResponse = instanceOfItemShippingDistributionCenterResponse;
|
|
30
|
+
function ItemShippingDistributionCenterResponseFromJSON(json) {
|
|
31
|
+
return ItemShippingDistributionCenterResponseFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
exports.ItemShippingDistributionCenterResponseFromJSON = ItemShippingDistributionCenterResponseFromJSON;
|
|
34
|
+
function ItemShippingDistributionCenterResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if ((json === undefined) || (json === null)) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'error': !(0, runtime_1.exists)(json, 'error') ? undefined : (0, ModelError_1.ModelErrorFromJSON)(json['error']),
|
|
40
|
+
'itemShippingDistributionCenter': !(0, runtime_1.exists)(json, 'itemShippingDistributionCenter') ? undefined : (0, ItemShippingDistributionCenter_1.ItemShippingDistributionCenterFromJSON)(json['itemShippingDistributionCenter']),
|
|
41
|
+
'metadata': !(0, runtime_1.exists)(json, 'metadata') ? undefined : (0, ResponseMetadata_1.ResponseMetadataFromJSON)(json['metadata']),
|
|
42
|
+
'success': !(0, runtime_1.exists)(json, 'success') ? undefined : json['success'],
|
|
43
|
+
'warning': !(0, runtime_1.exists)(json, 'warning') ? undefined : (0, Warning_1.WarningFromJSON)(json['warning']),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
exports.ItemShippingDistributionCenterResponseFromJSONTyped = ItemShippingDistributionCenterResponseFromJSONTyped;
|
|
47
|
+
function ItemShippingDistributionCenterResponseToJSON(value) {
|
|
48
|
+
if (value === undefined) {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
if (value === null) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'error': (0, ModelError_1.ModelErrorToJSON)(value.error),
|
|
56
|
+
'itemShippingDistributionCenter': (0, ItemShippingDistributionCenter_1.ItemShippingDistributionCenterToJSON)(value.itemShippingDistributionCenter),
|
|
57
|
+
'metadata': (0, ResponseMetadata_1.ResponseMetadataToJSON)(value.metadata),
|
|
58
|
+
'success': value.success,
|
|
59
|
+
'warning': (0, Warning_1.WarningToJSON)(value.warning),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
exports.ItemShippingDistributionCenterResponseToJSON = ItemShippingDistributionCenterResponseToJSON;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -613,6 +613,7 @@ export * from './ItemShippingCase';
|
|
|
613
613
|
export * from './ItemShippingDestinationMarkup';
|
|
614
614
|
export * from './ItemShippingDestinationRestriction';
|
|
615
615
|
export * from './ItemShippingDistributionCenter';
|
|
616
|
+
export * from './ItemShippingDistributionCenterResponse';
|
|
616
617
|
export * from './ItemShippingMethod';
|
|
617
618
|
export * from './ItemShippingPackageRequirement';
|
|
618
619
|
export * from './ItemTag';
|
package/dist/models/index.js
CHANGED
|
@@ -631,6 +631,7 @@ __exportStar(require("./ItemShippingCase"), exports);
|
|
|
631
631
|
__exportStar(require("./ItemShippingDestinationMarkup"), exports);
|
|
632
632
|
__exportStar(require("./ItemShippingDestinationRestriction"), exports);
|
|
633
633
|
__exportStar(require("./ItemShippingDistributionCenter"), exports);
|
|
634
|
+
__exportStar(require("./ItemShippingDistributionCenterResponse"), exports);
|
|
634
635
|
__exportStar(require("./ItemShippingMethod"), exports);
|
|
635
636
|
__exportStar(require("./ItemShippingPackageRequirement"), exports);
|
|
636
637
|
__exportStar(require("./ItemTag"), exports);
|
package/package.json
CHANGED
package/src/apis/ItemApi.ts
CHANGED
|
@@ -48,6 +48,12 @@ import {
|
|
|
48
48
|
ItemReviewsResponse,
|
|
49
49
|
ItemReviewsResponseFromJSON,
|
|
50
50
|
ItemReviewsResponseToJSON,
|
|
51
|
+
ItemShippingDistributionCenter,
|
|
52
|
+
ItemShippingDistributionCenterFromJSON,
|
|
53
|
+
ItemShippingDistributionCenterToJSON,
|
|
54
|
+
ItemShippingDistributionCenterResponse,
|
|
55
|
+
ItemShippingDistributionCenterResponseFromJSON,
|
|
56
|
+
ItemShippingDistributionCenterResponseToJSON,
|
|
51
57
|
ItemsRequest,
|
|
52
58
|
ItemsRequestFromJSON,
|
|
53
59
|
ItemsRequestToJSON,
|
|
@@ -104,6 +110,13 @@ export interface GetItemByMerchantItemIdRequest {
|
|
|
104
110
|
placeholders?: boolean;
|
|
105
111
|
}
|
|
106
112
|
|
|
113
|
+
export interface GetItemShippingDistributionCenterByCodeRequest {
|
|
114
|
+
merchantItemOid: number;
|
|
115
|
+
distributionCenterCode: string;
|
|
116
|
+
expand?: string;
|
|
117
|
+
placeholders?: boolean;
|
|
118
|
+
}
|
|
119
|
+
|
|
107
120
|
export interface GetItemsRequest {
|
|
108
121
|
parentCategoryId?: number;
|
|
109
122
|
parentCategoryPath?: string;
|
|
@@ -169,6 +182,12 @@ export interface UpdateItemRequest {
|
|
|
169
182
|
placeholders?: boolean;
|
|
170
183
|
}
|
|
171
184
|
|
|
185
|
+
export interface UpdateItemShippingDistributionCenterByCodeRequest {
|
|
186
|
+
merchantItemOid: number;
|
|
187
|
+
distributionCenterCode: string;
|
|
188
|
+
itemShippingDistributionCenter: ItemShippingDistributionCenter;
|
|
189
|
+
}
|
|
190
|
+
|
|
172
191
|
export interface UpdateItemsRequest {
|
|
173
192
|
itemsRequest: ItemsRequest;
|
|
174
193
|
expand?: string;
|
|
@@ -346,6 +365,25 @@ export interface ItemApiInterface {
|
|
|
346
365
|
*/
|
|
347
366
|
getItemByMerchantItemId(requestParameters: GetItemByMerchantItemIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemResponse>;
|
|
348
367
|
|
|
368
|
+
/**
|
|
369
|
+
* Retrieve an item shipping distribution center.
|
|
370
|
+
* @summary Retrieve an item shipping distribution center
|
|
371
|
+
* @param {number} merchantItemOid The item oid to retrieve.
|
|
372
|
+
* @param {string} distributionCenterCode
|
|
373
|
+
* @param {string} [expand] The object expansion to perform on the result. See documentation for examples
|
|
374
|
+
* @param {boolean} [placeholders] Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
|
|
375
|
+
* @param {*} [options] Override http request option.
|
|
376
|
+
* @throws {RequiredError}
|
|
377
|
+
* @memberof ItemApiInterface
|
|
378
|
+
*/
|
|
379
|
+
getItemShippingDistributionCenterByCodeRaw(requestParameters: GetItemShippingDistributionCenterByCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ItemShippingDistributionCenterResponse>>;
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Retrieve an item shipping distribution center.
|
|
383
|
+
* Retrieve an item shipping distribution center
|
|
384
|
+
*/
|
|
385
|
+
getItemShippingDistributionCenterByCode(requestParameters: GetItemShippingDistributionCenterByCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemShippingDistributionCenterResponse>;
|
|
386
|
+
|
|
349
387
|
/**
|
|
350
388
|
* Retrieves a group of items from the account. If no parameters are specified, all items will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
|
351
389
|
* @summary Retrieve items
|
|
@@ -543,6 +581,24 @@ export interface ItemApiInterface {
|
|
|
543
581
|
*/
|
|
544
582
|
updateItem(requestParameters: UpdateItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemResponse>;
|
|
545
583
|
|
|
584
|
+
/**
|
|
585
|
+
* Update an item shipping distribution center
|
|
586
|
+
* @summary Update an item shipping distribution center
|
|
587
|
+
* @param {number} merchantItemOid The item oid to update.
|
|
588
|
+
* @param {string} distributionCenterCode
|
|
589
|
+
* @param {ItemShippingDistributionCenter} itemShippingDistributionCenter Item shipping distribution center
|
|
590
|
+
* @param {*} [options] Override http request option.
|
|
591
|
+
* @throws {RequiredError}
|
|
592
|
+
* @memberof ItemApiInterface
|
|
593
|
+
*/
|
|
594
|
+
updateItemShippingDistributionCenterByCodeRaw(requestParameters: UpdateItemShippingDistributionCenterByCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Update an item shipping distribution center
|
|
598
|
+
* Update an item shipping distribution center
|
|
599
|
+
*/
|
|
600
|
+
updateItemShippingDistributionCenterByCode(requestParameters: UpdateItemShippingDistributionCenterByCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
601
|
+
|
|
546
602
|
/**
|
|
547
603
|
* Update multiple item on the UltraCart account.
|
|
548
604
|
* @summary Update multiple items
|
|
@@ -1005,6 +1061,59 @@ export class ItemApi extends runtime.BaseAPI implements ItemApiInterface {
|
|
|
1005
1061
|
return await response.value();
|
|
1006
1062
|
}
|
|
1007
1063
|
|
|
1064
|
+
/**
|
|
1065
|
+
* Retrieve an item shipping distribution center.
|
|
1066
|
+
* Retrieve an item shipping distribution center
|
|
1067
|
+
*/
|
|
1068
|
+
async getItemShippingDistributionCenterByCodeRaw(requestParameters: GetItemShippingDistributionCenterByCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ItemShippingDistributionCenterResponse>> {
|
|
1069
|
+
if (requestParameters.merchantItemOid === null || requestParameters.merchantItemOid === undefined) {
|
|
1070
|
+
throw new runtime.RequiredError('merchantItemOid','Required parameter requestParameters.merchantItemOid was null or undefined when calling getItemShippingDistributionCenterByCode.');
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
if (requestParameters.distributionCenterCode === null || requestParameters.distributionCenterCode === undefined) {
|
|
1074
|
+
throw new runtime.RequiredError('distributionCenterCode','Required parameter requestParameters.distributionCenterCode was null or undefined when calling getItemShippingDistributionCenterByCode.');
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
const queryParameters: any = {};
|
|
1078
|
+
|
|
1079
|
+
if (requestParameters.expand !== undefined) {
|
|
1080
|
+
queryParameters['_expand'] = requestParameters.expand;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
if (requestParameters.placeholders !== undefined) {
|
|
1084
|
+
queryParameters['_placeholders'] = requestParameters.placeholders;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1088
|
+
|
|
1089
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1090
|
+
// oauth required
|
|
1091
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["item_read"]);
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1095
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
const response = await this.request({
|
|
1099
|
+
path: `/item/items/{merchant_item_oid}/shipping/distribution_centers/by_code/{distribution_center_code}`.replace(`{${"merchant_item_oid"}}`, encodeURIComponent(String(requestParameters.merchantItemOid))).replace(`{${"distribution_center_code"}}`, encodeURIComponent(String(requestParameters.distributionCenterCode))),
|
|
1100
|
+
method: 'GET',
|
|
1101
|
+
headers: headerParameters,
|
|
1102
|
+
query: queryParameters,
|
|
1103
|
+
}, initOverrides);
|
|
1104
|
+
|
|
1105
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ItemShippingDistributionCenterResponseFromJSON(jsonValue));
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
/**
|
|
1109
|
+
* Retrieve an item shipping distribution center.
|
|
1110
|
+
* Retrieve an item shipping distribution center
|
|
1111
|
+
*/
|
|
1112
|
+
async getItemShippingDistributionCenterByCode(requestParameters: GetItemShippingDistributionCenterByCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ItemShippingDistributionCenterResponse> {
|
|
1113
|
+
const response = await this.getItemShippingDistributionCenterByCodeRaw(requestParameters, initOverrides);
|
|
1114
|
+
return await response.value();
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1008
1117
|
/**
|
|
1009
1118
|
* Retrieves a group of items from the account. If no parameters are specified, all items will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
|
1010
1119
|
* Retrieve items
|
|
@@ -1557,6 +1666,57 @@ export class ItemApi extends runtime.BaseAPI implements ItemApiInterface {
|
|
|
1557
1666
|
return await response.value();
|
|
1558
1667
|
}
|
|
1559
1668
|
|
|
1669
|
+
/**
|
|
1670
|
+
* Update an item shipping distribution center
|
|
1671
|
+
* Update an item shipping distribution center
|
|
1672
|
+
*/
|
|
1673
|
+
async updateItemShippingDistributionCenterByCodeRaw(requestParameters: UpdateItemShippingDistributionCenterByCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
1674
|
+
if (requestParameters.merchantItemOid === null || requestParameters.merchantItemOid === undefined) {
|
|
1675
|
+
throw new runtime.RequiredError('merchantItemOid','Required parameter requestParameters.merchantItemOid was null or undefined when calling updateItemShippingDistributionCenterByCode.');
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
if (requestParameters.distributionCenterCode === null || requestParameters.distributionCenterCode === undefined) {
|
|
1679
|
+
throw new runtime.RequiredError('distributionCenterCode','Required parameter requestParameters.distributionCenterCode was null or undefined when calling updateItemShippingDistributionCenterByCode.');
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
if (requestParameters.itemShippingDistributionCenter === null || requestParameters.itemShippingDistributionCenter === undefined) {
|
|
1683
|
+
throw new runtime.RequiredError('itemShippingDistributionCenter','Required parameter requestParameters.itemShippingDistributionCenter was null or undefined when calling updateItemShippingDistributionCenterByCode.');
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
const queryParameters: any = {};
|
|
1687
|
+
|
|
1688
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1689
|
+
|
|
1690
|
+
headerParameters['Content-Type'] = 'application/json; charset=UTF-8';
|
|
1691
|
+
|
|
1692
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1693
|
+
// oauth required
|
|
1694
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["item_write"]);
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1698
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
const response = await this.request({
|
|
1702
|
+
path: `/item/items/{merchant_item_oid}/shipping/distribution_centers/by_code/{distribution_center_code}`.replace(`{${"merchant_item_oid"}}`, encodeURIComponent(String(requestParameters.merchantItemOid))).replace(`{${"distribution_center_code"}}`, encodeURIComponent(String(requestParameters.distributionCenterCode))),
|
|
1703
|
+
method: 'PUT',
|
|
1704
|
+
headers: headerParameters,
|
|
1705
|
+
query: queryParameters,
|
|
1706
|
+
body: ItemShippingDistributionCenterToJSON(requestParameters.itemShippingDistributionCenter),
|
|
1707
|
+
}, initOverrides);
|
|
1708
|
+
|
|
1709
|
+
return new runtime.VoidApiResponse(response);
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
/**
|
|
1713
|
+
* Update an item shipping distribution center
|
|
1714
|
+
* Update an item shipping distribution center
|
|
1715
|
+
*/
|
|
1716
|
+
async updateItemShippingDistributionCenterByCode(requestParameters: UpdateItemShippingDistributionCenterByCodeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
1717
|
+
await this.updateItemShippingDistributionCenterByCodeRaw(requestParameters, initOverrides);
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1560
1720
|
/**
|
|
1561
1721
|
* Update multiple item on the UltraCart account.
|
|
1562
1722
|
* Update multiple items
|
|
@@ -98,6 +98,12 @@ export interface ConversationAgentAuth {
|
|
|
98
98
|
* @memberof ConversationAgentAuth
|
|
99
99
|
*/
|
|
100
100
|
pbx_worker_token?: string;
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @type {string}
|
|
104
|
+
* @memberof ConversationAgentAuth
|
|
105
|
+
*/
|
|
106
|
+
pbx_worker_token_v2?: string;
|
|
101
107
|
/**
|
|
102
108
|
*
|
|
103
109
|
* @type {Array<ConversationTwilioAccount>}
|
|
@@ -151,6 +157,7 @@ export function ConversationAgentAuthFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
151
157
|
'pbx_voice_identity': !exists(json, 'pbx_voice_identity') ? undefined : json['pbx_voice_identity'],
|
|
152
158
|
'pbx_voice_token': !exists(json, 'pbx_voice_token') ? undefined : json['pbx_voice_token'],
|
|
153
159
|
'pbx_worker_token': !exists(json, 'pbx_worker_token') ? undefined : json['pbx_worker_token'],
|
|
160
|
+
'pbx_worker_token_v2': !exists(json, 'pbx_worker_token_v2') ? undefined : json['pbx_worker_token_v2'],
|
|
154
161
|
'twilio_accounts': !exists(json, 'twilio_accounts') ? undefined : ((json['twilio_accounts'] as Array<any>).map(ConversationTwilioAccountFromJSON)),
|
|
155
162
|
'user_id': !exists(json, 'user_id') ? undefined : json['user_id'],
|
|
156
163
|
'websocket_url': !exists(json, 'websocket_url') ? undefined : json['websocket_url'],
|
|
@@ -178,6 +185,7 @@ export function ConversationAgentAuthToJSON(value?: ConversationAgentAuth | null
|
|
|
178
185
|
'pbx_voice_identity': value.pbx_voice_identity,
|
|
179
186
|
'pbx_voice_token': value.pbx_voice_token,
|
|
180
187
|
'pbx_worker_token': value.pbx_worker_token,
|
|
188
|
+
'pbx_worker_token_v2': value.pbx_worker_token_v2,
|
|
181
189
|
'twilio_accounts': value.twilio_accounts === undefined ? undefined : ((value.twilio_accounts as Array<any>).map(ConversationTwilioAccountToJSON)),
|
|
182
190
|
'user_id': value.user_id,
|
|
183
191
|
'websocket_url': value.websocket_url,
|
|
@@ -19,6 +19,12 @@ import { exists, mapValues } from '../runtime';
|
|
|
19
19
|
* @interface ConversationPbxAgent
|
|
20
20
|
*/
|
|
21
21
|
export interface ConversationPbxAgent {
|
|
22
|
+
/**
|
|
23
|
+
* Flag to indicate if the agent is AI
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @memberof ConversationPbxAgent
|
|
26
|
+
*/
|
|
27
|
+
ai?: boolean;
|
|
22
28
|
/**
|
|
23
29
|
* Cellphone number of agent in E.164 format
|
|
24
30
|
* @type {string}
|
|
@@ -138,6 +144,7 @@ export function ConversationPbxAgentFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
138
144
|
}
|
|
139
145
|
return {
|
|
140
146
|
|
|
147
|
+
'ai': !exists(json, 'ai') ? undefined : json['ai'],
|
|
141
148
|
'cellphone': !exists(json, 'cellphone') ? undefined : json['cellphone'],
|
|
142
149
|
'conversation_pbx_agent_uuid': !exists(json, 'conversation_pbx_agent_uuid') ? undefined : json['conversation_pbx_agent_uuid'],
|
|
143
150
|
'extension': !exists(json, 'extension') ? undefined : json['extension'],
|
|
@@ -166,6 +173,7 @@ export function ConversationPbxAgentToJSON(value?: ConversationPbxAgent | null):
|
|
|
166
173
|
}
|
|
167
174
|
return {
|
|
168
175
|
|
|
176
|
+
'ai': value.ai,
|
|
169
177
|
'cellphone': value.cellphone,
|
|
170
178
|
'conversation_pbx_agent_uuid': value.conversation_pbx_agent_uuid,
|
|
171
179
|
'extension': value.extension,
|
|
@@ -46,7 +46,9 @@ export interface ItemRelatedItem {
|
|
|
46
46
|
*/
|
|
47
47
|
export const ItemRelatedItemTypeEnum = {
|
|
48
48
|
System: 'System',
|
|
49
|
-
UserDefined: 'UserDefined'
|
|
49
|
+
UserDefined: 'UserDefined',
|
|
50
|
+
Addon: 'Addon',
|
|
51
|
+
Complementary: 'Complementary'
|
|
50
52
|
} as const;
|
|
51
53
|
export type ItemRelatedItemTypeEnum = typeof ItemRelatedItemTypeEnum[keyof typeof ItemRelatedItemTypeEnum];
|
|
52
54
|
|
|
@@ -0,0 +1,124 @@
|
|
|
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
|
+
ItemShippingDistributionCenter,
|
|
18
|
+
ItemShippingDistributionCenterFromJSON,
|
|
19
|
+
ItemShippingDistributionCenterFromJSONTyped,
|
|
20
|
+
ItemShippingDistributionCenterToJSON,
|
|
21
|
+
} from './ItemShippingDistributionCenter';
|
|
22
|
+
import {
|
|
23
|
+
ModelError,
|
|
24
|
+
ModelErrorFromJSON,
|
|
25
|
+
ModelErrorFromJSONTyped,
|
|
26
|
+
ModelErrorToJSON,
|
|
27
|
+
} from './ModelError';
|
|
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 ItemShippingDistributionCenterResponse
|
|
45
|
+
*/
|
|
46
|
+
export interface ItemShippingDistributionCenterResponse {
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {ModelError}
|
|
50
|
+
* @memberof ItemShippingDistributionCenterResponse
|
|
51
|
+
*/
|
|
52
|
+
error?: ModelError;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {ItemShippingDistributionCenter}
|
|
56
|
+
* @memberof ItemShippingDistributionCenterResponse
|
|
57
|
+
*/
|
|
58
|
+
itemShippingDistributionCenter?: ItemShippingDistributionCenter;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {ResponseMetadata}
|
|
62
|
+
* @memberof ItemShippingDistributionCenterResponse
|
|
63
|
+
*/
|
|
64
|
+
metadata?: ResponseMetadata;
|
|
65
|
+
/**
|
|
66
|
+
* Indicates if API call was successful
|
|
67
|
+
* @type {boolean}
|
|
68
|
+
* @memberof ItemShippingDistributionCenterResponse
|
|
69
|
+
*/
|
|
70
|
+
success?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {Warning}
|
|
74
|
+
* @memberof ItemShippingDistributionCenterResponse
|
|
75
|
+
*/
|
|
76
|
+
warning?: Warning;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Check if a given object implements the ItemShippingDistributionCenterResponse interface.
|
|
83
|
+
*/
|
|
84
|
+
export function instanceOfItemShippingDistributionCenterResponse(value: object): boolean {
|
|
85
|
+
let isInstance = true;
|
|
86
|
+
|
|
87
|
+
return isInstance;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function ItemShippingDistributionCenterResponseFromJSON(json: any): ItemShippingDistributionCenterResponse {
|
|
91
|
+
return ItemShippingDistributionCenterResponseFromJSONTyped(json, false);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function ItemShippingDistributionCenterResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ItemShippingDistributionCenterResponse {
|
|
95
|
+
if ((json === undefined) || (json === null)) {
|
|
96
|
+
return json;
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
|
|
100
|
+
'error': !exists(json, 'error') ? undefined : ModelErrorFromJSON(json['error']),
|
|
101
|
+
'itemShippingDistributionCenter': !exists(json, 'itemShippingDistributionCenter') ? undefined : ItemShippingDistributionCenterFromJSON(json['itemShippingDistributionCenter']),
|
|
102
|
+
'metadata': !exists(json, 'metadata') ? undefined : ResponseMetadataFromJSON(json['metadata']),
|
|
103
|
+
'success': !exists(json, 'success') ? undefined : json['success'],
|
|
104
|
+
'warning': !exists(json, 'warning') ? undefined : WarningFromJSON(json['warning']),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function ItemShippingDistributionCenterResponseToJSON(value?: ItemShippingDistributionCenterResponse | null): any {
|
|
109
|
+
if (value === undefined) {
|
|
110
|
+
return undefined;
|
|
111
|
+
}
|
|
112
|
+
if (value === null) {
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
|
|
117
|
+
'error': ModelErrorToJSON(value.error),
|
|
118
|
+
'itemShippingDistributionCenter': ItemShippingDistributionCenterToJSON(value.itemShippingDistributionCenter),
|
|
119
|
+
'metadata': ResponseMetadataToJSON(value.metadata),
|
|
120
|
+
'success': value.success,
|
|
121
|
+
'warning': WarningToJSON(value.warning),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -615,6 +615,7 @@ export * from './ItemShippingCase';
|
|
|
615
615
|
export * from './ItemShippingDestinationMarkup';
|
|
616
616
|
export * from './ItemShippingDestinationRestriction';
|
|
617
617
|
export * from './ItemShippingDistributionCenter';
|
|
618
|
+
export * from './ItemShippingDistributionCenterResponse';
|
|
618
619
|
export * from './ItemShippingMethod';
|
|
619
620
|
export * from './ItemShippingPackageRequirement';
|
|
620
621
|
export * from './ItemTag';
|