@usethrottle/api-client 0.2.0 → 1.0.1

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.
Files changed (65) hide show
  1. package/dist/generated/index.d.ts +2 -0
  2. package/dist/generated/index.d.ts.map +1 -1
  3. package/dist/generated/index.js +2 -0
  4. package/dist/generated/index.js.map +1 -1
  5. package/dist/generated/services/ApiKeysService.d.ts +1 -1
  6. package/dist/generated/services/ApiKeysService.d.ts.map +1 -1
  7. package/dist/generated/services/AuditService.d.ts +11 -0
  8. package/dist/generated/services/AuditService.d.ts.map +1 -0
  9. package/dist/generated/services/AuditService.js +20 -0
  10. package/dist/generated/services/AuditService.js.map +1 -0
  11. package/dist/generated/services/BigCommerceService.d.ts +14 -1
  12. package/dist/generated/services/BigCommerceService.d.ts.map +1 -1
  13. package/dist/generated/services/BigCommerceService.js +27 -1
  14. package/dist/generated/services/BigCommerceService.js.map +1 -1
  15. package/dist/generated/services/CartsService.d.ts +651 -35
  16. package/dist/generated/services/CartsService.d.ts.map +1 -1
  17. package/dist/generated/services/CartsService.js +87 -0
  18. package/dist/generated/services/CartsService.js.map +1 -1
  19. package/dist/generated/services/CheckoutSessionsService.d.ts +14 -0
  20. package/dist/generated/services/CheckoutSessionsService.d.ts.map +1 -1
  21. package/dist/generated/services/CheckoutSessionsService.js +30 -0
  22. package/dist/generated/services/CheckoutSessionsService.js.map +1 -1
  23. package/dist/generated/services/ConnectorsService.d.ts +65 -2
  24. package/dist/generated/services/ConnectorsService.d.ts.map +1 -1
  25. package/dist/generated/services/ConnectorsService.js +98 -0
  26. package/dist/generated/services/ConnectorsService.js.map +1 -1
  27. package/dist/generated/services/CustomersService.d.ts +7 -0
  28. package/dist/generated/services/CustomersService.d.ts.map +1 -1
  29. package/dist/generated/services/CustomersService.js +15 -0
  30. package/dist/generated/services/CustomersService.js.map +1 -1
  31. package/dist/generated/services/DefaultService.d.ts +101 -0
  32. package/dist/generated/services/DefaultService.d.ts.map +1 -1
  33. package/dist/generated/services/DefaultService.js +214 -0
  34. package/dist/generated/services/DefaultService.js.map +1 -1
  35. package/dist/generated/services/DiscountsService.d.ts +108 -12
  36. package/dist/generated/services/DiscountsService.d.ts.map +1 -1
  37. package/dist/generated/services/DiscountsService.js +14 -0
  38. package/dist/generated/services/DiscountsService.js.map +1 -1
  39. package/dist/generated/services/FulfillmentsService.d.ts +47 -41
  40. package/dist/generated/services/FulfillmentsService.d.ts.map +1 -1
  41. package/dist/generated/services/FulfillmentsService.js.map +1 -1
  42. package/dist/generated/services/MerchantService.d.ts +44 -0
  43. package/dist/generated/services/MerchantService.d.ts.map +1 -0
  44. package/dist/generated/services/MerchantService.js +66 -0
  45. package/dist/generated/services/MerchantService.js.map +1 -0
  46. package/dist/generated/services/OrdersService.d.ts +20 -0
  47. package/dist/generated/services/OrdersService.d.ts.map +1 -1
  48. package/dist/generated/services/OrdersService.js.map +1 -1
  49. package/dist/generated/services/PaymentMethodsService.d.ts +3 -1
  50. package/dist/generated/services/PaymentMethodsService.d.ts.map +1 -1
  51. package/dist/generated/services/PaymentMethodsService.js +7 -1
  52. package/dist/generated/services/PaymentMethodsService.js.map +1 -1
  53. package/dist/generated/services/PaymentsService.d.ts +62 -0
  54. package/dist/generated/services/PaymentsService.d.ts.map +1 -1
  55. package/dist/generated/services/PaymentsService.js +115 -0
  56. package/dist/generated/services/PaymentsService.js.map +1 -1
  57. package/dist/generated/services/SubscriptionsService.d.ts +14 -1
  58. package/dist/generated/services/SubscriptionsService.d.ts.map +1 -1
  59. package/dist/generated/services/SubscriptionsService.js +17 -1
  60. package/dist/generated/services/SubscriptionsService.js.map +1 -1
  61. package/dist/generated/services/WebhooksOutboundService.d.ts +35 -4
  62. package/dist/generated/services/WebhooksOutboundService.d.ts.map +1 -1
  63. package/dist/generated/services/WebhooksOutboundService.js +58 -3
  64. package/dist/generated/services/WebhooksOutboundService.js.map +1 -1
  65. package/package.json +12 -9
