@mohasinac/appkit 2.7.52 → 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,244 +1,357 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
1
|
+
/*
|
|
2
|
+
* WHY: Seeds notifications for YGO marketplace — covers all notification types across 3 users.
|
|
3
|
+
* WHAT: 23 notifications (10 Yugi, 8 Kaiba, 5 Admin). Mix of read/unread, all notification types.
|
|
4
|
+
*
|
|
5
|
+
* EXPORTS:
|
|
6
|
+
* notificationsSeedData — Array of Partial<NotificationDocument> for seed runner
|
|
7
|
+
*
|
|
8
|
+
* @tag domain:notifications
|
|
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
|
import { NOTIFICATION_FIELDS } from "../features/admin/schemas";
|
|
8
16
|
const NOW = new Date();
|
|
17
|
+
const hoursAgo = (n) => new Date(NOW.getTime() - n * 3600000);
|
|
9
18
|
const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
|
|
10
|
-
const hoursAgo = (h) => new Date(NOW.getTime() - h * 3600000);
|
|
11
19
|
export const notificationsSeedData = [
|
|
12
|
-
// ──
|
|
20
|
+
// ── Yugi's notifications (10) — buyer-focused ─────────────────────────────
|
|
13
21
|
{
|
|
14
|
-
id: "notif-
|
|
15
|
-
userId: "user-
|
|
16
|
-
type: NOTIFICATION_FIELDS.TYPE_VALUES.
|
|
17
|
-
priority:
|
|
18
|
-
title: "
|
|
19
|
-
message: "
|
|
20
|
-
actionUrl: "/
|
|
21
|
-
actionLabel: "
|
|
22
|
-
isRead:
|
|
23
|
-
|
|
24
|
-
relatedType: "
|
|
25
|
-
createdAt:
|
|
26
|
-
updatedAt:
|
|
22
|
+
id: "notif-yugi-outbid-001",
|
|
23
|
+
userId: "user-yugi-muto",
|
|
24
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.BID_OUTBID,
|
|
25
|
+
priority: "high",
|
|
26
|
+
title: "You've been outbid!",
|
|
27
|
+
message: "Someone placed a higher bid on Blue-Eyes White Dragon LOB 1st Ed PSA 10. Current bid: ₹1,50,000.",
|
|
28
|
+
actionUrl: "/auctions/auction-blue-eyes-lob-1st-psa10",
|
|
29
|
+
actionLabel: "Place New Bid",
|
|
30
|
+
isRead: false,
|
|
31
|
+
relatedId: "auction-blue-eyes-lob-1st-psa10",
|
|
32
|
+
relatedType: "product",
|
|
33
|
+
createdAt: hoursAgo(2),
|
|
34
|
+
updatedAt: hoursAgo(2),
|
|
27
35
|
},
|
|
28
|
-
// ── 2. Order Shipped — buyer (unread) ────────────────────────────────────
|
|
29
36
|
{
|
|
30
|
-
id: "notif-
|
|
31
|
-
userId: "user-
|
|
37
|
+
id: "notif-yugi-shipped-001",
|
|
38
|
+
userId: "user-yugi-muto",
|
|
32
39
|
type: NOTIFICATION_FIELDS.TYPE_VALUES.ORDER_SHIPPED,
|
|
33
|
-
priority:
|
|
34
|
-
title: "Your
|
|
35
|
-
message: "
|
|
36
|
-
actionUrl: "/user/orders/order-
|
|
40
|
+
priority: "normal",
|
|
41
|
+
title: "Your order has shipped!",
|
|
42
|
+
message: "Order #order-1-20260515-abc123 — Dark Magician LOB is on its way. Track your shipment.",
|
|
43
|
+
actionUrl: "/user/orders/order-1-20260515-abc123",
|
|
37
44
|
actionLabel: "Track Order",
|
|
38
45
|
isRead: false,
|
|
39
|
-
relatedId: "order-
|
|
46
|
+
relatedId: "order-1-20260515-abc123",
|
|
40
47
|
relatedType: "order",
|
|
41
|
-
createdAt:
|
|
42
|
-
updatedAt:
|
|
48
|
+
createdAt: hoursAgo(6),
|
|
49
|
+
updatedAt: hoursAgo(6),
|
|
43
50
|
},
|
|
44
|
-
// ── 3. Bid Outbid — buyer (unread) ────────────────────────────────────────
|
|
45
51
|
{
|
|
46
|
-
id: "notif-
|
|
47
|
-
userId: "user-
|
|
48
|
-
type: NOTIFICATION_FIELDS.TYPE_VALUES.
|
|
49
|
-
priority:
|
|
50
|
-
title: "
|
|
51
|
-
message: "
|
|
52
|
-
actionUrl: "/
|
|
53
|
-
actionLabel: "
|
|
52
|
+
id: "notif-yugi-delivered-001",
|
|
53
|
+
userId: "user-yugi-muto",
|
|
54
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.ORDER_DELIVERED,
|
|
55
|
+
priority: "normal",
|
|
56
|
+
title: "Order delivered!",
|
|
57
|
+
message: "Order #order-2-20260510-def456 has been delivered. Please confirm receipt and leave a review.",
|
|
58
|
+
actionUrl: "/user/orders/order-2-20260510-def456",
|
|
59
|
+
actionLabel: "Confirm & Review",
|
|
60
|
+
isRead: true,
|
|
61
|
+
readAt: daysAgo(1),
|
|
62
|
+
relatedId: "order-2-20260510-def456",
|
|
63
|
+
relatedType: "order",
|
|
64
|
+
createdAt: daysAgo(2),
|
|
65
|
+
updatedAt: daysAgo(1),
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: "notif-yugi-price-drop-001",
|
|
69
|
+
userId: "user-yugi-muto",
|
|
70
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.PRODUCT_AVAILABLE,
|
|
71
|
+
priority: "normal",
|
|
72
|
+
title: "Price drop on your wishlist item!",
|
|
73
|
+
message: "Pot of Greed LOB dropped from ₹14,999 to ₹12,999. Get it before it's gone.",
|
|
74
|
+
actionUrl: "/products/product-pot-of-greed-lob",
|
|
75
|
+
actionLabel: "View Product",
|
|
54
76
|
isRead: false,
|
|
55
|
-
relatedId: "
|
|
77
|
+
relatedId: "product-pot-of-greed-lob",
|
|
56
78
|
relatedType: "product",
|
|
57
|
-
createdAt:
|
|
58
|
-
updatedAt:
|
|
79
|
+
createdAt: daysAgo(1),
|
|
80
|
+
updatedAt: daysAgo(1),
|
|
59
81
|
},
|
|
60
|
-
// ── 4. Bid Won — buyer (read) ─────────────────────────────────────────────
|
|
61
82
|
{
|
|
62
|
-
id: "notif-
|
|
63
|
-
userId: "user-
|
|
83
|
+
id: "notif-yugi-auction-won-001",
|
|
84
|
+
userId: "user-yugi-muto",
|
|
64
85
|
type: NOTIFICATION_FIELDS.TYPE_VALUES.BID_WON,
|
|
65
|
-
priority:
|
|
66
|
-
title: "Congratulations
|
|
67
|
-
message: "You
|
|
68
|
-
actionUrl: "/
|
|
86
|
+
priority: "high",
|
|
87
|
+
title: "Congratulations! You won the auction!",
|
|
88
|
+
message: "You won the Mirror Force MRD 1st Ed auction for ₹15,000. Complete payment within 48 hours.",
|
|
89
|
+
actionUrl: "/auctions/auction-mirror-force-mrd-1st-psa10",
|
|
69
90
|
actionLabel: "Pay Now",
|
|
70
91
|
isRead: true,
|
|
71
|
-
readAt: daysAgo(
|
|
72
|
-
relatedId: "auction-
|
|
73
|
-
relatedType: "
|
|
74
|
-
createdAt: daysAgo(
|
|
75
|
-
updatedAt: daysAgo(
|
|
92
|
+
readAt: daysAgo(3),
|
|
93
|
+
relatedId: "auction-mirror-force-mrd-1st-psa10",
|
|
94
|
+
relatedType: "product",
|
|
95
|
+
createdAt: daysAgo(5),
|
|
96
|
+
updatedAt: daysAgo(3),
|
|
76
97
|
},
|
|
77
|
-
// ── 5. Order Delivered — buyer (read) ─────────────────────────────────────
|
|
78
98
|
{
|
|
79
|
-
id: "notif-
|
|
80
|
-
userId: "user-
|
|
81
|
-
type: NOTIFICATION_FIELDS.TYPE_VALUES.
|
|
82
|
-
priority:
|
|
83
|
-
title: "
|
|
84
|
-
message: "
|
|
85
|
-
actionUrl: "/
|
|
86
|
-
actionLabel: "
|
|
99
|
+
id: "notif-yugi-raffle-win-001",
|
|
100
|
+
userId: "user-yugi-muto",
|
|
101
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.SYSTEM,
|
|
102
|
+
priority: "high",
|
|
103
|
+
title: "You won the LOB 1st Edition Raffle!",
|
|
104
|
+
message: "Congratulations! You've been selected as the winner of the Complete LOB 1st Edition Set raffle.",
|
|
105
|
+
actionUrl: "/events/event-won-complete-lob-raffle",
|
|
106
|
+
actionLabel: "View Details",
|
|
87
107
|
isRead: true,
|
|
88
|
-
readAt: daysAgo(
|
|
89
|
-
relatedId: "
|
|
90
|
-
relatedType: "
|
|
91
|
-
createdAt: daysAgo(
|
|
92
|
-
updatedAt: daysAgo(
|
|
108
|
+
readAt: daysAgo(4),
|
|
109
|
+
relatedId: "event-won-complete-lob-raffle",
|
|
110
|
+
relatedType: "product",
|
|
111
|
+
createdAt: daysAgo(5),
|
|
112
|
+
updatedAt: daysAgo(4),
|
|
93
113
|
},
|
|
94
|
-
// ── 6. Review Approved — seller (unread) ──────────────────────────────────
|
|
95
114
|
{
|
|
96
|
-
id: "notif-review-approved-
|
|
97
|
-
userId: "user-
|
|
115
|
+
id: "notif-yugi-review-approved-001",
|
|
116
|
+
userId: "user-yugi-muto",
|
|
98
117
|
type: NOTIFICATION_FIELDS.TYPE_VALUES.REVIEW_APPROVED,
|
|
99
|
-
priority:
|
|
100
|
-
title: "
|
|
101
|
-
message: "
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
relatedId: "review-pokemon-151-box-rahul-001",
|
|
118
|
+
priority: "low",
|
|
119
|
+
title: "Your review was published",
|
|
120
|
+
message: "Your review for Dark Magician LOB 1st Edition has been approved and is now live.",
|
|
121
|
+
isRead: true,
|
|
122
|
+
readAt: daysAgo(6),
|
|
123
|
+
relatedId: "review-1",
|
|
106
124
|
relatedType: "review",
|
|
107
|
-
createdAt: daysAgo(
|
|
108
|
-
updatedAt: daysAgo(
|
|
125
|
+
createdAt: daysAgo(7),
|
|
126
|
+
updatedAt: daysAgo(6),
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: "notif-yugi-welcome-001",
|
|
130
|
+
userId: "user-yugi-muto",
|
|
131
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.WELCOME,
|
|
132
|
+
priority: "normal",
|
|
133
|
+
title: "Welcome to LetItRip, Yugi!",
|
|
134
|
+
message: "Your account is ready. Start browsing verified Yu-Gi-Oh! cards from sellers across India.",
|
|
135
|
+
actionUrl: "/products",
|
|
136
|
+
actionLabel: "Start Shopping",
|
|
137
|
+
isRead: true,
|
|
138
|
+
readAt: daysAgo(30),
|
|
139
|
+
createdAt: daysAgo(30),
|
|
140
|
+
updatedAt: daysAgo(30),
|
|
109
141
|
},
|
|
110
|
-
// ── 7. Offer Received — seller (unread) ───────────────────────────────────
|
|
111
142
|
{
|
|
112
|
-
id: "notif-offer-received-
|
|
113
|
-
userId: "user-
|
|
143
|
+
id: "notif-yugi-offer-received-001",
|
|
144
|
+
userId: "user-yugi-muto",
|
|
114
145
|
type: NOTIFICATION_FIELDS.TYPE_VALUES.OFFER_RECEIVED,
|
|
115
|
-
priority:
|
|
116
|
-
title: "
|
|
117
|
-
message: "
|
|
118
|
-
actionUrl: "/
|
|
119
|
-
actionLabel: "
|
|
146
|
+
priority: "normal",
|
|
147
|
+
title: "Counter-offer on your Dark Magician Girl bid",
|
|
148
|
+
message: "Kaiba Corp countered your offer of ₹7,500 with ₹8,200 for Dark Magician Girl IOC.",
|
|
149
|
+
actionUrl: "/user/offers",
|
|
150
|
+
actionLabel: "View Offer",
|
|
120
151
|
isRead: false,
|
|
121
|
-
relatedId: "product-
|
|
122
|
-
relatedType: "
|
|
123
|
-
createdAt: hoursAgo(
|
|
124
|
-
updatedAt: hoursAgo(
|
|
152
|
+
relatedId: "product-dark-magician-girl-ioc",
|
|
153
|
+
relatedType: "product",
|
|
154
|
+
createdAt: hoursAgo(8),
|
|
155
|
+
updatedAt: hoursAgo(8),
|
|
125
156
|
},
|
|
126
|
-
// ── 8. Product Available — buyer (unread) ─────────────────────────────────
|
|
127
157
|
{
|
|
128
|
-
id: "notif-
|
|
129
|
-
userId: "user-
|
|
158
|
+
id: "notif-yugi-new-listing-001",
|
|
159
|
+
userId: "user-yugi-muto",
|
|
130
160
|
type: NOTIFICATION_FIELDS.TYPE_VALUES.PRODUCT_AVAILABLE,
|
|
131
|
-
priority:
|
|
132
|
-
title: "
|
|
133
|
-
message: "
|
|
134
|
-
actionUrl: "/products/product-
|
|
135
|
-
actionLabel: "View
|
|
161
|
+
priority: "normal",
|
|
162
|
+
title: "New listing from Kaiba Corp!",
|
|
163
|
+
message: "Kaiba Corp Card Vault just listed a Rainbow Dragon POTD 1st Edition.",
|
|
164
|
+
actionUrl: "/products/product-rainbow-dragon",
|
|
165
|
+
actionLabel: "View",
|
|
136
166
|
isRead: false,
|
|
137
|
-
relatedId: "product-
|
|
167
|
+
relatedId: "product-rainbow-dragon",
|
|
138
168
|
relatedType: "product",
|
|
169
|
+
createdAt: daysAgo(1),
|
|
170
|
+
updatedAt: daysAgo(1),
|
|
171
|
+
},
|
|
172
|
+
// ── Kaiba's notifications (8) — seller-focused ────────────────────────────
|
|
173
|
+
{
|
|
174
|
+
id: "notif-kaiba-new-order-001",
|
|
175
|
+
userId: "user-seto-kaiba",
|
|
176
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.ORDER_PLACED,
|
|
177
|
+
priority: "high",
|
|
178
|
+
title: "New order received!",
|
|
179
|
+
message: "Yugi Muto ordered Dark Magician LOB 1st Edition. Ship within 3 business days.",
|
|
180
|
+
actionUrl: "/store/orders",
|
|
181
|
+
actionLabel: "View Order",
|
|
182
|
+
isRead: false,
|
|
183
|
+
relatedId: "order-1-20260515-abc123",
|
|
184
|
+
relatedType: "order",
|
|
185
|
+
createdAt: hoursAgo(4),
|
|
186
|
+
updatedAt: hoursAgo(4),
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
id: "notif-kaiba-new-review-001",
|
|
190
|
+
userId: "user-seto-kaiba",
|
|
191
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.REVIEW_APPROVED,
|
|
192
|
+
priority: "normal",
|
|
193
|
+
title: "New 5-star review!",
|
|
194
|
+
message: "Yugi Muto left a 5-star review: 'Excellent quality and fast shipping!'",
|
|
195
|
+
actionUrl: "/store/reviews",
|
|
196
|
+
actionLabel: "View Review",
|
|
197
|
+
isRead: true,
|
|
198
|
+
readAt: daysAgo(1),
|
|
199
|
+
relatedId: "review-1",
|
|
200
|
+
relatedType: "review",
|
|
201
|
+
createdAt: daysAgo(2),
|
|
202
|
+
updatedAt: daysAgo(1),
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: "notif-kaiba-new-bid-001",
|
|
206
|
+
userId: "user-seto-kaiba",
|
|
207
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.BID_PLACED,
|
|
208
|
+
priority: "normal",
|
|
209
|
+
title: "New bid on your auction",
|
|
210
|
+
message: "Yugi Muto bid ₹1,25,000 on Blue-Eyes White Dragon LOB 1st Ed PSA 10.",
|
|
211
|
+
actionUrl: "/store/products/auction-blue-eyes-lob-1st-psa10",
|
|
212
|
+
actionLabel: "View Auction",
|
|
213
|
+
isRead: false,
|
|
214
|
+
relatedId: "auction-blue-eyes-lob-1st-psa10",
|
|
215
|
+
relatedType: "bid",
|
|
139
216
|
createdAt: hoursAgo(3),
|
|
140
217
|
updatedAt: hoursAgo(3),
|
|
141
218
|
},
|
|
142
|
-
// ── 9. Refund Initiated — buyer (read) ────────────────────────────────────
|
|
143
219
|
{
|
|
144
|
-
id: "notif-
|
|
145
|
-
userId: "user-
|
|
146
|
-
type: NOTIFICATION_FIELDS.TYPE_VALUES.
|
|
147
|
-
priority:
|
|
148
|
-
title: "
|
|
149
|
-
message: "
|
|
150
|
-
actionUrl: "/
|
|
151
|
-
actionLabel: "View
|
|
220
|
+
id: "notif-kaiba-payout-001",
|
|
221
|
+
userId: "user-seto-kaiba",
|
|
222
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.SYSTEM,
|
|
223
|
+
priority: "normal",
|
|
224
|
+
title: "Payout processed",
|
|
225
|
+
message: "₹45,000 has been transferred to your UPI account for May orders.",
|
|
226
|
+
actionUrl: "/store/payouts",
|
|
227
|
+
actionLabel: "View Payout",
|
|
152
228
|
isRead: true,
|
|
153
|
-
readAt: daysAgo(
|
|
154
|
-
|
|
229
|
+
readAt: daysAgo(3),
|
|
230
|
+
createdAt: daysAgo(5),
|
|
231
|
+
updatedAt: daysAgo(3),
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
id: "notif-kaiba-bid-received-001",
|
|
235
|
+
userId: "user-seto-kaiba",
|
|
236
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.BID_PLACED,
|
|
237
|
+
priority: "normal",
|
|
238
|
+
title: "New bid on Exodia Complete Set",
|
|
239
|
+
message: "LetItRip Admin bid ₹2,00,000 on Exodia Complete Set PSA 9.",
|
|
240
|
+
actionUrl: "/store/products/auction-exodia-complete-set-psa9",
|
|
241
|
+
actionLabel: "View",
|
|
242
|
+
isRead: false,
|
|
243
|
+
relatedId: "auction-exodia-complete-set-psa9",
|
|
244
|
+
relatedType: "bid",
|
|
245
|
+
createdAt: hoursAgo(12),
|
|
246
|
+
updatedAt: hoursAgo(12),
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
id: "notif-kaiba-offer-001",
|
|
250
|
+
userId: "user-seto-kaiba",
|
|
251
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.OFFER_RECEIVED,
|
|
252
|
+
priority: "normal",
|
|
253
|
+
title: "New offer on Dark Magician Girl",
|
|
254
|
+
message: "Yugi Muto made an offer of ₹7,500 for Dark Magician Girl IOC.",
|
|
255
|
+
actionUrl: "/store/offers",
|
|
256
|
+
actionLabel: "Respond",
|
|
257
|
+
isRead: false,
|
|
258
|
+
relatedId: "product-dark-magician-girl-ioc",
|
|
259
|
+
relatedType: "offer",
|
|
260
|
+
createdAt: hoursAgo(10),
|
|
261
|
+
updatedAt: hoursAgo(10),
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
id: "notif-kaiba-welcome-001",
|
|
265
|
+
userId: "user-seto-kaiba",
|
|
266
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.WELCOME,
|
|
267
|
+
priority: "normal",
|
|
268
|
+
title: "Welcome to LetItRip, Kaiba!",
|
|
269
|
+
message: "Your store Kaiba Corp Card Vault is now live. Start listing cards.",
|
|
270
|
+
isRead: true,
|
|
271
|
+
readAt: daysAgo(30),
|
|
272
|
+
createdAt: daysAgo(30),
|
|
273
|
+
updatedAt: daysAgo(30),
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
id: "notif-kaiba-order-cancelled-001",
|
|
277
|
+
userId: "user-seto-kaiba",
|
|
278
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.ORDER_CANCELLED,
|
|
279
|
+
priority: "high",
|
|
280
|
+
title: "Order cancelled",
|
|
281
|
+
message: "Order #order-8-20260501-xyz789 was cancelled by the buyer.",
|
|
282
|
+
actionUrl: "/store/orders",
|
|
283
|
+
actionLabel: "View",
|
|
284
|
+
isRead: true,
|
|
285
|
+
readAt: daysAgo(7),
|
|
286
|
+
relatedId: "order-8-20260501-xyz789",
|
|
155
287
|
relatedType: "order",
|
|
156
|
-
createdAt: daysAgo(
|
|
157
|
-
updatedAt: daysAgo(
|
|
158
|
-
},
|
|
159
|
-
// ──
|
|
160
|
-
{
|
|
161
|
-
id: "notif-
|
|
162
|
-
userId: "user-
|
|
163
|
-
type: NOTIFICATION_FIELDS.TYPE_VALUES.
|
|
164
|
-
priority:
|
|
165
|
-
title: "
|
|
166
|
-
message: "
|
|
167
|
-
actionUrl: "/
|
|
168
|
-
actionLabel: "
|
|
288
|
+
createdAt: daysAgo(8),
|
|
289
|
+
updatedAt: daysAgo(7),
|
|
290
|
+
},
|
|
291
|
+
// ── Admin's notifications (5) — buyer + system ────────────────────────────
|
|
292
|
+
{
|
|
293
|
+
id: "notif-admin-shipped-001",
|
|
294
|
+
userId: "user-admin-letitrip",
|
|
295
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.ORDER_SHIPPED,
|
|
296
|
+
priority: "normal",
|
|
297
|
+
title: "Your order has shipped!",
|
|
298
|
+
message: "Order from Kaiba Corp — Chaos Emperor Dragon is on its way.",
|
|
299
|
+
actionUrl: "/user/orders",
|
|
300
|
+
actionLabel: "Track",
|
|
301
|
+
isRead: false,
|
|
302
|
+
createdAt: hoursAgo(5),
|
|
303
|
+
updatedAt: hoursAgo(5),
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
id: "notif-admin-bid-001",
|
|
307
|
+
userId: "user-admin-letitrip",
|
|
308
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.BID_PLACED,
|
|
309
|
+
priority: "normal",
|
|
310
|
+
title: "Your bid was placed",
|
|
311
|
+
message: "You bid ₹2,00,000 on Exodia Complete Set PSA 9.",
|
|
169
312
|
isRead: true,
|
|
170
313
|
readAt: daysAgo(1),
|
|
171
|
-
|
|
314
|
+
relatedId: "auction-exodia-complete-set-psa9",
|
|
315
|
+
relatedType: "bid",
|
|
316
|
+
createdAt: daysAgo(1),
|
|
172
317
|
updatedAt: daysAgo(1),
|
|
173
318
|
},
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
{ user: "user-admin-letitrip", type: "SYSTEM", title: "Support ticket escalated: order missing (high)", message: "Ticket ticket-rahul-order-001 was escalated from Simran Kaur. Buyer Rahul Sharma claims delivery was empty — courier claim filed. Needs admin review.", read: true, hours: 48 },
|
|
213
|
-
{ user: "user-admin-letitrip", type: "SYSTEM", title: "Platform summary: week of May 12", message: "Week of May 12: 47 new orders (Rs 3.8L GMV), 12 new users, 2 new seller registrations, 0 chargebacks, 99.8% uptime. Full report in admin dashboard.", read: true, hours: 96 },
|
|
214
|
-
{ user: "user-admin-letitrip", type: "REVIEW_APPROVED", title: "New 5-star review on LetItRip Official", message: "Naman Gupta left a 5-star review on figma Link (TotK): Best figma I own. Perfect packaging, zero damage.", read: true, hours: 36 },
|
|
215
|
-
{ user: "user-admin-letitrip", type: "ORDER_SHIPPED", title: "Your Mew PSA 10 order has shipped", message: "Vintage Vault has dispatched your Mew 1st Edition PSA 10. Tracking: DTDC112233445. Estimated delivery in 3 business days.", read: true, hours: 240 },
|
|
216
|
-
]),
|
|
319
|
+
{
|
|
320
|
+
id: "notif-admin-delivered-001",
|
|
321
|
+
userId: "user-admin-letitrip",
|
|
322
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.ORDER_DELIVERED,
|
|
323
|
+
priority: "normal",
|
|
324
|
+
title: "Order delivered",
|
|
325
|
+
message: "Your order of Raigeki LOB has been delivered.",
|
|
326
|
+
isRead: true,
|
|
327
|
+
readAt: daysAgo(5),
|
|
328
|
+
createdAt: daysAgo(6),
|
|
329
|
+
updatedAt: daysAgo(5),
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
id: "notif-admin-system-001",
|
|
333
|
+
userId: "user-admin-letitrip",
|
|
334
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.SYSTEM,
|
|
335
|
+
priority: "low",
|
|
336
|
+
title: "Seed data loaded successfully",
|
|
337
|
+
message: "All 26 collections seeded. Verify data in the admin panel.",
|
|
338
|
+
actionUrl: "/admin/dashboard",
|
|
339
|
+
actionLabel: "Admin Dashboard",
|
|
340
|
+
isRead: true,
|
|
341
|
+
readAt: daysAgo(10),
|
|
342
|
+
createdAt: daysAgo(10),
|
|
343
|
+
updatedAt: daysAgo(10),
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
id: "notif-admin-welcome-001",
|
|
347
|
+
userId: "user-admin-letitrip",
|
|
348
|
+
type: NOTIFICATION_FIELDS.TYPE_VALUES.WELCOME,
|
|
349
|
+
priority: "normal",
|
|
350
|
+
title: "Welcome to LetItRip Admin!",
|
|
351
|
+
message: "Your admin account is active. Manage stores, products, and site settings.",
|
|
352
|
+
isRead: true,
|
|
353
|
+
readAt: daysAgo(60),
|
|
354
|
+
createdAt: daysAgo(60),
|
|
355
|
+
updatedAt: daysAgo(60),
|
|
356
|
+
},
|
|
217
357
|
];
|
|
218
|
-
/**
|
|
219
|
-
* Compact constructor for the P29 expansion. Keeps each row a single line of
|
|
220
|
-
* spec and lets the helper backfill `id`, `priority`, `readAt`, timestamps.
|
|
221
|
-
* High-priority types: bidding, OFFER_RECEIVED, ORDER_DELIVERED.
|
|
222
|
-
*/
|
|
223
|
-
function buildNotificationBatch(specs) {
|
|
224
|
-
return specs.map((s, i) => {
|
|
225
|
-
const created = hoursAgo(s.hours);
|
|
226
|
-
const high = s.type.startsWith("BID_") ||
|
|
227
|
-
s.type === "ORDER_DELIVERED" ||
|
|
228
|
-
s.type === "OFFER_RECEIVED";
|
|
229
|
-
return {
|
|
230
|
-
id: `notif-batch-${s.user.replace("user-", "")}-${String(i + 1).padStart(3, "0")}`,
|
|
231
|
-
userId: s.user,
|
|
232
|
-
type: NOTIFICATION_FIELDS.TYPE_VALUES[s.type],
|
|
233
|
-
priority: high
|
|
234
|
-
? NOTIFICATION_FIELDS.PRIORITY_VALUES.HIGH
|
|
235
|
-
: NOTIFICATION_FIELDS.PRIORITY_VALUES.NORMAL,
|
|
236
|
-
title: s.title,
|
|
237
|
-
message: s.message,
|
|
238
|
-
isRead: s.read,
|
|
239
|
-
readAt: s.read ? hoursAgo(Math.max(0, s.hours - 1)) : undefined,
|
|
240
|
-
createdAt: created,
|
|
241
|
-
updatedAt: created,
|
|
242
|
-
};
|
|
243
|
-
});
|
|
244
|
-
}
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Offers Seed Data — 12 offers across all statuses.
|
|
3
|
-
*
|
|
4
|
-
* Covers: pending (×3), accepted (×1), declined (×2), countered (×2),
|
|
5
|
-
* expired (×2), withdrawn (×1), paid (×2).
|
|
6
|
-
* Admin as buyer: 1 pending (Hot Wheels Banana Camaro) + 1 paid (ALTER Rem Wedding).
|
|
7
|
-
* Paid offers link to order-admin-043-alter-rem-offer and order-arjun-044-bx01-offer.
|
|
8
|
-
*/
|
|
9
1
|
import type { OfferDocument } from "../features/seller/schemas/firestore";
|
|
10
2
|
export declare const offersSeedData: Partial<OfferDocument>[];
|