@mohasinac/appkit 2.6.3 → 2.6.5
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/server/features/account/data.js +2 -2
- package/dist/_internal/server/features/bundles/data.d.ts +26 -6
- package/dist/_internal/server/features/bundles/data.js +41 -6
- package/dist/_internal/server/features/bundles/index.d.ts +3 -2
- package/dist/_internal/server/features/bundles/index.js +4 -2
- package/dist/_internal/server/features/bundles/metadata.d.ts +20 -0
- package/dist/_internal/server/features/bundles/metadata.js +46 -0
- package/dist/_internal/server/features/bundles/og.d.ts +38 -0
- package/dist/_internal/server/features/bundles/og.js +122 -0
- package/dist/_internal/server/features/checkout/actions.js +192 -133
- package/dist/_internal/server/features/checkout/bundle-expansion.d.ts +57 -0
- package/dist/_internal/server/features/checkout/bundle-expansion.js +70 -0
- package/dist/_internal/server/features/checkout/prize-bundle-gates.d.ts +5 -15
- package/dist/_internal/server/features/checkout/prize-bundle-gates.js +5 -21
- package/dist/_internal/server/features/media/contextGuards.js +15 -1
- package/dist/_internal/server/features/payouts/actions.d.ts +19 -0
- package/dist/_internal/server/features/payouts/actions.js +38 -0
- package/dist/_internal/server/features/products/data.js +1 -2
- package/dist/_internal/server/features/raffle/actions.d.ts +11 -0
- package/dist/_internal/server/features/raffle/actions.js +31 -0
- package/dist/_internal/server/features/refunds/actions.d.ts +31 -0
- package/dist/_internal/server/features/refunds/actions.js +77 -0
- package/dist/_internal/server/jobs/core/adminAnalytics.d.ts +28 -0
- package/dist/_internal/server/jobs/core/adminAnalytics.js +98 -0
- package/dist/_internal/server/jobs/core/assignSpinPrize.d.ts +19 -0
- package/dist/_internal/server/jobs/core/assignSpinPrize.js +81 -0
- package/dist/_internal/server/jobs/core/auctionSettlement.d.ts +2 -0
- package/dist/_internal/server/jobs/core/auctionSettlement.js +70 -0
- package/dist/_internal/server/jobs/core/autoPayoutEligibility.d.ts +2 -0
- package/dist/_internal/server/jobs/core/autoPayoutEligibility.js +109 -0
- package/dist/_internal/server/jobs/core/bundleStockSync.d.ts +10 -0
- package/dist/_internal/server/jobs/core/bundleStockSync.js +71 -0
- package/dist/_internal/server/jobs/core/cartPrune.d.ts +2 -0
- package/dist/_internal/server/jobs/core/cartPrune.js +13 -0
- package/dist/_internal/server/jobs/core/cleanupRtdbEvents.d.ts +2 -0
- package/dist/_internal/server/jobs/core/cleanupRtdbEvents.js +45 -0
- package/dist/_internal/server/jobs/core/countersReconcile.d.ts +2 -0
- package/dist/_internal/server/jobs/core/countersReconcile.js +107 -0
- package/dist/_internal/server/jobs/core/couponExpiry.d.ts +2 -0
- package/dist/_internal/server/jobs/core/couponExpiry.js +13 -0
- package/dist/_internal/server/jobs/core/dailyDataCleanup.d.ts +2 -0
- package/dist/_internal/server/jobs/core/dailyDataCleanup.js +20 -0
- package/dist/_internal/server/jobs/core/index.d.ts +44 -0
- package/dist/_internal/server/jobs/core/index.js +47 -0
- package/dist/_internal/server/jobs/core/listingProcessor.d.ts +30 -0
- package/dist/_internal/server/jobs/core/listingProcessor.js +138 -0
- package/dist/_internal/server/jobs/core/mediaTmpCleanup.d.ts +14 -0
- package/dist/_internal/server/jobs/core/mediaTmpCleanup.js +68 -0
- package/dist/_internal/server/jobs/core/notificationPrune.d.ts +2 -0
- package/dist/_internal/server/jobs/core/notificationPrune.js +13 -0
- package/dist/_internal/server/jobs/core/offerExpiry.d.ts +2 -0
- package/dist/_internal/server/jobs/core/offerExpiry.js +50 -0
- package/dist/_internal/server/jobs/core/onBidPlaced.d.ts +15 -0
- package/dist/_internal/server/jobs/core/onBidPlaced.js +59 -0
- package/dist/_internal/server/jobs/core/onCategoryWrite.d.ts +14 -0
- package/dist/_internal/server/jobs/core/onCategoryWrite.js +134 -0
- package/dist/_internal/server/jobs/core/onOrderCreate.d.ts +18 -0
- package/dist/_internal/server/jobs/core/onOrderCreate.js +78 -0
- package/dist/_internal/server/jobs/core/onOrderStatusChange.d.ts +19 -0
- package/dist/_internal/server/jobs/core/onOrderStatusChange.js +139 -0
- package/dist/_internal/server/jobs/core/onProductStockChange.d.ts +23 -0
- package/dist/_internal/server/jobs/core/onProductStockChange.js +130 -0
- package/dist/_internal/server/jobs/core/onProductWrite.d.ts +12 -0
- package/dist/_internal/server/jobs/core/onProductWrite.js +94 -0
- package/dist/_internal/server/jobs/core/onReviewWrite.d.ts +7 -0
- package/dist/_internal/server/jobs/core/onReviewWrite.js +49 -0
- package/dist/_internal/server/jobs/core/onStoreWrite.d.ts +12 -0
- package/dist/_internal/server/jobs/core/onStoreWrite.js +7 -0
- package/dist/_internal/server/jobs/core/payoutBatch.d.ts +8 -0
- package/dist/_internal/server/jobs/core/payoutBatch.js +102 -0
- package/dist/_internal/server/jobs/core/pendingOrderTimeout.d.ts +2 -0
- package/dist/_internal/server/jobs/core/pendingOrderTimeout.js +27 -0
- package/dist/_internal/server/jobs/core/positionsReconcile.d.ts +7 -0
- package/dist/_internal/server/jobs/core/positionsReconcile.js +87 -0
- package/dist/_internal/server/jobs/core/prizeRevealClose.d.ts +2 -0
- package/dist/_internal/server/jobs/core/prizeRevealClose.js +22 -0
- package/dist/_internal/server/jobs/core/prizeRevealExpiry.d.ts +2 -0
- package/dist/_internal/server/jobs/core/prizeRevealExpiry.js +50 -0
- package/dist/_internal/server/jobs/core/prizeRevealOpen.d.ts +2 -0
- package/dist/_internal/server/jobs/core/prizeRevealOpen.js +56 -0
- package/dist/_internal/server/jobs/core/prizeRevealReminder.d.ts +2 -0
- package/dist/_internal/server/jobs/core/prizeRevealReminder.js +38 -0
- package/dist/_internal/server/jobs/core/productStatsSync.d.ts +8 -0
- package/dist/_internal/server/jobs/core/productStatsSync.js +36 -0
- package/dist/_internal/server/jobs/core/promotions.d.ts +12 -0
- package/dist/_internal/server/jobs/core/promotions.js +43 -0
- package/dist/_internal/server/jobs/core/storeAnalytics.d.ts +30 -0
- package/dist/_internal/server/jobs/core/storeAnalytics.js +109 -0
- package/dist/_internal/server/jobs/core/triggerEventRaffle.d.ts +19 -0
- package/dist/_internal/server/jobs/core/triggerEventRaffle.js +86 -0
- package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.d.ts +6 -0
- package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.js +85 -0
- package/dist/_internal/server/jobs/handlers/adminAnalytics.d.ts +2 -26
- package/dist/_internal/server/jobs/handlers/adminAnalytics.js +2 -98
- package/dist/_internal/server/jobs/handlers/assignSpinPrize.d.ts +1 -22
- package/dist/_internal/server/jobs/handlers/assignSpinPrize.js +2 -86
- package/dist/_internal/server/jobs/handlers/auctionSettlement.js +2 -70
- package/dist/_internal/server/jobs/handlers/autoPayoutEligibility.js +2 -110
- package/dist/_internal/server/jobs/handlers/bundleStockSync.d.ts +0 -16
- package/dist/_internal/server/jobs/handlers/bundleStockSync.js +2 -80
- package/dist/_internal/server/jobs/handlers/cartPrune.js +2 -13
- package/dist/_internal/server/jobs/handlers/cleanupRtdbEvents.js +2 -45
- package/dist/_internal/server/jobs/handlers/countersReconcile.js +2 -109
- package/dist/_internal/server/jobs/handlers/couponExpiry.js +2 -13
- package/dist/_internal/server/jobs/handlers/dailyDataCleanup.js +2 -20
- package/dist/_internal/server/jobs/handlers/listingProcessor.d.ts +3 -28
- package/dist/_internal/server/jobs/handlers/listingProcessor.js +3 -138
- package/dist/_internal/server/jobs/handlers/mediaTmpCleanup.d.ts +0 -12
- package/dist/_internal/server/jobs/handlers/mediaTmpCleanup.js +2 -69
- package/dist/_internal/server/jobs/handlers/notificationPrune.js +2 -13
- package/dist/_internal/server/jobs/handlers/offerExpiry.js +2 -50
- package/dist/_internal/server/jobs/handlers/onBidPlaced.d.ts +1 -10
- package/dist/_internal/server/jobs/handlers/onBidPlaced.js +2 -56
- package/dist/_internal/server/jobs/handlers/onCategoryWrite.d.ts +1 -8
- package/dist/_internal/server/jobs/handlers/onCategoryWrite.js +6 -134
- package/dist/_internal/server/jobs/handlers/onOrderCreate.d.ts +1 -12
- package/dist/_internal/server/jobs/handlers/onOrderCreate.js +2 -76
- package/dist/_internal/server/jobs/handlers/onOrderStatusChange.d.ts +1 -12
- package/dist/_internal/server/jobs/handlers/onOrderStatusChange.js +2 -139
- package/dist/_internal/server/jobs/handlers/onProductStockChange.d.ts +0 -13
- package/dist/_internal/server/jobs/handlers/onProductStockChange.js +7 -134
- package/dist/_internal/server/jobs/handlers/onProductWrite.d.ts +1 -6
- package/dist/_internal/server/jobs/handlers/onProductWrite.js +6 -106
- package/dist/_internal/server/jobs/handlers/onReviewWrite.js +2 -49
- package/dist/_internal/server/jobs/handlers/onStoreWrite.d.ts +1 -8
- package/dist/_internal/server/jobs/handlers/onStoreWrite.js +7 -8
- package/dist/_internal/server/jobs/handlers/payoutBatch.d.ts +0 -9
- package/dist/_internal/server/jobs/handlers/payoutBatch.js +2 -104
- package/dist/_internal/server/jobs/handlers/pendingOrderTimeout.d.ts +0 -6
- package/dist/_internal/server/jobs/handlers/pendingOrderTimeout.js +2 -33
- package/dist/_internal/server/jobs/handlers/positionsReconcile.d.ts +0 -5
- package/dist/_internal/server/jobs/handlers/positionsReconcile.js +2 -87
- package/dist/_internal/server/jobs/handlers/prizeRevealClose.d.ts +0 -7
- package/dist/_internal/server/jobs/handlers/prizeRevealClose.js +2 -29
- package/dist/_internal/server/jobs/handlers/prizeRevealExpiry.d.ts +0 -8
- package/dist/_internal/server/jobs/handlers/prizeRevealExpiry.js +2 -58
- package/dist/_internal/server/jobs/handlers/prizeRevealOpen.d.ts +0 -8
- package/dist/_internal/server/jobs/handlers/prizeRevealOpen.js +2 -65
- package/dist/_internal/server/jobs/handlers/prizeRevealReminder.d.ts +0 -7
- package/dist/_internal/server/jobs/handlers/prizeRevealReminder.js +2 -45
- package/dist/_internal/server/jobs/handlers/productStatsSync.d.ts +0 -6
- package/dist/_internal/server/jobs/handlers/productStatsSync.js +2 -36
- package/dist/_internal/server/jobs/handlers/promotions.d.ts +2 -10
- package/dist/_internal/server/jobs/handlers/promotions.js +2 -43
- package/dist/_internal/server/jobs/handlers/storeAnalytics.d.ts +2 -28
- package/dist/_internal/server/jobs/handlers/storeAnalytics.js +2 -109
- package/dist/_internal/server/jobs/handlers/triggerEventRaffle.d.ts +1 -28
- package/dist/_internal/server/jobs/handlers/triggerEventRaffle.js +2 -94
- package/dist/_internal/server/jobs/handlers/weeklyPayoutEligibility.d.ts +0 -6
- package/dist/_internal/server/jobs/handlers/weeklyPayoutEligibility.js +2 -87
- package/dist/_internal/server/jobs/index.d.ts +1 -0
- package/dist/_internal/server/jobs/index.js +1 -0
- package/dist/_internal/server/jobs/runtime/adapters/firebase.js +21 -0
- package/dist/_internal/shared/actions/action-registry.d.ts +84 -0
- package/dist/_internal/shared/actions/action-registry.js +160 -0
- package/dist/_internal/shared/checkout/rules/_defaults.d.ts +3 -0
- package/dist/_internal/shared/checkout/rules/_defaults.js +22 -0
- package/dist/_internal/shared/checkout/rules/_limits.d.ts +19 -0
- package/dist/_internal/shared/checkout/rules/_limits.js +19 -0
- package/dist/_internal/shared/checkout/rules/_registry.d.ts +44 -0
- package/dist/_internal/shared/checkout/rules/_registry.js +87 -0
- package/dist/_internal/shared/checkout/rules/auction.rule.d.ts +2 -0
- package/dist/_internal/shared/checkout/rules/auction.rule.js +10 -0
- package/dist/_internal/shared/checkout/rules/bundle.rule.d.ts +11 -0
- package/dist/_internal/shared/checkout/rules/bundle.rule.js +6 -0
- package/dist/_internal/shared/checkout/rules/classified.rule.d.ts +9 -0
- package/dist/_internal/shared/checkout/rules/classified.rule.js +9 -0
- package/dist/_internal/shared/checkout/rules/digital-code.rule.d.ts +8 -0
- package/dist/_internal/shared/checkout/rules/digital-code.rule.js +6 -0
- package/dist/_internal/shared/checkout/rules/index.d.ts +12 -0
- package/dist/_internal/shared/checkout/rules/index.js +12 -0
- package/dist/_internal/shared/checkout/rules/live.rule.d.ts +10 -0
- package/dist/_internal/shared/checkout/rules/live.rule.js +6 -0
- package/dist/_internal/shared/checkout/rules/offer.rule.d.ts +2 -0
- package/dist/_internal/shared/checkout/rules/offer.rule.js +9 -0
- package/dist/_internal/shared/checkout/rules/preorder.rule.d.ts +2 -0
- package/dist/_internal/shared/checkout/rules/preorder.rule.js +28 -0
- package/dist/_internal/shared/checkout/rules/prize-draw.rule.d.ts +2 -0
- package/dist/_internal/shared/checkout/rules/prize-draw.rule.js +65 -0
- package/dist/_internal/shared/checkout/rules/standard.rule.d.ts +2 -0
- package/dist/_internal/shared/checkout/rules/standard.rule.js +5 -0
- package/dist/_internal/shared/checkout/rules/types.d.ts +125 -0
- package/dist/_internal/shared/checkout/rules/types.js +13 -0
- package/dist/_internal/shared/features/cart/schema.d.ts +6 -6
- package/dist/_internal/shared/features/categories/bundle-copy.d.ts +123 -0
- package/dist/_internal/shared/features/categories/bundle-copy.js +134 -0
- package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +318 -0
- package/dist/_internal/shared/features/categories/bundle-schemas.js +55 -0
- package/dist/_internal/shared/features/events/schema.d.ts +4 -4
- package/dist/_internal/shared/features/orders/refund-copy.d.ts +36 -0
- package/dist/_internal/shared/features/orders/refund-copy.js +40 -0
- package/dist/_internal/shared/features/orders/schema.d.ts +4 -4
- package/dist/_internal/shared/features/products/schema.d.ts +8 -8
- package/dist/_internal/shared/listing-types/_registry.d.ts +27 -0
- package/dist/_internal/shared/listing-types/_registry.js +8 -0
- package/dist/_internal/shared/listing-types/action-tracker.d.ts +41 -0
- package/dist/_internal/shared/listing-types/action-tracker.js +70 -0
- package/dist/_internal/shared/listing-types/capabilities.js +25 -0
- package/dist/_internal/shared/listing-types/cart-shipping.d.ts +37 -0
- package/dist/_internal/shared/listing-types/cart-shipping.js +46 -0
- package/dist/_internal/shared/listing-types/classified/config.d.ts +7 -0
- package/dist/_internal/shared/listing-types/classified/config.js +8 -0
- package/dist/_internal/shared/listing-types/classified/ctas.d.ts +1 -0
- package/dist/_internal/shared/listing-types/classified/ctas.js +3 -0
- package/dist/_internal/shared/listing-types/classified/og.d.ts +1 -0
- package/dist/_internal/shared/listing-types/classified/og.js +1 -0
- package/dist/_internal/shared/listing-types/classified/schema.d.ts +1 -0
- package/dist/_internal/shared/listing-types/classified/schema.js +1 -0
- package/dist/_internal/shared/listing-types/classified/seed-factory.d.ts +1 -0
- package/dist/_internal/shared/listing-types/classified/seed-factory.js +1 -0
- package/dist/_internal/shared/listing-types/digital-code/config.d.ts +7 -0
- package/dist/_internal/shared/listing-types/digital-code/config.js +8 -0
- package/dist/_internal/shared/listing-types/digital-code/ctas.d.ts +1 -0
- package/dist/_internal/shared/listing-types/digital-code/ctas.js +3 -0
- package/dist/_internal/shared/listing-types/digital-code/og.d.ts +1 -0
- package/dist/_internal/shared/listing-types/digital-code/og.js +1 -0
- package/dist/_internal/shared/listing-types/digital-code/schema.d.ts +1 -0
- package/dist/_internal/shared/listing-types/digital-code/schema.js +1 -0
- package/dist/_internal/shared/listing-types/digital-code/seed-factory.d.ts +1 -0
- package/dist/_internal/shared/listing-types/digital-code/seed-factory.js +1 -0
- package/dist/_internal/shared/listing-types/feature-flags.d.ts +34 -0
- package/dist/_internal/shared/listing-types/feature-flags.js +45 -0
- package/dist/_internal/shared/listing-types/live/config.d.ts +7 -0
- package/dist/_internal/shared/listing-types/live/config.js +8 -0
- package/dist/_internal/shared/listing-types/live/ctas.d.ts +1 -0
- package/dist/_internal/shared/listing-types/live/ctas.js +3 -0
- package/dist/_internal/shared/listing-types/live/og.d.ts +1 -0
- package/dist/_internal/shared/listing-types/live/og.js +1 -0
- package/dist/_internal/shared/listing-types/live/schema.d.ts +1 -0
- package/dist/_internal/shared/listing-types/live/schema.js +1 -0
- package/dist/_internal/shared/listing-types/live/seed-factory.d.ts +1 -0
- package/dist/_internal/shared/listing-types/live/seed-factory.js +1 -0
- package/dist/_internal/shared/media/limits.js +8 -0
- package/dist/client.d.ts +10 -5
- package/dist/client.js +16 -3
- package/dist/configs/next.js +7 -0
- package/dist/constants/api-endpoints.d.ts +6 -0
- package/dist/constants/api-endpoints.js +4 -0
- package/dist/core/hooks/useSyncManager.js +13 -1
- package/dist/core/unit-of-work.d.ts +1 -1
- package/dist/core/unit-of-work.js +2 -2
- package/dist/features/account/actions/address-actions.d.ts +1 -1
- package/dist/features/account/actions/address-actions.js +15 -7
- package/dist/features/account/schemas/firestore.d.ts +8 -43
- package/dist/features/account/schemas/firestore.js +8 -54
- package/dist/features/account/schemas/index.d.ts +6 -6
- package/dist/features/account/server.d.ts +1 -1
- package/dist/features/account/server.js +3 -1
- package/dist/features/addresses/index.d.ts +2 -0
- package/dist/features/addresses/index.js +2 -0
- package/dist/features/addresses/repository/addresses.repository.d.ts +29 -0
- package/dist/features/addresses/repository/addresses.repository.js +157 -0
- package/dist/features/addresses/schemas/firestore.d.ts +53 -0
- package/dist/features/addresses/schemas/firestore.js +68 -0
- package/dist/features/{bundles → addresses}/schemas/index.d.ts +0 -1
- package/dist/features/{bundles → addresses}/schemas/index.js +0 -1
- package/dist/features/addresses/server.d.ts +2 -0
- package/dist/features/addresses/server.js +2 -0
- package/dist/features/admin/components/AdminAllEventEntriesView.js +4 -3
- package/dist/features/admin/components/AdminBidsView.js +4 -3
- package/dist/features/admin/components/AdminBlogView.js +8 -3
- package/dist/features/admin/components/AdminBundleEditorView.d.ts +9 -0
- package/dist/features/admin/components/AdminBundleEditorView.js +209 -0
- package/dist/features/admin/components/AdminBundlesView.d.ts +9 -0
- package/dist/features/admin/components/AdminBundlesView.js +59 -0
- package/dist/features/admin/components/AdminCartsView.js +13 -3
- package/dist/features/admin/components/AdminContactView.js +4 -3
- package/dist/features/admin/components/AdminCouponsView.js +32 -13
- package/dist/features/admin/components/AdminNewsletterView.js +4 -3
- package/dist/features/admin/components/AdminOrdersView.js +15 -7
- package/dist/features/admin/components/AdminPayoutsView.js +4 -3
- package/dist/features/admin/components/AdminPrizeDrawsView.d.ts +4 -0
- package/dist/features/admin/components/AdminPrizeDrawsView.js +135 -0
- package/dist/features/admin/components/AdminProductsView.js +6 -5
- package/dist/features/admin/components/AdminReviewsView.js +5 -4
- package/dist/features/admin/components/AdminStoresView.js +4 -3
- package/dist/features/admin/components/AdminUsersView.js +15 -5
- package/dist/features/admin/components/AdminWishlistsView.js +10 -1
- package/dist/features/admin/components/DataTable.d.ts +5 -1
- package/dist/features/admin/components/DataTable.js +24 -20
- package/dist/features/admin/components/index.d.ts +6 -0
- package/dist/features/admin/components/index.js +5 -0
- package/dist/features/admin/constants/filter-tabs.d.ts +435 -0
- package/dist/features/admin/constants/filter-tabs.js +216 -0
- package/dist/features/admin/hooks/useAdminListingData.d.ts +1 -0
- package/dist/features/admin/hooks/useAdminListingData.js +1 -0
- package/dist/features/admin/schemas/firestore.d.ts +15 -0
- package/dist/features/admin/schemas/firestore.js +18 -0
- package/dist/features/admin/types/product.types.d.ts +2 -2
- package/dist/features/auctions/components/AuctionCard.d.ts +4 -1
- package/dist/features/auctions/components/AuctionCard.js +5 -3
- package/dist/features/auctions/components/AuctionDetailPageView.js +1 -1
- package/dist/features/auctions/components/MarketplaceAuctionCard.d.ts +2 -2
- package/dist/features/auctions/components/PlaceBidFormClient.js +12 -2
- package/dist/features/auctions/schemas/index.d.ts +2 -2
- package/dist/features/auth/index.d.ts +1 -0
- package/dist/features/auth/index.js +1 -0
- package/dist/features/auth/role-predicates.d.ts +16 -0
- package/dist/features/auth/role-predicates.js +15 -0
- package/dist/features/blog/components/BlogFeaturedCard.d.ts +4 -1
- package/dist/features/blog/components/BlogFeaturedCard.js +5 -3
- package/dist/features/cart/actions/cart-actions.d.ts +1 -0
- package/dist/features/cart/actions/cart-actions.js +16 -0
- package/dist/features/cart/components/CartView.d.ts +19 -1
- package/dist/features/cart/components/CartView.js +2 -2
- package/dist/features/cart/components/ShippingPicker.d.ts +13 -0
- package/dist/features/cart/components/ShippingPicker.js +48 -0
- package/dist/features/cart/components/index.d.ts +3 -1
- package/dist/features/cart/components/index.js +1 -0
- package/dist/features/cart/hooks/useCartCount.js +7 -1
- package/dist/features/cart/repository/cart.repository.d.ts +1 -0
- package/dist/features/cart/repository/cart.repository.js +35 -0
- package/dist/features/cart/schemas/firestore.d.ts +27 -2
- package/dist/features/categories/components/BundleAddToCartCta.d.ts +16 -0
- package/dist/features/categories/components/BundleAddToCartCta.js +54 -0
- package/dist/features/categories/components/BundleBuyNowCta.d.ts +8 -0
- package/dist/features/categories/components/BundleBuyNowCta.js +37 -0
- package/dist/features/categories/components/BundleDetailView.d.ts +22 -0
- package/dist/features/categories/components/BundleDetailView.js +31 -0
- package/dist/features/categories/components/BundleDynamicRuleEditor.d.ts +18 -0
- package/dist/features/categories/components/BundleDynamicRuleEditor.js +60 -0
- package/dist/features/categories/components/BundleItemsPicker.d.ts +26 -0
- package/dist/features/categories/components/BundleItemsPicker.js +135 -0
- package/dist/features/categories/components/BundlesListView.d.ts +13 -0
- package/dist/features/categories/components/BundlesListView.js +27 -0
- package/dist/features/categories/components/index.d.ts +12 -0
- package/dist/features/categories/components/index.js +9 -0
- package/dist/features/checkout/actions/checkout-actions.js +10 -3
- package/dist/features/events/components/AdminEventEditorView.js +108 -2
- package/dist/features/events/components/AdminEventsView.js +16 -4
- package/dist/features/events/components/EventCard.d.ts +4 -1
- package/dist/features/events/components/EventCard.js +7 -3
- package/dist/features/events/components/EventRaffleWinnerView.d.ts +21 -0
- package/dist/features/events/components/EventRaffleWinnerView.js +18 -0
- package/dist/features/events/components/SpinWheelView.d.ts +27 -0
- package/dist/features/events/components/SpinWheelView.js +64 -0
- package/dist/features/events/components/index.d.ts +4 -0
- package/dist/features/events/components/index.js +2 -0
- package/dist/features/events/schemas/firestore.d.ts +27 -1
- package/dist/features/events/schemas/firestore.js +7 -0
- package/dist/features/events/types/index.d.ts +27 -1
- package/dist/features/homepage/components/FeaturedBundlesSection.d.ts +16 -0
- package/dist/features/homepage/components/FeaturedBundlesSection.js +24 -0
- package/dist/features/homepage/components/MarketplaceHomepageView.js +4 -1
- package/dist/features/homepage/components/WhatsAppCommunitySection.js +2 -2
- package/dist/features/homepage/lib/section-renderer.d.ts +2 -0
- package/dist/features/homepage/lib/section-renderer.js +5 -5
- package/dist/features/layout/NavbarLayout.d.ts +3 -1
- package/dist/features/layout/NavbarLayout.js +32 -3
- package/dist/features/layout/TitleBarLayout.d.ts +6 -3
- package/dist/features/layout/TitleBarLayout.js +22 -7
- package/dist/features/media/upload/MediaUploadField.d.ts +15 -1
- package/dist/features/media/upload/MediaUploadField.js +22 -1
- package/dist/features/orders/components/MarketplaceOrderCard.js +4 -2
- package/dist/features/orders/components/OrderSiblingPayments.d.ts +8 -0
- package/dist/features/orders/components/OrderSiblingPayments.js +16 -0
- package/dist/features/orders/components/RefundHistoryTable.d.ts +6 -0
- package/dist/features/orders/components/RefundHistoryTable.js +23 -0
- package/dist/features/orders/components/RefundRequestView.d.ts +8 -0
- package/dist/features/orders/components/RefundRequestView.js +42 -0
- package/dist/features/orders/components/index.d.ts +6 -0
- package/dist/features/orders/components/index.js +3 -0
- package/dist/features/orders/index.d.ts +1 -0
- package/dist/features/orders/index.js +2 -0
- package/dist/features/orders/repository/orders.repository.d.ts +20 -1
- package/dist/features/orders/repository/orders.repository.js +30 -1
- package/dist/features/orders/schemas/firestore.d.ts +63 -13
- package/dist/features/orders/schemas/firestore.js +5 -5
- package/dist/features/orders/schemas/index.d.ts +4 -4
- package/dist/features/orders/types/index.d.ts +12 -2
- package/dist/features/orders/utils/bundle-grouping.d.ts +48 -0
- package/dist/features/orders/utils/bundle-grouping.js +54 -0
- package/dist/features/orders/utils/order-splitter.d.ts +9 -10
- package/dist/features/orders/utils/order-splitter.js +24 -30
- package/dist/features/payments/repository/payout.repository.d.ts +17 -1
- package/dist/features/payments/repository/payout.repository.js +47 -0
- package/dist/features/payments/schemas/firestore.d.ts +26 -0
- package/dist/features/pre-orders/components/PreorderCard.d.ts +4 -1
- package/dist/features/pre-orders/components/PreorderCard.js +8 -6
- package/dist/features/products/actions/product-actions.d.ts +1 -1
- package/dist/features/products/actions/product-actions.js +1 -1
- package/dist/features/products/components/CompareOverlay.d.ts +2 -2
- package/dist/features/products/components/CompareOverlay.js +4 -4
- package/dist/features/products/components/InteractiveProductCard.js +7 -12
- package/dist/features/products/components/NonRefundableConsentModal.d.ts +1 -1
- package/dist/features/products/components/NonRefundableConsentModal.js +0 -10
- package/dist/features/products/components/ProductGrid.js +28 -12
- package/dist/features/products/components/ShowGroupSection.js +3 -3
- package/dist/features/products/components/SublistingCarouselSection.js +2 -2
- package/dist/features/products/components/index.d.ts +0 -4
- package/dist/features/products/components/index.js +5 -2
- package/dist/features/products/index.d.ts +1 -1
- package/dist/features/products/index.js +3 -1
- package/dist/features/products/repository/products.repository.js +4 -0
- package/dist/features/products/schemas/catalog-product.d.ts +70 -0
- package/dist/features/products/schemas/catalog-product.js +50 -0
- package/dist/features/products/schemas/firestore.d.ts +110 -2
- package/dist/features/products/schemas/firestore.js +30 -0
- package/dist/features/products/schemas/index.d.ts +8 -8
- package/dist/features/products/types/index.d.ts +1 -1
- package/dist/features/products/utils/listing-type.d.ts +9 -0
- package/dist/features/products/utils/listing-type.js +4 -0
- package/dist/features/promotions/actions/coupon-actions.d.ts +2 -2
- package/dist/features/promotions/actions/coupon-actions.js +1 -1
- package/dist/features/promotions/components/CouponCard.d.ts +28 -10
- package/dist/features/promotions/components/CouponCard.js +116 -14
- package/dist/features/promotions/hooks/useCouponValidate.d.ts +1 -1
- package/dist/features/promotions/repository/coupons.repository.d.ts +1 -1
- package/dist/features/reviews/schemas/index.d.ts +2 -2
- package/dist/features/search/schemas/index.d.ts +2 -2
- package/dist/features/search/types/index.d.ts +2 -2
- package/dist/features/seller/components/SellerAuctionsView.js +4 -5
- package/dist/features/seller/components/SellerBidsView.js +5 -13
- package/dist/features/seller/components/SellerCouponsView.js +31 -67
- package/dist/features/seller/components/SellerOffersView.js +4 -5
- package/dist/features/seller/components/SellerOrdersView.js +4 -5
- package/dist/features/seller/components/SellerPayoutsView.js +4 -5
- package/dist/features/seller/components/SellerPreOrdersView.d.ts +4 -0
- package/dist/features/seller/components/SellerPreOrdersView.js +141 -0
- package/dist/features/seller/components/SellerPrizeDrawsView.d.ts +4 -0
- package/dist/features/seller/components/SellerPrizeDrawsView.js +138 -0
- package/dist/features/seller/components/SellerProductsView.js +4 -8
- package/dist/features/seller/components/index.d.ts +4 -0
- package/dist/features/seller/components/index.js +2 -0
- package/dist/features/seller/schemas/index.d.ts +2 -2
- package/dist/features/stores/actions/store-address-actions.d.ts +10 -6
- package/dist/features/stores/actions/store-address-actions.js +8 -7
- package/dist/features/stores/components/InteractiveStoreCard.js +3 -10
- package/dist/features/stores/components/StoreDetailLayoutView.js +20 -5
- package/dist/features/stores/schemas/firestore.d.ts +45 -38
- package/dist/features/stores/schemas/firestore.js +2 -49
- package/dist/features/stores/server.d.ts +0 -1
- package/dist/features/stores/server.js +2 -1
- package/dist/features/wishlist/hooks/useWishlistCount.d.ts +7 -9
- package/dist/features/wishlist/hooks/useWishlistCount.js +67 -86
- package/dist/features/wishlist/types/index.d.ts +1 -1
- package/dist/index.d.ts +56 -9
- package/dist/index.js +66 -11
- package/dist/next/routing/route-map.d.ts +6 -0
- package/dist/next/routing/route-map.js +4 -0
- package/dist/providers/db-firebase/admin.d.ts +6 -2
- package/dist/providers/db-firebase/admin.js +23 -0
- package/dist/repositories/index.d.ts +1 -2
- package/dist/repositories/index.js +5 -2
- package/dist/security/authorization.d.ts +2 -1
- package/dist/security/authorization.js +3 -2
- package/dist/seed/actions/demo-seed-actions.d.ts +1 -1
- package/dist/seed/bids-seed-data.d.ts +2 -2
- package/dist/seed/bids-seed-data.js +77 -2
- package/dist/seed/cart-seed-data.d.ts +10 -10
- package/dist/seed/cart-seed-data.js +15 -15
- package/dist/seed/events-seed-data.js +77 -0
- package/dist/seed/manifest.js +16 -8
- package/dist/seed/orders-seed-data.js +41 -2
- package/dist/seed/payouts-seed-data.js +18 -2
- package/dist/seed/stores-seed-data.js +55 -0
- package/dist/server-entry.d.ts +1 -0
- package/dist/server-entry.js +2 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.js +8 -0
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/components/FilterChipGroup.d.ts +39 -0
- package/dist/ui/components/FilterChipGroup.js +15 -0
- package/dist/ui/components/HorizontalScroller.js +32 -7
- package/dist/ui/components/HorizontalScroller.style.css +6 -0
- package/dist/ui/components/SiteLogo.js +1 -1
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +2 -0
- package/dist/utils/id-generators.d.ts +11 -0
- package/dist/utils/id-generators.js +16 -0
- package/package.json +1 -1
- package/dist/_internal/shared/features/bundles/config.d.ts +0 -6
- package/dist/_internal/shared/features/bundles/config.js +0 -6
- package/dist/_internal/shared/schema-versions.d.ts +0 -76
- package/dist/_internal/shared/schema-versions.js +0 -82
- package/dist/features/account/migrations.d.ts +0 -2
- package/dist/features/account/migrations.js +0 -10
- package/dist/features/admin/migrations.d.ts +0 -2
- package/dist/features/admin/migrations.js +0 -10
- package/dist/features/auctions/migrations.d.ts +0 -2
- package/dist/features/auctions/migrations.js +0 -10
- package/dist/features/auth/migrations.d.ts +0 -2
- package/dist/features/auth/migrations.js +0 -10
- package/dist/features/blog/migrations.d.ts +0 -2
- package/dist/features/blog/migrations.js +0 -10
- package/dist/features/brands/actions/brand-actions.d.ts +0 -2
- package/dist/features/brands/actions/brand-actions.js +0 -5
- package/dist/features/brands/index.d.ts +0 -3
- package/dist/features/brands/index.js +0 -3
- package/dist/features/brands/migrations.d.ts +0 -2
- package/dist/features/brands/migrations.js +0 -10
- package/dist/features/brands/repository/brands.repository.d.ts +0 -13
- package/dist/features/brands/repository/brands.repository.js +0 -60
- package/dist/features/brands/schemas/index.d.ts +0 -33
- package/dist/features/brands/schemas/index.js +0 -15
- package/dist/features/brands/server.d.ts +0 -7
- package/dist/features/brands/server.js +0 -7
- package/dist/features/bundles/components/AdminBundleEditorView.d.ts +0 -8
- package/dist/features/bundles/components/AdminBundleEditorView.js +0 -7
- package/dist/features/bundles/components/BundleDetailPageView.d.ts +0 -9
- package/dist/features/bundles/components/BundleDetailPageView.js +0 -45
- package/dist/features/bundles/components/BundleForm.d.ts +0 -12
- package/dist/features/bundles/components/BundleForm.js +0 -126
- package/dist/features/bundles/components/BundleItemsPicker.d.ts +0 -9
- package/dist/features/bundles/components/BundleItemsPicker.js +0 -77
- package/dist/features/bundles/components/BundlesByCategoryListing.d.ts +0 -6
- package/dist/features/bundles/components/BundlesByCategoryListing.js +0 -50
- package/dist/features/bundles/components/BundlesListingView.d.ts +0 -17
- package/dist/features/bundles/components/BundlesListingView.js +0 -50
- package/dist/features/bundles/components/FeaturedBundlesSection.d.ts +0 -5
- package/dist/features/bundles/components/FeaturedBundlesSection.js +0 -55
- package/dist/features/bundles/components/SellerBundleCreateView.d.ts +0 -8
- package/dist/features/bundles/components/SellerBundleCreateView.js +0 -7
- package/dist/features/bundles/components/SellerBundleEditView.d.ts +0 -9
- package/dist/features/bundles/components/SellerBundleEditView.js +0 -7
- package/dist/features/bundles/components/index.d.ts +0 -18
- package/dist/features/bundles/components/index.js +0 -9
- package/dist/features/bundles/constants/index.d.ts +0 -32
- package/dist/features/bundles/constants/index.js +0 -35
- package/dist/features/bundles/index.d.ts +0 -2
- package/dist/features/bundles/index.js +0 -2
- package/dist/features/bundles/migrations.d.ts +0 -2
- package/dist/features/bundles/migrations.js +0 -10
- package/dist/features/bundles/repository/bundles.repository.d.ts +0 -36
- package/dist/features/bundles/repository/bundles.repository.js +0 -148
- package/dist/features/bundles/repository/index.d.ts +0 -1
- package/dist/features/bundles/repository/index.js +0 -1
- package/dist/features/bundles/schemas/firestore.d.ts +0 -88
- package/dist/features/bundles/schemas/firestore.js +0 -29
- package/dist/features/bundles/schemas/zod.d.ts +0 -377
- package/dist/features/bundles/schemas/zod.js +0 -71
- package/dist/features/cart/migrations.d.ts +0 -2
- package/dist/features/cart/migrations.js +0 -10
- package/dist/features/categories/migrations.d.ts +0 -2
- package/dist/features/categories/migrations.js +0 -10
- package/dist/features/events/migrations.d.ts +0 -2
- package/dist/features/events/migrations.js +0 -10
- package/dist/features/faq/migrations.d.ts +0 -2
- package/dist/features/faq/migrations.js +0 -10
- package/dist/features/grouped/migrations.d.ts +0 -2
- package/dist/features/grouped/migrations.js +0 -10
- package/dist/features/history/migrations.d.ts +0 -2
- package/dist/features/history/migrations.js +0 -10
- package/dist/features/messages/migrations.d.ts +0 -2
- package/dist/features/messages/migrations.js +0 -10
- package/dist/features/orders/migrations.d.ts +0 -2
- package/dist/features/orders/migrations.js +0 -10
- package/dist/features/payments/migrations.d.ts +0 -2
- package/dist/features/payments/migrations.js +0 -10
- package/dist/features/products/migrations.d.ts +0 -2
- package/dist/features/products/migrations.js +0 -10
- package/dist/features/products/repository/sublisting-categories.repository.d.ts +0 -16
- package/dist/features/products/repository/sublisting-categories.repository.js +0 -126
- package/dist/features/products/schemas/sublisting-categories.d.ts +0 -45
- package/dist/features/products/schemas/sublisting-categories.js +0 -16
- package/dist/features/promotions/migrations.d.ts +0 -2
- package/dist/features/promotions/migrations.js +0 -10
- package/dist/features/reviews/migrations.d.ts +0 -2
- package/dist/features/reviews/migrations.js +0 -10
- package/dist/features/scams/migrations.d.ts +0 -2
- package/dist/features/scams/migrations.js +0 -10
- package/dist/features/seller/migrations.d.ts +0 -2
- package/dist/features/seller/migrations.js +0 -10
- package/dist/features/stores/migrations.d.ts +0 -2
- package/dist/features/stores/migrations.js +0 -10
- package/dist/features/sublisting/migrations.d.ts +0 -2
- package/dist/features/sublisting/migrations.js +0 -10
- package/dist/features/sublisting/schemas/firestore.d.ts +0 -32
- package/dist/features/sublisting/schemas/firestore.js +0 -19
- package/dist/features/support/migrations.d.ts +0 -2
- package/dist/features/support/migrations.js +0 -10
- package/dist/features/wishlist/migrations.d.ts +0 -2
- package/dist/features/wishlist/migrations.js +0 -10
- package/dist/seed/_bundle-constants.d.ts +0 -14
- package/dist/seed/_bundle-constants.js +0 -14
- package/dist/seed/anime-figures-seed-data.d.ts +0 -8
- package/dist/seed/anime-figures-seed-data.js +0 -1033
- package/dist/seed/beyblade-seed-data.d.ts +0 -7
- package/dist/seed/beyblade-seed-data.js +0 -1129
- package/dist/seed/brands-seed-data.d.ts +0 -7
- package/dist/seed/brands-seed-data.js +0 -410
- package/dist/seed/bundles-seed-data.d.ts +0 -13
- package/dist/seed/bundles-seed-data.js +0 -229
- package/dist/seed/cosplay-accessories-seed-data.d.ts +0 -8
- package/dist/seed/cosplay-accessories-seed-data.js +0 -647
- package/dist/seed/hot-wheels-seed-data.d.ts +0 -7
- package/dist/seed/hot-wheels-seed-data.js +0 -1612
- package/dist/seed/letitrip-official-seed-data.d.ts +0 -8
- package/dist/seed/letitrip-official-seed-data.js +0 -399
- package/dist/seed/pokemon-carousel-slides-seed-data.d.ts +0 -8
- package/dist/seed/pokemon-carousel-slides-seed-data.js +0 -322
- package/dist/seed/pokemon-categories-seed-data.d.ts +0 -24
- package/dist/seed/pokemon-categories-seed-data.js +0 -547
- package/dist/seed/pokemon-coupons-seed-data.d.ts +0 -6
- package/dist/seed/pokemon-coupons-seed-data.js +0 -465
- package/dist/seed/pokemon-homepage-sections-seed-data.d.ts +0 -7
- package/dist/seed/pokemon-homepage-sections-seed-data.js +0 -241
- package/dist/seed/pokemon-products-seed-data.d.ts +0 -9
- package/dist/seed/pokemon-products-seed-data.js +0 -1791
- package/dist/seed/pokemon-seed-bundle.d.ts +0 -47
- package/dist/seed/pokemon-seed-bundle.js +0 -71
- package/dist/seed/pokemon-stores-seed-data.d.ts +0 -6
- package/dist/seed/pokemon-stores-seed-data.js +0 -179
- package/dist/seed/pokemon-users-seed-data.d.ts +0 -6
- package/dist/seed/pokemon-users-seed-data.js +0 -521
- package/dist/seed/products-seed-data.d.ts +0 -6
- package/dist/seed/products-seed-data.js +0 -2530
- package/dist/seed/retro-gaming-seed-data.d.ts +0 -8
- package/dist/seed/retro-gaming-seed-data.js +0 -801
- package/dist/seed/server.d.ts +0 -2
- package/dist/seed/server.js +0 -7
- package/dist/seed/sublisting-categories-seed-data.d.ts +0 -7
- package/dist/seed/sublisting-categories-seed-data.js +0 -159
- package/dist/seed/transformers-seed-data.d.ts +0 -7
- package/dist/seed/transformers-seed-data.js +0 -530
|
@@ -401,6 +401,10 @@ export class ProductRepository extends BaseRepository {
|
|
|
401
401
|
batch.update(this.db.collection(this.collection).doc(productId), {
|
|
402
402
|
currentBid,
|
|
403
403
|
bidCount: increment(1),
|
|
404
|
+
// SB-UNI-H 2026-05-13 — flip `bidsHaveStarted` when any bid lands.
|
|
405
|
+
// Idempotent on subsequent bids; the BIN button is hidden by the PDP
|
|
406
|
+
// as soon as this is true (eBay-style hybrid auction rule).
|
|
407
|
+
bidsHaveStarted: true,
|
|
404
408
|
updatedAt: serverTimestamp(),
|
|
405
409
|
});
|
|
406
410
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Catalog Product schema — SB-UNI-L Phase 4 foundation slice 2026-05-13.
|
|
3
|
+
*
|
|
4
|
+
* Splits the per-seller `ProductDocument` (now `SellerOfferDocument` in
|
|
5
|
+
* spirit — see the optional `catalogProductId` link added in firestore.ts)
|
|
6
|
+
* out from a shared catalog row that aggregates N offers for the same SKU.
|
|
7
|
+
*
|
|
8
|
+
* Two modes per offer:
|
|
9
|
+
* 1. catalog-linked — `SellerOffer.catalogProductId` points at a
|
|
10
|
+
* `CatalogProductDocument`. The PDP at `/catalog/{slug}` aggregates
|
|
11
|
+
* every offer linked to the catalog row; sellers compete on price/
|
|
12
|
+
* condition. Used for graded cards, sealed boxes, mass-produced toys.
|
|
13
|
+
* 2. standalone — `catalogProductId` is undefined. PDP renders at
|
|
14
|
+
* `/products/{slug}` (the current path). Used for one-of-a-kind items
|
|
15
|
+
* (custom dioramas, signed memorabilia, prototypes).
|
|
16
|
+
*
|
|
17
|
+
* The full PDP routing + admin "Promote to catalog" workflow lands in the
|
|
18
|
+
* Phase 4 second cohort. This file is the schema foundation — types, slug
|
|
19
|
+
* prefix, capability flag — so consumers can start writing against the
|
|
20
|
+
* shape today.
|
|
21
|
+
*/
|
|
22
|
+
import type { GradingService, ProductCardMetadata } from "./firestore";
|
|
23
|
+
/** Identifier types attached to a catalog row for SKU-level deduplication. */
|
|
24
|
+
export interface CatalogIdentifiers {
|
|
25
|
+
/** Industry standard SKU. */
|
|
26
|
+
gtin?: string;
|
|
27
|
+
/** Manufacturer part number. */
|
|
28
|
+
mpn?: string;
|
|
29
|
+
/** Internal catalog id (e.g. TCGPlayer product id). */
|
|
30
|
+
externalId?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Top-level catalog row. One per SKU; offers link via `catalogProductId`.
|
|
34
|
+
*
|
|
35
|
+
* Slug prefix: `catalog-{slug}` (added to CLAUDE.md table by this commit).
|
|
36
|
+
*/
|
|
37
|
+
export interface CatalogProductDocument {
|
|
38
|
+
id: string;
|
|
39
|
+
slug: string;
|
|
40
|
+
title: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
brandSlug?: string;
|
|
43
|
+
categorySlug?: string;
|
|
44
|
+
/** Card metadata reused from the per-offer schema for indexing parity. */
|
|
45
|
+
card?: ProductCardMetadata;
|
|
46
|
+
/** Optional grading service if the catalog row tracks slabs. */
|
|
47
|
+
gradingService?: GradingService;
|
|
48
|
+
/** Canonical images shared by all linked offers. */
|
|
49
|
+
images: string[];
|
|
50
|
+
/** Catalog-level identifiers (GTIN / MPN / external). */
|
|
51
|
+
identifiers?: CatalogIdentifiers;
|
|
52
|
+
/** Denormalised — count of active offers linking to this catalog row. */
|
|
53
|
+
offerCount: number;
|
|
54
|
+
/** Denormalised — minimum priceInPaise across active linked offers. */
|
|
55
|
+
minOfferPriceInPaise?: number;
|
|
56
|
+
/** Catalog is searchable / showable on `/catalog/{slug}`. */
|
|
57
|
+
isActive: boolean;
|
|
58
|
+
createdAt: Date;
|
|
59
|
+
updatedAt: Date;
|
|
60
|
+
/** Admin who promoted this catalog from an offer (audit trail). */
|
|
61
|
+
promotedBy?: string;
|
|
62
|
+
}
|
|
63
|
+
export declare const CATALOG_COLLECTION: "catalogProducts";
|
|
64
|
+
export declare const CATALOG_PUBLIC_FIELDS: readonly ["id", "slug", "title", "description", "brandSlug", "categorySlug", "card", "gradingService", "images", "identifiers", "offerCount", "minOfferPriceInPaise", "isActive", "createdAt", "updatedAt"];
|
|
65
|
+
export declare const CATALOG_UPDATABLE_FIELDS: readonly ["title", "description", "brandSlug", "categorySlug", "card", "gradingService", "images", "identifiers", "isActive"];
|
|
66
|
+
export type CatalogProductCreateInput = Omit<CatalogProductDocument, "id" | "createdAt" | "updatedAt" | "offerCount" | "minOfferPriceInPaise"> & {
|
|
67
|
+
offerCount?: number;
|
|
68
|
+
minOfferPriceInPaise?: number;
|
|
69
|
+
};
|
|
70
|
+
export type CatalogProductUpdateInput = Partial<Pick<CatalogProductDocument, (typeof CATALOG_UPDATABLE_FIELDS)[number]>>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Catalog Product schema — SB-UNI-L Phase 4 foundation slice 2026-05-13.
|
|
3
|
+
*
|
|
4
|
+
* Splits the per-seller `ProductDocument` (now `SellerOfferDocument` in
|
|
5
|
+
* spirit — see the optional `catalogProductId` link added in firestore.ts)
|
|
6
|
+
* out from a shared catalog row that aggregates N offers for the same SKU.
|
|
7
|
+
*
|
|
8
|
+
* Two modes per offer:
|
|
9
|
+
* 1. catalog-linked — `SellerOffer.catalogProductId` points at a
|
|
10
|
+
* `CatalogProductDocument`. The PDP at `/catalog/{slug}` aggregates
|
|
11
|
+
* every offer linked to the catalog row; sellers compete on price/
|
|
12
|
+
* condition. Used for graded cards, sealed boxes, mass-produced toys.
|
|
13
|
+
* 2. standalone — `catalogProductId` is undefined. PDP renders at
|
|
14
|
+
* `/products/{slug}` (the current path). Used for one-of-a-kind items
|
|
15
|
+
* (custom dioramas, signed memorabilia, prototypes).
|
|
16
|
+
*
|
|
17
|
+
* The full PDP routing + admin "Promote to catalog" workflow lands in the
|
|
18
|
+
* Phase 4 second cohort. This file is the schema foundation — types, slug
|
|
19
|
+
* prefix, capability flag — so consumers can start writing against the
|
|
20
|
+
* shape today.
|
|
21
|
+
*/
|
|
22
|
+
export const CATALOG_COLLECTION = "catalogProducts";
|
|
23
|
+
export const CATALOG_PUBLIC_FIELDS = [
|
|
24
|
+
"id",
|
|
25
|
+
"slug",
|
|
26
|
+
"title",
|
|
27
|
+
"description",
|
|
28
|
+
"brandSlug",
|
|
29
|
+
"categorySlug",
|
|
30
|
+
"card",
|
|
31
|
+
"gradingService",
|
|
32
|
+
"images",
|
|
33
|
+
"identifiers",
|
|
34
|
+
"offerCount",
|
|
35
|
+
"minOfferPriceInPaise",
|
|
36
|
+
"isActive",
|
|
37
|
+
"createdAt",
|
|
38
|
+
"updatedAt",
|
|
39
|
+
];
|
|
40
|
+
export const CATALOG_UPDATABLE_FIELDS = [
|
|
41
|
+
"title",
|
|
42
|
+
"description",
|
|
43
|
+
"brandSlug",
|
|
44
|
+
"categorySlug",
|
|
45
|
+
"card",
|
|
46
|
+
"gradingService",
|
|
47
|
+
"images",
|
|
48
|
+
"identifiers",
|
|
49
|
+
"isActive",
|
|
50
|
+
];
|
|
@@ -30,6 +30,79 @@ export interface CustomSection {
|
|
|
30
30
|
text?: string;
|
|
31
31
|
fields?: CustomField[];
|
|
32
32
|
}
|
|
33
|
+
export type GradingService = "PSA" | "BGS" | "CGC" | "SGC" | "OTHER";
|
|
34
|
+
export interface ProductGrading {
|
|
35
|
+
/** Grading service (PSA / BGS / CGC / SGC / OTHER) — sortable index field. */
|
|
36
|
+
service: GradingService;
|
|
37
|
+
/** Numeric grade out of 10 (BGS uses 0.5 increments; PSA/CGC integer). */
|
|
38
|
+
grade: number;
|
|
39
|
+
/** Slab cert number (PSA cert lookup URL is built from this client-side). */
|
|
40
|
+
certNumber?: string;
|
|
41
|
+
/** Slab/grade image media slug (uploaded via the signed-URL flow). */
|
|
42
|
+
slabImageMedia?: string;
|
|
43
|
+
/** Free-form key/value attrs (e.g. autograph=yes, subgrades=9.5/10/10/9.5). */
|
|
44
|
+
attributes?: Record<string, string>;
|
|
45
|
+
}
|
|
46
|
+
export interface ProductCardMetadata {
|
|
47
|
+
/** TCG set name (e.g. "Pokémon Base Set"). */
|
|
48
|
+
setName: string;
|
|
49
|
+
/** Year the set was published. */
|
|
50
|
+
setYear?: number;
|
|
51
|
+
/** Card number within the set (e.g. "108/120"). */
|
|
52
|
+
cardNumber?: string;
|
|
53
|
+
/** Rarity tier (Common / Uncommon / Rare / Holo / etc — free-form). */
|
|
54
|
+
rarity?: string;
|
|
55
|
+
/** Card language (en, jp, etc). */
|
|
56
|
+
language?: string;
|
|
57
|
+
}
|
|
58
|
+
export interface ProductClassifiedMeta {
|
|
59
|
+
/** Where the item is — drives the (listingType, classified.meetupArea.city, createdAt) index. */
|
|
60
|
+
meetupArea: {
|
|
61
|
+
city: string;
|
|
62
|
+
locality?: string;
|
|
63
|
+
pincode?: string;
|
|
64
|
+
};
|
|
65
|
+
/** How the buyer reaches the seller (chat | phone | both). */
|
|
66
|
+
contactMethod?: "chat" | "phone" | "both";
|
|
67
|
+
/** Seller offers shipping in addition to meetup. */
|
|
68
|
+
acceptsShipping?: boolean;
|
|
69
|
+
/** Price is negotiable — UI hints "₹X (negotiable)". */
|
|
70
|
+
negotiable?: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface ProductDigitalCodeMeta {
|
|
73
|
+
/** How the code is fulfilled — claim-at-paid / manual-via-email / etc. */
|
|
74
|
+
codeDeliveryMethod: "auto-claim" | "manual-email";
|
|
75
|
+
/** Total codes in the pool — operational view. */
|
|
76
|
+
codePoolSize?: number;
|
|
77
|
+
/** Atomic counter decremented on claim; never goes negative. */
|
|
78
|
+
codesAvailable?: number;
|
|
79
|
+
/** Free-form redemption instructions surfaced on the order detail page. */
|
|
80
|
+
redemptionInstructions?: string;
|
|
81
|
+
/** Codes expire at — orders past this point reject claim. */
|
|
82
|
+
expiresAt?: Date;
|
|
83
|
+
}
|
|
84
|
+
export interface ProductLiveItemMeta {
|
|
85
|
+
/** Species or cultivar name (taxonomic where applicable). */
|
|
86
|
+
species: string;
|
|
87
|
+
/** Animal/plant age in months at the time of listing. */
|
|
88
|
+
ageMonths?: number;
|
|
89
|
+
/** Biological sex / not-applicable. */
|
|
90
|
+
sex?: "male" | "female" | "unknown" | "n/a";
|
|
91
|
+
/** Free-form care instructions surfaced at checkout consent. */
|
|
92
|
+
careInfo?: string;
|
|
93
|
+
/** Transport details — carrier method, fees, insurance flag. */
|
|
94
|
+
transport: {
|
|
95
|
+
method: "courier" | "in-person" | "specialist";
|
|
96
|
+
handlingFeeInPaise?: number;
|
|
97
|
+
insuranceIncluded?: boolean;
|
|
98
|
+
};
|
|
99
|
+
/** Allowed buyer-state ISO 3166-2 codes (e.g. "IN-MH"). */
|
|
100
|
+
jurisdictionAllowed: string[];
|
|
101
|
+
/** Set by admin verification workflow — gate for listing creation. */
|
|
102
|
+
vendorVerified?: boolean;
|
|
103
|
+
/** CITES permit number (Appendix I/II species). */
|
|
104
|
+
cites?: string;
|
|
105
|
+
}
|
|
33
106
|
export interface ProductDocument {
|
|
34
107
|
id: string;
|
|
35
108
|
title: string;
|
|
@@ -74,6 +147,14 @@ export interface ProductDocument {
|
|
|
74
147
|
auctionExtensionMinutes?: number;
|
|
75
148
|
auctionOriginalEndDate?: Date;
|
|
76
149
|
auctionShippingPaidBy?: "seller" | "winner";
|
|
150
|
+
buyItNowPriceInPaise?: number;
|
|
151
|
+
bidsHaveStarted?: boolean;
|
|
152
|
+
grading?: ProductGrading;
|
|
153
|
+
card?: ProductCardMetadata;
|
|
154
|
+
classified?: ProductClassifiedMeta;
|
|
155
|
+
digitalCode?: ProductDigitalCodeMeta;
|
|
156
|
+
liveItem?: ProductLiveItemMeta;
|
|
157
|
+
catalogProductId?: string;
|
|
77
158
|
preOrderDeliveryDate?: Date;
|
|
78
159
|
preOrderDepositPercent?: number;
|
|
79
160
|
preOrderDepositAmount?: number;
|
|
@@ -127,6 +208,28 @@ export interface ProductDocument {
|
|
|
127
208
|
prizeRevealDeadlineDays?: number;
|
|
128
209
|
/** Public proof-of-fairness file (commit-reveal scheme). */
|
|
129
210
|
prizeGithubFileUrl?: string;
|
|
211
|
+
/**
|
|
212
|
+
* Optional per-item shipping constraints. When absent the store's
|
|
213
|
+
* shippingConfig applies unchanged.
|
|
214
|
+
*/
|
|
215
|
+
shipping?: {
|
|
216
|
+
/**
|
|
217
|
+
* Restrict this item to a subset of the store's providers
|
|
218
|
+
* (e.g. heavy item not eligible for store-pickup).
|
|
219
|
+
*/
|
|
220
|
+
allowedProviderIds?: string[];
|
|
221
|
+
/**
|
|
222
|
+
* Per-provider fee / ETA overrides for this item (e.g. oversized surcharge).
|
|
223
|
+
* Merged on top of the provider's store-wide config when displaying the
|
|
224
|
+
* ShippingPicker.
|
|
225
|
+
*/
|
|
226
|
+
overrides?: Array<{
|
|
227
|
+
providerId: string;
|
|
228
|
+
feeInPaise?: number;
|
|
229
|
+
etaDaysMin?: number;
|
|
230
|
+
etaDaysMax?: number;
|
|
231
|
+
}>;
|
|
232
|
+
};
|
|
130
233
|
createdAt: Date;
|
|
131
234
|
updatedAt: Date;
|
|
132
235
|
}
|
|
@@ -160,8 +263,8 @@ export declare const ProductStatusValues: {
|
|
|
160
263
|
export declare const PRODUCT_COLLECTION: "products";
|
|
161
264
|
export declare const PRODUCT_INDEXED_FIELDS: readonly ["storeId", "status", "category", "featured", "listingType", "isPromoted", "isOnSale", "isSold", "createdAt"];
|
|
162
265
|
export declare const DEFAULT_PRODUCT_DATA: Partial<ProductDocument>;
|
|
163
|
-
export declare const PRODUCT_PUBLIC_FIELDS: readonly ["id", "title", "description", "category", "subcategory", "brand", "price", "currency", "stockQuantity", "availableQuantity", "images", "status", "storeName", "featured", "tags", "specifications", "features", "shippingInfo", "returnPolicy", "listingType", "auctionEndDate", "startingBid", "currentBid", "bidCount", "reservePrice", "buyNowPrice", "minBidIncrement", "autoExtendable", "auctionExtensionMinutes", "auctionShippingPaidBy", "preOrderDeliveryDate", "preOrderDepositPercent", "preOrderDepositAmount", "preOrderMaxQuantity", "preOrderCurrentCount", "preOrderProductionStatus", "preOrderCancellable", "condition", "insurance", "insuranceCost", "shippingPaidBy", "isPromoted", "isOnSale", "isSold", "slug", "seoTitle", "seoDescription", "seoKeywords", "viewCount", "customFields", "customSections", "sublistingCategoryId", "groupId", "isGroupParent", "groupParentSlug", "groupChildSlugs", "groupTitle", "createdAt"];
|
|
164
|
-
export declare const PRODUCT_UPDATABLE_FIELDS: readonly ["title", "description", "category", "subcategory", "brand", "price", "stockQuantity", "images", "status", "tags", "specifications", "features", "shippingInfo", "returnPolicy", "pickupAddressId", "condition", "insurance", "shippingPaidBy", "autoExtendable", "auctionExtensionMinutes", "auctionShippingPaidBy", "reservePrice", "buyNowPrice", "minBidIncrement", "listingType", "preOrderDeliveryDate", "preOrderDepositPercent", "preOrderDepositAmount", "preOrderMaxQuantity", "preOrderProductionStatus", "preOrderCancellable", "isOnSale", "isSold", "seoTitle", "seoDescription", "seoKeywords", "customFields", "customSections", "sublistingCategoryId", "groupId", "isGroupParent", "groupParentSlug", "groupChildSlugs", "groupTitle"];
|
|
266
|
+
export declare const PRODUCT_PUBLIC_FIELDS: readonly ["id", "title", "description", "category", "subcategory", "brand", "price", "currency", "stockQuantity", "availableQuantity", "images", "status", "storeName", "featured", "tags", "specifications", "features", "shippingInfo", "returnPolicy", "listingType", "auctionEndDate", "startingBid", "currentBid", "bidCount", "reservePrice", "buyNowPrice", "minBidIncrement", "autoExtendable", "auctionExtensionMinutes", "auctionShippingPaidBy", "buyItNowPriceInPaise", "bidsHaveStarted", "grading", "card", "classified", "digitalCode", "liveItem", "catalogProductId", "preOrderDeliveryDate", "preOrderDepositPercent", "preOrderDepositAmount", "preOrderMaxQuantity", "preOrderCurrentCount", "preOrderProductionStatus", "preOrderCancellable", "condition", "insurance", "insuranceCost", "shippingPaidBy", "isPromoted", "isOnSale", "isSold", "slug", "seoTitle", "seoDescription", "seoKeywords", "viewCount", "customFields", "customSections", "sublistingCategoryId", "groupId", "isGroupParent", "groupParentSlug", "groupChildSlugs", "groupTitle", "createdAt"];
|
|
267
|
+
export declare const PRODUCT_UPDATABLE_FIELDS: readonly ["title", "description", "category", "subcategory", "brand", "price", "stockQuantity", "images", "status", "tags", "specifications", "features", "shippingInfo", "returnPolicy", "pickupAddressId", "condition", "insurance", "shippingPaidBy", "autoExtendable", "auctionExtensionMinutes", "auctionShippingPaidBy", "reservePrice", "buyNowPrice", "minBidIncrement", "buyItNowPriceInPaise", "bidsHaveStarted", "grading", "card", "classified", "digitalCode", "liveItem", "catalogProductId", "listingType", "preOrderDeliveryDate", "preOrderDepositPercent", "preOrderDepositAmount", "preOrderMaxQuantity", "preOrderProductionStatus", "preOrderCancellable", "isOnSale", "isSold", "seoTitle", "seoDescription", "seoKeywords", "customFields", "customSections", "sublistingCategoryId", "groupId", "isGroupParent", "groupParentSlug", "groupChildSlugs", "groupTitle"];
|
|
165
268
|
export type ProductCreateInput = Omit<ProductDocument, "id" | "createdAt" | "updatedAt" | "availableQuantity" | "bidCount" | "currentBid" | "auctionOriginalEndDate">;
|
|
166
269
|
export type ProductUpdateInput = Partial<Pick<ProductDocument, (typeof PRODUCT_UPDATABLE_FIELDS)[number]>>;
|
|
167
270
|
export type ProductAdminUpdateInput = Partial<Omit<ProductDocument, "id" | "createdAt">>;
|
|
@@ -174,6 +277,11 @@ export declare const productQueryHelpers: {
|
|
|
174
277
|
readonly available: () => readonly ["availableQuantity", ">", 0];
|
|
175
278
|
readonly auctions: () => readonly ["listingType", "==", "auction"];
|
|
176
279
|
readonly preOrders: () => readonly ["listingType", "==", "pre-order"];
|
|
280
|
+
readonly prizeDraws: () => readonly ["listingType", "==", "prize-draw"];
|
|
281
|
+
readonly standardListings: () => readonly ["listingType", "==", "standard"];
|
|
282
|
+
readonly classifieds: () => readonly ["listingType", "==", "classified"];
|
|
283
|
+
readonly digitalCodes: () => readonly ["listingType", "==", "digital-code"];
|
|
284
|
+
readonly liveItems: () => readonly ["listingType", "==", "live"];
|
|
177
285
|
readonly promoted: () => readonly ["isPromoted", "==", true];
|
|
178
286
|
readonly activeAuction: (date: Date) => readonly ["auctionEndDate", ">=", Date];
|
|
179
287
|
};
|
|
@@ -76,6 +76,18 @@ export const PRODUCT_PUBLIC_FIELDS = [
|
|
|
76
76
|
"autoExtendable",
|
|
77
77
|
"auctionExtensionMinutes",
|
|
78
78
|
"auctionShippingPaidBy",
|
|
79
|
+
// SB-UNI-H 2026-05-13 — eBay hybrid BIN.
|
|
80
|
+
"buyItNowPriceInPaise",
|
|
81
|
+
"bidsHaveStarted",
|
|
82
|
+
// SB-UNI-G 2026-05-13 — TCGPlayer grading + card metadata.
|
|
83
|
+
"grading",
|
|
84
|
+
"card",
|
|
85
|
+
// SB-UNI-I / J / K 2026-05-13 — per-type field blocks.
|
|
86
|
+
"classified",
|
|
87
|
+
"digitalCode",
|
|
88
|
+
"liveItem",
|
|
89
|
+
// SB-UNI-L 2026-05-13 — catalog link (offer-side reference).
|
|
90
|
+
"catalogProductId",
|
|
79
91
|
"preOrderDeliveryDate",
|
|
80
92
|
"preOrderDepositPercent",
|
|
81
93
|
"preOrderDepositAmount",
|
|
@@ -130,6 +142,18 @@ export const PRODUCT_UPDATABLE_FIELDS = [
|
|
|
130
142
|
"reservePrice",
|
|
131
143
|
"buyNowPrice",
|
|
132
144
|
"minBidIncrement",
|
|
145
|
+
// SB-UNI-H 2026-05-13 — eBay hybrid BIN updatable.
|
|
146
|
+
"buyItNowPriceInPaise",
|
|
147
|
+
"bidsHaveStarted",
|
|
148
|
+
// SB-UNI-G 2026-05-13 — TCGPlayer grading + card metadata updatable.
|
|
149
|
+
"grading",
|
|
150
|
+
"card",
|
|
151
|
+
// SB-UNI-I / J / K 2026-05-13 — per-type field blocks updatable.
|
|
152
|
+
"classified",
|
|
153
|
+
"digitalCode",
|
|
154
|
+
"liveItem",
|
|
155
|
+
// SB-UNI-L 2026-05-13 — catalog link updatable.
|
|
156
|
+
"catalogProductId",
|
|
133
157
|
"listingType",
|
|
134
158
|
"preOrderDeliveryDate",
|
|
135
159
|
"preOrderDepositPercent",
|
|
@@ -160,6 +184,12 @@ export const productQueryHelpers = {
|
|
|
160
184
|
available: () => ["availableQuantity", ">", 0],
|
|
161
185
|
auctions: () => ["listingType", "==", "auction"],
|
|
162
186
|
preOrders: () => ["listingType", "==", "pre-order"],
|
|
187
|
+
prizeDraws: () => ["listingType", "==", "prize-draw"],
|
|
188
|
+
standardListings: () => ["listingType", "==", "standard"],
|
|
189
|
+
// SB-UNI-F 2026-05-13 — Phase 2 query helpers.
|
|
190
|
+
classifieds: () => ["listingType", "==", "classified"],
|
|
191
|
+
digitalCodes: () => ["listingType", "==", "digital-code"],
|
|
192
|
+
liveItems: () => ["listingType", "==", "live"],
|
|
163
193
|
promoted: () => ["isPromoted", "==", true],
|
|
164
194
|
activeAuction: (date) => ["auctionEndDate", ">=", date],
|
|
165
195
|
};
|
|
@@ -308,8 +308,8 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
308
308
|
images?: string[] | undefined;
|
|
309
309
|
rating?: number | undefined;
|
|
310
310
|
description?: string | undefined;
|
|
311
|
+
listingType?: "auction" | "standard" | "pre-order" | "prize-draw" | "bundle" | undefined;
|
|
311
312
|
featured?: boolean | undefined;
|
|
312
|
-
listingType?: "auction" | "standard" | "prize-draw" | "pre-order" | "bundle" | undefined;
|
|
313
313
|
isPromoted?: boolean | undefined;
|
|
314
314
|
slug?: string | undefined;
|
|
315
315
|
subcategory?: string | undefined;
|
|
@@ -326,7 +326,7 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
326
326
|
features?: string[] | undefined;
|
|
327
327
|
shippingInfo?: string | undefined;
|
|
328
328
|
returnPolicy?: string | undefined;
|
|
329
|
-
condition?: "new" | "used" | "refurbished" | "
|
|
329
|
+
condition?: "new" | "used" | "refurbished" | "broken" | "like_new" | "good" | "fair" | "poor" | undefined;
|
|
330
330
|
insurance?: boolean | undefined;
|
|
331
331
|
insuranceCost?: number | undefined;
|
|
332
332
|
shippingPaidBy?: "seller" | "buyer" | undefined;
|
|
@@ -437,8 +437,8 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
437
437
|
images?: string[] | undefined;
|
|
438
438
|
rating?: number | undefined;
|
|
439
439
|
description?: string | undefined;
|
|
440
|
+
listingType?: "auction" | "standard" | "pre-order" | "prize-draw" | "bundle" | undefined;
|
|
440
441
|
featured?: boolean | undefined;
|
|
441
|
-
listingType?: "auction" | "standard" | "prize-draw" | "pre-order" | "bundle" | undefined;
|
|
442
442
|
isPromoted?: boolean | undefined;
|
|
443
443
|
slug?: string | undefined;
|
|
444
444
|
subcategory?: string | undefined;
|
|
@@ -455,7 +455,7 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
455
455
|
features?: string[] | undefined;
|
|
456
456
|
shippingInfo?: string | undefined;
|
|
457
457
|
returnPolicy?: string | undefined;
|
|
458
|
-
condition?: "new" | "used" | "refurbished" | "
|
|
458
|
+
condition?: "new" | "used" | "refurbished" | "broken" | "like_new" | "good" | "fair" | "poor" | undefined;
|
|
459
459
|
insurance?: boolean | undefined;
|
|
460
460
|
insuranceCost?: number | undefined;
|
|
461
461
|
shippingPaidBy?: "seller" | "buyer" | undefined;
|
|
@@ -567,9 +567,9 @@ export declare const productListParamsSchema: z.ZodObject<{
|
|
|
567
567
|
category?: string | undefined;
|
|
568
568
|
minPrice?: number | undefined;
|
|
569
569
|
maxPrice?: number | undefined;
|
|
570
|
+
listingType?: "auction" | "standard" | "pre-order" | "prize-draw" | "bundle" | undefined;
|
|
570
571
|
featured?: boolean | undefined;
|
|
571
|
-
|
|
572
|
-
condition?: "new" | "used" | "refurbished" | "fair" | "good" | "like_new" | "poor" | "broken" | undefined;
|
|
572
|
+
condition?: "new" | "used" | "refurbished" | "broken" | "like_new" | "good" | "fair" | "poor" | undefined;
|
|
573
573
|
inStock?: boolean | undefined;
|
|
574
574
|
}, {
|
|
575
575
|
sort?: string | undefined;
|
|
@@ -581,8 +581,8 @@ export declare const productListParamsSchema: z.ZodObject<{
|
|
|
581
581
|
category?: string | undefined;
|
|
582
582
|
minPrice?: number | undefined;
|
|
583
583
|
maxPrice?: number | undefined;
|
|
584
|
+
listingType?: "auction" | "standard" | "pre-order" | "prize-draw" | "bundle" | undefined;
|
|
584
585
|
featured?: boolean | undefined;
|
|
585
|
-
|
|
586
|
-
condition?: "new" | "used" | "refurbished" | "fair" | "good" | "like_new" | "poor" | "broken" | undefined;
|
|
586
|
+
condition?: "new" | "used" | "refurbished" | "broken" | "like_new" | "good" | "fair" | "poor" | undefined;
|
|
587
587
|
inStock?: boolean | undefined;
|
|
588
588
|
}>;
|
|
@@ -10,7 +10,7 @@ export type ProductCondition = "new" | "like_new" | "good" | "fair" | "poor" | "
|
|
|
10
10
|
* accepts legacy alias tokens (`preorder` → `pre-order`, `product` → `standard`)
|
|
11
11
|
* but stored values are always one of these five.
|
|
12
12
|
*/
|
|
13
|
-
export type ListingType = "standard" | "auction" | "pre-order" | "prize-draw";
|
|
13
|
+
export type ListingType = "standard" | "auction" | "pre-order" | "prize-draw" | "classified" | "digital-code" | "live";
|
|
14
14
|
export interface ProductImage {
|
|
15
15
|
url: string;
|
|
16
16
|
thumbnailUrl?: string;
|
|
@@ -24,3 +24,12 @@ export declare const isStandardListing: (input?: {
|
|
|
24
24
|
export declare const isPrizeDrawListing: (input?: {
|
|
25
25
|
listingType?: ListingType;
|
|
26
26
|
}) => boolean;
|
|
27
|
+
export declare const isClassifiedListing: (input?: {
|
|
28
|
+
listingType?: ListingType;
|
|
29
|
+
}) => boolean;
|
|
30
|
+
export declare const isDigitalCodeListing: (input?: {
|
|
31
|
+
listingType?: ListingType;
|
|
32
|
+
}) => boolean;
|
|
33
|
+
export declare const isLiveListing: (input?: {
|
|
34
|
+
listingType?: ListingType;
|
|
35
|
+
}) => boolean;
|
|
@@ -15,6 +15,10 @@ export const isAuctionListing = (input) => normalizeListingType(input) === "auct
|
|
|
15
15
|
export const isPreOrderListing = (input) => normalizeListingType(input) === "pre-order";
|
|
16
16
|
export const isStandardListing = (input) => normalizeListingType(input) === "standard";
|
|
17
17
|
export const isPrizeDrawListing = (input) => normalizeListingType(input) === "prize-draw";
|
|
18
|
+
// SB-UNI-F 2026-05-13 — Phase 2 union extension predicates.
|
|
19
|
+
export const isClassifiedListing = (input) => normalizeListingType(input) === "classified";
|
|
20
|
+
export const isDigitalCodeListing = (input) => normalizeListingType(input) === "digital-code";
|
|
21
|
+
export const isLiveListing = (input) => normalizeListingType(input) === "live";
|
|
18
22
|
// SB-UNI-D — isBundleListing removed. Bundles are now a categoryType
|
|
19
23
|
// discriminator on CategoryDocument; consumers should query
|
|
20
24
|
// `categoriesRepository.findBySlugAndType(slug, "bundle")` instead.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Promotions / Coupon Domain Actions (appkit)
|
|
3
3
|
*
|
|
4
|
-
* Pure business functions
|
|
4
|
+
* Pure business functions — auth, rate-limiting, and Next.js specifics
|
|
5
5
|
* are handled by the calling server action in the consumer.
|
|
6
6
|
*/
|
|
7
7
|
import type { CouponValidationResult } from "../schemas";
|
|
@@ -22,7 +22,7 @@ export type CouponCartItem = {
|
|
|
22
22
|
price: number;
|
|
23
23
|
quantity: number;
|
|
24
24
|
/** Canonical listing-kind snapshot (SB1-G Phase 4). */
|
|
25
|
-
listingType: "standard" | "auction" | "pre-order" | "prize-draw";
|
|
25
|
+
listingType: "standard" | "auction" | "pre-order" | "prize-draw" | "classified" | "digital-code" | "live";
|
|
26
26
|
};
|
|
27
27
|
export declare function validateCoupon(userId: string, code: string, orderTotal: number): Promise<CouponValidationResult>;
|
|
28
28
|
export declare function validateCouponForCart(userId: string, code: string, cartItems: CouponCartItem[]): Promise<CouponCartValidationResult>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Promotions / Coupon Domain Actions (appkit)
|
|
3
3
|
*
|
|
4
|
-
* Pure business functions
|
|
4
|
+
* Pure business functions — auth, rate-limiting, and Next.js specifics
|
|
5
5
|
* are handled by the calling server action in the consumer.
|
|
6
6
|
*/
|
|
7
7
|
import { couponsRepository } from "../repository/coupons.repository";
|
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
import type { CouponItem } from "../types";
|
|
2
|
+
export interface CouponCardLabels {
|
|
3
|
+
copy?: string;
|
|
4
|
+
copied?: string;
|
|
5
|
+
expires?: string;
|
|
6
|
+
minOrder?: string;
|
|
7
|
+
off?: string;
|
|
8
|
+
freeShipping?: string;
|
|
9
|
+
active?: string;
|
|
10
|
+
inactive?: string;
|
|
11
|
+
used?: string;
|
|
12
|
+
edit?: string;
|
|
13
|
+
activate?: string;
|
|
14
|
+
deactivate?: string;
|
|
15
|
+
delete?: string;
|
|
16
|
+
deleteConfirm?: string;
|
|
17
|
+
}
|
|
2
18
|
interface CouponCardProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
copied?: string;
|
|
7
|
-
expires?: string;
|
|
8
|
-
minOrder?: string;
|
|
9
|
-
off?: string;
|
|
10
|
-
freeShipping?: string;
|
|
11
|
-
};
|
|
19
|
+
/** Accepts either `CouponItem` (flat) or `CouponDocument` (nested). */
|
|
20
|
+
coupon: CouponItem | Record<string, unknown>;
|
|
21
|
+
labels?: CouponCardLabels;
|
|
12
22
|
onCopy?: (code: string) => void;
|
|
13
23
|
className?: string;
|
|
24
|
+
/** Bulk-selection */
|
|
25
|
+
selectable?: boolean;
|
|
26
|
+
isSelected?: boolean;
|
|
27
|
+
onSelect?: (id: string, selected: boolean) => void;
|
|
28
|
+
/** Admin/seller CRUD actions — when any is provided, the action bar is rendered. */
|
|
29
|
+
onEdit?: (id: string) => void;
|
|
30
|
+
onToggleActive?: (id: string, currentlyActive: boolean) => void | Promise<void>;
|
|
31
|
+
onDelete?: (id: string) => void | Promise<void>;
|
|
14
32
|
}
|
|
15
|
-
export declare function CouponCard({ coupon, labels, onCopy, className, }: CouponCardProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare function CouponCard({ coupon, labels: labelsProp, onCopy, className, selectable, isSelected, onSelect, onEdit, onToggleActive, onDelete, }: CouponCardProps): import("react/jsx-runtime").JSX.Element;
|
|
16
34
|
export {};
|