@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.
Files changed (123) hide show
  1. package/dist/_internal/client/features/layout/DashboardLayoutClient.js +1 -1
  2. package/dist/_internal/server/jobs/core/auctionSettlement.js +6 -3
  3. package/dist/_internal/server/jobs/core/bundleStockSync.js +9 -7
  4. package/dist/_internal/server/jobs/core/onProductStockChange.d.ts +12 -3
  5. package/dist/_internal/server/jobs/core/onProductStockChange.js +12 -13
  6. package/dist/_internal/server/jobs/core/onProductWrite.js +1 -3
  7. package/dist/_internal/server/jobs/handlers/onProductStockChange.js +11 -2
  8. package/dist/client.d.ts +2 -0
  9. package/dist/client.js +1 -0
  10. package/dist/constants/field-names.d.ts +4 -3
  11. package/dist/constants/field-names.js +8 -8
  12. package/dist/errors/error-codes.d.ts +3 -0
  13. package/dist/errors/error-codes.js +3 -0
  14. package/dist/errors/messages.d.ts +3 -0
  15. package/dist/errors/messages.js +3 -0
  16. package/dist/features/admin/types/product.types.d.ts +1 -1
  17. package/dist/features/admin/types/product.types.js +2 -3
  18. package/dist/features/auctions/actions/bid-actions.d.ts +9 -0
  19. package/dist/features/auctions/actions/bid-actions.js +61 -0
  20. package/dist/features/auctions/components/AuctionDetailPageView.d.ts +2 -1
  21. package/dist/features/auctions/components/AuctionDetailPageView.js +5 -4
  22. package/dist/features/auctions/components/PlaceBidFormClient.d.ts +3 -1
  23. package/dist/features/auctions/components/PlaceBidFormClient.js +32 -2
  24. package/dist/features/auctions/types/index.d.ts +1 -1
  25. package/dist/features/layout/AppLayoutShell.js +1 -1
  26. package/dist/features/pre-orders/components/PreOrdersIndexListing.js +2 -11
  27. package/dist/features/products/api/[id]/route.js +4 -8
  28. package/dist/features/products/api/route.js +1 -3
  29. package/dist/features/products/components/AuctionsIndexListing.js +3 -11
  30. package/dist/features/products/components/PrizeDrawsIndexListing.js +2 -10
  31. package/dist/features/products/components/ProductFilters.d.ts +33 -9
  32. package/dist/features/products/components/ProductFilters.js +6 -29
  33. package/dist/features/products/components/ProductForm.js +2 -3
  34. package/dist/features/products/constants/sieve.d.ts +162 -0
  35. package/dist/features/products/constants/sieve.js +95 -0
  36. package/dist/features/products/repository/products.repository.d.ts +5 -0
  37. package/dist/features/products/repository/products.repository.js +23 -3
  38. package/dist/features/products/schemas/firestore.d.ts +4 -4
  39. package/dist/features/products/schemas/firestore.js +2 -3
  40. package/dist/features/products/schemas/index.d.ts +6 -6
  41. package/dist/features/products/schemas/index.js +2 -6
  42. package/dist/features/products/types/index.d.ts +1 -1
  43. package/dist/features/seller/actions/offer-actions.js +2 -2
  44. package/dist/features/wishlist/types/index.d.ts +1 -1
  45. package/dist/index.d.ts +6 -3
  46. package/dist/index.js +6 -4
  47. package/dist/seed/addresses-seed-data.d.ts +2 -18
  48. package/dist/seed/addresses-seed-data.js +137 -203
  49. package/dist/seed/bids-seed-data.d.ts +2 -8
  50. package/dist/seed/bids-seed-data.js +172 -648
  51. package/dist/seed/blog-posts-seed-data.d.ts +0 -5
  52. package/dist/seed/blog-posts-seed-data.js +341 -596
  53. package/dist/seed/carousel-slides-seed-data.d.ts +0 -5
  54. package/dist/seed/carousel-slides-seed-data.js +61 -192
  55. package/dist/seed/carousels-seed-data.js +18 -1
  56. package/dist/seed/cart-seed-data.d.ts +1 -18
  57. package/dist/seed/cart-seed-data.js +116 -293
  58. package/dist/seed/categories-seed-data.d.ts +0 -6
  59. package/dist/seed/categories-seed-data.js +1409 -1537
  60. package/dist/seed/claimed-coupons-seed-data.d.ts +0 -11
  61. package/dist/seed/claimed-coupons-seed-data.js +32 -29
  62. package/dist/seed/conversations-seed-data.d.ts +0 -6
  63. package/dist/seed/conversations-seed-data.js +132 -280
  64. package/dist/seed/coupon-usage-seed-data.d.ts +0 -16
  65. package/dist/seed/coupon-usage-seed-data.js +30 -44
  66. package/dist/seed/coupons-seed-data.d.ts +0 -6
  67. package/dist/seed/coupons-seed-data.js +141 -489
  68. package/dist/seed/events-seed-data.d.ts +0 -6
  69. package/dist/seed/events-seed-data.js +201 -379
  70. package/dist/seed/faq-seed-data.d.ts +0 -14
  71. package/dist/seed/faq-seed-data.js +609 -1184
  72. package/dist/seed/grouped-listings-seed-data.d.ts +119 -8
  73. package/dist/seed/grouped-listings-seed-data.js +148 -233
  74. package/dist/seed/history-seed-data.d.ts +0 -7
  75. package/dist/seed/history-seed-data.js +50 -54
  76. package/dist/seed/homepage-sections-seed-data.d.ts +0 -5
  77. package/dist/seed/homepage-sections-seed-data.js +83 -175
  78. package/dist/seed/index.d.ts +1 -1
  79. package/dist/seed/index.js +1 -1
  80. package/dist/seed/manifest.js +2 -2
  81. package/dist/seed/notifications-seed-data.d.ts +0 -6
  82. package/dist/seed/notifications-seed-data.js +309 -196
  83. package/dist/seed/offers-seed-data.d.ts +0 -8
  84. package/dist/seed/offers-seed-data.js +118 -197
  85. package/dist/seed/orders-seed-data.d.ts +2 -8
  86. package/dist/seed/orders-seed-data.js +248 -1510
  87. package/dist/seed/payouts-seed-data.d.ts +0 -6
  88. package/dist/seed/payouts-seed-data.js +102 -441
  89. package/dist/seed/products-auctions-seed-data.d.ts +1 -14
  90. package/dist/seed/products-auctions-seed-data.js +612 -1084
  91. package/dist/seed/products-preorders-seed-data.d.ts +119 -14
  92. package/dist/seed/products-preorders-seed-data.js +154 -455
  93. package/dist/seed/products-standard-seed-data.d.ts +1 -15
  94. package/dist/seed/products-standard-seed-data.js +1355 -4128
  95. package/dist/seed/reviews-seed-data.d.ts +2 -8
  96. package/dist/seed/reviews-seed-data.js +99 -1182
  97. package/dist/seed/scammers-seed-data.d.ts +0 -15
  98. package/dist/seed/scammers-seed-data.js +36 -37
  99. package/dist/seed/sessions-seed-data.d.ts +0 -13
  100. package/dist/seed/sessions-seed-data.js +58 -335
  101. package/dist/seed/site-settings-seed-data.d.ts +0 -4
  102. package/dist/seed/site-settings-seed-data.js +61 -52
  103. package/dist/seed/store-addresses-seed-data.js +27 -151
  104. package/dist/seed/store-extensions-seed-data.d.ts +0 -7
  105. package/dist/seed/store-extensions-seed-data.js +147 -261
  106. package/dist/seed/stores-seed-data.d.ts +0 -5
  107. package/dist/seed/stores-seed-data.js +222 -184
  108. package/dist/seed/sub-listings-seed-data.d.ts +119 -0
  109. package/dist/seed/sub-listings-seed-data.js +447 -0
  110. package/dist/seed/support-tickets-seed-data.d.ts +0 -7
  111. package/dist/seed/support-tickets-seed-data.js +82 -75
  112. package/dist/seed/users-seed-data.d.ts +0 -5
  113. package/dist/seed/users-seed-data.js +279 -634
  114. package/dist/seed/wishlists-seed-data.d.ts +0 -9
  115. package/dist/seed/wishlists-seed-data.js +36 -52
  116. package/dist/seo/json-ld.js +6 -4
  117. package/dist/styles.css +8052 -3
  118. package/dist/utils/index.d.ts +1 -0
  119. package/dist/utils/index.js +1 -0
  120. package/dist/utils/search-tokens.d.ts +2 -0
  121. package/dist/utils/search-tokens.js +21 -0
  122. package/package.json +2 -2
  123. package/scripts/seed-cli.mjs +2 -2
