@epcc-sdk/sdks-cart-checkout-order 0.0.4 → 0.0.6

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,718 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var sdk_gen_exports = {};
20
+ __export(sdk_gen_exports, {
21
+ addCustomDiscountToCartItem: () => addCustomDiscountToCartItem,
22
+ addTaxItemToCart: () => addTaxItemToCart,
23
+ anonymizeOrders: () => anonymizeOrders,
24
+ bulkAddCustomDiscountsToCart: () => bulkAddCustomDiscountsToCart,
25
+ bulkAddTaxItemsToCart: () => bulkAddTaxItemsToCart,
26
+ bulkDeleteCustomDiscountsFromCart: () => bulkDeleteCustomDiscountsFromCart,
27
+ bulkDeleteTaxItemsFromCart: () => bulkDeleteTaxItemsFromCart,
28
+ bulkUpdateItemsInCart: () => bulkUpdateItemsInCart,
29
+ cancelATransaction: () => cancelATransaction,
30
+ captureATransaction: () => captureATransaction,
31
+ checkoutApi: () => checkoutApi,
32
+ client: () => client,
33
+ confirmPayment: () => confirmPayment,
34
+ createACart: () => createACart,
35
+ createAccountCartAssociation: () => createAccountCartAssociation,
36
+ createCartPaymentIntent: () => createCartPaymentIntent,
37
+ createCustomerCartAssociation: () => createCustomerCartAssociation,
38
+ deleteACart: () => deleteACart,
39
+ deleteACartItem: () => deleteACartItem,
40
+ deleteAPromotionViaPromotionCode: () => deleteAPromotionViaPromotionCode,
41
+ deleteATaxItem: () => deleteATaxItem,
42
+ deleteAccountCartAssociation: () => deleteAccountCartAssociation,
43
+ deleteAllCartItems: () => deleteAllCartItems,
44
+ deleteCustomDiscountFromCart: () => deleteCustomDiscountFromCart,
45
+ deleteCustomDiscountFromCartItem: () => deleteCustomDiscountFromCartItem,
46
+ deleteCustomerCartAssociation: () => deleteCustomerCartAssociation,
47
+ getACart: () => getACart,
48
+ getATransaction: () => getATransaction,
49
+ getAnOrder: () => getAnOrder,
50
+ getCartItems: () => getCartItems,
51
+ getCarts: () => getCarts,
52
+ getCustomerOrders: () => getCustomerOrders,
53
+ getOrderItems: () => getOrderItems,
54
+ getOrderTransactions: () => getOrderTransactions,
55
+ manageCarts: () => manageCarts,
56
+ paymentSetup: () => paymentSetup,
57
+ refundATransaction: () => refundATransaction,
58
+ updateACart: () => updateACart,
59
+ updateACartItem: () => updateACartItem,
60
+ updateATaxItem: () => updateATaxItem,
61
+ updateAnOrder: () => updateAnOrder,
62
+ updateCustomDiscountForCart: () => updateCustomDiscountForCart,
63
+ updateCustomDiscountForCartItem: () => updateCustomDiscountForCartItem
64
+ });
65
+ module.exports = __toCommonJS(sdk_gen_exports);
66
+ var import_client_fetch = require("@hey-api/client-fetch");
67
+ const client = (0, import_client_fetch.createClient)((0, import_client_fetch.createConfig)());
68
+ const getCarts = (options) => {
69
+ return (options?.client ?? client).get({
70
+ ...options,
71
+ security: [
72
+ {
73
+ scheme: "bearer",
74
+ type: "http"
75
+ }
76
+ ],
77
+ url: "/v2/carts"
78
+ });
79
+ };
80
+ const createACart = (options) => {
81
+ return (options?.client ?? client).post({
82
+ ...options,
83
+ headers: {
84
+ "Content-Type": "application/json",
85
+ ...options?.headers
86
+ },
87
+ security: [
88
+ {
89
+ scheme: "bearer",
90
+ type: "http"
91
+ }
92
+ ],
93
+ url: "/v2/carts"
94
+ });
95
+ };
96
+ const deleteACart = (options) => {
97
+ return (options?.client ?? client).delete({
98
+ ...options,
99
+ security: [
100
+ {
101
+ scheme: "bearer",
102
+ type: "http"
103
+ }
104
+ ],
105
+ url: "/v2/carts/{cartID}"
106
+ });
107
+ };
108
+ const getACart = (options) => {
109
+ return (options?.client ?? client).get({
110
+ ...options,
111
+ security: [
112
+ {
113
+ scheme: "bearer",
114
+ type: "http"
115
+ }
116
+ ],
117
+ url: "/v2/carts/{cartID}"
118
+ });
119
+ };
120
+ const updateACart = (options) => {
121
+ return (options?.client ?? client).put({
122
+ ...options,
123
+ headers: {
124
+ "Content-Type": "application/json",
125
+ ...options?.headers
126
+ },
127
+ security: [
128
+ {
129
+ scheme: "bearer",
130
+ type: "http"
131
+ }
132
+ ],
133
+ url: "/v2/carts/{cartID}"
134
+ });
135
+ };
136
+ const deleteAllCartItems = (options) => {
137
+ return (options?.client ?? client).delete({
138
+ ...options,
139
+ security: [
140
+ {
141
+ scheme: "bearer",
142
+ type: "http"
143
+ }
144
+ ],
145
+ url: "/v2/carts/{cartID}/items"
146
+ });
147
+ };
148
+ const getCartItems = (options) => {
149
+ return (options?.client ?? client).get({
150
+ ...options,
151
+ security: [
152
+ {
153
+ scheme: "bearer",
154
+ type: "http"
155
+ }
156
+ ],
157
+ url: "/v2/carts/{cartID}/items"
158
+ });
159
+ };
160
+ const manageCarts = (options) => {
161
+ return (options?.client ?? client).post({
162
+ ...options,
163
+ headers: {
164
+ "Content-Type": "application/json",
165
+ ...options?.headers
166
+ },
167
+ security: [
168
+ {
169
+ scheme: "bearer",
170
+ type: "http"
171
+ }
172
+ ],
173
+ url: "/v2/carts/{cartID}/items"
174
+ });
175
+ };
176
+ const bulkUpdateItemsInCart = (options) => {
177
+ return (options?.client ?? client).put({
178
+ ...options,
179
+ headers: {
180
+ "Content-Type": "application/json",
181
+ ...options?.headers
182
+ },
183
+ security: [
184
+ {
185
+ scheme: "bearer",
186
+ type: "http"
187
+ }
188
+ ],
189
+ url: "/v2/carts/{cartID}/items"
190
+ });
191
+ };
192
+ const deleteACartItem = (options) => {
193
+ return (options?.client ?? client).delete({
194
+ ...options,
195
+ security: [
196
+ {
197
+ scheme: "bearer",
198
+ type: "http"
199
+ }
200
+ ],
201
+ url: "/v2/carts/{cartID}/items/{cartitemID}"
202
+ });
203
+ };
204
+ const updateACartItem = (options) => {
205
+ return (options?.client ?? client).put({
206
+ ...options,
207
+ headers: {
208
+ "Content-Type": "application/json",
209
+ ...options?.headers
210
+ },
211
+ security: [
212
+ {
213
+ scheme: "bearer",
214
+ type: "http"
215
+ }
216
+ ],
217
+ url: "/v2/carts/{cartID}/items/{cartitemID}"
218
+ });
219
+ };
220
+ const deleteAccountCartAssociation = (options) => {
221
+ return (options?.client ?? client).delete({
222
+ ...options,
223
+ headers: {
224
+ "Content-Type": "application/json",
225
+ ...options?.headers
226
+ },
227
+ security: [
228
+ {
229
+ scheme: "bearer",
230
+ type: "http"
231
+ }
232
+ ],
233
+ url: "/v2/carts/{cartID}/relationships/accounts"
234
+ });
235
+ };
236
+ const createAccountCartAssociation = (options) => {
237
+ return (options?.client ?? client).post({
238
+ ...options,
239
+ headers: {
240
+ "Content-Type": "application/json",
241
+ ...options?.headers
242
+ },
243
+ security: [
244
+ {
245
+ scheme: "bearer",
246
+ type: "http"
247
+ }
248
+ ],
249
+ url: "/v2/carts/{cartID}/relationships/accounts"
250
+ });
251
+ };
252
+ const deleteCustomerCartAssociation = (options) => {
253
+ return (options?.client ?? client).delete({
254
+ ...options,
255
+ headers: {
256
+ "Content-Type": "application/json",
257
+ ...options?.headers
258
+ },
259
+ security: [
260
+ {
261
+ scheme: "bearer",
262
+ type: "http"
263
+ }
264
+ ],
265
+ url: "/v2/carts/{cartID}/relationships/customers"
266
+ });
267
+ };
268
+ const createCustomerCartAssociation = (options) => {
269
+ return (options?.client ?? client).post({
270
+ ...options,
271
+ headers: {
272
+ "Content-Type": "application/json",
273
+ ...options?.headers
274
+ },
275
+ security: [
276
+ {
277
+ scheme: "bearer",
278
+ type: "http"
279
+ }
280
+ ],
281
+ url: "/v2/carts/{cartID}/relationships/customers"
282
+ });
283
+ };
284
+ const deleteAPromotionViaPromotionCode = (options) => {
285
+ return (options?.client ?? client).delete({
286
+ ...options,
287
+ security: [
288
+ {
289
+ scheme: "bearer",
290
+ type: "http"
291
+ }
292
+ ],
293
+ url: "/v2/carts/{cartID}/discounts/{promoCode}"
294
+ });
295
+ };
296
+ const addTaxItemToCart = (options) => {
297
+ return (options?.client ?? client).post({
298
+ ...options,
299
+ headers: {
300
+ "Content-Type": "application/json",
301
+ ...options?.headers
302
+ },
303
+ security: [
304
+ {
305
+ scheme: "bearer",
306
+ type: "http"
307
+ }
308
+ ],
309
+ url: "/v2/carts/{cartID}/items/{cartitemID}/taxes"
310
+ });
311
+ };
312
+ const bulkDeleteTaxItemsFromCart = (options) => {
313
+ return (options?.client ?? client).delete({
314
+ ...options,
315
+ security: [
316
+ {
317
+ scheme: "bearer",
318
+ type: "http"
319
+ }
320
+ ],
321
+ url: "/v2/carts/{cartID}/taxes"
322
+ });
323
+ };
324
+ const bulkAddTaxItemsToCart = (options) => {
325
+ return (options?.client ?? client).post({
326
+ ...options,
327
+ headers: {
328
+ "Content-Type": "application/json",
329
+ ...options?.headers
330
+ },
331
+ security: [
332
+ {
333
+ scheme: "bearer",
334
+ type: "http"
335
+ }
336
+ ],
337
+ url: "/v2/carts/{cartID}/taxes"
338
+ });
339
+ };
340
+ const deleteATaxItem = (options) => {
341
+ return (options?.client ?? client).delete({
342
+ ...options,
343
+ security: [
344
+ {
345
+ scheme: "bearer",
346
+ type: "http"
347
+ }
348
+ ],
349
+ url: "/v2/carts/{cartID}/items/{cartitemID}/taxes/{taxitemID}"
350
+ });
351
+ };
352
+ const updateATaxItem = (options) => {
353
+ return (options?.client ?? client).put({
354
+ ...options,
355
+ headers: {
356
+ "Content-Type": "application/json",
357
+ ...options?.headers
358
+ },
359
+ security: [
360
+ {
361
+ scheme: "bearer",
362
+ type: "http"
363
+ }
364
+ ],
365
+ url: "/v2/carts/{cartID}/items/{cartitemID}/taxes/{taxitemID}"
366
+ });
367
+ };
368
+ const bulkDeleteCustomDiscountsFromCart = (options) => {
369
+ return (options?.client ?? client).delete({
370
+ ...options,
371
+ security: [
372
+ {
373
+ scheme: "bearer",
374
+ type: "http"
375
+ }
376
+ ],
377
+ url: "/v2/carts/{cartID}/custom-discounts"
378
+ });
379
+ };
380
+ const bulkAddCustomDiscountsToCart = (options) => {
381
+ return (options?.client ?? client).post({
382
+ ...options,
383
+ headers: {
384
+ "Content-Type": "application/json",
385
+ ...options?.headers
386
+ },
387
+ security: [
388
+ {
389
+ scheme: "bearer",
390
+ type: "http"
391
+ }
392
+ ],
393
+ url: "/v2/carts/{cartID}/custom-discounts"
394
+ });
395
+ };
396
+ const deleteCustomDiscountFromCart = (options) => {
397
+ return (options?.client ?? client).delete({
398
+ ...options,
399
+ security: [
400
+ {
401
+ scheme: "bearer",
402
+ type: "http"
403
+ }
404
+ ],
405
+ url: "/v2/carts/{cartID}/custom-discounts/{customdiscountID}"
406
+ });
407
+ };
408
+ const updateCustomDiscountForCart = (options) => {
409
+ return (options?.client ?? client).put({
410
+ ...options,
411
+ headers: {
412
+ "Content-Type": "application/json",
413
+ ...options?.headers
414
+ },
415
+ security: [
416
+ {
417
+ scheme: "bearer",
418
+ type: "http"
419
+ }
420
+ ],
421
+ url: "/v2/carts/{cartID}/custom-discounts/{customdiscountID}"
422
+ });
423
+ };
424
+ const addCustomDiscountToCartItem = (options) => {
425
+ return (options?.client ?? client).post({
426
+ ...options,
427
+ headers: {
428
+ "Content-Type": "application/json",
429
+ ...options?.headers
430
+ },
431
+ security: [
432
+ {
433
+ scheme: "bearer",
434
+ type: "http"
435
+ }
436
+ ],
437
+ url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts"
438
+ });
439
+ };
440
+ const deleteCustomDiscountFromCartItem = (options) => {
441
+ return (options?.client ?? client).delete({
442
+ ...options,
443
+ security: [
444
+ {
445
+ scheme: "bearer",
446
+ type: "http"
447
+ }
448
+ ],
449
+ url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts/{customdiscountID}"
450
+ });
451
+ };
452
+ const updateCustomDiscountForCartItem = (options) => {
453
+ return (options?.client ?? client).put({
454
+ ...options,
455
+ headers: {
456
+ "Content-Type": "application/json",
457
+ ...options?.headers
458
+ },
459
+ security: [
460
+ {
461
+ scheme: "bearer",
462
+ type: "http"
463
+ }
464
+ ],
465
+ url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts/{customdiscountID}"
466
+ });
467
+ };
468
+ const createCartPaymentIntent = (options) => {
469
+ return (options?.client ?? client).post({
470
+ ...options,
471
+ headers: {
472
+ "Content-Type": "application/json",
473
+ ...options?.headers
474
+ },
475
+ security: [
476
+ {
477
+ scheme: "bearer",
478
+ type: "http"
479
+ }
480
+ ],
481
+ url: "/v2/carts/{cartID}/payments"
482
+ });
483
+ };
484
+ const checkoutApi = (options) => {
485
+ return (options?.client ?? client).post({
486
+ ...options,
487
+ headers: {
488
+ "Content-Type": "application/json",
489
+ ...options?.headers
490
+ },
491
+ security: [
492
+ {
493
+ scheme: "bearer",
494
+ type: "http"
495
+ }
496
+ ],
497
+ url: "/v2/carts/{cartID}/checkout"
498
+ });
499
+ };
500
+ const getCustomerOrders = (options) => {
501
+ return (options?.client ?? client).get({
502
+ ...options,
503
+ security: [
504
+ {
505
+ scheme: "bearer",
506
+ type: "http"
507
+ }
508
+ ],
509
+ url: "/v2/orders"
510
+ });
511
+ };
512
+ const getAnOrder = (options) => {
513
+ return (options?.client ?? client).get({
514
+ ...options,
515
+ security: [
516
+ {
517
+ scheme: "bearer",
518
+ type: "http"
519
+ }
520
+ ],
521
+ url: "/v2/orders/{orderID}"
522
+ });
523
+ };
524
+ const updateAnOrder = (options) => {
525
+ return (options?.client ?? client).put({
526
+ ...options,
527
+ headers: {
528
+ "Content-Type": "application/json",
529
+ ...options?.headers
530
+ },
531
+ security: [
532
+ {
533
+ scheme: "bearer",
534
+ type: "http"
535
+ }
536
+ ],
537
+ url: "/v2/orders/{orderID}"
538
+ });
539
+ };
540
+ const getOrderItems = (options) => {
541
+ return (options?.client ?? client).get({
542
+ ...options,
543
+ security: [
544
+ {
545
+ scheme: "bearer",
546
+ type: "http"
547
+ }
548
+ ],
549
+ url: "/v2/orders/{orderID}/items"
550
+ });
551
+ };
552
+ const anonymizeOrders = (options) => {
553
+ return (options?.client ?? client).post({
554
+ ...options,
555
+ headers: {
556
+ "Content-Type": "application/json",
557
+ ...options?.headers
558
+ },
559
+ security: [
560
+ {
561
+ scheme: "bearer",
562
+ type: "http"
563
+ }
564
+ ],
565
+ url: "/v2/orders/anonymize"
566
+ });
567
+ };
568
+ const paymentSetup = (options) => {
569
+ return (options?.client ?? client).post({
570
+ ...options,
571
+ headers: {
572
+ "Content-Type": "application/json",
573
+ ...options?.headers
574
+ },
575
+ security: [
576
+ {
577
+ scheme: "bearer",
578
+ type: "http"
579
+ }
580
+ ],
581
+ url: "/v2/orders/{orderID}/payments"
582
+ });
583
+ };
584
+ const confirmPayment = (options) => {
585
+ return (options?.client ?? client).post({
586
+ ...options,
587
+ headers: {
588
+ "Content-Type": "application/json",
589
+ ...options?.headers
590
+ },
591
+ security: [
592
+ {
593
+ scheme: "bearer",
594
+ type: "http"
595
+ }
596
+ ],
597
+ url: "/v2/orders/{orderID}/transactions/{transactionID}/confirm"
598
+ });
599
+ };
600
+ const captureATransaction = (options) => {
601
+ return (options?.client ?? client).post({
602
+ ...options,
603
+ headers: {
604
+ "Content-Type": "application/json",
605
+ ...options?.headers
606
+ },
607
+ security: [
608
+ {
609
+ scheme: "bearer",
610
+ type: "http"
611
+ }
612
+ ],
613
+ url: "/v2/orders/{orderID}/transactions/{transactionID}/capture"
614
+ });
615
+ };
616
+ const refundATransaction = (options) => {
617
+ return (options?.client ?? client).post({
618
+ ...options,
619
+ headers: {
620
+ "Content-Type": "application/json",
621
+ ...options?.headers
622
+ },
623
+ security: [
624
+ {
625
+ scheme: "bearer",
626
+ type: "http"
627
+ }
628
+ ],
629
+ url: "/v2/orders/{orderID}/transactions/{transactionID}/refund"
630
+ });
631
+ };
632
+ const getOrderTransactions = (options) => {
633
+ return (options?.client ?? client).get({
634
+ ...options,
635
+ security: [
636
+ {
637
+ scheme: "bearer",
638
+ type: "http"
639
+ }
640
+ ],
641
+ url: "/v2/orders/{orderID}/transactions"
642
+ });
643
+ };
644
+ const getATransaction = (options) => {
645
+ return (options?.client ?? client).get({
646
+ ...options,
647
+ security: [
648
+ {
649
+ scheme: "bearer",
650
+ type: "http"
651
+ }
652
+ ],
653
+ url: "/v2/orders/{orderID}/transactions/{transactionID}"
654
+ });
655
+ };
656
+ const cancelATransaction = (options) => {
657
+ return (options?.client ?? client).post({
658
+ ...options,
659
+ headers: {
660
+ "Content-Type": "application/json",
661
+ ...options?.headers
662
+ },
663
+ security: [
664
+ {
665
+ scheme: "bearer",
666
+ type: "http"
667
+ }
668
+ ],
669
+ url: "/v2/orders/{orderID}/transactions/{transactionID}/cancel"
670
+ });
671
+ };
672
+ // Annotate the CommonJS export names for ESM import in node:
673
+ 0 && (module.exports = {
674
+ addCustomDiscountToCartItem,
675
+ addTaxItemToCart,
676
+ anonymizeOrders,
677
+ bulkAddCustomDiscountsToCart,
678
+ bulkAddTaxItemsToCart,
679
+ bulkDeleteCustomDiscountsFromCart,
680
+ bulkDeleteTaxItemsFromCart,
681
+ bulkUpdateItemsInCart,
682
+ cancelATransaction,
683
+ captureATransaction,
684
+ checkoutApi,
685
+ client,
686
+ confirmPayment,
687
+ createACart,
688
+ createAccountCartAssociation,
689
+ createCartPaymentIntent,
690
+ createCustomerCartAssociation,
691
+ deleteACart,
692
+ deleteACartItem,
693
+ deleteAPromotionViaPromotionCode,
694
+ deleteATaxItem,
695
+ deleteAccountCartAssociation,
696
+ deleteAllCartItems,
697
+ deleteCustomDiscountFromCart,
698
+ deleteCustomDiscountFromCartItem,
699
+ deleteCustomerCartAssociation,
700
+ getACart,
701
+ getATransaction,
702
+ getAnOrder,
703
+ getCartItems,
704
+ getCarts,
705
+ getCustomerOrders,
706
+ getOrderItems,
707
+ getOrderTransactions,
708
+ manageCarts,
709
+ paymentSetup,
710
+ refundATransaction,
711
+ updateACart,
712
+ updateACartItem,
713
+ updateATaxItem,
714
+ updateAnOrder,
715
+ updateCustomDiscountForCart,
716
+ updateCustomDiscountForCartItem
717
+ });
718
+ //# sourceMappingURL=sdk.gen.cjs.map