@mohasinac/appkit 3.4.8 → 3.5.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/classified/ClassifiedDetailView.js +1 -1
- package/dist/_internal/client/features/digital-code/CodeRevealPanel.js +1 -1
- package/dist/_internal/client/features/digital-code/DigitalCodeDetailView.js +1 -1
- package/dist/_internal/client/features/filters/filter-load-options.js +10 -9
- package/dist/_internal/client/features/layout/DashboardLayoutClient.d.ts +6 -1
- package/dist/_internal/client/features/layout/DashboardLayoutClient.js +11 -4
- package/dist/_internal/client/features/live/LiveItemDetailView.js +2 -2
- package/dist/_internal/client/features/maintenance/views/AnalysisRunnerView.js +10 -3
- package/dist/_internal/client/features/maintenance/views/ServerErrorsListView.js +2 -2
- package/dist/_internal/client/scaffolds/DashboardScaffold.js +3 -1
- package/dist/_internal/server/features/checkout/actions.d.ts +16 -0
- package/dist/_internal/server/features/checkout/actions.js +149 -35
- package/dist/_internal/server/features/checkout/bundle-expansion.d.ts +31 -0
- package/dist/_internal/server/features/checkout/bundle-expansion.js +41 -0
- package/dist/_internal/server/features/lottery/actions.js +14 -4
- package/dist/_internal/server/features/maintenance/analyze.js +4 -2
- package/dist/_internal/server/features/orders/actions.js +9 -0
- package/dist/_internal/server/features/orders/adapters.js +19 -0
- package/dist/_internal/server/features/seo/robots.js +1 -1
- package/dist/_internal/server/functions/firestore.d.ts +47 -1
- package/dist/_internal/server/functions/firestore.js +56 -1
- package/dist/_internal/server/functions/scheduled.d.ts +2 -1
- package/dist/_internal/server/functions/scheduled.js +9 -1
- package/dist/_internal/server/jobs/core/catalogueImageStalenessReminder.d.ts +10 -0
- package/dist/_internal/server/jobs/core/catalogueImageStalenessReminder.js +49 -0
- package/dist/_internal/server/jobs/core/cleanupRtdbEvents.js +32 -0
- package/dist/_internal/server/jobs/core/hardBanCascade.d.ts +26 -0
- package/dist/_internal/server/jobs/core/hardBanCascade.js +179 -0
- package/dist/_internal/server/jobs/core/index.d.ts +4 -1
- package/dist/_internal/server/jobs/core/index.js +4 -1
- package/dist/_internal/server/jobs/core/jobRunners.d.ts +28 -0
- package/dist/_internal/server/jobs/core/jobRunners.js +37 -0
- package/dist/_internal/server/jobs/core/onCatalogueSubmittedForApproval.d.ts +15 -0
- package/dist/_internal/server/jobs/core/onCatalogueSubmittedForApproval.js +38 -0
- package/dist/_internal/server/jobs/core/onJobCreated.d.ts +22 -0
- package/dist/_internal/server/jobs/core/onJobCreated.js +59 -0
- package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.d.ts +6 -1
- package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.js +5 -2
- package/dist/_internal/server/jobs/handlers/catalogueImageStalenessReminder.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/catalogueImageStalenessReminder.js +2 -0
- package/dist/_internal/server/jobs/handlers/index.d.ts +6 -0
- package/dist/_internal/server/jobs/handlers/index.js +8 -0
- package/dist/_internal/server/jobs/handlers/onCatalogueSubmittedForApproval.d.ts +12 -0
- package/dist/_internal/server/jobs/handlers/onCatalogueSubmittedForApproval.js +20 -0
- package/dist/_internal/server/jobs/handlers/onJobCreated.d.ts +3 -0
- package/dist/_internal/server/jobs/handlers/onJobCreated.js +9 -0
- package/dist/_internal/server/jobs/handlers/onShipmentAllocationSync.d.ts +25 -0
- package/dist/_internal/server/jobs/handlers/onShipmentAllocationSync.js +71 -0
- package/dist/_internal/server/jobs/handlers/onShipmentDeleted.d.ts +14 -0
- package/dist/_internal/server/jobs/handlers/onShipmentDeleted.js +23 -0
- package/dist/_internal/server/jobs/handlers/onShipmentItemWrite.d.ts +17 -0
- package/dist/_internal/server/jobs/handlers/onShipmentItemWrite.js +26 -0
- package/dist/_internal/server/jobs/handlers/weeklyPayoutEligibility.js +3 -1
- package/dist/_internal/shared/actions/action-registry.d.ts +1 -1
- package/dist/_internal/shared/actions/action-registry.js +136 -0
- package/dist/_internal/shared/features/blog/schema.d.ts +8 -8
- package/dist/_internal/shared/features/brands/schema.d.ts +4 -4
- package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +8 -8
- package/dist/_internal/shared/features/events/schema.d.ts +4 -4
- package/dist/_internal/shared/features/products/schema.d.ts +8 -8
- package/dist/_internal/shared/features/promotions/schema.d.ts +4 -4
- package/dist/_internal/shared/features/reviews/schema.d.ts +4 -4
- package/dist/client/api/useFeatureFlags.d.ts +22 -0
- package/dist/client/api/useFeatureFlags.js +27 -0
- package/dist/client/observability/reportClientError.js +3 -2
- package/dist/client.d.ts +4 -2
- package/dist/client.js +2 -1
- package/dist/configs/next.js +1 -0
- package/dist/constants/api-endpoints.d.ts +279 -3
- package/dist/constants/api-endpoints.js +130 -2
- package/dist/core/hooks/useSyncManager.js +5 -4
- package/dist/errors/conflict-error.d.ts +4 -0
- package/dist/errors/conflict-error.js +6 -0
- package/dist/errors/index.d.ts +1 -0
- package/dist/errors/index.js +1 -0
- package/dist/features/about/components/FeesView.js +2 -2
- package/dist/features/about/components/HelpPageView.js +2 -2
- package/dist/features/about/components/HowAuctionsWorkView.js +2 -2
- package/dist/features/about/components/HowCheckoutWorksView.js +2 -2
- package/dist/features/about/components/HowEmiWorksView.js +2 -2
- package/dist/features/about/components/HowOffersWorkView.js +3 -3
- package/dist/features/about/components/HowOrdersWorkView.js +3 -3
- package/dist/features/about/components/HowPayoutsWorkView.js +2 -2
- package/dist/features/about/components/HowPreOrdersWorkView.js +2 -2
- package/dist/features/about/components/HowReviewsWorkView.js +2 -2
- package/dist/features/about/components/PublicProfileView.d.ts +8 -1
- package/dist/features/about/components/PublicProfileView.js +11 -9
- package/dist/features/about/components/SecurityPrivacyView.js +2 -2
- package/dist/features/about/components/UnauthorizedView.js +2 -2
- package/dist/features/account/components/AddressBook.js +1 -1
- package/dist/features/account/components/AddressesIndexListing.js +1 -1
- package/dist/features/account/components/NotificationBell.js +5 -5
- package/dist/features/account/components/NotificationPreferencesPanel.js +5 -2
- package/dist/features/account/components/UserOffersPanel.js +5 -4
- package/dist/features/account/components/UserSidebar.js +2 -2
- package/dist/features/account/components/UserSupportView.js +3 -3
- package/dist/features/account/schemas/index.d.ts +12 -12
- package/dist/features/addresses/schemas/index.d.ts +6 -6
- package/dist/features/admin/components/AdminAdEditorView.js +3 -3
- package/dist/features/admin/components/AdminAddressEditorView.js +3 -3
- package/dist/features/admin/components/AdminAdsView.js +3 -3
- package/dist/features/admin/components/AdminBlogEditorView.js +1 -1
- package/dist/features/admin/components/AdminBlogView.js +12 -15
- package/dist/features/admin/components/AdminBrandEditorView.js +1 -1
- package/dist/features/admin/components/AdminBrandsView.js +12 -13
- package/dist/features/admin/components/AdminBundleEditorView.js +5 -4
- package/dist/features/admin/components/AdminBundlesView.js +32 -23
- package/dist/features/admin/components/AdminCarouselEditorView.js +5 -5
- package/dist/features/admin/components/AdminCarouselView.js +2 -2
- package/dist/features/admin/components/AdminCatalogGuideView.js +1 -1
- package/dist/features/admin/components/AdminCategoriesView.js +12 -13
- package/dist/features/admin/components/AdminCategoryEditorView.js +2 -2
- package/dist/features/admin/components/AdminContactEditorView.js +2 -2
- package/dist/features/admin/components/AdminCouponEditorView.d.ts +10 -1
- package/dist/features/admin/components/AdminCouponEditorView.js +7 -2
- package/dist/features/admin/components/AdminCouponsView.js +32 -27
- package/dist/features/admin/components/AdminEmployeeEditorView.js +3 -3
- package/dist/features/admin/components/AdminFaqEditorView.js +1 -1
- package/dist/features/admin/components/AdminFaqsView.js +20 -20
- package/dist/features/admin/components/AdminFeatureEditorView.js +5 -5
- package/dist/features/admin/components/AdminFeaturesView.js +9 -10
- package/dist/features/admin/components/AdminFilterBar.js +1 -1
- package/dist/features/admin/components/AdminFulfillmentView.js +4 -4
- package/dist/features/admin/components/AdminGuideHubView.js +2 -2
- package/dist/features/admin/components/AdminMediaView.js +3 -2
- package/dist/features/admin/components/AdminNavigationView.js +1 -1
- package/dist/features/admin/components/AdminOrderEditorView.js +3 -3
- package/dist/features/admin/components/AdminOrdersView.js +21 -30
- package/dist/features/admin/components/AdminPageHeader.js +3 -3
- package/dist/features/admin/components/AdminPayoutsView.js +8 -8
- package/dist/features/admin/components/AdminPrizeDrawsView.js +8 -9
- package/dist/features/admin/components/AdminProductEditorView.d.ts +9 -1
- package/dist/features/admin/components/AdminProductEditorView.js +7 -4
- package/dist/features/admin/components/AdminProductsView.js +30 -41
- package/dist/features/admin/components/AdminReviewsView.js +14 -17
- package/dist/features/admin/components/AdminScammerEditorView.js +5 -5
- package/dist/features/admin/components/AdminSectionsView.js +3 -3
- package/dist/features/admin/components/AdminSessionsView.js +8 -10
- package/dist/features/admin/components/AdminSidebar.js +2 -2
- package/dist/features/admin/components/AdminSiteSettingsView.js +10 -3
- package/dist/features/admin/components/AdminStoreEditorView.js +4 -5
- package/dist/features/admin/components/AdminStoresView.js +18 -13
- package/dist/features/admin/components/AdminSupportTicketDetailView.js +7 -7
- package/dist/features/admin/components/AdminTeamView.js +9 -5
- package/dist/features/admin/components/AdminUsersView.js +19 -15
- package/dist/features/admin/components/AdminViewCards.js +5 -5
- package/dist/features/admin/components/DashboardStats.js +1 -1
- package/dist/features/admin/components/DataListingView.js +2 -2
- package/dist/features/admin/components/DataTable.js +2 -2
- package/dist/features/admin/components/DrawerFormFooter.js +1 -1
- package/dist/features/admin/components/analytics/AdminAnalyticsCharts.js +2 -2
- package/dist/features/admin/components/analytics/AdminStatCard.js +1 -1
- package/dist/features/admin/hooks/useAdminListing.d.ts +3 -2
- package/dist/features/admin/hooks/useAdminListing.js +8 -2
- package/dist/features/admin/permission-map.js +2 -0
- package/dist/features/admin/schemas/firestore.d.ts +7 -0
- package/dist/features/admin/schemas/firestore.js +4 -0
- package/dist/features/auctions/components/AuctionBidsTable.js +1 -1
- package/dist/features/auctions/components/AuctionDetailPageView.js +7 -7
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +3 -3
- package/dist/features/auctions/components/MarketplaceAuctionGrid.js +4 -4
- package/dist/features/auctions/components/PlaceBidFormClient.js +1 -1
- package/dist/features/auctions/schemas/index.d.ts +16 -16
- package/dist/features/auth/permissions/constants.d.ts +1 -1
- package/dist/features/auth/permissions/constants.js +2 -0
- package/dist/features/auth/schemas/index.d.ts +6 -6
- package/dist/features/before-after/schemas/index.d.ts +3 -3
- package/dist/features/blog/actions/blog-actions.d.ts +32 -32
- package/dist/features/blog/components/BlogFeaturedCard.js +2 -2
- package/dist/features/blog/components/BlogIndexListing.js +2 -2
- package/dist/features/blog/components/BlogListView.js +4 -4
- package/dist/features/blog/components/BlogPostView.js +4 -4
- package/dist/features/blog/schemas/index.d.ts +77 -77
- package/dist/features/cart/components/CartDrawer.js +2 -2
- package/dist/features/catalogue/actions/approve-catalogue-listing.d.ts +12 -0
- package/dist/features/catalogue/actions/approve-catalogue-listing.js +50 -0
- package/dist/features/catalogue/actions/list-from-catalogue.d.ts +17 -0
- package/dist/features/catalogue/actions/list-from-catalogue.js +50 -0
- package/dist/features/catalogue/actions/submit-for-approval.d.ts +8 -0
- package/dist/features/catalogue/actions/submit-for-approval.js +30 -0
- package/dist/features/catalogue/components/AdminCatalogueApprovalsView.d.ts +2 -0
- package/dist/features/catalogue/components/AdminCatalogueApprovalsView.js +53 -0
- package/dist/features/catalogue/components/CatalogueItemEditorView.d.ts +7 -0
- package/dist/features/catalogue/components/CatalogueItemEditorView.js +79 -0
- package/dist/features/catalogue/components/PublicCatalogueView.d.ts +5 -0
- package/dist/features/catalogue/components/PublicCatalogueView.js +22 -0
- package/dist/features/catalogue/components/UserCatalogueView.d.ts +12 -0
- package/dist/features/catalogue/components/UserCatalogueView.js +51 -0
- package/dist/features/catalogue/index.d.ts +12 -0
- package/dist/features/catalogue/index.js +9 -0
- package/dist/features/catalogue/repository/catalogue.repository.d.ts +39 -0
- package/dist/features/catalogue/repository/catalogue.repository.js +68 -0
- package/dist/features/catalogue/schemas/firestore.d.ts +47 -0
- package/dist/features/catalogue/schemas/firestore.js +22 -0
- package/dist/features/catalogue/schemas/index.d.ts +2 -0
- package/dist/features/catalogue/schemas/index.js +2 -0
- package/dist/features/catalogue/schemas/validation.d.ts +71 -0
- package/dist/features/catalogue/schemas/validation.js +25 -0
- package/dist/features/catalogue/utils/freshness.d.ts +10 -0
- package/dist/features/catalogue/utils/freshness.js +15 -0
- package/dist/features/catalogue/utils/product-from-item.d.ts +15 -0
- package/dist/features/catalogue/utils/product-from-item.js +34 -0
- package/dist/features/categories/components/BrandDetailPageView.js +1 -1
- package/dist/features/categories/components/BrandDetailTabs.js +2 -2
- package/dist/features/categories/components/BundleCollage.js +2 -2
- package/dist/features/categories/components/BundleItemsPicker.js +3 -2
- package/dist/features/categories/components/CategoriesIndexListing.js +8 -6
- package/dist/features/categories/components/CategoryBundlesListing.js +10 -4
- package/dist/features/categories/components/CategoryDetailPageView.js +1 -1
- package/dist/features/categories/components/CategoryDetailTabs.js +2 -2
- package/dist/features/categories/components/CategoryGrid.js +3 -3
- package/dist/features/categories/components/CategoryProductsListing.js +1 -1
- package/dist/features/categories/components/CategorySortSelect.js +1 -1
- package/dist/features/categories/components/CategoryStoresListing.js +1 -1
- package/dist/features/categories/components/CategoryTableColumns.js +1 -1
- package/dist/features/categories/components/CategoryTree.js +2 -2
- package/dist/features/categories/components/ConcernCard.js +1 -1
- package/dist/features/categories/hooks/useCategories.js +1 -1
- package/dist/features/categories/schemas/index.d.ts +32 -32
- package/dist/features/classified/components/ClassifiedFilters.js +2 -2
- package/dist/features/classified/components/ClassifiedIndexListing.js +9 -3
- package/dist/features/collections/schemas/index.d.ts +2 -2
- package/dist/features/consultation/components/ConsultationForm.js +1 -1
- package/dist/features/consultation/schemas/index.d.ts +10 -10
- package/dist/features/contact/components/ContactForm.js +4 -4
- package/dist/features/contact/components/ContactInfoSidebar.js +1 -1
- package/dist/features/contact/components/ContactPageView.js +2 -1
- package/dist/features/copilot/components/AdminCopilotView.js +5 -4
- package/dist/features/corporate/schemas/index.d.ts +2 -2
- package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +3 -3
- package/dist/features/events/components/AdminEventEditorView.js +4 -4
- package/dist/features/events/components/AdminEventEntriesView.js +2 -2
- package/dist/features/events/components/AdminEventsView.js +8 -8
- package/dist/features/events/components/EventBanner.js +1 -1
- package/dist/features/events/components/EventCard.js +3 -3
- package/dist/features/events/components/EventLeaderboard.js +1 -1
- package/dist/features/events/components/EventOfferCard.js +1 -1
- package/dist/features/events/components/EventPollWidget.js +6 -5
- package/dist/features/events/components/EventRaffleEntryForm.js +1 -1
- package/dist/features/events/components/EventRaffleWinnerView.js +5 -5
- package/dist/features/events/components/EventRafflesSection.js +1 -1
- package/dist/features/events/components/EventSaleBanner.js +1 -1
- package/dist/features/events/components/EventsIndexListing.js +4 -2
- package/dist/features/events/components/EventsListView.js +2 -2
- package/dist/features/events/components/SpinWheelView.js +11 -5
- package/dist/features/events/schemas/index.d.ts +100 -100
- package/dist/features/faq/actions/faq-actions.d.ts +6 -6
- package/dist/features/faq/components/ContactCTA.js +3 -3
- package/dist/features/faq/components/FAQCategorySidebar.js +2 -2
- package/dist/features/faq/components/FAQHelpfulButtons.js +3 -3
- package/dist/features/faq/schemas/index.d.ts +12 -12
- package/dist/features/filters/AsyncFacetSection.js +4 -4
- package/dist/features/filters/FilterFacetSection.js +8 -8
- package/dist/features/filters/RangeFilter.js +2 -2
- package/dist/features/filters/SwitchFilter.js +1 -1
- package/dist/features/forms/Checkbox.js +2 -8
- package/dist/features/forms/Input.js +2 -1
- package/dist/features/forms/Radio.js +3 -3
- package/dist/features/forms/Select.d.ts +1 -1
- package/dist/features/forms/Select.js +3 -2
- package/dist/features/forms/Slider.js +5 -11
- package/dist/features/forms/Textarea.js +2 -1
- package/dist/features/grouped/schemas/index.d.ts +6 -6
- package/dist/features/homepage/actions/homepage-section-actions.d.ts +4 -4
- package/dist/features/homepage/components/AdvertisementBanner.js +4 -4
- package/dist/features/homepage/components/AnnouncementBar.js +3 -3
- package/dist/features/homepage/components/BeforeAfterCard.js +1 -1
- package/dist/features/homepage/components/BrandsSection.js +9 -9
- package/dist/features/homepage/components/CTABannerSection.js +1 -1
- package/dist/features/homepage/components/CharacterHotspot.js +4 -4
- package/dist/features/homepage/components/CharacterHotspotForm.js +15 -13
- package/dist/features/homepage/components/CollectionCardsSection.js +1 -1
- package/dist/features/homepage/components/CustomCardsSection.js +6 -6
- package/dist/features/homepage/components/CustomerReviewsSection.js +2 -2
- package/dist/features/homepage/components/FAQSection.js +2 -2
- package/dist/features/homepage/components/FeaturedBundlesSection.js +3 -3
- package/dist/features/homepage/components/FeaturedResultsSection.js +2 -2
- package/dist/features/homepage/components/GoogleReviewsSection.js +6 -6
- package/dist/features/homepage/components/HeroBanner.js +1 -1
- package/dist/features/homepage/components/HeroCarousel.js +5 -4
- package/dist/features/homepage/components/HeroSection.js +1 -7
- package/dist/features/homepage/components/HomepageSkeleton.js +1 -1
- package/dist/features/homepage/components/HowItWorksInfoView.js +1 -1
- package/dist/features/homepage/components/HowItWorksSection.js +2 -2
- package/dist/features/homepage/components/NewsletterBanner.js +2 -2
- package/dist/features/homepage/components/NewsletterSection.js +1 -1
- package/dist/features/homepage/components/PromoGrid.js +1 -1
- package/dist/features/homepage/components/SectionCarousel.js +6 -6
- package/dist/features/homepage/components/SecurityHighlightsSection.js +2 -2
- package/dist/features/homepage/components/ShopByCategorySection.js +10 -10
- package/dist/features/homepage/components/SiteFeaturesSection.js +2 -2
- package/dist/features/homepage/components/SocialFeedSection.js +5 -5
- package/dist/features/homepage/components/SocialPostCard.js +1 -1
- package/dist/features/homepage/components/StatsCounterSection.js +1 -1
- package/dist/features/homepage/components/TestimonialsCarousel.js +1 -1
- package/dist/features/homepage/components/TrustBadges.js +1 -1
- package/dist/features/homepage/components/TrustFeaturesSection.js +2 -2
- package/dist/features/homepage/components/TrustIndicatorsSection.js +2 -2
- package/dist/features/homepage/components/WelcomeSection.js +2 -2
- package/dist/features/homepage/components/WhatsAppCommunitySection.js +1 -1
- package/dist/features/homepage/hooks/useActiveAd.js +2 -1
- package/dist/features/homepage/schemas/firestore.d.ts +10 -0
- package/dist/features/homepage/schemas/index.d.ts +116 -116
- package/dist/features/jobs/actions/enqueue-job.d.ts +24 -0
- package/dist/features/jobs/actions/enqueue-job.js +44 -0
- package/dist/features/jobs/repository/jobs.repository.d.ts +21 -0
- package/dist/features/jobs/repository/jobs.repository.js +48 -0
- package/dist/features/jobs/schemas/firestore.d.ts +54 -0
- package/dist/features/jobs/schemas/firestore.js +24 -0
- package/dist/features/layout/AppLayoutShell.js +17 -11
- package/dist/features/layout/AutoBreadcrumbs.js +1 -1
- package/dist/features/layout/BackToTop.js +2 -2
- package/dist/features/layout/BottomActions.js +7 -7
- package/dist/features/layout/BottomNavItem.js +2 -2
- package/dist/features/layout/BottomNavLayout.js +13 -4
- package/dist/features/layout/BottomNavbar.d.ts +9 -1
- package/dist/features/layout/BottomNavbar.js +12 -5
- package/dist/features/layout/BottomSheet.js +1 -1
- package/dist/features/layout/Breadcrumbs.js +1 -1
- package/dist/features/layout/FooterLayout.js +2 -2
- package/dist/features/layout/NavItem.js +3 -3
- package/dist/features/layout/NavbarLayout.js +6 -6
- package/dist/features/layout/SidebarLayout.d.ts +3 -0
- package/dist/features/layout/SidebarLayout.js +3 -3
- package/dist/features/layout/TitleBarLayout.js +4 -4
- package/dist/features/live/components/LiveItemFilters.js +2 -2
- package/dist/features/live/components/LiveItemsIndexListing.js +3 -3
- package/dist/features/lottery/types/index.d.ts +3 -1
- package/dist/features/lottery/types/index.js +16 -3
- package/dist/features/loyalty/components/CoinsDisplay.js +2 -2
- package/dist/features/media/MediaImage.d.ts +6 -1
- package/dist/features/media/MediaImage.js +10 -4
- package/dist/features/media/MediaLightbox.js +1 -1
- package/dist/features/media/MediaPickerModal.js +4 -3
- package/dist/features/media/MediaVideo.js +1 -1
- package/dist/features/media/modals/ImageCropModal.js +1 -1
- package/dist/features/media/modals/ImageEditor.js +1 -1
- package/dist/features/media/repository/media-assets.repository.d.ts +9 -0
- package/dist/features/media/types/index.d.ts +4 -4
- package/dist/features/media/upload/MediaUploadField.js +3 -3
- package/dist/features/media/upload/MediaUploadList.js +1 -1
- package/dist/features/messages/hooks/useConversation.js +4 -3
- package/dist/features/messages/hooks/useConversations.js +2 -1
- package/dist/features/messages/schemas/index.d.ts +6 -6
- package/dist/features/orders/components/MarketplaceOrderCard.js +1 -1
- package/dist/features/orders/components/OrderPaymentSummary.d.ts +16 -0
- package/dist/features/orders/components/OrderPaymentSummary.js +32 -0
- package/dist/features/orders/components/OrderSiblingPayments.js +1 -1
- package/dist/features/orders/components/OrdersList.d.ts +7 -2
- package/dist/features/orders/components/OrdersList.js +5 -5
- package/dist/features/orders/components/RefundHistoryTable.js +1 -1
- package/dist/features/orders/components/RefundRequestView.js +1 -1
- package/dist/features/orders/components/index.d.ts +2 -0
- package/dist/features/orders/components/index.js +1 -0
- package/dist/features/orders/repository/orders.repository.d.ts +8 -0
- package/dist/features/orders/repository/orders.repository.js +24 -0
- package/dist/features/orders/schemas/firestore.d.ts +59 -0
- package/dist/features/orders/schemas/firestore.js +5 -0
- package/dist/features/orders/schemas/index.d.ts +91 -40
- package/dist/features/orders/schemas/index.js +10 -0
- package/dist/features/orders/types/index.d.ts +15 -0
- package/dist/features/payments/schemas/index.d.ts +12 -12
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +5 -5
- package/dist/features/pre-orders/components/PreOrderActionsClient.js +1 -1
- package/dist/features/pre-orders/components/PreOrderBadge.js +1 -1
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +7 -7
- package/dist/features/pre-orders/components/PreOrdersIndexListing.js +3 -3
- package/dist/features/pre-orders/schemas/index.d.ts +12 -12
- package/dist/features/products/columns/productTableColumns.js +2 -2
- package/dist/features/products/components/AuctionsIndexListing.js +3 -3
- package/dist/features/products/components/CompareOverlay.js +15 -10
- package/dist/features/products/components/CustomFieldsEditor.js +2 -2
- package/dist/features/products/components/CustomSectionsEditor.js +3 -3
- package/dist/features/products/components/FeatureBadge.js +2 -2
- package/dist/features/products/components/GroupSettingsPanel.js +5 -4
- package/dist/features/products/components/MakeOfferButton.js +4 -4
- package/dist/features/products/components/MarketplaceBundleCard.js +3 -2
- package/dist/features/products/components/MarketplacePrizeDrawCard.js +1 -1
- package/dist/features/products/components/PrizeDrawCollage.js +6 -6
- package/dist/features/products/components/PrizeDrawDetailPageView.js +5 -5
- package/dist/features/products/components/PrizeDrawEntryActions.js +1 -1
- package/dist/features/products/components/PrizeDrawItemsEditor.js +4 -4
- package/dist/features/products/components/PrizeDrawsIndexListing.js +11 -4
- package/dist/features/products/components/PrizeDrawsSection.js +1 -1
- package/dist/features/products/components/PrizeRevealModal.js +9 -4
- package/dist/features/products/components/ProductDetailActions.js +2 -1
- package/dist/features/products/components/ProductDetailPageView.js +16 -16
- package/dist/features/products/components/ProductFeaturesSelector.js +5 -5
- package/dist/features/products/components/ProductForm.js +1 -1
- package/dist/features/products/components/ProductGalleryClient.js +5 -3
- package/dist/features/products/components/ProductGrid.js +11 -11
- package/dist/features/products/components/ProductTabs.js +2 -2
- package/dist/features/products/components/ProductTabsShell.js +2 -1
- package/dist/features/products/components/ProductsIndexListing.js +6 -1
- package/dist/features/products/components/ShareButton.js +2 -1
- package/dist/features/products/components/ShowGroupSection.js +9 -5
- package/dist/features/products/components/SublistingCarouselSection.js +8 -4
- package/dist/features/products/constants/action-defs.d.ts +10 -2
- package/dist/features/products/constants/action-defs.js +20 -2
- package/dist/features/products/schemas/firestore.d.ts +5 -0
- package/dist/features/products/schemas/index.d.ts +40 -40
- package/dist/features/products/schemas/product-features.validators.d.ts +14 -14
- package/dist/features/promotions/components/CouponCard.js +13 -7
- package/dist/features/promotions/components/CouponsIndexListing.js +4 -6
- package/dist/features/promotions/components/PromotionsView.js +2 -2
- package/dist/features/promotions/schemas/index.d.ts +26 -26
- package/dist/features/reviews/components/ReviewDetailPageView.js +1 -1
- package/dist/features/reviews/components/ReviewDetailShell.js +11 -11
- package/dist/features/reviews/components/ReviewModal.js +1 -1
- package/dist/features/reviews/components/ReviewsIndexListing.js +2 -2
- package/dist/features/reviews/components/ReviewsList.js +2 -2
- package/dist/features/reviews/schemas/index.d.ts +22 -22
- package/dist/features/scams/components/ScamAwarenessModal.js +2 -2
- package/dist/features/scams/components/ScamProfileView.js +3 -3
- package/dist/features/scams/components/ScamRegistryView.js +2 -2
- package/dist/features/scams/schemas/index.d.ts +20 -20
- package/dist/features/search/components/Search.js +9 -9
- package/dist/features/search/components/SearchFiltersRow.js +1 -1
- package/dist/features/search/components/SearchResultsSection.js +3 -3
- package/dist/features/search/components/SearchView.js +1 -1
- package/dist/features/search/hooks/useNavSuggestions.js +2 -1
- package/dist/features/search/hooks/useSearch.js +2 -2
- package/dist/features/search/schemas/index.d.ts +3 -3
- package/dist/features/seller/components/BrandInlineSelect.js +2 -2
- package/dist/features/seller/components/CategoryInlineSelect.js +2 -2
- package/dist/features/seller/components/QuickProductForm.js +1 -1
- package/dist/features/seller/components/SellerAddressesView.js +4 -4
- package/dist/features/seller/components/SellerAnalyticsAlertsView.js +3 -3
- package/dist/features/seller/components/SellerAnalyticsView.js +2 -2
- package/dist/features/seller/components/SellerArtView.js +11 -11
- package/dist/features/seller/components/SellerAuctionsView.js +11 -11
- package/dist/features/seller/components/SellerBidsView.js +3 -3
- package/dist/features/seller/components/SellerBundlesView.js +12 -12
- package/dist/features/seller/components/SellerClassifiedView.js +11 -11
- package/dist/features/seller/components/SellerCouponEditorView.js +2 -2
- package/dist/features/seller/components/SellerDigitalCodesView.js +11 -11
- package/dist/features/seller/components/SellerFeaturesView.js +4 -4
- package/dist/features/seller/components/SellerLiveView.js +11 -11
- package/dist/features/seller/components/SellerOffersPanel.js +3 -2
- package/dist/features/seller/components/SellerOrdersView.js +2 -2
- package/dist/features/seller/components/SellerPayoutMethodsView.js +1 -1
- package/dist/features/seller/components/SellerPayoutRequestView.js +6 -5
- package/dist/features/seller/components/SellerPayoutSettingsView.js +5 -4
- package/dist/features/seller/components/SellerPreOrdersView.js +1 -1
- package/dist/features/seller/components/SellerPrizeDrawsView.js +1 -1
- package/dist/features/seller/components/SellerProductShell.js +20 -6
- package/dist/features/seller/components/SellerProductsCards.js +3 -3
- package/dist/features/seller/components/SellerProductsView.js +4 -4
- package/dist/features/seller/components/SellerReviewsView.js +7 -6
- package/dist/features/seller/components/SellerShippingView.js +2 -1
- package/dist/features/seller/components/SellerSidebar.js +5 -5
- package/dist/features/seller/components/SellerStickersView.js +11 -11
- package/dist/features/seller/components/SellerTemplatesView.js +1 -1
- package/dist/features/seller/schemas/index.d.ts +20 -20
- package/dist/features/server-errors/schemas/index.d.ts +6 -6
- package/dist/features/shell/CommandPalette.d.ts +27 -0
- package/dist/features/shell/CommandPalette.js +92 -0
- package/dist/features/shell/FormShell.js +4 -3
- package/dist/features/shell/QuickFormDrawer.js +3 -2
- package/dist/features/shell/StepForm.js +2 -2
- package/dist/features/shell/index.d.ts +2 -0
- package/dist/features/shell/index.js +1 -0
- package/dist/features/shipments/components/AdminShipmentEditorView.d.ts +7 -0
- package/dist/features/shipments/components/AdminShipmentEditorView.js +123 -0
- package/dist/features/shipments/components/AdminShipmentLotItemsView.d.ts +6 -0
- package/dist/features/shipments/components/AdminShipmentLotItemsView.js +96 -0
- package/dist/features/shipments/components/AdminShipmentProjectionsView.d.ts +9 -0
- package/dist/features/shipments/components/AdminShipmentProjectionsView.js +44 -0
- package/dist/features/shipments/components/AdminShipmentsView.d.ts +8 -0
- package/dist/features/shipments/components/AdminShipmentsView.js +82 -0
- package/dist/features/shipments/components/ShipmentItemLinkModal.d.ts +15 -0
- package/dist/features/shipments/components/ShipmentItemLinkModal.js +37 -0
- package/dist/features/shipments/hooks/useShipments.d.ts +69 -0
- package/dist/features/shipments/hooks/useShipments.js +96 -0
- package/dist/features/shipments/index.d.ts +10 -0
- package/dist/features/shipments/index.js +7 -0
- package/dist/features/shipments/manifest.d.ts +2 -0
- package/dist/features/shipments/manifest.js +26 -0
- package/dist/features/shipments/repository/shipment-items.repository.d.ts +56 -0
- package/dist/features/shipments/repository/shipment-items.repository.js +78 -0
- package/dist/features/shipments/repository/shipment-lots.repository.d.ts +48 -0
- package/dist/features/shipments/repository/shipment-lots.repository.js +55 -0
- package/dist/features/shipments/repository/shipments.repository.d.ts +50 -0
- package/dist/features/shipments/repository/shipments.repository.js +77 -0
- package/dist/features/shipments/schemas/firestore.d.ts +150 -0
- package/dist/features/shipments/schemas/firestore.js +76 -0
- package/dist/features/shipments/schemas/index.d.ts +2 -0
- package/dist/features/shipments/schemas/index.js +2 -0
- package/dist/features/shipments/schemas/validation.d.ts +350 -0
- package/dist/features/shipments/schemas/validation.js +96 -0
- package/dist/features/shipments/utils/cost-allocation.d.ts +25 -0
- package/dist/features/shipments/utils/cost-allocation.js +83 -0
- package/dist/features/site-settings/components/ActionPermissionsManager.js +2 -2
- package/dist/features/stores/components/InteractiveStoreCard.js +2 -2
- package/dist/features/stores/components/StoreAboutView.js +1 -1
- package/dist/features/stores/components/StoreAuctionsListing.js +3 -3
- package/dist/features/stores/components/StoreAuctionsView.js +1 -1
- package/dist/features/stores/components/StoreCapabilitiesGuideView.js +1 -1
- package/dist/features/stores/components/StoreClassifiedsListing.js +2 -2
- package/dist/features/stores/components/StoreDetailLayoutView.js +1 -1
- package/dist/features/stores/components/StoreDigitalCodesListing.js +2 -2
- package/dist/features/stores/components/StoreFinanceGuideView.js +2 -2
- package/dist/features/stores/components/StoreGuideHubView.js +2 -2
- package/dist/features/stores/components/StoreHeader.js +4 -4
- package/dist/features/stores/components/StoreLiveItemsListing.js +2 -2
- package/dist/features/stores/components/StoreNavTabs.js +2 -2
- package/dist/features/stores/components/StoreOrdersGuideView.js +1 -1
- package/dist/features/stores/components/StorePreOrdersListing.js +3 -3
- package/dist/features/stores/components/StoreProductsListing.js +1 -1
- package/dist/features/stores/components/StoreReviewsListing.js +2 -2
- package/dist/features/stores/components/StoreReviewsView.js +1 -1
- package/dist/features/stores/components/StoreSettingsGuideView.js +1 -1
- package/dist/features/stores/components/StoresIndexListing.js +9 -3
- package/dist/features/stores/schemas/index.d.ts +10 -10
- package/dist/features/support/schemas/index.d.ts +22 -22
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +3 -3
- package/dist/features/whatsapp-bot/components/WhatsAppChatButton.js +1 -1
- package/dist/features/wishlist/hooks/useWishlistCount.js +1 -2
- package/dist/index.d.ts +44 -1
- package/dist/index.js +37 -1
- package/dist/next/routing/route-map.d.ts +18 -0
- package/dist/next/routing/route-map.js +9 -0
- package/dist/react/hooks/useVisualViewportInset.d.ts +1 -0
- package/dist/react/hooks/useVisualViewportInset.js +59 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +1 -0
- package/dist/repositories/index.d.ts +5 -0
- package/dist/repositories/index.js +5 -0
- package/dist/schemas/registry.d.ts +398 -364
- package/dist/schemas/sieve.d.ts +2 -2
- package/dist/schemas/webhooks/google-oauth.d.ts +2 -2
- package/dist/schemas/webhooks/razorpay.d.ts +100 -100
- package/dist/seed/_helpers/media.js +1 -0
- package/dist/seed/actions/demo-seed-actions.d.ts +1 -1
- package/dist/seed/catalogue-seed-data.d.ts +2 -0
- package/dist/seed/catalogue-seed-data.js +112 -0
- package/dist/seed/grouped-listings-seed-data.d.ts +5 -0
- package/dist/seed/homepage-sections-seed-data.js +0 -1
- package/dist/seed/index.d.ts +2 -0
- package/dist/seed/index.js +2 -0
- package/dist/seed/manifest.js +6 -0
- package/dist/seed/products-preorders-seed-data.d.ts +5 -0
- package/dist/seed/shipments-seed-data.d.ts +5 -0
- package/dist/seed/shipments-seed-data.js +185 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.js +5 -0
- package/dist/styles.css +75 -19
- package/dist/tailwind-utilities.css +1 -1
- package/dist/tokens/index.d.ts +0 -2
- package/dist/tokens/index.js +0 -2
- package/dist/tokens/tokens.css +12 -2
- package/dist/ui/DataTable.js +4 -3
- package/dist/ui/components/Button.d.ts +4 -1
- package/dist/ui/components/Button.js +11 -5
- package/dist/ui/components/Checkbox.d.ts +9 -1
- package/dist/ui/components/Checkbox.js +5 -2
- package/dist/ui/components/ClaimCouponButton.js +2 -1
- package/dist/ui/components/ConfirmDeleteModal.style.css +1 -1
- package/dist/ui/components/Drawer.style.css +13 -1
- package/dist/ui/components/Dropdown.style.css +2 -2
- package/dist/ui/components/FilterDrawer.d.ts +4 -1
- package/dist/ui/components/FilterDrawer.js +8 -2
- package/dist/ui/components/Form.d.ts +1 -1
- package/dist/ui/components/Form.js +2 -2
- package/dist/ui/components/FormActionBar.style.css +6 -1
- package/dist/ui/components/IconButton.d.ts +6 -1
- package/dist/ui/components/IconButton.js +5 -2
- package/dist/ui/components/IconButton.style.css +11 -0
- package/dist/ui/components/ImageGallery.style.css +2 -0
- package/dist/ui/components/ImageLightbox.style.css +1 -0
- package/dist/ui/components/ListingFilterDrawer.d.ts +4 -1
- package/dist/ui/components/ListingFilterDrawer.js +4 -3
- package/dist/ui/components/ListingLayout.style.css +2 -2
- package/dist/ui/components/Modal.style.css +1 -1
- package/dist/ui/components/Pagination.d.ts +5 -1
- package/dist/ui/components/Pagination.js +4 -2
- package/dist/ui/components/RowActionMenu.js +1 -1
- package/dist/ui/components/RowActionMenu.style.css +1 -1
- package/dist/ui/components/Select.d.ts +6 -1
- package/dist/ui/components/Select.js +18 -13
- package/dist/ui/components/Select.style.css +1 -1
- package/dist/ui/components/Semantic.d.ts +13 -0
- package/dist/ui/components/Semantic.js +16 -3
- package/dist/ui/components/SideDrawer.style.css +16 -4
- package/dist/ui/components/SideModal.style.css +1 -1
- package/dist/ui/components/StickyToolbar.d.ts +3 -2
- package/dist/ui/components/StickyToolbar.js +1 -1
- package/dist/ui/components/Textarea.d.ts +5 -0
- package/dist/ui/components/Textarea.js +8 -4
- package/dist/ui/components/Toast.style.css +3 -0
- package/dist/ui/components/UnsavedChangesModal.style.css +1 -1
- package/dist/ui/components/surface-tokens.d.ts +121 -113
- package/dist/ui/components/surface-tokens.js +110 -104
- package/dist/ui/forms/FormShell.d.ts +8 -27
- package/dist/ui/forms/FormShell.js +1 -194
- package/dist/ui/forms/index.d.ts +2 -2
- package/dist/ui/forms/index.js +1 -1
- package/dist/ui/index.d.ts +8 -4
- package/dist/ui/index.js +4 -2
- package/dist/utils/id-generators.d.ts +27 -0
- package/dist/utils/id-generators.js +45 -0
- package/dist/utils/number.formatter.d.ts +7 -0
- package/dist/utils/number.formatter.js +9 -0
- package/dist/validation/schemas.d.ts +5 -5
- package/package.json +1 -1
|
@@ -7,12 +7,24 @@
|
|
|
7
7
|
* Never hard-code `/api/...` strings in hook files — import from here.
|
|
8
8
|
*/
|
|
9
9
|
// ---------------------------------------------------------------------------
|
|
10
|
+
// Config
|
|
11
|
+
// ---------------------------------------------------------------------------
|
|
12
|
+
export const CONFIG_ENDPOINTS = {
|
|
13
|
+
FEATURE_FLAGS: "/api/config/feature-flags",
|
|
14
|
+
};
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
10
16
|
// Logs
|
|
11
17
|
// ---------------------------------------------------------------------------
|
|
12
18
|
export const LOGS_ENDPOINTS = {
|
|
13
19
|
WRITE: "/api/logs/write",
|
|
14
20
|
};
|
|
15
21
|
// ---------------------------------------------------------------------------
|
|
22
|
+
// Client Error Reporting
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
export const CLIENT_ERROR_ENDPOINTS = {
|
|
25
|
+
REPORT: "/api/client-errors",
|
|
26
|
+
};
|
|
27
|
+
// ---------------------------------------------------------------------------
|
|
16
28
|
// Auth
|
|
17
29
|
// ---------------------------------------------------------------------------
|
|
18
30
|
export const AUTH_ENDPOINTS = {
|
|
@@ -47,9 +59,34 @@ export const ACCOUNT_ENDPOINTS = {
|
|
|
47
59
|
ORDERS: "/api/user/orders",
|
|
48
60
|
ORDER_BY_ID: (orderId) => `/api/user/orders/${orderId}`,
|
|
49
61
|
WISHLIST: "/api/user/wishlist",
|
|
62
|
+
WISHLIST_ITEM_BY_ID: (itemId) => `/api/user/wishlist/${encodeURIComponent(itemId)}`,
|
|
63
|
+
WISHLIST_VALIDATE: "/api/user/wishlist/validate",
|
|
50
64
|
HISTORY: "/api/user/history",
|
|
51
65
|
HISTORY_ITEM: (productId) => `/api/user/history/${encodeURIComponent(productId)}`,
|
|
52
66
|
HISTORY_MERGE: "/api/user/history/merge",
|
|
67
|
+
REVIEWS: "/api/user/reviews",
|
|
68
|
+
BIDS: "/api/user/bids",
|
|
69
|
+
EXPORT: "/api/user/export",
|
|
70
|
+
/** Claimed-coupons wallet — GET list, POST claim, DELETE by id. */
|
|
71
|
+
COUPONS: "/api/user/coupons",
|
|
72
|
+
COUPON_BY_ID: (id) => `/api/user/coupons/${id}`,
|
|
73
|
+
COUPONS_CLAIM: "/api/user/coupons/claim",
|
|
74
|
+
OFFERS: "/api/user/offers",
|
|
75
|
+
NOTIFICATION_PREFERENCES: "/api/user/notification-preferences",
|
|
76
|
+
CATALOGUE: "/api/user/catalogue",
|
|
77
|
+
CATALOGUE_BY_ID: (id) => `/api/user/catalogue/${id}`,
|
|
78
|
+
CATALOGUE_LIST: (id) => `/api/user/catalogue/${id}/list`,
|
|
79
|
+
CATALOGUE_SUBMIT: (id) => `/api/user/catalogue/${id}/submit`,
|
|
80
|
+
PUBLIC_CATALOGUE: (ownerSlug) => `/api/catalogue/${ownerSlug}`,
|
|
81
|
+
};
|
|
82
|
+
// ---------------------------------------------------------------------------
|
|
83
|
+
// Conversations (buyer messaging)
|
|
84
|
+
// ---------------------------------------------------------------------------
|
|
85
|
+
export const CONVERSATION_ENDPOINTS = {
|
|
86
|
+
LIST: "/api/user/conversations",
|
|
87
|
+
BY_ID: (id) => `/api/user/conversations/${encodeURIComponent(id)}`,
|
|
88
|
+
MESSAGES: (id) => `/api/user/conversations/${encodeURIComponent(id)}/messages`,
|
|
89
|
+
READ: (id) => `/api/user/conversations/${encodeURIComponent(id)}/read`,
|
|
53
90
|
};
|
|
54
91
|
// ---------------------------------------------------------------------------
|
|
55
92
|
// Notifications
|
|
@@ -81,7 +118,9 @@ export const ADMIN_ENDPOINTS = {
|
|
|
81
118
|
ORDERS: "/api/admin/orders",
|
|
82
119
|
ORDER_BY_ID: (id) => `/api/admin/orders/${id}`,
|
|
83
120
|
ORDER_REFUND: (id) => `/api/admin/orders/${id}/refund`,
|
|
121
|
+
ORDER_PAYMENT_VERIFY: (id) => `/api/admin/orders/${id}/payment-verify`,
|
|
84
122
|
USERS: "/api/admin/users",
|
|
123
|
+
USERS_BULK: "/api/admin/users/bulk",
|
|
85
124
|
USER_BY_ID: (uid) => `/api/admin/users/${uid}`,
|
|
86
125
|
REVIEWS: "/api/admin/reviews",
|
|
87
126
|
REVIEW_BY_ID: (id) => `/api/admin/reviews/${id}`,
|
|
@@ -104,6 +143,18 @@ export const ADMIN_ENDPOINTS = {
|
|
|
104
143
|
PAYOUT_BY_ID: (id) => `/api/admin/payouts/${id}`,
|
|
105
144
|
PAYOUTS_WEEKLY: "/api/admin/payouts/weekly",
|
|
106
145
|
PAYOUTS_EXPORT: "/api/admin/payouts/export",
|
|
146
|
+
SHIPMENTS: "/api/admin/shipments",
|
|
147
|
+
SHIPMENT_BY_ID: (id) => `/api/admin/shipments/${id}`,
|
|
148
|
+
SHIPMENT_LOTS: (id) => `/api/admin/shipments/${id}/lots`,
|
|
149
|
+
SHIPMENT_LOT_BY_ID: (id, lotId) => `/api/admin/shipments/${id}/lots/${lotId}`,
|
|
150
|
+
SHIPMENT_LOT_ITEMS: (id, lotId) => `/api/admin/shipments/${id}/lots/${lotId}/items`,
|
|
151
|
+
SHIPMENT_LOT_ITEM_BY_ID: (id, lotId, itemId) => `/api/admin/shipments/${id}/lots/${lotId}/items/${itemId}`,
|
|
152
|
+
SHIPMENT_LOT_ITEMS_BULK: (id, lotId) => `/api/admin/shipments/${id}/lots/${lotId}/items/bulk`,
|
|
153
|
+
SHIPMENT_LOT_ITEM_LINK: (id, lotId, itemId) => `/api/admin/shipments/${id}/lots/${lotId}/items/${itemId}/link`,
|
|
154
|
+
SHIPMENTS_PROJECTIONS: "/api/admin/shipments/projections",
|
|
155
|
+
CATALOGUE_APPROVALS: "/api/admin/catalogue",
|
|
156
|
+
CATALOGUE_APPROVE: (id) => `/api/admin/catalogue/${id}/approve`,
|
|
157
|
+
CATALOGUE_REJECT: (id) => `/api/admin/catalogue/${id}/reject`,
|
|
107
158
|
EVENTS: "/api/admin/events",
|
|
108
159
|
EVENT_BY_ID: (id) => `/api/admin/events/${id}`,
|
|
109
160
|
EVENT_STATUS: (id) => `/api/admin/events/${id}/status`,
|
|
@@ -126,6 +177,7 @@ export const ADMIN_ENDPOINTS = {
|
|
|
126
177
|
ADMIN_EVENT_ENTRIES: "/api/admin/event-entries",
|
|
127
178
|
ADMIN_EVENT_ENTRY_BY_ID: (id) => `/api/admin/event-entries/${id}`,
|
|
128
179
|
ADMIN_NOTIFICATIONS: "/api/admin/notifications",
|
|
180
|
+
ADMIN_NOTIFICATIONS_BULK: "/api/admin/notifications/bulk",
|
|
129
181
|
ADMIN_NOTIFICATION_BY_ID: (id) => `/api/admin/notifications/${id}`,
|
|
130
182
|
ADMIN_NOTIFICATION_RESEND: (id) => `/api/admin/notifications/${id}/resend`,
|
|
131
183
|
ADMIN_CARTS: "/api/admin/carts",
|
|
@@ -163,6 +215,9 @@ export const ADMIN_ENDPOINTS = {
|
|
|
163
215
|
GROUPED_LISTINGS: "/api/admin/grouped-listings",
|
|
164
216
|
GROUPED_LISTING_BY_ID: (id) => `/api/admin/grouped-listings/${id}`,
|
|
165
217
|
ADMIN_FULFILLMENT: (storeId) => `/api/store/fulfillment?storeId=${encodeURIComponent(storeId)}`,
|
|
218
|
+
CHECKOUT_BYPASS: "/api/admin/checkout-bypass",
|
|
219
|
+
MAINTENANCE_ANALYSIS: "/api/admin/maintenance/analysis",
|
|
220
|
+
MEDIA_LIST: "/api/admin/media",
|
|
166
221
|
};
|
|
167
222
|
// ---------------------------------------------------------------------------
|
|
168
223
|
// Chat
|
|
@@ -195,6 +250,10 @@ export const CART_ENDPOINTS = {
|
|
|
195
250
|
GET: "/api/cart",
|
|
196
251
|
BY_USER: (userId) => `/api/cart?userId=${userId}`,
|
|
197
252
|
MERGE: "/api/cart/merge",
|
|
253
|
+
BY_ITEM_ID: (itemId) => `/api/cart/${encodeURIComponent(itemId)}`,
|
|
254
|
+
VALIDATE: "/api/cart/validate",
|
|
255
|
+
SELECTION: "/api/cart/selection",
|
|
256
|
+
COUPON: "/api/cart/coupon",
|
|
198
257
|
};
|
|
199
258
|
// ---------------------------------------------------------------------------
|
|
200
259
|
// Categories
|
|
@@ -206,6 +265,8 @@ export const CATEGORY_ENDPOINTS = {
|
|
|
206
265
|
BY_PARENT: (parentId) => `/api/categories?parentId=${parentId}`,
|
|
207
266
|
BRANDS: (pageSize = 100) => `/api/categories?isBrand=true&pageSize=${pageSize}`,
|
|
208
267
|
ROOT: (pageSize = 20) => `/api/categories?tier=0&pageSize=${pageSize}`,
|
|
268
|
+
/** @param qs — pre-built querystring (no leading `?`) for structured filters */
|
|
269
|
+
FILTERED: (qs) => `/api/categories?${qs}`,
|
|
209
270
|
};
|
|
210
271
|
// ---------------------------------------------------------------------------
|
|
211
272
|
// Checkout
|
|
@@ -239,6 +300,7 @@ export const CONSULTATION_ENDPOINTS = {
|
|
|
239
300
|
// ---------------------------------------------------------------------------
|
|
240
301
|
export const COPILOT_ENDPOINTS = {
|
|
241
302
|
CHAT: "/api/copilot/chat",
|
|
303
|
+
HISTORY: "/api/copilot/history",
|
|
242
304
|
};
|
|
243
305
|
// ---------------------------------------------------------------------------
|
|
244
306
|
// Corporate
|
|
@@ -247,6 +309,18 @@ export const CORPORATE_ENDPOINTS = {
|
|
|
247
309
|
INQUIRIES: "/api/corporate-inquiries",
|
|
248
310
|
};
|
|
249
311
|
// ---------------------------------------------------------------------------
|
|
312
|
+
// Contact (public contact-us form)
|
|
313
|
+
// ---------------------------------------------------------------------------
|
|
314
|
+
export const CONTACT_ENDPOINTS = {
|
|
315
|
+
SUBMIT: "/api/contact",
|
|
316
|
+
};
|
|
317
|
+
// ---------------------------------------------------------------------------
|
|
318
|
+
// Ads (public — active ad lookup by slot)
|
|
319
|
+
// ---------------------------------------------------------------------------
|
|
320
|
+
export const AD_ENDPOINTS = {
|
|
321
|
+
ACTIVE_BY_SLOT: (slotId) => `/api/ads?slot=${encodeURIComponent(slotId)}`,
|
|
322
|
+
};
|
|
323
|
+
// ---------------------------------------------------------------------------
|
|
250
324
|
// Events
|
|
251
325
|
// ---------------------------------------------------------------------------
|
|
252
326
|
export const EVENT_ENDPOINTS = {
|
|
@@ -311,13 +385,14 @@ export const ORDER_ENDPOINTS = {
|
|
|
311
385
|
LIST: "/api/orders",
|
|
312
386
|
BY_ID: (id) => `/api/orders/${id}`,
|
|
313
387
|
TRACK: (trackingId) => `/api/orders/track/${trackingId}`,
|
|
388
|
+
PAYMENT_PROOF: (id) => `/api/orders/${id}/payment-proof`,
|
|
314
389
|
};
|
|
315
390
|
// ---------------------------------------------------------------------------
|
|
316
391
|
// Pre-orders
|
|
317
392
|
// ---------------------------------------------------------------------------
|
|
318
393
|
export const PREORDER_ENDPOINTS = {
|
|
319
|
-
LIST: "/api/
|
|
320
|
-
BY_SLUG: (slug) => `/api/
|
|
394
|
+
LIST: "/api/pre-orders",
|
|
395
|
+
BY_SLUG: (slug) => `/api/pre-orders/${slug}`,
|
|
321
396
|
};
|
|
322
397
|
// ---------------------------------------------------------------------------
|
|
323
398
|
// Products
|
|
@@ -329,6 +404,22 @@ export const PRODUCT_ENDPOINTS = {
|
|
|
329
404
|
// Lottery: user self-pull for prize-draw products in lottery mode
|
|
330
405
|
LOTTERY_PULL: (id) => `/api/products/${id}/lottery-pull`,
|
|
331
406
|
LOTTERY_ENTRIES: (id) => `/api/products/${id}/lottery-entries`,
|
|
407
|
+
SEARCH: (query, pageSize = 20) => `/api/products?q=${encodeURIComponent(query)}&pageSize=${pageSize}`,
|
|
408
|
+
/** @param ids — comma-separated product ids, e.g. for a compare-tray fetch */
|
|
409
|
+
BY_IDS: (ids) => `/api/products?ids=${encodeURIComponent(ids)}`,
|
|
410
|
+
GROUP_BY_ID: (groupId) => `/api/products/group/${encodeURIComponent(groupId)}`,
|
|
411
|
+
};
|
|
412
|
+
// ---------------------------------------------------------------------------
|
|
413
|
+
// Prize Draws
|
|
414
|
+
// ---------------------------------------------------------------------------
|
|
415
|
+
export const PRIZE_DRAW_ENDPOINTS = {
|
|
416
|
+
REVEAL: (productId) => `/api/prize-draws/${encodeURIComponent(productId)}/reveal`,
|
|
417
|
+
};
|
|
418
|
+
// ---------------------------------------------------------------------------
|
|
419
|
+
// Sublisting Categories (public)
|
|
420
|
+
// ---------------------------------------------------------------------------
|
|
421
|
+
export const SUBLISTING_CATEGORY_ENDPOINTS = {
|
|
422
|
+
BY_ID: (id) => `/api/sublisting-categories/${encodeURIComponent(id)}`,
|
|
332
423
|
};
|
|
333
424
|
// ---------------------------------------------------------------------------
|
|
334
425
|
// Promotions
|
|
@@ -350,6 +441,9 @@ export const REVIEW_ENDPOINTS = {
|
|
|
350
441
|
// ---------------------------------------------------------------------------
|
|
351
442
|
export const SEARCH_ENDPOINTS = {
|
|
352
443
|
QUERY: (q, extra) => `/api/search?q=${encodeURIComponent(q)}${extra ? `&${extra}` : ""}`,
|
|
444
|
+
SUGGESTIONS: "/api/search/suggestions",
|
|
445
|
+
/** @param params — pre-built querystring (no leading `?`) from a caller-owned URLSearchParams */
|
|
446
|
+
RAW: (params) => `/api/search?${params}`,
|
|
353
447
|
};
|
|
354
448
|
// ---------------------------------------------------------------------------
|
|
355
449
|
// Seller
|
|
@@ -365,10 +459,16 @@ export const SELLER_ENDPOINTS = {
|
|
|
365
459
|
OFFERS: "/api/store/offers",
|
|
366
460
|
PAYOUTS: "/api/store/payouts",
|
|
367
461
|
PAYOUT_SETTINGS: "/api/store/payout-settings",
|
|
462
|
+
PAYOUT_REQUEST: "/api/store/payouts/request",
|
|
463
|
+
REVIEWS: "/api/store/reviews",
|
|
464
|
+
REVIEW_CONTEST: (id) => `/api/store/reviews/${id}/contest`,
|
|
465
|
+
REVIEW_FEEDBACK: (id) => `/api/store/reviews/${id}/feedback`,
|
|
466
|
+
SHIPPING: "/api/store/shipping",
|
|
368
467
|
STORE: "/api/store/storefront",
|
|
369
468
|
STORE_ADDRESSES: "/api/store/addresses",
|
|
370
469
|
STORE_ADDRESS_BY_ID: (id) => `/api/store/addresses/${id}`,
|
|
371
470
|
BIDS: "/api/store/bids",
|
|
471
|
+
BID_BY_ID: (id) => `/api/store/bids/${id}`,
|
|
372
472
|
DASHBOARD: "/api/store/dashboard",
|
|
373
473
|
ANALYTICS: (period) => `/api/store/analytics${period ? `?period=${period}` : ""}`,
|
|
374
474
|
FEATURES: "/api/store/features",
|
|
@@ -392,6 +492,17 @@ export const SELLER_ENDPOINTS = {
|
|
|
392
492
|
PRODUCTS_SCAN: (barcode) => `/api/store/products/scan?barcode=${encodeURIComponent(barcode)}`,
|
|
393
493
|
ORDERS_FULFILLMENT: "/api/store/fulfillment",
|
|
394
494
|
ORDERS_ASSIGN: (orderId) => `/api/store/orders/${orderId}/assign`,
|
|
495
|
+
PRODUCT_BY_ID: (id) => `/api/store/products/${id}`,
|
|
496
|
+
PRODUCT_DUPLICATE: (id) => `/api/store/products/${id}/duplicate`,
|
|
497
|
+
};
|
|
498
|
+
// ---------------------------------------------------------------------------
|
|
499
|
+
// Brands (public)
|
|
500
|
+
// ---------------------------------------------------------------------------
|
|
501
|
+
export const BRAND_ENDPOINTS = {
|
|
502
|
+
LIST: "/api/brands",
|
|
503
|
+
BY_ID: (id) => `/api/brands/${id}`,
|
|
504
|
+
/** @param qs — pre-built querystring (no leading `?`) for structured filters */
|
|
505
|
+
FILTERED: (qs) => `/api/brands?${qs}`,
|
|
395
506
|
};
|
|
396
507
|
// ---------------------------------------------------------------------------
|
|
397
508
|
// Blog
|
|
@@ -418,6 +529,8 @@ export const STORE_ENDPOINTS = {
|
|
|
418
529
|
export const WISHLIST_ENDPOINTS = {
|
|
419
530
|
LIST: "/api/user/wishlist",
|
|
420
531
|
BY_USER: (userId) => `/api/wishlist?userId=${userId}`,
|
|
532
|
+
ADD: "/api/wishlist",
|
|
533
|
+
MERGE: "/api/wishlist/merge",
|
|
421
534
|
};
|
|
422
535
|
// ---------------------------------------------------------------------------
|
|
423
536
|
// Profile Stats
|
|
@@ -432,6 +545,12 @@ export const PROFILE_STATS_ENDPOINTS = {
|
|
|
432
545
|
// Before / After
|
|
433
546
|
// ---------------------------------------------------------------------------
|
|
434
547
|
// ---------------------------------------------------------------------------
|
|
548
|
+
// Reports (content/listing abuse reports)
|
|
549
|
+
// ---------------------------------------------------------------------------
|
|
550
|
+
export const REPORT_ENDPOINTS = {
|
|
551
|
+
SUBMIT: "/api/reports",
|
|
552
|
+
};
|
|
553
|
+
// ---------------------------------------------------------------------------
|
|
435
554
|
// Support Tickets (user-facing)
|
|
436
555
|
// ---------------------------------------------------------------------------
|
|
437
556
|
export const SUPPORT_ENDPOINTS = {
|
|
@@ -472,9 +591,12 @@ export const WHATSAPP_SELLER_ENDPOINTS = {
|
|
|
472
591
|
// Aggregate namespace export
|
|
473
592
|
// ---------------------------------------------------------------------------
|
|
474
593
|
export const API_ENDPOINTS = {
|
|
594
|
+
CONFIG: CONFIG_ENDPOINTS,
|
|
475
595
|
LOGS: LOGS_ENDPOINTS,
|
|
596
|
+
CLIENT_ERRORS: CLIENT_ERROR_ENDPOINTS,
|
|
476
597
|
AUTH: AUTH_ENDPOINTS,
|
|
477
598
|
ACCOUNT: ACCOUNT_ENDPOINTS,
|
|
599
|
+
CONVERSATIONS: CONVERSATION_ENDPOINTS,
|
|
478
600
|
NOTIFICATIONS: NOTIFICATIONS_ENDPOINTS,
|
|
479
601
|
SITE_SETTINGS: SITE_SETTINGS_ENDPOINTS,
|
|
480
602
|
ADMIN: ADMIN_ENDPOINTS,
|
|
@@ -490,6 +612,8 @@ export const API_ENDPOINTS = {
|
|
|
490
612
|
CONSULTATION: CONSULTATION_ENDPOINTS,
|
|
491
613
|
COPILOT: COPILOT_ENDPOINTS,
|
|
492
614
|
CORPORATE: CORPORATE_ENDPOINTS,
|
|
615
|
+
CONTACT: CONTACT_ENDPOINTS,
|
|
616
|
+
ADS: AD_ENDPOINTS,
|
|
493
617
|
EVENTS: EVENT_ENDPOINTS,
|
|
494
618
|
LOTTERY: LOTTERY_ENDPOINTS,
|
|
495
619
|
FAQS: FAQ_ENDPOINTS,
|
|
@@ -499,18 +623,22 @@ export const API_ENDPOINTS = {
|
|
|
499
623
|
ORDERS: ORDER_ENDPOINTS,
|
|
500
624
|
PREORDERS: PREORDER_ENDPOINTS,
|
|
501
625
|
PRODUCTS: PRODUCT_ENDPOINTS,
|
|
626
|
+
PRIZE_DRAWS: PRIZE_DRAW_ENDPOINTS,
|
|
502
627
|
PROMOTIONS: PROMOTION_ENDPOINTS,
|
|
503
628
|
REVIEWS: REVIEW_ENDPOINTS,
|
|
504
629
|
SEARCH: SEARCH_ENDPOINTS,
|
|
505
630
|
SELLER: SELLER_ENDPOINTS,
|
|
631
|
+
BRANDS: BRAND_ENDPOINTS,
|
|
506
632
|
BLOG: BLOG_ENDPOINTS,
|
|
507
633
|
STORES: STORE_ENDPOINTS,
|
|
634
|
+
SUBLISTING_CATEGORIES: SUBLISTING_CATEGORY_ENDPOINTS,
|
|
508
635
|
WISHLIST: WISHLIST_ENDPOINTS,
|
|
509
636
|
PROFILE_STATS: PROFILE_STATS_ENDPOINTS,
|
|
510
637
|
DEMO: DEMO_ENDPOINTS,
|
|
511
638
|
WHATSAPP_SELLER: WHATSAPP_SELLER_ENDPOINTS,
|
|
512
639
|
SUPPORT: SUPPORT_ENDPOINTS,
|
|
513
640
|
SCAMMERS: SCAMMER_ENDPOINTS,
|
|
641
|
+
REPORTS: REPORT_ENDPOINTS,
|
|
514
642
|
};
|
|
515
643
|
/** Canonical alias — prefer API_ROUTES over API_ENDPOINTS in new code. */
|
|
516
644
|
export const API_ROUTES = API_ENDPOINTS;
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import { useEffect, useRef } from "react";
|
|
17
17
|
import { useQueryClient } from "@tanstack/react-query";
|
|
18
18
|
import { apiClient } from "../../http";
|
|
19
|
+
import { CART_ENDPOINTS, ACCOUNT_ENDPOINTS } from "../../constants/api-endpoints";
|
|
19
20
|
import { getCartOps, clearCartOps, getWishlistOps, clearWishlistOps, } from "../../features/cart/utils/pending-ops";
|
|
20
21
|
const SYNC_INTERVAL_MS = 30000;
|
|
21
22
|
async function replayCartOps() {
|
|
@@ -26,7 +27,7 @@ async function replayCartOps() {
|
|
|
26
27
|
for (const op of ops) {
|
|
27
28
|
if (op.op === "add") {
|
|
28
29
|
await apiClient
|
|
29
|
-
.post(
|
|
30
|
+
.post(CART_ENDPOINTS.GET, {
|
|
30
31
|
productId: op.productId,
|
|
31
32
|
quantity: op.quantity ?? 1,
|
|
32
33
|
})
|
|
@@ -34,7 +35,7 @@ async function replayCartOps() {
|
|
|
34
35
|
}
|
|
35
36
|
else if (op.op === "remove") {
|
|
36
37
|
await apiClient
|
|
37
|
-
.delete(
|
|
38
|
+
.delete(CART_ENDPOINTS.BY_ITEM_ID(op.productId))
|
|
38
39
|
.catch(console.error);
|
|
39
40
|
}
|
|
40
41
|
}
|
|
@@ -49,12 +50,12 @@ async function replayWishlistOps() {
|
|
|
49
50
|
continue; // server wishlist is product-only
|
|
50
51
|
if (op.op === "add") {
|
|
51
52
|
await apiClient
|
|
52
|
-
.post(
|
|
53
|
+
.post(ACCOUNT_ENDPOINTS.WISHLIST, { productId: op.itemId })
|
|
53
54
|
.catch(console.error);
|
|
54
55
|
}
|
|
55
56
|
else if (op.op === "remove") {
|
|
56
57
|
await apiClient
|
|
57
|
-
.delete(
|
|
58
|
+
.delete(ACCOUNT_ENDPOINTS.WISHLIST_ITEM_BY_ID(op.itemId))
|
|
58
59
|
.catch(console.error);
|
|
59
60
|
}
|
|
60
61
|
}
|
package/dist/errors/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { ValidationError } from "./validation-error";
|
|
|
7
7
|
export { AuthenticationError } from "./authentication-error";
|
|
8
8
|
export { AuthorizationError } from "./authorization-error";
|
|
9
9
|
export { NotFoundError } from "./not-found-error";
|
|
10
|
+
export { ConflictError } from "./conflict-error";
|
|
10
11
|
export { DatabaseError } from "./database-error";
|
|
11
12
|
export { RazorpayUnreachableError } from "./razorpay-unreachable";
|
|
12
13
|
export { handleApiError, logError, isAppError } from "./error-handler";
|
package/dist/errors/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export { ValidationError } from "./validation-error";
|
|
|
10
10
|
export { AuthenticationError } from "./authentication-error";
|
|
11
11
|
export { AuthorizationError } from "./authorization-error";
|
|
12
12
|
export { NotFoundError } from "./not-found-error";
|
|
13
|
+
export { ConflictError } from "./conflict-error";
|
|
13
14
|
export { DatabaseError } from "./database-error";
|
|
14
15
|
export { RazorpayUnreachableError } from "./razorpay-unreachable";
|
|
15
16
|
// error-handler uses `next/server` — only import in server/API-route contexts
|
|
@@ -4,12 +4,12 @@ import { PAGE_CONTAINER } from "../../../_internal/shared/styles/page";
|
|
|
4
4
|
import { THEMED_BG_PRIMARY, THEMED_BG_SECONDARY } from "../../../_internal/shared/styles/themed";
|
|
5
5
|
import { Caption, Div, Heading, Row, Section, Stack, Table, Tbody, Td, Text, Th, Thead, Tr } from "../../../ui";
|
|
6
6
|
const __P = {
|
|
7
|
-
p5: "p-5",
|
|
7
|
+
p5: "p-[var(--appkit-space-5)]",
|
|
8
8
|
};
|
|
9
9
|
const __O = {
|
|
10
10
|
xAuto: "overflow-x-auto",
|
|
11
11
|
};
|
|
12
|
-
const CLS_RATE_CELL = "py-3 px-4 font-semibold text-violet-700 dark:text-violet-400";
|
|
12
|
+
const CLS_RATE_CELL = "py-[var(--appkit-space-3)] px-[var(--appkit-space-4)] font-semibold text-violet-700 dark:text-violet-400";
|
|
13
13
|
const CLS_HIGHLIGHT = "font-bold text-green-700 dark:text-green-400";
|
|
14
14
|
export async function FeesView({} = {}) {
|
|
15
15
|
const themed = { bgPrimary: THEMED_BG_PRIMARY, bgSecondary: THEMED_BG_SECONDARY };
|
|
@@ -6,8 +6,8 @@ import { Alert, Div, Heading, Row, Section, Stack, Text } from "../../../ui";
|
|
|
6
6
|
import { TextLink } from "../../../ui";
|
|
7
7
|
import { BookOpen, MessageCircle, ShoppingBag, Gavel, PackageCheck, UserCheck, Store, ChevronRight, } from "lucide-react";
|
|
8
8
|
const __P = {
|
|
9
|
-
p6: "p-6",
|
|
10
|
-
p8: "p-8",
|
|
9
|
+
p6: "p-[var(--appkit-space-6)]",
|
|
10
|
+
p8: "p-[var(--appkit-space-8)]",
|
|
11
11
|
};
|
|
12
12
|
export async function HelpPageView({} = {}) {
|
|
13
13
|
const page = { container: PAGE_CONTAINER };
|
|
@@ -5,8 +5,8 @@ import { Div, FlowDiagram, Heading, Row, Section, Stack, Text } from "../../../u
|
|
|
5
5
|
import { TextLink } from "../../../ui";
|
|
6
6
|
import { Gavel, Clock, Trophy, CreditCard } from "lucide-react";
|
|
7
7
|
const __P = {
|
|
8
|
-
p5: "p-5",
|
|
9
|
-
p8: "p-8",
|
|
8
|
+
p5: "p-[var(--appkit-space-5)]",
|
|
9
|
+
p8: "p-[var(--appkit-space-8)]",
|
|
10
10
|
};
|
|
11
11
|
export async function HowAuctionsWorkView({} = {}) {
|
|
12
12
|
const page = { container: PAGE_CONTAINER };
|
|
@@ -5,8 +5,8 @@ import { Div, FlowDiagram, Heading, Row, Section, Stack, Text } from "../../../u
|
|
|
5
5
|
import { TextLink } from "../../../ui";
|
|
6
6
|
import { Wallet, Smartphone, Banknote, CalendarClock } from "lucide-react";
|
|
7
7
|
const __P = {
|
|
8
|
-
p5: "p-5",
|
|
9
|
-
p8: "p-8",
|
|
8
|
+
p5: "p-[var(--appkit-space-5)]",
|
|
9
|
+
p8: "p-[var(--appkit-space-8)]",
|
|
10
10
|
};
|
|
11
11
|
export async function HowCheckoutWorksView({} = {}) {
|
|
12
12
|
const page = { container: PAGE_CONTAINER };
|
|
@@ -6,8 +6,8 @@ import { Alert, Caption, Div, FlowDiagram, Heading, Row, Section, Stack, Table,
|
|
|
6
6
|
import { TextLink } from "../../../ui";
|
|
7
7
|
import { CalendarClock, Wallet, TrendingUp, ShieldCheck } from "lucide-react";
|
|
8
8
|
const __P = {
|
|
9
|
-
p5: "p-5",
|
|
10
|
-
p8: "p-8",
|
|
9
|
+
p5: "p-[var(--appkit-space-5)]",
|
|
10
|
+
p8: "p-[var(--appkit-space-8)]",
|
|
11
11
|
};
|
|
12
12
|
const __O = {
|
|
13
13
|
xAuto: "overflow-x-auto",
|
|
@@ -4,9 +4,9 @@ import { PAGE_CONTAINER } from "../../../_internal/shared/styles/page";
|
|
|
4
4
|
import { Div, FlowDiagram, Heading, Li, Row, Section, Span, Stack, Text, Ul } from "../../../ui";
|
|
5
5
|
import { TextLink } from "../../../ui";
|
|
6
6
|
const __P = {
|
|
7
|
-
p5: "p-5",
|
|
8
|
-
p6: "p-6",
|
|
9
|
-
p8: "p-8",
|
|
7
|
+
p5: "p-[var(--appkit-space-5)]",
|
|
8
|
+
p6: "p-[var(--appkit-space-6)]",
|
|
9
|
+
p8: "p-[var(--appkit-space-8)]",
|
|
10
10
|
};
|
|
11
11
|
export async function HowOffersWorkView({} = {}) {
|
|
12
12
|
const page = { container: PAGE_CONTAINER };
|
|
@@ -5,9 +5,9 @@ import { Div, FlowDiagram, Heading, Row, Section, Span, Stack, Text } from "../.
|
|
|
5
5
|
import { TextLink } from "../../../ui";
|
|
6
6
|
import { PackageSearch, MapPinned, FileText, XCircle } from "lucide-react";
|
|
7
7
|
const __P = {
|
|
8
|
-
p4: "p-4",
|
|
9
|
-
p5: "p-5",
|
|
10
|
-
p8: "p-8",
|
|
8
|
+
p4: "p-[var(--appkit-space-4)]",
|
|
9
|
+
p5: "p-[var(--appkit-space-5)]",
|
|
10
|
+
p8: "p-[var(--appkit-space-8)]",
|
|
11
11
|
};
|
|
12
12
|
export async function HowOrdersWorkView({} = {}) {
|
|
13
13
|
const page = { container: PAGE_CONTAINER };
|
|
@@ -5,8 +5,8 @@ import { Div, FlowDiagram, Heading, Row, Section, Stack, Text } from "../../../u
|
|
|
5
5
|
import { TextLink } from "../../../ui";
|
|
6
6
|
import { DollarSign, Calendar, Banknote, ShieldCheck } from "lucide-react";
|
|
7
7
|
const __P = {
|
|
8
|
-
p5: "p-5",
|
|
9
|
-
p8: "p-8",
|
|
8
|
+
p5: "p-[var(--appkit-space-5)]",
|
|
9
|
+
p8: "p-[var(--appkit-space-8)]",
|
|
10
10
|
};
|
|
11
11
|
export async function HowPayoutsWorkView({} = {}) {
|
|
12
12
|
const page = { container: PAGE_CONTAINER };
|
|
@@ -5,8 +5,8 @@ import { Div, FlowDiagram, Heading, Row, Section, Stack, Text } from "../../../u
|
|
|
5
5
|
import { TextLink } from "../../../ui";
|
|
6
6
|
import { Package, Clock, Banknote, AlertCircle } from "lucide-react";
|
|
7
7
|
const __P = {
|
|
8
|
-
p5: "p-5",
|
|
9
|
-
p8: "p-8",
|
|
8
|
+
p5: "p-[var(--appkit-space-5)]",
|
|
9
|
+
p8: "p-[var(--appkit-space-8)]",
|
|
10
10
|
};
|
|
11
11
|
export async function HowPreOrdersWorkView({} = {}) {
|
|
12
12
|
const page = { container: PAGE_CONTAINER };
|
|
@@ -5,8 +5,8 @@ import { Div, FlowDiagram, Heading, Row, Section, Stack, Text } from "../../../u
|
|
|
5
5
|
import { TextLink } from "../../../ui";
|
|
6
6
|
import { ShieldCheck, ThumbsUp, Pencil } from "lucide-react";
|
|
7
7
|
const __P = {
|
|
8
|
-
p5: "p-5",
|
|
9
|
-
p8: "p-8",
|
|
8
|
+
p5: "p-[var(--appkit-space-5)]",
|
|
9
|
+
p8: "p-[var(--appkit-space-8)]",
|
|
10
10
|
};
|
|
11
11
|
export async function HowReviewsWorkView({} = {}) {
|
|
12
12
|
const page = { container: PAGE_CONTAINER };
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
export interface PublicProfileViewProps {
|
|
2
2
|
userId: string;
|
|
3
|
+
/**
|
|
4
|
+
* Feature B — the profile page is deliberately tab-capable (this session
|
|
5
|
+
* only wires "catalogue"; a future tab is a new value here, not a
|
|
6
|
+
* restructure). Falls back to the existing overview content when unset
|
|
7
|
+
* or unrecognized.
|
|
8
|
+
*/
|
|
9
|
+
tab?: string;
|
|
3
10
|
}
|
|
4
|
-
export declare function PublicProfileView({ userId, }: PublicProfileViewProps): Promise<import("react").JSX.Element>;
|
|
11
|
+
export declare function PublicProfileView({ userId, tab, }: PublicProfileViewProps): Promise<import("react").JSX.Element>;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { jsxs as _jsxs,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import Link from "next/link";
|
|
3
3
|
import { getPublicUserProfile, getProfileStoreProducts, getReviewsAuthoredBy, getReviewsReceivedBy } from "../../auth/actions/profile-actions";
|
|
4
4
|
import { storeRepository } from "../../stores/repository/store.repository";
|
|
5
5
|
import { ROUTES } from "../../../constants";
|
|
6
6
|
import { PAGE_CONTAINER } from "../../../_internal/shared/styles/page";
|
|
7
7
|
import { FLEX_CENTER } from "../../../_internal/shared/styles/themed";
|
|
8
|
-
import { Anchor, Div, Grid, Heading, Row, Section, Span, Stack, Text } from "../../../ui";
|
|
8
|
+
import { Anchor, Div, Grid, Heading, Row, Section, Span, Stack, Text, TextLink } from "../../../ui";
|
|
9
9
|
import { MediaImage } from "../../media/MediaImage";
|
|
10
10
|
import { ProductCard } from "../../products/components/ProductGrid";
|
|
11
11
|
import { ReviewCard } from "../../reviews/components/ReviewsList";
|
|
12
|
+
import { PublicCatalogueView } from "../../catalogue/components/PublicCatalogueView";
|
|
12
13
|
import { pluginFor } from "../../../_internal/shared/listing-types/_registry";
|
|
13
14
|
import { normalizeListingType } from "../../products/utils/listing-type";
|
|
14
15
|
import { isAdminUser, isSellerUser } from "../../auth/role-predicates";
|
|
15
16
|
import { User, Star, ShoppingBag, Package, Trophy, Globe, MapPin, ExternalLink } from "lucide-react";
|
|
16
17
|
const __P = {
|
|
17
|
-
p4: "p-4",
|
|
18
|
-
p6: "p-6",
|
|
18
|
+
p4: "p-[var(--appkit-space-4)]",
|
|
19
|
+
p6: "p-[var(--appkit-space-6)]",
|
|
19
20
|
};
|
|
20
21
|
const CLS_EMPTY_ICON = "w-10 h-10 mx-auto mb-3 text-neutral-300 dark:text-[var(--appkit-color-text-muted)] ";
|
|
21
22
|
const __O = {
|
|
@@ -53,7 +54,7 @@ function toProductItem(p) {
|
|
|
53
54
|
function getProductHref(p) {
|
|
54
55
|
return pluginFor(normalizeListingType(p)).detailRoute(p.id);
|
|
55
56
|
}
|
|
56
|
-
export async function PublicProfileView({ userId, }) {
|
|
57
|
+
export async function PublicProfileView({ userId, tab, }) {
|
|
57
58
|
const page = { container: PAGE_CONTAINER };
|
|
58
59
|
const flex = { center: FLEX_CENTER };
|
|
59
60
|
const { getTranslations } = await import("next-intl/server");
|
|
@@ -89,7 +90,8 @@ export async function PublicProfileView({ userId, }) {
|
|
|
89
90
|
const storeDescription = store?.storeDescription ?? pub?.storeDescription;
|
|
90
91
|
const profileHeroCtx = { displayName, photoURL, memberSince, isSeller, storeSlug, flex, page };
|
|
91
92
|
const statItems = buildProfileStatItems(t, { listingCount, reviewCount, itemsSold, auctionsWon, totalOrders, isSeller });
|
|
92
|
-
|
|
93
|
+
const activeTab = tab === "catalogue" ? "catalogue" : "overview";
|
|
94
|
+
return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [renderProfileHero(t, profileHeroCtx), _jsxs(Stack, { gap: "2xl", className: `${page.container.md}`, paddingY: "y-3xl", children: [_jsxs(Row, { gap: "md", padding: "t-xs", border: "bottom", children: [_jsx(TextLink, { href: `/profile/${userId}/overview`, variant: activeTab === "overview" ? "default" : "muted", weight: activeTab === "overview" ? "semibold" : "normal", children: "Overview" }), _jsx(TextLink, { href: `/profile/${userId}/catalogue`, variant: activeTab === "catalogue" ? "default" : "muted", weight: activeTab === "catalogue" ? "semibold" : "normal", children: "Catalogue" })] }), activeTab === "catalogue" ? (_jsx(PublicCatalogueView, { ownerSlug: userId })) : (_jsxs(_Fragment, { children: [renderProfileStatsRow(flex, statItems), renderProfileBioSection(pub), renderStoreDescriptionSection(isSeller, storeSlug ?? null, storeDescription ?? null, storeName, t), renderProfileListingsSection(t, products, storeSlug ?? null), renderAuthoredReviewsSection(t, reviewsAuthored, displayName), reviewsReceivedAsBuyer.length > 0 && renderBuyerReceivedReviewsSection(t, reviewsReceivedAsBuyer)] })), _jsx(Row, { justify: "center", padding: "t-xs", children: _jsxs(Link, { href: String(ROUTES.HOME), className: "text-[length:var(--appkit-text-sm)] text-[var(--appkit-color-text-faint)] hover:text-[var(--appkit-color-text-muted)]", children: ["\u2190 ", t("backHome")] }) })] })] }));
|
|
93
95
|
}
|
|
94
96
|
function buildProfileStatItems(t, ctx) {
|
|
95
97
|
const { listingCount, reviewCount, itemsSold, auctionsWon, totalOrders, isSeller } = ctx;
|
|
@@ -109,7 +111,7 @@ function buildProfileStatItems(t, ctx) {
|
|
|
109
111
|
}
|
|
110
112
|
function renderProfileHero(t, ctx) {
|
|
111
113
|
const { displayName, photoURL, memberSince, isSeller, storeSlug, page } = ctx;
|
|
112
|
-
return (_jsx(Section, { color: "inverse", tone: "accent-banner", paddingY: "y-2-5xl", children: _jsx(Div, { className: `${page.container.md}`, children: _jsxs(Stack, { direction: "sm-row", wrap: true, align: "center", smAlign: "end", gap: "md", children: [_jsx(Row, { align: "center", justify: "center", className: `w-20 h-20 flex-shrink-0 ${__O.hidden}`, surface: "default", rounded: "full", children: photoURL ? _jsx(MediaImage, { src: photoURL, alt: displayName, size: "avatar", fallback: "\uD83D\uDC64" }) : _jsx(User, { className: "w-10 h-10 text-white/60" }) }), _jsxs(Stack, { gap: "xs", className: "text-center sm:text-left", children: [_jsxs(Row, { justify: "start", gap: "xs", wrap: true, children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-0", children: displayName }), isSeller && _jsx(Span, { color: "inverse", size: "xs", weight: "semibold", className: "bg-[white]/20", padding: "pill-sm", rounded: "full", children: t("roleSeller") })] }), _jsx(Text, { color: "inverse", variant: "none", size: "sm", children: memberSince })] }), isSeller && storeSlug && (_jsx(Div, { className: "sm:ml-auto", children: _jsxs(Link, { href: String(ROUTES.PUBLIC.STORE_DETAIL(storeSlug)), className: "inline-flex items-center gap-1
|
|
114
|
+
return (_jsx(Section, { color: "inverse", tone: "accent-banner", paddingY: "y-2-5xl", children: _jsx(Div, { className: `${page.container.md}`, children: _jsxs(Stack, { direction: "sm-row", wrap: true, align: "center", smAlign: "end", gap: "md", children: [_jsx(Row, { align: "center", justify: "center", className: `w-20 h-20 flex-shrink-0 ${__O.hidden}`, surface: "default", rounded: "full", children: photoURL ? _jsx(MediaImage, { src: photoURL, alt: displayName, size: "avatar", fallback: "\uD83D\uDC64" }) : _jsx(User, { className: "w-10 h-10 text-white/60" }) }), _jsxs(Stack, { gap: "xs", className: "text-center sm:text-left", children: [_jsxs(Row, { justify: "start", gap: "xs", wrap: true, children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-0", children: displayName }), isSeller && _jsx(Span, { color: "inverse", size: "xs", weight: "semibold", className: "bg-[white]/20", padding: "pill-sm", rounded: "full", children: t("roleSeller") })] }), _jsx(Text, { color: "inverse", variant: "none", size: "sm", children: memberSince })] }), isSeller && storeSlug && (_jsx(Div, { className: "sm:ml-auto", children: _jsxs(Link, { href: String(ROUTES.PUBLIC.STORE_DETAIL(storeSlug)), className: "inline-flex items-center gap-[var(--appkit-space-1-5)] rounded-full border border-white/30 bg-white/10 hover:bg-white/20 px-[var(--appkit-space-4)] py-[var(--appkit-space-2)] text-[length:var(--appkit-text-sm)] font-medium text-white transition-colors", children: [_jsx(ExternalLink, { className: "w-3.5 h-3.5" }), t("visitStore")] }) }))] }) }) }));
|
|
113
115
|
}
|
|
114
116
|
function renderProfileStatsRow(flex, statItems) {
|
|
115
117
|
return (_jsx(Grid, { gap: "md", className: "grid-cols-2 sm:grid-cols-4", children: statItems.map(({ icon: Icon, label, value }) => (_jsxs(Div, { rounded: "xl", className: `${__P.p4} text-center`, border: "default", surface: "muted", children: [_jsx(Row, { centered: true, className: `${flex.center} mb-1`, children: _jsx(Icon, { className: "w-4 h-4 text-neutral-400" }) }), _jsx(Text, { size: "lg", weight: "bold", children: value }), _jsx(Text, { variant: "secondary", size: "xs", children: label })] }, label))) }));
|
|
@@ -122,10 +124,10 @@ function renderProfileBioSection(pub) {
|
|
|
122
124
|
function renderStoreDescriptionSection(isSeller, storeSlug, storeDescription, storeName, t) {
|
|
123
125
|
if (!isSeller || !storeSlug || !storeDescription)
|
|
124
126
|
return null;
|
|
125
|
-
return (_jsx(Section, { children: _jsxs(Div, { rounded: "2xl", className: `${__P.p6}`, border: "default", surface: "subtle", children: [_jsx(Heading, { level: 3, className: "mb-2", children: storeName }), _jsx(Text, { variant: "secondary", className: "leading-relaxed", size: "sm", children: storeDescription }), _jsxs(Link, { href: String(ROUTES.PUBLIC.STORE_DETAIL(storeSlug)), className: "mt-3 inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline", children: [t("visitStore"), " \u2192"] })] }) }));
|
|
127
|
+
return (_jsx(Section, { children: _jsxs(Div, { rounded: "2xl", className: `${__P.p6}`, border: "default", surface: "subtle", children: [_jsx(Heading, { level: 3, className: "mb-2", children: storeName }), _jsx(Text, { variant: "secondary", className: "leading-relaxed", size: "sm", children: storeDescription }), _jsxs(Link, { href: String(ROUTES.PUBLIC.STORE_DETAIL(storeSlug)), className: "mt-3 inline-flex items-center gap-[var(--appkit-space-1)] text-[length:var(--appkit-text-sm)] font-medium text-primary hover:underline", children: [t("visitStore"), " \u2192"] })] }) }));
|
|
126
128
|
}
|
|
127
129
|
function renderProfileListingsSection(t, products, storeSlug) {
|
|
128
|
-
return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-4", children: t("listingsTitle") }), products.length === 0 ? (_jsxs(Div, { rounded: "2xl", padding: "3xl", className: "text-center", border: "default", surface: "subtle", children: [_jsx(ShoppingBag, { className: CLS_EMPTY_ICON }), _jsx(Text, { variant: "secondary", size: "sm", children: t("noListings") })] })) : (_jsx(Grid, { gap: "md", className: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4", children: products.slice(0, 8).map((p) => _jsx(ProductCard, { product: toProductItem(p), href: getProductHref(p) }, p.id)) })), products.length > 8 && storeSlug && (_jsx(Div, { className: "mt-4 text-center", children: _jsx(Link, { href: String(ROUTES.PUBLIC.STORE_PRODUCTS(storeSlug)), className: "text-sm font-medium text-primary hover:underline", children: t("viewAllListings", { count: products.length }) }) }))] }));
|
|
130
|
+
return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-4", children: t("listingsTitle") }), products.length === 0 ? (_jsxs(Div, { rounded: "2xl", padding: "3xl", className: "text-center", border: "default", surface: "subtle", children: [_jsx(ShoppingBag, { className: CLS_EMPTY_ICON }), _jsx(Text, { variant: "secondary", size: "sm", children: t("noListings") })] })) : (_jsx(Grid, { gap: "md", className: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4", children: products.slice(0, 8).map((p) => _jsx(ProductCard, { product: toProductItem(p), href: getProductHref(p) }, p.id)) })), products.length > 8 && storeSlug && (_jsx(Div, { className: "mt-4 text-center", children: _jsx(Link, { href: String(ROUTES.PUBLIC.STORE_PRODUCTS(storeSlug)), className: "text-[length:var(--appkit-text-sm)] font-medium text-primary hover:underline", children: t("viewAllListings", { count: products.length }) }) }))] }));
|
|
129
131
|
}
|
|
130
132
|
function renderAuthoredReviewsSection(t, reviews, displayName) {
|
|
131
133
|
return (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-4", children: t("reviewsAuthoredTitle", { name: displayName }) }), reviews.length === 0 ? (_jsxs(Div, { rounded: "2xl", padding: "3xl", className: "text-center", border: "default", surface: "subtle", children: [_jsx(Star, { className: CLS_EMPTY_ICON }), _jsx(Text, { variant: "secondary", size: "sm", children: t("noReviewsAuthored", { name: displayName }) })] })) : (_jsx(Grid, { gap: "md", className: "grid-cols-1 sm:grid-cols-2", children: reviews.slice(0, 6).map((review) => _jsx(ReviewCard, { review: review }, review.id)) }))] }));
|
|
@@ -5,8 +5,8 @@ import { Div, FlowDiagram, Heading, Row, Section, Stack, Text } from "../../../u
|
|
|
5
5
|
import { TextLink } from "../../../ui";
|
|
6
6
|
import { Shield, Lock, Search, Globe, Database, KeyRound, FileText, Upload, ShieldCheck, Scale, } from "lucide-react";
|
|
7
7
|
const __P = {
|
|
8
|
-
p5: "p-5",
|
|
9
|
-
p8: "p-8",
|
|
8
|
+
p5: "p-[var(--appkit-space-5)]",
|
|
9
|
+
p8: "p-[var(--appkit-space-8)]",
|
|
10
10
|
};
|
|
11
11
|
export async function SecurityPrivacyView({} = {}) {
|
|
12
12
|
const page = { container: PAGE_CONTAINER };
|
|
@@ -23,6 +23,6 @@ export async function UnauthorizedView({} = {}) {
|
|
|
23
23
|
},
|
|
24
24
|
];
|
|
25
25
|
return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { padding: "y-5xl", color: "inverse", layout: "flex-col", align: "center", justify: "center", tone: "accent-banner", className: "min-h-[60vh] text-center", children: _jsxs(Div, { className: `${page.container.sm}`, children: [_jsx(Row, { align: "center", justify: "center", className: `w-20 h-20 mx-auto mb-6`, surface: "default", rounded: "2xl", children: _jsx(ShieldAlert, { className: "w-10 h-10 text-white" }) }), _jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-4", size: "4xl", children: t("title") }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-lg mx-auto mb-8", size: "lg", children: t("subtitle") }), _jsx(Row, { align: "center", justify: "center", gap: "md", wrap: true, children: LINKS.map(({ icon: Icon, label, href, isPrimary }) => (_jsx(TextLink, { href: href, className: isPrimary
|
|
26
|
-
? "bg-white text-rose-700 font-semibold px-6 py-2
|
|
27
|
-
: "border border-white/40 text-white px-6 py-2
|
|
26
|
+
? "bg-white text-rose-700 font-semibold px-[var(--appkit-space-6)] py-[var(--appkit-space-2-5)] rounded-xl hover:bg-white/90 transition-colors"
|
|
27
|
+
: "border border-white/40 text-white px-[var(--appkit-space-6)] py-[var(--appkit-space-2-5)] rounded-xl hover:bg-white/10 transition-colors", children: _jsxs(Span, { layout: "inline-flex", gap: "md", children: [_jsx(Icon, { className: "w-4 h-4" }), label] }) }, href))) })] }) }), _jsx(Div, { className: `${page.container.sm}`, padding: "y-2xl", children: _jsxs(Section, { className: `text-center`, border: "default", surface: "subtle", rounded: "2xl", padding: "lg", children: [_jsx(Heading, { level: 2, className: "mb-2", size: "base", children: t("helpTitle") }), _jsx(Text, { variant: "secondary", className: "mb-3", size: "sm", children: t("helpText") }), _jsxs(Row, { justify: "center", gap: "lg", wrap: true, children: [_jsx(TextLink, { href: String(ROUTES.PUBLIC.HELP), variant: "muted", size: "sm", children: t("helpCenter") }), _jsx(TextLink, { href: String(ROUTES.PUBLIC.CONTACT), variant: "muted", size: "sm", children: t("contact") })] })] }) })] }));
|
|
28
28
|
}
|