ultracart_rest_api_v2_typescript 4.0.185 → 4.0.187
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 +3 -0
- package/README.md +4 -2
- package/dist/apis/CustomerApi.d.ts +146 -1
- package/dist/apis/CustomerApi.js +314 -0
- package/dist/models/CustomerWishListItem.d.ts +63 -0
- package/dist/models/CustomerWishListItem.js +54 -0
- package/dist/models/CustomerWishListItemResponse.d.ts +55 -0
- package/dist/models/CustomerWishListItemResponse.js +54 -0
- package/dist/models/CustomerWishListItemsResponse.d.ts +55 -0
- package/dist/models/CustomerWishListItemsResponse.js +54 -0
- package/dist/models/ItemAutoOrderStep.d.ts +13 -0
- package/dist/models/ItemAutoOrderStep.js +6 -1
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
- package/src/apis/CustomerApi.ts +350 -0
- package/src/models/CustomerWishListItem.ts +104 -0
- package/src/models/CustomerWishListItemResponse.ts +113 -0
- package/src/models/CustomerWishListItemsResponse.ts +113 -0
- package/src/models/ItemAutoOrderStep.ts +18 -1
- package/src/models/index.ts +3 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -314,6 +314,9 @@ src/models/CustomerStoreCreditLedgerEntry.ts
|
|
|
314
314
|
src/models/CustomerStoreCreditResponse.ts
|
|
315
315
|
src/models/CustomerTag.ts
|
|
316
316
|
src/models/CustomerTaxCodes.ts
|
|
317
|
+
src/models/CustomerWishListItem.ts
|
|
318
|
+
src/models/CustomerWishListItemResponse.ts
|
|
319
|
+
src/models/CustomerWishListItemsResponse.ts
|
|
317
320
|
src/models/CustomersResponse.ts
|
|
318
321
|
src/models/DataTablesServerSideResponse.ts
|
|
319
322
|
src/models/Distance.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## ultracart_rest_api_v2_typescript@4.0.
|
|
1
|
+
## ultracart_rest_api_v2_typescript@4.0.187
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install ultracart_rest_api_v2_typescript@4.0.
|
|
39
|
+
npm install ultracart_rest_api_v2_typescript@4.0.187 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -54,6 +54,8 @@ Not every change is committed to every SDK.
|
|
|
54
54
|
|
|
55
55
|
| Version | Date | Comments |
|
|
56
56
|
| --: | :-: | --- |
|
|
57
|
+
| 4.0.187 | 11/09/2023 | item - new auto order step type: pause until |
|
|
58
|
+
| 4.0.186 | 11/06/2023 | customer api - added wishlist methods |
|
|
57
59
|
| 4.0.185 | 11/01/2023 | customer - do_no_send_mail flag added |
|
|
58
60
|
| 4.0.184 | 10/30/2023 | cart/order fields for health benefit card values in summary expansion objects |
|
|
59
61
|
| 4.0.183 | 10/27/2023 | workflow task object model refinement |
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import { AdjustInternalCertificateRequest, AdjustInternalCertificateResponse, BaseResponse, Customer, CustomerEditorValues, CustomerEmailListChanges, CustomerMagicLinkResponse, CustomerMergeRequest, CustomerQuery, CustomerResponse, CustomerStoreCreditAddRequest, CustomerStoreCreditResponse, CustomersResponse, DataTablesServerSideResponse, EmailListsResponse, EmailVerifyTokenRequest, EmailVerifyTokenResponse, EmailVerifyTokenValidateRequest, EmailVerifyTokenValidateResponse, LookupRequest, LookupResponse } from '../models';
|
|
13
|
+
import { AdjustInternalCertificateRequest, AdjustInternalCertificateResponse, BaseResponse, Customer, CustomerEditorValues, CustomerEmailListChanges, CustomerMagicLinkResponse, CustomerMergeRequest, CustomerQuery, CustomerResponse, CustomerStoreCreditAddRequest, CustomerStoreCreditResponse, CustomerWishListItem, CustomerWishListItemResponse, CustomerWishListItemsResponse, CustomersResponse, DataTablesServerSideResponse, EmailListsResponse, EmailVerifyTokenRequest, EmailVerifyTokenResponse, EmailVerifyTokenValidateRequest, EmailVerifyTokenValidateResponse, LookupRequest, LookupResponse } from '../models';
|
|
14
14
|
export interface AddCustomerStoreCreditRequest {
|
|
15
15
|
customerProfileOid: number;
|
|
16
16
|
storeCreditRequest: CustomerStoreCreditAddRequest;
|
|
@@ -22,6 +22,10 @@ export interface AdjustInternalCertificateOperationRequest {
|
|
|
22
22
|
export interface DeleteCustomerRequest {
|
|
23
23
|
customerProfileOid: number;
|
|
24
24
|
}
|
|
25
|
+
export interface DeleteWishListItemRequest {
|
|
26
|
+
customerProfileOid: number;
|
|
27
|
+
customerWishlistItemOid: number;
|
|
28
|
+
}
|
|
25
29
|
export interface GetCustomerRequest {
|
|
26
30
|
customerProfileOid: number;
|
|
27
31
|
expand?: string;
|
|
@@ -33,6 +37,13 @@ export interface GetCustomerByEmailRequest {
|
|
|
33
37
|
export interface GetCustomerStoreCreditRequest {
|
|
34
38
|
customerProfileOid: number;
|
|
35
39
|
}
|
|
40
|
+
export interface GetCustomerWishListRequest {
|
|
41
|
+
customerProfileOid: number;
|
|
42
|
+
}
|
|
43
|
+
export interface GetCustomerWishListItemRequest {
|
|
44
|
+
customerProfileOid: number;
|
|
45
|
+
customerWishlistItemOid: number;
|
|
46
|
+
}
|
|
36
47
|
export interface GetCustomersRequest {
|
|
37
48
|
email?: string;
|
|
38
49
|
qbClass?: string;
|
|
@@ -89,6 +100,10 @@ export interface InsertCustomerRequest {
|
|
|
89
100
|
customer: Customer;
|
|
90
101
|
expand?: string;
|
|
91
102
|
}
|
|
103
|
+
export interface InsertWishListItemRequest {
|
|
104
|
+
customerProfileOid: number;
|
|
105
|
+
wishlistItem: CustomerWishListItem;
|
|
106
|
+
}
|
|
92
107
|
export interface MergeCustomerRequest {
|
|
93
108
|
customerProfileOid: number;
|
|
94
109
|
customer: CustomerMergeRequest;
|
|
@@ -106,6 +121,11 @@ export interface UpdateCustomerEmailListsRequest {
|
|
|
106
121
|
customerProfileOid: number;
|
|
107
122
|
listChanges: CustomerEmailListChanges;
|
|
108
123
|
}
|
|
124
|
+
export interface UpdateWishListItemRequest {
|
|
125
|
+
customerProfileOid: number;
|
|
126
|
+
customerWishlistItemOid: number;
|
|
127
|
+
wishlistItem: CustomerWishListItem;
|
|
128
|
+
}
|
|
109
129
|
export interface ValidateEmailVerificationTokenRequest {
|
|
110
130
|
validationRequest: EmailVerifyTokenValidateRequest;
|
|
111
131
|
}
|
|
@@ -160,6 +180,21 @@ export interface CustomerApiInterface {
|
|
|
160
180
|
* Delete a customer
|
|
161
181
|
*/
|
|
162
182
|
deleteCustomer(requestParameters: DeleteCustomerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
183
|
+
/**
|
|
184
|
+
* Delete a customer wishlist item
|
|
185
|
+
* @summary Delete a customer wishlist item
|
|
186
|
+
* @param {number} customerProfileOid The customer oid for this wishlist.
|
|
187
|
+
* @param {number} customerWishlistItemOid The wishlist oid for this wishlist item to delete.
|
|
188
|
+
* @param {*} [options] Override http request option.
|
|
189
|
+
* @throws {RequiredError}
|
|
190
|
+
* @memberof CustomerApiInterface
|
|
191
|
+
*/
|
|
192
|
+
deleteWishListItemRaw(requestParameters: DeleteWishListItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerWishListItem>>;
|
|
193
|
+
/**
|
|
194
|
+
* Delete a customer wishlist item
|
|
195
|
+
* Delete a customer wishlist item
|
|
196
|
+
*/
|
|
197
|
+
deleteWishListItem(requestParameters: DeleteWishListItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerWishListItem>;
|
|
163
198
|
/**
|
|
164
199
|
* Retrieves a single customer using the specified customer profile oid.
|
|
165
200
|
* @summary Retrieve a customer
|
|
@@ -230,6 +265,35 @@ export interface CustomerApiInterface {
|
|
|
230
265
|
* Retrieve the customer store credit accumulated through loyalty programs
|
|
231
266
|
*/
|
|
232
267
|
getCustomerStoreCredit(requestParameters: GetCustomerStoreCreditRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerStoreCreditResponse>;
|
|
268
|
+
/**
|
|
269
|
+
* Retrieve wishlist items for customer.
|
|
270
|
+
* @summary Retrieve wishlist items for customer
|
|
271
|
+
* @param {number} customerProfileOid The customer oid for this wishlist.
|
|
272
|
+
* @param {*} [options] Override http request option.
|
|
273
|
+
* @throws {RequiredError}
|
|
274
|
+
* @memberof CustomerApiInterface
|
|
275
|
+
*/
|
|
276
|
+
getCustomerWishListRaw(requestParameters: GetCustomerWishListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerWishListItemsResponse>>;
|
|
277
|
+
/**
|
|
278
|
+
* Retrieve wishlist items for customer.
|
|
279
|
+
* Retrieve wishlist items for customer
|
|
280
|
+
*/
|
|
281
|
+
getCustomerWishList(requestParameters: GetCustomerWishListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerWishListItemsResponse>;
|
|
282
|
+
/**
|
|
283
|
+
* Retrieve wishlist item for customer.
|
|
284
|
+
* @summary Retrieve wishlist item for customer
|
|
285
|
+
* @param {number} customerProfileOid The customer oid for this wishlist.
|
|
286
|
+
* @param {number} customerWishlistItemOid The wishlist oid for this wishlist item.
|
|
287
|
+
* @param {*} [options] Override http request option.
|
|
288
|
+
* @throws {RequiredError}
|
|
289
|
+
* @memberof CustomerApiInterface
|
|
290
|
+
*/
|
|
291
|
+
getCustomerWishListItemRaw(requestParameters: GetCustomerWishListItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerWishListItemResponse>>;
|
|
292
|
+
/**
|
|
293
|
+
* Retrieve wishlist item for customer.
|
|
294
|
+
* Retrieve wishlist item for customer
|
|
295
|
+
*/
|
|
296
|
+
getCustomerWishListItem(requestParameters: GetCustomerWishListItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerWishListItemResponse>;
|
|
233
297
|
/**
|
|
234
298
|
* Retrieves customers from the account. If no parameters are specified, all customers 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.
|
|
235
299
|
* @summary Retrieve customers
|
|
@@ -352,6 +416,21 @@ export interface CustomerApiInterface {
|
|
|
352
416
|
* Insert a customer
|
|
353
417
|
*/
|
|
354
418
|
insertCustomer(requestParameters: InsertCustomerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerResponse>;
|
|
419
|
+
/**
|
|
420
|
+
* Insert a customer wishlist item
|
|
421
|
+
* @summary Insert a customer wishlist item
|
|
422
|
+
* @param {number} customerProfileOid The customer oid for this wishlist.
|
|
423
|
+
* @param {CustomerWishListItem} wishlistItem Wishlist item to insert
|
|
424
|
+
* @param {*} [options] Override http request option.
|
|
425
|
+
* @throws {RequiredError}
|
|
426
|
+
* @memberof CustomerApiInterface
|
|
427
|
+
*/
|
|
428
|
+
insertWishListItemRaw(requestParameters: InsertWishListItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerWishListItem>>;
|
|
429
|
+
/**
|
|
430
|
+
* Insert a customer wishlist item
|
|
431
|
+
* Insert a customer wishlist item
|
|
432
|
+
*/
|
|
433
|
+
insertWishListItem(requestParameters: InsertWishListItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerWishListItem>;
|
|
355
434
|
/**
|
|
356
435
|
* Merge customer into this customer.
|
|
357
436
|
* @summary Merge customer into this customer
|
|
@@ -412,6 +491,22 @@ export interface CustomerApiInterface {
|
|
|
412
491
|
* Update email list subscriptions for a customer
|
|
413
492
|
*/
|
|
414
493
|
updateCustomerEmailLists(requestParameters: UpdateCustomerEmailListsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerEmailListChanges>;
|
|
494
|
+
/**
|
|
495
|
+
* Update a customer wishlist item
|
|
496
|
+
* @summary Update a customer wishlist item
|
|
497
|
+
* @param {number} customerProfileOid The customer oid for this wishlist.
|
|
498
|
+
* @param {number} customerWishlistItemOid The wishlist oid for this wishlist item.
|
|
499
|
+
* @param {CustomerWishListItem} wishlistItem Wishlist item to update
|
|
500
|
+
* @param {*} [options] Override http request option.
|
|
501
|
+
* @throws {RequiredError}
|
|
502
|
+
* @memberof CustomerApiInterface
|
|
503
|
+
*/
|
|
504
|
+
updateWishListItemRaw(requestParameters: UpdateWishListItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerWishListItem>>;
|
|
505
|
+
/**
|
|
506
|
+
* Update a customer wishlist item
|
|
507
|
+
* Update a customer wishlist item
|
|
508
|
+
*/
|
|
509
|
+
updateWishListItem(requestParameters: UpdateWishListItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerWishListItem>;
|
|
415
510
|
/**
|
|
416
511
|
* Validate a token that can be used to verify a customer email address. The implementation of how a customer interacts with this token is left to the merchant.
|
|
417
512
|
* @summary Validate a token that can be used to verify a customer email address
|
|
@@ -461,6 +556,16 @@ export declare class CustomerApi extends runtime.BaseAPI implements CustomerApiI
|
|
|
461
556
|
* Delete a customer
|
|
462
557
|
*/
|
|
463
558
|
deleteCustomer(requestParameters: DeleteCustomerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
559
|
+
/**
|
|
560
|
+
* Delete a customer wishlist item
|
|
561
|
+
* Delete a customer wishlist item
|
|
562
|
+
*/
|
|
563
|
+
deleteWishListItemRaw(requestParameters: DeleteWishListItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerWishListItem>>;
|
|
564
|
+
/**
|
|
565
|
+
* Delete a customer wishlist item
|
|
566
|
+
* Delete a customer wishlist item
|
|
567
|
+
*/
|
|
568
|
+
deleteWishListItem(requestParameters: DeleteWishListItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerWishListItem>;
|
|
464
569
|
/**
|
|
465
570
|
* Retrieves a single customer using the specified customer profile oid.
|
|
466
571
|
* Retrieve a customer
|
|
@@ -511,6 +616,26 @@ export declare class CustomerApi extends runtime.BaseAPI implements CustomerApiI
|
|
|
511
616
|
* Retrieve the customer store credit accumulated through loyalty programs
|
|
512
617
|
*/
|
|
513
618
|
getCustomerStoreCredit(requestParameters: GetCustomerStoreCreditRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerStoreCreditResponse>;
|
|
619
|
+
/**
|
|
620
|
+
* Retrieve wishlist items for customer.
|
|
621
|
+
* Retrieve wishlist items for customer
|
|
622
|
+
*/
|
|
623
|
+
getCustomerWishListRaw(requestParameters: GetCustomerWishListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerWishListItemsResponse>>;
|
|
624
|
+
/**
|
|
625
|
+
* Retrieve wishlist items for customer.
|
|
626
|
+
* Retrieve wishlist items for customer
|
|
627
|
+
*/
|
|
628
|
+
getCustomerWishList(requestParameters: GetCustomerWishListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerWishListItemsResponse>;
|
|
629
|
+
/**
|
|
630
|
+
* Retrieve wishlist item for customer.
|
|
631
|
+
* Retrieve wishlist item for customer
|
|
632
|
+
*/
|
|
633
|
+
getCustomerWishListItemRaw(requestParameters: GetCustomerWishListItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerWishListItemResponse>>;
|
|
634
|
+
/**
|
|
635
|
+
* Retrieve wishlist item for customer.
|
|
636
|
+
* Retrieve wishlist item for customer
|
|
637
|
+
*/
|
|
638
|
+
getCustomerWishListItem(requestParameters: GetCustomerWishListItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerWishListItemResponse>;
|
|
514
639
|
/**
|
|
515
640
|
* Retrieves customers from the account. If no parameters are specified, all customers 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.
|
|
516
641
|
* Retrieve customers
|
|
@@ -571,6 +696,16 @@ export declare class CustomerApi extends runtime.BaseAPI implements CustomerApiI
|
|
|
571
696
|
* Insert a customer
|
|
572
697
|
*/
|
|
573
698
|
insertCustomer(requestParameters: InsertCustomerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerResponse>;
|
|
699
|
+
/**
|
|
700
|
+
* Insert a customer wishlist item
|
|
701
|
+
* Insert a customer wishlist item
|
|
702
|
+
*/
|
|
703
|
+
insertWishListItemRaw(requestParameters: InsertWishListItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerWishListItem>>;
|
|
704
|
+
/**
|
|
705
|
+
* Insert a customer wishlist item
|
|
706
|
+
* Insert a customer wishlist item
|
|
707
|
+
*/
|
|
708
|
+
insertWishListItem(requestParameters: InsertWishListItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerWishListItem>;
|
|
574
709
|
/**
|
|
575
710
|
* Merge customer into this customer.
|
|
576
711
|
* Merge customer into this customer
|
|
@@ -609,6 +744,16 @@ export declare class CustomerApi extends runtime.BaseAPI implements CustomerApiI
|
|
|
609
744
|
* Update email list subscriptions for a customer
|
|
610
745
|
*/
|
|
611
746
|
updateCustomerEmailLists(requestParameters: UpdateCustomerEmailListsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerEmailListChanges>;
|
|
747
|
+
/**
|
|
748
|
+
* Update a customer wishlist item
|
|
749
|
+
* Update a customer wishlist item
|
|
750
|
+
*/
|
|
751
|
+
updateWishListItemRaw(requestParameters: UpdateWishListItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomerWishListItem>>;
|
|
752
|
+
/**
|
|
753
|
+
* Update a customer wishlist item
|
|
754
|
+
* Update a customer wishlist item
|
|
755
|
+
*/
|
|
756
|
+
updateWishListItem(requestParameters: UpdateWishListItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomerWishListItem>;
|
|
612
757
|
/**
|
|
613
758
|
* Validate a token that can be used to verify a customer email address. The implementation of how a customer interacts with this token is left to the merchant.
|
|
614
759
|
* Validate a token that can be used to verify a customer email address
|
package/dist/apis/CustomerApi.js
CHANGED
|
@@ -260,6 +260,68 @@ var CustomerApi = /** @class */ (function (_super) {
|
|
|
260
260
|
});
|
|
261
261
|
});
|
|
262
262
|
};
|
|
263
|
+
/**
|
|
264
|
+
* Delete a customer wishlist item
|
|
265
|
+
* Delete a customer wishlist item
|
|
266
|
+
*/
|
|
267
|
+
CustomerApi.prototype.deleteWishListItemRaw = function (requestParameters, initOverrides) {
|
|
268
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
269
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
270
|
+
return __generator(this, function (_c) {
|
|
271
|
+
switch (_c.label) {
|
|
272
|
+
case 0:
|
|
273
|
+
if (requestParameters.customerProfileOid === null || requestParameters.customerProfileOid === undefined) {
|
|
274
|
+
throw new runtime.RequiredError('customerProfileOid', 'Required parameter requestParameters.customerProfileOid was null or undefined when calling deleteWishListItem.');
|
|
275
|
+
}
|
|
276
|
+
if (requestParameters.customerWishlistItemOid === null || requestParameters.customerWishlistItemOid === undefined) {
|
|
277
|
+
throw new runtime.RequiredError('customerWishlistItemOid', 'Required parameter requestParameters.customerWishlistItemOid was null or undefined when calling deleteWishListItem.');
|
|
278
|
+
}
|
|
279
|
+
queryParameters = {};
|
|
280
|
+
headerParameters = {};
|
|
281
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
282
|
+
// oauth required
|
|
283
|
+
_a = headerParameters;
|
|
284
|
+
_b = "Authorization";
|
|
285
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["customer_write"])];
|
|
286
|
+
case 1:
|
|
287
|
+
// oauth required
|
|
288
|
+
_a[_b] = _c.sent();
|
|
289
|
+
_c.label = 2;
|
|
290
|
+
case 2:
|
|
291
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
292
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
293
|
+
}
|
|
294
|
+
return [4 /*yield*/, this.request({
|
|
295
|
+
path: "/customer/customers/{customer_profile_oid}/wishlist/{customer_wishlist_item_oid}".replace("{".concat("customer_profile_oid", "}"), encodeURIComponent(String(requestParameters.customerProfileOid))).replace("{".concat("customer_wishlist_item_oid", "}"), encodeURIComponent(String(requestParameters.customerWishlistItemOid))),
|
|
296
|
+
method: 'DELETE',
|
|
297
|
+
headers: headerParameters,
|
|
298
|
+
query: queryParameters,
|
|
299
|
+
}, initOverrides)];
|
|
300
|
+
case 3:
|
|
301
|
+
response = _c.sent();
|
|
302
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.CustomerWishListItemFromJSON)(jsonValue); })];
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* Delete a customer wishlist item
|
|
309
|
+
* Delete a customer wishlist item
|
|
310
|
+
*/
|
|
311
|
+
CustomerApi.prototype.deleteWishListItem = function (requestParameters, initOverrides) {
|
|
312
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
313
|
+
var response;
|
|
314
|
+
return __generator(this, function (_a) {
|
|
315
|
+
switch (_a.label) {
|
|
316
|
+
case 0: return [4 /*yield*/, this.deleteWishListItemRaw(requestParameters, initOverrides)];
|
|
317
|
+
case 1:
|
|
318
|
+
response = _a.sent();
|
|
319
|
+
return [4 /*yield*/, response.value()];
|
|
320
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
};
|
|
263
325
|
/**
|
|
264
326
|
* Retrieves a single customer using the specified customer profile oid.
|
|
265
327
|
* Retrieve a customer
|
|
@@ -555,6 +617,127 @@ var CustomerApi = /** @class */ (function (_super) {
|
|
|
555
617
|
});
|
|
556
618
|
});
|
|
557
619
|
};
|
|
620
|
+
/**
|
|
621
|
+
* Retrieve wishlist items for customer.
|
|
622
|
+
* Retrieve wishlist items for customer
|
|
623
|
+
*/
|
|
624
|
+
CustomerApi.prototype.getCustomerWishListRaw = function (requestParameters, initOverrides) {
|
|
625
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
626
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
627
|
+
return __generator(this, function (_c) {
|
|
628
|
+
switch (_c.label) {
|
|
629
|
+
case 0:
|
|
630
|
+
if (requestParameters.customerProfileOid === null || requestParameters.customerProfileOid === undefined) {
|
|
631
|
+
throw new runtime.RequiredError('customerProfileOid', 'Required parameter requestParameters.customerProfileOid was null or undefined when calling getCustomerWishList.');
|
|
632
|
+
}
|
|
633
|
+
queryParameters = {};
|
|
634
|
+
headerParameters = {};
|
|
635
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
636
|
+
// oauth required
|
|
637
|
+
_a = headerParameters;
|
|
638
|
+
_b = "Authorization";
|
|
639
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["customer_read"])];
|
|
640
|
+
case 1:
|
|
641
|
+
// oauth required
|
|
642
|
+
_a[_b] = _c.sent();
|
|
643
|
+
_c.label = 2;
|
|
644
|
+
case 2:
|
|
645
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
646
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
647
|
+
}
|
|
648
|
+
return [4 /*yield*/, this.request({
|
|
649
|
+
path: "/customer/customers/{customer_profile_oid}/wishlist".replace("{".concat("customer_profile_oid", "}"), encodeURIComponent(String(requestParameters.customerProfileOid))),
|
|
650
|
+
method: 'GET',
|
|
651
|
+
headers: headerParameters,
|
|
652
|
+
query: queryParameters,
|
|
653
|
+
}, initOverrides)];
|
|
654
|
+
case 3:
|
|
655
|
+
response = _c.sent();
|
|
656
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.CustomerWishListItemsResponseFromJSON)(jsonValue); })];
|
|
657
|
+
}
|
|
658
|
+
});
|
|
659
|
+
});
|
|
660
|
+
};
|
|
661
|
+
/**
|
|
662
|
+
* Retrieve wishlist items for customer.
|
|
663
|
+
* Retrieve wishlist items for customer
|
|
664
|
+
*/
|
|
665
|
+
CustomerApi.prototype.getCustomerWishList = function (requestParameters, initOverrides) {
|
|
666
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
667
|
+
var response;
|
|
668
|
+
return __generator(this, function (_a) {
|
|
669
|
+
switch (_a.label) {
|
|
670
|
+
case 0: return [4 /*yield*/, this.getCustomerWishListRaw(requestParameters, initOverrides)];
|
|
671
|
+
case 1:
|
|
672
|
+
response = _a.sent();
|
|
673
|
+
return [4 /*yield*/, response.value()];
|
|
674
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
});
|
|
678
|
+
};
|
|
679
|
+
/**
|
|
680
|
+
* Retrieve wishlist item for customer.
|
|
681
|
+
* Retrieve wishlist item for customer
|
|
682
|
+
*/
|
|
683
|
+
CustomerApi.prototype.getCustomerWishListItemRaw = function (requestParameters, initOverrides) {
|
|
684
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
685
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
686
|
+
return __generator(this, function (_c) {
|
|
687
|
+
switch (_c.label) {
|
|
688
|
+
case 0:
|
|
689
|
+
if (requestParameters.customerProfileOid === null || requestParameters.customerProfileOid === undefined) {
|
|
690
|
+
throw new runtime.RequiredError('customerProfileOid', 'Required parameter requestParameters.customerProfileOid was null or undefined when calling getCustomerWishListItem.');
|
|
691
|
+
}
|
|
692
|
+
if (requestParameters.customerWishlistItemOid === null || requestParameters.customerWishlistItemOid === undefined) {
|
|
693
|
+
throw new runtime.RequiredError('customerWishlistItemOid', 'Required parameter requestParameters.customerWishlistItemOid was null or undefined when calling getCustomerWishListItem.');
|
|
694
|
+
}
|
|
695
|
+
queryParameters = {};
|
|
696
|
+
headerParameters = {};
|
|
697
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
698
|
+
// oauth required
|
|
699
|
+
_a = headerParameters;
|
|
700
|
+
_b = "Authorization";
|
|
701
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["customer_read"])];
|
|
702
|
+
case 1:
|
|
703
|
+
// oauth required
|
|
704
|
+
_a[_b] = _c.sent();
|
|
705
|
+
_c.label = 2;
|
|
706
|
+
case 2:
|
|
707
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
708
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
709
|
+
}
|
|
710
|
+
return [4 /*yield*/, this.request({
|
|
711
|
+
path: "/customer/customers/{customer_profile_oid}/wishlist/{customer_wishlist_item_oid}".replace("{".concat("customer_profile_oid", "}"), encodeURIComponent(String(requestParameters.customerProfileOid))).replace("{".concat("customer_wishlist_item_oid", "}"), encodeURIComponent(String(requestParameters.customerWishlistItemOid))),
|
|
712
|
+
method: 'GET',
|
|
713
|
+
headers: headerParameters,
|
|
714
|
+
query: queryParameters,
|
|
715
|
+
}, initOverrides)];
|
|
716
|
+
case 3:
|
|
717
|
+
response = _c.sent();
|
|
718
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.CustomerWishListItemResponseFromJSON)(jsonValue); })];
|
|
719
|
+
}
|
|
720
|
+
});
|
|
721
|
+
});
|
|
722
|
+
};
|
|
723
|
+
/**
|
|
724
|
+
* Retrieve wishlist item for customer.
|
|
725
|
+
* Retrieve wishlist item for customer
|
|
726
|
+
*/
|
|
727
|
+
CustomerApi.prototype.getCustomerWishListItem = function (requestParameters, initOverrides) {
|
|
728
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
729
|
+
var response;
|
|
730
|
+
return __generator(this, function (_a) {
|
|
731
|
+
switch (_a.label) {
|
|
732
|
+
case 0: return [4 /*yield*/, this.getCustomerWishListItemRaw(requestParameters, initOverrides)];
|
|
733
|
+
case 1:
|
|
734
|
+
response = _a.sent();
|
|
735
|
+
return [4 /*yield*/, response.value()];
|
|
736
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
737
|
+
}
|
|
738
|
+
});
|
|
739
|
+
});
|
|
740
|
+
};
|
|
558
741
|
/**
|
|
559
742
|
* Retrieves customers from the account. If no parameters are specified, all customers 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.
|
|
560
743
|
* Retrieve customers
|
|
@@ -1031,6 +1214,70 @@ var CustomerApi = /** @class */ (function (_super) {
|
|
|
1031
1214
|
});
|
|
1032
1215
|
});
|
|
1033
1216
|
};
|
|
1217
|
+
/**
|
|
1218
|
+
* Insert a customer wishlist item
|
|
1219
|
+
* Insert a customer wishlist item
|
|
1220
|
+
*/
|
|
1221
|
+
CustomerApi.prototype.insertWishListItemRaw = function (requestParameters, initOverrides) {
|
|
1222
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1223
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
1224
|
+
return __generator(this, function (_c) {
|
|
1225
|
+
switch (_c.label) {
|
|
1226
|
+
case 0:
|
|
1227
|
+
if (requestParameters.customerProfileOid === null || requestParameters.customerProfileOid === undefined) {
|
|
1228
|
+
throw new runtime.RequiredError('customerProfileOid', 'Required parameter requestParameters.customerProfileOid was null or undefined when calling insertWishListItem.');
|
|
1229
|
+
}
|
|
1230
|
+
if (requestParameters.wishlistItem === null || requestParameters.wishlistItem === undefined) {
|
|
1231
|
+
throw new runtime.RequiredError('wishlistItem', 'Required parameter requestParameters.wishlistItem was null or undefined when calling insertWishListItem.');
|
|
1232
|
+
}
|
|
1233
|
+
queryParameters = {};
|
|
1234
|
+
headerParameters = {};
|
|
1235
|
+
headerParameters['Content-Type'] = 'application/json; charset=UTF-8';
|
|
1236
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
1237
|
+
// oauth required
|
|
1238
|
+
_a = headerParameters;
|
|
1239
|
+
_b = "Authorization";
|
|
1240
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["customer_write"])];
|
|
1241
|
+
case 1:
|
|
1242
|
+
// oauth required
|
|
1243
|
+
_a[_b] = _c.sent();
|
|
1244
|
+
_c.label = 2;
|
|
1245
|
+
case 2:
|
|
1246
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1247
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
1248
|
+
}
|
|
1249
|
+
return [4 /*yield*/, this.request({
|
|
1250
|
+
path: "/customer/customers/{customer_profile_oid}/wishlist".replace("{".concat("customer_profile_oid", "}"), encodeURIComponent(String(requestParameters.customerProfileOid))),
|
|
1251
|
+
method: 'POST',
|
|
1252
|
+
headers: headerParameters,
|
|
1253
|
+
query: queryParameters,
|
|
1254
|
+
body: (0, models_1.CustomerWishListItemToJSON)(requestParameters.wishlistItem),
|
|
1255
|
+
}, initOverrides)];
|
|
1256
|
+
case 3:
|
|
1257
|
+
response = _c.sent();
|
|
1258
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.CustomerWishListItemFromJSON)(jsonValue); })];
|
|
1259
|
+
}
|
|
1260
|
+
});
|
|
1261
|
+
});
|
|
1262
|
+
};
|
|
1263
|
+
/**
|
|
1264
|
+
* Insert a customer wishlist item
|
|
1265
|
+
* Insert a customer wishlist item
|
|
1266
|
+
*/
|
|
1267
|
+
CustomerApi.prototype.insertWishListItem = function (requestParameters, initOverrides) {
|
|
1268
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1269
|
+
var response;
|
|
1270
|
+
return __generator(this, function (_a) {
|
|
1271
|
+
switch (_a.label) {
|
|
1272
|
+
case 0: return [4 /*yield*/, this.insertWishListItemRaw(requestParameters, initOverrides)];
|
|
1273
|
+
case 1:
|
|
1274
|
+
response = _a.sent();
|
|
1275
|
+
return [4 /*yield*/, response.value()];
|
|
1276
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
1277
|
+
}
|
|
1278
|
+
});
|
|
1279
|
+
});
|
|
1280
|
+
};
|
|
1034
1281
|
/**
|
|
1035
1282
|
* Merge customer into this customer.
|
|
1036
1283
|
* Merge customer into this customer
|
|
@@ -1289,6 +1536,73 @@ var CustomerApi = /** @class */ (function (_super) {
|
|
|
1289
1536
|
});
|
|
1290
1537
|
});
|
|
1291
1538
|
};
|
|
1539
|
+
/**
|
|
1540
|
+
* Update a customer wishlist item
|
|
1541
|
+
* Update a customer wishlist item
|
|
1542
|
+
*/
|
|
1543
|
+
CustomerApi.prototype.updateWishListItemRaw = function (requestParameters, initOverrides) {
|
|
1544
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1545
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
1546
|
+
return __generator(this, function (_c) {
|
|
1547
|
+
switch (_c.label) {
|
|
1548
|
+
case 0:
|
|
1549
|
+
if (requestParameters.customerProfileOid === null || requestParameters.customerProfileOid === undefined) {
|
|
1550
|
+
throw new runtime.RequiredError('customerProfileOid', 'Required parameter requestParameters.customerProfileOid was null or undefined when calling updateWishListItem.');
|
|
1551
|
+
}
|
|
1552
|
+
if (requestParameters.customerWishlistItemOid === null || requestParameters.customerWishlistItemOid === undefined) {
|
|
1553
|
+
throw new runtime.RequiredError('customerWishlistItemOid', 'Required parameter requestParameters.customerWishlistItemOid was null or undefined when calling updateWishListItem.');
|
|
1554
|
+
}
|
|
1555
|
+
if (requestParameters.wishlistItem === null || requestParameters.wishlistItem === undefined) {
|
|
1556
|
+
throw new runtime.RequiredError('wishlistItem', 'Required parameter requestParameters.wishlistItem was null or undefined when calling updateWishListItem.');
|
|
1557
|
+
}
|
|
1558
|
+
queryParameters = {};
|
|
1559
|
+
headerParameters = {};
|
|
1560
|
+
headerParameters['Content-Type'] = 'application/json; charset=UTF-8';
|
|
1561
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
1562
|
+
// oauth required
|
|
1563
|
+
_a = headerParameters;
|
|
1564
|
+
_b = "Authorization";
|
|
1565
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["customer_write"])];
|
|
1566
|
+
case 1:
|
|
1567
|
+
// oauth required
|
|
1568
|
+
_a[_b] = _c.sent();
|
|
1569
|
+
_c.label = 2;
|
|
1570
|
+
case 2:
|
|
1571
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
1572
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
1573
|
+
}
|
|
1574
|
+
return [4 /*yield*/, this.request({
|
|
1575
|
+
path: "/customer/customers/{customer_profile_oid}/wishlist/{customer_wishlist_item_oid}".replace("{".concat("customer_profile_oid", "}"), encodeURIComponent(String(requestParameters.customerProfileOid))).replace("{".concat("customer_wishlist_item_oid", "}"), encodeURIComponent(String(requestParameters.customerWishlistItemOid))),
|
|
1576
|
+
method: 'PUT',
|
|
1577
|
+
headers: headerParameters,
|
|
1578
|
+
query: queryParameters,
|
|
1579
|
+
body: (0, models_1.CustomerWishListItemToJSON)(requestParameters.wishlistItem),
|
|
1580
|
+
}, initOverrides)];
|
|
1581
|
+
case 3:
|
|
1582
|
+
response = _c.sent();
|
|
1583
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, models_1.CustomerWishListItemFromJSON)(jsonValue); })];
|
|
1584
|
+
}
|
|
1585
|
+
});
|
|
1586
|
+
});
|
|
1587
|
+
};
|
|
1588
|
+
/**
|
|
1589
|
+
* Update a customer wishlist item
|
|
1590
|
+
* Update a customer wishlist item
|
|
1591
|
+
*/
|
|
1592
|
+
CustomerApi.prototype.updateWishListItem = function (requestParameters, initOverrides) {
|
|
1593
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1594
|
+
var response;
|
|
1595
|
+
return __generator(this, function (_a) {
|
|
1596
|
+
switch (_a.label) {
|
|
1597
|
+
case 0: return [4 /*yield*/, this.updateWishListItemRaw(requestParameters, initOverrides)];
|
|
1598
|
+
case 1:
|
|
1599
|
+
response = _a.sent();
|
|
1600
|
+
return [4 /*yield*/, response.value()];
|
|
1601
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
1602
|
+
}
|
|
1603
|
+
});
|
|
1604
|
+
});
|
|
1605
|
+
};
|
|
1292
1606
|
/**
|
|
1293
1607
|
* Validate a token that can be used to verify a customer email address. The implementation of how a customer interacts with this token is left to the merchant.
|
|
1294
1608
|
* Validate a token that can be used to verify a customer email address
|