@mohasinac/appkit 4.2.0 → 4.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/dist/_internal/client/features/layout/navActive.d.ts +17 -0
  2. package/dist/_internal/client/features/layout/navActive.js +33 -0
  3. package/dist/_internal/server/features/auth/actions.d.ts +0 -1
  4. package/dist/_internal/server/features/auth/actions.js +0 -1
  5. package/dist/_internal/server/features/bundles/data.d.ts +22 -4
  6. package/dist/_internal/server/features/bundles/data.js +41 -4
  7. package/dist/_internal/server/features/bundles/index.d.ts +1 -1
  8. package/dist/_internal/server/features/bundles/index.js +1 -1
  9. package/dist/_internal/server/features/checkout/actions.js +7 -78
  10. package/dist/_internal/server/features/checkout/prize-bundle-gates.d.ts +5 -16
  11. package/dist/_internal/server/features/checkout/prize-bundle-gates.js +5 -30
  12. package/dist/_internal/server/features/orders/adapters.js +1 -14
  13. package/dist/_internal/server/features/products/actions.js +8 -3
  14. package/dist/_internal/server/features/products/service.d.ts +15 -0
  15. package/dist/_internal/server/features/products/service.js +41 -0
  16. package/dist/_internal/server/functions/firestore.d.ts +3 -1
  17. package/dist/_internal/server/functions/firestore.js +17 -1
  18. package/dist/_internal/server/functions/scheduled.d.ts +2 -5
  19. package/dist/_internal/server/functions/scheduled.js +6 -30
  20. package/dist/_internal/server/jobs/core/bundleStockSync.js +25 -7
  21. package/dist/_internal/server/jobs/core/countersReconcile.js +7 -1
  22. package/dist/_internal/server/jobs/core/index.d.ts +4 -4
  23. package/dist/_internal/server/jobs/core/index.js +4 -4
  24. package/dist/_internal/server/jobs/core/onPrizeDrawPaymentConfirmed.d.ts +19 -0
  25. package/dist/_internal/server/jobs/core/onPrizeDrawPaymentConfirmed.js +30 -0
  26. package/dist/_internal/server/jobs/core/paymentWindowTimeout.d.ts +2 -2
  27. package/dist/_internal/server/jobs/core/paymentWindowTimeout.js +2 -2
  28. package/dist/_internal/server/jobs/core/prizeDrawAssignWinner.d.ts +20 -0
  29. package/dist/_internal/server/jobs/core/prizeDrawAssignWinner.js +113 -0
  30. package/dist/_internal/server/jobs/core/prizeDrawExpiryReveal.d.ts +14 -0
  31. package/dist/_internal/server/jobs/core/prizeDrawExpiryReveal.js +74 -0
  32. package/dist/_internal/server/jobs/core/prizeDrawSoldOutReveal.d.ts +22 -0
  33. package/dist/_internal/server/jobs/core/prizeDrawSoldOutReveal.js +68 -0
  34. package/dist/_internal/server/jobs/handlers/index.d.ts +3 -4
  35. package/dist/_internal/server/jobs/handlers/index.js +8 -6
  36. package/dist/_internal/server/jobs/handlers/onPrizeDrawPaymentConfirmed.d.ts +3 -0
  37. package/dist/_internal/server/jobs/handlers/onPrizeDrawPaymentConfirmed.js +11 -0
  38. package/dist/_internal/server/jobs/handlers/prizeDrawExpiryReveal.d.ts +2 -0
  39. package/dist/_internal/server/jobs/handlers/prizeDrawExpiryReveal.js +2 -0
  40. package/dist/_internal/server/jobs/handlers/prizeDrawSoldOutReveal.d.ts +3 -0
  41. package/dist/_internal/server/jobs/handlers/prizeDrawSoldOutReveal.js +4 -0
  42. package/dist/_internal/shared/actions/action-registry.js +40 -10
  43. package/dist/_internal/shared/checkout/rules/_defaults.js +1 -2
  44. package/dist/_internal/shared/checkout/rules/_limits.d.ts +3 -0
  45. package/dist/_internal/shared/checkout/rules/_limits.js +3 -0
  46. package/dist/_internal/shared/checkout/rules/_registry.d.ts +2 -1
  47. package/dist/_internal/shared/checkout/rules/_registry.js +2 -2
  48. package/dist/_internal/shared/checkout/rules/classified.rule.js +0 -1
  49. package/dist/_internal/shared/checkout/rules/index.d.ts +1 -1
  50. package/dist/_internal/shared/checkout/rules/index.js +1 -1
  51. package/dist/_internal/shared/checkout/rules/prize-draw.rule.js +20 -1
  52. package/dist/_internal/shared/checkout/rules/types.d.ts +17 -7
  53. package/dist/_internal/shared/features/categories/bundle-copy.d.ts +2 -0
  54. package/dist/_internal/shared/features/categories/bundle-copy.js +2 -0
  55. package/dist/_internal/shared/features/categories/bundle-pricing.d.ts +23 -0
  56. package/dist/_internal/shared/features/categories/bundle-pricing.js +25 -0
  57. package/dist/_internal/shared/listing-types/prize-draw/config.js +1 -1
  58. package/dist/constants/api-endpoints.d.ts +6 -9
  59. package/dist/constants/api-endpoints.js +5 -5
  60. package/dist/constants/field-names.d.ts +17 -1
  61. package/dist/constants/field-names.js +17 -1
  62. package/dist/features/account/components/UserSidebar.js +21 -9
  63. package/dist/features/account/hooks/useNotifications.js +5 -0
  64. package/dist/features/admin/actions/admin-actions.js +6 -0
  65. package/dist/features/admin/actions/notification-actions.js +1 -2
  66. package/dist/features/admin/components/AdminBlogEditorView.js +1 -1
  67. package/dist/features/admin/components/AdminGuideHubView.js +15 -1
  68. package/dist/features/admin/components/AdminPaymentsGuideView.d.ts +2 -0
  69. package/dist/features/admin/components/AdminPaymentsGuideView.js +36 -0
  70. package/dist/features/admin/components/AdminPrizeDrawsView.js +3 -3
  71. package/dist/features/admin/components/AdminSidebar.js +18 -9
  72. package/dist/features/admin/components/AdminSiteSettingsView.js +33 -6
  73. package/dist/features/admin/components/AdminTesterChecklistView.js +74 -22
  74. package/dist/features/admin/components/AdminWhatsAppGuideView.d.ts +2 -0
  75. package/dist/features/admin/components/AdminWhatsAppGuideView.js +35 -0
  76. package/dist/features/admin/hooks/useAdminListing.d.ts +4 -0
  77. package/dist/features/admin/hooks/useAdminListing.js +4 -2
  78. package/dist/features/admin/schemas/firestore.d.ts +13 -5
  79. package/dist/features/admin/schemas/firestore.js +1 -2
  80. package/dist/features/auctions/actions/bid-actions.js +3 -1
  81. package/dist/features/auctions/components/AuctionBidsTable.d.ts +6 -1
  82. package/dist/features/auctions/components/AuctionBidsTable.js +8 -4
  83. package/dist/features/auctions/components/AuctionDetailPageView.js +10 -13
  84. package/dist/features/auctions/components/CollapsibleBidHistory.d.ts +23 -2
  85. package/dist/features/auctions/components/CollapsibleBidHistory.js +22 -3
  86. package/dist/features/auctions/components/LiveBidPrice.d.ts +19 -0
  87. package/dist/features/auctions/components/LiveBidPrice.js +17 -0
  88. package/dist/features/auctions/components/PlaceBidFormClient.d.ts +1 -1
  89. package/dist/features/auctions/components/PlaceBidFormClient.js +16 -1
  90. package/dist/features/auctions/hooks/useBids.d.ts +33 -0
  91. package/dist/features/auctions/hooks/useBids.js +32 -0
  92. package/dist/features/auctions/hooks/useLiveAuctionBid.d.ts +20 -0
  93. package/dist/features/auctions/hooks/useLiveAuctionBid.js +23 -0
  94. package/dist/features/auth/checkout-value-otp.d.ts +7 -10
  95. package/dist/features/auth/checkout-value-otp.js +14 -10
  96. package/dist/features/auth/server.d.ts +0 -1
  97. package/dist/features/auth/server.js +0 -1
  98. package/dist/features/blog/api/[slug]/route.d.ts +5 -0
  99. package/dist/features/blog/api/[slug]/route.js +12 -3
  100. package/dist/features/blog/components/BlogPostView.d.ts +2 -0
  101. package/dist/features/blog/components/BlogPostView.js +5 -4
  102. package/dist/features/blog/hooks/useBlog.d.ts +2 -0
  103. package/dist/features/blog/hooks/useBlog.js +2 -0
  104. package/dist/features/blog/repository/blog.repository.d.ts +7 -0
  105. package/dist/features/blog/repository/blog.repository.js +44 -0
  106. package/dist/features/blog/schemas/firestore.d.ts +3 -0
  107. package/dist/features/blog/schemas/firestore.js +1 -0
  108. package/dist/features/blog/types/index.d.ts +2 -0
  109. package/dist/features/cart/components/index.d.ts +0 -2
  110. package/dist/features/cart/components/index.js +0 -1
  111. package/dist/features/cart/hooks/useCartCount.js +22 -5
  112. package/dist/features/cart/hooks/useGuestCart.js +11 -1
  113. package/dist/features/cart/utils/guest-cart.d.ts +4 -0
  114. package/dist/features/cart/utils/guest-cart.js +10 -0
  115. package/dist/features/cart/utils/pending-ops.d.ts +17 -0
  116. package/dist/features/cart/utils/pending-ops.js +46 -5
  117. package/dist/features/categories/components/BrandDetailPageView.js +6 -2
  118. package/dist/features/categories/components/BundleDetailView.js +4 -2
  119. package/dist/features/categories/components/CategoryDetailPageView.js +10 -2
  120. package/dist/features/categories/schemas/firestore.d.ts +7 -0
  121. package/dist/features/checkout/actions/index.d.ts +0 -1
  122. package/dist/features/checkout/actions/index.js +0 -1
  123. package/dist/features/checkout/schemas/firestore.d.ts +2 -2
  124. package/dist/features/events/actions/event-actions.d.ts +2 -0
  125. package/dist/features/events/actions/event-actions.js +5 -0
  126. package/dist/features/events/components/EventCard.js +2 -3
  127. package/dist/features/events/components/RelatedEventsCarousel.d.ts +15 -0
  128. package/dist/features/events/components/RelatedEventsCarousel.js +13 -0
  129. package/dist/features/events/components/index.d.ts +2 -0
  130. package/dist/features/events/components/index.js +1 -0
  131. package/dist/features/events/repository/events.repository.d.ts +6 -0
  132. package/dist/features/events/repository/events.repository.js +21 -0
  133. package/dist/features/history/repository/user-history.repository.d.ts +1 -1
  134. package/dist/features/history/utils/guest-history.d.ts +1 -1
  135. package/dist/features/homepage/components/FeaturedBundlesSection.js +4 -2
  136. package/dist/features/homepage/components/FeaturedProductsSection.js +2 -2
  137. package/dist/features/homepage/components/SectionCarousel.js +1 -1
  138. package/dist/features/homepage/components/WelcomeSection.js +1 -1
  139. package/dist/features/layout/AppLayoutShell.js +44 -10
  140. package/dist/features/layout/NavbarLayout.js +1 -1
  141. package/dist/features/layout/TitleBarLayout.js +2 -2
  142. package/dist/features/media/MediaVideo.d.ts +7 -0
  143. package/dist/features/media/MediaVideo.js +36 -5
  144. package/dist/features/orders/components/OrdersList.js +1 -5
  145. package/dist/features/orders/schemas/firestore.d.ts +2 -8
  146. package/dist/features/orders/schemas/index.d.ts +3 -32
  147. package/dist/features/orders/schemas/index.js +1 -4
  148. package/dist/features/orders/types/index.d.ts +6 -9
  149. package/dist/features/pre-orders/components/MarketplacePreorderCard.js +1 -1
  150. package/dist/features/pre-orders/components/PreOrderDetailPageView.js +2 -1
  151. package/dist/features/products/actions/product-actions.js +13 -10
  152. package/dist/features/products/components/MarketplaceBundleCard.d.ts +1 -1
  153. package/dist/features/products/components/MarketplaceBundleCard.js +7 -4
  154. package/dist/features/products/components/PrizeDrawDetailPageView.js +1 -1
  155. package/dist/features/products/components/PrizeDrawItemsEditor.js +2 -2
  156. package/dist/features/products/components/PrizeDrawWinnerMappingView.d.ts +14 -0
  157. package/dist/features/products/components/PrizeDrawWinnerMappingView.js +37 -0
  158. package/dist/features/products/components/PrizeRevealModal.d.ts +10 -23
  159. package/dist/features/products/components/PrizeRevealModal.js +18 -147
  160. package/dist/features/products/components/ProductDetailPageView.js +72 -30
  161. package/dist/features/products/components/ProductForm.js +7 -14
  162. package/dist/features/products/components/ProductGalleryClient.d.ts +10 -1
  163. package/dist/features/products/components/ProductGalleryClient.js +29 -10
  164. package/dist/features/products/components/ProductsIndexListing.js +2 -1
  165. package/dist/features/products/components/RelatedProductsCarousel.js +2 -2
  166. package/dist/features/products/components/ShowGroupSection.js +2 -2
  167. package/dist/features/products/components/SublistingCarouselSection.js +1 -1
  168. package/dist/features/products/components/index.d.ts +4 -2
  169. package/dist/features/products/components/index.js +1 -0
  170. package/dist/features/products/constants/action-defs.d.ts +1 -3
  171. package/dist/features/products/constants/action-defs.js +0 -5
  172. package/dist/features/products/repository/products.repository.d.ts +6 -0
  173. package/dist/features/products/repository/products.repository.js +20 -1
  174. package/dist/features/products/schemas/firestore.d.ts +28 -3
  175. package/dist/features/products/schemas/index.d.ts +11 -3
  176. package/dist/features/products/schemas/index.js +10 -2
  177. package/dist/features/products/types/index.d.ts +2 -1
  178. package/dist/features/reviews/actions/review-actions.js +1 -0
  179. package/dist/features/reviews/components/ReviewDetailPageView.js +8 -1
  180. package/dist/features/reviews/components/ReviewDetailShell.js +2 -1
  181. package/dist/features/reviews/components/ReviewsList.js +2 -1
  182. package/dist/features/reviews/schemas/firestore.d.ts +3 -0
  183. package/dist/features/reviews/schemas/index.d.ts +6 -0
  184. package/dist/features/reviews/schemas/index.js +2 -0
  185. package/dist/features/reviews/types/index.d.ts +3 -0
  186. package/dist/features/scams/actions/scam-actions.d.ts +3 -0
  187. package/dist/features/scams/actions/scam-actions.js +3 -2
  188. package/dist/features/scams/components/ScamProfileView.d.ts +2 -1
  189. package/dist/features/scams/components/ScamProfileView.js +2 -2
  190. package/dist/features/scams/repository/scammer.repository.d.ts +6 -0
  191. package/dist/features/scams/repository/scammer.repository.js +24 -0
  192. package/dist/features/seller/actions/seller-actions.js +8 -0
  193. package/dist/features/seller/components/SellerPrizeDrawsView.js +4 -0
  194. package/dist/features/seller/components/SellerSidebar.js +20 -9
  195. package/dist/features/stores/components/StoreDetailLayoutView.js +6 -6
  196. package/dist/features/stores/components/StoreGuideHubView.js +7 -1
  197. package/dist/features/stores/components/StoreNavTabs.d.ts +10 -1
  198. package/dist/features/stores/components/StoreNavTabs.js +22 -9
  199. package/dist/features/stores/components/StoreWhatsAppGuideView.d.ts +3 -0
  200. package/dist/features/stores/components/StoreWhatsAppGuideView.js +12 -0
  201. package/dist/features/stores/components/index.d.ts +2 -0
  202. package/dist/features/stores/components/index.js +1 -0
  203. package/dist/features/tester/actions/index.d.ts +1 -0
  204. package/dist/features/tester/actions/index.js +1 -0
  205. package/dist/features/tester/actions/leaderboard-actions.d.ts +3 -0
  206. package/dist/features/tester/actions/leaderboard-actions.js +5 -0
  207. package/dist/features/tester/components/AdminTesterFeedbackIssuesView.js +26 -4
  208. package/dist/features/tester/components/AdminTesterFeedbackListView.js +13 -0
  209. package/dist/features/tester/components/BugHunterLeaderboardView.d.ts +23 -0
  210. package/dist/features/tester/components/BugHunterLeaderboardView.js +18 -0
  211. package/dist/features/tester/components/index.d.ts +2 -0
  212. package/dist/features/tester/components/index.js +1 -0
  213. package/dist/features/tester/repository/tester-checklist-item.repository.d.ts +12 -1
  214. package/dist/features/tester/repository/tester-checklist-item.repository.js +80 -0
  215. package/dist/features/tester/repository/tester-checklist-response.repository.d.ts +4 -0
  216. package/dist/features/tester/repository/tester-checklist-response.repository.js +4 -0
  217. package/dist/features/tester/schemas/firestore.d.ts +22 -1
  218. package/dist/features/tester/schemas/firestore.js +8 -0
  219. package/dist/features/tester/seed-data/categories-tester-seed-data.js +42 -7
  220. package/dist/features/tester/seed-data/events-tester-seed-data.js +23 -0
  221. package/dist/features/tester/seed-data/orders-tester-seed-data.js +69 -31
  222. package/dist/features/tester/seed-data/products-tester-seed-data.js +154 -9
  223. package/dist/features/tester/seed-data/tester-checklist-seed-data.js +252 -15
  224. package/dist/features/wishlist/hooks/useGuestWishlist.js +11 -1
  225. package/dist/features/wishlist/hooks/useWishlistCount.js +16 -2
  226. package/dist/features/wishlist/utils/guest-wishlist.d.ts +5 -0
  227. package/dist/features/wishlist/utils/guest-wishlist.js +11 -0
  228. package/dist/index.d.ts +23 -22
  229. package/dist/index.js +31 -58
  230. package/dist/jobs.d.ts +1 -1
  231. package/dist/jobs.js +2 -2
  232. package/dist/next/routing/route-map.d.ts +9 -2
  233. package/dist/next/routing/route-map.js +4 -1
  234. package/dist/schemas/registry.d.ts +6 -26
  235. package/dist/seed/bids-seed-data.js +14 -2
  236. package/dist/seed/blog-posts-seed-data.js +2 -1
  237. package/dist/seed/categories-seed-data.js +11 -2
  238. package/dist/seed/events-seed-data.js +11 -11
  239. package/dist/seed/faq-seed-data.js +5 -1
  240. package/dist/seed/products-auctions-seed-data.js +2 -2
  241. package/dist/seed/products-preorders-seed-data.d.ts +2 -1
  242. package/dist/seed/products-prize-draws-seed-data.js +56 -10
  243. package/dist/seed/products-standard-seed-data.js +80 -3
  244. package/dist/seed/scammers-seed-data.js +75 -2
  245. package/dist/seed/site-settings-seed-data.js +5 -2
  246. package/dist/server-entry.d.ts +0 -1
  247. package/dist/server-entry.js +0 -1
  248. package/dist/server.d.ts +4 -20
  249. package/dist/server.js +10 -57
  250. package/dist/styles.css +1 -277
  251. package/dist/tailwind-utilities.css +1 -1
  252. package/dist/ui/components/BaseListingCard.js +1 -1
  253. package/dist/ui/components/ImageLightbox.d.ts +9 -0
  254. package/dist/ui/components/ImageLightbox.js +6 -3
  255. package/dist/ui/components/ListingToolbar.d.ts +18 -1
  256. package/dist/ui/components/ListingToolbar.js +5 -2
  257. package/dist/ui/components/StickyToolbar.js +13 -8
  258. package/package.json +1 -1
