@basedone/core 0.1.10 → 0.2.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 (54) hide show
  1. package/dist/chunk-4UEJOM6W.mjs +1 -3
  2. package/dist/chunk-MVFO4WRF.mjs +2091 -0
  3. package/dist/chunk-VBC6EQ7Q.mjs +235 -0
  4. package/dist/client-CgmiTuEX.d.mts +179 -0
  5. package/dist/client-CgmiTuEX.d.ts +179 -0
  6. package/dist/ecommerce.d.mts +3986 -0
  7. package/dist/ecommerce.d.ts +3986 -0
  8. package/dist/ecommerce.js +2135 -0
  9. package/dist/ecommerce.mjs +2 -0
  10. package/dist/index.d.mts +51 -43
  11. package/dist/index.d.ts +51 -43
  12. package/dist/index.js +2795 -205
  13. package/dist/index.mjs +68 -90
  14. package/dist/{meta-FVJIMALT.mjs → meta-JB5ITE27.mjs} +4 -10
  15. package/dist/meta-UOGUG3OW.mjs +3 -7
  16. package/dist/{perpDexs-GGL32HT4.mjs → perpDexs-3LRJ5ZHM.mjs} +37 -8
  17. package/dist/{perpDexs-G7V2QIM6.mjs → perpDexs-4ISLD7NX.mjs} +177 -32
  18. package/dist/react.d.mts +39 -0
  19. package/dist/react.d.ts +39 -0
  20. package/dist/react.js +268 -0
  21. package/dist/react.mjs +31 -0
  22. package/dist/{spotMeta-OD7S6HGW.mjs → spotMeta-GHXX7C5M.mjs} +24 -9
  23. package/dist/{spotMeta-PCN4Z4R3.mjs → spotMeta-IBBUP2SG.mjs} +54 -6
  24. package/dist/staticMeta-GM7T3OYL.mjs +3 -6
  25. package/dist/staticMeta-QV2KMX57.mjs +3 -6
  26. package/ecommerce.ts +15 -0
  27. package/index.ts +6 -0
  28. package/lib/ecommerce/FLASH_SALES.md +340 -0
  29. package/lib/ecommerce/QUICK_REFERENCE.md +211 -0
  30. package/lib/ecommerce/README.md +391 -0
  31. package/lib/ecommerce/USAGE_EXAMPLES.md +704 -0
  32. package/lib/ecommerce/client/base.ts +272 -0
  33. package/lib/ecommerce/client/customer.ts +639 -0
  34. package/lib/ecommerce/client/merchant.ts +1341 -0
  35. package/lib/ecommerce/index.ts +51 -0
  36. package/lib/ecommerce/types/entities.ts +791 -0
  37. package/lib/ecommerce/types/enums.ts +270 -0
  38. package/lib/ecommerce/types/index.ts +18 -0
  39. package/lib/ecommerce/types/requests.ts +580 -0
  40. package/lib/ecommerce/types/responses.ts +857 -0
  41. package/lib/ecommerce/utils/errors.ts +113 -0
  42. package/lib/ecommerce/utils/helpers.ts +131 -0
  43. package/lib/hip3/market-info.ts +1 -1
  44. package/lib/instrument/client.ts +351 -0
  45. package/lib/meta/data/mainnet/perpDexs.json +34 -4
  46. package/lib/meta/data/mainnet/spotMeta.json +21 -3
  47. package/lib/meta/data/testnet/meta.json +1 -3
  48. package/lib/meta/data/testnet/perpDexs.json +174 -28
  49. package/lib/meta/data/testnet/spotMeta.json +51 -0
  50. package/lib/react/InstrumentProvider.tsx +69 -0
  51. package/lib/utils/flooredDateTime.ts +55 -0
  52. package/lib/utils/time.ts +51 -0
  53. package/package.json +37 -11
  54. package/react.ts +1 -0