@@ -17,9 +17,9 @@ export declare class CartsService {
17
17
  }): CancelablePromise<{
18
18
  data?: {
19
19
  id?: string;
20
- merchant_id?: string;
21
- store_id?: string | null;
22
- customer_id?: string | null;
20
+ merchantId?: string;
21
+ storeId?: string | null;
22
+ customerId?: string | null;
23
23
  status?: 'open' | 'checkout' | 'converted' | 'abandoned';
24
24
  currency?: string;
25
25
  /**
@@ -29,21 +29,63 @@ export declare class CartsService {
29
29
  /**
30
30
  * Amount in cents (e.g. 1999 = $19.99)
31
31
  */
32
- tax_total?: number;
32
+ taxTotal?: number;
33
33
  /**
34
34
  * Amount in cents (e.g. 1999 = $19.99)
35
35
  */
36
- discount_total?: number;
36
+ discountTotal?: number;
37
+ /**
38
+ * Amount in cents (e.g. 1999 = $19.99)
39
+ */
40
+ shippingTotal?: number;
37
41
  /**
38
42
  * Amount in cents (e.g. 1999 = $19.99)
39
43
  */
40
44
  total?: number;
41
- discount_code?: string | null;
45
+ discountCode?: string | null;
46
+ appliedDiscount?: ({
47
+ discountId?: string | null;
48
+ code?: string;
49
+ type?: 'percentage' | 'fixed_amount';
50
+ /**
51
+ * Amount in cents (e.g. 1999 = $19.99)
52
+ */
53
+ amount?: number;
54
+ currency?: string;
55
+ freeShipping?: boolean;
56
+ validUntil?: string | null;
57
+ snapshotHash?: string;
58
+ } | null);
59
+ selectedShipping?: ({
60
+ methodId?: string;
61
+ displayName?: string;
62
+ /**
63
+ * Amount in cents (e.g. 1999 = $19.99)
64
+ */
65
+ rateAmount?: number;
66
+ currency?: string;
67
+ carrier?: string;
68
+ serviceCode?: string;
69
+ estimatedDeliveryDays?: number;
70
+ } | null);
71
+ taxLines?: Array<{
72
+ id?: string;
73
+ lineItemId?: string;
74
+ jurisdictionCode?: string;
75
+ jurisdictionName?: string | null;
76
+ taxType?: string;
77
+ rate?: number;
78
+ /**
79
+ * Amount in cents (e.g. 1999 = $19.99)
80
+ */
81
+ amount?: number;
82
+ currency?: string | null;
83
+ }>;
42
84
  /**
43
85
  * Arbitrary key-value metadata
44
86
  */
45
87
  metadata?: Record<string, any>;
46
- created_at?: string;
88
+ createdAt?: string;
47
89
  };
48
90
  meta?: {
49
91
  request_id?: string;
@@ -62,9 +104,9 @@ export declare class CartsService {
62
104
  static getApiV1Carts(id: string): CancelablePromise<{
63
105
  data?: {
64
106
  id?: string;
65
- merchant_id?: string;
66
- store_id?: string | null;
67
- customer_id?: string | null;
107
+ merchantId?: string;
108
+ storeId?: string | null;
109
+ customerId?: string | null;
68
110
  status?: 'open' | 'checkout' | 'converted' | 'abandoned';
69
111
  currency?: string;
70
112
  /**
@@ -74,21 +116,63 @@ export declare class CartsService {
74
116
  /**
75
117
  * Amount in cents (e.g. 1999 = $19.99)
76
118
  */
77
- tax_total?: number;
119
+ taxTotal?: number;
120
+ /**
121
+ * Amount in cents (e.g. 1999 = $19.99)
122
+ */
123
+ discountTotal?: number;
78
124
  /**
79
125
  * Amount in cents (e.g. 1999 = $19.99)
80
126
  */
81
- discount_total?: number;
127
+ shippingTotal?: number;
82
128
  /**
83
129
  * Amount in cents (e.g. 1999 = $19.99)
84
130
  */
85
131
  total?: number;
86
- discount_code?: string | null;
132
+ discountCode?: string | null;
133
+ appliedDiscount?: ({
134
+ discountId?: string | null;
135
+ code?: string;
136
+ type?: 'percentage' | 'fixed_amount';
137
+ /**
138
+ * Amount in cents (e.g. 1999 = $19.99)
139
+ */
140
+ amount?: number;
141
+ currency?: string;
142
+ freeShipping?: boolean;
143
+ validUntil?: string | null;
144
+ snapshotHash?: string;
145
+ } | null);
146
+ selectedShipping?: ({
147
+ methodId?: string;
148
+ displayName?: string;
149
+ /**
150
+ * Amount in cents (e.g. 1999 = $19.99)
151
+ */
152
+ rateAmount?: number;
153
+ currency?: string;
154
+ carrier?: string;
155
+ serviceCode?: string;
156
+ estimatedDeliveryDays?: number;
157
+ } | null);
158
+ taxLines?: Array<{
159
+ id?: string;
160
+ lineItemId?: string;
161
+ jurisdictionCode?: string;
162
+ jurisdictionName?: string | null;
163
+ taxType?: string;
164
+ rate?: number;
165
+ /**
166
+ * Amount in cents (e.g. 1999 = $19.99)
167
+ */
168
+ amount?: number;
169
+ currency?: string | null;
170
+ }>;
87
171
  /**
88
172
  * Arbitrary key-value metadata
89
173
  */
90
174
  metadata?: Record<string, any>;
91
- created_at?: string;
175
+ createdAt?: string;
92
176
  };
93
177
  meta?: {
94
178
  request_id?: string;
@@ -117,9 +201,9 @@ export declare class CartsService {
117
201
  }): CancelablePromise<{
118
202
  data?: {
119
203
  id?: string;
120
- merchant_id?: string;
121
- store_id?: string | null;
122
- customer_id?: string | null;
204
+ merchantId?: string;
205
+ storeId?: string | null;
206
+ customerId?: string | null;
123
207
  status?: 'open' | 'checkout' | 'converted' | 'abandoned';
124
208
  currency?: string;
125
209
  /**
@@ -129,21 +213,63 @@ export declare class CartsService {
129
213
  /**
130
214
  * Amount in cents (e.g. 1999 = $19.99)
131
215
  */
132
- tax_total?: number;
216
+ taxTotal?: number;
217
+ /**
218
+ * Amount in cents (e.g. 1999 = $19.99)
219
+ */
220
+ discountTotal?: number;
133
221
  /**
134
222
  * Amount in cents (e.g. 1999 = $19.99)
135
223
  */
136
- discount_total?: number;
224
+ shippingTotal?: number;
137
225
  /**
138
226
  * Amount in cents (e.g. 1999 = $19.99)
139
227
  */
140
228
  total?: number;
141
- discount_code?: string | null;
229
+ discountCode?: string | null;
230
+ appliedDiscount?: ({
231
+ discountId?: string | null;
232
+ code?: string;
233
+ type?: 'percentage' | 'fixed_amount';
234
+ /**
235
+ * Amount in cents (e.g. 1999 = $19.99)
236
+ */
237
+ amount?: number;
238
+ currency?: string;
239
+ freeShipping?: boolean;
240
+ validUntil?: string | null;
241
+ snapshotHash?: string;
242
+ } | null);
243
+ selectedShipping?: ({
244
+ methodId?: string;
245
+ displayName?: string;
246
+ /**
247
+ * Amount in cents (e.g. 1999 = $19.99)
248
+ */
249
+ rateAmount?: number;
250
+ currency?: string;
251
+ carrier?: string;
252
+ serviceCode?: string;
253
+ estimatedDeliveryDays?: number;
254
+ } | null);
255
+ taxLines?: Array<{
256
+ id?: string;
257
+ lineItemId?: string;
258
+ jurisdictionCode?: string;
259
+ jurisdictionName?: string | null;
260
+ taxType?: string;
261
+ rate?: number;
262
+ /**
263
+ * Amount in cents (e.g. 1999 = $19.99)
264
+ */
265
+ amount?: number;
266
+ currency?: string | null;
267
+ }>;
142
268
  /**
143
269
  * Arbitrary key-value metadata
144
270
  */
145
271
  metadata?: Record<string, any>;
146
- created_at?: string;
272
+ createdAt?: string;
147
273
  };
148
274
  meta?: {
149
275
  request_id?: string;
@@ -196,6 +322,10 @@ export declare class CartsService {
196
322
  * Amount in cents (e.g. 1999 = $19.99)
197
323
  */
198
324
  total?: number;
325
+ /**
326
+ * Arbitrary key-value metadata
327
+ */
328
+ metadata?: Record<string, any>;
199
329
  };
200
330
  meta?: {
201
331
  request_id?: string;
@@ -243,6 +373,10 @@ export declare class CartsService {
243
373
  * Amount in cents (e.g. 1999 = $19.99)
244
374
  */
245
375
  total?: number;
376
+ /**
377
+ * Arbitrary key-value metadata
378
+ */
379
+ metadata?: Record<string, any>;
246
380
  };
247
381
  meta?: {
248
382
  request_id?: string;
@@ -305,9 +439,9 @@ export declare class CartsService {
305
439
  }): CancelablePromise<{
306
440
  data?: {
307
441
  id?: string;
308
- merchant_id?: string;
309
- store_id?: string | null;
310
- customer_id?: string | null;
442
+ merchantId?: string;
443
+ storeId?: string | null;
444
+ customerId?: string | null;
311
445
  status?: 'open' | 'checkout' | 'converted' | 'abandoned';
312
446
  currency?: string;
313
447
  /**
@@ -317,21 +451,63 @@ export declare class CartsService {
317
451
  /**
318
452
  * Amount in cents (e.g. 1999 = $19.99)
319
453
  */
320
- tax_total?: number;
454
+ taxTotal?: number;
321
455
  /**
322
456
  * Amount in cents (e.g. 1999 = $19.99)
323
457
  */
324
- discount_total?: number;
458
+ discountTotal?: number;
459
+ /**
460
+ * Amount in cents (e.g. 1999 = $19.99)
461
+ */
462
+ shippingTotal?: number;
325
463
  /**
326
464
  * Amount in cents (e.g. 1999 = $19.99)
327
465
  */
328
466
  total?: number;
329
- discount_code?: string | null;
467
+ discountCode?: string | null;
468
+ appliedDiscount?: ({
469
+ discountId?: string | null;
470
+ code?: string;
471
+ type?: 'percentage' | 'fixed_amount';
472
+ /**
473
+ * Amount in cents (e.g. 1999 = $19.99)
474
+ */
475
+ amount?: number;
476
+ currency?: string;
477
+ freeShipping?: boolean;
478
+ validUntil?: string | null;
479
+ snapshotHash?: string;
480
+ } | null);
481
+ selectedShipping?: ({
482
+ methodId?: string;
483
+ displayName?: string;
484
+ /**
485
+ * Amount in cents (e.g. 1999 = $19.99)
486
+ */
487
+ rateAmount?: number;
488
+ currency?: string;
489
+ carrier?: string;
490
+ serviceCode?: string;
491
+ estimatedDeliveryDays?: number;
492
+ } | null);
493
+ taxLines?: Array<{
494
+ id?: string;
495
+ lineItemId?: string;
496
+ jurisdictionCode?: string;
497
+ jurisdictionName?: string | null;
498
+ taxType?: string;
499
+ rate?: number;
500
+ /**
501
+ * Amount in cents (e.g. 1999 = $19.99)
502
+ */
503
+ amount?: number;
504
+ currency?: string | null;
505
+ }>;
330
506
  /**
331
507
  * Arbitrary key-value metadata
332
508
  */
333
509
  metadata?: Record<string, any>;
334
- created_at?: string;
510
+ createdAt?: string;
335
511
  };
336
512
  meta?: {
337
513
  request_id?: string;
@@ -350,9 +526,9 @@ export declare class CartsService {
350
526
  static deleteApiV1CartsDiscount(id: string): CancelablePromise<{
351
527
  data?: {
352
528
  id?: string;
353
- merchant_id?: string;
354
- store_id?: string | null;
355
- customer_id?: string | null;
529
+ merchantId?: string;
530
+ storeId?: string | null;
531
+ customerId?: string | null;
356
532
  status?: 'open' | 'checkout' | 'converted' | 'abandoned';
357
533
  currency?: string;
358
534
  /**
@@ -362,22 +538,462 @@ export declare class CartsService {
362
538
  /**
363
539
  * Amount in cents (e.g. 1999 = $19.99)
364
540
  */
365
- tax_total?: number;
541
+ taxTotal?: number;
542
+ /**
543
+ * Amount in cents (e.g. 1999 = $19.99)
544
+ */
545
+ discountTotal?: number;
366
546
  /**
367
547
  * Amount in cents (e.g. 1999 = $19.99)
368
548
  */
369
- discount_total?: number;
549
+ shippingTotal?: number;
370
550
  /**
371
551
  * Amount in cents (e.g. 1999 = $19.99)
372
552
  */
373
553
  total?: number;
374
- discount_code?: string | null;
554
+ discountCode?: string | null;
555
+ appliedDiscount?: ({
556
+ discountId?: string | null;
557
+ code?: string;
558
+ type?: 'percentage' | 'fixed_amount';
559
+ /**
560
+ * Amount in cents (e.g. 1999 = $19.99)
561
+ */
562
+ amount?: number;
563
+ currency?: string;
564
+ freeShipping?: boolean;
565
+ validUntil?: string | null;
566
+ snapshotHash?: string;
567
+ } | null);
568
+ selectedShipping?: ({
569
+ methodId?: string;
570
+ displayName?: string;
571
+ /**
572
+ * Amount in cents (e.g. 1999 = $19.99)
573
+ */
574
+ rateAmount?: number;
575
+ currency?: string;
576
+ carrier?: string;
577
+ serviceCode?: string;
578
+ estimatedDeliveryDays?: number;
579
+ } | null);
580
+ taxLines?: Array<{
581
+ id?: string;
582
+ lineItemId?: string;
583
+ jurisdictionCode?: string;
584
+ jurisdictionName?: string | null;
585
+ taxType?: string;
586
+ rate?: number;
587
+ /**
588
+ * Amount in cents (e.g. 1999 = $19.99)
589
+ */
590
+ amount?: number;
591
+ currency?: string | null;
592
+ }>;
375
593
  /**
376
594
  * Arbitrary key-value metadata
377
595
  */
378
596
  metadata?: Record<string, any>;
379
- created_at?: string;
597
+ createdAt?: string;
598
+ };
599
+ meta?: {
600
+ request_id?: string;
601
+ pagination?: {
602
+ cursor?: string | null;
603
+ has_more?: boolean;
604
+ };
605
+ };
606
+ }>;
607
+ /**
608
+ * Select a shipping method for a cart
609
+ * @param id
610
+ * @param requestBody
611
+ * @returns any Default Response
612
+ * @throws ApiError
613
+ */
614
+ static postApiV1CartsShipping(id: string, requestBody: {
615
+ methodId: string;
616
+ displayName: string;
617
+ /**
618
+ * Amount in cents (e.g. 1999 = $19.99)
619
+ */
620
+ rateAmount: number;
621
+ currency?: string;
622
+ carrier?: string;
623
+ serviceCode?: string;
624
+ estimatedDeliveryDays?: number;
625
+ }): CancelablePromise<{
626
+ data?: {
627
+ id?: string;
628
+ merchantId?: string;
629
+ storeId?: string | null;
630
+ customerId?: string | null;
631
+ status?: 'open' | 'checkout' | 'converted' | 'abandoned';
632
+ currency?: string;
633
+ /**
634
+ * Amount in cents (e.g. 1999 = $19.99)
635
+ */
636
+ subtotal?: number;
637
+ /**
638
+ * Amount in cents (e.g. 1999 = $19.99)
639
+ */
640
+ taxTotal?: number;
641
+ /**
642
+ * Amount in cents (e.g. 1999 = $19.99)
643
+ */
644
+ discountTotal?: number;
645
+ /**
646
+ * Amount in cents (e.g. 1999 = $19.99)
647
+ */
648
+ shippingTotal?: number;
649
+ /**
650
+ * Amount in cents (e.g. 1999 = $19.99)
651
+ */
652
+ total?: number;
653
+ discountCode?: string | null;
654
+ appliedDiscount?: ({
655
+ discountId?: string | null;
656
+ code?: string;
657
+ type?: 'percentage' | 'fixed_amount';
658
+ /**
659
+ * Amount in cents (e.g. 1999 = $19.99)
660
+ */
661
+ amount?: number;
662
+ currency?: string;
663
+ freeShipping?: boolean;
664
+ validUntil?: string | null;
665
+ snapshotHash?: string;
666
+ } | null);
667
+ selectedShipping?: ({
668
+ methodId?: string;
669
+ displayName?: string;
670
+ /**
671
+ * Amount in cents (e.g. 1999 = $19.99)
672
+ */
673
+ rateAmount?: number;
674
+ currency?: string;
675
+ carrier?: string;
676
+ serviceCode?: string;
677
+ estimatedDeliveryDays?: number;
678
+ } | null);
679
+ taxLines?: Array<{
680
+ id?: string;
681
+ lineItemId?: string;
682
+ jurisdictionCode?: string;
683
+ jurisdictionName?: string | null;
684
+ taxType?: string;
685
+ rate?: number;
686
+ /**
687
+ * Amount in cents (e.g. 1999 = $19.99)
688
+ */
689
+ amount?: number;
690
+ currency?: string | null;
691
+ }>;
692
+ /**
693
+ * Arbitrary key-value metadata
694
+ */
695
+ metadata?: Record<string, any>;
696
+ createdAt?: string;
697
+ };
698
+ meta?: {
699
+ request_id?: string;
700
+ pagination?: {
701
+ cursor?: string | null;
702
+ has_more?: boolean;
703
+ };
380
704
  };
705
+ }>;
706
+ /**
707
+ * Clear the selected shipping method from a cart
708
+ * @param id
709
+ * @returns any Default Response
710
+ * @throws ApiError
711
+ */
712
+ static deleteApiV1CartsShipping(id: string): CancelablePromise<{
713
+ data?: {
714
+ id?: string;
715
+ merchantId?: string;
716
+ storeId?: string | null;
717
+ customerId?: string | null;
718
+ status?: 'open' | 'checkout' | 'converted' | 'abandoned';
719
+ currency?: string;
720
+ /**
721
+ * Amount in cents (e.g. 1999 = $19.99)
722
+ */
723
+ subtotal?: number;
724
+ /**
725
+ * Amount in cents (e.g. 1999 = $19.99)
726
+ */
727
+ taxTotal?: number;
728
+ /**
729
+ * Amount in cents (e.g. 1999 = $19.99)
730
+ */
731
+ discountTotal?: number;
732
+ /**
733
+ * Amount in cents (e.g. 1999 = $19.99)
734
+ */
735
+ shippingTotal?: number;
736
+ /**
737
+ * Amount in cents (e.g. 1999 = $19.99)
738
+ */
739
+ total?: number;
740
+ discountCode?: string | null;
741
+ appliedDiscount?: ({
742
+ discountId?: string | null;
743
+ code?: string;
744
+ type?: 'percentage' | 'fixed_amount';
745
+ /**
746
+ * Amount in cents (e.g. 1999 = $19.99)
747
+ */
748
+ amount?: number;
749
+ currency?: string;
750
+ freeShipping?: boolean;
751
+ validUntil?: string | null;
752
+ snapshotHash?: string;
753
+ } | null);
754
+ selectedShipping?: ({
755
+ methodId?: string;
756
+ displayName?: string;
757
+ /**
758
+ * Amount in cents (e.g. 1999 = $19.99)
759
+ */
760
+ rateAmount?: number;
761
+ currency?: string;
762
+ carrier?: string;
763
+ serviceCode?: string;
764
+ estimatedDeliveryDays?: number;
765
+ } | null);
766
+ taxLines?: Array<{
767
+ id?: string;
768
+ lineItemId?: string;
769
+ jurisdictionCode?: string;
770
+ jurisdictionName?: string | null;
771
+ taxType?: string;
772
+ rate?: number;
773
+ /**
774
+ * Amount in cents (e.g. 1999 = $19.99)
775
+ */
776
+ amount?: number;
777
+ currency?: string | null;
778
+ }>;
779
+ /**
780
+ * Arbitrary key-value metadata
781
+ */
782
+ metadata?: Record<string, any>;
783
+ createdAt?: string;
784
+ };
785
+ meta?: {
786
+ request_id?: string;
787
+ pagination?: {
788
+ cursor?: string | null;
789
+ has_more?: boolean;
790
+ };
791
+ };
792
+ }>;
793
+ /**
794
+ * Replace all tax lines on a cart
795
+ * @param id
796
+ * @param requestBody
797
+ * @returns any Default Response
798
+ * @throws ApiError
799
+ */
800
+ static putApiV1CartsTaxLines(id: string, requestBody: {
801
+ lines: Array<{
802
+ lineItemId: string;
803
+ jurisdictionCode: string;
804
+ jurisdictionName?: string;
805
+ taxType: 'sales' | 'vat' | 'gst' | 'pst' | 'hst' | 'service' | 'excise' | 'other';
806
+ rate: number;
807
+ amount: number;
808
+ currency?: string;
809
+ }>;
810
+ }): CancelablePromise<{
811
+ data?: {
812
+ id?: string;
813
+ merchantId?: string;
814
+ storeId?: string | null;
815
+ customerId?: string | null;
816
+ status?: 'open' | 'checkout' | 'converted' | 'abandoned';
817
+ currency?: string;
818
+ /**
819
+ * Amount in cents (e.g. 1999 = $19.99)
820
+ */
821
+ subtotal?: number;
822
+ /**
823
+ * Amount in cents (e.g. 1999 = $19.99)
824
+ */
825
+ taxTotal?: number;
826
+ /**
827
+ * Amount in cents (e.g. 1999 = $19.99)
828
+ */
829
+ discountTotal?: number;
830
+ /**
831
+ * Amount in cents (e.g. 1999 = $19.99)
832
+ */
833
+ shippingTotal?: number;
834
+ /**
835
+ * Amount in cents (e.g. 1999 = $19.99)
836
+ */
837
+ total?: number;
838
+ discountCode?: string | null;
839
+ appliedDiscount?: ({
840
+ discountId?: string | null;
841
+ code?: string;
842
+ type?: 'percentage' | 'fixed_amount';
843
+ /**
844
+ * Amount in cents (e.g. 1999 = $19.99)
845
+ */
846
+ amount?: number;
847
+ currency?: string;
848
+ freeShipping?: boolean;
849
+ validUntil?: string | null;
850
+ snapshotHash?: string;
851
+ } | null);
852
+ selectedShipping?: ({
853
+ methodId?: string;
854
+ displayName?: string;
855
+ /**
856
+ * Amount in cents (e.g. 1999 = $19.99)
857
+ */
858
+ rateAmount?: number;
859
+ currency?: string;
860
+ carrier?: string;
861
+ serviceCode?: string;
862
+ estimatedDeliveryDays?: number;
863
+ } | null);
864
+ taxLines?: Array<{
865
+ id?: string;
866
+ lineItemId?: string;
867
+ jurisdictionCode?: string;
868
+ jurisdictionName?: string | null;
869
+ taxType?: string;
870
+ rate?: number;
871
+ /**
872
+ * Amount in cents (e.g. 1999 = $19.99)
873
+ */
874
+ amount?: number;
875
+ currency?: string | null;
876
+ }>;
877
+ /**
878
+ * Arbitrary key-value metadata
879
+ */
880
+ metadata?: Record<string, any>;
881
+ createdAt?: string;
882
+ };
883
+ meta?: {
884
+ request_id?: string;
885
+ pagination?: {
886
+ cursor?: string | null;
887
+ has_more?: boolean;
888
+ };
889
+ };
890
+ }>;
891
+ /**
892
+ * Clear all tax lines from a cart
893
+ * @param id
894
+ * @returns any Default Response
895
+ * @throws ApiError
896
+ */
897
+ static deleteApiV1CartsTaxLines(id: string): CancelablePromise<{
898
+ data?: {
899
+ id?: string;
900
+ merchantId?: string;
901
+ storeId?: string | null;
902
+ customerId?: string | null;
903
+ status?: 'open' | 'checkout' | 'converted' | 'abandoned';
904
+ currency?: string;
905
+ /**
906
+ * Amount in cents (e.g. 1999 = $19.99)
907
+ */
908
+ subtotal?: number;
909
+ /**
910
+ * Amount in cents (e.g. 1999 = $19.99)
911
+ */
912
+ taxTotal?: number;
913
+ /**
914
+ * Amount in cents (e.g. 1999 = $19.99)
915
+ */
916
+ discountTotal?: number;
917
+ /**
918
+ * Amount in cents (e.g. 1999 = $19.99)
919
+ */
920
+ shippingTotal?: number;
921
+ /**
922
+ * Amount in cents (e.g. 1999 = $19.99)
923
+ */
924
+ total?: number;
925
+ discountCode?: string | null;
926
+ appliedDiscount?: ({
927
+ discountId?: string | null;
928
+ code?: string;
929
+ type?: 'percentage' | 'fixed_amount';
930
+ /**
931
+ * Amount in cents (e.g. 1999 = $19.99)
932
+ */
933
+ amount?: number;
934
+ currency?: string;
935
+ freeShipping?: boolean;
936
+ validUntil?: string | null;
937
+ snapshotHash?: string;
938
+ } | null);
939
+ selectedShipping?: ({
940
+ methodId?: string;
941
+ displayName?: string;
942
+ /**
943
+ * Amount in cents (e.g. 1999 = $19.99)
944
+ */
945
+ rateAmount?: number;
946
+ currency?: string;
947
+ carrier?: string;
948
+ serviceCode?: string;
949
+ estimatedDeliveryDays?: number;
950
+ } | null);
951
+ taxLines?: Array<{
952
+ id?: string;
953
+ lineItemId?: string;
954
+ jurisdictionCode?: string;
955
+ jurisdictionName?: string | null;
956
+ taxType?: string;
957
+ rate?: number;
958
+ /**
959
+ * Amount in cents (e.g. 1999 = $19.99)
960
+ */
961
+ amount?: number;
962
+ currency?: string | null;
963
+ }>;
964
+ /**
965
+ * Arbitrary key-value metadata
966
+ */
967
+ metadata?: Record<string, any>;
968
+ createdAt?: string;
969
+ };
970
+ meta?: {
971
+ request_id?: string;
972
+ pagination?: {
973
+ cursor?: string | null;
974
+ has_more?: boolean;
975
+ };
976
+ };
977
+ }>;
978
+ /**
979
+ * List audit events for a cart
980
+ * @param id
981
+ * @param sinceSequence
982
+ * @param limit
983
+ * @returns any Default Response
984
+ * @throws ApiError
985
+ */
986
+ static getApiV1CartsEvents(id: string, sinceSequence?: number, limit?: number): CancelablePromise<{
987
+ data?: Array<{
988
+ id?: string;
989
+ cartId?: string;
990
+ eventType?: string;
991
+ sequence?: number;
992
+ payload?: Record<string, any>;
993
+ actorType?: string;
994
+ actorId?: string | null;
995
+ createdAt?: string;
996
+ }>;
381
997
  meta?: {
382
998
  request_id?: string;
383
999
  pagination?: {