@mohasinac/appkit 2.6.2 → 2.6.4
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/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 +6 -1
- package/dist/client.js +14 -1
- 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/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 +4 -0
- package/dist/features/admin/components/index.js +3 -0
- package/dist/features/admin/constants/filter-tabs.d.ts +401 -0
- package/dist/features/admin/constants/filter-tabs.js +200 -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/SellerProductsView.js +4 -8
- 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 +50 -9
- package/dist/index.js +57 -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-app-lite.js +21 -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
package/dist/index.js
CHANGED
|
@@ -924,8 +924,8 @@ export { requireRole } from "./security/index";
|
|
|
924
924
|
export { resolvePermissions } from "./security/index";
|
|
925
925
|
// ./repositories/index
|
|
926
926
|
// [DB]-Database layer — uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
927
|
-
//
|
|
928
|
-
export {
|
|
927
|
+
// AddressesRepository - unified top-level addresses collection (SB-UNI-A 2026-05-13).
|
|
928
|
+
export { AddressesRepository } from "./repositories/index";
|
|
929
929
|
// [DB]-Database layer — uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
930
930
|
// BaseRepository - Shared export for base repository.
|
|
931
931
|
export { BaseRepository } from "./repositories/index";
|
|
@@ -999,8 +999,8 @@ export { StoreRepository } from "./repositories/index";
|
|
|
999
999
|
// UserRepository - Shared export for user repository.
|
|
1000
1000
|
export { UserRepository } from "./repositories/index";
|
|
1001
1001
|
// [DB]-Database layer — uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
1002
|
-
//
|
|
1003
|
-
export {
|
|
1002
|
+
// addressesRepository - unified addresses repo (ownerType discriminator). SB-UNI-A 2026-05-13.
|
|
1003
|
+
export { addressesRepository } from "./repositories/index";
|
|
1004
1004
|
// [DB]-Database layer — uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
1005
1005
|
// bidRepository - Shared export for bid repository.
|
|
1006
1006
|
export { bidRepository } from "./repositories/index";
|
|
@@ -1074,9 +1074,8 @@ export { siteSettingsRepository } from "./repositories/index";
|
|
|
1074
1074
|
// [DB]-Database layer — uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
1075
1075
|
// smsCounterRepository - Shared export for sms counter repository.
|
|
1076
1076
|
export { smsCounterRepository } from "./repositories/index";
|
|
1077
|
-
//
|
|
1078
|
-
//
|
|
1079
|
-
export { storeAddressRepository } from "./repositories/index";
|
|
1077
|
+
// SB-UNI-A 2026-05-13 — storeAddressRepository deleted. Use addressesRepository
|
|
1078
|
+
// with ownerType:"store" via the unified addresses collection.
|
|
1080
1079
|
// [DB]-Database layer — uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
1081
1080
|
// storeRepository - Shared export for store repository.
|
|
1082
1081
|
export { storeRepository } from "./repositories/index";
|
|
@@ -2078,6 +2077,11 @@ export { AdminBrandEditorView } from "./features/admin/index";
|
|
|
2078
2077
|
export { AdminCategoriesView } from "./features/admin/index";
|
|
2079
2078
|
// AdminCategoryEditorView - Component for admin category create/edit form.
|
|
2080
2079
|
export { AdminCategoryEditorView } from "./features/admin/index";
|
|
2080
|
+
// S-SBUNI-4 2026-05-13 — admin bundle CRUD views.
|
|
2081
|
+
export { AdminBundlesView } from "./features/admin/index";
|
|
2082
|
+
export { AdminBundleEditorView } from "./features/admin/index";
|
|
2083
|
+
// S-SBUNI-4 2026-05-13 — multi-select bundle items picker (centerpiece UI primitive).
|
|
2084
|
+
export { BundleItemsPicker, defaultBundleItemsFetch, } from "./features/categories/components/BundleItemsPicker";
|
|
2081
2085
|
// [CLIENT-SSR]-Runs in both SSR and browser — React component or hook that does not depend on browser-only APIs.
|
|
2082
2086
|
// AdminCouponsView - Component for admin coupons view.
|
|
2083
2087
|
export { AdminCouponsView } from "./features/admin/index";
|
|
@@ -2879,6 +2883,8 @@ export { removeCartItem } from "./features/cart/server";
|
|
|
2879
2883
|
// [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
2880
2884
|
// updateCartItem - Helper for update cart item.
|
|
2881
2885
|
export { updateCartItem } from "./features/cart/server";
|
|
2886
|
+
// [SERVER-ONLY]-Server-only — cart item shipping provider update.
|
|
2887
|
+
export { updateCartItemShipping } from "./features/cart/server";
|
|
2882
2888
|
// ./features/cart/schemas/index
|
|
2883
2889
|
// [SCHEMA]-Schema / data-shape constant — Zod validator, default-value object, or Firestore collection/field name constant.
|
|
2884
2890
|
// CART_COLLECTION - Constant used across modules.
|
|
@@ -3351,6 +3357,10 @@ export { EventPollWidget } from "./features/events/index";
|
|
|
3351
3357
|
// [CLIENT-SSR]-Runs in both SSR and browser — React component or hook that does not depend on browser-only APIs.
|
|
3352
3358
|
// EventStatusBadge - Component for event status badge.
|
|
3353
3359
|
export { EventStatusBadge } from "./features/events/index";
|
|
3360
|
+
// EventRaffleWinnerView - Public-facing winner card for an event raffle.
|
|
3361
|
+
export { EventRaffleWinnerView } from "./features/events/index";
|
|
3362
|
+
// SpinWheelView - Spin-the-wheel client component for spin-wheel events.
|
|
3363
|
+
export { SpinWheelView } from "./features/events/index";
|
|
3354
3364
|
// [CLIENT-SSR]-Runs in both SSR and browser — React component or hook that does not depend on browser-only APIs.
|
|
3355
3365
|
// EventsListView - Component for events list view.
|
|
3356
3366
|
export { EventsListView } from "./features/events/index";
|
|
@@ -4047,6 +4057,9 @@ export { OrderStatusValues } from "./features/orders/index";
|
|
|
4047
4057
|
// [CLIENT-SSR]-Runs in both SSR and browser — React component or hook that does not depend on browser-only APIs.
|
|
4048
4058
|
// OrdersList - Shared export for orders list.
|
|
4049
4059
|
export { OrdersList } from "./features/orders/index";
|
|
4060
|
+
export { OrderSiblingPayments } from "./features/orders/index";
|
|
4061
|
+
export { RefundHistoryTable } from "./features/orders/index";
|
|
4062
|
+
export { RefundRequestView } from "./features/orders/index";
|
|
4050
4063
|
// [CLIENT-SSR]-Runs in both SSR and browser — React component or hook that does not depend on browser-only APIs.
|
|
4051
4064
|
// PaymentGatewayValues - Model for payment gateway values.
|
|
4052
4065
|
export { PaymentGatewayValues } from "./features/orders/index";
|
|
@@ -4238,6 +4251,14 @@ export { AuctionDetailView } from "./features/products/index";
|
|
|
4238
4251
|
export { AuctionDetailPageView } from "./features/auctions/index";
|
|
4239
4252
|
// [SERVER-RSC]-Self-fetching index page view for auctions.
|
|
4240
4253
|
export { AuctionsListView } from "./features/auctions/components/AuctionsListView";
|
|
4254
|
+
// [SERVER-RSC]-Self-fetching index page view for `/bundles` (categoryType:"bundle" rows).
|
|
4255
|
+
export { BundlesListView } from "./features/categories/components/BundlesListView";
|
|
4256
|
+
// S-SBUNI-3 2026-05-13 — public bundle detail view (rebuilt after SB-UNI-V deletion).
|
|
4257
|
+
export { BundleDetailView } from "./features/categories/components/BundleDetailView";
|
|
4258
|
+
// S-SBUNI-5 2026-05-13 — functional Add-to-cart CTA client island.
|
|
4259
|
+
export { BundleBuyNowCta } from "./features/categories/components/BundleBuyNowCta";
|
|
4260
|
+
// CategoryBundlesListing is also re-exported lower in this file (line ~8871);
|
|
4261
|
+
// the canonical export lives there next to BUNDLE_MIN_ITEMS / BUNDLE_MAX_ITEMS.
|
|
4241
4262
|
// [CLIENT-SSR]-Runs in both SSR and browser — React component or hook that does not depend on browser-only APIs.
|
|
4242
4263
|
// AuctionsView - Component for auctions view.
|
|
4243
4264
|
export { AuctionsView } from "./features/products/index";
|
|
@@ -4309,13 +4330,13 @@ export { PreOrderDetailView } from "./features/products/index";
|
|
|
4309
4330
|
// PreOrdersView - Component for pre orders view.
|
|
4310
4331
|
export { PreOrdersView } from "./features/products/index";
|
|
4311
4332
|
// [SERVER-RSC]-Public listing for prize-draw products (SB4-F).
|
|
4312
|
-
export { PrizeDrawsListingView } from "./features/products/
|
|
4333
|
+
export { PrizeDrawsListingView } from "./features/products/components/PrizeDrawsListingView";
|
|
4313
4334
|
// [CLIENT]-Client toolbar+grid for prize draws (SB4-F).
|
|
4314
4335
|
export { PrizeDrawsIndexListing } from "./features/products/index";
|
|
4315
4336
|
// [CLIENT]-Marketplace card for prize draws (SB4-F).
|
|
4316
4337
|
export { MarketplacePrizeDrawCard } from "./features/products/index";
|
|
4317
4338
|
// [SERVER-RSC]-Public detail page for a prize-draw product (SB4-G).
|
|
4318
|
-
export { PrizeDrawDetailPageView } from "./features/products/
|
|
4339
|
+
export { PrizeDrawDetailPageView } from "./features/products/components/PrizeDrawDetailPageView";
|
|
4319
4340
|
// [CLIENT]-Buy panel client for prize-draw detail (consent + add-to-cart) (SB4-G).
|
|
4320
4341
|
export { PrizeDrawEntryActions } from "./features/products/index";
|
|
4321
4342
|
// [CLIENT-SSR]-Runs in both SSR and browser — React component or hook that does not depend on browser-only APIs.
|
|
@@ -4387,7 +4408,18 @@ export { getProductSortOptions } from "./features/products/index";
|
|
|
4387
4408
|
export { getProductTableColumns } from "./features/products/index";
|
|
4388
4409
|
// [CLIENT-SSR]-Runs in both SSR and browser — React component or hook that does not depend on browser-only APIs.
|
|
4389
4410
|
// normalizeListingType + predicate helpers — canonical SB1-G accessors.
|
|
4390
|
-
|
|
4411
|
+
// SB-UNI-F 2026-05-13 — Phase 2 predicates added (classified/digital-code/live).
|
|
4412
|
+
export { normalizeListingType, isAuctionListing, isPreOrderListing, isStandardListing, isPrizeDrawListing, isClassifiedListing, isDigitalCodeListing, isLiveListing, } from "./features/products/index";
|
|
4413
|
+
// SB-UNI-X4 2026-05-13 — per-type feature-flag helpers.
|
|
4414
|
+
export { isListingTypeEnabled, isCategoryTypeEnabled, enabledListingTypes, enabledCategoryTypes, } from "./_internal/shared/listing-types/feature-flags";
|
|
4415
|
+
// SB-UNI-X5 2026-05-13 — action telemetry sink.
|
|
4416
|
+
export { actionTracker, setActionTrackerSink, resetActionTrackerSink, } from "./_internal/shared/listing-types/action-tracker";
|
|
4417
|
+
// SB-UNI-S 2026-05-13 — cart-level shipping-requirement helpers.
|
|
4418
|
+
export { cartRequiresShipping, cartIsDigitalOnly, cartIsChatOnly, } from "./_internal/shared/listing-types/cart-shipping";
|
|
4419
|
+
// SB-UNI-W-1 2026-05-13 — CTA action registry shell.
|
|
4420
|
+
export { ACTIONS, action, act, canPerformAction, actionsForListingType, actionLabel, } from "./_internal/shared/actions/action-registry";
|
|
4421
|
+
// User-role predicates — SB-UNI-E 2026-05-13.
|
|
4422
|
+
export { isAdminUser, isSellerUser, isModeratorUser, isEmployeeUser, isBuyerUser, } from "./features/auth/role-predicates";
|
|
4391
4423
|
// [SERVER-ONLY]-Safe in browser but intended for server routes.
|
|
4392
4424
|
// sanitizeProductForPublic - Strip sellerId/sellerName/sellerEmail/ownerId before returning a product in a public response.
|
|
4393
4425
|
export { sanitizeProductForPublic, sanitizeProductsForPublic } from "./features/products/index";
|
|
@@ -5363,7 +5395,7 @@ export { useMediaQuery, useBreakpoint, useClickOutside, useKeyPress, useLongPres
|
|
|
5363
5395
|
// Missing auth feature components
|
|
5364
5396
|
export { RoleGate, ProtectedRoute, SocialAuthButtons, AuthStatusPanel, LoginForm, RegisterForm, ForgotPasswordView, ResetPasswordView, VerifyEmailView, OAuthLoadingView, } from "./features/auth/index";
|
|
5365
5397
|
// Missing cart and checkout feature components
|
|
5366
|
-
export { CartItemRow, CartDrawer, CartView, CartSummary } from "./features/cart/index";
|
|
5398
|
+
export { CartItemRow, CartDrawer, CartView, CartSummary, ShippingPicker } from "./features/cart/index";
|
|
5367
5399
|
export { CheckoutView, CheckoutAddressStep, CheckoutOtpModal, CheckoutSuccessView } from "./features/cart/index";
|
|
5368
5400
|
export { CheckoutStepper, useCheckout } from "./features/checkout/index";
|
|
5369
5401
|
// PaymentGateway already exported from checkout types above
|
|
@@ -5385,6 +5417,8 @@ export { TextLink } from "./ui/index";
|
|
|
5385
5417
|
export { SUCCESS_MESSAGES } from "./values/index";
|
|
5386
5418
|
// -- Missing order utils
|
|
5387
5419
|
export { splitCartIntoOrderGroups } from "./features/orders/index";
|
|
5420
|
+
// S-SBUNI-5 2026-05-13 — bundle-aware order item grouping for receipts.
|
|
5421
|
+
export { groupOrderItemsByBundle, } from "./features/orders/index";
|
|
5388
5422
|
// -- Missing utils
|
|
5389
5423
|
export { buildSieveFilters } from "./utils/filter.helper";
|
|
5390
5424
|
export { formatFileSize } from "./utils/number.formatter";
|
|
@@ -5407,6 +5441,10 @@ export { productFeatureAdminCreateSchema, productFeatureStoreCreateSchema, produ
|
|
|
5407
5441
|
export { LISTING_PARAM_NAMES, parseListingParams, parseListingSearchParams, serializeListingParams, } from "./utils/listing-params";
|
|
5408
5442
|
// Product features UI option lists (S8 refactor — shared by editor + selector)
|
|
5409
5443
|
export { PRODUCT_FEATURE_CATEGORY_OPTIONS, PRODUCT_FEATURE_PRODUCT_TYPE_OPTIONS, PRODUCT_FEATURE_SCOPE_OPTIONS, PRODUCT_FEATURE_ICON_COLOR_OPTIONS, PRODUCT_FEATURE_SCOPE_TABS, PRODUCT_FEATURE_DEFAULT_DISPLAY_ORDER, PRODUCT_FEATURE_CARD_MAX_VISIBLE, PRODUCT_FEATURE_QUERY_STALE_MS, } from "./features/products/constants/product-features.constants";
|
|
5444
|
+
// SB10-A listing tab constants
|
|
5445
|
+
export { CATEGORY_PAGE_TABS, STORE_PAGE_TABS, SELLER_LISTING_TABS, SEARCH_RESULT_TABS, } from "./features/products/constants/listing-tabs";
|
|
5446
|
+
// SB10-C admin + seller filter-chip tab sets (S8 2026-05-13)
|
|
5447
|
+
export { ALL_TAB, EMPTY_TAB, ADMIN_PRODUCT_STATUS_TABS, ADMIN_PRODUCT_LISTING_TYPE_TABS, ADMIN_BLOG_STATUS_TABS, ADMIN_USER_STATUS_TABS, ADMIN_USER_ROLE_TABS, ADMIN_STORE_STATUS_TABS, ADMIN_PAYOUT_STATUS_TABS, ADMIN_ORDER_STATUS_TABS, ADMIN_REVIEW_STATUS_TABS, ADMIN_REVIEW_RATING_TABS, ADMIN_BID_STATUS_TABS, ADMIN_CONTACT_STATUS_TABS, ADMIN_NEWSLETTER_STATUS_TABS, ADMIN_EVENT_ENTRY_STATUS_TABS, ADMIN_EVENT_STATUS_TABS, ADMIN_CART_OWNERSHIP_TABS, ADMIN_COUPON_TYPE_TABS, SELLER_PRODUCT_STATUS_TABS, SELLER_AUCTION_STATUS_TABS, SELLER_ORDER_STATUS_TABS, SELLER_OFFER_STATUS_TABS, SELLER_BID_STATUS_TABS, } from "./features/admin/constants/filter-tabs";
|
|
5410
5448
|
// Grouped listings feature schemas
|
|
5411
5449
|
export { GROUPED_LISTINGS_COLLECTION } from "./features/grouped/schemas/firestore";
|
|
5412
5450
|
// SB-UNI-D + V — BundleDocument + bundlesRepository + features/bundles/
|
|
@@ -5416,6 +5454,12 @@ export { GROUPED_LISTINGS_COLLECTION } from "./features/grouped/schemas/firestor
|
|
|
5416
5454
|
// Replacement component: CategoryBundlesListing in features/categories/components.
|
|
5417
5455
|
export { CategoryBundlesListing } from "./features/categories/components/CategoryBundlesListing";
|
|
5418
5456
|
export { BUNDLE_MIN_ITEMS, BUNDLE_MAX_ITEMS, BUNDLE_MAX_PER_USER_DEFAULT, BUNDLES_PAGE_SIZE, BUNDLES_FEATURED_LIMIT, } from "./_internal/shared/features/categories/bundle-config";
|
|
5457
|
+
// S-SBUNI-4 follow-up — shared bundle UI copy + stock-badge variant map.
|
|
5458
|
+
export { BUNDLE_COPY, BUNDLE_STOCK_VARIANT, } from "./_internal/shared/features/categories/bundle-copy";
|
|
5459
|
+
// S-SBUNI-RULES 2026-05-13 — shared copy for refund / shipping / sibling-payment UI.
|
|
5460
|
+
export { REFUND_COPY } from "./_internal/shared/features/orders/refund-copy";
|
|
5461
|
+
// S-SBUNI-4 follow-up — shared admin bundle zod schemas.
|
|
5462
|
+
export { bundleCreateSchema, bundleUpdateSchema, bundleQueryRuleSchema, bundleDisplaySchema, } from "./_internal/shared/features/categories/bundle-schemas";
|
|
5419
5463
|
// Scam registry — seed data
|
|
5420
5464
|
export { scammersSeedData } from "./seed/index";
|
|
5421
5465
|
// Product features — seed data (FI2)
|
|
@@ -5456,5 +5500,7 @@ export { renderPrivateProfileOgImage, renderUserProfileOgImage } from "./_intern
|
|
|
5456
5500
|
// Listing-type capability registry — SB-UNI X1.
|
|
5457
5501
|
export { LISTING_TYPE_CAPABILITIES, capabilityFor, canAddToCart, canBid, supportsShipping, requiresVendorVerified, requiresJurisdictionCheck, hasInstantFulfillment, assertNever, } from "./_internal/shared/listing-types/capabilities";
|
|
5458
5502
|
export { LISTING_TYPE_REGISTRY, pluginFor } from "./_internal/shared/listing-types/_registry";
|
|
5503
|
+
// Checkout rule registry — pure TS, safe in both client and server bundles.
|
|
5504
|
+
export { getListingRule, getCategoryRule, pickOrderType, getSplitKey, runSyncPreflight, CHECKOUT_RULES, CATEGORY_CHECKOUT_RULES, CHECKOUT_MAX_ORDERS_PER_TX, PRIZE_DRAW_MAX_REVEALS_PER_ORDER, BUNDLE_MAX_QTY_PER_TX, STANDARD_MAX_QTY_PER_LINE, } from "./_internal/shared/checkout/rules";
|
|
5459
5505
|
// Media upload limits — pure constants, safe in both client and server bundles.
|
|
5460
5506
|
export { MEGABYTE, MAX_IMAGE_BYTES, MAX_PDF_BYTES, MAX_VIDEO_BYTES, MAX_LABEL, MAX_BYTES, ALLOWED_IMAGE_MIMES, ALLOWED_VIDEO_MIMES, ALLOWED_DOC_MIMES, ALLOWED_MIMES, ALLOWED_TYPES_LABEL, MIME_TO_EXT, PDF_MAGIC, VIDEO_CONVERSION_HINTS, classifyMime, isAllowedMime, maxBytesFor, getConversionHint, } from "./_internal/shared/media/limits";
|
|
@@ -72,6 +72,8 @@ export declare const DEFAULT_ROUTE_MAP: {
|
|
|
72
72
|
readonly EVENTS: "/events";
|
|
73
73
|
readonly EVENT_DETAIL: (id: string) => string;
|
|
74
74
|
readonly EVENT_PARTICIPATE: (id: string) => string;
|
|
75
|
+
readonly EVENT_LEADERBOARD: (id: string) => string;
|
|
76
|
+
readonly EVENT_WINNER: (id: string) => string;
|
|
75
77
|
readonly SUBLISTING_CATEGORIES: "/sublisting-categories";
|
|
76
78
|
readonly SUBLISTING_CATEGORY: (slug: string) => string;
|
|
77
79
|
readonly SUPPORT: "/support";
|
|
@@ -224,6 +226,7 @@ export declare const DEFAULT_ROUTE_MAP: {
|
|
|
224
226
|
readonly FEATURES_NEW: "/admin/features/new";
|
|
225
227
|
readonly FEATURES_EDIT: (id: string) => string;
|
|
226
228
|
readonly BUNDLES: "/admin/bundles";
|
|
229
|
+
readonly BUNDLES_NEW: "/admin/bundles/new";
|
|
227
230
|
readonly BUNDLES_EDIT: (id: string) => string;
|
|
228
231
|
readonly PRIZE_DRAWS: "/admin/prize-draws";
|
|
229
232
|
readonly PRIZE_DRAWS_EDIT: (id: string) => string;
|
|
@@ -298,6 +301,8 @@ export declare const ROUTES: {
|
|
|
298
301
|
readonly EVENTS: "/events";
|
|
299
302
|
readonly EVENT_DETAIL: (id: string) => string;
|
|
300
303
|
readonly EVENT_PARTICIPATE: (id: string) => string;
|
|
304
|
+
readonly EVENT_LEADERBOARD: (id: string) => string;
|
|
305
|
+
readonly EVENT_WINNER: (id: string) => string;
|
|
301
306
|
readonly SUBLISTING_CATEGORIES: "/sublisting-categories";
|
|
302
307
|
readonly SUBLISTING_CATEGORY: (slug: string) => string;
|
|
303
308
|
readonly SUPPORT: "/support";
|
|
@@ -450,6 +455,7 @@ export declare const ROUTES: {
|
|
|
450
455
|
readonly FEATURES_NEW: "/admin/features/new";
|
|
451
456
|
readonly FEATURES_EDIT: (id: string) => string;
|
|
452
457
|
readonly BUNDLES: "/admin/bundles";
|
|
458
|
+
readonly BUNDLES_NEW: "/admin/bundles/new";
|
|
453
459
|
readonly BUNDLES_EDIT: (id: string) => string;
|
|
454
460
|
readonly PRIZE_DRAWS: "/admin/prize-draws";
|
|
455
461
|
readonly PRIZE_DRAWS_EDIT: (id: string) => string;
|
|
@@ -60,6 +60,8 @@ export const DEFAULT_ROUTE_MAP = {
|
|
|
60
60
|
EVENTS: "/events",
|
|
61
61
|
EVENT_DETAIL: (id) => `/events/${id}`,
|
|
62
62
|
EVENT_PARTICIPATE: (id) => `/events/${id}/participate`,
|
|
63
|
+
EVENT_LEADERBOARD: (id) => `/events/${id}/leaderboard`,
|
|
64
|
+
EVENT_WINNER: (id) => `/events/${id}/winner`,
|
|
63
65
|
SUBLISTING_CATEGORIES: "/sublisting-categories",
|
|
64
66
|
SUBLISTING_CATEGORY: (slug) => `/sublisting-categories/${slug}`,
|
|
65
67
|
SUPPORT: "/support",
|
|
@@ -213,7 +215,9 @@ export const DEFAULT_ROUTE_MAP = {
|
|
|
213
215
|
FEATURES_NEW: "/admin/features/new",
|
|
214
216
|
FEATURES_EDIT: (id) => `/admin/features/${id}/edit`,
|
|
215
217
|
// SB1-J — bundles + prize draws (admin moderation)
|
|
218
|
+
// S-SBUNI-4 — BUNDLES_NEW added alongside BUNDLES_EDIT.
|
|
216
219
|
BUNDLES: "/admin/bundles",
|
|
220
|
+
BUNDLES_NEW: "/admin/bundles/new",
|
|
217
221
|
BUNDLES_EDIT: (id) => `/admin/bundles/${id}/edit`,
|
|
218
222
|
PRIZE_DRAWS: "/admin/prize-draws",
|
|
219
223
|
PRIZE_DRAWS_EDIT: (id) => `/admin/prize-draws/${id}/edit`,
|
|
@@ -47,6 +47,27 @@ export function getAdminAppLite() {
|
|
|
47
47
|
databaseURL: dbUrl,
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
+
else if (
|
|
51
|
+
// Application Default Credentials path — used by Firebase Functions /
|
|
52
|
+
// Cloud Run / GCE / GKE. The runtime sets `FUNCTION_TARGET` (gen 2
|
|
53
|
+
// Functions) or `K_SERVICE` (Cloud Run); FIREBASE_CONFIG carries the
|
|
54
|
+
// project info Firebase auto-injects. When any of those is present, defer
|
|
55
|
+
// to ADC by calling `initializeApp()` with no credential — the SDK pulls
|
|
56
|
+
// creds from the GCE metadata server.
|
|
57
|
+
process.env.FUNCTION_TARGET ||
|
|
58
|
+
process.env.K_SERVICE ||
|
|
59
|
+
process.env.FIREBASE_CONFIG ||
|
|
60
|
+
process.env.GOOGLE_APPLICATION_CREDENTIALS) {
|
|
61
|
+
const firebaseConfig = process.env.FIREBASE_CONFIG
|
|
62
|
+
? JSON.parse(process.env.FIREBASE_CONFIG)
|
|
63
|
+
: {};
|
|
64
|
+
const projectId = firebaseConfig.projectId ?? process.env.GCLOUD_PROJECT ?? "";
|
|
65
|
+
const dbUrl = firebaseConfig.databaseURL ??
|
|
66
|
+
process.env.FIREBASE_ADMIN_DATABASE_URL ??
|
|
67
|
+
process.env.NEXT_PUBLIC_FIREBASE_DATABASE_URL ??
|
|
68
|
+
(projectId ? `https://${projectId}-default-rtdb.firebaseio.com` : undefined);
|
|
69
|
+
app = initializeApp(dbUrl ? { databaseURL: dbUrl } : undefined);
|
|
70
|
+
}
|
|
50
71
|
else {
|
|
51
72
|
throw new Error("@mohasinac/db-firebase: Firebase Admin credentials not found.");
|
|
52
73
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Firebase Admin SDK singletons.
|
|
3
3
|
*
|
|
4
|
-
* Supports
|
|
4
|
+
* Supports three init methods (checked in order):
|
|
5
5
|
* 1. `firebase-admin-key.json` in process.cwd() — development
|
|
6
|
-
* 2. FIREBASE_ADMIN_PROJECT_ID / CLIENT_EMAIL / PRIVATE_KEY env vars —
|
|
6
|
+
* 2. FIREBASE_ADMIN_PROJECT_ID / CLIENT_EMAIL / PRIVATE_KEY env vars — Vercel
|
|
7
|
+
* 3. Application Default Credentials — Firebase Functions / Cloud Run /
|
|
8
|
+
* GCE / GKE. Detected via FUNCTION_TARGET / K_SERVICE / FIREBASE_CONFIG /
|
|
9
|
+
* GOOGLE_APPLICATION_CREDENTIALS. Calls `initializeApp()` with no
|
|
10
|
+
* credential — the SDK resolves credentials via the GCE metadata server.
|
|
7
11
|
*
|
|
8
12
|
* All getters are lazy — the SDK is not touched until first use.
|
|
9
13
|
*/
|
|
@@ -91,6 +91,29 @@ export function getAdminApp() {
|
|
|
91
91
|
databaseURL: dbUrl,
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
|
+
else if (
|
|
95
|
+
// Application Default Credentials — Firebase Functions / Cloud Run / GCE.
|
|
96
|
+
// FUNCTION_TARGET is set by Gen 2 Functions; K_SERVICE by Cloud Run;
|
|
97
|
+
// FIREBASE_CONFIG is auto-injected by Firebase; GOOGLE_APPLICATION_CREDENTIALS
|
|
98
|
+
// is set when a JSON key path is provided. In any of these cases call
|
|
99
|
+
// `initializeApp()` with no credential — the SDK resolves creds from the
|
|
100
|
+
// metadata server.
|
|
101
|
+
process.env.FUNCTION_TARGET ||
|
|
102
|
+
process.env.K_SERVICE ||
|
|
103
|
+
process.env.FIREBASE_CONFIG ||
|
|
104
|
+
process.env.GOOGLE_APPLICATION_CREDENTIALS) {
|
|
105
|
+
const firebaseConfig = process.env.FIREBASE_CONFIG
|
|
106
|
+
? JSON.parse(process.env.FIREBASE_CONFIG)
|
|
107
|
+
: {};
|
|
108
|
+
const projectId = firebaseConfig.projectId ?? process.env.GCLOUD_PROJECT ?? "";
|
|
109
|
+
const dbUrl = firebaseConfig.databaseURL ??
|
|
110
|
+
process.env.FIREBASE_ADMIN_DATABASE_URL ??
|
|
111
|
+
process.env.NEXT_PUBLIC_FIREBASE_DATABASE_URL ??
|
|
112
|
+
(projectId
|
|
113
|
+
? `https://${projectId}-default-rtdb.firebaseio.com`
|
|
114
|
+
: undefined);
|
|
115
|
+
app = initializeApp(dbUrl ? { databaseURL: dbUrl } : undefined);
|
|
116
|
+
}
|
|
94
117
|
else {
|
|
95
118
|
throw new Error("@mohasinac/db-firebase: Firebase Admin credentials not found.\n" +
|
|
96
119
|
"Add firebase-admin-key.json to project root, or set " +
|
|
@@ -9,14 +9,13 @@ export { unitOfWork } from "../core";
|
|
|
9
9
|
export type { UnitOfWork } from "../core";
|
|
10
10
|
export { UserRepository, userRepository, EmailVerificationTokenRepository, PasswordResetTokenRepository, emailVerificationTokenRepository, passwordResetTokenRepository, tokenRepository, SessionRepository, sessionRepository, } from "../features/auth/repository";
|
|
11
11
|
export { SmsCounterRepository, smsCounterRepository, } from "../features/auth/repository/sms-counter.repository";
|
|
12
|
-
export {
|
|
12
|
+
export { AddressesRepository, addressesRepository, } from "../features/addresses";
|
|
13
13
|
export { ProductRepository, ProductsRepository, productRepository, } from "../features/products/repository/products.repository";
|
|
14
14
|
export { OrderRepository, OrdersRepository, orderRepository, } from "../features/orders/repository/orders.repository";
|
|
15
15
|
export { ReviewRepository, ReviewsRepository, reviewRepository, } from "../features/reviews/repository/reviews.repository";
|
|
16
16
|
export { bidRepository } from "../features/auctions/repository/bid.repository";
|
|
17
17
|
export { CartRepository, cartRepository, } from "../features/cart/repository/cart.repository";
|
|
18
18
|
export { StoreRepository, storeRepository, } from "../features/stores/repository/store.repository";
|
|
19
|
-
export { storeAddressRepository } from "../features/stores/repository/store-address.repository";
|
|
20
19
|
export { siteSettingsRepository } from "../features/admin/repository/site-settings.repository";
|
|
21
20
|
export { notificationRepository } from "../features/admin/repository/notification.repository";
|
|
22
21
|
export { chatRepository } from "../features/admin/repository/chat.repository";
|
|
@@ -11,7 +11,9 @@ export { unitOfWork } from "../core";
|
|
|
11
11
|
// Core repositories
|
|
12
12
|
export { UserRepository, userRepository, EmailVerificationTokenRepository, PasswordResetTokenRepository, emailVerificationTokenRepository, passwordResetTokenRepository, tokenRepository, SessionRepository, sessionRepository, } from "../features/auth/repository";
|
|
13
13
|
export { SmsCounterRepository, smsCounterRepository, } from "../features/auth/repository/sms-counter.repository";
|
|
14
|
-
|
|
14
|
+
// SB-UNI-A 2026-05-13 — top-level `addresses` collection with ownerType discriminator.
|
|
15
|
+
// Replaces the two prior subcollection repositories (account/address + stores/store-address).
|
|
16
|
+
export { AddressesRepository, addressesRepository, } from "../features/addresses";
|
|
15
17
|
export { ProductRepository, ProductsRepository, productRepository, } from "../features/products/repository/products.repository";
|
|
16
18
|
export { OrderRepository, OrdersRepository, orderRepository, } from "../features/orders/repository/orders.repository";
|
|
17
19
|
export { ReviewRepository, ReviewsRepository, reviewRepository, } from "../features/reviews/repository/reviews.repository";
|
|
@@ -19,7 +21,8 @@ export { ReviewRepository, ReviewsRepository, reviewRepository, } from "../featu
|
|
|
19
21
|
export { bidRepository } from "../features/auctions/repository/bid.repository";
|
|
20
22
|
export { CartRepository, cartRepository, } from "../features/cart/repository/cart.repository";
|
|
21
23
|
export { StoreRepository, storeRepository, } from "../features/stores/repository/store.repository";
|
|
22
|
-
|
|
24
|
+
// SB-UNI-A 2026-05-13 — storeAddressRepository deleted. Use addressesRepository
|
|
25
|
+
// with ownerType:"store" instead.
|
|
23
26
|
export { siteSettingsRepository } from "../features/admin/repository/site-settings.repository";
|
|
24
27
|
export { notificationRepository } from "../features/admin/repository/notification.repository";
|
|
25
28
|
export { chatRepository } from "../features/admin/repository/chat.repository";
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
* they depend on Firebase Admin and the user repository; implement them in your
|
|
9
9
|
* app layer using these primitives.
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
import type { UserRole } from "../features/auth/types";
|
|
12
|
+
export type { UserRole };
|
|
12
13
|
export declare function requireAuth(user: unknown): void;
|
|
13
14
|
export declare function requireRole(user: Record<string, unknown> | null | undefined, roles: UserRole | UserRole[]): void;
|
|
14
15
|
export declare function requireOwnership(user: Record<string, unknown> | null | undefined, resourceOwnerId: string): void;
|
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
import { AuthenticationError, AuthorizationError } from "../errors";
|
|
12
12
|
import { ERROR_MESSAGES } from "../errors/messages";
|
|
13
13
|
const ROLE_HIERARCHY = {
|
|
14
|
-
admin:
|
|
15
|
-
moderator:
|
|
14
|
+
admin: 5,
|
|
15
|
+
moderator: 4,
|
|
16
|
+
employee: 3,
|
|
16
17
|
seller: 2,
|
|
17
18
|
user: 1,
|
|
18
19
|
};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* the actual collection-specific seeding logic (800+ lines with PII encryption,
|
|
7
7
|
* Auth user creation, subcollection handling, etc.).
|
|
8
8
|
*/
|
|
9
|
-
export type SeedCollectionName = "users" | "addresses" | "categories" | "stores" | "products" | "orders" | "reviews" | "bids" | "coupons" | "carousels" | "carouselSlides" | "homepageSections" | "siteSettings" | "faqs" | "notifications" | "payouts" | "blogPosts" | "events" | "eventEntries" | "sessions" | "
|
|
9
|
+
export type SeedCollectionName = "users" | "addresses" | "categories" | "stores" | "products" | "orders" | "reviews" | "bids" | "coupons" | "carousels" | "carouselSlides" | "homepageSections" | "siteSettings" | "faqs" | "notifications" | "payouts" | "blogPosts" | "events" | "eventEntries" | "sessions" | "carts" | "wishlists" | "history" | "conversations" | "groupedListings" | "scammerProfiles" | "productFeatures";
|
|
10
10
|
export interface SeedOperationResult {
|
|
11
11
|
success?: boolean;
|
|
12
12
|
message: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bids Seed Data — Collectibles Edition
|
|
3
|
-
* Realistic bid progressions for
|
|
4
|
-
*
|
|
3
|
+
* Realistic bid progressions for every auction with bidCount > 0.
|
|
4
|
+
* Auctions with bidCount = 0 (upcoming / no-bid) are intentionally absent.
|
|
5
5
|
* Buyer IDs from P15 users seed data.
|
|
6
6
|
*/
|
|
7
7
|
import type { BidDocument } from "../features/auctions/schemas";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bids Seed Data — Collectibles Edition
|
|
3
|
-
* Realistic bid progressions for
|
|
4
|
-
*
|
|
3
|
+
* Realistic bid progressions for every auction with bidCount > 0.
|
|
4
|
+
* Auctions with bidCount = 0 (upcoming / no-bid) are intentionally absent.
|
|
5
5
|
* Buyer IDs from P15 users seed data.
|
|
6
6
|
*/
|
|
7
7
|
const NOW = new Date();
|
|
@@ -558,6 +558,81 @@ export const bidsSeedData = [
|
|
|
558
558
|
winningIndex: -1, // reserve not met — no winner
|
|
559
559
|
slugPrefix: "bid-skyline-fail",
|
|
560
560
|
}),
|
|
561
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
562
|
+
// auction-nendoroid-miku-100-limited — ACTIVE, ends in 4h, 7 bids → current ₹11,999
|
|
563
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
564
|
+
...buildBidLadder({
|
|
565
|
+
productId: "auction-nendoroid-miku-100-limited",
|
|
566
|
+
productTitle: "Good Smile Company Nendoroid Hatsune Miku #100 (Original Release, Rare) — AUCTION",
|
|
567
|
+
amounts: [499900, 599900, 699900, 799900, 899900, 1049900, 1199900],
|
|
568
|
+
bidders: [
|
|
569
|
+
{ id: "user-priya-patel", name: "Priya Patel", email: "priya.patel@gmail.com" },
|
|
570
|
+
{ id: "user-divya-menon", name: "Divya Menon", email: "divya.menon@gmail.com" },
|
|
571
|
+
{ id: "user-priya-patel", name: "Priya Patel", email: "priya.patel@gmail.com" },
|
|
572
|
+
{ id: "user-pooja-sharma", name: "Pooja Sharma", email: "pooja.sharma@gmail.com" },
|
|
573
|
+
{ id: "user-divya-menon", name: "Divya Menon", email: "divya.menon@gmail.com" },
|
|
574
|
+
{ id: "user-meera-nair", name: "Meera Nair", email: "meera.nair@gmail.com" },
|
|
575
|
+
{ id: "user-priya-patel", name: "Priya Patel", email: "priya.patel@gmail.com" },
|
|
576
|
+
],
|
|
577
|
+
daysAgoForFirst: 9,
|
|
578
|
+
endsActive: true,
|
|
579
|
+
slugPrefix: "bid-miku-100",
|
|
580
|
+
}),
|
|
581
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
582
|
+
// auction-pokemon-mew-1st-edition-psa10 — ACTIVE, ends in 24h, 3 bids → current ₹1,49,999
|
|
583
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
584
|
+
...buildBidLadder({
|
|
585
|
+
productId: "auction-pokemon-mew-1st-edition-psa10",
|
|
586
|
+
productTitle: "Pokémon Mew #151 1st Edition — PSA 10 GEM MINT (AUCTION)",
|
|
587
|
+
amounts: [9999900, 12499900, 14999900],
|
|
588
|
+
bidders: [
|
|
589
|
+
{ id: "user-arjun-singh", name: "Arjun Singh", email: "arjun.singh@gmail.com" },
|
|
590
|
+
{ id: "user-rahul-sharma", name: "Rahul Sharma", email: "rahul.sharma@gmail.com" },
|
|
591
|
+
{ id: "user-siddharth-rao", name: "Siddharth Rao", email: "siddharth.rao@gmail.com" },
|
|
592
|
+
],
|
|
593
|
+
daysAgoForFirst: 5,
|
|
594
|
+
endsActive: true,
|
|
595
|
+
slugPrefix: "bid-mew-1ed",
|
|
596
|
+
}),
|
|
597
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
598
|
+
// auction-yugioh-blue-eyes-lob-1st-psa9 — ACTIVE, ends in 72h, 8 bids → current ₹79,999
|
|
599
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
600
|
+
...buildBidLadder({
|
|
601
|
+
productId: "auction-yugioh-blue-eyes-lob-1st-psa9",
|
|
602
|
+
productTitle: "Yu-Gi-Oh! Blue-Eyes White Dragon LOB 1st Edition — PSA 9 MINT (AUCTION)",
|
|
603
|
+
amounts: [2999900, 3499900, 4249900, 4999900, 5749900, 6499900, 7249900, 7999900],
|
|
604
|
+
bidders: [
|
|
605
|
+
{ id: "user-rahul-sharma", name: "Rahul Sharma", email: "rahul.sharma@gmail.com" },
|
|
606
|
+
{ id: "user-priya-singh", name: "Priya Singh", email: "priya.singh@gmail.com" },
|
|
607
|
+
{ id: "user-arjun-singh", name: "Arjun Singh", email: "arjun.singh@gmail.com" },
|
|
608
|
+
{ id: "user-amit-sharma", name: "Amit Sharma", email: "amit.sharma@gmail.com" },
|
|
609
|
+
{ id: "user-rahul-sharma", name: "Rahul Sharma", email: "rahul.sharma@gmail.com" },
|
|
610
|
+
{ id: "user-rohit-verma", name: "Rohit Verma", email: "rohit.verma@gmail.com" },
|
|
611
|
+
{ id: "user-priya-singh", name: "Priya Singh", email: "priya.singh@gmail.com" },
|
|
612
|
+
{ id: "user-arjun-singh", name: "Arjun Singh", email: "arjun.singh@gmail.com" },
|
|
613
|
+
],
|
|
614
|
+
daysAgoForFirst: 7,
|
|
615
|
+
endsActive: true,
|
|
616
|
+
slugPrefix: "bid-bewd-lob",
|
|
617
|
+
}),
|
|
618
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
619
|
+
// auction-hot-wheels-redline-deora-japan — ACTIVE, ends in 36h, 5 bids → current ₹17,999
|
|
620
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
621
|
+
...buildBidLadder({
|
|
622
|
+
productId: "auction-hot-wheels-redline-deora-japan",
|
|
623
|
+
productTitle: "Hot Wheels Redline Deora — Japan Issue (AUCTION)",
|
|
624
|
+
amounts: [899900, 1099900, 1299900, 1499900, 1799900],
|
|
625
|
+
bidders: [
|
|
626
|
+
{ id: "user-varun-bhat", name: "Varun Bhat", email: "varun.bhat@gmail.com" },
|
|
627
|
+
{ id: "user-kiran-reddy", name: "Kiran Reddy", email: "kiran.reddy@gmail.com" },
|
|
628
|
+
{ id: "user-preeti-joshi", name: "Preeti Joshi", email: "preeti.joshi@gmail.com" },
|
|
629
|
+
{ id: "user-varun-bhat", name: "Varun Bhat", email: "varun.bhat@gmail.com" },
|
|
630
|
+
{ id: "user-meera-nair", name: "Meera Nair", email: "meera.nair@gmail.com" },
|
|
631
|
+
],
|
|
632
|
+
daysAgoForFirst: 6,
|
|
633
|
+
endsActive: true,
|
|
634
|
+
slugPrefix: "bid-deora-jp",
|
|
635
|
+
}),
|
|
561
636
|
];
|
|
562
637
|
/**
|
|
563
638
|
* Builds a strictly-increasing bid ladder for an auction. Status flags are
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Carts Seed Data
|
|
2
|
+
* Carts Seed Data — LetItRip Collectibles
|
|
3
3
|
*
|
|
4
4
|
* Covers all cart states for testing Add-to-Cart / Update / Remove / Checkout flows:
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* — Multi-item cart (cross-store, mixed categories) — Rahul Sharma
|
|
6
|
+
* — Single-item cart — Priya Patel
|
|
7
|
+
* — Cart with auction item — Arjun Singh
|
|
8
|
+
* — Cart with quantity > 1 — Meera Nair
|
|
9
|
+
* — Empty cart (items: []) — Amit Sharma
|
|
10
10
|
*
|
|
11
|
-
* Cart document ID = userId (O(1) lookup
|
|
11
|
+
* Cart document ID = userId (O(1) lookup — see cart.ts schema).
|
|
12
12
|
*
|
|
13
13
|
* All FK references:
|
|
14
|
-
* userId
|
|
15
|
-
* items[].productId
|
|
16
|
-
* items[].storeId
|
|
14
|
+
* userId → users/{uid} (see users-seed-data.ts)
|
|
15
|
+
* items[].productId → products/{id} (see products-standard/auctions-seed-data.ts)
|
|
16
|
+
* items[].storeId → stores/{id} (see stores-seed-data.ts)
|
|
17
17
|
*/
|
|
18
18
|
import type { CartDocument } from "../features/cart/schemas";
|
|
19
19
|
export declare const cartsSeedData: CartDocument[];
|