@fenixalliance/abs-api-client 1.0.10 → 1.0.12

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.
@@ -0,0 +1,1104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ECommerceService = void 0;
4
+ const OpenAPI_1 = require("../core/OpenAPI");
5
+ const request_1 = require("../core/request");
6
+ class ECommerceService {
7
+ /**
8
+ * Get all business owned contacts
9
+ * Get all business owned contacts
10
+ * @param cartId
11
+ * @param xApiVersion
12
+ * @returns CartDtoEnvelope OK
13
+ * @throws ApiError
14
+ */
15
+ static getCartByIdAsync(cartId, xApiVersion) {
16
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
17
+ method: 'GET',
18
+ url: '/api/v2/CartService/Carts/{cartId}',
19
+ path: {
20
+ 'cartId': cartId,
21
+ },
22
+ headers: {
23
+ 'x-api-version': xApiVersion,
24
+ },
25
+ errors: {
26
+ 401: `Unauthorized`,
27
+ 403: `Forbidden`,
28
+ },
29
+ });
30
+ }
31
+ /**
32
+ * Update a cart
33
+ * Update a cart
34
+ * @param cartId
35
+ * @param xApiVersion
36
+ * @param requestBody
37
+ * @returns EmptyEnvelope OK
38
+ * @throws ApiError
39
+ */
40
+ static updateCartAsync(cartId, xApiVersion, requestBody) {
41
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
42
+ method: 'PUT',
43
+ url: '/api/v2/CartService/Carts/{cartId}',
44
+ path: {
45
+ 'cartId': cartId,
46
+ },
47
+ headers: {
48
+ 'x-api-version': xApiVersion,
49
+ },
50
+ body: requestBody,
51
+ mediaType: 'application/json',
52
+ errors: {
53
+ 401: `Unauthorized`,
54
+ 403: `Forbidden`,
55
+ },
56
+ });
57
+ }
58
+ /**
59
+ * Set the currency of a cart
60
+ * Set the currency of a cart
61
+ * @param cartId
62
+ * @param xApiVersion
63
+ * @param requestBody
64
+ * @returns EmptyEnvelope OK
65
+ * @throws ApiError
66
+ */
67
+ static setCartCurrencyAsync(cartId, xApiVersion, requestBody) {
68
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
69
+ method: 'PUT',
70
+ url: '/api/v2/CartService/Carts/{cartId}/Currency',
71
+ path: {
72
+ 'cartId': cartId,
73
+ },
74
+ headers: {
75
+ 'x-api-version': xApiVersion,
76
+ },
77
+ body: requestBody,
78
+ mediaType: 'application/json',
79
+ errors: {
80
+ 401: `Unauthorized`,
81
+ 403: `Forbidden`,
82
+ },
83
+ });
84
+ }
85
+ /**
86
+ * Get the currency of a cart
87
+ * The currency of a cart used for display purposes
88
+ * @param cartId
89
+ * @param xApiVersion
90
+ * @returns CurrencyDtoEnvelope OK
91
+ * @throws ApiError
92
+ */
93
+ static getCartCurrencyAsync(cartId, xApiVersion) {
94
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
95
+ method: 'GET',
96
+ url: '/api/v2/CartService/Carts/{cartId}/Currency',
97
+ path: {
98
+ 'cartId': cartId,
99
+ },
100
+ headers: {
101
+ 'x-api-version': xApiVersion,
102
+ },
103
+ errors: {
104
+ 401: `Unauthorized`,
105
+ 403: `Forbidden`,
106
+ },
107
+ });
108
+ }
109
+ /**
110
+ * Set the country of a cart
111
+ * Set the country of a cart
112
+ * @param cartId
113
+ * @param xApiVersion
114
+ * @param requestBody
115
+ * @returns EmptyEnvelope OK
116
+ * @throws ApiError
117
+ */
118
+ static setCartCountryAsync(cartId, xApiVersion, requestBody) {
119
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
120
+ method: 'PUT',
121
+ url: '/api/v2/CartService/Carts/{cartId}/Country',
122
+ path: {
123
+ 'cartId': cartId,
124
+ },
125
+ headers: {
126
+ 'x-api-version': xApiVersion,
127
+ },
128
+ body: requestBody,
129
+ mediaType: 'application/json',
130
+ errors: {
131
+ 401: `Unauthorized`,
132
+ 403: `Forbidden`,
133
+ },
134
+ });
135
+ }
136
+ /**
137
+ * Get the country of a cart
138
+ * The country of a cart is used to calculate taxes and shipping costs
139
+ * @param cartId
140
+ * @param xApiVersion
141
+ * @returns CountryDtoEnvelope OK
142
+ * @throws ApiError
143
+ */
144
+ static getCartCountryAsync(cartId, xApiVersion) {
145
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
146
+ method: 'GET',
147
+ url: '/api/v2/CartService/Carts/{cartId}/Country',
148
+ path: {
149
+ 'cartId': cartId,
150
+ },
151
+ headers: {
152
+ 'x-api-version': xApiVersion,
153
+ },
154
+ errors: {
155
+ 401: `Unauthorized`,
156
+ 403: `Forbidden`,
157
+ },
158
+ });
159
+ }
160
+ /**
161
+ * Submit a cart for processing
162
+ * Submit a cart for processing
163
+ * @param cartId
164
+ * @param tenantId
165
+ * @param xApiVersion
166
+ * @returns EmptyEnvelope OK
167
+ * @throws ApiError
168
+ */
169
+ static submitCartAsync(cartId, tenantId, xApiVersion) {
170
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
171
+ method: 'POST',
172
+ url: '/api/v2/CartService/Carts/{cartId}/Submit',
173
+ path: {
174
+ 'cartId': cartId,
175
+ },
176
+ headers: {
177
+ 'x-api-version': xApiVersion,
178
+ },
179
+ query: {
180
+ 'tenantId': tenantId,
181
+ },
182
+ errors: {
183
+ 401: `Unauthorized`,
184
+ 403: `Forbidden`,
185
+ },
186
+ });
187
+ }
188
+ /**
189
+ * Get the acting cart
190
+ * Get the acting cart
191
+ * @param xApiVersion
192
+ * @returns CartDtoEnvelope OK
193
+ * @throws ApiError
194
+ */
195
+ static getActingCart(xApiVersion) {
196
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
197
+ method: 'GET',
198
+ url: '/api/v2/CartService/Carts/ActingCart',
199
+ headers: {
200
+ 'x-api-version': xApiVersion,
201
+ },
202
+ errors: {
203
+ 401: `Unauthorized`,
204
+ 403: `Forbidden`,
205
+ },
206
+ });
207
+ }
208
+ /**
209
+ * Get the guest cart
210
+ * Get the guest cart
211
+ * @param xApiVersion
212
+ * @returns CartDtoEnvelope OK
213
+ * @throws ApiError
214
+ */
215
+ static getGuestCartAsync(xApiVersion) {
216
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
217
+ method: 'GET',
218
+ url: '/api/v2/CartService/Carts/GuestCart',
219
+ headers: {
220
+ 'x-api-version': xApiVersion,
221
+ },
222
+ errors: {
223
+ 401: `Unauthorized`,
224
+ 403: `Forbidden`,
225
+ },
226
+ });
227
+ }
228
+ /**
229
+ * Get the current user's cart
230
+ * Get the current user's cart
231
+ * @param xApiVersion
232
+ * @returns CartDtoEnvelope OK
233
+ * @throws ApiError
234
+ */
235
+ static getUserCart(xApiVersion) {
236
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
237
+ method: 'GET',
238
+ url: '/api/v2/CartService/Carts/UserCart',
239
+ headers: {
240
+ 'x-api-version': xApiVersion,
241
+ },
242
+ errors: {
243
+ 401: `Unauthorized`,
244
+ 403: `Forbidden`,
245
+ },
246
+ });
247
+ }
248
+ /**
249
+ * Get the business cart
250
+ * Get the business cart
251
+ * @param tenantId
252
+ * @param xApiVersion
253
+ * @returns CartDtoEnvelope OK
254
+ * @throws ApiError
255
+ */
256
+ static getTenantCartAsync(tenantId, xApiVersion) {
257
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
258
+ method: 'GET',
259
+ url: '/api/v2/CartService/Carts/BusinessCart/{tenantId}',
260
+ path: {
261
+ 'tenantId': tenantId,
262
+ },
263
+ headers: {
264
+ 'x-api-version': xApiVersion,
265
+ },
266
+ errors: {
267
+ 401: `Unauthorized`,
268
+ 403: `Forbidden`,
269
+ },
270
+ });
271
+ }
272
+ /**
273
+ * Get all cart lines
274
+ * Get all cart lines
275
+ * @param cartId
276
+ * @param xApiVersion
277
+ * @returns ItemCartRecordDtoListEnvelope OK
278
+ * @throws ApiError
279
+ */
280
+ static getItemsInCartAsync(cartId, xApiVersion) {
281
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
282
+ method: 'GET',
283
+ url: '/api/v2/CartService/Carts/{cartId}/Items',
284
+ path: {
285
+ 'cartId': cartId,
286
+ },
287
+ headers: {
288
+ 'x-api-version': xApiVersion,
289
+ },
290
+ errors: {
291
+ 401: `Unauthorized`,
292
+ 404: `Not Found`,
293
+ },
294
+ });
295
+ }
296
+ /**
297
+ * Clear all items from a cart
298
+ * Clear all items from a cart
299
+ * @param cartId
300
+ * @param xApiVersion
301
+ * @returns EmptyEnvelope OK
302
+ * @throws ApiError
303
+ */
304
+ static clearCartAsync(cartId, xApiVersion) {
305
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
306
+ method: 'DELETE',
307
+ url: '/api/v2/CartService/Carts/{cartId}/Items',
308
+ path: {
309
+ 'cartId': cartId,
310
+ },
311
+ headers: {
312
+ 'x-api-version': xApiVersion,
313
+ },
314
+ errors: {
315
+ 401: `Unauthorized`,
316
+ 404: `Not Found`,
317
+ },
318
+ });
319
+ }
320
+ /**
321
+ * Add an Item to a cart
322
+ * Add an Item to a cart
323
+ * @param cartId
324
+ * @param itemId
325
+ * @param quantity
326
+ * @param xApiVersion
327
+ * @returns EmptyEnvelope OK
328
+ * @throws ApiError
329
+ */
330
+ static addItemToCartAsync(cartId, itemId, quantity = 1, xApiVersion) {
331
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
332
+ method: 'POST',
333
+ url: '/api/v2/CartService/Carts/{cartId}/Items/{itemId}',
334
+ path: {
335
+ 'cartId': cartId,
336
+ 'itemId': itemId,
337
+ },
338
+ headers: {
339
+ 'x-api-version': xApiVersion,
340
+ },
341
+ query: {
342
+ 'quantity': quantity,
343
+ },
344
+ errors: {
345
+ 401: `Unauthorized`,
346
+ 404: `Not Found`,
347
+ },
348
+ });
349
+ }
350
+ /**
351
+ * Update an Item in a cart
352
+ * Update an Item in a cart
353
+ * @param cartId
354
+ * @param itemId
355
+ * @param xApiVersion
356
+ * @param requestBody
357
+ * @returns EmptyEnvelope OK
358
+ * @throws ApiError
359
+ */
360
+ static updateItemCartRecordAsync(cartId, itemId, xApiVersion, requestBody) {
361
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
362
+ method: 'PUT',
363
+ url: '/api/v2/CartService/Carts/{cartId}/Items/{itemId}',
364
+ path: {
365
+ 'cartId': cartId,
366
+ 'itemId': itemId,
367
+ },
368
+ headers: {
369
+ 'x-api-version': xApiVersion,
370
+ },
371
+ body: requestBody,
372
+ mediaType: 'application/json',
373
+ errors: {
374
+ 401: `Unauthorized`,
375
+ 404: `Not Found`,
376
+ },
377
+ });
378
+ }
379
+ /**
380
+ * Remove an Item from a cart
381
+ * Remove an Item from a cart
382
+ * @param cartId
383
+ * @param itemId
384
+ * @param xApiVersion
385
+ * @returns EmptyEnvelope OK
386
+ * @throws ApiError
387
+ */
388
+ static removeItemFromCartAsync(cartId, itemId, xApiVersion) {
389
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
390
+ method: 'DELETE',
391
+ url: '/api/v2/CartService/Carts/{cartId}/Items/{itemId}',
392
+ path: {
393
+ 'cartId': cartId,
394
+ 'itemId': itemId,
395
+ },
396
+ headers: {
397
+ 'x-api-version': xApiVersion,
398
+ },
399
+ errors: {
400
+ 401: `Unauthorized`,
401
+ 404: `Not Found`,
402
+ },
403
+ });
404
+ }
405
+ /**
406
+ * Assesses if an Item is already in a cart
407
+ * Assesses if an Item is already in a cart
408
+ * @param cartId
409
+ * @param itemId
410
+ * @param xApiVersion
411
+ * @returns BooleanEnvelope OK
412
+ * @throws ApiError
413
+ */
414
+ static isItemAlreadyInCartAsync(cartId, itemId, xApiVersion) {
415
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
416
+ method: 'GET',
417
+ url: '/api/v2/CartService/Carts/{cartId}/Contains/{itemId}',
418
+ path: {
419
+ 'cartId': cartId,
420
+ 'itemId': itemId,
421
+ },
422
+ headers: {
423
+ 'x-api-version': xApiVersion,
424
+ },
425
+ errors: {
426
+ 401: `Unauthorized`,
427
+ 404: `Not Found`,
428
+ },
429
+ });
430
+ }
431
+ /**
432
+ * Increase an Item in a cart
433
+ * Increase an Item in a cart
434
+ * @param cartId
435
+ * @param itemId
436
+ * @param xApiVersion
437
+ * @param requestBody
438
+ * @returns EmptyEnvelope OK
439
+ * @throws ApiError
440
+ */
441
+ static increaseItemCartRecordQuantityAsync(cartId, itemId, xApiVersion, requestBody) {
442
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
443
+ method: 'PUT',
444
+ url: '/api/v2/CartService/Carts/{cartId}/Items/{itemId}/Increase',
445
+ path: {
446
+ 'cartId': cartId,
447
+ 'itemId': itemId,
448
+ },
449
+ headers: {
450
+ 'x-api-version': xApiVersion,
451
+ },
452
+ body: requestBody,
453
+ mediaType: 'application/json',
454
+ errors: {
455
+ 401: `Unauthorized`,
456
+ 404: `Not Found`,
457
+ },
458
+ });
459
+ }
460
+ /**
461
+ * Decrease an Item in a cart
462
+ * Decrease an Item in a cart
463
+ * @param cartId
464
+ * @param itemId
465
+ * @param xApiVersion
466
+ * @param requestBody
467
+ * @returns EmptyEnvelope OK
468
+ * @throws ApiError
469
+ */
470
+ static removeItemFromCartAsync1(cartId, itemId, xApiVersion, requestBody) {
471
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
472
+ method: 'PUT',
473
+ url: '/api/v2/CartService/Carts/{cartId}/Items/{itemId}/Decrease',
474
+ path: {
475
+ 'cartId': cartId,
476
+ 'itemId': itemId,
477
+ },
478
+ headers: {
479
+ 'x-api-version': xApiVersion,
480
+ },
481
+ body: requestBody,
482
+ mediaType: 'application/json',
483
+ errors: {
484
+ 401: `Unauthorized`,
485
+ 404: `Not Found`,
486
+ },
487
+ });
488
+ }
489
+ /**
490
+ * Get all cart lines
491
+ * Get all cart lines
492
+ * @param cartId
493
+ * @param xApiVersion
494
+ * @returns ItemCartRecordDtoListEnvelope OK
495
+ * @throws ApiError
496
+ */
497
+ static getCartLinesAsync(cartId, xApiVersion) {
498
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
499
+ method: 'GET',
500
+ url: '/api/v2/CartService/Carts/{cartId}/Lines',
501
+ path: {
502
+ 'cartId': cartId,
503
+ },
504
+ headers: {
505
+ 'x-api-version': xApiVersion,
506
+ },
507
+ errors: {
508
+ 401: `Unauthorized`,
509
+ 404: `Not Found`,
510
+ },
511
+ });
512
+ }
513
+ /**
514
+ * Get a cart line by ID
515
+ * Get a cart line by ID
516
+ * @param cartId
517
+ * @param lineId
518
+ * @param xApiVersion
519
+ * @returns EmptyEnvelope OK
520
+ * @throws ApiError
521
+ */
522
+ static getCartLineAsync(cartId, lineId, xApiVersion) {
523
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
524
+ method: 'GET',
525
+ url: '/api/v2/CartService/Carts/{cartId}/Lines/{lineId}',
526
+ path: {
527
+ 'cartId': cartId,
528
+ 'lineId': lineId,
529
+ },
530
+ headers: {
531
+ 'x-api-version': xApiVersion,
532
+ },
533
+ errors: {
534
+ 401: `Unauthorized`,
535
+ 404: `Not Found`,
536
+ },
537
+ });
538
+ }
539
+ /**
540
+ * Update a cart line
541
+ * Update a cart line
542
+ * @param cartId
543
+ * @param lineId
544
+ * @param xApiVersion
545
+ * @param requestBody
546
+ * @returns EmptyEnvelope OK
547
+ * @throws ApiError
548
+ */
549
+ static updateCartLineAsync(cartId, lineId, xApiVersion, requestBody) {
550
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
551
+ method: 'PUT',
552
+ url: '/api/v2/CartService/Carts/{cartId}/Lines/{lineId}',
553
+ path: {
554
+ 'cartId': cartId,
555
+ 'lineId': lineId,
556
+ },
557
+ headers: {
558
+ 'x-api-version': xApiVersion,
559
+ },
560
+ body: requestBody,
561
+ mediaType: 'application/json',
562
+ errors: {
563
+ 401: `Unauthorized`,
564
+ 404: `Not Found`,
565
+ },
566
+ });
567
+ }
568
+ /**
569
+ * Remove a cart line
570
+ * Remove a cart line
571
+ * @param cartId
572
+ * @param lineId
573
+ * @param xApiVersion
574
+ * @returns EmptyEnvelope OK
575
+ * @throws ApiError
576
+ */
577
+ static removeCartLineAsync(cartId, lineId, xApiVersion) {
578
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
579
+ method: 'DELETE',
580
+ url: '/api/v2/CartService/Carts/{cartId}/Lines/{lineId}',
581
+ path: {
582
+ 'cartId': cartId,
583
+ 'lineId': lineId,
584
+ },
585
+ headers: {
586
+ 'x-api-version': xApiVersion,
587
+ },
588
+ errors: {
589
+ 401: `Unauthorized`,
590
+ 404: `Not Found`,
591
+ },
592
+ });
593
+ }
594
+ /**
595
+ * Increase the quantity of a cart line
596
+ * Increase the quantity of a cart line
597
+ * @param cartId
598
+ * @param lineId
599
+ * @param quantity
600
+ * @param xApiVersion
601
+ * @returns EmptyEnvelope OK
602
+ * @throws ApiError
603
+ */
604
+ static increaseCartLineAsync(cartId, lineId, quantity = 1, xApiVersion) {
605
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
606
+ method: 'PUT',
607
+ url: '/api/v2/CartService/Carts/{cartId}/Lines/{lineId}/Increase',
608
+ path: {
609
+ 'cartId': cartId,
610
+ 'lineId': lineId,
611
+ },
612
+ headers: {
613
+ 'x-api-version': xApiVersion,
614
+ },
615
+ query: {
616
+ 'quantity': quantity,
617
+ },
618
+ errors: {
619
+ 401: `Unauthorized`,
620
+ 404: `Not Found`,
621
+ },
622
+ });
623
+ }
624
+ /**
625
+ * Decrease the quantity of a cart line
626
+ * Decrease the quantity of a cart line
627
+ * @param cartId
628
+ * @param lineId
629
+ * @param quantity
630
+ * @param xApiVersion
631
+ * @returns EmptyEnvelope OK
632
+ * @throws ApiError
633
+ */
634
+ static decreaseCartLineAsync(cartId, lineId, quantity = 1, xApiVersion) {
635
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
636
+ method: 'PUT',
637
+ url: '/api/v2/CartService/Carts/{cartId}/Lines/{lineId}/Decrease',
638
+ path: {
639
+ 'cartId': cartId,
640
+ 'lineId': lineId,
641
+ },
642
+ headers: {
643
+ 'x-api-version': xApiVersion,
644
+ },
645
+ query: {
646
+ 'quantity': quantity,
647
+ },
648
+ errors: {
649
+ 401: `Unauthorized`,
650
+ 404: `Not Found`,
651
+ },
652
+ });
653
+ }
654
+ /**
655
+ * Get all wishlists in a cart
656
+ * Get all wishlists in a cart
657
+ * @param cartId
658
+ * @param xApiVersion
659
+ * @returns WishListDto OK
660
+ * @throws ApiError
661
+ */
662
+ static getWishListAsync(cartId, xApiVersion) {
663
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
664
+ method: 'GET',
665
+ url: '/api/v2/CartService/Carts/{cartId}/WishLists',
666
+ path: {
667
+ 'cartId': cartId,
668
+ },
669
+ headers: {
670
+ 'x-api-version': xApiVersion,
671
+ },
672
+ errors: {
673
+ 401: `Unauthorized`,
674
+ 404: `Not Found`,
675
+ },
676
+ });
677
+ }
678
+ /**
679
+ * Create a new wish list
680
+ * Create a new wish list
681
+ * @param cartId
682
+ * @param xApiVersion
683
+ * @param requestBody
684
+ * @returns EmptyEnvelope OK
685
+ * @throws ApiError
686
+ */
687
+ static createWishListAsync(cartId, xApiVersion, requestBody) {
688
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
689
+ method: 'POST',
690
+ url: '/api/v2/CartService/Carts/{cartId}/WishLists',
691
+ path: {
692
+ 'cartId': cartId,
693
+ },
694
+ headers: {
695
+ 'x-api-version': xApiVersion,
696
+ },
697
+ body: requestBody,
698
+ mediaType: 'application/json',
699
+ errors: {
700
+ 401: `Unauthorized`,
701
+ 404: `Not Found`,
702
+ },
703
+ });
704
+ }
705
+ /**
706
+ * Assesses if an Item is already in any of the cart's wishlists
707
+ * Assesses if an Item is already in any of the cart's wishlists
708
+ * @param cartId
709
+ * @param itemId
710
+ * @param xApiVersion
711
+ * @returns BooleanEnvelope OK
712
+ * @throws ApiError
713
+ */
714
+ static isItemInWishLists(cartId, itemId, xApiVersion) {
715
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
716
+ method: 'GET',
717
+ url: '/api/v2/CartService/Carts/{cartId}/WishLists/Contains/{itemId}',
718
+ path: {
719
+ 'cartId': cartId,
720
+ 'itemId': itemId,
721
+ },
722
+ headers: {
723
+ 'x-api-version': xApiVersion,
724
+ },
725
+ errors: {
726
+ 401: `Unauthorized`,
727
+ 404: `Not Found`,
728
+ },
729
+ });
730
+ }
731
+ /**
732
+ * Assesses if a WishList exists
733
+ * Assesses if a WishList exists
734
+ * @param cartId
735
+ * @param wishListId
736
+ * @param xApiVersion
737
+ * @returns BooleanEnvelope OK
738
+ * @throws ApiError
739
+ */
740
+ static wishListExistsAsync(cartId, wishListId, xApiVersion) {
741
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
742
+ method: 'GET',
743
+ url: '/api/v2/CartService/Carts/{cartId}/WishLists/{wishListId}/Exists',
744
+ path: {
745
+ 'cartId': cartId,
746
+ 'wishListId': wishListId,
747
+ },
748
+ headers: {
749
+ 'x-api-version': xApiVersion,
750
+ },
751
+ errors: {
752
+ 401: `Unauthorized`,
753
+ 404: `Not Found`,
754
+ },
755
+ });
756
+ }
757
+ /**
758
+ * Assesses if a WishList exists
759
+ * Assesses if a WishList exists but does not return the content
760
+ * @param cartId
761
+ * @param wishListId
762
+ * @param xApiVersion
763
+ * @returns EmptyEnvelope OK
764
+ * @throws ApiError
765
+ */
766
+ static wishListExistsHeadAsync(cartId, wishListId, xApiVersion) {
767
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
768
+ method: 'HEAD',
769
+ url: '/api/v2/CartService/Carts/{cartId}/WishLists/{wishListId}/Exists',
770
+ path: {
771
+ 'cartId': cartId,
772
+ 'wishListId': wishListId,
773
+ },
774
+ headers: {
775
+ 'x-api-version': xApiVersion,
776
+ },
777
+ errors: {
778
+ 401: `Unauthorized`,
779
+ 404: `Not Found`,
780
+ },
781
+ });
782
+ }
783
+ /**
784
+ * Update a wish list
785
+ * Update a wish list
786
+ * @param cartId
787
+ * @param wishListId
788
+ * @param xApiVersion
789
+ * @param requestBody
790
+ * @returns EmptyEnvelope OK
791
+ * @throws ApiError
792
+ */
793
+ static updateItemToWishList(cartId, wishListId, xApiVersion, requestBody) {
794
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
795
+ method: 'PUT',
796
+ url: '/api/v2/CartService/Carts/{cartId}/WishLists/{wishListId}',
797
+ path: {
798
+ 'cartId': cartId,
799
+ 'wishListId': wishListId,
800
+ },
801
+ headers: {
802
+ 'x-api-version': xApiVersion,
803
+ },
804
+ body: requestBody,
805
+ mediaType: 'application/json',
806
+ errors: {
807
+ 401: `Unauthorized`,
808
+ 404: `Not Found`,
809
+ },
810
+ });
811
+ }
812
+ /**
813
+ * Get a wish list by ID
814
+ * Get a wish list by ID
815
+ * @param cartId
816
+ * @param wishListId
817
+ * @param xApiVersion
818
+ * @returns WishListDtoEnvelope OK
819
+ * @throws ApiError
820
+ */
821
+ static getCartWishListDetailsAsync(cartId, wishListId, xApiVersion) {
822
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
823
+ method: 'GET',
824
+ url: '/api/v2/CartService/Carts/{cartId}/WishLists/{wishListId}',
825
+ path: {
826
+ 'cartId': cartId,
827
+ 'wishListId': wishListId,
828
+ },
829
+ headers: {
830
+ 'x-api-version': xApiVersion,
831
+ },
832
+ errors: {
833
+ 401: `Unauthorized`,
834
+ 404: `Not Found`,
835
+ },
836
+ });
837
+ }
838
+ /**
839
+ * Delete a wish list
840
+ * Delete a wish list
841
+ * @param cartId
842
+ * @param wishListId
843
+ * @param xApiVersion
844
+ * @returns EmptyEnvelope OK
845
+ * @throws ApiError
846
+ */
847
+ static deleteWishList(cartId, wishListId, xApiVersion) {
848
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
849
+ method: 'DELETE',
850
+ url: '/api/v2/CartService/Carts/{cartId}/WishLists/{wishListId}',
851
+ path: {
852
+ 'cartId': cartId,
853
+ 'wishListId': wishListId,
854
+ },
855
+ headers: {
856
+ 'x-api-version': xApiVersion,
857
+ },
858
+ errors: {
859
+ 401: `Unauthorized`,
860
+ 404: `Not Found`,
861
+ },
862
+ });
863
+ }
864
+ /**
865
+ * Get all records in a wish list
866
+ * Get all records in a wish list
867
+ * @param cartId
868
+ * @param wishListId
869
+ * @param xApiVersion
870
+ * @returns WishListItemRecordDto OK
871
+ * @throws ApiError
872
+ */
873
+ static getCartWishListItemsAsync(cartId, wishListId, xApiVersion) {
874
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
875
+ method: 'GET',
876
+ url: '/api/v2/CartService/Carts/{cartId}/WishLists/{wishListId}/Records',
877
+ path: {
878
+ 'cartId': cartId,
879
+ 'wishListId': wishListId,
880
+ },
881
+ headers: {
882
+ 'x-api-version': xApiVersion,
883
+ },
884
+ errors: {
885
+ 401: `Unauthorized`,
886
+ 404: `Not Found`,
887
+ },
888
+ });
889
+ }
890
+ /**
891
+ * Add a record to a wish list
892
+ * Add a record to a wish list
893
+ * @param cartId
894
+ * @param wishListId
895
+ * @param xApiVersion
896
+ * @param requestBody
897
+ * @returns EmptyEnvelope OK
898
+ * @throws ApiError
899
+ */
900
+ static addItemToWishList(cartId, wishListId, xApiVersion, requestBody) {
901
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
902
+ method: 'POST',
903
+ url: '/api/v2/CartService/Carts/{cartId}/WishLists/{wishListId}/Records',
904
+ path: {
905
+ 'cartId': cartId,
906
+ 'wishListId': wishListId,
907
+ },
908
+ headers: {
909
+ 'x-api-version': xApiVersion,
910
+ },
911
+ body: requestBody,
912
+ mediaType: 'application/json',
913
+ errors: {
914
+ 401: `Unauthorized`,
915
+ 404: `Not Found`,
916
+ },
917
+ });
918
+ }
919
+ /**
920
+ * Get a record in a wish list
921
+ * Get a record in a wish list
922
+ * @param cartId
923
+ * @param wishListId
924
+ * @param recordId
925
+ * @param xApiVersion
926
+ * @returns WishListItemRecordDto OK
927
+ * @throws ApiError
928
+ */
929
+ static getCartWishListItemAsync(cartId, wishListId, recordId, xApiVersion) {
930
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
931
+ method: 'GET',
932
+ url: '/api/v2/CartService/Carts/{cartId}/WishLists/{wishListId}/Records/{recordId}',
933
+ path: {
934
+ 'cartId': cartId,
935
+ 'wishListId': wishListId,
936
+ 'recordId': recordId,
937
+ },
938
+ headers: {
939
+ 'x-api-version': xApiVersion,
940
+ },
941
+ errors: {
942
+ 401: `Unauthorized`,
943
+ 404: `Not Found`,
944
+ },
945
+ });
946
+ }
947
+ /**
948
+ * Remove a record from a wish list
949
+ * Remove a record from a wish list
950
+ * @param cartId
951
+ * @param wishListId
952
+ * @param recordId
953
+ * @param xApiVersion
954
+ * @returns EmptyEnvelope OK
955
+ * @throws ApiError
956
+ */
957
+ static deleteWishListRecord(cartId, wishListId, recordId, xApiVersion) {
958
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
959
+ method: 'DELETE',
960
+ url: '/api/v2/CartService/Carts/{cartId}/WishLists/{wishListId}/Records/{recordId}',
961
+ path: {
962
+ 'cartId': cartId,
963
+ 'wishListId': wishListId,
964
+ 'recordId': recordId,
965
+ },
966
+ headers: {
967
+ 'x-api-version': xApiVersion,
968
+ },
969
+ errors: {
970
+ 401: `Unauthorized`,
971
+ 404: `Not Found`,
972
+ },
973
+ });
974
+ }
975
+ /**
976
+ * Get all items in the compare table
977
+ * Get all items in the compare table
978
+ * @param cartId
979
+ * @param xApiVersion
980
+ * @returns ItemToCompareCartRecordDtoListEnvelope OK
981
+ * @throws ApiError
982
+ */
983
+ static getItemToCompareRecords(cartId, xApiVersion) {
984
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
985
+ method: 'GET',
986
+ url: '/api/v2/CartService/Carts/{cartId}/Compare',
987
+ path: {
988
+ 'cartId': cartId,
989
+ },
990
+ headers: {
991
+ 'x-api-version': xApiVersion,
992
+ },
993
+ errors: {
994
+ 401: `Unauthorized`,
995
+ 404: `Not Found`,
996
+ },
997
+ });
998
+ }
999
+ /**
1000
+ * Get an item from the compare table
1001
+ * Get an item from the compare table
1002
+ * @param cartId
1003
+ * @param itemId
1004
+ * @param xApiVersion
1005
+ * @returns ItemToCompareCartRecordDtoEnvelope OK
1006
+ * @throws ApiError
1007
+ */
1008
+ static getItemToCompareRecord(cartId, itemId, xApiVersion) {
1009
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
1010
+ method: 'GET',
1011
+ url: '/api/v2/CartService/Carts/{cartId}/Compare/{itemId}',
1012
+ path: {
1013
+ 'cartId': cartId,
1014
+ 'itemId': itemId,
1015
+ },
1016
+ headers: {
1017
+ 'x-api-version': xApiVersion,
1018
+ },
1019
+ errors: {
1020
+ 401: `Unauthorized`,
1021
+ 404: `Not Found`,
1022
+ },
1023
+ });
1024
+ }
1025
+ /**
1026
+ * Add an item to the compare table
1027
+ * Add an item to the compare table
1028
+ * @param cartId
1029
+ * @param itemId
1030
+ * @param xApiVersion
1031
+ * @returns ItemCartRecordDto OK
1032
+ * @throws ApiError
1033
+ */
1034
+ static addItemToCompareTableAsync(cartId, itemId, xApiVersion) {
1035
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
1036
+ method: 'POST',
1037
+ url: '/api/v2/CartService/Carts/{cartId}/Compare/{itemId}',
1038
+ path: {
1039
+ 'cartId': cartId,
1040
+ 'itemId': itemId,
1041
+ },
1042
+ headers: {
1043
+ 'x-api-version': xApiVersion,
1044
+ },
1045
+ errors: {
1046
+ 401: `Unauthorized`,
1047
+ 404: `Not Found`,
1048
+ },
1049
+ });
1050
+ }
1051
+ /**
1052
+ * Remove an item from the compare table
1053
+ * Remove an item from the compare table
1054
+ * @param cartId
1055
+ * @param itemId
1056
+ * @param xApiVersion
1057
+ * @returns ItemToCompareCartRecordDto OK
1058
+ * @throws ApiError
1059
+ */
1060
+ static removeItemFromCompareTableAsync(cartId, itemId, xApiVersion) {
1061
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
1062
+ method: 'DELETE',
1063
+ url: '/api/v2/CartService/Carts/{cartId}/Compare/{itemId}',
1064
+ path: {
1065
+ 'cartId': cartId,
1066
+ 'itemId': itemId,
1067
+ },
1068
+ headers: {
1069
+ 'x-api-version': xApiVersion,
1070
+ },
1071
+ errors: {
1072
+ 401: `Unauthorized`,
1073
+ 404: `Not Found`,
1074
+ },
1075
+ });
1076
+ }
1077
+ /**
1078
+ * Assesses if an Item is already in the compare table
1079
+ * Assesses if an Item is already in the compare table
1080
+ * @param cartId
1081
+ * @param itemId
1082
+ * @param xApiVersion
1083
+ * @returns BooleanEnvelope OK
1084
+ * @throws ApiError
1085
+ */
1086
+ static isItemInCompareTableAsync(cartId, itemId, xApiVersion) {
1087
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
1088
+ method: 'GET',
1089
+ url: '/api/v2/CartService/Carts/{cartId}/Compare/Contains/{itemId}',
1090
+ path: {
1091
+ 'cartId': cartId,
1092
+ 'itemId': itemId,
1093
+ },
1094
+ headers: {
1095
+ 'x-api-version': xApiVersion,
1096
+ },
1097
+ errors: {
1098
+ 401: `Unauthorized`,
1099
+ 404: `Not Found`,
1100
+ },
1101
+ });
1102
+ }
1103
+ }
1104
+ exports.ECommerceService = ECommerceService;