@mohasinac/appkit 4.13.1 → 4.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/client/features/layout/DashboardLayoutClient.js +14 -5
- package/dist/_internal/client/features/lottery/LotteryAdminEditView.d.ts +3 -0
- package/dist/_internal/client/features/lottery/LotteryAdminEditView.js +6 -0
- package/dist/_internal/client/features/lottery/LotteryDetailView.d.ts +8 -0
- package/dist/_internal/client/features/lottery/LotteryDetailView.js +4 -1
- package/dist/_internal/client/features/lottery/LotteryListView.d.ts +7 -0
- package/dist/_internal/client/features/lottery/LotteryListView.js +1 -1
- package/dist/_internal/client/features/lottery/PrizeDrawLotteryDetailView.js +4 -1
- package/dist/_internal/client/features/lottery/slot-collage-items.d.ts +15 -0
- package/dist/_internal/client/features/lottery/slot-collage-items.js +13 -0
- package/dist/_internal/server/features/auctions/actions.js +8 -2
- package/dist/_internal/server/features/bundles/data.d.ts +16 -0
- package/dist/_internal/server/features/bundles/data.js +26 -0
- package/dist/_internal/server/features/bundles/index.d.ts +1 -1
- package/dist/_internal/server/features/bundles/index.js +1 -1
- package/dist/_internal/server/features/cart/service.d.ts +3 -3
- package/dist/_internal/server/features/checkout/actions.js +25 -0
- package/dist/_internal/server/features/checkout/locked-lines.d.ts +38 -0
- package/dist/_internal/server/features/checkout/locked-lines.js +171 -0
- package/dist/_internal/server/features/checkout/source-context.d.ts +5 -0
- package/dist/_internal/server/features/checkout/source-context.js +157 -0
- package/dist/_internal/server/features/homepage/index.d.ts +0 -1
- package/dist/_internal/server/features/homepage/index.js +7 -1
- package/dist/_internal/server/features/lottery/adapters.js +4 -0
- package/dist/_internal/server/features/offers/adapters.d.ts +103 -0
- package/dist/_internal/server/features/offers/adapters.js +88 -0
- package/dist/_internal/server/features/offers/index.d.ts +2 -0
- package/dist/_internal/server/features/offers/index.js +1 -0
- package/dist/_internal/server/features/orders/adapters.js +24 -0
- package/dist/_internal/server/features/products/data.js +15 -37
- package/dist/_internal/server/features/products/index.d.ts +1 -1
- package/dist/_internal/server/features/products/index.js +1 -1
- package/dist/_internal/server/features/products/list-public.d.ts +46 -20
- package/dist/_internal/server/features/products/list-public.js +266 -90
- package/dist/_internal/server/features/products/listing-tab-counts.d.ts +44 -0
- package/dist/_internal/server/features/products/listing-tab-counts.js +97 -0
- package/dist/_internal/server/features/site-settings/adapters.d.ts +51 -0
- package/dist/_internal/server/features/site-settings/adapters.js +75 -0
- package/dist/_internal/server/features/site-settings/index.d.ts +1 -0
- package/dist/_internal/server/features/site-settings/index.js +1 -0
- package/dist/_internal/server/features/stores/adapters.d.ts +56 -0
- package/dist/_internal/server/features/stores/adapters.js +91 -0
- package/dist/_internal/server/features/stores/index.d.ts +1 -0
- package/dist/_internal/server/features/stores/index.js +1 -0
- package/dist/_internal/server/jobs/core/auctionSettlement.js +56 -2
- package/dist/_internal/server/jobs/core/offerExpiry.js +55 -19
- package/dist/_internal/server/jobs/core/paymentReviewAutoApprove.d.ts +5 -0
- package/dist/_internal/server/jobs/core/paymentReviewAutoApprove.js +33 -1
- package/dist/_internal/server/jobs/handlers/messages.d.ts +7 -0
- package/dist/_internal/server/jobs/handlers/messages.js +10 -0
- package/dist/_internal/shared/actions/action-registry.js +17 -1
- package/dist/_internal/shared/checkout/lanes.d.ts +25 -0
- package/dist/_internal/shared/checkout/lanes.js +26 -0
- package/dist/_internal/shared/features/auctions/config.d.ts +27 -0
- package/dist/_internal/shared/features/auctions/config.js +27 -0
- package/dist/_internal/shared/features/auctions/schema.d.ts +14 -2
- package/dist/_internal/shared/features/auctions/schema.js +13 -1
- package/dist/_internal/shared/features/blog/schema.d.ts +2 -2
- package/dist/_internal/shared/features/cart/schema.d.ts +20 -15
- package/dist/_internal/shared/features/cart/schema.js +15 -0
- package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +32 -32
- package/dist/_internal/shared/features/emi/schedule.d.ts +24 -3
- package/dist/_internal/shared/features/emi/schedule.js +20 -5
- package/dist/_internal/shared/features/events/schema.d.ts +2 -2
- package/dist/_internal/shared/features/homepage/section-gate.d.ts +14 -0
- package/dist/_internal/shared/features/homepage/section-gate.js +51 -0
- package/dist/_internal/shared/features/offers/config.d.ts +30 -0
- package/dist/_internal/shared/features/offers/config.js +59 -0
- package/dist/_internal/shared/features/orders/schema.d.ts +8 -8
- package/dist/_internal/shared/features/products/schema.d.ts +30 -30
- package/dist/_internal/shared/features/products/to-product-item.js +6 -0
- package/dist/_internal/shared/features/reviews/schema.d.ts +2 -2
- package/dist/_internal/shared/features/site-settings/fees.d.ts +60 -0
- package/dist/_internal/shared/features/site-settings/fees.js +39 -0
- package/dist/_internal/shared/features/site-settings/types.d.ts +40 -0
- package/dist/_internal/shared/features/site-settings/types.js +1 -0
- package/dist/_internal/shared/history/history.d.ts +88 -0
- package/dist/_internal/shared/history/history.js +198 -0
- package/dist/_internal/shared/history/index.d.ts +4 -0
- package/dist/_internal/shared/history/index.js +2 -0
- package/dist/_internal/shared/history/types.d.ts +61 -0
- package/dist/_internal/shared/history/types.js +6 -0
- package/dist/_internal/shared/listing-types/_registry.d.ts +54 -1
- package/dist/_internal/shared/listing-types/_registry.js +67 -0
- package/dist/_internal/shared/listing-types/art/config.d.ts +3 -0
- package/dist/_internal/shared/listing-types/art/config.js +5 -0
- package/dist/_internal/shared/listing-types/auction/config.d.ts +13 -0
- package/dist/_internal/shared/listing-types/auction/config.js +21 -0
- package/dist/_internal/shared/listing-types/availability.d.ts +79 -0
- package/dist/_internal/shared/listing-types/availability.js +104 -0
- package/dist/_internal/shared/listing-types/capabilities.d.ts +15 -0
- package/dist/_internal/shared/listing-types/capabilities.js +12 -0
- package/dist/_internal/shared/listing-types/classified/config.d.ts +3 -0
- package/dist/_internal/shared/listing-types/classified/config.js +5 -0
- package/dist/_internal/shared/listing-types/digital-code/config.d.ts +11 -0
- package/dist/_internal/shared/listing-types/digital-code/config.js +22 -2
- package/dist/_internal/shared/listing-types/live/config.d.ts +3 -0
- package/dist/_internal/shared/listing-types/live/config.js +5 -0
- package/dist/_internal/shared/listing-types/pre-order/config.d.ts +3 -0
- package/dist/_internal/shared/listing-types/pre-order/config.js +19 -0
- package/dist/_internal/shared/listing-types/prize-draw/config.d.ts +11 -0
- package/dist/_internal/shared/listing-types/prize-draw/config.js +15 -0
- package/dist/_internal/shared/listing-types/standard/config.d.ts +3 -0
- package/dist/_internal/shared/listing-types/standard/config.js +5 -0
- package/dist/_internal/shared/listing-types/stickers/config.d.ts +3 -0
- package/dist/_internal/shared/listing-types/stickers/config.js +5 -0
- package/dist/client.d.ts +20 -7
- package/dist/client.js +22 -4
- package/dist/constants/api-endpoints.d.ts +6 -0
- package/dist/constants/api-endpoints.js +2 -0
- package/dist/constants/field-names.d.ts +57 -8
- package/dist/constants/field-names.js +101 -8
- package/dist/constants/table-keys.d.ts +17 -0
- package/dist/constants/table-keys.js +17 -0
- package/dist/errors/error-codes.d.ts +13 -1
- package/dist/errors/error-codes.js +13 -1
- package/dist/errors/error-display-map.js +12 -3
- package/dist/errors/messages.d.ts +10 -2
- package/dist/errors/messages.js +10 -2
- package/dist/features/about/components/AboutView.d.ts +3 -0
- package/dist/features/about/components/AboutView.js +3 -2
- package/dist/features/about/components/PolicyPageView.d.ts +2 -1
- package/dist/features/about/components/PolicyPageView.js +61 -23
- package/dist/features/about/components/PublicProfileView.js +5 -0
- package/dist/features/about/schemas/firestore.d.ts +3 -0
- package/dist/features/account/components/UserBidsView.js +12 -4
- package/dist/features/account/components/UserOrdersView.js +7 -0
- package/dist/features/account/components/UserReturnsView.d.ts +3 -0
- package/dist/features/account/components/UserReturnsView.js +17 -1
- package/dist/features/account/components/index.d.ts +0 -2
- package/dist/features/account/components/index.js +0 -1
- package/dist/features/account/schemas/index.d.ts +2 -2
- package/dist/features/account/types/index.d.ts +21 -2
- package/dist/features/addresses/schemas/index.d.ts +4 -4
- package/dist/features/admin/components/AdminArtView.js +8 -3
- package/dist/features/admin/components/AdminAuditLogView.js +1 -0
- package/dist/features/admin/components/AdminBidsView.js +15 -2
- package/dist/features/admin/components/AdminBlogEditorView.js +65 -33
- package/dist/features/admin/components/AdminClassifiedView.js +8 -3
- package/dist/features/admin/components/AdminDigitalCodesView.js +8 -3
- package/dist/features/admin/components/AdminFeatureEditorView.js +35 -6
- package/dist/features/admin/components/AdminFeatureFlagsView.js +1 -0
- package/dist/features/admin/components/AdminLiveView.js +8 -3
- package/dist/features/admin/components/AdminNavEditorView.js +15 -5
- package/dist/features/admin/components/AdminNewsletterView.js +18 -2
- package/dist/features/admin/components/AdminOffersView.d.ts +4 -0
- package/dist/features/admin/components/AdminOffersView.js +230 -0
- package/dist/features/admin/components/AdminOrdersView.js +10 -1
- package/dist/features/admin/components/AdminPaymentMethodsView.js +24 -4
- package/dist/features/admin/components/AdminPrizeDrawsView.js +5 -0
- package/dist/features/admin/components/AdminProductsView.js +16 -29
- package/dist/features/admin/components/AdminScammerEditorView.d.ts +2 -1
- package/dist/features/admin/components/AdminScammerEditorView.js +3 -13
- package/dist/features/admin/components/AdminScammersView.js +3 -8
- package/dist/features/admin/components/AdminSectionsView.js +32 -23
- package/dist/features/admin/components/AdminSessionsView.js +17 -2
- package/dist/features/admin/components/AdminSiteSettingsView.js +31 -13
- package/dist/features/admin/components/AdminSiteView.js +6 -2
- package/dist/features/admin/components/AdminStickersView.js +8 -3
- package/dist/features/admin/components/ViewAuditLogEntryModal.js +1 -0
- package/dist/features/admin/components/index.d.ts +2 -0
- package/dist/features/admin/components/index.js +1 -0
- package/dist/features/admin/components/sections/adminSectionsTypes.d.ts +4 -2
- package/dist/features/admin/components/sections/adminSectionsTypes.js +45 -27
- package/dist/features/admin/constants/filter-tabs.d.ts +89 -0
- package/dist/features/admin/constants/filter-tabs.js +56 -0
- package/dist/features/admin/schemas/firestore.d.ts +122 -3
- package/dist/features/admin/schemas/firestore.js +1 -0
- package/dist/features/admin/schemas/homepage-section-form.d.ts +22 -0
- package/dist/features/admin/schemas/homepage-section-form.js +68 -0
- package/dist/features/admin/schemas/nav-item-form.d.ts +74 -0
- package/dist/features/admin/schemas/nav-item-form.js +72 -0
- package/dist/features/auctions/actions/bid-actions.d.ts +20 -5
- package/dist/features/auctions/actions/bid-actions.js +93 -20
- package/dist/features/auctions/components/AuctionBidsTable.d.ts +10 -1
- package/dist/features/auctions/components/AuctionBidsTable.js +22 -4
- package/dist/features/auctions/components/AuctionDetailPageView.js +11 -6
- package/dist/features/auctions/components/AuctionsListView.js +5 -6
- package/dist/features/auctions/components/MarketplaceAuctionCard.d.ts +7 -0
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +19 -2
- package/dist/features/auctions/components/PlaceBidFormClient.d.ts +1 -2
- package/dist/features/auctions/components/PlaceBidFormClient.js +8 -4
- package/dist/features/auctions/components/bid-detail-fields.d.ts +29 -0
- package/dist/features/auctions/components/bid-detail-fields.js +103 -0
- package/dist/features/auctions/repository/bid.repository.d.ts +13 -0
- package/dist/features/auctions/repository/bid.repository.js +23 -0
- package/dist/features/auctions/schemas/firestore.d.ts +17 -0
- package/dist/features/auctions/schemas/index.d.ts +12 -12
- package/dist/features/audit-log/schemas/firestore.d.ts +14 -0
- package/dist/features/audit-log/schemas/firestore.js +7 -0
- package/dist/features/auth/permissions/constants.d.ts +1 -1
- package/dist/features/auth/permissions/constants.js +10 -1
- package/dist/features/blog/actions/blog-actions.d.ts +7 -7
- package/dist/features/blog/schemas/blog-form.d.ts +80 -0
- package/dist/features/blog/schemas/blog-form.js +100 -0
- package/dist/features/blog/schemas/index.d.ts +6 -6
- package/dist/features/cart/repository/cart.repository.js +1 -0
- package/dist/features/cart/schemas/firestore.d.ts +15 -0
- package/dist/features/catalogue/schemas/validation.d.ts +4 -4
- package/dist/features/categories/components/BrandDetailPageView.js +23 -40
- package/dist/features/categories/components/BrandDetailTabs.d.ts +7 -7
- package/dist/features/categories/components/BrandDetailTabs.js +8 -12
- package/dist/features/categories/components/BundleCollage.js +1 -1
- package/dist/features/categories/components/CategoryDetailPageView.js +53 -57
- package/dist/features/categories/components/CategoryDetailTabs.d.ts +10 -8
- package/dist/features/categories/components/CategoryDetailTabs.js +11 -16
- package/dist/features/categories/components/CategoryProductsListing.js +11 -1
- package/dist/features/categories/components/ConcernCard.js +7 -1
- package/dist/features/categories/schemas/firestore.d.ts +13 -0
- package/dist/features/categories/schemas/index.d.ts +26 -26
- package/dist/features/classified/components/ClassifiedDetailPageView.d.ts +16 -1
- package/dist/features/classified/components/ClassifiedDetailPageView.js +23 -3
- package/dist/features/events/components/AdminEventEditorView.js +32 -54
- package/dist/features/events/components/AdminEventEntriesView.js +22 -3
- package/dist/features/events/components/AdminEventsView.js +15 -11
- package/dist/features/events/components/EventFilters.d.ts +9 -1
- package/dist/features/events/components/EventFilters.js +45 -21
- package/dist/features/events/components/EventsIndexListing.d.ts +6 -1
- package/dist/features/events/components/EventsIndexListing.js +2 -2
- package/dist/features/events/components/EventsListPageView.js +13 -4
- package/dist/features/events/repository/events.repository.d.ts +17 -0
- package/dist/features/events/repository/events.repository.js +27 -0
- package/dist/features/events/schemas/event-form.d.ts +113 -0
- package/dist/features/events/schemas/event-form.js +82 -0
- package/dist/features/events/schemas/firestore.d.ts +12 -0
- package/dist/features/events/schemas/firestore.js +12 -0
- package/dist/features/events/schemas/index.d.ts +50 -50
- package/dist/features/events/types/index.d.ts +11 -0
- package/dist/features/events/types/index.js +57 -1
- package/dist/features/faq/actions/faq-actions.d.ts +12 -12
- package/dist/features/faq/schemas/index.d.ts +8 -8
- package/dist/features/filters/FilterFacetSection.d.ts +7 -1
- package/dist/features/filters/FilterFacetSection.js +11 -3
- package/dist/features/grouped/schemas/grouped-listing-form.d.ts +101 -0
- package/dist/features/grouped/schemas/grouped-listing-form.js +89 -0
- package/dist/features/grouped/schemas/index.d.ts +4 -4
- package/dist/features/homepage/actions/homepage-section-actions.d.ts +11 -3
- package/dist/features/homepage/actions/homepage-section-actions.js +33 -1
- package/dist/features/homepage/components/AnnouncementBar.d.ts +7 -1
- package/dist/features/homepage/components/AnnouncementBar.js +3 -3
- package/dist/features/homepage/components/MarketplaceHomepageView.js +20 -6
- package/dist/features/homepage/hooks/homepage-query.d.ts +16 -0
- package/dist/features/homepage/hooks/homepage-query.js +45 -0
- package/dist/features/homepage/hooks/useFeaturedAuctions.d.ts +10 -0
- package/dist/features/homepage/hooks/useFeaturedAuctions.js +28 -8
- package/dist/features/homepage/hooks/useFeaturedPreOrders.js +17 -8
- package/dist/features/homepage/hooks/useFeaturedProducts.js +15 -8
- package/dist/features/homepage/schemas/index.d.ts +33 -2
- package/dist/features/homepage/schemas/index.js +24 -0
- package/dist/features/layout/AppLayoutShell.d.ts +11 -1
- package/dist/features/layout/AppLayoutShell.js +15 -14
- package/dist/features/layout/BackToTop.d.ts +9 -0
- package/dist/features/layout/BackToTop.js +10 -1
- package/dist/features/layout/BottomActions.js +28 -25
- package/dist/features/layout/BottomChrome.d.ts +34 -0
- package/dist/features/layout/BottomChrome.js +55 -0
- package/dist/features/layout/BottomNavLayout.d.ts +6 -0
- package/dist/features/layout/BottomNavLayout.js +7 -1
- package/dist/features/layout/BottomNavbar.js +15 -2
- package/dist/features/layout/FooterLayout.js +11 -1
- package/dist/features/layout/NavbarLayout.js +1 -1
- package/dist/features/layout/TitleBarLayout.d.ts +7 -0
- package/dist/features/layout/TitleBarLayout.js +28 -5
- package/dist/features/layout/index.d.ts +2 -0
- package/dist/features/layout/index.js +1 -0
- package/dist/features/lottery/types/index.d.ts +3 -0
- package/dist/features/media/MediaPickerModal.js +5 -1
- package/dist/features/messages/schemas/index.d.ts +2 -2
- package/dist/features/orders/components/OrderScopeTabs.d.ts +20 -0
- package/dist/features/orders/components/OrderScopeTabs.js +31 -0
- package/dist/features/orders/components/OrderStatusTimeline.d.ts +5 -1
- package/dist/features/orders/components/OrderStatusTimeline.js +39 -20
- package/dist/features/orders/constants/order-scope.d.ts +48 -0
- package/dist/features/orders/constants/order-scope.js +111 -0
- package/dist/features/orders/repository/orders.repository.d.ts +54 -7
- package/dist/features/orders/repository/orders.repository.js +121 -22
- package/dist/features/orders/schemas/firestore.d.ts +152 -0
- package/dist/features/orders/schemas/firestore.js +30 -0
- package/dist/features/orders/schemas/index.d.ts +18 -18
- package/dist/features/orders/types/index.d.ts +35 -7
- package/dist/features/pre-orders/components/PreOrdersIndexListing.js +14 -9
- package/dist/features/pre-orders/components/PreOrdersListView.js +6 -5
- package/dist/features/pre-orders/schemas/index.d.ts +1 -1
- package/dist/features/products/actions/product-actions.d.ts +14 -0
- package/dist/features/products/actions/product-actions.js +49 -11
- package/dist/features/products/api/route.d.ts +12 -0
- package/dist/features/products/api/route.js +42 -100
- package/dist/features/products/components/ArtStickersListView.js +2 -2
- package/dist/features/products/components/AuctionsIndexListing.js +13 -11
- package/dist/features/products/components/AvailabilityTabs.d.ts +11 -0
- package/dist/features/products/components/AvailabilityTabs.js +47 -0
- package/dist/features/products/components/GroupSettingsPanel.js +5 -1
- package/dist/features/products/components/MakeOfferButton.js +48 -49
- package/dist/features/products/components/PrizeDrawCollage.d.ts +20 -4
- package/dist/features/products/components/PrizeDrawCollage.js +9 -1
- package/dist/features/products/components/PrizeDrawsIndexListing.js +14 -12
- package/dist/features/products/components/PrizeDrawsListingView.js +2 -2
- package/dist/features/products/components/PrizeDrawsSection.d.ts +7 -1
- package/dist/features/products/components/PrizeDrawsSection.js +23 -18
- package/dist/features/products/components/ProductDetailPageView.d.ts +4 -1
- package/dist/features/products/components/ProductDetailPageView.js +18 -4
- package/dist/features/products/components/ProductForm.js +5 -2
- package/dist/features/products/components/ProductGrid.js +6 -1
- package/dist/features/products/components/ProductsIndexListing.js +22 -32
- package/dist/features/products/components/ProductsIndexPageView.js +6 -9
- package/dist/features/products/components/index.d.ts +2 -2
- package/dist/features/products/components/index.js +1 -1
- package/dist/features/products/config/listing-type-listing-config.d.ts +20 -0
- package/dist/features/products/config/listing-type-listing-config.js +22 -10
- package/dist/features/products/constants/action-defs.d.ts +2 -0
- package/dist/features/products/constants/action-defs.js +6 -0
- package/dist/features/products/hooks/useAvailabilityScope.d.ts +13 -0
- package/dist/features/products/hooks/useAvailabilityScope.js +19 -0
- package/dist/features/products/hooks/useProducts.d.ts +5 -0
- package/dist/features/products/hooks/useProducts.js +13 -2
- package/dist/features/products/repository/products.repository.d.ts +31 -2
- package/dist/features/products/repository/products.repository.js +53 -21
- package/dist/features/products/schemas/firestore.d.ts +17 -3
- package/dist/features/products/schemas/firestore.js +7 -2
- package/dist/features/products/schemas/index.d.ts +64 -64
- package/dist/features/products/schemas/product-features.validators.d.ts +79 -6
- package/dist/features/products/schemas/product-features.validators.js +63 -0
- package/dist/features/products/types/index.d.ts +16 -1
- package/dist/features/promotions/schemas/index.d.ts +2 -2
- package/dist/features/reviews/schemas/index.d.ts +16 -16
- package/dist/features/scams/constants/scammer-status-display.d.ts +28 -0
- package/dist/features/scams/constants/scammer-status-display.js +79 -0
- package/dist/features/search/schemas/index.d.ts +4 -4
- package/dist/features/seller/actions/offer-actions.js +57 -4
- package/dist/features/seller/components/OfferPhaseTimeline.d.ts +59 -0
- package/dist/features/seller/components/OfferPhaseTimeline.js +107 -0
- package/dist/features/seller/components/SellerArtView.js +5 -0
- package/dist/features/seller/components/SellerAuctionsView.js +13 -15
- package/dist/features/seller/components/SellerBidsView.js +11 -4
- package/dist/features/seller/components/SellerClassifiedView.js +5 -0
- package/dist/features/seller/components/SellerCouponEditorView.js +17 -17
- package/dist/features/seller/components/SellerDigitalCodesView.js +5 -0
- package/dist/features/seller/components/SellerLiveView.js +5 -0
- package/dist/features/seller/components/SellerOffersView.js +2 -1
- package/dist/features/seller/components/SellerOrdersView.js +31 -9
- package/dist/features/seller/components/SellerPayoutSettingsView.js +56 -31
- package/dist/features/seller/components/SellerPreOrdersView.js +5 -0
- package/dist/features/seller/components/SellerPrizeDrawsView.js +14 -16
- package/dist/features/seller/components/SellerProductShell.js +7 -1
- package/dist/features/seller/components/SellerProductsView.js +11 -8
- package/dist/features/seller/components/SellerStickersView.js +5 -0
- package/dist/features/seller/components/index.d.ts +0 -2
- package/dist/features/seller/components/index.js +0 -1
- package/dist/features/seller/repository/offer.repository.d.ts +142 -24
- package/dist/features/seller/repository/offer.repository.js +165 -26
- package/dist/features/seller/schemas/coupon-form.d.ts +72 -0
- package/dist/features/seller/schemas/coupon-form.js +116 -0
- package/dist/features/seller/schemas/firestore.d.ts +56 -2
- package/dist/features/seller/schemas/firestore.js +27 -0
- package/dist/features/seller/schemas/index.d.ts +2 -2
- package/dist/features/seller/schemas/offer-forms.d.ts +46 -0
- package/dist/features/seller/schemas/offer-forms.js +42 -0
- package/dist/features/seller/server.d.ts +0 -1
- package/dist/features/seller/server.js +0 -1
- package/dist/features/shell/SectionForm.d.ts +99 -0
- package/dist/features/shell/SectionForm.js +128 -0
- package/dist/features/shell/build-sections.d.ts +63 -0
- package/dist/features/shell/build-sections.js +207 -0
- package/dist/features/shell/entity-form.d.ts +109 -0
- package/dist/features/shell/entity-form.js +96 -0
- package/dist/features/shell/field-ui-meta.d.ts +115 -0
- package/dist/features/shell/field-ui-meta.js +324 -0
- package/dist/features/shell/index.d.ts +8 -0
- package/dist/features/shell/index.js +4 -0
- package/dist/features/status-history/components/StatusTimeline.d.ts +74 -0
- package/dist/features/status-history/components/StatusTimeline.js +46 -0
- package/dist/features/status-history/index.d.ts +11 -0
- package/dist/features/status-history/index.js +10 -0
- package/dist/features/store-extensions/components/ReviewDecisionModal.d.ts +27 -0
- package/dist/features/store-extensions/components/ReviewDecisionModal.js +82 -0
- package/dist/features/store-extensions/index.d.ts +12 -0
- package/dist/features/store-extensions/index.js +12 -0
- package/dist/features/store-extensions/schemas/admin-notification-form.d.ts +36 -0
- package/dist/features/store-extensions/schemas/admin-notification-form.js +114 -0
- package/dist/features/store-extensions/schemas/analytics-forms.d.ts +57 -0
- package/dist/features/store-extensions/schemas/analytics-forms.js +158 -0
- package/dist/features/store-extensions/schemas/custom-role-form.d.ts +85 -0
- package/dist/features/store-extensions/schemas/custom-role-form.js +118 -0
- package/dist/features/store-extensions/schemas/firestore.d.ts +21 -1
- package/dist/features/store-extensions/schemas/firestore.js +60 -0
- package/dist/features/store-extensions/schemas/google-config-form.d.ts +53 -0
- package/dist/features/store-extensions/schemas/google-config-form.js +105 -0
- package/dist/features/store-extensions/schemas/item-request-create-form.d.ts +28 -0
- package/dist/features/store-extensions/schemas/item-request-create-form.js +80 -0
- package/dist/features/store-extensions/schemas/listing-template-form.d.ts +78 -0
- package/dist/features/store-extensions/schemas/listing-template-form.js +87 -0
- package/dist/features/store-extensions/schemas/moderation-review-form.d.ts +49 -0
- package/dist/features/store-extensions/schemas/moderation-review-form.js +101 -0
- package/dist/features/store-extensions/schemas/payout-method-form.d.ts +153 -0
- package/dist/features/store-extensions/schemas/payout-method-form.js +155 -0
- package/dist/features/store-extensions/schemas/report-create-form.d.ts +25 -0
- package/dist/features/store-extensions/schemas/report-create-form.js +79 -0
- package/dist/features/store-extensions/schemas/report-review-form.d.ts +47 -0
- package/dist/features/store-extensions/schemas/report-review-form.js +111 -0
- package/dist/features/store-extensions/schemas/shipping-config-form.d.ts +148 -0
- package/dist/features/store-extensions/schemas/shipping-config-form.js +104 -0
- package/dist/features/store-extensions/schemas/store-category-form.d.ts +54 -0
- package/dist/features/store-extensions/schemas/store-category-form.js +73 -0
- package/dist/features/stores/api/[storeSlug]/route.js +2 -25
- package/dist/features/stores/components/StoreAuctionsListing.js +15 -1
- package/dist/features/stores/components/StoreClassifiedsListing.js +12 -2
- package/dist/features/stores/components/StoreDetailLayoutView.js +24 -71
- package/dist/features/stores/components/StoreDigitalCodesListing.js +12 -2
- package/dist/features/stores/components/StoreLiveItemsListing.js +12 -2
- package/dist/features/stores/components/StorePreOrdersListing.js +12 -1
- package/dist/features/stores/components/StoreProductsListing.js +11 -1
- package/dist/features/stores/repository/store.repository.js +6 -0
- package/dist/features/stores/schemas/index.d.ts +6 -6
- package/dist/features/support/schemas/index.d.ts +4 -4
- package/dist/features/tester/actions/checklist-item-actions.d.ts +4 -4
- package/dist/features/tester/seed-data/offers-tester-seed-data.js +119 -3
- package/dist/features/tester/seed-data/products-tester-seed-data.js +131 -1
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +431 -1
- package/dist/features/wishlist/hooks/useWishlistWithGuest.d.ts +1 -1
- package/dist/index.d.ts +25 -12
- package/dist/index.js +26 -11
- package/dist/next/routing/route-map.d.ts +23 -3
- package/dist/next/routing/route-map.js +14 -2
- package/dist/providers/db-firebase/base.repository.d.ts +30 -0
- package/dist/providers/db-firebase/base.repository.js +50 -1
- package/dist/providers/db-firebase/index.d.ts +1 -1
- package/dist/providers/db-firebase/index.js +1 -1
- package/dist/providers/db-firebase/sieve.d.ts +25 -0
- package/dist/providers/db-firebase/sieve.js +52 -18
- package/dist/react/hooks/useUrlTable.js +10 -1
- package/dist/schemas/firestore-value.d.ts +8 -0
- package/dist/schemas/firestore-value.js +44 -0
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/schemas/registry.d.ts +702 -69
- package/dist/schemas/registry.js +64 -1
- package/dist/seed/_helpers/category-forest.d.ts +2 -0
- package/dist/seed/_helpers/category-forest.js +309 -0
- package/dist/seed/_helpers/category-tree.d.ts +27 -0
- package/dist/seed/_helpers/category-tree.js +103 -0
- package/dist/seed/bids-seed-data.js +30 -0
- package/dist/seed/catalogue-seed-data.js +12 -12
- package/dist/seed/categories-seed-data.js +177 -162
- package/dist/seed/events-seed-data.js +61 -10
- package/dist/seed/homepage-sections-seed-data.js +5 -1
- package/dist/seed/offers-seed-data.js +244 -34
- package/dist/seed/orders-seed-data.js +336 -1
- package/dist/seed/products-art-seed-data.js +50 -12
- package/dist/seed/products-auctions-seed-data.js +138 -18
- package/dist/seed/products-classifieds-seed-data.js +80 -16
- package/dist/seed/products-digital-codes-seed-data.js +66 -18
- package/dist/seed/products-live-items-seed-data.js +64 -13
- package/dist/seed/products-preorders-seed-data.d.ts +0 -1
- package/dist/seed/products-preorders-seed-data.js +52 -13
- package/dist/seed/products-prize-draws-seed-data.js +63 -14
- package/dist/seed/products-standard-seed-data.js +99 -26
- package/dist/seed/products-stickers-seed-data.js +47 -12
- package/dist/seed/reviews-seed-data.js +6 -1
- package/dist/seed/site-settings-seed-data.d.ts +1 -38
- package/dist/seed/site-settings-seed-data.js +38 -76
- package/dist/seed/stores-seed-data.js +71 -1
- package/dist/seed/users-seed-data.js +15 -5
- package/dist/server-entry.d.ts +1 -2
- package/dist/server-entry.js +4 -3
- package/dist/server.d.ts +6 -3
- package/dist/server.js +13 -4
- package/dist/styles.css +78 -12
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/components/Button.style.css +19 -4
- package/dist/ui/components/CollapsibleSection.d.ts +17 -1
- package/dist/ui/components/CollapsibleSection.js +6 -2
- package/dist/ui/components/FilterChipGroup.d.ts +25 -1
- package/dist/ui/components/FilterChipGroup.js +21 -4
- package/dist/ui/components/HandMode.style.css +47 -0
- package/dist/ui/components/Layout.d.ts +9 -2
- package/dist/ui/components/Layout.js +1 -1
- package/dist/ui/components/ListingLayout.js +8 -8
- package/dist/ui/components/ListingLayout.style.css +8 -7
- package/dist/ui/components/RecordDetailModal.d.ts +10 -1
- package/dist/ui/components/RecordDetailModal.js +2 -2
- package/dist/ui/components/StickyToolbar.d.ts +3 -1
- package/dist/ui/components/StickyToolbar.js +62 -20
- package/dist/ui/components/bottom-chrome-slot.d.ts +21 -0
- package/dist/ui/components/bottom-chrome-slot.js +29 -0
- package/dist/ui/components/index.style.css +3 -0
- package/dist/ui/forms/FormShell.d.ts +43 -13
- package/dist/ui/forms/FormShell.js +22 -11
- package/dist/ui/forms/index.d.ts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/package.json +2 -1
- package/scripts/node-esm-loader.mjs +65 -0
- package/scripts/seed-cli-loader.mjs +6 -49
- package/scripts/seed-cli.mjs +1 -1
|
@@ -339,17 +339,16 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
339
339
|
updatedAt?: string | undefined;
|
|
340
340
|
storeId?: string | undefined;
|
|
341
341
|
features?: string[] | undefined;
|
|
342
|
-
category?: string | undefined;
|
|
343
|
-
featured?: boolean | undefined;
|
|
344
|
-
listingType?: "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live" | undefined;
|
|
345
|
-
isPromoted?: boolean | undefined;
|
|
346
342
|
description?: string | undefined;
|
|
347
343
|
slug?: string | undefined;
|
|
344
|
+
category?: string | undefined;
|
|
345
|
+
categorySlug?: string | undefined;
|
|
348
346
|
subcategory?: string | undefined;
|
|
349
347
|
stockQuantity?: number | undefined;
|
|
350
348
|
availableQuantity?: number | undefined;
|
|
351
349
|
mainImage?: string | undefined;
|
|
352
350
|
images?: string[] | undefined;
|
|
351
|
+
featured?: boolean | undefined;
|
|
353
352
|
tags?: string[] | undefined;
|
|
354
353
|
specifications?: {
|
|
355
354
|
value: string;
|
|
@@ -362,6 +361,7 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
362
361
|
insurance?: boolean | undefined;
|
|
363
362
|
insuranceCost?: number | undefined;
|
|
364
363
|
shippingPaidBy?: "seller" | "buyer" | undefined;
|
|
364
|
+
listingType?: "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live" | undefined;
|
|
365
365
|
auctionEndDate?: string | Date | undefined;
|
|
366
366
|
startingBid?: number | undefined;
|
|
367
367
|
currentBid?: number | undefined;
|
|
@@ -379,6 +379,33 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
379
379
|
preOrderCurrentCount?: number | undefined;
|
|
380
380
|
preOrderProductionStatus?: "upcoming" | "in_production" | "ready_to_ship" | undefined;
|
|
381
381
|
preOrderCancellable?: boolean | undefined;
|
|
382
|
+
isPromoted?: boolean | undefined;
|
|
383
|
+
pickupAddressId?: string | undefined;
|
|
384
|
+
viewCount?: number | undefined;
|
|
385
|
+
prizeRevealStatus?: "closed" | "open" | "pending" | undefined;
|
|
386
|
+
prizeRevealWindowStart?: string | Date | undefined;
|
|
387
|
+
prizeRevealWindowEnd?: string | Date | undefined;
|
|
388
|
+
prizeDrawDurationDays?: number | undefined;
|
|
389
|
+
prizeRevealMode?: "scheduled" | "instant" | undefined;
|
|
390
|
+
prizeCurrentEntries?: number | undefined;
|
|
391
|
+
prizeMaxEntries?: number | undefined;
|
|
392
|
+
pricePerEntry?: number | undefined;
|
|
393
|
+
rating?: number | undefined;
|
|
394
|
+
publishedAt?: string | undefined;
|
|
395
|
+
media?: {
|
|
396
|
+
type: "video" | "image" | "file";
|
|
397
|
+
url: string;
|
|
398
|
+
source?: "upload" | "youtube" | "external" | undefined;
|
|
399
|
+
alt?: string | undefined;
|
|
400
|
+
thumbnailUrl?: string | undefined;
|
|
401
|
+
youtubeId?: string | undefined;
|
|
402
|
+
duration?: number | undefined;
|
|
403
|
+
}[] | undefined;
|
|
404
|
+
seo?: {
|
|
405
|
+
title?: string | undefined;
|
|
406
|
+
description?: string | undefined;
|
|
407
|
+
keywords?: string[] | undefined;
|
|
408
|
+
} | undefined;
|
|
382
409
|
allowShipBeforeEmiComplete?: boolean | undefined;
|
|
383
410
|
printMeta?: {
|
|
384
411
|
size?: string | undefined;
|
|
@@ -386,8 +413,6 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
386
413
|
finish?: string | undefined;
|
|
387
414
|
editionSize?: number | undefined;
|
|
388
415
|
} | undefined;
|
|
389
|
-
pickupAddressId?: string | undefined;
|
|
390
|
-
viewCount?: number | undefined;
|
|
391
416
|
avgRating?: number | undefined;
|
|
392
417
|
reviewCount?: number | undefined;
|
|
393
418
|
bulkDiscounts?: {
|
|
@@ -432,33 +457,8 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
432
457
|
estimatedValue?: number | undefined;
|
|
433
458
|
wonByOrderId?: string | undefined;
|
|
434
459
|
}[] | undefined;
|
|
435
|
-
pricePerEntry?: number | undefined;
|
|
436
|
-
prizeMaxEntries?: number | undefined;
|
|
437
|
-
prizeCurrentEntries?: number | undefined;
|
|
438
|
-
prizeRevealWindowStart?: string | Date | undefined;
|
|
439
|
-
prizeRevealWindowEnd?: string | Date | undefined;
|
|
440
|
-
prizeRevealStatus?: "closed" | "open" | "pending" | undefined;
|
|
441
|
-
prizeDrawDurationDays?: number | undefined;
|
|
442
460
|
prizeGithubFileUrl?: string | undefined;
|
|
443
|
-
prizeRevealMode?: "scheduled" | "instant" | undefined;
|
|
444
|
-
media?: {
|
|
445
|
-
type: "video" | "image" | "file";
|
|
446
|
-
url: string;
|
|
447
|
-
source?: "upload" | "youtube" | "external" | undefined;
|
|
448
|
-
alt?: string | undefined;
|
|
449
|
-
thumbnailUrl?: string | undefined;
|
|
450
|
-
youtubeId?: string | undefined;
|
|
451
|
-
duration?: number | undefined;
|
|
452
|
-
}[] | undefined;
|
|
453
461
|
inStock?: boolean | undefined;
|
|
454
|
-
rating?: number | undefined;
|
|
455
|
-
categorySlug?: string | undefined;
|
|
456
|
-
publishedAt?: string | undefined;
|
|
457
|
-
seo?: {
|
|
458
|
-
title?: string | undefined;
|
|
459
|
-
description?: string | undefined;
|
|
460
|
-
keywords?: string[] | undefined;
|
|
461
|
-
} | undefined;
|
|
462
462
|
attributes?: Record<string, string> | undefined;
|
|
463
463
|
originalPrice?: number | undefined;
|
|
464
464
|
sellerAvatar?: string | undefined;
|
|
@@ -478,17 +478,16 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
478
478
|
updatedAt?: string | undefined;
|
|
479
479
|
storeId?: string | undefined;
|
|
480
480
|
features?: string[] | undefined;
|
|
481
|
-
category?: string | undefined;
|
|
482
|
-
featured?: boolean | undefined;
|
|
483
|
-
listingType?: "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live" | undefined;
|
|
484
|
-
isPromoted?: boolean | undefined;
|
|
485
481
|
description?: string | undefined;
|
|
486
482
|
slug?: string | undefined;
|
|
483
|
+
category?: string | undefined;
|
|
484
|
+
categorySlug?: string | undefined;
|
|
487
485
|
subcategory?: string | undefined;
|
|
488
486
|
stockQuantity?: number | undefined;
|
|
489
487
|
availableQuantity?: number | undefined;
|
|
490
488
|
mainImage?: string | undefined;
|
|
491
489
|
images?: string[] | undefined;
|
|
490
|
+
featured?: boolean | undefined;
|
|
492
491
|
tags?: string[] | undefined;
|
|
493
492
|
specifications?: {
|
|
494
493
|
value: string;
|
|
@@ -501,6 +500,7 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
501
500
|
insurance?: boolean | undefined;
|
|
502
501
|
insuranceCost?: number | undefined;
|
|
503
502
|
shippingPaidBy?: "seller" | "buyer" | undefined;
|
|
503
|
+
listingType?: "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live" | undefined;
|
|
504
504
|
auctionEndDate?: string | Date | undefined;
|
|
505
505
|
startingBid?: number | undefined;
|
|
506
506
|
currentBid?: number | undefined;
|
|
@@ -518,6 +518,33 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
518
518
|
preOrderCurrentCount?: number | undefined;
|
|
519
519
|
preOrderProductionStatus?: "upcoming" | "in_production" | "ready_to_ship" | undefined;
|
|
520
520
|
preOrderCancellable?: boolean | undefined;
|
|
521
|
+
isPromoted?: boolean | undefined;
|
|
522
|
+
pickupAddressId?: string | undefined;
|
|
523
|
+
viewCount?: number | undefined;
|
|
524
|
+
prizeRevealStatus?: "closed" | "open" | "pending" | undefined;
|
|
525
|
+
prizeRevealWindowStart?: string | Date | undefined;
|
|
526
|
+
prizeRevealWindowEnd?: string | Date | undefined;
|
|
527
|
+
prizeDrawDurationDays?: number | undefined;
|
|
528
|
+
prizeRevealMode?: "scheduled" | "instant" | undefined;
|
|
529
|
+
prizeCurrentEntries?: number | undefined;
|
|
530
|
+
prizeMaxEntries?: number | undefined;
|
|
531
|
+
pricePerEntry?: number | undefined;
|
|
532
|
+
rating?: number | undefined;
|
|
533
|
+
publishedAt?: string | undefined;
|
|
534
|
+
media?: {
|
|
535
|
+
type: "video" | "image" | "file";
|
|
536
|
+
url: string;
|
|
537
|
+
source?: "upload" | "youtube" | "external" | undefined;
|
|
538
|
+
alt?: string | undefined;
|
|
539
|
+
thumbnailUrl?: string | undefined;
|
|
540
|
+
youtubeId?: string | undefined;
|
|
541
|
+
duration?: number | undefined;
|
|
542
|
+
}[] | undefined;
|
|
543
|
+
seo?: {
|
|
544
|
+
title?: string | undefined;
|
|
545
|
+
description?: string | undefined;
|
|
546
|
+
keywords?: string[] | undefined;
|
|
547
|
+
} | undefined;
|
|
521
548
|
allowShipBeforeEmiComplete?: boolean | undefined;
|
|
522
549
|
printMeta?: {
|
|
523
550
|
size?: string | undefined;
|
|
@@ -525,8 +552,6 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
525
552
|
finish?: string | undefined;
|
|
526
553
|
editionSize?: number | undefined;
|
|
527
554
|
} | undefined;
|
|
528
|
-
pickupAddressId?: string | undefined;
|
|
529
|
-
viewCount?: number | undefined;
|
|
530
555
|
avgRating?: number | undefined;
|
|
531
556
|
reviewCount?: number | undefined;
|
|
532
557
|
bulkDiscounts?: {
|
|
@@ -571,33 +596,8 @@ export declare const productItemSchema: z.ZodObject<{
|
|
|
571
596
|
estimatedValue?: number | undefined;
|
|
572
597
|
wonByOrderId?: string | undefined;
|
|
573
598
|
}[] | undefined;
|
|
574
|
-
pricePerEntry?: number | undefined;
|
|
575
|
-
prizeMaxEntries?: number | undefined;
|
|
576
|
-
prizeCurrentEntries?: number | undefined;
|
|
577
|
-
prizeRevealWindowStart?: string | Date | undefined;
|
|
578
|
-
prizeRevealWindowEnd?: string | Date | undefined;
|
|
579
|
-
prizeRevealStatus?: "closed" | "open" | "pending" | undefined;
|
|
580
|
-
prizeDrawDurationDays?: number | undefined;
|
|
581
599
|
prizeGithubFileUrl?: string | undefined;
|
|
582
|
-
prizeRevealMode?: "scheduled" | "instant" | undefined;
|
|
583
|
-
media?: {
|
|
584
|
-
type: "video" | "image" | "file";
|
|
585
|
-
url: string;
|
|
586
|
-
source?: "upload" | "youtube" | "external" | undefined;
|
|
587
|
-
alt?: string | undefined;
|
|
588
|
-
thumbnailUrl?: string | undefined;
|
|
589
|
-
youtubeId?: string | undefined;
|
|
590
|
-
duration?: number | undefined;
|
|
591
|
-
}[] | undefined;
|
|
592
600
|
inStock?: boolean | undefined;
|
|
593
|
-
rating?: number | undefined;
|
|
594
|
-
categorySlug?: string | undefined;
|
|
595
|
-
publishedAt?: string | undefined;
|
|
596
|
-
seo?: {
|
|
597
|
-
title?: string | undefined;
|
|
598
|
-
description?: string | undefined;
|
|
599
|
-
keywords?: string[] | undefined;
|
|
600
|
-
} | undefined;
|
|
601
601
|
attributes?: Record<string, string> | undefined;
|
|
602
602
|
originalPrice?: number | undefined;
|
|
603
603
|
sellerAvatar?: string | undefined;
|
|
@@ -627,8 +627,8 @@ export declare const productListParamsSchema: z.ZodObject<{
|
|
|
627
627
|
storeId?: string | undefined;
|
|
628
628
|
category?: string | undefined;
|
|
629
629
|
featured?: boolean | undefined;
|
|
630
|
-
listingType?: "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live" | undefined;
|
|
631
630
|
condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | "graded" | undefined;
|
|
631
|
+
listingType?: "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live" | undefined;
|
|
632
632
|
minPrice?: number | undefined;
|
|
633
633
|
maxPrice?: number | undefined;
|
|
634
634
|
inStock?: boolean | undefined;
|
|
@@ -641,8 +641,8 @@ export declare const productListParamsSchema: z.ZodObject<{
|
|
|
641
641
|
storeId?: string | undefined;
|
|
642
642
|
category?: string | undefined;
|
|
643
643
|
featured?: boolean | undefined;
|
|
644
|
-
listingType?: "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live" | undefined;
|
|
645
644
|
condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | "graded" | undefined;
|
|
645
|
+
listingType?: "classified" | "standard" | "auction" | "pre-order" | "prize-draw" | "digital-code" | "live" | undefined;
|
|
646
646
|
minPrice?: number | undefined;
|
|
647
647
|
maxPrice?: number | undefined;
|
|
648
648
|
inStock?: boolean | undefined;
|
|
@@ -25,7 +25,7 @@ export declare const productFeatureAdminCreateSchema: z.ZodObject<{
|
|
|
25
25
|
label: string;
|
|
26
26
|
scope: "store" | "platform";
|
|
27
27
|
icon: string;
|
|
28
|
-
category: "shipping" | "custom" | "seller" | "
|
|
28
|
+
category: "shipping" | "custom" | "seller" | "condition" | "auction" | "platform" | "preorder";
|
|
29
29
|
isActive: boolean;
|
|
30
30
|
displayOrder: number;
|
|
31
31
|
productTypes: ("all" | "classified" | "auction" | "prize-draw" | "digital-code" | "live" | "product" | "preorder")[];
|
|
@@ -36,7 +36,7 @@ export declare const productFeatureAdminCreateSchema: z.ZodObject<{
|
|
|
36
36
|
label: string;
|
|
37
37
|
scope: "store" | "platform";
|
|
38
38
|
icon: string;
|
|
39
|
-
category: "shipping" | "custom" | "seller" | "
|
|
39
|
+
category: "shipping" | "custom" | "seller" | "condition" | "auction" | "platform" | "preorder";
|
|
40
40
|
isActive: boolean;
|
|
41
41
|
displayOrder: number;
|
|
42
42
|
productTypes: ("all" | "classified" | "auction" | "prize-draw" | "digital-code" | "live" | "product" | "preorder")[];
|
|
@@ -57,7 +57,7 @@ export declare const productFeatureStoreCreateSchema: z.ZodObject<{
|
|
|
57
57
|
}, "strip", z.ZodTypeAny, {
|
|
58
58
|
label: string;
|
|
59
59
|
icon: string;
|
|
60
|
-
category: "shipping" | "custom" | "seller" | "
|
|
60
|
+
category: "shipping" | "custom" | "seller" | "condition" | "auction" | "platform" | "preorder";
|
|
61
61
|
isActive: boolean;
|
|
62
62
|
displayOrder: number;
|
|
63
63
|
productTypes: ("all" | "classified" | "auction" | "prize-draw" | "digital-code" | "live" | "product" | "preorder")[];
|
|
@@ -66,7 +66,7 @@ export declare const productFeatureStoreCreateSchema: z.ZodObject<{
|
|
|
66
66
|
}, {
|
|
67
67
|
label: string;
|
|
68
68
|
icon: string;
|
|
69
|
-
category: "shipping" | "custom" | "seller" | "
|
|
69
|
+
category: "shipping" | "custom" | "seller" | "condition" | "auction" | "platform" | "preorder";
|
|
70
70
|
isActive: boolean;
|
|
71
71
|
displayOrder: number;
|
|
72
72
|
productTypes: ("all" | "classified" | "auction" | "prize-draw" | "digital-code" | "live" | "product" | "preorder")[];
|
|
@@ -86,8 +86,8 @@ export declare const productFeatureUpdateSchema: z.ZodObject<{
|
|
|
86
86
|
}, "strip", z.ZodTypeAny, {
|
|
87
87
|
label?: string | undefined;
|
|
88
88
|
icon?: string | undefined;
|
|
89
|
-
category?: "shipping" | "custom" | "seller" | "auction" | "condition" | "platform" | "preorder" | undefined;
|
|
90
89
|
description?: string | undefined;
|
|
90
|
+
category?: "shipping" | "custom" | "seller" | "condition" | "auction" | "platform" | "preorder" | undefined;
|
|
91
91
|
isActive?: boolean | undefined;
|
|
92
92
|
displayOrder?: number | undefined;
|
|
93
93
|
iconColor?: string | undefined;
|
|
@@ -95,13 +95,86 @@ export declare const productFeatureUpdateSchema: z.ZodObject<{
|
|
|
95
95
|
}, {
|
|
96
96
|
label?: string | undefined;
|
|
97
97
|
icon?: string | undefined;
|
|
98
|
-
category?: "shipping" | "custom" | "seller" | "auction" | "condition" | "platform" | "preorder" | undefined;
|
|
99
98
|
description?: string | undefined;
|
|
99
|
+
category?: "shipping" | "custom" | "seller" | "condition" | "auction" | "platform" | "preorder" | undefined;
|
|
100
100
|
isActive?: boolean | undefined;
|
|
101
101
|
displayOrder?: number | undefined;
|
|
102
102
|
iconColor?: string | undefined;
|
|
103
103
|
productTypes?: ("all" | "classified" | "auction" | "prize-draw" | "digital-code" | "live" | "product" | "preorder")[] | undefined;
|
|
104
104
|
}>;
|
|
105
|
+
/**
|
|
106
|
+
* The FORM schema for the product-feature editor, with UI metadata.
|
|
107
|
+
*
|
|
108
|
+
* `AdminFeatureEditorView` had **no validation whatsoever** before W5 — ten
|
|
109
|
+
* `useState` fields, `required` on the inputs (an HTML attribute any
|
|
110
|
+
* programmatic submit bypasses), and nothing else. Meanwhile these validators
|
|
111
|
+
* had existed all along and simply were not wired: the "schema exists, the
|
|
112
|
+
* consumer ignores it" case the plan catalogues.
|
|
113
|
+
*
|
|
114
|
+
* It reuses `productFeatureAdminCreateSchema`'s field shapes rather than
|
|
115
|
+
* restating them — a second copy of the same bounds is how the two would come
|
|
116
|
+
* to disagree. Only the annotations are new.
|
|
117
|
+
*
|
|
118
|
+
* 🛑 `annotate()` must be the OUTERMOST call — it keys a WeakMap by schema
|
|
119
|
+
* instance and every zod wrapper returns a new one.
|
|
120
|
+
*/
|
|
121
|
+
export declare const productFeatureFormSchema: z.ZodEffects<z.ZodObject<{
|
|
122
|
+
label: z.ZodString;
|
|
123
|
+
description: z.ZodOptional<z.ZodString>;
|
|
124
|
+
icon: z.ZodString;
|
|
125
|
+
iconColor: z.ZodOptional<z.ZodString>;
|
|
126
|
+
category: z.ZodEnum<["shipping", "seller", "condition", "platform", "auction", "preorder", "custom"]>;
|
|
127
|
+
scope: z.ZodEnum<["platform", "store"]>;
|
|
128
|
+
productTypes: z.ZodArray<z.ZodEnum<["product", "auction", "preorder", "prize-draw", "classified", "digital-code", "live", "all"]>, "many">;
|
|
129
|
+
storeId: z.ZodOptional<z.ZodString>;
|
|
130
|
+
isActive: z.ZodBoolean;
|
|
131
|
+
displayOrder: z.ZodNumber;
|
|
132
|
+
}, "strip", z.ZodTypeAny, {
|
|
133
|
+
label: string;
|
|
134
|
+
scope: "store" | "platform";
|
|
135
|
+
icon: string;
|
|
136
|
+
category: "shipping" | "custom" | "seller" | "condition" | "auction" | "platform" | "preorder";
|
|
137
|
+
isActive: boolean;
|
|
138
|
+
displayOrder: number;
|
|
139
|
+
productTypes: ("all" | "classified" | "auction" | "prize-draw" | "digital-code" | "live" | "product" | "preorder")[];
|
|
140
|
+
storeId?: string | undefined;
|
|
141
|
+
description?: string | undefined;
|
|
142
|
+
iconColor?: string | undefined;
|
|
143
|
+
}, {
|
|
144
|
+
label: string;
|
|
145
|
+
scope: "store" | "platform";
|
|
146
|
+
icon: string;
|
|
147
|
+
category: "shipping" | "custom" | "seller" | "condition" | "auction" | "platform" | "preorder";
|
|
148
|
+
isActive: boolean;
|
|
149
|
+
displayOrder: number;
|
|
150
|
+
productTypes: ("all" | "classified" | "auction" | "prize-draw" | "digital-code" | "live" | "product" | "preorder")[];
|
|
151
|
+
storeId?: string | undefined;
|
|
152
|
+
description?: string | undefined;
|
|
153
|
+
iconColor?: string | undefined;
|
|
154
|
+
}>, {
|
|
155
|
+
label: string;
|
|
156
|
+
scope: "store" | "platform";
|
|
157
|
+
icon: string;
|
|
158
|
+
category: "shipping" | "custom" | "seller" | "condition" | "auction" | "platform" | "preorder";
|
|
159
|
+
isActive: boolean;
|
|
160
|
+
displayOrder: number;
|
|
161
|
+
productTypes: ("all" | "classified" | "auction" | "prize-draw" | "digital-code" | "live" | "product" | "preorder")[];
|
|
162
|
+
storeId?: string | undefined;
|
|
163
|
+
description?: string | undefined;
|
|
164
|
+
iconColor?: string | undefined;
|
|
165
|
+
}, {
|
|
166
|
+
label: string;
|
|
167
|
+
scope: "store" | "platform";
|
|
168
|
+
icon: string;
|
|
169
|
+
category: "shipping" | "custom" | "seller" | "condition" | "auction" | "platform" | "preorder";
|
|
170
|
+
isActive: boolean;
|
|
171
|
+
displayOrder: number;
|
|
172
|
+
productTypes: ("all" | "classified" | "auction" | "prize-draw" | "digital-code" | "live" | "product" | "preorder")[];
|
|
173
|
+
storeId?: string | undefined;
|
|
174
|
+
description?: string | undefined;
|
|
175
|
+
iconColor?: string | undefined;
|
|
176
|
+
}>;
|
|
177
|
+
export type ProductFeatureFormValues = z.infer<typeof productFeatureFormSchema>;
|
|
105
178
|
export type ProductFeatureAdminCreatePayload = z.infer<typeof productFeatureAdminCreateSchema>;
|
|
106
179
|
export type ProductFeatureStoreCreatePayload = z.infer<typeof productFeatureStoreCreateSchema>;
|
|
107
180
|
export type ProductFeatureUpdatePayload = z.infer<typeof productFeatureUpdateSchema>;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* of hand-rolling parallel schemas.
|
|
7
7
|
*/
|
|
8
8
|
import { z } from "zod";
|
|
9
|
+
import { annotate } from "../../shell/field-ui-meta";
|
|
9
10
|
export const PRODUCT_FEATURE_PRODUCT_TYPE_ENUM = z.enum([
|
|
10
11
|
"product",
|
|
11
12
|
"auction",
|
|
@@ -66,3 +67,65 @@ export const productFeatureUpdateSchema = z.object({
|
|
|
66
67
|
isActive: z.boolean().optional(),
|
|
67
68
|
displayOrder: z.number().int().min(0).max(FEATURE_DISPLAY_ORDER_MAX).optional(),
|
|
68
69
|
});
|
|
70
|
+
/**
|
|
71
|
+
* The FORM schema for the product-feature editor, with UI metadata.
|
|
72
|
+
*
|
|
73
|
+
* `AdminFeatureEditorView` had **no validation whatsoever** before W5 — ten
|
|
74
|
+
* `useState` fields, `required` on the inputs (an HTML attribute any
|
|
75
|
+
* programmatic submit bypasses), and nothing else. Meanwhile these validators
|
|
76
|
+
* had existed all along and simply were not wired: the "schema exists, the
|
|
77
|
+
* consumer ignores it" case the plan catalogues.
|
|
78
|
+
*
|
|
79
|
+
* It reuses `productFeatureAdminCreateSchema`'s field shapes rather than
|
|
80
|
+
* restating them — a second copy of the same bounds is how the two would come
|
|
81
|
+
* to disagree. Only the annotations are new.
|
|
82
|
+
*
|
|
83
|
+
* 🛑 `annotate()` must be the OUTERMOST call — it keys a WeakMap by schema
|
|
84
|
+
* instance and every zod wrapper returns a new one.
|
|
85
|
+
*/
|
|
86
|
+
export const productFeatureFormSchema = z.object({
|
|
87
|
+
label: annotate(productFeatureAdminCreateSchema.shape.label, {
|
|
88
|
+
section: "basics", sectionLabel: "Feature", sectionRequired: true,
|
|
89
|
+
quick: true, order: 1, row: "full",
|
|
90
|
+
}),
|
|
91
|
+
description: annotate(productFeatureAdminCreateSchema.shape.description, {
|
|
92
|
+
section: "basics", order: 2, row: "full",
|
|
93
|
+
}),
|
|
94
|
+
icon: annotate(productFeatureAdminCreateSchema.shape.icon, {
|
|
95
|
+
section: "basics", quick: true, order: 3, row: "pair",
|
|
96
|
+
}),
|
|
97
|
+
iconColor: annotate(productFeatureAdminCreateSchema.shape.iconColor, {
|
|
98
|
+
section: "basics", order: 4, row: "pair",
|
|
99
|
+
}),
|
|
100
|
+
category: annotate(productFeatureAdminCreateSchema.shape.category, {
|
|
101
|
+
section: "scope", sectionLabel: "Scope & Applicability",
|
|
102
|
+
quick: true, order: 1, row: "pair",
|
|
103
|
+
}),
|
|
104
|
+
scope: annotate(productFeatureAdminCreateSchema.shape.scope, {
|
|
105
|
+
section: "scope", quick: true, order: 2, row: "pair",
|
|
106
|
+
}),
|
|
107
|
+
productTypes: annotate(productFeatureAdminCreateSchema.shape.productTypes, {
|
|
108
|
+
section: "scope", order: 3, row: "full", kind: "list",
|
|
109
|
+
}),
|
|
110
|
+
storeId: annotate(productFeatureAdminCreateSchema.shape.storeId, {
|
|
111
|
+
section: "scope", order: 4, row: "pair",
|
|
112
|
+
help: "Only used when scope is \"store\".",
|
|
113
|
+
}),
|
|
114
|
+
isActive: annotate(productFeatureAdminCreateSchema.shape.isActive, {
|
|
115
|
+
section: "visibility", sectionLabel: "Visibility", order: 1, row: "quarter",
|
|
116
|
+
}),
|
|
117
|
+
displayOrder: annotate(productFeatureAdminCreateSchema.shape.displayOrder, {
|
|
118
|
+
section: "visibility", order: 2, row: "pair",
|
|
119
|
+
}),
|
|
120
|
+
}).superRefine((v, ctx) => {
|
|
121
|
+
// The one rule no per-field bound can state: a store-scoped feature must
|
|
122
|
+
// name its store. The server enforces it too — this exists so the admin is
|
|
123
|
+
// told before submitting rather than by a 400.
|
|
124
|
+
if (v.scope === "store" && !v.storeId?.trim()) {
|
|
125
|
+
ctx.addIssue({
|
|
126
|
+
code: z.ZodIssueCode.custom,
|
|
127
|
+
path: ["storeId"],
|
|
128
|
+
message: "A store-scoped feature must name a store.",
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MediaField } from "../../media/types/index";
|
|
2
|
+
import type { AvailabilityFilter } from "../../../constants/field-names";
|
|
2
3
|
import type { CustomField, CustomSection, ProductPrintMeta } from "../schemas/firestore";
|
|
3
4
|
export type { CustomField, CustomSection, ProductPrintMeta } from "../schemas/firestore";
|
|
4
5
|
export type ProductStatus = "draft" | "published" | "in_review" | "archived";
|
|
@@ -168,6 +169,13 @@ export interface ProductListResponse {
|
|
|
168
169
|
hasMore: boolean;
|
|
169
170
|
/** Set when the query fell back to an empty result due to a DB error (index missing, permission denied). */
|
|
170
171
|
warning?: string;
|
|
172
|
+
/**
|
|
173
|
+
* A bounded fetch saturated its ceiling, so `total` is a FLOOR. Render it as
|
|
174
|
+
* "50+", never as an exact count, and never derive a final page number from
|
|
175
|
+
* it — `totalPages` is deliberately `page + 1` while this is set, so the
|
|
176
|
+
* pager offers a live Next instead of claiming a false last page.
|
|
177
|
+
*/
|
|
178
|
+
truncated?: boolean;
|
|
171
179
|
}
|
|
172
180
|
export interface ProductListParams {
|
|
173
181
|
q?: string;
|
|
@@ -177,7 +185,14 @@ export interface ProductListParams {
|
|
|
177
185
|
condition?: ProductCondition;
|
|
178
186
|
minPrice?: number;
|
|
179
187
|
maxPrice?: number;
|
|
180
|
-
|
|
188
|
+
/**
|
|
189
|
+
* Which availability scope to request — the three-tab bar rendered by
|
|
190
|
+
* `<AvailabilityTabs>`. Browse surfaces must send this on EVERY request,
|
|
191
|
+
* including the default `"available"`: the API treats an absent value as
|
|
192
|
+
* "all", so omitting it makes the client refetch disagree with the SSR
|
|
193
|
+
* paint, permanently (Root Cause #30).
|
|
194
|
+
*/
|
|
195
|
+
availability?: AvailabilityFilter;
|
|
181
196
|
/** Canonical listing-kind discriminator (SB1-G Phase 4). Accepts a single
|
|
182
197
|
* `ListingType`, or a `|`-joined multi-value string (sievejs OR-group,
|
|
183
198
|
* e.g. `"standard|classified|digital-code|live"`) for the consolidated
|
|
@@ -797,14 +797,14 @@ export declare const promotionsListParamsSchema: z.ZodObject<{
|
|
|
797
797
|
scope?: "seller" | "admin" | undefined;
|
|
798
798
|
pageSize?: number | undefined;
|
|
799
799
|
storeId?: string | undefined;
|
|
800
|
-
filters?: string | undefined;
|
|
801
800
|
isActive?: boolean | undefined;
|
|
801
|
+
filters?: string | undefined;
|
|
802
802
|
}, {
|
|
803
803
|
sort?: string | undefined;
|
|
804
804
|
page?: number | undefined;
|
|
805
805
|
scope?: "seller" | "admin" | undefined;
|
|
806
806
|
pageSize?: number | undefined;
|
|
807
807
|
storeId?: string | undefined;
|
|
808
|
-
filters?: string | undefined;
|
|
809
808
|
isActive?: boolean | undefined;
|
|
809
|
+
filters?: string | undefined;
|
|
810
810
|
}>;
|
|
@@ -111,10 +111,10 @@ export declare const reviewFirestoreSchema: z.ZodObject<{
|
|
|
111
111
|
}, z.ZodTypeAny, "passthrough">;
|
|
112
112
|
userId: string;
|
|
113
113
|
verified: boolean;
|
|
114
|
-
rating: number;
|
|
115
114
|
productId: string;
|
|
116
115
|
productTitle: string;
|
|
117
116
|
userName: string;
|
|
117
|
+
rating: number;
|
|
118
118
|
comment: string;
|
|
119
119
|
helpfulCount: number;
|
|
120
120
|
reportCount: number;
|
|
@@ -126,10 +126,9 @@ export declare const reviewFirestoreSchema: z.ZodObject<{
|
|
|
126
126
|
trimStart?: number | undefined;
|
|
127
127
|
} | undefined;
|
|
128
128
|
storeId?: string | undefined;
|
|
129
|
+
images?: string[] | undefined;
|
|
129
130
|
featured?: boolean | undefined;
|
|
130
131
|
listingType?: string | undefined;
|
|
131
|
-
images?: string[] | undefined;
|
|
132
|
-
storeName?: string | undefined;
|
|
133
132
|
userAvatar?: string | undefined;
|
|
134
133
|
moderatorId?: string | undefined;
|
|
135
134
|
moderatorNote?: string | undefined;
|
|
@@ -140,6 +139,7 @@ export declare const reviewFirestoreSchema: z.ZodObject<{
|
|
|
140
139
|
rejectedAt?: string | Date | z.objectOutputType<{
|
|
141
140
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
142
141
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
142
|
+
storeName?: string | undefined;
|
|
143
143
|
userSlug?: string | undefined;
|
|
144
144
|
hasImages?: boolean | undefined;
|
|
145
145
|
isAnonymous?: boolean | undefined;
|
|
@@ -159,10 +159,10 @@ export declare const reviewFirestoreSchema: z.ZodObject<{
|
|
|
159
159
|
}, z.ZodTypeAny, "passthrough">;
|
|
160
160
|
userId: string;
|
|
161
161
|
verified: boolean;
|
|
162
|
-
rating: number;
|
|
163
162
|
productId: string;
|
|
164
163
|
productTitle: string;
|
|
165
164
|
userName: string;
|
|
165
|
+
rating: number;
|
|
166
166
|
comment: string;
|
|
167
167
|
helpfulCount: number;
|
|
168
168
|
reportCount: number;
|
|
@@ -174,10 +174,9 @@ export declare const reviewFirestoreSchema: z.ZodObject<{
|
|
|
174
174
|
trimStart?: number | undefined;
|
|
175
175
|
} | undefined;
|
|
176
176
|
storeId?: string | undefined;
|
|
177
|
+
images?: string[] | undefined;
|
|
177
178
|
featured?: boolean | undefined;
|
|
178
179
|
listingType?: string | undefined;
|
|
179
|
-
images?: string[] | undefined;
|
|
180
|
-
storeName?: string | undefined;
|
|
181
180
|
userAvatar?: string | undefined;
|
|
182
181
|
moderatorId?: string | undefined;
|
|
183
182
|
moderatorNote?: string | undefined;
|
|
@@ -188,6 +187,7 @@ export declare const reviewFirestoreSchema: z.ZodObject<{
|
|
|
188
187
|
rejectedAt?: string | Date | z.objectInputType<{
|
|
189
188
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
190
189
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
190
|
+
storeName?: string | undefined;
|
|
191
191
|
userSlug?: string | undefined;
|
|
192
192
|
hasImages?: boolean | undefined;
|
|
193
193
|
isAnonymous?: boolean | undefined;
|
|
@@ -293,9 +293,9 @@ export declare const reviewSchema: z.ZodObject<{
|
|
|
293
293
|
status: "pending" | "approved" | "rejected";
|
|
294
294
|
id: string;
|
|
295
295
|
userId: string;
|
|
296
|
-
rating: 3 | 1 | 2 | 4 | 5;
|
|
297
296
|
productId: string;
|
|
298
297
|
userName: string;
|
|
298
|
+
rating: 3 | 1 | 2 | 4 | 5;
|
|
299
299
|
title?: string | undefined;
|
|
300
300
|
video?: {
|
|
301
301
|
url: string;
|
|
@@ -307,26 +307,26 @@ export declare const reviewSchema: z.ZodObject<{
|
|
|
307
307
|
createdAt?: string | undefined;
|
|
308
308
|
updatedAt?: string | undefined;
|
|
309
309
|
verified?: boolean | undefined;
|
|
310
|
-
featured?: boolean | undefined;
|
|
311
|
-
listingType?: string | undefined;
|
|
312
310
|
images?: {
|
|
313
311
|
url: string;
|
|
314
312
|
thumbnailUrl?: string | undefined;
|
|
315
313
|
}[] | undefined;
|
|
316
|
-
|
|
314
|
+
featured?: boolean | undefined;
|
|
315
|
+
listingType?: string | undefined;
|
|
317
316
|
productTitle?: string | undefined;
|
|
318
317
|
userAvatar?: string | undefined;
|
|
319
318
|
comment?: string | undefined;
|
|
320
319
|
helpfulCount?: number | undefined;
|
|
321
320
|
reportCount?: number | undefined;
|
|
321
|
+
storeName?: string | undefined;
|
|
322
322
|
storeSlug?: string | undefined;
|
|
323
323
|
}, {
|
|
324
324
|
status: "pending" | "approved" | "rejected";
|
|
325
325
|
id: string;
|
|
326
326
|
userId: string;
|
|
327
|
-
rating: 3 | 1 | 2 | 4 | 5;
|
|
328
327
|
productId: string;
|
|
329
328
|
userName: string;
|
|
329
|
+
rating: 3 | 1 | 2 | 4 | 5;
|
|
330
330
|
title?: string | undefined;
|
|
331
331
|
video?: {
|
|
332
332
|
url: string;
|
|
@@ -338,18 +338,18 @@ export declare const reviewSchema: z.ZodObject<{
|
|
|
338
338
|
createdAt?: string | undefined;
|
|
339
339
|
updatedAt?: string | undefined;
|
|
340
340
|
verified?: boolean | undefined;
|
|
341
|
-
featured?: boolean | undefined;
|
|
342
|
-
listingType?: string | undefined;
|
|
343
341
|
images?: {
|
|
344
342
|
url: string;
|
|
345
343
|
thumbnailUrl?: string | undefined;
|
|
346
344
|
}[] | undefined;
|
|
347
|
-
|
|
345
|
+
featured?: boolean | undefined;
|
|
346
|
+
listingType?: string | undefined;
|
|
348
347
|
productTitle?: string | undefined;
|
|
349
348
|
userAvatar?: string | undefined;
|
|
350
349
|
comment?: string | undefined;
|
|
351
350
|
helpfulCount?: number | undefined;
|
|
352
351
|
reportCount?: number | undefined;
|
|
352
|
+
storeName?: string | undefined;
|
|
353
353
|
storeSlug?: string | undefined;
|
|
354
354
|
}>;
|
|
355
355
|
/** Base schema for list-query parameters. */
|
|
@@ -371,8 +371,8 @@ export declare const reviewListParamsSchema: z.ZodObject<{
|
|
|
371
371
|
storeId?: string | undefined;
|
|
372
372
|
userId?: string | undefined;
|
|
373
373
|
featured?: boolean | undefined;
|
|
374
|
-
rating?: number | undefined;
|
|
375
374
|
productId?: string | undefined;
|
|
375
|
+
rating?: number | undefined;
|
|
376
376
|
}, {
|
|
377
377
|
sort?: string | undefined;
|
|
378
378
|
status?: "pending" | "approved" | "rejected" | undefined;
|
|
@@ -381,6 +381,6 @@ export declare const reviewListParamsSchema: z.ZodObject<{
|
|
|
381
381
|
storeId?: string | undefined;
|
|
382
382
|
userId?: string | undefined;
|
|
383
383
|
featured?: boolean | undefined;
|
|
384
|
-
rating?: number | undefined;
|
|
385
384
|
productId?: string | undefined;
|
|
385
|
+
rating?: number | undefined;
|
|
386
386
|
}>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ScammerStatus } from "../schemas/firestore";
|
|
2
|
+
/** Human-readable label. Replaces two `.replace(/_/g, " ")` call sites, which
|
|
3
|
+
* rendered "pending review" — mechanically correct, and not a written label. */
|
|
4
|
+
export declare const SCAMMER_STATUS_LABEL: Record<ScammerStatus, string>;
|
|
5
|
+
/**
|
|
6
|
+
* Inline-chip styling. Every entry is a `bg-{status}-surface` + `text-{status}`
|
|
7
|
+
* pair per Recurrent Root Cause #67 — the two tokens invert together with the
|
|
8
|
+
* theme, which a literal `text-white` would not.
|
|
9
|
+
*
|
|
10
|
+
* `removed` is the neutral case: it has no status colour because it is not a
|
|
11
|
+
* status outcome, it is a withdrawal. ONE background, ONE ink.
|
|
12
|
+
*/
|
|
13
|
+
export declare const SCAMMER_STATUS_BADGE: Record<ScammerStatus, string>;
|
|
14
|
+
/** Dropdown options, derived from the union so one cannot go missing. */
|
|
15
|
+
export declare const SCAMMER_STATUS_OPTIONS: {
|
|
16
|
+
value: "verified" | "rejected" | "removed" | "pending_review";
|
|
17
|
+
label: string;
|
|
18
|
+
}[];
|
|
19
|
+
/**
|
|
20
|
+
* Narrow an unknown API value to a real status.
|
|
21
|
+
*
|
|
22
|
+
* The list view used `toStringValue(item.status, "pending_review")`, which
|
|
23
|
+
* produces a `string` — so an unrecognised value flowed on as if it were a
|
|
24
|
+
* status and every consumer fell back to the pending styling. This maps
|
|
25
|
+
* anything unrecognised to `pending_review` explicitly, and the return type
|
|
26
|
+
* says so.
|
|
27
|
+
*/
|
|
28
|
+
export declare function toScammerStatus(value: unknown): ScammerStatus;
|