@mohasinac/appkit 2.6.3 → 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.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
|
@@ -1,377 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bundle Zod schemas — SB3-J input validation for the `/api/bundles*`
|
|
3
|
-
* routes. Both schemas are intentionally narrower than `BundleDocument`:
|
|
4
|
-
*
|
|
5
|
-
* - `bundleCreateInputSchema` covers the POST body. `bundleItems` is the
|
|
6
|
-
* minimum required surface; everything else (slug, status, price,
|
|
7
|
-
* storeName) can be filled or normalised server-side.
|
|
8
|
-
* - `bundleUpdateInputSchema` is `bundleCreateInputSchema.partial()` so PUT
|
|
9
|
-
* can do partial edits while still validating any shape the caller does
|
|
10
|
-
* send.
|
|
11
|
-
*
|
|
12
|
-
* `partOfBundleProductIds` is NOT user-supplied — the route derives it
|
|
13
|
-
* from `bundleItems[]` to keep the reverse index in lock-step.
|
|
14
|
-
*/
|
|
15
|
-
import { z } from "zod";
|
|
16
|
-
export declare const BUNDLE_ITEM_MIN = 3;
|
|
17
|
-
export declare const BUNDLE_ITEM_MAX = 16;
|
|
18
|
-
export declare const bundleCreateInputSchema: z.ZodObject<{
|
|
19
|
-
id: z.ZodOptional<z.ZodString>;
|
|
20
|
-
slug: z.ZodOptional<z.ZodString>;
|
|
21
|
-
title: z.ZodString;
|
|
22
|
-
description: z.ZodOptional<z.ZodString>;
|
|
23
|
-
storeId: z.ZodString;
|
|
24
|
-
storeName: z.ZodString;
|
|
25
|
-
status: z.ZodOptional<z.ZodEnum<["draft", "published", "out_of_stock", "archived"]>>;
|
|
26
|
-
bundleItems: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
27
|
-
productId: z.ZodString;
|
|
28
|
-
productSlug: z.ZodString;
|
|
29
|
-
title: z.ZodString;
|
|
30
|
-
listingType: z.ZodEnum<["standard", "pre-order"]>;
|
|
31
|
-
images: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
32
|
-
video: z.ZodOptional<z.ZodObject<{
|
|
33
|
-
url: z.ZodString;
|
|
34
|
-
thumbnailUrl: z.ZodOptional<z.ZodString>;
|
|
35
|
-
}, "strip", z.ZodTypeAny, {
|
|
36
|
-
url: string;
|
|
37
|
-
thumbnailUrl?: string | undefined;
|
|
38
|
-
}, {
|
|
39
|
-
url: string;
|
|
40
|
-
thumbnailUrl?: string | undefined;
|
|
41
|
-
}>>;
|
|
42
|
-
price: z.ZodNumber;
|
|
43
|
-
quantity: z.ZodNumber;
|
|
44
|
-
isSold: z.ZodDefault<z.ZodBoolean>;
|
|
45
|
-
}, "strip", z.ZodTypeAny, {
|
|
46
|
-
title: string;
|
|
47
|
-
productId: string;
|
|
48
|
-
quantity: number;
|
|
49
|
-
price: number;
|
|
50
|
-
images: string[];
|
|
51
|
-
listingType: "standard" | "pre-order";
|
|
52
|
-
isSold: boolean;
|
|
53
|
-
productSlug: string;
|
|
54
|
-
video?: {
|
|
55
|
-
url: string;
|
|
56
|
-
thumbnailUrl?: string | undefined;
|
|
57
|
-
} | undefined;
|
|
58
|
-
}, {
|
|
59
|
-
title: string;
|
|
60
|
-
productId: string;
|
|
61
|
-
quantity: number;
|
|
62
|
-
price: number;
|
|
63
|
-
listingType: "standard" | "pre-order";
|
|
64
|
-
productSlug: string;
|
|
65
|
-
video?: {
|
|
66
|
-
url: string;
|
|
67
|
-
thumbnailUrl?: string | undefined;
|
|
68
|
-
} | undefined;
|
|
69
|
-
images?: string[] | undefined;
|
|
70
|
-
isSold?: boolean | undefined;
|
|
71
|
-
}>, "many">, {
|
|
72
|
-
title: string;
|
|
73
|
-
productId: string;
|
|
74
|
-
quantity: number;
|
|
75
|
-
price: number;
|
|
76
|
-
images: string[];
|
|
77
|
-
listingType: "standard" | "pre-order";
|
|
78
|
-
isSold: boolean;
|
|
79
|
-
productSlug: string;
|
|
80
|
-
video?: {
|
|
81
|
-
url: string;
|
|
82
|
-
thumbnailUrl?: string | undefined;
|
|
83
|
-
} | undefined;
|
|
84
|
-
}[], {
|
|
85
|
-
title: string;
|
|
86
|
-
productId: string;
|
|
87
|
-
quantity: number;
|
|
88
|
-
price: number;
|
|
89
|
-
listingType: "standard" | "pre-order";
|
|
90
|
-
productSlug: string;
|
|
91
|
-
video?: {
|
|
92
|
-
url: string;
|
|
93
|
-
thumbnailUrl?: string | undefined;
|
|
94
|
-
} | undefined;
|
|
95
|
-
images?: string[] | undefined;
|
|
96
|
-
isSold?: boolean | undefined;
|
|
97
|
-
}[]>;
|
|
98
|
-
bundlePrice: z.ZodNumber;
|
|
99
|
-
bundleOriginalTotal: z.ZodOptional<z.ZodNumber>;
|
|
100
|
-
category: z.ZodOptional<z.ZodString>;
|
|
101
|
-
categorySlug: z.ZodOptional<z.ZodString>;
|
|
102
|
-
subcategory: z.ZodOptional<z.ZodString>;
|
|
103
|
-
sublistingCategoryId: z.ZodOptional<z.ZodString>;
|
|
104
|
-
brandSlug: z.ZodOptional<z.ZodString>;
|
|
105
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
106
|
-
images: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
107
|
-
video: z.ZodOptional<z.ZodObject<{
|
|
108
|
-
url: z.ZodString;
|
|
109
|
-
thumbnailUrl: z.ZodOptional<z.ZodString>;
|
|
110
|
-
}, "strip", z.ZodTypeAny, {
|
|
111
|
-
url: string;
|
|
112
|
-
thumbnailUrl?: string | undefined;
|
|
113
|
-
}, {
|
|
114
|
-
url: string;
|
|
115
|
-
thumbnailUrl?: string | undefined;
|
|
116
|
-
}>>;
|
|
117
|
-
maxPerUser: z.ZodOptional<z.ZodNumber>;
|
|
118
|
-
isFeatured: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
-
isPromoted: z.ZodOptional<z.ZodBoolean>;
|
|
120
|
-
}, "strip", z.ZodTypeAny, {
|
|
121
|
-
storeId: string;
|
|
122
|
-
title: string;
|
|
123
|
-
storeName: string;
|
|
124
|
-
bundleItems: {
|
|
125
|
-
title: string;
|
|
126
|
-
productId: string;
|
|
127
|
-
quantity: number;
|
|
128
|
-
price: number;
|
|
129
|
-
images: string[];
|
|
130
|
-
listingType: "standard" | "pre-order";
|
|
131
|
-
isSold: boolean;
|
|
132
|
-
productSlug: string;
|
|
133
|
-
video?: {
|
|
134
|
-
url: string;
|
|
135
|
-
thumbnailUrl?: string | undefined;
|
|
136
|
-
} | undefined;
|
|
137
|
-
}[];
|
|
138
|
-
bundlePrice: number;
|
|
139
|
-
id?: string | undefined;
|
|
140
|
-
status?: "draft" | "published" | "archived" | "out_of_stock" | undefined;
|
|
141
|
-
video?: {
|
|
142
|
-
url: string;
|
|
143
|
-
thumbnailUrl?: string | undefined;
|
|
144
|
-
} | undefined;
|
|
145
|
-
category?: string | undefined;
|
|
146
|
-
images?: string[] | undefined;
|
|
147
|
-
description?: string | undefined;
|
|
148
|
-
isPromoted?: boolean | undefined;
|
|
149
|
-
slug?: string | undefined;
|
|
150
|
-
subcategory?: string | undefined;
|
|
151
|
-
brandSlug?: string | undefined;
|
|
152
|
-
tags?: string[] | undefined;
|
|
153
|
-
sublistingCategoryId?: string | undefined;
|
|
154
|
-
maxPerUser?: number | undefined;
|
|
155
|
-
categorySlug?: string | undefined;
|
|
156
|
-
isFeatured?: boolean | undefined;
|
|
157
|
-
bundleOriginalTotal?: number | undefined;
|
|
158
|
-
}, {
|
|
159
|
-
storeId: string;
|
|
160
|
-
title: string;
|
|
161
|
-
storeName: string;
|
|
162
|
-
bundleItems: {
|
|
163
|
-
title: string;
|
|
164
|
-
productId: string;
|
|
165
|
-
quantity: number;
|
|
166
|
-
price: number;
|
|
167
|
-
listingType: "standard" | "pre-order";
|
|
168
|
-
productSlug: string;
|
|
169
|
-
video?: {
|
|
170
|
-
url: string;
|
|
171
|
-
thumbnailUrl?: string | undefined;
|
|
172
|
-
} | undefined;
|
|
173
|
-
images?: string[] | undefined;
|
|
174
|
-
isSold?: boolean | undefined;
|
|
175
|
-
}[];
|
|
176
|
-
bundlePrice: number;
|
|
177
|
-
id?: string | undefined;
|
|
178
|
-
status?: "draft" | "published" | "archived" | "out_of_stock" | undefined;
|
|
179
|
-
video?: {
|
|
180
|
-
url: string;
|
|
181
|
-
thumbnailUrl?: string | undefined;
|
|
182
|
-
} | undefined;
|
|
183
|
-
category?: string | undefined;
|
|
184
|
-
images?: string[] | undefined;
|
|
185
|
-
description?: string | undefined;
|
|
186
|
-
isPromoted?: boolean | undefined;
|
|
187
|
-
slug?: string | undefined;
|
|
188
|
-
subcategory?: string | undefined;
|
|
189
|
-
brandSlug?: string | undefined;
|
|
190
|
-
tags?: string[] | undefined;
|
|
191
|
-
sublistingCategoryId?: string | undefined;
|
|
192
|
-
maxPerUser?: number | undefined;
|
|
193
|
-
categorySlug?: string | undefined;
|
|
194
|
-
isFeatured?: boolean | undefined;
|
|
195
|
-
bundleOriginalTotal?: number | undefined;
|
|
196
|
-
}>;
|
|
197
|
-
export declare const bundleUpdateInputSchema: z.ZodObject<{
|
|
198
|
-
id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
199
|
-
slug: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
200
|
-
title: z.ZodOptional<z.ZodString>;
|
|
201
|
-
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
202
|
-
storeId: z.ZodOptional<z.ZodString>;
|
|
203
|
-
storeName: z.ZodOptional<z.ZodString>;
|
|
204
|
-
status: z.ZodOptional<z.ZodOptional<z.ZodEnum<["draft", "published", "out_of_stock", "archived"]>>>;
|
|
205
|
-
bundleItems: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
206
|
-
productId: z.ZodString;
|
|
207
|
-
productSlug: z.ZodString;
|
|
208
|
-
title: z.ZodString;
|
|
209
|
-
listingType: z.ZodEnum<["standard", "pre-order"]>;
|
|
210
|
-
images: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
211
|
-
video: z.ZodOptional<z.ZodObject<{
|
|
212
|
-
url: z.ZodString;
|
|
213
|
-
thumbnailUrl: z.ZodOptional<z.ZodString>;
|
|
214
|
-
}, "strip", z.ZodTypeAny, {
|
|
215
|
-
url: string;
|
|
216
|
-
thumbnailUrl?: string | undefined;
|
|
217
|
-
}, {
|
|
218
|
-
url: string;
|
|
219
|
-
thumbnailUrl?: string | undefined;
|
|
220
|
-
}>>;
|
|
221
|
-
price: z.ZodNumber;
|
|
222
|
-
quantity: z.ZodNumber;
|
|
223
|
-
isSold: z.ZodDefault<z.ZodBoolean>;
|
|
224
|
-
}, "strip", z.ZodTypeAny, {
|
|
225
|
-
title: string;
|
|
226
|
-
productId: string;
|
|
227
|
-
quantity: number;
|
|
228
|
-
price: number;
|
|
229
|
-
images: string[];
|
|
230
|
-
listingType: "standard" | "pre-order";
|
|
231
|
-
isSold: boolean;
|
|
232
|
-
productSlug: string;
|
|
233
|
-
video?: {
|
|
234
|
-
url: string;
|
|
235
|
-
thumbnailUrl?: string | undefined;
|
|
236
|
-
} | undefined;
|
|
237
|
-
}, {
|
|
238
|
-
title: string;
|
|
239
|
-
productId: string;
|
|
240
|
-
quantity: number;
|
|
241
|
-
price: number;
|
|
242
|
-
listingType: "standard" | "pre-order";
|
|
243
|
-
productSlug: string;
|
|
244
|
-
video?: {
|
|
245
|
-
url: string;
|
|
246
|
-
thumbnailUrl?: string | undefined;
|
|
247
|
-
} | undefined;
|
|
248
|
-
images?: string[] | undefined;
|
|
249
|
-
isSold?: boolean | undefined;
|
|
250
|
-
}>, "many">, {
|
|
251
|
-
title: string;
|
|
252
|
-
productId: string;
|
|
253
|
-
quantity: number;
|
|
254
|
-
price: number;
|
|
255
|
-
images: string[];
|
|
256
|
-
listingType: "standard" | "pre-order";
|
|
257
|
-
isSold: boolean;
|
|
258
|
-
productSlug: string;
|
|
259
|
-
video?: {
|
|
260
|
-
url: string;
|
|
261
|
-
thumbnailUrl?: string | undefined;
|
|
262
|
-
} | undefined;
|
|
263
|
-
}[], {
|
|
264
|
-
title: string;
|
|
265
|
-
productId: string;
|
|
266
|
-
quantity: number;
|
|
267
|
-
price: number;
|
|
268
|
-
listingType: "standard" | "pre-order";
|
|
269
|
-
productSlug: string;
|
|
270
|
-
video?: {
|
|
271
|
-
url: string;
|
|
272
|
-
thumbnailUrl?: string | undefined;
|
|
273
|
-
} | undefined;
|
|
274
|
-
images?: string[] | undefined;
|
|
275
|
-
isSold?: boolean | undefined;
|
|
276
|
-
}[]>>;
|
|
277
|
-
bundlePrice: z.ZodOptional<z.ZodNumber>;
|
|
278
|
-
bundleOriginalTotal: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
279
|
-
category: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
280
|
-
categorySlug: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
281
|
-
subcategory: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
282
|
-
sublistingCategoryId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
283
|
-
brandSlug: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
284
|
-
tags: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
285
|
-
images: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
286
|
-
video: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
287
|
-
url: z.ZodString;
|
|
288
|
-
thumbnailUrl: z.ZodOptional<z.ZodString>;
|
|
289
|
-
}, "strip", z.ZodTypeAny, {
|
|
290
|
-
url: string;
|
|
291
|
-
thumbnailUrl?: string | undefined;
|
|
292
|
-
}, {
|
|
293
|
-
url: string;
|
|
294
|
-
thumbnailUrl?: string | undefined;
|
|
295
|
-
}>>>;
|
|
296
|
-
maxPerUser: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
297
|
-
isFeatured: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
298
|
-
isPromoted: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
299
|
-
}, "strip", z.ZodTypeAny, {
|
|
300
|
-
id?: string | undefined;
|
|
301
|
-
storeId?: string | undefined;
|
|
302
|
-
status?: "draft" | "published" | "archived" | "out_of_stock" | undefined;
|
|
303
|
-
title?: string | undefined;
|
|
304
|
-
video?: {
|
|
305
|
-
url: string;
|
|
306
|
-
thumbnailUrl?: string | undefined;
|
|
307
|
-
} | undefined;
|
|
308
|
-
category?: string | undefined;
|
|
309
|
-
images?: string[] | undefined;
|
|
310
|
-
description?: string | undefined;
|
|
311
|
-
isPromoted?: boolean | undefined;
|
|
312
|
-
slug?: string | undefined;
|
|
313
|
-
subcategory?: string | undefined;
|
|
314
|
-
brandSlug?: string | undefined;
|
|
315
|
-
storeName?: string | undefined;
|
|
316
|
-
tags?: string[] | undefined;
|
|
317
|
-
sublistingCategoryId?: string | undefined;
|
|
318
|
-
maxPerUser?: number | undefined;
|
|
319
|
-
categorySlug?: string | undefined;
|
|
320
|
-
isFeatured?: boolean | undefined;
|
|
321
|
-
bundleItems?: {
|
|
322
|
-
title: string;
|
|
323
|
-
productId: string;
|
|
324
|
-
quantity: number;
|
|
325
|
-
price: number;
|
|
326
|
-
images: string[];
|
|
327
|
-
listingType: "standard" | "pre-order";
|
|
328
|
-
isSold: boolean;
|
|
329
|
-
productSlug: string;
|
|
330
|
-
video?: {
|
|
331
|
-
url: string;
|
|
332
|
-
thumbnailUrl?: string | undefined;
|
|
333
|
-
} | undefined;
|
|
334
|
-
}[] | undefined;
|
|
335
|
-
bundlePrice?: number | undefined;
|
|
336
|
-
bundleOriginalTotal?: number | undefined;
|
|
337
|
-
}, {
|
|
338
|
-
id?: string | undefined;
|
|
339
|
-
storeId?: string | undefined;
|
|
340
|
-
status?: "draft" | "published" | "archived" | "out_of_stock" | undefined;
|
|
341
|
-
title?: string | undefined;
|
|
342
|
-
video?: {
|
|
343
|
-
url: string;
|
|
344
|
-
thumbnailUrl?: string | undefined;
|
|
345
|
-
} | undefined;
|
|
346
|
-
category?: string | undefined;
|
|
347
|
-
images?: string[] | undefined;
|
|
348
|
-
description?: string | undefined;
|
|
349
|
-
isPromoted?: boolean | undefined;
|
|
350
|
-
slug?: string | undefined;
|
|
351
|
-
subcategory?: string | undefined;
|
|
352
|
-
brandSlug?: string | undefined;
|
|
353
|
-
storeName?: string | undefined;
|
|
354
|
-
tags?: string[] | undefined;
|
|
355
|
-
sublistingCategoryId?: string | undefined;
|
|
356
|
-
maxPerUser?: number | undefined;
|
|
357
|
-
categorySlug?: string | undefined;
|
|
358
|
-
isFeatured?: boolean | undefined;
|
|
359
|
-
bundleItems?: {
|
|
360
|
-
title: string;
|
|
361
|
-
productId: string;
|
|
362
|
-
quantity: number;
|
|
363
|
-
price: number;
|
|
364
|
-
listingType: "standard" | "pre-order";
|
|
365
|
-
productSlug: string;
|
|
366
|
-
video?: {
|
|
367
|
-
url: string;
|
|
368
|
-
thumbnailUrl?: string | undefined;
|
|
369
|
-
} | undefined;
|
|
370
|
-
images?: string[] | undefined;
|
|
371
|
-
isSold?: boolean | undefined;
|
|
372
|
-
}[] | undefined;
|
|
373
|
-
bundlePrice?: number | undefined;
|
|
374
|
-
bundleOriginalTotal?: number | undefined;
|
|
375
|
-
}>;
|
|
376
|
-
export type BundleCreateInput = z.infer<typeof bundleCreateInputSchema>;
|
|
377
|
-
export type BundleUpdateInput = z.infer<typeof bundleUpdateInputSchema>;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bundle Zod schemas — SB3-J input validation for the `/api/bundles*`
|
|
3
|
-
* routes. Both schemas are intentionally narrower than `BundleDocument`:
|
|
4
|
-
*
|
|
5
|
-
* - `bundleCreateInputSchema` covers the POST body. `bundleItems` is the
|
|
6
|
-
* minimum required surface; everything else (slug, status, price,
|
|
7
|
-
* storeName) can be filled or normalised server-side.
|
|
8
|
-
* - `bundleUpdateInputSchema` is `bundleCreateInputSchema.partial()` so PUT
|
|
9
|
-
* can do partial edits while still validating any shape the caller does
|
|
10
|
-
* send.
|
|
11
|
-
*
|
|
12
|
-
* `partOfBundleProductIds` is NOT user-supplied — the route derives it
|
|
13
|
-
* from `bundleItems[]` to keep the reverse index in lock-step.
|
|
14
|
-
*/
|
|
15
|
-
import { z } from "zod";
|
|
16
|
-
export const BUNDLE_ITEM_MIN = 3;
|
|
17
|
-
export const BUNDLE_ITEM_MAX = 16;
|
|
18
|
-
const bundleItemListingTypeSchema = z.enum(["standard", "pre-order"]);
|
|
19
|
-
const bundleItemInputSchema = z.object({
|
|
20
|
-
productId: z.string().min(1),
|
|
21
|
-
productSlug: z.string().min(1),
|
|
22
|
-
title: z.string().min(1).max(200),
|
|
23
|
-
listingType: bundleItemListingTypeSchema,
|
|
24
|
-
images: z.array(z.string()).default([]),
|
|
25
|
-
video: z
|
|
26
|
-
.object({
|
|
27
|
-
url: z.string(),
|
|
28
|
-
thumbnailUrl: z.string().optional(),
|
|
29
|
-
})
|
|
30
|
-
.optional(),
|
|
31
|
-
price: z.number().int().min(0),
|
|
32
|
-
quantity: z.number().int().min(1).max(99),
|
|
33
|
-
isSold: z.boolean().default(false),
|
|
34
|
-
});
|
|
35
|
-
const bundleStatusSchema = z.enum([
|
|
36
|
-
"draft",
|
|
37
|
-
"published",
|
|
38
|
-
"out_of_stock",
|
|
39
|
-
"archived",
|
|
40
|
-
]);
|
|
41
|
-
const mediaInputSchema = z.object({
|
|
42
|
-
url: z.string(),
|
|
43
|
-
thumbnailUrl: z.string().optional(),
|
|
44
|
-
});
|
|
45
|
-
export const bundleCreateInputSchema = z.object({
|
|
46
|
-
id: z.string().optional(),
|
|
47
|
-
slug: z.string().optional(),
|
|
48
|
-
title: z.string().min(1).max(200),
|
|
49
|
-
description: z.string().max(5000).optional(),
|
|
50
|
-
storeId: z.string().min(1),
|
|
51
|
-
storeName: z.string().min(1),
|
|
52
|
-
status: bundleStatusSchema.optional(),
|
|
53
|
-
bundleItems: z.array(bundleItemInputSchema)
|
|
54
|
-
.min(BUNDLE_ITEM_MIN, `Bundle must contain at least ${BUNDLE_ITEM_MIN} items`)
|
|
55
|
-
.max(BUNDLE_ITEM_MAX, `Bundle may contain at most ${BUNDLE_ITEM_MAX} items`)
|
|
56
|
-
.refine((items) => items.every((it) => it.listingType === items[0].listingType), { message: "All bundleItems must share the same listingType" }),
|
|
57
|
-
bundlePrice: z.number().int().min(0),
|
|
58
|
-
bundleOriginalTotal: z.number().int().min(0).optional(),
|
|
59
|
-
category: z.string().optional(),
|
|
60
|
-
categorySlug: z.string().optional(),
|
|
61
|
-
subcategory: z.string().optional(),
|
|
62
|
-
sublistingCategoryId: z.string().optional(),
|
|
63
|
-
brandSlug: z.string().optional(),
|
|
64
|
-
tags: z.array(z.string()).optional(),
|
|
65
|
-
images: z.array(z.string()).optional(),
|
|
66
|
-
video: mediaInputSchema.optional(),
|
|
67
|
-
maxPerUser: z.number().int().min(1).optional(),
|
|
68
|
-
isFeatured: z.boolean().optional(),
|
|
69
|
-
isPromoted: z.boolean().optional(),
|
|
70
|
-
});
|
|
71
|
-
export const bundleUpdateInputSchema = bundleCreateInputSchema.partial();
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// SB-UNI X3 — migrations shell for cart/cartItem.
|
|
2
|
-
// v1 schema is current; no migrations needed yet.
|
|
3
|
-
//
|
|
4
|
-
// To add a migration:
|
|
5
|
-
// 1. Bump the relevant SCHEMA_VERSIONS entry in
|
|
6
|
-
// `_internal/shared/schema-versions.ts` (e.g. `cart: 2`)
|
|
7
|
-
// 2. Add a row below keyed by the FROM-version, returning the upgraded doc
|
|
8
|
-
// 3. Repository wraps reads with `migrateDocument(doc, current, migrations)`
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
export const migrations = {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// SB-UNI X3 — migrations shell for category.
|
|
2
|
-
// v1 schema is current; no migrations needed yet.
|
|
3
|
-
//
|
|
4
|
-
// To add a migration:
|
|
5
|
-
// 1. Bump the relevant SCHEMA_VERSIONS entry in
|
|
6
|
-
// `_internal/shared/schema-versions.ts` (e.g. `categories: 2`)
|
|
7
|
-
// 2. Add a row below keyed by the FROM-version, returning the upgraded doc
|
|
8
|
-
// 3. Repository wraps reads with `migrateDocument(doc, current, migrations)`
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
export const migrations = {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// SB-UNI X3 — migrations shell for event/eventEntry.
|
|
2
|
-
// v1 schema is current; no migrations needed yet.
|
|
3
|
-
//
|
|
4
|
-
// To add a migration:
|
|
5
|
-
// 1. Bump the relevant SCHEMA_VERSIONS entry in
|
|
6
|
-
// `_internal/shared/schema-versions.ts` (e.g. `events: 2`)
|
|
7
|
-
// 2. Add a row below keyed by the FROM-version, returning the upgraded doc
|
|
8
|
-
// 3. Repository wraps reads with `migrateDocument(doc, current, migrations)`
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
export const migrations = {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// SB-UNI X3 — migrations shell for faq.
|
|
2
|
-
// v1 schema is current; no migrations needed yet.
|
|
3
|
-
//
|
|
4
|
-
// To add a migration:
|
|
5
|
-
// 1. Bump the relevant SCHEMA_VERSIONS entry in
|
|
6
|
-
// `_internal/shared/schema-versions.ts` (e.g. `faq: 2`)
|
|
7
|
-
// 2. Add a row below keyed by the FROM-version, returning the upgraded doc
|
|
8
|
-
// 3. Repository wraps reads with `migrateDocument(doc, current, migrations)`
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
export const migrations = {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// SB-UNI X3 — migrations shell for groupedListing.
|
|
2
|
-
// v1 schema is current; no migrations needed yet.
|
|
3
|
-
//
|
|
4
|
-
// To add a migration:
|
|
5
|
-
// 1. Bump the relevant SCHEMA_VERSIONS entry in
|
|
6
|
-
// `_internal/shared/schema-versions.ts` (e.g. `grouped: 2`)
|
|
7
|
-
// 2. Add a row below keyed by the FROM-version, returning the upgraded doc
|
|
8
|
-
// 3. Repository wraps reads with `migrateDocument(doc, current, migrations)`
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
export const migrations = {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// SB-UNI X3 — migrations shell for history.
|
|
2
|
-
// v1 schema is current; no migrations needed yet.
|
|
3
|
-
//
|
|
4
|
-
// To add a migration:
|
|
5
|
-
// 1. Bump the relevant SCHEMA_VERSIONS entry in
|
|
6
|
-
// `_internal/shared/schema-versions.ts` (e.g. `history: 2`)
|
|
7
|
-
// 2. Add a row below keyed by the FROM-version, returning the upgraded doc
|
|
8
|
-
// 3. Repository wraps reads with `migrateDocument(doc, current, migrations)`
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
export const migrations = {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// SB-UNI X3 — migrations shell for conversation.
|
|
2
|
-
// v1 schema is current; no migrations needed yet.
|
|
3
|
-
//
|
|
4
|
-
// To add a migration:
|
|
5
|
-
// 1. Bump the relevant SCHEMA_VERSIONS entry in
|
|
6
|
-
// `_internal/shared/schema-versions.ts` (e.g. `messages: 2`)
|
|
7
|
-
// 2. Add a row below keyed by the FROM-version, returning the upgraded doc
|
|
8
|
-
// 3. Repository wraps reads with `migrateDocument(doc, current, migrations)`
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
export const migrations = {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// SB-UNI X3 — migrations shell for order.
|
|
2
|
-
// v1 schema is current; no migrations needed yet.
|
|
3
|
-
//
|
|
4
|
-
// To add a migration:
|
|
5
|
-
// 1. Bump the relevant SCHEMA_VERSIONS entry in
|
|
6
|
-
// `_internal/shared/schema-versions.ts` (e.g. `orders: 2`)
|
|
7
|
-
// 2. Add a row below keyed by the FROM-version, returning the upgraded doc
|
|
8
|
-
// 3. Repository wraps reads with `migrateDocument(doc, current, migrations)`
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
export const migrations = {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// SB-UNI X3 — migrations shell for payout.
|
|
2
|
-
// v1 schema is current; no migrations needed yet.
|
|
3
|
-
//
|
|
4
|
-
// To add a migration:
|
|
5
|
-
// 1. Bump the relevant SCHEMA_VERSIONS entry in
|
|
6
|
-
// `_internal/shared/schema-versions.ts` (e.g. `payments: 2`)
|
|
7
|
-
// 2. Add a row below keyed by the FROM-version, returning the upgraded doc
|
|
8
|
-
// 3. Repository wraps reads with `migrateDocument(doc, current, migrations)`
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
export const migrations = {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// SB-UNI X3 — migrations shell for product/productFeature/productTemplate.
|
|
2
|
-
// v1 schema is current; no migrations needed yet.
|
|
3
|
-
//
|
|
4
|
-
// To add a migration:
|
|
5
|
-
// 1. Bump the relevant SCHEMA_VERSIONS entry in
|
|
6
|
-
// `_internal/shared/schema-versions.ts` (e.g. `products: 2`)
|
|
7
|
-
// 2. Add a row below keyed by the FROM-version, returning the upgraded doc
|
|
8
|
-
// 3. Repository wraps reads with `migrateDocument(doc, current, migrations)`
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
-
export const migrations = {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BaseRepository, type FirebaseSieveFields, type FirebaseSieveResult, type SieveModel } from "../../../providers/db-firebase";
|
|
2
|
-
import { type SublistingCategoryCreateInput, type SublistingCategoryDocument, type SublistingCategoryUpdateInput } from "../schemas/sublisting-categories";
|
|
3
|
-
export declare class SublistingCategoriesRepository extends BaseRepository<SublistingCategoryDocument> {
|
|
4
|
-
static readonly SIEVE_FIELDS: FirebaseSieveFields;
|
|
5
|
-
constructor();
|
|
6
|
-
generateId(name: string): string;
|
|
7
|
-
list(model: SieveModel): Promise<FirebaseSieveResult<SublistingCategoryDocument>>;
|
|
8
|
-
findBySlug(slug: string): Promise<SublistingCategoryDocument | null>;
|
|
9
|
-
create(input: SublistingCategoryCreateInput): Promise<SublistingCategoryDocument>;
|
|
10
|
-
update(id: string, input: SublistingCategoryUpdateInput): Promise<SublistingCategoryDocument>;
|
|
11
|
-
delete(id: string): Promise<void>;
|
|
12
|
-
/** Returns products/auctions/pre-orders with matching sublistingCategoryId, ordered by price asc. */
|
|
13
|
-
getListingsByCategoryId(categoryId: string, limit?: number): Promise<Record<string, unknown>[]>;
|
|
14
|
-
incrementProductCount(id: string, delta: number): Promise<void>;
|
|
15
|
-
}
|
|
16
|
-
export declare const sublistingCategoriesRepository: SublistingCategoriesRepository;
|