@@ -1,9 +1,13 @@
1
1
  /*
2
- * WHY: Shared tester sandbox — a handful of disposable test products spanning standard,
3
- * auction, and pre-order listing types, all owned by store-tester-sandbox, so testers
4
- * can exercise buying/bidding/pre-ordering against real code paths. Auto-expires after
5
- * 7 days (testerSandboxCleanup cascades into any bids on the auction).
6
- * WHAT: Exports productsTesterSeedData 2 standard + 1 auction + 1 pre-order product.
2
+ * WHY: Shared tester sandbox — a handful of disposable test products spanning every listing
3
+ * type (standard, auction, pre-order, prize-draw, classified, digital-code, live, art,
4
+ * stickers), all owned by store-tester-sandbox, so testers can exercise buying/bidding/
5
+ * pre-ordering against real code paths including navigating every entry of the store
6
+ * detail page's listing-type dropdown (see StoreNavTabs). Auto-expires after 7 days
7
+ * (testerSandboxCleanup cascades into any bids on the auction).
8
+ * WHAT: Exports productsTesterSeedData — 2 standard + 2 auction + 1 pre-order + 1 prize-draw +
9
+ * 1 classified + 1 digital-code + 1 live + 1 art + 1 stickers product + 1 product-group
10
+ * ("Set") parent (product-tester-standard-1/2 are its children, linked via groupId).
7
11
  *
8
12
  * EXPORTS:
9
13
  * productsTesterSeedData — Array of Partial<ProductDocument> for the seed runner
@@ -21,6 +25,7 @@ import { seedExtMedia } from "../../../seed/_helpers/media";
21
25
  import { testDataExpiresAt } from "./tester-ttl";
22
26
  const TESTER_STORE_ID = "store-tester-sandbox";
23
27
  const TESTER_STORE_NAME = "Tester Sandbox Store";
28
+ const TESTER_GROUP_TITLE = "Tester Sandbox Bundle";
24
29
  const GADGETS_CATEGORY_SLUGS = ["category-tester-gadgets", "category-tester-sandbox"];
25
30
  const GADGETS_CATEGORY_NAMES = ["Test Gadgets", "Tester Sandbox"];
26
31
  const COLLECTIBLES_CATEGORY_SLUGS = ["category-tester-collectibles", "category-tester-sandbox"];
@@ -61,6 +66,13 @@ export const productsTesterSeedData = [
61
66
  customSections: [],
62
67
  isPromoted: false,
63
68
  isOnSale: false,
69
+ // Child of the "group-tester-sandbox-bundle" product-group ("Set") parent
70
+ // below — findByGroupId() queries products by this field directly, so
71
+ // without it the parent's groupChildSlugs[] mirror is never actually
72
+ // resolvable and ShowGroupSection renders nothing (members.length <= 1).
73
+ groupId: "group-tester-sandbox-bundle",
74
+ groupParentSlug: "group-tester-sandbox-bundle",
75
+ groupTitle: TESTER_GROUP_TITLE,
64
76
  createdAt: new Date(),
65
77
  updatedAt: new Date(),
66
78
  }),
@@ -87,6 +99,35 @@ export const productsTesterSeedData = [
87
99
  customSections: [],
88
100
  isPromoted: false,
89
101
  isOnSale: false,
102
+ groupId: "group-tester-sandbox-bundle",
103
+ groupParentSlug: "group-tester-sandbox-bundle",
104
+ groupTitle: TESTER_GROUP_TITLE,
105
+ createdAt: new Date(),
106
+ updatedAt: new Date(),
107
+ }),
108
+ withTokens({
109
+ id: "product-tester-standard-sold",
110
+ slug: "product-tester-standard-sold",
111
+ title: "Test Collectible — Sold Out (Hidden by Default)",
112
+ description: "Disposable test product deliberately seeded as sold out — exists to verify the public/admin/seller \"Show sold\" toggle actually hides it by default and reveals it when toggled on. Auto-expires in 7 days.",
113
+ categorySlugs: COLLECTIBLES_CATEGORY_SLUGS,
114
+ categoryNames: COLLECTIBLES_CATEGORY_NAMES,
115
+ brandSlug: "brand-tester-sandbox",
116
+ brand: "TestBrand",
117
+ price: 179,
118
+ currency: "INR",
119
+ stockQuantity: 0,
120
+ availableQuantity: 0,
121
+ isSold: true,
122
+ mainImage: seedExtMedia("https://picsum.photos/seed/product-image-tester-standard-sold-20260101/900/900"),
123
+ images: [seedExtMedia("https://picsum.photos/seed/product-image-tester-standard-sold-20260101/900/900")],
124
+ status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
125
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
126
+ listingType: "standard",
127
+ customFields: [],
128
+ customSections: [],
129
+ isPromoted: false,
130
+ isOnSale: false,
90
131
  createdAt: new Date(),
91
132
  updatedAt: new Date(),
92
133
  }),
@@ -170,6 +211,13 @@ export const productsTesterSeedData = [
170
211
  images: [seedExtMedia("https://picsum.photos/seed/preorder-image-tester-sandbox-1-20260101/900/900")],
171
212
  mainImage: seedExtMedia("https://picsum.photos/seed/preorder-image-tester-sandbox-1-20260101/900/900"),
172
213
  isSold: false,
214
+ // stockQuantity must be set (not just availableQuantity) — the public
215
+ // listing route's default "hide sold" filter is a Firestore inequality
216
+ // on stockQuantity, and Firestore excludes documents missing that field
217
+ // entirely from an inequality query, not just ones where it's 0. Without
218
+ // this the pre-order would be permanently invisible on the default
219
+ // /pre-orders listing (2026-08-19 index-sweep session).
220
+ stockQuantity: 5,
173
221
  availableQuantity: 5,
174
222
  customFields: [],
175
223
  customSections: [],
@@ -208,13 +256,14 @@ export const productsTesterSeedData = [
208
256
  isPromoted: false,
209
257
  isOnSale: false,
210
258
  prizeDrawMode: "reveal",
259
+ prizeRevealMode: "instant",
211
260
  pricePerEntry: 50,
212
261
  prizeMaxEntries: 3,
213
262
  prizeCurrentEntries: 0,
263
+ prizeDrawDurationDays: 7,
214
264
  prizeRevealWindowStart: new Date(),
215
265
  prizeRevealWindowEnd: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000),
216
266
  prizeRevealStatus: "open",
217
- prizeRevealDeadlineDays: 7,
218
267
  prizeDrawItems: [
219
268
  { itemNumber: 1, title: "Test Prize — Grand", description: "Disposable test grand prize.", images: [seedExtMedia("https://picsum.photos/seed/prizedraw-item-1-20260101/600/600")], condition: "new", estimatedValue: 500, isWon: false },
220
269
  { itemNumber: 2, title: "Test Prize — Runner-up", description: "Disposable test runner-up prize.", images: [seedExtMedia("https://picsum.photos/seed/prizedraw-item-2-20260101/600/600")], condition: "new", estimatedValue: 150, isWon: false },
@@ -223,6 +272,46 @@ export const productsTesterSeedData = [
223
272
  createdAt: new Date(),
224
273
  updatedAt: new Date(),
225
274
  }),
275
+ withTokens({
276
+ id: "prizedraw-tester-sandbox-closed",
277
+ slug: "prizedraw-tester-sandbox-closed",
278
+ title: "Test Prize Draw — Already Closed",
279
+ description: "Disposable test prize-draw, window already closed — exists to verify the admin/seller \"Show closed\" toggle actually hides it by default and reveals it when toggled on. Auto-expires in 7 days.",
280
+ categorySlugs: COLLECTIBLES_CATEGORY_SLUGS,
281
+ categoryNames: COLLECTIBLES_CATEGORY_NAMES,
282
+ brandSlug: "brand-tester-sandbox",
283
+ brand: "TestBrand",
284
+ price: 50,
285
+ currency: "INR",
286
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
287
+ status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
288
+ listingType: "prize-draw",
289
+ images: [seedExtMedia("https://picsum.photos/seed/prizedraw-image-tester-sandbox-closed-20260101/900/900")],
290
+ mainImage: seedExtMedia("https://picsum.photos/seed/prizedraw-image-tester-sandbox-closed-20260101/900/900"),
291
+ isSold: true,
292
+ stockQuantity: 0,
293
+ availableQuantity: 0,
294
+ customFields: [],
295
+ customSections: [],
296
+ isPromoted: false,
297
+ isOnSale: false,
298
+ prizeDrawMode: "reveal",
299
+ prizeRevealMode: "scheduled",
300
+ pricePerEntry: 50,
301
+ prizeMaxEntries: 3,
302
+ prizeCurrentEntries: 3,
303
+ prizeDrawDurationDays: 13,
304
+ prizeRevealWindowStart: new Date(Date.now() - 14 * 24 * 60 * 60 * 1000),
305
+ prizeRevealWindowEnd: new Date(Date.now() - 1 * 24 * 60 * 60 * 1000),
306
+ prizeRevealStatus: "closed",
307
+ prizeDrawItems: [
308
+ { itemNumber: 1, title: "Test Prize — Grand", description: "Disposable test grand prize.", images: [seedExtMedia("https://picsum.photos/seed/prizedraw-item-closed-1-20260101/600/600")], condition: "new", estimatedValue: 500, isWon: true },
309
+ { itemNumber: 2, title: "Test Prize — Runner-up", description: "Disposable test runner-up prize.", images: [seedExtMedia("https://picsum.photos/seed/prizedraw-item-closed-2-20260101/600/600")], condition: "new", estimatedValue: 150, isWon: true },
310
+ { itemNumber: 3, title: "Test Prize — Consolation", description: "Disposable test consolation prize.", images: [seedExtMedia("https://picsum.photos/seed/prizedraw-item-closed-3-20260101/600/600")], condition: "new", estimatedValue: 20, isWon: true },
311
+ ],
312
+ createdAt: new Date(),
313
+ updatedAt: new Date(),
314
+ }),
226
315
  withTokens({
227
316
  id: "classified-tester-sandbox-1",
228
317
  slug: "classified-tester-sandbox-1",
@@ -323,11 +412,67 @@ export const productsTesterSeedData = [
323
412
  createdAt: new Date(),
324
413
  updatedAt: new Date(),
325
414
  }),
415
+ withTokens({
416
+ id: "art-tester-sandbox-1",
417
+ slug: "art-tester-sandbox-1",
418
+ title: "Test Art Print — Frame Me!",
419
+ description: "Disposable test art listing for the tester QA program. Auto-expires in 7 days.",
420
+ categorySlugs: COLLECTIBLES_CATEGORY_SLUGS,
421
+ categoryNames: COLLECTIBLES_CATEGORY_NAMES,
422
+ brandSlug: "brand-tester-sandbox",
423
+ brand: "TestBrand",
424
+ price: 349,
425
+ currency: "INR",
426
+ stockQuantity: 5,
427
+ availableQuantity: 5,
428
+ isSold: false,
429
+ mainImage: seedExtMedia("https://picsum.photos/seed/art-image-tester-sandbox-1-20260101/900/900"),
430
+ images: [seedExtMedia("https://picsum.photos/seed/art-image-tester-sandbox-1-20260101/900/900")],
431
+ status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
432
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
433
+ listingType: "art",
434
+ customFields: [],
435
+ customSections: [],
436
+ isPromoted: false,
437
+ isOnSale: false,
438
+ createdAt: new Date(),
439
+ updatedAt: new Date(),
440
+ }),
441
+ withTokens({
442
+ id: "stickers-tester-sandbox-1",
443
+ slug: "stickers-tester-sandbox-1",
444
+ title: "Test Sticker Pack — Peel Me!",
445
+ description: "Disposable test stickers listing for the tester QA program. Auto-expires in 7 days.",
446
+ categorySlugs: GADGETS_CATEGORY_SLUGS,
447
+ categoryNames: GADGETS_CATEGORY_NAMES,
448
+ brandSlug: "brand-tester-sandbox",
449
+ brand: "TestBrand",
450
+ price: 79,
451
+ currency: "INR",
452
+ stockQuantity: 25,
453
+ availableQuantity: 25,
454
+ isSold: false,
455
+ mainImage: seedExtMedia("https://picsum.photos/seed/stickers-image-tester-sandbox-1-20260101/900/900"),
456
+ images: [seedExtMedia("https://picsum.photos/seed/stickers-image-tester-sandbox-1-20260101/900/900")],
457
+ status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
458
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
459
+ listingType: "stickers",
460
+ customFields: [],
461
+ customSections: [],
462
+ isPromoted: false,
463
+ isOnSale: false,
464
+ createdAt: new Date(),
465
+ updatedAt: new Date(),
466
+ }),
326
467
  withTokens({
327
468
  id: "group-tester-sandbox-bundle",
328
469
  slug: "group-tester-sandbox-bundle",
329
- title: "Test BundleStandard #1 + Standard #2",
330
- description: "Disposable test bundle bundling the two tester-sandbox standard products. Auto-expires in 7 days.",
470
+ // Product-group ("Set") parentTier GP, unrelated to the Bundles
471
+ // feature (categoryType:"bundle") despite the legacy "bundle" id/slug.
472
+ // Kept stable rather than renamed since nothing outside this file's
473
+ // internal group wiring depends on the "bundle" name.
474
+ title: "Test Product Set — Standard #1 + Standard #2",
475
+ description: "Disposable test product-group parent linking the two tester-sandbox standard products as a \"Set\". Auto-expires in 7 days.",
331
476
  categorySlugs: GADGETS_CATEGORY_SLUGS,
332
477
  categoryNames: GADGETS_CATEGORY_NAMES,
333
478
  brandSlug: "brand-tester-sandbox",
@@ -348,7 +493,7 @@ export const productsTesterSeedData = [
348
493
  isOnSale: false,
349
494
  isGroupParent: true,
350
495
  groupId: "group-tester-sandbox-bundle",
351
- groupTitle: "Tester Sandbox Bundle",
496
+ groupTitle: TESTER_GROUP_TITLE,
352
497
  groupChildSlugs: ["product-tester-standard-1", "product-tester-standard-2"],
353
498
  createdAt: new Date(),
354
499
  updatedAt: new Date(),