@@ -0,0 +1,857 @@
1
+ /**
2
+ * Ecommerce API Response Types
3
+ *
4
+ * This module contains all response types for the ecommerce API.
5
+ */
6
+
7
+ import {
8
+ Product,
9
+ Order,
10
+ Merchant,
11
+ ProductReview,
12
+ UserShippingAddress,
13
+ Coupon,
14
+ ShippingMethod,
15
+ Shipment,
16
+ Return,
17
+ Banner,
18
+ MediaAsset,
19
+ Message,
20
+ TaxSettings,
21
+ TaxRule,
22
+ TaxNexus,
23
+ TaxReport,
24
+ InventoryAuditEntry,
25
+ CustomerSummary,
26
+ ProductVariant,
27
+ CouponUsage,
28
+ FlashSale,
29
+ } from "./entities";
30
+
31
+ /**
32
+ * Base API response
33
+ */
34
+ export interface ApiResponse<T = any> {
35
+ /** Response data */
36
+ data?: T;
37
+ /** Error message */
38
+ error?: string;
39
+ /** Success flag */
40
+ success?: boolean;
41
+ }
42
+
43
+ /**
44
+ * Paginated response
45
+ */
46
+ export interface PaginatedResponse<T> {
47
+ /** Items */
48
+ items: T[];
49
+ /** Total count */
50
+ total: number;
51
+ /** Limit */
52
+ limit: number;
53
+ /** Offset */
54
+ offset: number;
55
+ }
56
+
57
+ /**
58
+ * List products response
59
+ */
60
+ export interface ListProductsResponse extends PaginatedResponse<Product> {}
61
+
62
+ /**
63
+ * Get product response
64
+ *
65
+ * Note: The API returns the product object directly, not wrapped in a `product` field.
66
+ * This type extends Product to be compatible with the actual API response.
67
+ */
68
+ export type GetProductResponse = Product;
69
+
70
+ /**
71
+ * Create/Update product response
72
+ */
73
+ export interface ProductResponse {
74
+ /** Product */
75
+ product: Product;
76
+ }
77
+
78
+ /**
79
+ * List product variants response
80
+ */
81
+ export interface ListProductVariantsResponse {
82
+ /** Variants */
83
+ variants: ProductVariant[];
84
+ }
85
+
86
+ /**
87
+ * Product variant response
88
+ */
89
+ export interface ProductVariantResponse {
90
+ /** Variant */
91
+ variant: ProductVariant;
92
+ }
93
+
94
+ /**
95
+ * List orders response
96
+ */
97
+ export interface ListOrdersResponse extends PaginatedResponse<Order> {
98
+ /** Merchant information (for merchant endpoints) */
99
+ merchant?: Merchant;
100
+ }
101
+
102
+ /**
103
+ * Get order response
104
+ */
105
+ export interface GetOrderResponse {
106
+ /** Order */
107
+ order: Order;
108
+ }
109
+
110
+ /**
111
+ * Create order response
112
+ */
113
+ export interface CreateOrderResponse {
114
+ /** Created orders (array for multi-merchant checkout) */
115
+ orders: Order[];
116
+ /** Summary */
117
+ summary: {
118
+ /** Total amount */
119
+ totalAmount: string;
120
+ /** Order count */
121
+ orderCount: number;
122
+ /** Merchant names */
123
+ merchantNames: string[];
124
+ };
125
+ /** Escrow payment instructions (for USDC_ESCROW) */
126
+ escrow?: {
127
+ /** Escrow address */
128
+ address: string;
129
+ /** Amount in USDC */
130
+ amountUSDC: string;
131
+ };
132
+ /** Test mode flag */
133
+ testMode?: boolean;
134
+ }
135
+
136
+ /**
137
+ * Update order response
138
+ */
139
+ export interface UpdateOrderResponse {
140
+ /** Updated order */
141
+ order: Order;
142
+ }
143
+
144
+ /**
145
+ * Confirm escrow deposit response
146
+ */
147
+ export interface ConfirmEscrowDepositResponse {
148
+ /** Success flag */
149
+ ok: boolean;
150
+ /** Order ID */
151
+ orderId: string;
152
+ /** Order status */
153
+ status: string;
154
+ /** Deposit transaction hash */
155
+ depositTxHash: string | null;
156
+ }
157
+
158
+ /**
159
+ * Order receipt response
160
+ */
161
+ export interface OrderReceiptResponse {
162
+ /** Receipt */
163
+ receipt: {
164
+ /** Order number */
165
+ orderNumber: string;
166
+ /** Order ID */
167
+ orderId: string;
168
+ /** Order date */
169
+ orderDate: string;
170
+ /** Status */
171
+ status: string;
172
+ /** Customer */
173
+ customer: {
174
+ name: string;
175
+ email?: string;
176
+ };
177
+ /** Merchant */
178
+ merchant: {
179
+ name: string;
180
+ };
181
+ /** Shipping address */
182
+ shippingAddress: any;
183
+ /** Items */
184
+ items: Array<{
185
+ title: string;
186
+ quantity: number;
187
+ unitPrice: string;
188
+ totalPrice: string;
189
+ }>;
190
+ /** Subtotal */
191
+ subtotal: string;
192
+ /** Tax */
193
+ tax: string;
194
+ /** Shipping */
195
+ shipping: string;
196
+ /** Total */
197
+ total: string;
198
+ /** Payment */
199
+ payment: {
200
+ method: string;
201
+ status?: string;
202
+ transactionHash?: string | null;
203
+ };
204
+ };
205
+ }
206
+
207
+ /**
208
+ * List reviews response
209
+ */
210
+ export interface ListReviewsResponse extends PaginatedResponse<ProductReview> {}
211
+
212
+ /**
213
+ * Create/Update review response
214
+ */
215
+ export interface ReviewResponse {
216
+ /** Review */
217
+ review: ProductReview;
218
+ }
219
+
220
+ /**
221
+ * List shipping addresses response
222
+ */
223
+ export interface ListShippingAddressesResponse {
224
+ /** Addresses */
225
+ addresses: UserShippingAddress[];
226
+ }
227
+
228
+ /**
229
+ * Shipping address response
230
+ */
231
+ export interface ShippingAddressResponse {
232
+ /** Address */
233
+ address: UserShippingAddress;
234
+ }
235
+
236
+ /**
237
+ * Applied discount
238
+ */
239
+ export interface AppliedDiscount {
240
+ /** Coupon/discount ID */
241
+ id: string;
242
+ /** Code */
243
+ code: string;
244
+ /** Title */
245
+ title?: string | null;
246
+ /** Discount type */
247
+ discountType: string;
248
+ /** Discount amount */
249
+ discountAmount: number;
250
+ /** Description */
251
+ description?: string;
252
+ }
253
+
254
+ /**
255
+ * Calculate cart discounts response
256
+ */
257
+ export interface CalculateCartDiscountsResponse {
258
+ /** Subtotal */
259
+ subtotal: number;
260
+ /** Discount amount */
261
+ discountAmount: number;
262
+ /** Total */
263
+ total: number;
264
+ /** Applied discounts */
265
+ appliedDiscounts: AppliedDiscount[];
266
+ }
267
+
268
+ /**
269
+ * Validate discount response
270
+ */
271
+ export interface ValidateDiscountResponse {
272
+ /** Is valid */
273
+ valid: boolean;
274
+ /** Error message */
275
+ error?: string;
276
+ /** Discount */
277
+ discount?: {
278
+ /** Coupon ID */
279
+ id: string;
280
+ /** Code */
281
+ code: string;
282
+ /** Title */
283
+ title?: string | null;
284
+ /** Discount type */
285
+ discountType: string;
286
+ /** Discount amount */
287
+ discountAmount: number;
288
+ };
289
+ /** Subtotal */
290
+ subtotal?: number;
291
+ /** Total */
292
+ total?: number;
293
+ }
294
+
295
+ /**
296
+ * Tax breakdown item
297
+ */
298
+ export interface TaxBreakdownItem {
299
+ /** Tax type */
300
+ taxType: string;
301
+ /** Tax name */
302
+ taxName: string;
303
+ /** Tax rate */
304
+ taxRate: number;
305
+ /** Tax amount */
306
+ taxAmount: number;
307
+ /** Country */
308
+ country: string;
309
+ /** Region */
310
+ region?: string;
311
+ }
312
+
313
+ /**
314
+ * Calculate tax response
315
+ */
316
+ export interface CalculateTaxResponse {
317
+ /** Subtotal */
318
+ subtotal: number;
319
+ /** Tax amount */
320
+ taxAmount: number;
321
+ /** Total */
322
+ total: number;
323
+ /** Tax breakdown */
324
+ breakdown: TaxBreakdownItem[];
325
+ /** Merchant tax details (for multi-merchant) */
326
+ merchantTaxDetails?: Array<{
327
+ merchantId: string;
328
+ subtotal: number;
329
+ taxAmount: number;
330
+ hasNexus: boolean;
331
+ breakdown: TaxBreakdownItem[];
332
+ }>;
333
+ }
334
+
335
+ /**
336
+ * Merchant profile response
337
+ */
338
+ export interface MerchantProfileResponse {
339
+ /** Merchant */
340
+ merchant: Merchant;
341
+ }
342
+
343
+ /**
344
+ * List coupons response
345
+ */
346
+ export interface ListCouponsResponse {
347
+ /** Coupons */
348
+ coupons: Coupon[];
349
+ /** Stats */
350
+ stats: {
351
+ total: number;
352
+ active: number;
353
+ totalUsages: number;
354
+ totalDiscount: number;
355
+ };
356
+ }
357
+
358
+ /**
359
+ * Coupon response
360
+ */
361
+ export interface CouponResponse {
362
+ /** Coupon */
363
+ coupon: Coupon;
364
+ }
365
+
366
+ /**
367
+ * Get coupon with usages response
368
+ */
369
+ export interface GetCouponResponse {
370
+ /** Coupon with usages */
371
+ coupon: Coupon & {
372
+ usages: Array<CouponUsage & {
373
+ user: {
374
+ username?: string;
375
+ };
376
+ }>;
377
+ };
378
+ }
379
+
380
+ /**
381
+ * List shipping methods response
382
+ */
383
+ export interface ListShippingMethodsResponse {
384
+ /** Methods */
385
+ methods: ShippingMethod[];
386
+ }
387
+
388
+ /**
389
+ * Shipping method response
390
+ */
391
+ export interface ShippingMethodResponse {
392
+ /** Method */
393
+ method: ShippingMethod;
394
+ }
395
+
396
+ /**
397
+ * List shipments response
398
+ */
399
+ export interface ListShipmentsResponse {
400
+ /** Shipments */
401
+ shipments: Array<Shipment & {
402
+ order: {
403
+ id: string;
404
+ totalUSDC: string;
405
+ shippingAddress: any;
406
+ user: {
407
+ id: string;
408
+ username?: string;
409
+ };
410
+ };
411
+ }>;
412
+ }
413
+
414
+ /**
415
+ * Shipment response
416
+ */
417
+ export interface ShipmentResponse {
418
+ /** Shipment */
419
+ shipment: Shipment;
420
+ }
421
+
422
+ /**
423
+ * List returns response
424
+ */
425
+ export interface ListReturnsResponse {
426
+ /** Returns */
427
+ returns: Array<Return & {
428
+ user: {
429
+ id: string;
430
+ username?: string;
431
+ };
432
+ order: {
433
+ id: string;
434
+ totalUSDC: string;
435
+ };
436
+ }>;
437
+ }
438
+
439
+ /**
440
+ * Return response
441
+ */
442
+ export interface ReturnResponse {
443
+ /** Return */
444
+ return: Return;
445
+ }
446
+
447
+ /**
448
+ * List banners response
449
+ */
450
+ export interface ListBannersResponse {
451
+ /** Banners */
452
+ banners: Banner[];
453
+ }
454
+
455
+ /**
456
+ * Banner response
457
+ */
458
+ export interface BannerResponse {
459
+ /** Banner */
460
+ banner: Banner;
461
+ }
462
+
463
+ /**
464
+ * List media assets response
465
+ */
466
+ export interface ListMediaAssetsResponse extends PaginatedResponse<MediaAsset> {}
467
+
468
+ /**
469
+ * Media asset response
470
+ */
471
+ export interface MediaAssetResponse {
472
+ /** Asset */
473
+ asset: MediaAsset;
474
+ }
475
+
476
+ /**
477
+ * List messages response
478
+ */
479
+ export interface ListMessagesResponse {
480
+ /** Conversations */
481
+ conversations: Array<{
482
+ orderId: string;
483
+ orderNumber: string;
484
+ customer: {
485
+ id: string;
486
+ name?: string;
487
+ username?: string;
488
+ };
489
+ lastMessage: Message;
490
+ unreadCount: number;
491
+ messages: Message[];
492
+ }>;
493
+ /** Stats */
494
+ stats: {
495
+ total: number;
496
+ unread: number;
497
+ };
498
+ }
499
+
500
+ /**
501
+ * Message response
502
+ */
503
+ export interface MessageResponse {
504
+ /** Message */
505
+ message: Message;
506
+ }
507
+
508
+ /**
509
+ * Customer messages response (for retail users)
510
+ *
511
+ * Groups messages by order, where each order represents a conversation with a merchant.
512
+ */
513
+ export interface CustomerMessagesResponse {
514
+ /** Conversations grouped by order */
515
+ conversations: Array<{
516
+ orderId: string;
517
+ orderNumber: string;
518
+ merchant: {
519
+ id: string;
520
+ name: string;
521
+ ownerUserId: string;
522
+ };
523
+ lastMessage: Message;
524
+ unreadCount: number;
525
+ messages: Message[];
526
+ }>;
527
+ /** Stats */
528
+ stats: {
529
+ total: number;
530
+ unread: number;
531
+ };
532
+ }
533
+
534
+ /**
535
+ * Message stats response (for notification badges)
536
+ */
537
+ export interface MessageStatsResponse {
538
+ /** Unread message count */
539
+ unread: number;
540
+ }
541
+
542
+ /**
543
+ * Analytics overview
544
+ */
545
+ export interface AnalyticsOverview {
546
+ /** Total revenue */
547
+ totalRevenue: number;
548
+ /** Revenue change percentage */
549
+ revenueChange: number;
550
+ /** Total orders */
551
+ totalOrders: number;
552
+ /** Orders change percentage */
553
+ ordersChange: number;
554
+ /** Average order value */
555
+ averageOrderValue: number;
556
+ /** AOV change percentage */
557
+ aovChange: number;
558
+ /** Total customers */
559
+ totalCustomers: number;
560
+ /** Customers change percentage */
561
+ customersChange: number;
562
+ }
563
+
564
+ /**
565
+ * Revenue by day
566
+ */
567
+ export interface RevenueByDay {
568
+ /** Date */
569
+ date: string;
570
+ /** Revenue */
571
+ revenue: number;
572
+ /** Orders */
573
+ orders: number;
574
+ }
575
+
576
+ /**
577
+ * Top product
578
+ */
579
+ export interface TopProduct {
580
+ /** Product ID */
581
+ id: string;
582
+ /** Name */
583
+ name: string;
584
+ /** Image */
585
+ image: string | null;
586
+ /** Sold count */
587
+ soldCount: number;
588
+ /** Revenue */
589
+ revenue: number;
590
+ /** View count */
591
+ viewCount: number;
592
+ }
593
+
594
+ /**
595
+ * Orders by status
596
+ */
597
+ export interface OrdersByStatus {
598
+ /** Status */
599
+ status: string;
600
+ /** Count */
601
+ count: number;
602
+ /** Percentage */
603
+ percentage: number;
604
+ }
605
+
606
+ /**
607
+ * Recent order summary
608
+ */
609
+ export interface RecentOrderSummary {
610
+ /** Order ID */
611
+ id: string;
612
+ /** Order number */
613
+ orderNumber: string;
614
+ /** Total amount */
615
+ totalAmount: number;
616
+ /** Status */
617
+ status: string;
618
+ /** Created at */
619
+ createdAt: string;
620
+ /** Buyer */
621
+ buyer: {
622
+ username?: string;
623
+ };
624
+ }
625
+
626
+ /**
627
+ * Get analytics response
628
+ */
629
+ export interface GetAnalyticsResponse {
630
+ /** Overview */
631
+ overview: AnalyticsOverview;
632
+ /** Revenue by day */
633
+ revenueByDay: RevenueByDay[];
634
+ /** Top products */
635
+ topProducts: TopProduct[];
636
+ /** Orders by status */
637
+ ordersByStatus: OrdersByStatus[];
638
+ /** Recent orders */
639
+ recentOrders: RecentOrderSummary[];
640
+ }
641
+
642
+ /**
643
+ * Product metrics
644
+ */
645
+ export interface ProductMetrics {
646
+ /** Product ID */
647
+ id: string;
648
+ /** Name */
649
+ name: string;
650
+ /** Images */
651
+ images: string[];
652
+ /** View count */
653
+ viewCount: number;
654
+ /** Sold count */
655
+ soldCount: number;
656
+ /** Revenue */
657
+ revenue: number;
658
+ /** Average rating */
659
+ averageRating: number;
660
+ /** Review count */
661
+ reviewCount: number;
662
+ /** Wishlist count */
663
+ wishlistCount: number;
664
+ /** Conversion rate */
665
+ conversionRate: number;
666
+ /** Stock */
667
+ stock: number;
668
+ /** Is active */
669
+ isActive: boolean;
670
+ /** Featured */
671
+ featured: boolean;
672
+ /** Created at */
673
+ createdAt: string;
674
+ }
675
+
676
+ /**
677
+ * Get product metrics response
678
+ */
679
+ export interface GetProductMetricsResponse {
680
+ /** Products */
681
+ products: ProductMetrics[];
682
+ /** Summary */
683
+ summary: {
684
+ totalProducts: number;
685
+ totalViews: number;
686
+ totalSales: number;
687
+ totalRevenue: number;
688
+ averageConversion: number;
689
+ };
690
+ }
691
+
692
+ /**
693
+ * List inventory audit response
694
+ */
695
+ export interface ListInventoryAuditResponse {
696
+ /** Entries */
697
+ entries: Array<InventoryAuditEntry & {
698
+ product: {
699
+ id: string;
700
+ title: string;
701
+ images: string[];
702
+ };
703
+ variant?: {
704
+ id: string;
705
+ name: string;
706
+ };
707
+ }>;
708
+ }
709
+
710
+ /**
711
+ * List customers response
712
+ */
713
+ export interface ListCustomersResponse extends PaginatedResponse<CustomerSummary> {}
714
+
715
+ /**
716
+ * Tax settings response
717
+ */
718
+ export interface TaxSettingsResponse {
719
+ /** Settings */
720
+ settings: TaxSettings;
721
+ }
722
+
723
+ /**
724
+ * List tax rules response
725
+ */
726
+ export interface ListTaxRulesResponse {
727
+ /** Rules */
728
+ rules: TaxRule[];
729
+ }
730
+
731
+ /**
732
+ * Tax rule response
733
+ */
734
+ export interface TaxRuleResponse {
735
+ /** Rule */
736
+ rule: TaxRule;
737
+ }
738
+
739
+ /**
740
+ * List tax nexus response
741
+ */
742
+ export interface ListTaxNexusResponse {
743
+ /** Nexus */
744
+ nexus: TaxNexus[];
745
+ }
746
+
747
+ /**
748
+ * Tax nexus response
749
+ */
750
+ export interface TaxNexusResponse {
751
+ /** Nexus */
752
+ nexus: TaxNexus;
753
+ }
754
+
755
+ /**
756
+ * List tax reports response
757
+ */
758
+ export interface ListTaxReportsResponse extends PaginatedResponse<TaxReport> {
759
+ /** Summary (if year filter is provided) */
760
+ summary?: {
761
+ year: number;
762
+ totalTaxable: string;
763
+ totalTax: string;
764
+ reportCount: number;
765
+ };
766
+ }
767
+
768
+ /**
769
+ * Tax report details
770
+ */
771
+ export interface TaxReportDetails {
772
+ /** Order ID */
773
+ orderId: string;
774
+ /** Order date */
775
+ orderDate: string;
776
+ /** Customer */
777
+ customer: string;
778
+ /** Subtotal */
779
+ subtotal: string;
780
+ /** Tax amount */
781
+ taxAmount: string;
782
+ /** Total */
783
+ total: string;
784
+ /** Tax breakdown */
785
+ breakdown: TaxBreakdownItem[];
786
+ }
787
+
788
+ /**
789
+ * Get tax report response
790
+ */
791
+ export interface GetTaxReportResponse {
792
+ /** Report */
793
+ report: TaxReport;
794
+ /** Details */
795
+ details: TaxReportDetails[];
796
+ }
797
+
798
+ /**
799
+ * Tax report response
800
+ */
801
+ export interface TaxReportResponse {
802
+ /** Report */
803
+ report: TaxReport;
804
+ }
805
+
806
+ /**
807
+ * Success response
808
+ */
809
+ export interface SuccessResponse {
810
+ /** Success flag */
811
+ success: boolean;
812
+ }
813
+
814
+ /**
815
+ * Product discounts response
816
+ */
817
+ export interface ProductDiscountsResponse {
818
+ /** Discounts */
819
+ discounts: Array<{
820
+ id: string;
821
+ title: string;
822
+ description: string;
823
+ badge: string;
824
+ discountType: string;
825
+ discountValue: number;
826
+ discountAmount: number;
827
+ minPurchase: number | null;
828
+ minQuantity: number | null;
829
+ expiresAt: string;
830
+ }>;
831
+ }
832
+
833
+ /**
834
+ * Create order event response
835
+ */
836
+ export interface CreateOrderEventResponse {
837
+ /** Event */
838
+ event: any;
839
+ }
840
+
841
+ /**
842
+ * Active flash sales response
843
+ */
844
+ export interface ActiveFlashSalesResponse {
845
+ /** Flash sales */
846
+ flashSales: FlashSale[];
847
+ /** Time remaining for the featured/first sale */
848
+ timeRemaining: {
849
+ /** End timestamp */
850
+ endsAt: string;
851
+ /** Remaining seconds */
852
+ remainingSeconds: number;
853
+ } | null;
854
+ /** Server time (for client-side sync) */
855
+ serverTime: string;
856
+ }
857
+