@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.
- package/dist/_internal/client/features/layout/navActive.d.ts +17 -0
- package/dist/_internal/client/features/layout/navActive.js +33 -0
- package/dist/_internal/server/features/auth/actions.d.ts +0 -1
- package/dist/_internal/server/features/auth/actions.js +0 -1
- package/dist/_internal/server/features/bundles/data.d.ts +22 -4
- package/dist/_internal/server/features/bundles/data.js +41 -4
- package/dist/_internal/server/features/bundles/index.d.ts +1 -1
- package/dist/_internal/server/features/bundles/index.js +1 -1
- package/dist/_internal/server/features/checkout/actions.js +7 -78
- package/dist/_internal/server/features/checkout/prize-bundle-gates.d.ts +5 -16
- package/dist/_internal/server/features/checkout/prize-bundle-gates.js +5 -30
- package/dist/_internal/server/features/orders/adapters.js +1 -14
- package/dist/_internal/server/features/products/actions.js +8 -3
- package/dist/_internal/server/features/products/service.d.ts +15 -0
- package/dist/_internal/server/features/products/service.js +41 -0
- package/dist/_internal/server/functions/firestore.d.ts +3 -1
- package/dist/_internal/server/functions/firestore.js +17 -1
- package/dist/_internal/server/functions/scheduled.d.ts +2 -5
- package/dist/_internal/server/functions/scheduled.js +6 -30
- package/dist/_internal/server/jobs/core/bundleStockSync.js +25 -7
- package/dist/_internal/server/jobs/core/countersReconcile.js +7 -1
- package/dist/_internal/server/jobs/core/index.d.ts +4 -4
- package/dist/_internal/server/jobs/core/index.js +4 -4
- package/dist/_internal/server/jobs/core/onPrizeDrawPaymentConfirmed.d.ts +19 -0
- package/dist/_internal/server/jobs/core/onPrizeDrawPaymentConfirmed.js +30 -0
- package/dist/_internal/server/jobs/core/paymentWindowTimeout.d.ts +2 -2
- package/dist/_internal/server/jobs/core/paymentWindowTimeout.js +2 -2
- package/dist/_internal/server/jobs/core/prizeDrawAssignWinner.d.ts +20 -0
- package/dist/_internal/server/jobs/core/prizeDrawAssignWinner.js +113 -0
- package/dist/_internal/server/jobs/core/prizeDrawExpiryReveal.d.ts +14 -0
- package/dist/_internal/server/jobs/core/prizeDrawExpiryReveal.js +74 -0
- package/dist/_internal/server/jobs/core/prizeDrawSoldOutReveal.d.ts +22 -0
- package/dist/_internal/server/jobs/core/prizeDrawSoldOutReveal.js +68 -0
- package/dist/_internal/server/jobs/handlers/index.d.ts +3 -4
- package/dist/_internal/server/jobs/handlers/index.js +8 -6
- package/dist/_internal/server/jobs/handlers/onPrizeDrawPaymentConfirmed.d.ts +3 -0
- package/dist/_internal/server/jobs/handlers/onPrizeDrawPaymentConfirmed.js +11 -0
- package/dist/_internal/server/jobs/handlers/prizeDrawExpiryReveal.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/prizeDrawExpiryReveal.js +2 -0
- package/dist/_internal/server/jobs/handlers/prizeDrawSoldOutReveal.d.ts +3 -0
- package/dist/_internal/server/jobs/handlers/prizeDrawSoldOutReveal.js +4 -0
- package/dist/_internal/shared/actions/action-registry.js +40 -10
- package/dist/_internal/shared/checkout/rules/_defaults.js +1 -2
- package/dist/_internal/shared/checkout/rules/_limits.d.ts +3 -0
- package/dist/_internal/shared/checkout/rules/_limits.js +3 -0
- package/dist/_internal/shared/checkout/rules/_registry.d.ts +2 -1
- package/dist/_internal/shared/checkout/rules/_registry.js +2 -2
- package/dist/_internal/shared/checkout/rules/classified.rule.js +0 -1
- package/dist/_internal/shared/checkout/rules/index.d.ts +1 -1
- package/dist/_internal/shared/checkout/rules/index.js +1 -1
- package/dist/_internal/shared/checkout/rules/prize-draw.rule.js +20 -1
- package/dist/_internal/shared/checkout/rules/types.d.ts +17 -7
- package/dist/_internal/shared/features/categories/bundle-copy.d.ts +2 -0
- package/dist/_internal/shared/features/categories/bundle-copy.js +2 -0
- package/dist/_internal/shared/features/categories/bundle-pricing.d.ts +23 -0
- package/dist/_internal/shared/features/categories/bundle-pricing.js +25 -0
- package/dist/_internal/shared/listing-types/prize-draw/config.js +1 -1
- package/dist/constants/api-endpoints.d.ts +6 -9
- package/dist/constants/api-endpoints.js +5 -5
- package/dist/constants/field-names.d.ts +17 -1
- package/dist/constants/field-names.js +17 -1
- package/dist/features/account/components/UserSidebar.js +21 -9
- package/dist/features/account/hooks/useNotifications.js +5 -0
- package/dist/features/admin/actions/admin-actions.js +6 -0
- package/dist/features/admin/actions/notification-actions.js +1 -2
- package/dist/features/admin/components/AdminBlogEditorView.js +1 -1
- package/dist/features/admin/components/AdminGuideHubView.js +15 -1
- package/dist/features/admin/components/AdminPaymentsGuideView.d.ts +2 -0
- package/dist/features/admin/components/AdminPaymentsGuideView.js +36 -0
- package/dist/features/admin/components/AdminPrizeDrawsView.js +3 -3
- package/dist/features/admin/components/AdminSidebar.js +18 -9
- package/dist/features/admin/components/AdminSiteSettingsView.js +33 -6
- package/dist/features/admin/components/AdminTesterChecklistView.js +74 -22
- package/dist/features/admin/components/AdminWhatsAppGuideView.d.ts +2 -0
- package/dist/features/admin/components/AdminWhatsAppGuideView.js +35 -0
- package/dist/features/admin/hooks/useAdminListing.d.ts +4 -0
- package/dist/features/admin/hooks/useAdminListing.js +4 -2
- package/dist/features/admin/schemas/firestore.d.ts +13 -5
- package/dist/features/admin/schemas/firestore.js +1 -2
- package/dist/features/auctions/actions/bid-actions.js +3 -1
- package/dist/features/auctions/components/AuctionBidsTable.d.ts +6 -1
- package/dist/features/auctions/components/AuctionBidsTable.js +8 -4
- package/dist/features/auctions/components/AuctionDetailPageView.js +10 -13
- package/dist/features/auctions/components/CollapsibleBidHistory.d.ts +23 -2
- package/dist/features/auctions/components/CollapsibleBidHistory.js +22 -3
- package/dist/features/auctions/components/LiveBidPrice.d.ts +19 -0
- package/dist/features/auctions/components/LiveBidPrice.js +17 -0
- package/dist/features/auctions/components/PlaceBidFormClient.d.ts +1 -1
- package/dist/features/auctions/components/PlaceBidFormClient.js +16 -1
- package/dist/features/auctions/hooks/useBids.d.ts +33 -0
- package/dist/features/auctions/hooks/useBids.js +32 -0
- package/dist/features/auctions/hooks/useLiveAuctionBid.d.ts +20 -0
- package/dist/features/auctions/hooks/useLiveAuctionBid.js +23 -0
- package/dist/features/auth/checkout-value-otp.d.ts +7 -10
- package/dist/features/auth/checkout-value-otp.js +14 -10
- package/dist/features/auth/server.d.ts +0 -1
- package/dist/features/auth/server.js +0 -1
- package/dist/features/blog/api/[slug]/route.d.ts +5 -0
- package/dist/features/blog/api/[slug]/route.js +12 -3
- package/dist/features/blog/components/BlogPostView.d.ts +2 -0
- package/dist/features/blog/components/BlogPostView.js +5 -4
- package/dist/features/blog/hooks/useBlog.d.ts +2 -0
- package/dist/features/blog/hooks/useBlog.js +2 -0
- package/dist/features/blog/repository/blog.repository.d.ts +7 -0
- package/dist/features/blog/repository/blog.repository.js +44 -0
- package/dist/features/blog/schemas/firestore.d.ts +3 -0
- package/dist/features/blog/schemas/firestore.js +1 -0
- package/dist/features/blog/types/index.d.ts +2 -0
- package/dist/features/cart/components/index.d.ts +0 -2
- package/dist/features/cart/components/index.js +0 -1
- package/dist/features/cart/hooks/useCartCount.js +22 -5
- package/dist/features/cart/hooks/useGuestCart.js +11 -1
- package/dist/features/cart/utils/guest-cart.d.ts +4 -0
- package/dist/features/cart/utils/guest-cart.js +10 -0
- package/dist/features/cart/utils/pending-ops.d.ts +17 -0
- package/dist/features/cart/utils/pending-ops.js +46 -5
- package/dist/features/categories/components/BrandDetailPageView.js +6 -2
- package/dist/features/categories/components/BundleDetailView.js +4 -2
- package/dist/features/categories/components/CategoryDetailPageView.js +10 -2
- package/dist/features/categories/schemas/firestore.d.ts +7 -0
- package/dist/features/checkout/actions/index.d.ts +0 -1
- package/dist/features/checkout/actions/index.js +0 -1
- package/dist/features/checkout/schemas/firestore.d.ts +2 -2
- package/dist/features/events/actions/event-actions.d.ts +2 -0
- package/dist/features/events/actions/event-actions.js +5 -0
- package/dist/features/events/components/EventCard.js +2 -3
- package/dist/features/events/components/RelatedEventsCarousel.d.ts +15 -0
- package/dist/features/events/components/RelatedEventsCarousel.js +13 -0
- package/dist/features/events/components/index.d.ts +2 -0
- package/dist/features/events/components/index.js +1 -0
- package/dist/features/events/repository/events.repository.d.ts +6 -0
- package/dist/features/events/repository/events.repository.js +21 -0
- package/dist/features/history/repository/user-history.repository.d.ts +1 -1
- package/dist/features/history/utils/guest-history.d.ts +1 -1
- package/dist/features/homepage/components/FeaturedBundlesSection.js +4 -2
- package/dist/features/homepage/components/FeaturedProductsSection.js +2 -2
- package/dist/features/homepage/components/SectionCarousel.js +1 -1
- package/dist/features/homepage/components/WelcomeSection.js +1 -1
- package/dist/features/layout/AppLayoutShell.js +44 -10
- package/dist/features/layout/NavbarLayout.js +1 -1
- package/dist/features/layout/TitleBarLayout.js +2 -2
- package/dist/features/media/MediaVideo.d.ts +7 -0
- package/dist/features/media/MediaVideo.js +36 -5
- package/dist/features/orders/components/OrdersList.js +1 -5
- package/dist/features/orders/schemas/firestore.d.ts +2 -8
- package/dist/features/orders/schemas/index.d.ts +3 -32
- package/dist/features/orders/schemas/index.js +1 -4
- package/dist/features/orders/types/index.d.ts +6 -9
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +1 -1
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +2 -1
- package/dist/features/products/actions/product-actions.js +13 -10
- package/dist/features/products/components/MarketplaceBundleCard.d.ts +1 -1
- package/dist/features/products/components/MarketplaceBundleCard.js +7 -4
- package/dist/features/products/components/PrizeDrawDetailPageView.js +1 -1
- package/dist/features/products/components/PrizeDrawItemsEditor.js +2 -2
- package/dist/features/products/components/PrizeDrawWinnerMappingView.d.ts +14 -0
- package/dist/features/products/components/PrizeDrawWinnerMappingView.js +37 -0
- package/dist/features/products/components/PrizeRevealModal.d.ts +10 -23
- package/dist/features/products/components/PrizeRevealModal.js +18 -147
- package/dist/features/products/components/ProductDetailPageView.js +72 -30
- package/dist/features/products/components/ProductForm.js +7 -14
- package/dist/features/products/components/ProductGalleryClient.d.ts +10 -1
- package/dist/features/products/components/ProductGalleryClient.js +29 -10
- package/dist/features/products/components/ProductsIndexListing.js +2 -1
- package/dist/features/products/components/RelatedProductsCarousel.js +2 -2
- package/dist/features/products/components/ShowGroupSection.js +2 -2
- package/dist/features/products/components/SublistingCarouselSection.js +1 -1
- package/dist/features/products/components/index.d.ts +4 -2
- package/dist/features/products/components/index.js +1 -0
- package/dist/features/products/constants/action-defs.d.ts +1 -3
- package/dist/features/products/constants/action-defs.js +0 -5
- package/dist/features/products/repository/products.repository.d.ts +6 -0
- package/dist/features/products/repository/products.repository.js +20 -1
- package/dist/features/products/schemas/firestore.d.ts +28 -3
- package/dist/features/products/schemas/index.d.ts +11 -3
- package/dist/features/products/schemas/index.js +10 -2
- package/dist/features/products/types/index.d.ts +2 -1
- package/dist/features/reviews/actions/review-actions.js +1 -0
- package/dist/features/reviews/components/ReviewDetailPageView.js +8 -1
- package/dist/features/reviews/components/ReviewDetailShell.js +2 -1
- package/dist/features/reviews/components/ReviewsList.js +2 -1
- package/dist/features/reviews/schemas/firestore.d.ts +3 -0
- package/dist/features/reviews/schemas/index.d.ts +6 -0
- package/dist/features/reviews/schemas/index.js +2 -0
- package/dist/features/reviews/types/index.d.ts +3 -0
- package/dist/features/scams/actions/scam-actions.d.ts +3 -0
- package/dist/features/scams/actions/scam-actions.js +3 -2
- package/dist/features/scams/components/ScamProfileView.d.ts +2 -1
- package/dist/features/scams/components/ScamProfileView.js +2 -2
- package/dist/features/scams/repository/scammer.repository.d.ts +6 -0
- package/dist/features/scams/repository/scammer.repository.js +24 -0
- package/dist/features/seller/actions/seller-actions.js +8 -0
- package/dist/features/seller/components/SellerPrizeDrawsView.js +4 -0
- package/dist/features/seller/components/SellerSidebar.js +20 -9
- package/dist/features/stores/components/StoreDetailLayoutView.js +6 -6
- package/dist/features/stores/components/StoreGuideHubView.js +7 -1
- package/dist/features/stores/components/StoreNavTabs.d.ts +10 -1
- package/dist/features/stores/components/StoreNavTabs.js +22 -9
- package/dist/features/stores/components/StoreWhatsAppGuideView.d.ts +3 -0
- package/dist/features/stores/components/StoreWhatsAppGuideView.js +12 -0
- package/dist/features/stores/components/index.d.ts +2 -0
- package/dist/features/stores/components/index.js +1 -0
- package/dist/features/tester/actions/index.d.ts +1 -0
- package/dist/features/tester/actions/index.js +1 -0
- package/dist/features/tester/actions/leaderboard-actions.d.ts +3 -0
- package/dist/features/tester/actions/leaderboard-actions.js +5 -0
- package/dist/features/tester/components/AdminTesterFeedbackIssuesView.js +26 -4
- package/dist/features/tester/components/AdminTesterFeedbackListView.js +13 -0
- package/dist/features/tester/components/BugHunterLeaderboardView.d.ts +23 -0
- package/dist/features/tester/components/BugHunterLeaderboardView.js +18 -0
- package/dist/features/tester/components/index.d.ts +2 -0
- package/dist/features/tester/components/index.js +1 -0
- package/dist/features/tester/repository/tester-checklist-item.repository.d.ts +12 -1
- package/dist/features/tester/repository/tester-checklist-item.repository.js +80 -0
- package/dist/features/tester/repository/tester-checklist-response.repository.d.ts +4 -0
- package/dist/features/tester/repository/tester-checklist-response.repository.js +4 -0
- package/dist/features/tester/schemas/firestore.d.ts +22 -1
- package/dist/features/tester/schemas/firestore.js +8 -0
- package/dist/features/tester/seed-data/categories-tester-seed-data.js +42 -7
- package/dist/features/tester/seed-data/events-tester-seed-data.js +23 -0
- package/dist/features/tester/seed-data/orders-tester-seed-data.js +69 -31
- package/dist/features/tester/seed-data/products-tester-seed-data.js +154 -9
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +252 -15
- package/dist/features/wishlist/hooks/useGuestWishlist.js +11 -1
- package/dist/features/wishlist/hooks/useWishlistCount.js +16 -2
- package/dist/features/wishlist/utils/guest-wishlist.d.ts +5 -0
- package/dist/features/wishlist/utils/guest-wishlist.js +11 -0
- package/dist/index.d.ts +23 -22
- package/dist/index.js +31 -58
- package/dist/jobs.d.ts +1 -1
- package/dist/jobs.js +2 -2
- package/dist/next/routing/route-map.d.ts +9 -2
- package/dist/next/routing/route-map.js +4 -1
- package/dist/schemas/registry.d.ts +6 -26
- package/dist/seed/bids-seed-data.js +14 -2
- package/dist/seed/blog-posts-seed-data.js +2 -1
- package/dist/seed/categories-seed-data.js +11 -2
- package/dist/seed/events-seed-data.js +11 -11
- package/dist/seed/faq-seed-data.js +5 -1
- package/dist/seed/products-auctions-seed-data.js +2 -2
- package/dist/seed/products-preorders-seed-data.d.ts +2 -1
- package/dist/seed/products-prize-draws-seed-data.js +56 -10
- package/dist/seed/products-standard-seed-data.js +80 -3
- package/dist/seed/scammers-seed-data.js +75 -2
- package/dist/seed/site-settings-seed-data.js +5 -2
- package/dist/server-entry.d.ts +0 -1
- package/dist/server-entry.js +0 -1
- package/dist/server.d.ts +4 -20
- package/dist/server.js +10 -57
- package/dist/styles.css +1 -277
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/components/BaseListingCard.js +1 -1
- package/dist/ui/components/ImageLightbox.d.ts +9 -0
- package/dist/ui/components/ImageLightbox.js +6 -3
- package/dist/ui/components/ListingToolbar.d.ts +18 -1
- package/dist/ui/components/ListingToolbar.js +5 -2
- package/dist/ui/components/StickyToolbar.js +13 -8
- package/package.json +1 -1
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* WHY: Shared tester sandbox — a handful of disposable test products spanning
|
|
3
|
-
* auction,
|
|
4
|
-
* can exercise buying/bidding/
|
|
5
|
-
*
|
|
6
|
-
*
|
|
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
|
-
|
|
330
|
-
|
|
470
|
+
// Product-group ("Set") parent — Tier 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:
|
|
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(),
|