@mohasinac/appkit 2.7.53 → 2.7.54
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/layout/DashboardLayoutClient.js +1 -1
- package/dist/_internal/server/jobs/core/auctionSettlement.js +6 -3
- package/dist/_internal/server/jobs/core/bundleStockSync.js +9 -7
- package/dist/_internal/server/jobs/core/onProductStockChange.d.ts +12 -3
- package/dist/_internal/server/jobs/core/onProductStockChange.js +12 -13
- package/dist/_internal/server/jobs/core/onProductWrite.js +1 -3
- package/dist/_internal/server/jobs/handlers/onProductStockChange.js +11 -2
- package/dist/client.d.ts +2 -0
- package/dist/client.js +1 -0
- package/dist/constants/field-names.d.ts +4 -3
- package/dist/constants/field-names.js +8 -8
- package/dist/errors/error-codes.d.ts +3 -0
- package/dist/errors/error-codes.js +3 -0
- package/dist/errors/messages.d.ts +3 -0
- package/dist/errors/messages.js +3 -0
- package/dist/features/admin/types/product.types.d.ts +1 -1
- package/dist/features/admin/types/product.types.js +2 -3
- package/dist/features/auctions/actions/bid-actions.d.ts +9 -0
- package/dist/features/auctions/actions/bid-actions.js +61 -0
- package/dist/features/auctions/components/AuctionDetailPageView.d.ts +2 -1
- package/dist/features/auctions/components/AuctionDetailPageView.js +5 -4
- package/dist/features/auctions/components/PlaceBidFormClient.d.ts +3 -1
- package/dist/features/auctions/components/PlaceBidFormClient.js +32 -2
- package/dist/features/auctions/types/index.d.ts +1 -1
- package/dist/features/layout/AppLayoutShell.js +1 -1
- package/dist/features/pre-orders/components/PreOrdersIndexListing.js +2 -11
- package/dist/features/products/api/[id]/route.js +4 -8
- package/dist/features/products/api/route.js +1 -3
- package/dist/features/products/components/AuctionsIndexListing.js +3 -11
- package/dist/features/products/components/PrizeDrawsIndexListing.js +2 -10
- package/dist/features/products/components/ProductFilters.d.ts +33 -9
- package/dist/features/products/components/ProductFilters.js +6 -29
- package/dist/features/products/components/ProductForm.js +2 -3
- package/dist/features/products/constants/sieve.d.ts +162 -0
- package/dist/features/products/constants/sieve.js +95 -0
- package/dist/features/products/repository/products.repository.d.ts +5 -0
- package/dist/features/products/repository/products.repository.js +23 -3
- package/dist/features/products/schemas/firestore.d.ts +4 -4
- package/dist/features/products/schemas/firestore.js +2 -3
- package/dist/features/products/schemas/index.d.ts +6 -6
- package/dist/features/products/schemas/index.js +2 -6
- package/dist/features/products/types/index.d.ts +1 -1
- package/dist/features/seller/actions/offer-actions.js +2 -2
- package/dist/features/wishlist/types/index.d.ts +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.js +6 -4
- package/dist/seed/addresses-seed-data.d.ts +2 -18
- package/dist/seed/addresses-seed-data.js +137 -203
- package/dist/seed/bids-seed-data.d.ts +2 -8
- package/dist/seed/bids-seed-data.js +172 -648
- package/dist/seed/blog-posts-seed-data.d.ts +0 -5
- package/dist/seed/blog-posts-seed-data.js +341 -596
- package/dist/seed/carousel-slides-seed-data.d.ts +0 -5
- package/dist/seed/carousel-slides-seed-data.js +61 -192
- package/dist/seed/carousels-seed-data.js +18 -1
- package/dist/seed/cart-seed-data.d.ts +1 -18
- package/dist/seed/cart-seed-data.js +116 -293
- package/dist/seed/categories-seed-data.d.ts +0 -6
- package/dist/seed/categories-seed-data.js +1409 -1537
- package/dist/seed/claimed-coupons-seed-data.d.ts +0 -11
- package/dist/seed/claimed-coupons-seed-data.js +32 -29
- package/dist/seed/conversations-seed-data.d.ts +0 -6
- package/dist/seed/conversations-seed-data.js +132 -280
- package/dist/seed/coupon-usage-seed-data.d.ts +0 -16
- package/dist/seed/coupon-usage-seed-data.js +30 -44
- package/dist/seed/coupons-seed-data.d.ts +0 -6
- package/dist/seed/coupons-seed-data.js +141 -489
- package/dist/seed/events-seed-data.d.ts +0 -6
- package/dist/seed/events-seed-data.js +201 -379
- package/dist/seed/faq-seed-data.d.ts +0 -14
- package/dist/seed/faq-seed-data.js +609 -1184
- package/dist/seed/grouped-listings-seed-data.d.ts +119 -8
- package/dist/seed/grouped-listings-seed-data.js +148 -233
- package/dist/seed/history-seed-data.d.ts +0 -7
- package/dist/seed/history-seed-data.js +50 -54
- package/dist/seed/homepage-sections-seed-data.d.ts +0 -5
- package/dist/seed/homepage-sections-seed-data.js +83 -175
- package/dist/seed/index.d.ts +1 -1
- package/dist/seed/index.js +1 -1
- package/dist/seed/manifest.js +2 -2
- package/dist/seed/notifications-seed-data.d.ts +0 -6
- package/dist/seed/notifications-seed-data.js +309 -196
- package/dist/seed/offers-seed-data.d.ts +0 -8
- package/dist/seed/offers-seed-data.js +118 -197
- package/dist/seed/orders-seed-data.d.ts +2 -8
- package/dist/seed/orders-seed-data.js +248 -1510
- package/dist/seed/payouts-seed-data.d.ts +0 -6
- package/dist/seed/payouts-seed-data.js +102 -441
- package/dist/seed/products-auctions-seed-data.d.ts +1 -14
- package/dist/seed/products-auctions-seed-data.js +612 -1084
- package/dist/seed/products-preorders-seed-data.d.ts +119 -14
- package/dist/seed/products-preorders-seed-data.js +154 -455
- package/dist/seed/products-standard-seed-data.d.ts +1 -15
- package/dist/seed/products-standard-seed-data.js +1355 -4128
- package/dist/seed/reviews-seed-data.d.ts +2 -8
- package/dist/seed/reviews-seed-data.js +99 -1182
- package/dist/seed/scammers-seed-data.d.ts +0 -15
- package/dist/seed/scammers-seed-data.js +36 -37
- package/dist/seed/sessions-seed-data.d.ts +0 -13
- package/dist/seed/sessions-seed-data.js +58 -335
- package/dist/seed/site-settings-seed-data.d.ts +0 -4
- package/dist/seed/site-settings-seed-data.js +61 -52
- package/dist/seed/store-addresses-seed-data.js +27 -151
- package/dist/seed/store-extensions-seed-data.d.ts +0 -7
- package/dist/seed/store-extensions-seed-data.js +147 -261
- package/dist/seed/stores-seed-data.d.ts +0 -5
- package/dist/seed/stores-seed-data.js +222 -184
- package/dist/seed/sub-listings-seed-data.d.ts +119 -0
- package/dist/seed/sub-listings-seed-data.js +447 -0
- package/dist/seed/support-tickets-seed-data.d.ts +0 -7
- package/dist/seed/support-tickets-seed-data.js +82 -75
- package/dist/seed/users-seed-data.d.ts +0 -5
- package/dist/seed/users-seed-data.js +279 -634
- package/dist/seed/wishlists-seed-data.d.ts +0 -9
- package/dist/seed/wishlists-seed-data.js +36 -52
- package/dist/seo/json-ld.js +6 -4
- package/dist/styles.css +8052 -3
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/search-tokens.d.ts +2 -0
- package/dist/utils/search-tokens.js +21 -0
- package/package.json +2 -2
- package/scripts/seed-cli.mjs +2 -2
|
@@ -1,44 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
1
|
+
/*
|
|
2
|
+
* WHY: Seeds buyer ↔ seller conversations for YGO marketplace.
|
|
3
|
+
* WHAT: 6 conversations covering grading queries, offer negotiation, shipping delays, returns, bulk orders, tracking.
|
|
4
|
+
*
|
|
5
|
+
* EXPORTS:
|
|
6
|
+
* conversationsSeedData — Array of Partial<ConversationDocument> for seed runner
|
|
7
|
+
*
|
|
8
|
+
* @tag domain:messages
|
|
9
|
+
* @tag layer:seed
|
|
10
|
+
* @tag pattern:none
|
|
11
|
+
* @tag access:server-only
|
|
12
|
+
* @tag consumers:seed/index.ts,seed/runner.ts,SeedPanel
|
|
13
|
+
* @tag sideEffects:none
|
|
6
14
|
*/
|
|
7
15
|
const NOW = new Date();
|
|
8
16
|
const minsAgo = (n) => new Date(NOW.getTime() - n * 60000);
|
|
9
17
|
const hoursAgo = (n) => new Date(NOW.getTime() - n * 3600000);
|
|
10
18
|
const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
|
|
11
19
|
export const conversationsSeedData = [
|
|
12
|
-
//
|
|
20
|
+
// ── 1. Blue-Eyes LOB PSA 10 — Pre-purchase grading query ─────────────────
|
|
13
21
|
{
|
|
14
|
-
id: "conv-
|
|
15
|
-
buyerId: "user-
|
|
16
|
-
buyerDisplayName: "
|
|
17
|
-
sellerDisplayName: "
|
|
18
|
-
storeId: "store-
|
|
19
|
-
storeName: "
|
|
20
|
-
productId: "auction-
|
|
21
|
-
productTitle: "
|
|
22
|
+
id: "conv-blue-eyes-yugi-kaiba-001",
|
|
23
|
+
buyerId: "user-yugi-muto",
|
|
24
|
+
buyerDisplayName: "Yugi Muto",
|
|
25
|
+
sellerDisplayName: "Seto Kaiba",
|
|
26
|
+
storeId: "store-kaiba-corp-cards",
|
|
27
|
+
storeName: "Kaiba Corp Card Vault",
|
|
28
|
+
productId: "auction-blue-eyes-lob-1st-psa10",
|
|
29
|
+
productTitle: "Blue-Eyes White Dragon LOB 1st Ed — PSA 10",
|
|
22
30
|
messages: [
|
|
23
31
|
{
|
|
24
32
|
id: "msg-001-1",
|
|
25
|
-
senderId: "user-
|
|
33
|
+
senderId: "user-yugi-muto",
|
|
26
34
|
senderRole: "buyer",
|
|
27
|
-
body: "Hi! Is this PSA
|
|
35
|
+
body: "Hi! Is this PSA 10 a gem mint or does it have any edge wear on the slab? I'm buying for my collection, not resale, so I want to know the centering before I bid.",
|
|
28
36
|
isRead: true,
|
|
29
37
|
sentAt: daysAgo(3),
|
|
30
38
|
},
|
|
31
39
|
{
|
|
32
40
|
id: "msg-001-2",
|
|
33
|
-
senderId: "user-
|
|
41
|
+
senderId: "user-seto-kaiba",
|
|
34
42
|
senderRole: "seller",
|
|
35
|
-
body: "Hey
|
|
43
|
+
body: "Hey Yugi! The centering is approximately 55/45 front and 60/40 back — well within PSA 10 standards. The slab itself has no cracks. This was submitted by me personally from a sealed LOB booster. Happy to share full slab photos on WhatsApp if you DM me before bidding.",
|
|
36
44
|
isRead: true,
|
|
37
45
|
sentAt: daysAgo(3),
|
|
38
46
|
},
|
|
39
47
|
{
|
|
40
48
|
id: "msg-001-3",
|
|
41
|
-
senderId: "user-
|
|
49
|
+
senderId: "user-yugi-muto",
|
|
42
50
|
senderRole: "buyer",
|
|
43
51
|
body: "That sounds great! Can you also confirm the cert number so I can verify on PSA's website?",
|
|
44
52
|
isRead: true,
|
|
@@ -46,14 +54,14 @@ export const conversationsSeedData = [
|
|
|
46
54
|
},
|
|
47
55
|
{
|
|
48
56
|
id: "msg-001-4",
|
|
49
|
-
senderId: "user-
|
|
57
|
+
senderId: "user-seto-kaiba",
|
|
50
58
|
senderRole: "seller",
|
|
51
|
-
body: "PSA Cert #: 84729183. You can verify at psacard.com. Grade is confirmed Mint
|
|
59
|
+
body: "PSA Cert #: 84729183. You can verify at psacard.com. Grade is confirmed Gem Mint 10. Good luck in the auction!",
|
|
52
60
|
isRead: false,
|
|
53
61
|
sentAt: daysAgo(2),
|
|
54
62
|
},
|
|
55
63
|
],
|
|
56
|
-
lastMessage: "PSA Cert #: 84729183. You can verify at psacard.com. Grade is confirmed Mint
|
|
64
|
+
lastMessage: "PSA Cert #: 84729183. You can verify at psacard.com. Grade is confirmed Gem Mint 10. Good luck in the auction!",
|
|
57
65
|
lastMessageAt: daysAgo(2),
|
|
58
66
|
unreadBuyer: 1,
|
|
59
67
|
unreadSeller: 0,
|
|
@@ -61,139 +69,131 @@ export const conversationsSeedData = [
|
|
|
61
69
|
createdAt: daysAgo(3),
|
|
62
70
|
updatedAt: daysAgo(2),
|
|
63
71
|
},
|
|
64
|
-
//
|
|
72
|
+
// ── 2. Dark Magician Girl IOC — Offer negotiation ────────────────────────
|
|
65
73
|
{
|
|
66
|
-
id: "conv-
|
|
67
|
-
buyerId: "user-
|
|
68
|
-
buyerDisplayName: "
|
|
69
|
-
sellerDisplayName: "
|
|
70
|
-
storeId: "store-
|
|
71
|
-
storeName: "
|
|
72
|
-
productId: "product-
|
|
73
|
-
productTitle: "
|
|
74
|
+
id: "conv-dmg-ioc-yugi-kaiba-002",
|
|
75
|
+
buyerId: "user-yugi-muto",
|
|
76
|
+
buyerDisplayName: "Yugi Muto",
|
|
77
|
+
sellerDisplayName: "Seto Kaiba",
|
|
78
|
+
storeId: "store-kaiba-corp-cards",
|
|
79
|
+
storeName: "Kaiba Corp Card Vault",
|
|
80
|
+
productId: "product-dark-magician-girl-ioc",
|
|
81
|
+
productTitle: "Dark Magician Girl IOC 1st Edition (NM)",
|
|
74
82
|
messages: [
|
|
75
83
|
{
|
|
76
84
|
id: "msg-002-1",
|
|
77
|
-
senderId: "user-
|
|
85
|
+
senderId: "user-yugi-muto",
|
|
78
86
|
senderRole: "buyer",
|
|
79
|
-
body: "
|
|
87
|
+
body: "Would you take ₹7,500 for the Dark Magician Girl IOC? I see it's listed at ₹8,999.",
|
|
80
88
|
isRead: true,
|
|
81
|
-
sentAt:
|
|
89
|
+
sentAt: daysAgo(1),
|
|
82
90
|
},
|
|
83
91
|
{
|
|
84
92
|
id: "msg-002-2",
|
|
85
|
-
senderId: "user-
|
|
93
|
+
senderId: "user-seto-kaiba",
|
|
86
94
|
senderRole: "seller",
|
|
87
|
-
body: "Hi
|
|
95
|
+
body: "Hi Yugi! Best I can do is ₹8,200 — it's a clean 1st Ed with no whitening. I'll cover shipping at that price.",
|
|
88
96
|
isRead: true,
|
|
89
|
-
sentAt:
|
|
97
|
+
sentAt: daysAgo(1),
|
|
90
98
|
},
|
|
91
99
|
{
|
|
92
100
|
id: "msg-002-3",
|
|
93
|
-
senderId: "user-
|
|
101
|
+
senderId: "user-yugi-muto",
|
|
94
102
|
senderRole: "buyer",
|
|
95
|
-
body: "
|
|
103
|
+
body: "Deal at ₹8,200 with free shipping. Can I use the Make Offer feature or should you update the listing?",
|
|
96
104
|
isRead: false,
|
|
97
|
-
sentAt: hoursAgo(
|
|
105
|
+
sentAt: hoursAgo(8),
|
|
98
106
|
},
|
|
99
107
|
],
|
|
100
|
-
lastMessage: "
|
|
101
|
-
lastMessageAt: hoursAgo(
|
|
108
|
+
lastMessage: "Deal at ₹8,200 with free shipping. Can I use the Make Offer feature or should you update the listing?",
|
|
109
|
+
lastMessageAt: hoursAgo(8),
|
|
102
110
|
unreadBuyer: 0,
|
|
103
111
|
unreadSeller: 1,
|
|
104
112
|
status: "active",
|
|
105
|
-
createdAt:
|
|
106
|
-
updatedAt: hoursAgo(
|
|
113
|
+
createdAt: daysAgo(1),
|
|
114
|
+
updatedAt: hoursAgo(8),
|
|
107
115
|
},
|
|
108
|
-
//
|
|
116
|
+
// ── 3. Exodia Head LOB — Authenticity check ──────────────────────────────
|
|
109
117
|
{
|
|
110
|
-
id: "conv-
|
|
111
|
-
buyerId: "user-
|
|
112
|
-
buyerDisplayName: "
|
|
113
|
-
sellerDisplayName: "
|
|
114
|
-
storeId: "store-
|
|
115
|
-
storeName: "
|
|
116
|
-
productId: "product-
|
|
117
|
-
productTitle: "
|
|
118
|
+
id: "conv-exodia-yugi-admin-003",
|
|
119
|
+
buyerId: "user-yugi-muto",
|
|
120
|
+
buyerDisplayName: "Yugi Muto",
|
|
121
|
+
sellerDisplayName: "LetItRip Admin",
|
|
122
|
+
storeId: "store-letitrip-official",
|
|
123
|
+
storeName: "LetItRip Official",
|
|
124
|
+
productId: "product-exodia-head-lob-nm",
|
|
125
|
+
productTitle: "Exodia the Forbidden One LOB 1st Ed (NM)",
|
|
118
126
|
messages: [
|
|
119
127
|
{
|
|
120
128
|
id: "msg-003-1",
|
|
121
|
-
senderId: "user-
|
|
129
|
+
senderId: "user-yugi-muto",
|
|
122
130
|
senderRole: "buyer",
|
|
123
|
-
body: "Is this
|
|
131
|
+
body: "Is this a genuine Konami print or a reprint? My friend got burned with a counterfeit Exodia last month.",
|
|
124
132
|
isRead: true,
|
|
125
|
-
sentAt: daysAgo(
|
|
133
|
+
sentAt: daysAgo(2),
|
|
126
134
|
},
|
|
127
135
|
{
|
|
128
136
|
id: "msg-003-2",
|
|
129
|
-
senderId: "user-
|
|
137
|
+
senderId: "user-admin-letitrip",
|
|
130
138
|
senderRole: "seller",
|
|
131
|
-
body: "100%
|
|
139
|
+
body: "100% genuine Konami LOB 1st Edition. You can tell by the eye of Anubis hologram on the lower right corner — it's gold, not silver (silver = unlimited). I can send macro photos of the holo stamp before you buy. We also have a 7-day authenticity guarantee.",
|
|
132
140
|
isRead: true,
|
|
133
|
-
sentAt: daysAgo(
|
|
141
|
+
sentAt: daysAgo(2),
|
|
134
142
|
},
|
|
135
143
|
{
|
|
136
144
|
id: "msg-003-3",
|
|
137
|
-
senderId: "user-
|
|
145
|
+
senderId: "user-yugi-muto",
|
|
138
146
|
senderRole: "buyer",
|
|
139
|
-
body: "Perfect, that's exactly what I needed to
|
|
147
|
+
body: "Perfect, that's exactly what I needed to hear. Placing the order now!",
|
|
140
148
|
isRead: true,
|
|
141
149
|
sentAt: daysAgo(1),
|
|
142
150
|
},
|
|
143
|
-
{
|
|
144
|
-
id: "msg-003-4",
|
|
145
|
-
senderId: "user-rohit-joshi",
|
|
146
|
-
senderRole: "seller",
|
|
147
|
-
body: "Yes, I ship pan-India via Shiprocket. Chandigarh is 4–5 business days. Order placed — I'll dispatch tomorrow and share tracking once it's picked up.",
|
|
148
|
-
isRead: true,
|
|
149
|
-
sentAt: hoursAgo(22),
|
|
150
|
-
},
|
|
151
151
|
],
|
|
152
|
-
lastMessage: "
|
|
153
|
-
lastMessageAt:
|
|
152
|
+
lastMessage: "Perfect, that's exactly what I needed to hear. Placing the order now!",
|
|
153
|
+
lastMessageAt: daysAgo(1),
|
|
154
154
|
unreadBuyer: 0,
|
|
155
155
|
unreadSeller: 0,
|
|
156
156
|
status: "active",
|
|
157
|
-
createdAt: daysAgo(
|
|
158
|
-
updatedAt:
|
|
157
|
+
createdAt: daysAgo(2),
|
|
158
|
+
updatedAt: daysAgo(1),
|
|
159
159
|
},
|
|
160
|
-
//
|
|
160
|
+
// ── 4. Sealed Booster Box — Shipping delay ───────────────────────────────
|
|
161
161
|
{
|
|
162
|
-
id: "conv-
|
|
163
|
-
buyerId: "user-
|
|
164
|
-
buyerDisplayName: "
|
|
165
|
-
sellerDisplayName: "
|
|
166
|
-
storeId: "store-
|
|
167
|
-
storeName: "
|
|
168
|
-
productId: "product-
|
|
169
|
-
productTitle: "
|
|
162
|
+
id: "conv-booster-box-admin-kaiba-004",
|
|
163
|
+
buyerId: "user-admin-letitrip",
|
|
164
|
+
buyerDisplayName: "LetItRip Admin",
|
|
165
|
+
sellerDisplayName: "Seto Kaiba",
|
|
166
|
+
storeId: "store-kaiba-corp-cards",
|
|
167
|
+
storeName: "Kaiba Corp Card Vault",
|
|
168
|
+
productId: "product-lob-booster-box-sealed",
|
|
169
|
+
productTitle: "Legend of Blue Eyes White Dragon — Sealed Booster Box",
|
|
170
170
|
messages: [
|
|
171
171
|
{
|
|
172
172
|
id: "msg-004-1",
|
|
173
|
-
senderId: "user-
|
|
173
|
+
senderId: "user-admin-letitrip",
|
|
174
174
|
senderRole: "buyer",
|
|
175
|
-
body: "Hi
|
|
175
|
+
body: "Hi Kaiba, I ordered the LOB sealed booster box 3 days ago. The tracking shows it's still at the dispatch hub in Mumbai. 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-seto-kaiba",
|
|
182
182
|
senderRole: "seller",
|
|
183
|
-
body: "
|
|
183
|
+
body: "Apologies for the delay! There was a backlog at the courier facility — they've confirmed it will leave Mumbai 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
|
},
|
|
187
187
|
{
|
|
188
188
|
id: "msg-004-3",
|
|
189
|
-
senderId: "user-
|
|
189
|
+
senderId: "user-admin-letitrip",
|
|
190
190
|
senderRole: "buyer",
|
|
191
|
-
body: "Thanks for the quick update
|
|
191
|
+
body: "Thanks for the quick update. I'll keep an eye on the tracking.",
|
|
192
192
|
isRead: true,
|
|
193
193
|
sentAt: daysAgo(1),
|
|
194
194
|
},
|
|
195
195
|
],
|
|
196
|
-
lastMessage: "Thanks for the quick update
|
|
196
|
+
lastMessage: "Thanks for the quick update. I'll keep an eye on the tracking.",
|
|
197
197
|
lastMessageAt: daysAgo(1),
|
|
198
198
|
unreadBuyer: 0,
|
|
199
199
|
unreadSeller: 0,
|
|
@@ -201,183 +201,35 @@ export const conversationsSeedData = [
|
|
|
201
201
|
createdAt: daysAgo(2),
|
|
202
202
|
updatedAt: daysAgo(1),
|
|
203
203
|
},
|
|
204
|
-
//
|
|
204
|
+
// ── 5. Bulk LOB Singles — Bulk order query ───────────────────────────────
|
|
205
205
|
{
|
|
206
|
-
id: "conv-
|
|
207
|
-
buyerId: "user-
|
|
208
|
-
buyerDisplayName: "
|
|
209
|
-
sellerDisplayName: "
|
|
210
|
-
storeId: "store-
|
|
211
|
-
storeName: "
|
|
212
|
-
productId: "product-
|
|
213
|
-
productTitle: "
|
|
206
|
+
id: "conv-bulk-lob-yugi-kaiba-005",
|
|
207
|
+
buyerId: "user-yugi-muto",
|
|
208
|
+
buyerDisplayName: "Yugi Muto",
|
|
209
|
+
sellerDisplayName: "Seto Kaiba",
|
|
210
|
+
storeId: "store-kaiba-corp-cards",
|
|
211
|
+
storeName: "Kaiba Corp Card Vault",
|
|
212
|
+
productId: "product-pot-of-greed-lob",
|
|
213
|
+
productTitle: "Pot of Greed LOB 1st Edition",
|
|
214
214
|
messages: [
|
|
215
215
|
{
|
|
216
216
|
id: "msg-005-1",
|
|
217
|
-
senderId: "user-
|
|
218
|
-
senderRole: "buyer",
|
|
219
|
-
body: "Hi, I received the Rem Nendoroid today but the hair accessory part is broken — it looks like it was cracked during shipping. Can I return it?",
|
|
220
|
-
isRead: true,
|
|
221
|
-
sentAt: minsAgo(180),
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
id: "msg-005-2",
|
|
225
|
-
senderId: "user-priya-singh",
|
|
226
|
-
senderRole: "seller",
|
|
227
|
-
body: "Oh no, I'm so sorry about that! Can you send me photos of the damage? The nendoroid was in perfect condition when I packed it — I double-boxed it with bubble wrap. If it was damaged in transit I can file a claim with the courier and either send a replacement part or issue a partial refund. Please don't ship it back yet until we figure out the best resolution.",
|
|
228
|
-
isRead: true,
|
|
229
|
-
sentAt: minsAgo(150),
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
id: "msg-005-3",
|
|
233
|
-
senderId: "user-kartik-nair",
|
|
234
|
-
senderRole: "buyer",
|
|
235
|
-
body: "Photos sent to your WhatsApp. The maid headband part snapped in two. The figure itself is fine. A replacement part or partial refund would be great — full return seems excessive for one small part.",
|
|
236
|
-
isRead: false,
|
|
237
|
-
sentAt: minsAgo(90),
|
|
238
|
-
},
|
|
239
|
-
],
|
|
240
|
-
lastMessage: "Photos sent to your WhatsApp. The maid headband part snapped in two. The figure itself is fine. A replacement part or partial refund would be great — full return seems excessive for one small part.",
|
|
241
|
-
lastMessageAt: minsAgo(90),
|
|
242
|
-
unreadBuyer: 0,
|
|
243
|
-
unreadSeller: 1,
|
|
244
|
-
status: "active",
|
|
245
|
-
createdAt: minsAgo(180),
|
|
246
|
-
updatedAt: minsAgo(90),
|
|
247
|
-
},
|
|
248
|
-
// ── 6. Gundam PG — Pre-purchase spec check ────────────────────────────────
|
|
249
|
-
{
|
|
250
|
-
id: "conv-gundam-divya-priya-006",
|
|
251
|
-
buyerId: "user-divya-menon",
|
|
252
|
-
buyerDisplayName: "Divya Menon",
|
|
253
|
-
sellerDisplayName: "Priya Singh",
|
|
254
|
-
storeId: "store-tokyo-toys-india",
|
|
255
|
-
storeName: "Tokyo Toys India",
|
|
256
|
-
productId: "product-gundam-rx78-mg",
|
|
257
|
-
productTitle: "Gundam RX-78-2 MG 1/100 Ver. 3.0",
|
|
258
|
-
messages: [
|
|
259
|
-
{
|
|
260
|
-
id: "msg-006-1",
|
|
261
|
-
senderId: "user-divya-menon",
|
|
262
|
-
senderRole: "buyer",
|
|
263
|
-
body: "Is this the Ver. 3.0 or the 2.0? The listing says Ver. 3.0 but I want to double check. Also, is it the Japanese release or the global Bandai Spirits release?",
|
|
264
|
-
isRead: true,
|
|
265
|
-
sentAt: daysAgo(4),
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
id: "msg-006-2",
|
|
269
|
-
senderId: "user-priya-singh",
|
|
270
|
-
senderRole: "seller",
|
|
271
|
-
body: "Confirmed: this is the Ver. 3.0 — you can identify it by the full inner frame and the improved waist joint. Japanese release by Bandai Spirits (the successor brand to Bandai Hobby). Box is entirely in Japanese with the 'Bandai Spirits' logo on the bottom right. Instructions are in Japanese but the build sequence is identical to global releases.",
|
|
272
|
-
isRead: true,
|
|
273
|
-
sentAt: daysAgo(4),
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
id: "msg-006-3",
|
|
277
|
-
senderId: "user-divya-menon",
|
|
278
|
-
senderRole: "buyer",
|
|
279
|
-
body: "Perfect! That's the one I want. Placing the order now. Is there any risk of duty/customs charge since it's a Japan import?",
|
|
280
|
-
isRead: true,
|
|
281
|
-
sentAt: daysAgo(3),
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
id: "msg-006-4",
|
|
285
|
-
senderId: "user-priya-singh",
|
|
286
|
-
senderRole: "seller",
|
|
287
|
-
body: "This stock was already imported to India — I hold it domestically in Mumbai. You won't pay any customs. Delivery is via standard domestic courier, 3–5 business days.",
|
|
288
|
-
isRead: true,
|
|
289
|
-
sentAt: daysAgo(3),
|
|
290
|
-
},
|
|
291
|
-
],
|
|
292
|
-
lastMessage: "This stock was already imported to India — I hold it domestically in Mumbai. You won't pay any customs. Delivery is via standard domestic courier, 3–5 business days.",
|
|
293
|
-
lastMessageAt: daysAgo(3),
|
|
294
|
-
unreadBuyer: 0,
|
|
295
|
-
unreadSeller: 0,
|
|
296
|
-
status: "active",
|
|
297
|
-
createdAt: daysAgo(4),
|
|
298
|
-
updatedAt: daysAgo(3),
|
|
299
|
-
},
|
|
300
|
-
// ── 7. Vintage Hot Wheels — Offer negotiation ─────────────────────────────
|
|
301
|
-
{
|
|
302
|
-
id: "conv-vintage-hw-ankit-vikram-007",
|
|
303
|
-
buyerId: "user-ankit-gupta",
|
|
304
|
-
buyerDisplayName: "Ankit Gupta",
|
|
305
|
-
sellerDisplayName: "Vikram Mehta",
|
|
306
|
-
storeId: "store-diecast-depot",
|
|
307
|
-
storeName: "Diecast Depot",
|
|
308
|
-
productId: "product-hot-wheels-redline-banana-1968",
|
|
309
|
-
productTitle: "Hot Wheels Redline 1968 Custom Camaro (Banana Yellow)",
|
|
310
|
-
messages: [
|
|
311
|
-
{
|
|
312
|
-
id: "msg-007-1",
|
|
313
|
-
senderId: "user-ankit-gupta",
|
|
314
|
-
senderRole: "buyer",
|
|
315
|
-
body: "Would you take ₹10,000 for the Banana Yellow Camaro? I see it's listed at ₹12,999.",
|
|
316
|
-
isRead: true,
|
|
317
|
-
sentAt: daysAgo(6),
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
id: "msg-007-2",
|
|
321
|
-
senderId: "user-vikram-mehta",
|
|
322
|
-
senderRole: "seller",
|
|
323
|
-
body: "Hi Ankit! I paid ₹9,500 to source this from a Tokyo flea market including import costs, so ₹10,000 doesn't leave me much margin. Best I can do is ₹11,500 — that's a ₹1,500 discount and I'll cover shipping. The car is unplayed, original wheels, and the button pops correctly — it's a genuine 1968 US card.",
|
|
324
|
-
isRead: true,
|
|
325
|
-
sentAt: daysAgo(6),
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
id: "msg-007-3",
|
|
329
|
-
senderId: "user-ankit-gupta",
|
|
330
|
-
senderRole: "buyer",
|
|
331
|
-
body: "Fair enough — deal at ₹11,500 with free shipping. Can you create a custom listing or should I use the Make Offer feature?",
|
|
332
|
-
isRead: true,
|
|
333
|
-
sentAt: daysAgo(5),
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
id: "msg-007-4",
|
|
337
|
-
senderId: "user-vikram-mehta",
|
|
338
|
-
senderRole: "seller",
|
|
339
|
-
body: "I've updated the listing price to ₹11,500 for you. Add to cart now and use coupon DIECAST10 for the remainder of the discount. Will dispatch day after tomorrow.",
|
|
340
|
-
isRead: true,
|
|
341
|
-
sentAt: daysAgo(5),
|
|
342
|
-
},
|
|
343
|
-
],
|
|
344
|
-
lastMessage: "I've updated the listing price to ₹11,500 for you. Add to cart now and use coupon DIECAST10 for the remainder of the discount. Will dispatch day after tomorrow.",
|
|
345
|
-
lastMessageAt: daysAgo(5),
|
|
346
|
-
unreadBuyer: 0,
|
|
347
|
-
unreadSeller: 0,
|
|
348
|
-
status: "archived",
|
|
349
|
-
createdAt: daysAgo(6),
|
|
350
|
-
updatedAt: daysAgo(5),
|
|
351
|
-
},
|
|
352
|
-
// ── 8. Pokémon Booster Box — Bulk order query ─────────────────────────────
|
|
353
|
-
{
|
|
354
|
-
id: "conv-bulkorder-rahul-aryan-008",
|
|
355
|
-
buyerId: "user-rahul-sharma",
|
|
356
|
-
buyerDisplayName: "Rahul Sharma",
|
|
357
|
-
sellerDisplayName: "Aryan Kapoor",
|
|
358
|
-
storeId: "store-pokemon-palace",
|
|
359
|
-
storeName: "Pokémon Palace",
|
|
360
|
-
productId: "product-pokemon-151-booster-box",
|
|
361
|
-
productTitle: "Pokémon TCG: Scarlet & Violet 151 Booster Box",
|
|
362
|
-
messages: [
|
|
363
|
-
{
|
|
364
|
-
id: "msg-008-1",
|
|
365
|
-
senderId: "user-rahul-sharma",
|
|
217
|
+
senderId: "user-yugi-muto",
|
|
366
218
|
senderRole: "buyer",
|
|
367
|
-
body: "Do you have 3
|
|
219
|
+
body: "Do you have 3 copies of Pot of Greed LOB? I'm completing my LOB set and need multiples for the trade binder.",
|
|
368
220
|
isRead: true,
|
|
369
221
|
sentAt: minsAgo(240),
|
|
370
222
|
},
|
|
371
223
|
{
|
|
372
|
-
id: "msg-
|
|
373
|
-
senderId: "user-
|
|
224
|
+
id: "msg-005-2",
|
|
225
|
+
senderId: "user-seto-kaiba",
|
|
374
226
|
senderRole: "seller",
|
|
375
|
-
body: "Yes! I have 5
|
|
227
|
+
body: "Yes! I have 5 copies in stock. For 3+ copies I can do ₹12,000 per card (saving ₹999 per card vs list price) + free shipping. All cards are NM with clean edges.",
|
|
376
228
|
isRead: false,
|
|
377
229
|
sentAt: minsAgo(200),
|
|
378
230
|
},
|
|
379
231
|
],
|
|
380
|
-
lastMessage: "Yes! I have 5
|
|
232
|
+
lastMessage: "Yes! I have 5 copies in stock. For 3+ copies I can do ₹12,000 per card (saving ₹999 per card vs list price) + free shipping. All cards are NM with clean edges.",
|
|
381
233
|
lastMessageAt: minsAgo(200),
|
|
382
234
|
unreadBuyer: 1,
|
|
383
235
|
unreadSeller: 0,
|
|
@@ -385,56 +237,56 @@ export const conversationsSeedData = [
|
|
|
385
237
|
createdAt: minsAgo(240),
|
|
386
238
|
updatedAt: minsAgo(200),
|
|
387
239
|
},
|
|
388
|
-
//
|
|
240
|
+
// ── 6. Chaos Emperor Dragon — Post-purchase tracking (archived) ──────────
|
|
389
241
|
{
|
|
390
|
-
id: "conv-
|
|
242
|
+
id: "conv-ced-admin-kaiba-006",
|
|
391
243
|
buyerId: "user-admin-letitrip",
|
|
392
244
|
buyerDisplayName: "LetItRip Admin",
|
|
393
|
-
sellerDisplayName: "
|
|
394
|
-
storeId: "store-
|
|
395
|
-
storeName: "
|
|
396
|
-
productId: "product-
|
|
397
|
-
productTitle: "
|
|
245
|
+
sellerDisplayName: "Seto Kaiba",
|
|
246
|
+
storeId: "store-kaiba-corp-cards",
|
|
247
|
+
storeName: "Kaiba Corp Card Vault",
|
|
248
|
+
productId: "product-chaos-emperor-dragon-ioc",
|
|
249
|
+
productTitle: "Chaos Emperor Dragon — Envoy of the End IOC 1st Ed",
|
|
398
250
|
messages: [
|
|
399
251
|
{
|
|
400
|
-
id: "msg-
|
|
252
|
+
id: "msg-006-1",
|
|
401
253
|
senderId: "user-admin-letitrip",
|
|
402
254
|
senderRole: "buyer",
|
|
403
|
-
body: "Hi! My order for
|
|
255
|
+
body: "Hi! My order for CED IOC shipped 2 days ago — tracking shows it left your city but has not updated since. Can you check with Shiprocket?",
|
|
404
256
|
isRead: true,
|
|
405
|
-
sentAt: daysAgo(
|
|
257
|
+
sentAt: daysAgo(6),
|
|
406
258
|
},
|
|
407
259
|
{
|
|
408
|
-
id: "msg-
|
|
409
|
-
senderId: "user-
|
|
260
|
+
id: "msg-006-2",
|
|
261
|
+
senderId: "user-seto-kaiba",
|
|
410
262
|
senderRole: "seller",
|
|
411
|
-
body: "Hi! Yes, I raised a ticket with Shiprocket about that. They confirmed it is in transit at the
|
|
263
|
+
body: "Hi! Yes, I raised a ticket with Shiprocket 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.",
|
|
412
264
|
isRead: true,
|
|
413
|
-
sentAt: daysAgo(
|
|
265
|
+
sentAt: daysAgo(6),
|
|
414
266
|
},
|
|
415
267
|
{
|
|
416
|
-
id: "msg-
|
|
268
|
+
id: "msg-006-3",
|
|
417
269
|
senderId: "user-admin-letitrip",
|
|
418
270
|
senderRole: "buyer",
|
|
419
|
-
body: "
|
|
271
|
+
body: "Got the card today, arrived in perfect condition. Thanks Kaiba!",
|
|
420
272
|
isRead: true,
|
|
421
|
-
sentAt: daysAgo(
|
|
273
|
+
sentAt: daysAgo(4),
|
|
422
274
|
},
|
|
423
275
|
{
|
|
424
|
-
id: "msg-
|
|
425
|
-
senderId: "user-
|
|
276
|
+
id: "msg-006-4",
|
|
277
|
+
senderId: "user-seto-kaiba",
|
|
426
278
|
senderRole: "seller",
|
|
427
|
-
body: "
|
|
428
|
-
isRead:
|
|
429
|
-
sentAt: daysAgo(
|
|
279
|
+
body: "Glad it arrived safely! Please leave a review when you get a chance.",
|
|
280
|
+
isRead: true,
|
|
281
|
+
sentAt: daysAgo(4),
|
|
430
282
|
},
|
|
431
283
|
],
|
|
432
|
-
lastMessage: "
|
|
433
|
-
lastMessageAt: daysAgo(
|
|
434
|
-
unreadBuyer:
|
|
284
|
+
lastMessage: "Glad it arrived safely! Please leave a review when you get a chance.",
|
|
285
|
+
lastMessageAt: daysAgo(4),
|
|
286
|
+
unreadBuyer: 0,
|
|
435
287
|
unreadSeller: 0,
|
|
436
|
-
status: "
|
|
437
|
-
createdAt: daysAgo(
|
|
438
|
-
updatedAt: daysAgo(
|
|
288
|
+
status: "archived",
|
|
289
|
+
createdAt: daysAgo(6),
|
|
290
|
+
updatedAt: daysAgo(4),
|
|
439
291
|
},
|
|
440
292
|
];
|
|
@@ -1,25 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Coupon Usage Seed Data — LetItRip Collectibles Platform
|
|
3
|
-
*
|
|
4
|
-
* These records live at users/{userId}/couponUsage/{couponId}.
|
|
5
|
-
* Each doc represents how many times a buyer has used a specific coupon,
|
|
6
|
-
* which order IDs consumed it, and when it was last used.
|
|
7
|
-
*
|
|
8
|
-
* Used by the seed route to populate the subcollection so that the
|
|
9
|
-
* per-user limit check (validateCouponForCart → getUserCouponUsageCount)
|
|
10
|
-
* has realistic data to work against in the demo environment.
|
|
11
|
-
*/
|
|
12
1
|
export interface CouponUsageSeedRecord {
|
|
13
|
-
/** users/{userId} — the parent doc */
|
|
14
2
|
userId: string;
|
|
15
|
-
/** couponUsage/{couponId} — the subcollection doc ID */
|
|
16
3
|
couponId: string;
|
|
17
|
-
/** Denormalised human-readable code for display */
|
|
18
4
|
couponCode: string;
|
|
19
|
-
/** How many times this user has redeemed this coupon */
|
|
20
5
|
usageCount: number;
|
|
21
6
|
lastUsedAt: Date;
|
|
22
|
-
/** All order IDs that consumed this coupon (most recent first) */
|
|
23
7
|
orders: string[];
|
|
24
8
|
}
|
|
25
9
|
export declare const couponUsageSeedData: CouponUsageSeedRecord[];
|