@@ -1,244 +1,357 @@
1
- /**
2
- * Notifications Seed DataLetItRip Collectibles Platform
3
- * 10 notifications covering all types. Mixed read/unread.
4
- * Distributed across buyer and seller users from P15.
5
- * notif- prefix (system IDs).
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
- // ── 1. Welcome — buyer (read) ─────────────────────────────────────────────
20
+ // ── Yugi's notifications (10) — buyer-focused ─────────────────────────────
13
21
  {
14
- id: "notif-welcome-rahul-001",
15
- userId: "user-rahul-sharma",
16
- type: NOTIFICATION_FIELDS.TYPE_VALUES.WELCOME,
17
- priority: NOTIFICATION_FIELDS.PRIORITY_VALUES.NORMAL,
18
- title: "Welcome to LetItRip, Rahul! 🎉",
19
- message: "Explore thousands of Pokémon TCG cards, Hot Wheels, Beyblade X, and anime figures from verified sellers across India. Use code WELCOME10 for 10% off your first order!",
20
- actionUrl: "/products",
21
- actionLabel: "Start Shopping",
22
- isRead: true,
23
- readAt: daysAgo(200),
24
- relatedType: "user",
25
- createdAt: daysAgo(200),
26
- updatedAt: daysAgo(200),
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-order-shipped-arjun-002",
31
- userId: "user-arjun-singh",
37
+ id: "notif-yugi-shipped-001",
38
+ userId: "user-yugi-muto",
32
39
  type: NOTIFICATION_FIELDS.TYPE_VALUES.ORDER_SHIPPED,
33
- priority: NOTIFICATION_FIELDS.PRIORITY_VALUES.HIGH,
34
- title: "Your MG Gundam RX-78-2 has shipped!",
35
- message: "Great news! Your MG 1/100 RX-78-2 Gundam Ver. 3.0 has been dispatched by LetItRip Official. Tracking number: EKART4412238871. Estimated delivery: 2–3 business days.",
36
- actionUrl: "/user/orders/order-arjun-003-gundam-rx78",
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-arjun-003-gundam-rx78",
46
+ relatedId: "order-1-20260515-abc123",
40
47
  relatedType: "order",
41
- createdAt: daysAgo(5),
42
- updatedAt: daysAgo(5),
48
+ createdAt: hoursAgo(6),
49
+ updatedAt: hoursAgo(6),
43
50
  },
44
- // ── 3. Bid Outbid — buyer (unread) ────────────────────────────────────────
45
51
  {
46
- id: "notif-bid-outbid-rahul-003",
47
- userId: "user-rahul-sharma",
48
- type: NOTIFICATION_FIELDS.TYPE_VALUES.BID_OUTBID,
49
- priority: NOTIFICATION_FIELDS.PRIORITY_VALUES.HIGH,
50
- title: "You've been outbid on the Charizard PSA 9!",
51
- message: "Someone placed a higher bid on the Pokémon 1st Edition Charizard #4 PSA 9. Current bid is ₹3,49,999. The auction ends in 8 hours — bid now to stay in the lead.",
52
- actionUrl: "/auctions/auction-pokemon-charizard-base1-psa9",
53
- actionLabel: "Place Bid",
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: "auction-pokemon-charizard-base1-psa9",
77
+ relatedId: "product-pot-of-greed-lob",
56
78
  relatedType: "product",
57
- createdAt: hoursAgo(8),
58
- updatedAt: hoursAgo(8),
79
+ createdAt: daysAgo(1),
80
+ updatedAt: daysAgo(1),
59
81
  },
60
- // ── 4. Bid Won — buyer (read) ─────────────────────────────────────────────
61
82
  {
62
- id: "notif-bid-won-priya-004",
63
- userId: "user-priya-patel",
83
+ id: "notif-yugi-auction-won-001",
84
+ userId: "user-yugi-muto",
64
85
  type: NOTIFICATION_FIELDS.TYPE_VALUES.BID_WON,
65
- priority: NOTIFICATION_FIELDS.PRIORITY_VALUES.HIGH,
66
- title: "Congratulations you won the Charizard auction! 🏆",
67
- message: "You are the winning bidder for Pokémon 1st Edition Charizard #4 PSA 9 at 3,29,999. Complete your payment within 24 hours to secure the card.",
68
- actionUrl: "/user/orders/order-priya-charizard",
86
+ priority: "high",
87
+ title: "Congratulations! You won the auction!",
88
+ message: "You won the Mirror Force MRD 1st Ed auction for15,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(12),
72
- relatedId: "auction-pokemon-charizard-base1-psa9",
73
- relatedType: "bid",
74
- createdAt: daysAgo(12),
75
- updatedAt: daysAgo(12),
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-order-delivered-priya-005",
80
- userId: "user-priya-patel",
81
- type: NOTIFICATION_FIELDS.TYPE_VALUES.ORDER_DELIVERED,
82
- priority: NOTIFICATION_FIELDS.PRIORITY_VALUES.NORMAL,
83
- title: "Your Nendoroid Rem has been delivered!",
84
- message: "Your order for Nendoroid Rem (Re:Zero) has been marked as delivered. Enjoying your new figure? Leave a review to help other collectors — it takes just 2 minutes.",
85
- actionUrl: "/user/orders/order-priya-002-nendoroid-rem",
86
- actionLabel: "Leave a Review",
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(16),
89
- relatedId: "order-priya-002-nendoroid-rem",
90
- relatedType: "order",
91
- createdAt: daysAgo(16),
92
- updatedAt: daysAgo(16),
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-aryan-006",
97
- userId: "user-aryan-kapoor",
115
+ id: "notif-yugi-review-approved-001",
116
+ userId: "user-yugi-muto",
98
117
  type: NOTIFICATION_FIELDS.TYPE_VALUES.REVIEW_APPROVED,
99
- priority: NOTIFICATION_FIELDS.PRIORITY_VALUES.NORMAL,
100
- title: "New 5-star review on your Pokémon 151 Booster Box",
101
- message: "Rahul Sharma left a 5-star review: \"Aryan packed this box like it was going to the moon. Pulled a Mew ex SAR on my first pack!\" Reviews help build trust — keep up the great work!",
102
- actionUrl: "/store/reviews",
103
- actionLabel: "View Review",
104
- isRead: false,
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(54),
108
- updatedAt: daysAgo(54),
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-vikram-007",
113
- userId: "user-vikram-mehta",
143
+ id: "notif-yugi-offer-received-001",
144
+ userId: "user-yugi-muto",
114
145
  type: NOTIFICATION_FIELDS.TYPE_VALUES.OFFER_RECEIVED,
115
- priority: NOTIFICATION_FIELDS.PRIORITY_VALUES.NORMAL,
116
- title: "New offer on your Hot Wheels Redline 1968 Banana Camaro",
117
- message: "Arjun Singh made an offer of ₹10,499 on your Hot Wheels 1968 Redline Banana Camaro (listed at 12,999). You have 24 hours to accept, decline, or counter-offer.",
118
- actionUrl: "/store/offers",
119
- actionLabel: "Respond to Offer",
146
+ priority: "normal",
147
+ title: "Counter-offer on your Dark Magician Girl bid",
148
+ message: "Kaiba Corp countered your offer of ₹7,500 with8,200 for Dark Magician Girl IOC.",
149
+ actionUrl: "/user/offers",
150
+ actionLabel: "View Offer",
120
151
  isRead: false,
121
- relatedId: "product-hot-wheels-redline-banana-1968",
122
- relatedType: "offer",
123
- createdAt: hoursAgo(6),
124
- updatedAt: hoursAgo(6),
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-product-available-meera-008",
129
- userId: "user-meera-nair",
158
+ id: "notif-yugi-new-listing-001",
159
+ userId: "user-yugi-muto",
130
160
  type: NOTIFICATION_FIELDS.TYPE_VALUES.PRODUCT_AVAILABLE,
131
- priority: NOTIFICATION_FIELDS.PRIORITY_VALUES.NORMAL,
132
- title: "Beyblade X BX-12 is now available!",
133
- message: "Good news Beyblade Arena has listed the Beyblade X BX-12 booster set you were watching. Only 5 units available. Grab it before it sells out!",
134
- actionUrl: "/products/product-beyblade-x-bx01-dran-sword",
135
- actionLabel: "View Product",
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-beyblade-x-bx01-dran-sword",
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-refund-initiated-meera-009",
145
- userId: "user-meera-nair",
146
- type: NOTIFICATION_FIELDS.TYPE_VALUES.REFUND_INITIATED,
147
- priority: NOTIFICATION_FIELDS.PRIORITY_VALUES.HIGH,
148
- title: "Your refund of ₹12,999 has been initiated",
149
- message: "Your dispute for the Hot Wheels 1968 Redline Banana Camaro was resolved in your favour. A full refund of 12,999 has been initiated and will appear in your account within 5–7 business days.",
150
- actionUrl: "/user/orders/order-meera-008-hot-wheels-banana",
151
- actionLabel: "View Order",
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(25),
154
- relatedId: "order-meera-008-hot-wheels-banana",
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(25),
157
- updatedAt: daysAgo(25),
158
- },
159
- // ── 10. Promotion — buyer (read) ──────────────────────────────────────────
160
- {
161
- id: "notif-promotion-all-010",
162
- userId: "user-rahul-sharma",
163
- type: NOTIFICATION_FIELDS.TYPE_VALUES.PROMOTION,
164
- priority: NOTIFICATION_FIELDS.PRIORITY_VALUES.LOW,
165
- title: "Hot Wheels Swap Meet — 30% off this weekend 🚗",
166
- message: "Diecast Depot is running a weekend flash sale: up to 30% off Treasure Hunts, Car Culture sets, and Tomica Limited Vintage. Sale ends Sunday midnight. Use code BLADER20 for Beyblades too!",
167
- actionUrl: "/events/event-hot-wheels-swap-meet-may-2026",
168
- actionLabel: "Shop the Sale",
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
- createdAt: daysAgo(2),
314
+ relatedId: "auction-exodia-complete-set-psa9",
315
+ relatedType: "bid",
316
+ createdAt: daysAgo(1),
172
317
  updatedAt: daysAgo(1),
173
318
  },
174
- // ── P29 expansion (S17 2026-05-12) — 30 more notifications via helper ───
175
- ...buildNotificationBatch([
176
- { user: "user-priya-patel", type: "ORDER_PLACED", title: "Order confirmed — 2 items", message: "Your order for 2 items has been placed. We'll notify you when it ships.", read: true, hours: 72 },
177
- { user: "user-priya-patel", type: "ORDER_CONFIRMED", title: "Payment confirmed", message: "Razorpay payment successful for ₹4,499. Your order is being prepared.", read: true, hours: 70 },
178
- { user: "user-priya-patel", type: "ORDER_SHIPPED", title: "Order shipped via Blue Dart", message: "Tracking BD3458912 — estimated delivery in 3 days.", read: false, hours: 24 },
179
- { user: "user-meera-nair", type: "ORDER_DELIVERED", title: "Delivered — Hot Wheels Premium Set", message: "Your Hot Wheels Premium 5-pack has been delivered. Please leave a review.", read: false, hours: 6 },
180
- { user: "user-arjun-singh", type: "ORDER_CANCELLED", title: "Order cancelled — refund initiated", message: "Your order was cancelled. Refund of ₹1,299 will reflect in 5–7 business days.", read: true, hours: 96 },
181
- { user: "user-rohit-joshi", type: "REFUND_INITIATED", title: "Refund processed", message: "₹999 has been refunded to your original payment method.", read: false, hours: 12 },
182
- { user: "user-kavya-iyer", type: "BID_PLACED", title: "Bid placed on Funko Stan Lee Glow Chase", message: "Your bid of ₹7,499 is now the highest. Auction ends in 96 hours.", read: true, hours: 36 },
183
- { user: "user-kartik-nair", type: "BID_OUTBID", title: "You've been outbid on Funko Stan Lee", message: "Someone placed ₹8,999. Bid again — auction ends in 48 hours.", read: false, hours: 8 },
184
- { user: "user-naman-gupta", type: "BID_PLACED", title: "Bid placed on Spriggan Requiem", message: "Your bid of ₹6,999 is now the highest.", read: false, hours: 4 },
185
- { user: "user-tanvi-desai", type: "BID_OUTBID", title: "Outbid on Spriggan Requiem", message: "₹8,999 is the current high bid. Auction ends in 5 days.", read: false, hours: 2 },
186
- { user: "user-priya-singh", type: "BID_WON", title: "You won the Shadowless Blastoise BGS 8.5! 🏆", message: "Congratulations — final bid ₹39,999. Please pay within 48 hours.", read: true, hours: 336 },
187
- { user: "user-amit-sharma", type: "BID_LOST", title: "Auction ended — outbid on Blastoise", message: "Shadowless Blastoise sold for ₹39,999. Better luck next time!", read: true, hours: 336 },
188
- { user: "user-rohit-verma", type: "BID_WON", title: "You won the Goku Ultra Instinct! 🏆", message: "Final bid ₹14,999. Payment due within 48 hours.", read: false, hours: 72 },
189
- { user: "user-divya-menon", type: "PRODUCT_AVAILABLE", title: "Pokémon Stellar Crown ETB back in stock!", message: "The Pokémon Stellar Crown Elite Trainer Box is available for pre-order again.", read: false, hours: 18 },
190
- { user: "user-ankit-gupta", type: "PRODUCT_AVAILABLE", title: "Beyblade X BX-20 Phoenix Wing pre-orders open", message: "Pre-orders for Phoenix Wing BX-20 are now open. Ships in 60 days.", read: true, hours: 48 },
191
- { user: "user-rahul-sharma", type: "REVIEW_APPROVED", title: "Your review was approved", message: "Your 5-star review on the PSA 9 Charizard has been published.", read: true, hours: 24 },
192
- { user: "user-priya-patel", type: "REVIEW_REPLIED", title: "Seller replied to your review", message: "CardGame Hub responded to your review. Tap to read.", read: false, hours: 6 },
193
- { user: "user-sneha-kumar", type: "REVIEW_APPROVED", title: "Review published", message: "Your review of the Hot Wheels Treasure Hunt set is now live.", read: false, hours: 3 },
194
- { user: "user-kiran-reddy", type: "OFFER_RECEIVED", title: "Offer of ₹3,999 received on your Mafex Spider-Man", message: "Naman G has offered ₹3,999. Tap to accept, decline, or counter.", read: false, hours: 5 },
195
- { user: "user-preeti-joshi", type: "OFFER_RESPONDED", title: "Your offer was accepted!", message: "Tokyo Toys India accepted your ₹2,499 offer. Pay now to confirm.", read: false, hours: 7 },
196
- { user: "user-varun-bhat", type: "OFFER_EXPIRED", title: "Offer expired — no response from seller", message: "Your offer of ₹4,499 on the PG Unicorn pre-order has expired.", read: true, hours: 72 },
197
- { user: "user-naman-gupta", type: "OFFER_COUNTER_ACCEPTED", title: "Seller's counter accepted", message: "You accepted the counter-offer of ₹3,200 on the S.H.Figuarts Broly. Order placed.", read: true, hours: 12 },
198
- { user: "user-aryan-kapoor", type: "PROMOTION", title: "20% off all auctions this weekend", message: "Use code AUCTION25 for 25% off shipping on any auction this weekend.", read: false, hours: 14 },
199
- { user: "user-nisha-reddy", type: "PROMOTION", title: "BIGBANG2026 — ₹1,000 off orders ₹10k+", message: "Limited offer. Once per user. Valid 90 days.", read: false, hours: 20 },
200
- { user: "user-vikram-mehta", type: "SYSTEM", title: "Profile verification complete", message: "Your seller profile has been verified. You can now list auctions and pre-orders.", read: true, hours: 168 },
201
- { user: "user-rohit-joshi", type: "SYSTEM", title: "Payout settings updated", message: "Next payout will reflect the new UPI VPA.", read: true, hours: 72 },
202
- { user: "user-priya-singh", type: "WELCOME", title: "Welcome to LetItRip, Priya!", message: "Browse premium anime figures from Tokyo Toys India and 7 other verified sellers.", read: true, hours: 720 },
203
- { user: "user-amit-sharma", type: "WELCOME", title: "Welcome to LetItRip Seller Tools", message: "Your store Gundam Galaxy is now live. List your first product to get started.", read: true, hours: 1440 },
204
- { user: "user-anjali-verma", type: "WELCOME", title: "Welcome, Anjali!", message: "Use NEWUSER5 for ₹50 off your first order.", read: false, hours: 4 },
205
- { user: "user-pooja-sharma", type: "PROMOTION", title: "Wishlist sale items in your wishlist are 15% off", message: "3 items in your wishlist are now on sale. Tap to view.", read: false, hours: 9 },
206
- ]),
207
- // ── Admin role — system + operational notifications ─────────────────────
208
- ...buildNotificationBatch([
209
- { user: "user-admin-letitrip", type: "SYSTEM", title: "New seller registration: Gunpla Hub India", message: "Arjun Mehta has applied to open store Gunpla Hub India. Review their profile and approve or reject via the admin panel.", read: false, hours: 2 },
210
- { user: "user-admin-letitrip", type: "SYSTEM", title: "Flagged listing: possible counterfeit Funko Pop", message: "Listing product-funko-pop-gojo-satoru was reported by 3 users for suspected counterfeit. Please review before the next buy cycle.", read: false, hours: 6 },
211
- { user: "user-admin-letitrip", type: "SYSTEM", title: "Payout batch #12 processed — 6 stores, Rs 1.24L", message: "Payout batch for May Week 2 completed. 6 stores paid, 1 failed (IFSC mismatch — store-vintage-vault). Manual retry required.", read: true, hours: 24 },
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>[];