@mohasinac/appkit 4.1.1 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/client/features/maintenance/index.d.ts +2 -0
- package/dist/_internal/client/features/maintenance/index.js +1 -0
- package/dist/_internal/client/features/maintenance/views/CloudLogsListView.d.ts +9 -0
- package/dist/_internal/client/features/maintenance/views/CloudLogsListView.js +55 -0
- package/dist/_internal/server/features/auctions/index.d.ts +1 -1
- package/dist/_internal/server/features/auctions/index.js +1 -1
- package/dist/_internal/server/features/auctions/service.js +2 -2
- package/dist/_internal/server/features/checkout/actions.d.ts +15 -0
- package/dist/_internal/server/features/checkout/actions.js +245 -182
- package/dist/_internal/server/features/maintenance/cloud-logs-data.d.ts +50 -0
- package/dist/_internal/server/features/maintenance/cloud-logs-data.js +152 -0
- package/dist/_internal/server/functions/scheduled.d.ts +2 -1
- package/dist/_internal/server/functions/scheduled.js +9 -1
- package/dist/_internal/server/jobs/core/jobRunners.js +10 -0
- package/dist/_internal/server/jobs/core/newsletterExport.d.ts +15 -0
- package/dist/_internal/server/jobs/core/newsletterExport.js +43 -0
- package/dist/_internal/server/jobs/core/onOrderCreate.d.ts +4 -12
- package/dist/_internal/server/jobs/core/onOrderCreate.js +3 -3
- package/dist/_internal/server/jobs/core/onOrderStatusChange.d.ts +2 -0
- package/dist/_internal/server/jobs/core/onOrderStatusChange.js +1 -0
- package/dist/_internal/server/jobs/core/onProductWrite.js +14 -2
- package/dist/_internal/server/jobs/core/paymentWindowTimeout.js +1 -0
- package/dist/_internal/server/jobs/core/pendingOrderTimeout.js +1 -0
- package/dist/_internal/server/jobs/core/revenueRollup.d.ts +13 -0
- package/dist/_internal/server/jobs/core/revenueRollup.js +22 -0
- package/dist/_internal/server/jobs/core/whatsappNotify.d.ts +35 -0
- package/dist/_internal/server/jobs/core/whatsappNotify.js +82 -0
- package/dist/_internal/server/jobs/handlers/index.d.ts +1 -0
- package/dist/_internal/server/jobs/handlers/index.js +1 -0
- package/dist/_internal/server/jobs/handlers/revenueRollup.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/revenueRollup.js +2 -0
- package/dist/_internal/shared/features/auctions/config.d.ts +1 -1
- package/dist/_internal/shared/features/auctions/config.js +1 -1
- package/dist/_internal/shared/features/auctions/schema.js +1 -1
- package/dist/_internal/shared/features/cart/schema.js +2 -2
- package/dist/_internal/shared/features/checkout/config.d.ts +7 -0
- package/dist/_internal/shared/features/checkout/config.js +7 -0
- package/dist/_internal/shared/features/events/schema.js +1 -1
- package/dist/_internal/shared/features/orders/schema.js +1 -1
- package/dist/_internal/shared/features/products/schema.js +3 -3
- package/dist/_internal/shared/features/promotions/schema.js +3 -3
- package/dist/_internal/shared/fees/calculator.d.ts +32 -7
- package/dist/_internal/shared/fees/calculator.js +25 -0
- package/dist/client.d.ts +4 -4
- package/dist/client.js +4 -2
- package/dist/constants/api-endpoints.d.ts +9 -6
- package/dist/constants/api-endpoints.js +3 -2
- package/dist/contracts/client-payment-gateway.d.ts +1 -2
- package/dist/features/about/components/AboutView.d.ts +6 -16
- package/dist/features/about/components/AboutView.js +3 -3
- package/dist/features/about/components/FeesView.js +18 -0
- package/dist/features/about/index.d.ts +2 -1
- package/dist/features/about/schemas/firestore.d.ts +47 -0
- package/dist/features/about/schemas/firestore.js +6 -0
- package/dist/features/about/schemas/index.d.ts +210 -0
- package/dist/features/about/schemas/index.js +45 -0
- package/dist/features/account/hooks/useProfile.js +3 -0
- package/dist/features/admin/actions/notification-actions.d.ts +4 -1
- package/dist/features/admin/actions/notification-actions.js +56 -10
- package/dist/features/admin/components/AdminAdsView.js +1 -1
- package/dist/features/admin/components/AdminCarouselGroupEditorView.d.ts +6 -0
- package/dist/features/admin/components/AdminCarouselGroupEditorView.js +50 -0
- package/dist/features/admin/components/AdminCartsView.js +16 -3
- package/dist/features/admin/components/AdminCouponEditorView.js +2 -2
- package/dist/features/admin/components/AdminCouponsView.js +14 -4
- package/dist/features/admin/components/AdminEmployeeEditorView.js +1 -42
- package/dist/features/admin/components/AdminMediaView.js +1 -1
- package/dist/features/admin/components/AdminNewsletterView.js +42 -11
- package/dist/features/admin/components/AdminNotificationsView.js +31 -19
- package/dist/features/admin/components/AdminOrdersView.js +7 -0
- package/dist/features/admin/components/AdminPayoutsView.js +18 -3
- package/dist/features/admin/components/AdminProductsView.js +17 -2
- package/dist/features/admin/components/AdminReviewsView.js +16 -2
- package/dist/features/admin/components/AdminScammersView.js +7 -0
- package/dist/features/admin/components/AdminSectionsView.js +4 -0
- package/dist/features/admin/components/AdminSiteConfigGuideView.js +1 -1
- package/dist/features/admin/components/AdminSiteSettingsView.js +127 -8
- package/dist/features/admin/components/AdminStoreEditorView.d.ts +2 -1
- package/dist/features/admin/components/AdminStoreEditorView.js +4 -4
- package/dist/features/admin/components/AdminStoresView.js +1 -1
- package/dist/features/admin/components/AdminSupportTicketDetailView.js +23 -5
- package/dist/features/admin/components/AdminSupportTicketsView.js +20 -2
- package/dist/features/admin/components/AdminTesterChecklistItemEditorView.js +4 -1
- package/dist/features/admin/components/AdminTesterChecklistView.js +8 -0
- package/dist/features/admin/components/index.d.ts +2 -0
- package/dist/features/admin/components/index.js +1 -0
- package/dist/features/admin/constants/filter-tabs.d.ts +55 -41
- package/dist/features/admin/constants/filter-tabs.js +55 -27
- package/dist/features/admin/repository/analytics-rollup.repository.d.ts +25 -0
- package/dist/features/admin/repository/analytics-rollup.repository.js +31 -0
- package/dist/features/admin/repository/site-settings.repository.js +8 -1
- package/dist/features/admin/schemas/firestore.d.ts +46 -0
- package/dist/features/admin/schemas/firestore.js +62 -24
- package/dist/features/auctions/actions/bid-actions.js +1 -1
- package/dist/features/auctions/components/AuctionDetailPageView.js +2 -2
- package/dist/features/auctions/components/AuctionsListView.js +8 -1
- package/dist/features/auth/components/LoginForm.js +2 -2
- package/dist/features/auth/components/RegisterForm.js +2 -2
- package/dist/features/auth/permissions/constants.d.ts +16 -0
- package/dist/features/auth/permissions/constants.js +53 -0
- package/dist/features/auth/schemas/firestore.js +1 -0
- package/dist/features/blog/components/BlogFilters.js +1 -1
- package/dist/features/cart/schemas/firestore.d.ts +1 -1
- package/dist/features/categories/schemas/firestore.d.ts +1 -1
- package/dist/features/consultation/components/ConsultationForm.js +1 -1
- package/dist/features/events/components/EventFilters.js +2 -0
- package/dist/features/homepage/components/WelcomeSection.js +2 -2
- package/dist/features/layout/BackToTop.d.ts +9 -5
- package/dist/features/layout/BackToTop.js +17 -21
- package/dist/features/layout/TitleBarLayout.d.ts +2 -2
- package/dist/features/layout/TitleBarLayout.js +4 -4
- package/dist/features/media/AvatarUpload.js +7 -3
- package/dist/features/media/MediaVideo.js +1 -1
- package/dist/features/media/finalize.d.ts +9 -13
- package/dist/features/media/finalize.js +23 -74
- package/dist/features/media/server.d.ts +1 -1
- package/dist/features/media/server.js +1 -1
- package/dist/features/orders/actions/refund-actions.js +1 -0
- package/dist/features/orders/hooks/useOrders.js +16 -4
- package/dist/features/orders/schemas/firestore.d.ts +19 -5
- package/dist/features/payments/schemas/firestore.d.ts +2 -2
- package/dist/features/pre-orders/components/PreOrdersListView.js +7 -0
- package/dist/features/products/components/ArtStickersListView.js +5 -0
- package/dist/features/products/components/ProductDetailPageView.d.ts +7 -1
- package/dist/features/products/components/ProductForm.js +14 -1
- package/dist/features/products/components/ProductsIndexPageView.js +7 -0
- package/dist/features/products/constants/action-defs.d.ts +29 -3
- package/dist/features/products/constants/action-defs.js +77 -1
- package/dist/features/products/schemas/firestore.d.ts +1 -1
- package/dist/features/products/schemas/product-templates.d.ts +1 -1
- package/dist/features/products/types/index.d.ts +4 -0
- package/dist/features/scams/schemas/index.js +2 -2
- package/dist/features/search/components/Search.js +3 -3
- package/dist/features/seller/components/SellerAuctionsView.js +27 -2
- package/dist/features/seller/components/SellerOrdersView.js +2 -2
- package/dist/features/seller/components/SellerPayoutsView.js +24 -10
- package/dist/features/seller/components/SellerPreOrdersView.js +12 -4
- package/dist/features/seller/components/SellerPrizeDrawsView.js +23 -5
- package/dist/features/seller/components/SellerProductShell.d.ts +2 -0
- package/dist/features/seller/components/SellerProductShell.js +1 -1
- package/dist/features/seller/components/SellerProductsView.js +8 -6
- package/dist/features/seller/components/SellerReviewsView.js +27 -6
- package/dist/features/seller/components/index.d.ts +0 -2
- package/dist/features/seller/components/index.js +0 -1
- package/dist/features/stores/components/StoreListingsGuideView.js +2 -1
- package/dist/features/stores/components/StoreProductsView.js +1 -1
- package/dist/features/stores/schemas/firestore.d.ts +11 -0
- package/dist/features/stores/schemas/firestore.js +5 -0
- package/dist/features/stores/schemas/index.d.ts +2 -2
- package/dist/features/tester/actions/checklist-item-actions.d.ts +6 -0
- package/dist/features/tester/actions/checklist-item-actions.js +2 -0
- package/dist/features/tester/components/AdminTesterFeedbackIssuesView.js +13 -2
- package/dist/features/tester/components/AdminTesterFeedbackListView.js +2 -1
- package/dist/features/tester/components/AdminTesterFeedbackReportView.js +9 -5
- package/dist/features/tester/components/TesterHubView.js +34 -21
- package/dist/features/tester/repository/tester-checklist-item.repository.js +1 -0
- package/dist/features/tester/repository/tester-checklist-response.repository.d.ts +18 -4
- package/dist/features/tester/repository/tester-checklist-response.repository.js +43 -8
- package/dist/features/tester/schemas/firestore.d.ts +8 -3
- package/dist/features/tester/schemas/firestore.js +6 -0
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +21 -9
- package/dist/features/tester/utils/phases.d.ts +31 -0
- package/dist/features/tester/utils/phases.js +46 -0
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +1 -1
- package/dist/features/whatsapp-bot/helpers/whatsapp.d.ts +10 -1
- package/dist/features/whatsapp-bot/helpers/whatsapp.js +47 -0
- package/dist/features/whatsapp-bot/types/index.d.ts +20 -1
- package/dist/features/wishlist/types/index.d.ts +3 -0
- package/dist/index.d.ts +15 -6
- package/dist/index.js +19 -9
- package/dist/next/components/NotFoundView.js +2 -1
- package/dist/next/routing/route-map.d.ts +6 -12
- package/dist/next/routing/route-map.js +3 -4
- package/dist/providers/db-firebase/admin.d.ts +1 -0
- package/dist/providers/db-firebase/admin.js +1 -1
- package/dist/repositories/index.d.ts +2 -0
- package/dist/repositories/index.js +1 -0
- package/dist/schemas/registry.d.ts +2 -2
- package/dist/seed/addresses-seed-data.js +18 -18
- package/dist/seed/bids-seed-data.js +4 -4
- package/dist/seed/blog-posts-seed-data.js +82 -82
- package/dist/seed/carousel-slides-seed-data.js +14 -10
- package/dist/seed/carousels-seed-data.js +3 -3
- package/dist/seed/cart-seed-data.js +92 -92
- package/dist/seed/claimed-coupons-seed-data.js +10 -10
- package/dist/seed/conversations-seed-data.js +75 -75
- package/dist/seed/coupon-usage-seed-data.js +12 -12
- package/dist/seed/coupons-seed-data.js +41 -41
- package/dist/seed/events-seed-data.js +105 -105
- package/dist/seed/grouped-listings-seed-data.d.ts +2 -137
- package/dist/seed/grouped-listings-seed-data.js +79 -143
- package/dist/seed/history-seed-data.js +38 -38
- package/dist/seed/homepage-sections-seed-data.js +9 -9
- package/dist/seed/notifications-seed-data.js +56 -56
- package/dist/seed/offers-seed-data.js +91 -91
- package/dist/seed/orders-seed-data.js +121 -106
- package/dist/seed/payouts-seed-data.js +42 -42
- package/dist/seed/products-auctions-seed-data.js +10 -2
- package/dist/seed/products-standard-seed-data.js +40 -8
- package/dist/seed/reviews-seed-data.js +42 -23
- package/dist/seed/scammers-seed-data.js +22 -22
- package/dist/seed/sessions-seed-data.js +7 -7
- package/dist/seed/shipments-seed-data.js +10 -10
- package/dist/seed/site-settings-seed-data.js +89 -0
- package/dist/seed/store-addresses-seed-data.js +2 -2
- package/dist/seed/store-extensions-seed-data.js +93 -93
- package/dist/seed/stores-seed-data.js +2 -0
- package/dist/seed/support-tickets-seed-data.js +47 -47
- package/dist/seed/users-seed-data.js +55 -89
- package/dist/seed/wishlists-seed-data.js +22 -22
- package/dist/server.d.ts +4 -3
- package/dist/server.js +7 -7
- package/dist/styles.css +1 -1
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/components/PageLoader.js +8 -3
- package/dist/ui/components/Select.d.ts +8 -1
- package/dist/ui/components/Select.js +2 -2
- package/dist/ui/components/SiteMark.d.ts +23 -0
- package/dist/ui/components/SiteMark.js +76 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +1 -0
- package/dist/validation/schemas.d.ts +0 -2
- package/dist/validation/schemas.js +0 -2
- package/package.json +1 -1
- package/scripts/seed-cli.mjs +17 -15
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* WHY: Seeds buyer ↔ seller conversations for
|
|
3
|
-
* WHAT: 6 conversations covering
|
|
2
|
+
* WHY: Seeds buyer ↔ seller conversations for the Beyblade marketplace.
|
|
3
|
+
* WHAT: 6 conversations covering condition queries, offer negotiation, prize-draw fairness, shipping delays, returns, bulk orders, tracking.
|
|
4
4
|
*
|
|
5
5
|
* EXPORTS:
|
|
6
6
|
* conversationsSeedData — Array of Partial<ConversationDocument> for seed runner
|
|
@@ -17,30 +17,30 @@ const minsAgo = (n) => new Date(NOW.getTime() - n * 60000);
|
|
|
17
17
|
const hoursAgo = (n) => new Date(NOW.getTime() - n * 3600000);
|
|
18
18
|
const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
|
|
19
19
|
export const conversationsSeedData = [
|
|
20
|
-
// ── 1.
|
|
20
|
+
// ── 1. Metal Lightning L-Drago — Pre-purchase condition query ────────────
|
|
21
21
|
{
|
|
22
|
-
id: "conv-
|
|
22
|
+
id: "conv-l-drago-yugi-kaiba-001",
|
|
23
23
|
buyerId: "user-yugi-muto",
|
|
24
|
-
buyerDisplayName: "
|
|
25
|
-
sellerDisplayName: "
|
|
26
|
-
storeId: "store-
|
|
27
|
-
storeName: "
|
|
28
|
-
productId: "auction-
|
|
29
|
-
productTitle: "
|
|
24
|
+
buyerDisplayName: "Mock User 3",
|
|
25
|
+
sellerDisplayName: "Mock User 6",
|
|
26
|
+
storeId: "store-beyblade-arena",
|
|
27
|
+
storeName: "Beyblade Arena",
|
|
28
|
+
productId: "auction-beyblade-metal-lightning-l-drago",
|
|
29
|
+
productTitle: "Beyblade Metal Lightning L-Drago",
|
|
30
30
|
messages: [
|
|
31
31
|
{
|
|
32
32
|
id: "msg-001-1",
|
|
33
33
|
senderId: "user-yugi-muto",
|
|
34
34
|
senderRole: "buyer",
|
|
35
|
-
body: "Hi! Is this
|
|
35
|
+
body: "Hi! Is this a sharp, unrounded tip or has it seen a lot of stadium battles? I'm buying for my collection, not battling, so I want to know the tip wear before I bid.",
|
|
36
36
|
isRead: true,
|
|
37
37
|
sentAt: daysAgo(3),
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
id: "msg-001-2",
|
|
41
|
-
senderId: "user-
|
|
41
|
+
senderId: "user-tyson-blader",
|
|
42
42
|
senderRole: "seller",
|
|
43
|
-
body: "Hey
|
|
43
|
+
body: "Hey Rehan! The tip is factory-sharp with visible grooves — barely used, maybe 10 launches total. No cracks on the layer. This came direct from a sealed Metal Fight booster. Happy to share close-up photos on WhatsApp if you DM me before bidding.",
|
|
44
44
|
isRead: true,
|
|
45
45
|
sentAt: daysAgo(3),
|
|
46
46
|
},
|
|
@@ -48,20 +48,20 @@ export const conversationsSeedData = [
|
|
|
48
48
|
id: "msg-001-3",
|
|
49
49
|
senderId: "user-yugi-muto",
|
|
50
50
|
senderRole: "buyer",
|
|
51
|
-
body: "That sounds great! Can you also confirm
|
|
51
|
+
body: "That sounds great! Can you also confirm it's genuine Takara-Tomy and not a clone?",
|
|
52
52
|
isRead: true,
|
|
53
53
|
sentAt: daysAgo(2),
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
id: "msg-001-4",
|
|
57
|
-
senderId: "user-
|
|
57
|
+
senderId: "user-tyson-blader",
|
|
58
58
|
senderRole: "seller",
|
|
59
|
-
body: "
|
|
59
|
+
body: "100% genuine — laser-etched logo on the underside, verified. Good luck in the auction!",
|
|
60
60
|
isRead: false,
|
|
61
61
|
sentAt: daysAgo(2),
|
|
62
62
|
},
|
|
63
63
|
],
|
|
64
|
-
lastMessage: "
|
|
64
|
+
lastMessage: "100% genuine — laser-etched logo on the underside, verified. Good luck in the auction!",
|
|
65
65
|
lastMessageAt: daysAgo(2),
|
|
66
66
|
unreadBuyer: 1,
|
|
67
67
|
unreadSeller: 0,
|
|
@@ -69,30 +69,30 @@ export const conversationsSeedData = [
|
|
|
69
69
|
createdAt: daysAgo(3),
|
|
70
70
|
updatedAt: daysAgo(2),
|
|
71
71
|
},
|
|
72
|
-
// ── 2.
|
|
72
|
+
// ── 2. Burst Valkyrie — Offer negotiation ────────────────────────────────
|
|
73
73
|
{
|
|
74
|
-
id: "conv-
|
|
74
|
+
id: "conv-burst-valkyrie-yugi-kaiba-002",
|
|
75
75
|
buyerId: "user-yugi-muto",
|
|
76
|
-
buyerDisplayName: "
|
|
77
|
-
sellerDisplayName: "
|
|
78
|
-
storeId: "store-
|
|
79
|
-
storeName: "
|
|
80
|
-
productId: "product-
|
|
81
|
-
productTitle: "
|
|
76
|
+
buyerDisplayName: "Mock User 3",
|
|
77
|
+
sellerDisplayName: "Mock User 6",
|
|
78
|
+
storeId: "store-beyblade-arena",
|
|
79
|
+
storeName: "Beyblade Arena",
|
|
80
|
+
productId: "product-beyblade-burst-valkyrie",
|
|
81
|
+
productTitle: "Beyblade Burst Valkyrie",
|
|
82
82
|
messages: [
|
|
83
83
|
{
|
|
84
84
|
id: "msg-002-1",
|
|
85
85
|
senderId: "user-yugi-muto",
|
|
86
86
|
senderRole: "buyer",
|
|
87
|
-
body: "Would you take ₹
|
|
87
|
+
body: "Would you take ₹1,500 for the Burst Valkyrie? I see it's listed at ₹1,899.",
|
|
88
88
|
isRead: true,
|
|
89
89
|
sentAt: daysAgo(1),
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
id: "msg-002-2",
|
|
93
|
-
senderId: "user-
|
|
93
|
+
senderId: "user-tyson-blader",
|
|
94
94
|
senderRole: "seller",
|
|
95
|
-
body: "Hi
|
|
95
|
+
body: "Hi Rehan! Best I can do is ₹1,700 — it's a clean, sealed piece with no sticker damage. I'll cover shipping at that price.",
|
|
96
96
|
isRead: true,
|
|
97
97
|
sentAt: daysAgo(1),
|
|
98
98
|
},
|
|
@@ -100,12 +100,12 @@ export const conversationsSeedData = [
|
|
|
100
100
|
id: "msg-002-3",
|
|
101
101
|
senderId: "user-yugi-muto",
|
|
102
102
|
senderRole: "buyer",
|
|
103
|
-
body: "Deal at ₹
|
|
103
|
+
body: "Deal at ₹1,700 with free shipping. Can I use the Make Offer feature or should you update the listing?",
|
|
104
104
|
isRead: false,
|
|
105
105
|
sentAt: hoursAgo(8),
|
|
106
106
|
},
|
|
107
107
|
],
|
|
108
|
-
lastMessage: "Deal at ₹
|
|
108
|
+
lastMessage: "Deal at ₹1,700 with free shipping. Can I use the Make Offer feature or should you update the listing?",
|
|
109
109
|
lastMessageAt: hoursAgo(8),
|
|
110
110
|
unreadBuyer: 0,
|
|
111
111
|
unreadSeller: 1,
|
|
@@ -113,22 +113,22 @@ export const conversationsSeedData = [
|
|
|
113
113
|
createdAt: daysAgo(1),
|
|
114
114
|
updatedAt: hoursAgo(8),
|
|
115
115
|
},
|
|
116
|
-
// ── 3.
|
|
116
|
+
// ── 3. Mystery Box — Prize draw fairness question ────────────────────────
|
|
117
117
|
{
|
|
118
|
-
id: "conv-
|
|
118
|
+
id: "conv-mystery-box-yugi-admin-003",
|
|
119
119
|
buyerId: "user-yugi-muto",
|
|
120
|
-
buyerDisplayName: "
|
|
121
|
-
sellerDisplayName: "
|
|
120
|
+
buyerDisplayName: "Mock User 3",
|
|
121
|
+
sellerDisplayName: "Mock User 1",
|
|
122
122
|
storeId: "store-letitrip-official",
|
|
123
123
|
storeName: "LetItRip Official",
|
|
124
|
-
productId: "
|
|
125
|
-
productTitle: "
|
|
124
|
+
productId: "prizedraw-beyblade-mystery-box",
|
|
125
|
+
productTitle: "Beyblade Mystery Box",
|
|
126
126
|
messages: [
|
|
127
127
|
{
|
|
128
128
|
id: "msg-003-1",
|
|
129
129
|
senderId: "user-yugi-muto",
|
|
130
130
|
senderRole: "buyer",
|
|
131
|
-
body: "
|
|
131
|
+
body: "How is the winner for the mystery box actually selected? My friend got burned by a rigged giveaway last month.",
|
|
132
132
|
isRead: true,
|
|
133
133
|
sentAt: daysAgo(2),
|
|
134
134
|
},
|
|
@@ -136,7 +136,7 @@ export const conversationsSeedData = [
|
|
|
136
136
|
id: "msg-003-2",
|
|
137
137
|
senderId: "user-admin-letitrip",
|
|
138
138
|
senderRole: "seller",
|
|
139
|
-
body: "
|
|
139
|
+
body: "Great question — the draw uses a cryptographically random selection (crypto.randomInt) run server-side, logged with a timestamp, and the winner is announced publicly on the event page. No manual picking involved. Happy to walk you through the mechanics before you enter.",
|
|
140
140
|
isRead: true,
|
|
141
141
|
sentAt: daysAgo(2),
|
|
142
142
|
},
|
|
@@ -144,12 +144,12 @@ export const conversationsSeedData = [
|
|
|
144
144
|
id: "msg-003-3",
|
|
145
145
|
senderId: "user-yugi-muto",
|
|
146
146
|
senderRole: "buyer",
|
|
147
|
-
body: "Perfect, that's exactly what I needed to hear.
|
|
147
|
+
body: "Perfect, that's exactly what I needed to hear. Entering now!",
|
|
148
148
|
isRead: true,
|
|
149
149
|
sentAt: daysAgo(1),
|
|
150
150
|
},
|
|
151
151
|
],
|
|
152
|
-
lastMessage: "Perfect, that's exactly what I needed to hear.
|
|
152
|
+
lastMessage: "Perfect, that's exactly what I needed to hear. Entering now!",
|
|
153
153
|
lastMessageAt: daysAgo(1),
|
|
154
154
|
unreadBuyer: 0,
|
|
155
155
|
unreadSeller: 0,
|
|
@@ -157,30 +157,30 @@ export const conversationsSeedData = [
|
|
|
157
157
|
createdAt: daysAgo(2),
|
|
158
158
|
updatedAt: daysAgo(1),
|
|
159
159
|
},
|
|
160
|
-
// ── 4.
|
|
160
|
+
// ── 4. Original Dranzer S — Shipping delay ───────────────────────────────
|
|
161
161
|
{
|
|
162
|
-
id: "conv-
|
|
162
|
+
id: "conv-dranzer-s-admin-kaiba-004",
|
|
163
163
|
buyerId: "user-admin-letitrip",
|
|
164
|
-
buyerDisplayName: "
|
|
165
|
-
sellerDisplayName: "
|
|
166
|
-
storeId: "store-
|
|
167
|
-
storeName: "
|
|
168
|
-
productId: "product-
|
|
169
|
-
productTitle: "
|
|
164
|
+
buyerDisplayName: "Mock User 1",
|
|
165
|
+
sellerDisplayName: "Mock User 6",
|
|
166
|
+
storeId: "store-beyblade-arena",
|
|
167
|
+
storeName: "Beyblade Arena",
|
|
168
|
+
productId: "product-beyblade-original-dranzer-s",
|
|
169
|
+
productTitle: "Beyblade Original Dranzer S",
|
|
170
170
|
messages: [
|
|
171
171
|
{
|
|
172
172
|
id: "msg-004-1",
|
|
173
173
|
senderId: "user-admin-letitrip",
|
|
174
174
|
senderRole: "buyer",
|
|
175
|
-
body: "Hi
|
|
175
|
+
body: "Hi Tyson, I ordered the sealed Dranzer S 3 days ago. The tracking shows it's still at the dispatch hub in Chennai. Is there a delay?",
|
|
176
176
|
isRead: true,
|
|
177
177
|
sentAt: daysAgo(2),
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
180
|
id: "msg-004-2",
|
|
181
|
-
senderId: "user-
|
|
181
|
+
senderId: "user-tyson-blader",
|
|
182
182
|
senderRole: "seller",
|
|
183
|
-
body: "Apologies for the delay! There was a backlog at the courier facility — they've confirmed it will leave
|
|
183
|
+
body: "Apologies for the delay! There was a backlog at the courier facility — they've confirmed it will leave Chennai tonight. Updated tracking should show movement tomorrow morning. If it doesn't arrive by end of week, I'll initiate a replacement. Very sorry for the inconvenience!",
|
|
184
184
|
isRead: true,
|
|
185
185
|
sentAt: daysAgo(2),
|
|
186
186
|
},
|
|
@@ -201,35 +201,35 @@ export const conversationsSeedData = [
|
|
|
201
201
|
createdAt: daysAgo(2),
|
|
202
202
|
updatedAt: daysAgo(1),
|
|
203
203
|
},
|
|
204
|
-
// ── 5. Bulk
|
|
204
|
+
// ── 5. Bulk Original Series — Bulk order query ───────────────────────────
|
|
205
205
|
{
|
|
206
|
-
id: "conv-bulk-
|
|
206
|
+
id: "conv-bulk-original-yugi-kaiba-005",
|
|
207
207
|
buyerId: "user-yugi-muto",
|
|
208
|
-
buyerDisplayName: "
|
|
209
|
-
sellerDisplayName: "
|
|
210
|
-
storeId: "store-
|
|
211
|
-
storeName: "
|
|
212
|
-
productId: "product-
|
|
213
|
-
productTitle: "
|
|
208
|
+
buyerDisplayName: "Mock User 3",
|
|
209
|
+
sellerDisplayName: "Mock User 6",
|
|
210
|
+
storeId: "store-beyblade-arena",
|
|
211
|
+
storeName: "Beyblade Arena",
|
|
212
|
+
productId: "product-beyblade-original-driger-v",
|
|
213
|
+
productTitle: "Beyblade Original Driger V",
|
|
214
214
|
messages: [
|
|
215
215
|
{
|
|
216
216
|
id: "msg-005-1",
|
|
217
217
|
senderId: "user-yugi-muto",
|
|
218
218
|
senderRole: "buyer",
|
|
219
|
-
body: "Do you have 3 copies of
|
|
219
|
+
body: "Do you have 3 copies of the Original Driger V? I'm completing my original-series set and need multiples for tournament backup.",
|
|
220
220
|
isRead: true,
|
|
221
221
|
sentAt: minsAgo(240),
|
|
222
222
|
},
|
|
223
223
|
{
|
|
224
224
|
id: "msg-005-2",
|
|
225
|
-
senderId: "user-
|
|
225
|
+
senderId: "user-tyson-blader",
|
|
226
226
|
senderRole: "seller",
|
|
227
|
-
body: "Yes! I have 5 copies in stock. For 3+ copies I can do ₹
|
|
227
|
+
body: "Yes! I have 5 copies in stock. For 3+ copies I can do ₹1,600 per piece (saving ₹399 per piece vs list price) + free shipping. All pieces are NM with sharp tips.",
|
|
228
228
|
isRead: false,
|
|
229
229
|
sentAt: minsAgo(200),
|
|
230
230
|
},
|
|
231
231
|
],
|
|
232
|
-
lastMessage: "Yes! I have 5 copies in stock. For 3+ copies I can do ₹
|
|
232
|
+
lastMessage: "Yes! I have 5 copies in stock. For 3+ copies I can do ₹1,600 per piece (saving ₹399 per piece vs list price) + free shipping. All pieces are NM with sharp tips.",
|
|
233
233
|
lastMessageAt: minsAgo(200),
|
|
234
234
|
unreadBuyer: 1,
|
|
235
235
|
unreadSeller: 0,
|
|
@@ -237,28 +237,28 @@ export const conversationsSeedData = [
|
|
|
237
237
|
createdAt: minsAgo(240),
|
|
238
238
|
updatedAt: minsAgo(200),
|
|
239
239
|
},
|
|
240
|
-
// ── 6.
|
|
240
|
+
// ── 6. X Knife Shinobi — Post-purchase tracking (archived) ───────────────
|
|
241
241
|
{
|
|
242
|
-
id: "conv-
|
|
242
|
+
id: "conv-x-knife-admin-kaiba-006",
|
|
243
243
|
buyerId: "user-admin-letitrip",
|
|
244
|
-
buyerDisplayName: "
|
|
245
|
-
sellerDisplayName: "
|
|
246
|
-
storeId: "store-
|
|
247
|
-
storeName: "
|
|
248
|
-
productId: "product-
|
|
249
|
-
productTitle: "
|
|
244
|
+
buyerDisplayName: "Mock User 1",
|
|
245
|
+
sellerDisplayName: "Mock User 6",
|
|
246
|
+
storeId: "store-beyblade-arena",
|
|
247
|
+
storeName: "Beyblade Arena",
|
|
248
|
+
productId: "product-beyblade-x-knife-shinobi",
|
|
249
|
+
productTitle: "Beyblade X Knife Shinobi",
|
|
250
250
|
messages: [
|
|
251
251
|
{
|
|
252
252
|
id: "msg-006-1",
|
|
253
253
|
senderId: "user-admin-letitrip",
|
|
254
254
|
senderRole: "buyer",
|
|
255
|
-
body: "Hi! My order for
|
|
255
|
+
body: "Hi! My order for the X Knife Shinobi shipped 2 days ago — the courier's tracking page shows it left your city but has not updated since. Can you check with the courier?",
|
|
256
256
|
isRead: true,
|
|
257
257
|
sentAt: daysAgo(6),
|
|
258
258
|
},
|
|
259
259
|
{
|
|
260
260
|
id: "msg-006-2",
|
|
261
|
-
senderId: "user-
|
|
261
|
+
senderId: "user-tyson-blader",
|
|
262
262
|
senderRole: "seller",
|
|
263
263
|
body: "Hi! Yes, I raised a ticket with the courier about that. They confirmed it is in transit at the sorting facility — tracking updates can lag by 24-48 hours. Should arrive tomorrow or day after.",
|
|
264
264
|
isRead: true,
|
|
@@ -268,13 +268,13 @@ export const conversationsSeedData = [
|
|
|
268
268
|
id: "msg-006-3",
|
|
269
269
|
senderId: "user-admin-letitrip",
|
|
270
270
|
senderRole: "buyer",
|
|
271
|
-
body: "Got the
|
|
271
|
+
body: "Got the piece today, arrived in perfect condition. Thanks Tyson!",
|
|
272
272
|
isRead: true,
|
|
273
273
|
sentAt: daysAgo(4),
|
|
274
274
|
},
|
|
275
275
|
{
|
|
276
276
|
id: "msg-006-4",
|
|
277
|
-
senderId: "user-
|
|
277
|
+
senderId: "user-tyson-blader",
|
|
278
278
|
senderRole: "seller",
|
|
279
279
|
body: "Glad it arrived safely! Please leave a review when you get a chance.",
|
|
280
280
|
isRead: true,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* WHY: Seeds per-user coupon usage subcollection for
|
|
3
|
-
* WHAT: 4 records:
|
|
2
|
+
* WHY: Seeds per-user coupon usage subcollection for the Beyblade marketplace.
|
|
3
|
+
* WHAT: 4 records: Rehan used REHAN10 + FREESHIP499, Vivaan used ARENA25, Admin used BLADER50.
|
|
4
4
|
*
|
|
5
5
|
* EXPORTS:
|
|
6
6
|
* CouponUsageSeedRecord (interface)
|
|
@@ -16,16 +16,16 @@
|
|
|
16
16
|
const NOW = new Date();
|
|
17
17
|
const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
|
|
18
18
|
export const couponUsageSeedData = [
|
|
19
|
-
//
|
|
19
|
+
// Rehan used REHAN10 once (perUserLimit: 1 → exhausted)
|
|
20
20
|
{
|
|
21
21
|
userId: "user-yugi-muto",
|
|
22
|
-
couponId: "coupon-
|
|
23
|
-
couponCode: "
|
|
22
|
+
couponId: "coupon-rehan10",
|
|
23
|
+
couponCode: "REHAN10",
|
|
24
24
|
usageCount: 1,
|
|
25
25
|
lastUsedAt: daysAgo(45),
|
|
26
26
|
orders: ["order-2-20260325-a1b2c3"],
|
|
27
27
|
},
|
|
28
|
-
//
|
|
28
|
+
// Rehan used FREESHIP499 once (no perUserLimit)
|
|
29
29
|
{
|
|
30
30
|
userId: "user-yugi-muto",
|
|
31
31
|
couponId: "coupon-freeship499",
|
|
@@ -34,20 +34,20 @@ export const couponUsageSeedData = [
|
|
|
34
34
|
lastUsedAt: daysAgo(20),
|
|
35
35
|
orders: ["order-1-20260410-j1k2l3"],
|
|
36
36
|
},
|
|
37
|
-
//
|
|
37
|
+
// Vivaan used ARENA25 once (perUserLimit: 2 → one more use left)
|
|
38
38
|
{
|
|
39
39
|
userId: "user-seto-kaiba",
|
|
40
|
-
couponId: "coupon-
|
|
41
|
-
couponCode: "
|
|
40
|
+
couponId: "coupon-arena25",
|
|
41
|
+
couponCode: "ARENA25",
|
|
42
42
|
usageCount: 1,
|
|
43
43
|
lastUsedAt: daysAgo(15),
|
|
44
44
|
orders: ["order-1-20260425-p7q8r9"],
|
|
45
45
|
},
|
|
46
|
-
// Admin used
|
|
46
|
+
// Admin used BLADER50 once (perUserLimit: 1 → exhausted)
|
|
47
47
|
{
|
|
48
48
|
userId: "user-admin-letitrip",
|
|
49
|
-
couponId: "coupon-
|
|
50
|
-
couponCode: "
|
|
49
|
+
couponId: "coupon-blader50",
|
|
50
|
+
couponCode: "BLADER50",
|
|
51
51
|
usageCount: 1,
|
|
52
52
|
lastUsedAt: daysAgo(10),
|
|
53
53
|
orders: ["order-1-20260430-g7h8i9"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* WHY: Seeds 10 discount coupons for
|
|
3
|
-
* WHAT: 5 admin-scoped (
|
|
2
|
+
* WHY: Seeds 10 discount coupons for the Beyblade marketplace — covers percentage, fixed, free_shipping, buy_x_get_y types.
|
|
3
|
+
* WHAT: 5 admin-scoped (REHAN10, BLADER50, FREESHIP499, NEWBLADER, TOURNAMENT2026) + 5 seller-scoped (ARENA25, ARENAVIP, BUYNOW10, SEALED20, LIMITEDSET). Mix of active, upcoming, and exhausted.
|
|
4
4
|
*
|
|
5
5
|
* EXPORTS:
|
|
6
6
|
* couponsSeedData — Array of Partial<CouponDocument> for seed runner
|
|
@@ -19,9 +19,9 @@ const daysAhead = (n) => new Date(NOW.getTime() + n * 86400000);
|
|
|
19
19
|
export const couponsSeedData = [
|
|
20
20
|
// ── Admin coupons ──────────────────────────────────────────────────────────
|
|
21
21
|
{
|
|
22
|
-
id: "coupon-
|
|
23
|
-
code: "
|
|
24
|
-
name: "
|
|
22
|
+
id: "coupon-rehan10",
|
|
23
|
+
code: "REHAN10",
|
|
24
|
+
name: "Rehan's Welcome — 10% Off",
|
|
25
25
|
description: "10% off your first order on LetItRip. Maximum discount ₹200. First-time buyers only.",
|
|
26
26
|
type: COUPON_FIELDS.TYPE_VALUES.PERCENTAGE,
|
|
27
27
|
scope: COUPON_FIELDS.SCOPE_VALUES.ADMIN,
|
|
@@ -35,9 +35,9 @@ export const couponsSeedData = [
|
|
|
35
35
|
stats: { totalUses: 312, totalRevenue: 1560000, totalDiscount: 31200 },
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
|
-
id: "coupon-
|
|
39
|
-
code: "
|
|
40
|
-
name: "
|
|
38
|
+
id: "coupon-blader50",
|
|
39
|
+
code: "BLADER50",
|
|
40
|
+
name: "Blader's Power — ₹500 Off",
|
|
41
41
|
description: "₹500 off on orders above ₹2,000. All categories. Limited to 500 total uses.",
|
|
42
42
|
type: COUPON_FIELDS.TYPE_VALUES.FIXED,
|
|
43
43
|
scope: COUPON_FIELDS.SCOPE_VALUES.ADMIN,
|
|
@@ -67,9 +67,9 @@ export const couponsSeedData = [
|
|
|
67
67
|
stats: { totalUses: 1024, totalRevenue: 5120000, totalDiscount: 153600 },
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
|
-
id: "coupon-
|
|
71
|
-
code: "
|
|
72
|
-
name: "New
|
|
70
|
+
id: "coupon-newblader",
|
|
71
|
+
code: "NEWBLADER",
|
|
72
|
+
name: "New Blader — 20% Off First Order",
|
|
73
73
|
description: "20% off your first order. Maximum discount ₹400. First-time buyers only.",
|
|
74
74
|
type: COUPON_FIELDS.TYPE_VALUES.PERCENTAGE,
|
|
75
75
|
scope: COUPON_FIELDS.SCOPE_VALUES.ADMIN,
|
|
@@ -98,41 +98,41 @@ export const couponsSeedData = [
|
|
|
98
98
|
updatedAt: daysAgo(1),
|
|
99
99
|
stats: { totalUses: 456, totalRevenue: 2280000, totalDiscount: 91200 },
|
|
100
100
|
},
|
|
101
|
-
// ── Seller coupons (
|
|
101
|
+
// ── Seller coupons (Beyblade Arena) ────────────────────────────────────────
|
|
102
102
|
{
|
|
103
|
-
id: "coupon-
|
|
104
|
-
code: "
|
|
105
|
-
name: "
|
|
106
|
-
description: "25% off any
|
|
103
|
+
id: "coupon-arena25",
|
|
104
|
+
code: "ARENA25",
|
|
105
|
+
name: "Beyblade Arena — 25% Off (Max ₹500)",
|
|
106
|
+
description: "25% off any Beyblade Arena purchase. Maximum discount ₹500.",
|
|
107
107
|
type: COUPON_FIELDS.TYPE_VALUES.PERCENTAGE,
|
|
108
108
|
scope: COUPON_FIELDS.SCOPE_VALUES.SELLER,
|
|
109
|
-
storeId: "store-
|
|
109
|
+
storeId: "store-beyblade-arena",
|
|
110
110
|
discount: { value: 25, maxDiscount: 500, minPurchase: 1000 },
|
|
111
111
|
usage: { totalLimit: 200, perUserLimit: 2, currentUsage: 67 },
|
|
112
112
|
validity: { startDate: daysAgo(20), endDate: daysAhead(40), isActive: true },
|
|
113
113
|
restrictions: { firstTimeUserOnly: false, combineWithSellerCoupons: false },
|
|
114
|
-
createdBy: "user-
|
|
114
|
+
createdBy: "user-tyson-blader",
|
|
115
115
|
createdAt: daysAgo(20),
|
|
116
116
|
updatedAt: daysAgo(4),
|
|
117
117
|
stats: { totalUses: 67, totalRevenue: 335000, totalDiscount: 33500 },
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
|
-
id: "coupon-
|
|
121
|
-
code: "
|
|
122
|
-
name: "
|
|
123
|
-
description: "15% off
|
|
120
|
+
id: "coupon-arenavip",
|
|
121
|
+
code: "ARENAVIP",
|
|
122
|
+
name: "Arena VIP — 15% Off Limited Editions",
|
|
123
|
+
description: "15% off limited-edition beyblades at Beyblade Arena. For our top collectors.",
|
|
124
124
|
type: COUPON_FIELDS.TYPE_VALUES.PERCENTAGE,
|
|
125
125
|
scope: COUPON_FIELDS.SCOPE_VALUES.SELLER,
|
|
126
|
-
storeId: "store-
|
|
126
|
+
storeId: "store-beyblade-arena",
|
|
127
127
|
discount: { value: 15, maxDiscount: 750, minPurchase: 2000 },
|
|
128
128
|
usage: { totalLimit: 50, perUserLimit: 1, currentUsage: 12 },
|
|
129
129
|
validity: { startDate: daysAgo(10), endDate: daysAhead(60), isActive: true },
|
|
130
130
|
restrictions: {
|
|
131
|
-
applicableCategories: ["category-
|
|
131
|
+
applicableCategories: ["category-beyblade-original", "category-beyblade-metal"],
|
|
132
132
|
firstTimeUserOnly: false,
|
|
133
133
|
combineWithSellerCoupons: false,
|
|
134
134
|
},
|
|
135
|
-
createdBy: "user-
|
|
135
|
+
createdBy: "user-tyson-blader",
|
|
136
136
|
createdAt: daysAgo(10),
|
|
137
137
|
updatedAt: daysAgo(3),
|
|
138
138
|
stats: { totalUses: 12, totalRevenue: 60000, totalDiscount: 9000 },
|
|
@@ -140,21 +140,21 @@ export const couponsSeedData = [
|
|
|
140
140
|
{
|
|
141
141
|
id: "coupon-buynow10",
|
|
142
142
|
code: "BUYNOW10",
|
|
143
|
-
name: "Buy 3
|
|
144
|
-
description: "Buy any 3
|
|
143
|
+
name: "Buy 3 Beyblades, Get 10% Off",
|
|
144
|
+
description: "Buy any 3 beyblades from Beyblade Arena and get 10% off the total.",
|
|
145
145
|
type: COUPON_FIELDS.TYPE_VALUES.BUY_X_GET_Y,
|
|
146
146
|
scope: COUPON_FIELDS.SCOPE_VALUES.SELLER,
|
|
147
|
-
storeId: "store-
|
|
147
|
+
storeId: "store-beyblade-arena",
|
|
148
148
|
discount: { value: 10, maxDiscount: 300, minPurchase: 0 },
|
|
149
149
|
bxgy: {
|
|
150
150
|
buyQuantity: 3,
|
|
151
151
|
getQuantity: 0,
|
|
152
|
-
applicableCategories: ["category-
|
|
152
|
+
applicableCategories: ["category-beyblade-original", "category-beyblade-metal", "category-beyblade-burst", "category-beyblade-x"],
|
|
153
153
|
},
|
|
154
154
|
usage: { totalLimit: 100, perUserLimit: 3, currentUsage: 34 },
|
|
155
155
|
validity: { startDate: daysAgo(15), endDate: daysAhead(45), isActive: true },
|
|
156
156
|
restrictions: { firstTimeUserOnly: false, combineWithSellerCoupons: false },
|
|
157
|
-
createdBy: "user-
|
|
157
|
+
createdBy: "user-tyson-blader",
|
|
158
158
|
createdAt: daysAgo(15),
|
|
159
159
|
updatedAt: daysAgo(2),
|
|
160
160
|
stats: { totalUses: 34, totalRevenue: 170000, totalDiscount: 17000 },
|
|
@@ -163,40 +163,40 @@ export const couponsSeedData = [
|
|
|
163
163
|
id: "coupon-sealed20",
|
|
164
164
|
code: "SEALED20",
|
|
165
165
|
name: "20% Off Sealed Products",
|
|
166
|
-
description: "20% off sealed
|
|
166
|
+
description: "20% off sealed launcher sets, stadiums, and starter boxes at Beyblade Arena.",
|
|
167
167
|
type: COUPON_FIELDS.TYPE_VALUES.PERCENTAGE,
|
|
168
168
|
scope: COUPON_FIELDS.SCOPE_VALUES.SELLER,
|
|
169
|
-
storeId: "store-
|
|
169
|
+
storeId: "store-beyblade-arena",
|
|
170
170
|
discount: { value: 20, maxDiscount: 1000, minPurchase: 1000 },
|
|
171
171
|
usage: { totalLimit: 75, perUserLimit: 2, currentUsage: 28 },
|
|
172
172
|
validity: { startDate: daysAgo(7), endDate: daysAhead(30), isActive: true },
|
|
173
173
|
restrictions: {
|
|
174
|
-
applicableCategories: ["category-
|
|
174
|
+
applicableCategories: ["category-beyblade-burst", "category-beyblade-x"],
|
|
175
175
|
firstTimeUserOnly: false,
|
|
176
176
|
combineWithSellerCoupons: false,
|
|
177
177
|
},
|
|
178
|
-
createdBy: "user-
|
|
178
|
+
createdBy: "user-tyson-blader",
|
|
179
179
|
createdAt: daysAgo(7),
|
|
180
180
|
updatedAt: daysAgo(1),
|
|
181
181
|
stats: { totalUses: 28, totalRevenue: 140000, totalDiscount: 28000 },
|
|
182
182
|
},
|
|
183
183
|
{
|
|
184
|
-
id: "coupon-
|
|
185
|
-
code: "
|
|
186
|
-
name: "12% Off
|
|
187
|
-
description: "12% off when purchasing any
|
|
184
|
+
id: "coupon-limitedset",
|
|
185
|
+
code: "LIMITEDSET",
|
|
186
|
+
name: "12% Off Limited Edition Bundle",
|
|
187
|
+
description: "12% off when purchasing any limited-edition beyblade bundle from Beyblade Arena.",
|
|
188
188
|
type: COUPON_FIELDS.TYPE_VALUES.PERCENTAGE,
|
|
189
189
|
scope: COUPON_FIELDS.SCOPE_VALUES.SELLER,
|
|
190
|
-
storeId: "store-
|
|
190
|
+
storeId: "store-beyblade-arena",
|
|
191
191
|
discount: { value: 12, maxDiscount: 600, minPurchase: 1500 },
|
|
192
192
|
usage: { totalLimit: 100, perUserLimit: 2, currentUsage: 19 },
|
|
193
193
|
validity: { startDate: daysAgo(5), endDate: daysAhead(55), isActive: true },
|
|
194
194
|
restrictions: {
|
|
195
|
-
applicableCategories: ["
|
|
195
|
+
applicableCategories: ["bundle-original-collectors-set", "bundle-metal-fusion-duo", "bundle-burst-battlers-pack", "bundle-x-series-starter"],
|
|
196
196
|
firstTimeUserOnly: false,
|
|
197
197
|
combineWithSellerCoupons: false,
|
|
198
198
|
},
|
|
199
|
-
createdBy: "user-
|
|
199
|
+
createdBy: "user-tyson-blader",
|
|
200
200
|
createdAt: daysAgo(5),
|
|
201
201
|
updatedAt: daysAgo(1),
|
|
202
202
|
stats: { totalUses: 19, totalRevenue: 95000, totalDiscount: 11400 },
|