@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
|
@@ -6,6 +6,23 @@ export declare const orderShippingMethodSchema: z.ZodEnum<["custom"]>;
|
|
|
6
6
|
export declare const orderRefundStatusSchema: z.ZodEnum<["pending", "processing", "completed", "rejected"]>;
|
|
7
7
|
export declare const orderPayoutStatusSchema: z.ZodEnum<["eligible", "requested", "paid"]>;
|
|
8
8
|
export declare const orderRefundTypeSchema: z.ZodEnum<["full", "partial"]>;
|
|
9
|
+
export declare const outOfStockPolicySchema: z.ZodEnum<["cancel_order", "skip_items"]>;
|
|
10
|
+
export declare const orderDroppedItemSchema: z.ZodObject<{
|
|
11
|
+
productId: z.ZodString;
|
|
12
|
+
productTitle: z.ZodString;
|
|
13
|
+
requestedQty: z.ZodNumber;
|
|
14
|
+
availableQty: z.ZodNumber;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
productId: string;
|
|
17
|
+
productTitle: string;
|
|
18
|
+
requestedQty: number;
|
|
19
|
+
availableQty: number;
|
|
20
|
+
}, {
|
|
21
|
+
productId: string;
|
|
22
|
+
productTitle: string;
|
|
23
|
+
requestedQty: number;
|
|
24
|
+
availableQty: number;
|
|
25
|
+
}>;
|
|
9
26
|
export declare const emiInstallmentStatusSchema: z.ZodEnum<["pending", "paid", "overdue"]>;
|
|
10
27
|
export declare const emiInstallmentSchema: z.ZodObject<{
|
|
11
28
|
index: z.ZodNumber;
|
|
@@ -35,7 +52,7 @@ export declare const emiInstallmentSchema: z.ZodObject<{
|
|
|
35
52
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
36
53
|
}, z.ZodTypeAny, "passthrough">>]>>;
|
|
37
54
|
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
status: "
|
|
55
|
+
status: "paid" | "pending" | "overdue";
|
|
39
56
|
amount: number;
|
|
40
57
|
index: number;
|
|
41
58
|
dueDate: string | Date | z.objectOutputType<{
|
|
@@ -50,7 +67,7 @@ export declare const emiInstallmentSchema: z.ZodObject<{
|
|
|
50
67
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
51
68
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
52
69
|
}, {
|
|
53
|
-
status: "
|
|
70
|
+
status: "paid" | "pending" | "overdue";
|
|
54
71
|
amount: number;
|
|
55
72
|
index: number;
|
|
56
73
|
dueDate: string | Date | z.objectInputType<{
|
|
@@ -82,7 +99,7 @@ export declare const orderDocumentItemSchema: z.ZodObject<{
|
|
|
82
99
|
unitPrice: number;
|
|
83
100
|
totalPrice: number;
|
|
84
101
|
listingType?: "standard" | "auction" | "pre-order" | "prize-draw" | "classified" | "digital-code" | "live" | undefined;
|
|
85
|
-
prizeRevealStatus?: "
|
|
102
|
+
prizeRevealStatus?: "closed" | "open" | "pending" | "revealed" | undefined;
|
|
86
103
|
prizeRevealDeadline?: string | undefined;
|
|
87
104
|
revealedItemNumber?: number | undefined;
|
|
88
105
|
}, {
|
|
@@ -92,7 +109,7 @@ export declare const orderDocumentItemSchema: z.ZodObject<{
|
|
|
92
109
|
unitPrice: number;
|
|
93
110
|
totalPrice: number;
|
|
94
111
|
listingType?: "standard" | "auction" | "pre-order" | "prize-draw" | "classified" | "digital-code" | "live" | undefined;
|
|
95
|
-
prizeRevealStatus?: "
|
|
112
|
+
prizeRevealStatus?: "closed" | "open" | "pending" | "revealed" | undefined;
|
|
96
113
|
prizeRevealDeadline?: string | undefined;
|
|
97
114
|
revealedItemNumber?: number | undefined;
|
|
98
115
|
}>;
|
|
@@ -157,15 +174,15 @@ export declare const appliedOrderDiscountSchema: z.ZodObject<{
|
|
|
157
174
|
code: string;
|
|
158
175
|
type: "auto" | "coupon" | "deal";
|
|
159
176
|
discountAmount: number;
|
|
160
|
-
storeId?: string | undefined;
|
|
161
177
|
scope?: "seller" | "admin" | undefined;
|
|
178
|
+
storeId?: string | undefined;
|
|
162
179
|
couponId?: string | undefined;
|
|
163
180
|
}, {
|
|
164
181
|
code: string;
|
|
165
182
|
type: "auto" | "coupon" | "deal";
|
|
166
183
|
discountAmount: number;
|
|
167
|
-
storeId?: string | undefined;
|
|
168
184
|
scope?: "seller" | "admin" | undefined;
|
|
185
|
+
storeId?: string | undefined;
|
|
169
186
|
couponId?: string | undefined;
|
|
170
187
|
}>;
|
|
171
188
|
export declare const prizeWonSchema: z.ZodObject<{
|
|
@@ -247,7 +264,7 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
247
264
|
unitPrice: number;
|
|
248
265
|
totalPrice: number;
|
|
249
266
|
listingType?: "standard" | "auction" | "pre-order" | "prize-draw" | "classified" | "digital-code" | "live" | undefined;
|
|
250
|
-
prizeRevealStatus?: "
|
|
267
|
+
prizeRevealStatus?: "closed" | "open" | "pending" | "revealed" | undefined;
|
|
251
268
|
prizeRevealDeadline?: string | undefined;
|
|
252
269
|
revealedItemNumber?: number | undefined;
|
|
253
270
|
}, {
|
|
@@ -257,7 +274,7 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
257
274
|
unitPrice: number;
|
|
258
275
|
totalPrice: number;
|
|
259
276
|
listingType?: "standard" | "auction" | "pre-order" | "prize-draw" | "classified" | "digital-code" | "live" | undefined;
|
|
260
|
-
prizeRevealStatus?: "
|
|
277
|
+
prizeRevealStatus?: "closed" | "open" | "pending" | "revealed" | undefined;
|
|
261
278
|
prizeRevealDeadline?: string | undefined;
|
|
262
279
|
revealedItemNumber?: number | undefined;
|
|
263
280
|
}>, "many">>;
|
|
@@ -321,15 +338,15 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
321
338
|
code: string;
|
|
322
339
|
type: "auto" | "coupon" | "deal";
|
|
323
340
|
discountAmount: number;
|
|
324
|
-
storeId?: string | undefined;
|
|
325
341
|
scope?: "seller" | "admin" | undefined;
|
|
342
|
+
storeId?: string | undefined;
|
|
326
343
|
couponId?: string | undefined;
|
|
327
344
|
}, {
|
|
328
345
|
code: string;
|
|
329
346
|
type: "auto" | "coupon" | "deal";
|
|
330
347
|
discountAmount: number;
|
|
331
|
-
storeId?: string | undefined;
|
|
332
348
|
scope?: "seller" | "admin" | undefined;
|
|
349
|
+
storeId?: string | undefined;
|
|
333
350
|
couponId?: string | undefined;
|
|
334
351
|
}>, "many">>;
|
|
335
352
|
platformFee: z.ZodOptional<z.ZodNumber>;
|
|
@@ -368,7 +385,7 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
368
385
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
369
386
|
}, z.ZodTypeAny, "passthrough">>]>>;
|
|
370
387
|
}, "strip", z.ZodTypeAny, {
|
|
371
|
-
status: "
|
|
388
|
+
status: "paid" | "pending" | "overdue";
|
|
372
389
|
amount: number;
|
|
373
390
|
index: number;
|
|
374
391
|
dueDate: string | Date | z.objectOutputType<{
|
|
@@ -383,7 +400,7 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
383
400
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
384
401
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
385
402
|
}, {
|
|
386
|
-
status: "
|
|
403
|
+
status: "paid" | "pending" | "overdue";
|
|
387
404
|
amount: number;
|
|
388
405
|
index: number;
|
|
389
406
|
dueDate: string | Date | z.objectInputType<{
|
|
@@ -520,13 +537,31 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
520
537
|
shelf: string;
|
|
521
538
|
bin: string;
|
|
522
539
|
}>>;
|
|
540
|
+
outOfStockPolicy: z.ZodOptional<z.ZodEnum<["cancel_order", "skip_items"]>>;
|
|
541
|
+
droppedItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
542
|
+
productId: z.ZodString;
|
|
543
|
+
productTitle: z.ZodString;
|
|
544
|
+
requestedQty: z.ZodNumber;
|
|
545
|
+
availableQty: z.ZodNumber;
|
|
546
|
+
}, "strip", z.ZodTypeAny, {
|
|
547
|
+
productId: string;
|
|
548
|
+
productTitle: string;
|
|
549
|
+
requestedQty: number;
|
|
550
|
+
availableQty: number;
|
|
551
|
+
}, {
|
|
552
|
+
productId: string;
|
|
553
|
+
productTitle: string;
|
|
554
|
+
requestedQty: number;
|
|
555
|
+
availableQty: number;
|
|
556
|
+
}>, "many">>;
|
|
557
|
+
refundPending: z.ZodOptional<z.ZodBoolean>;
|
|
523
558
|
}, "strip", z.ZodTypeAny, {
|
|
524
559
|
currency: string;
|
|
525
|
-
status: "
|
|
560
|
+
status: "pending" | "cancelled" | "processing" | "refunded" | "confirmed" | "shipped" | "delivered" | "return_requested" | "returned";
|
|
561
|
+
id: string;
|
|
526
562
|
createdAt: string | Date | z.objectOutputType<{
|
|
527
563
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
528
564
|
}, z.ZodTypeAny, "passthrough">;
|
|
529
|
-
id: string;
|
|
530
565
|
updatedAt: string | Date | z.objectOutputType<{
|
|
531
566
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
532
567
|
}, z.ZodTypeAny, "passthrough">;
|
|
@@ -535,7 +570,7 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
535
570
|
quantity: number;
|
|
536
571
|
productTitle: string;
|
|
537
572
|
userEmail: string;
|
|
538
|
-
paymentStatus: "
|
|
573
|
+
paymentStatus: "paid" | "failed" | "pending" | "processing" | "refunded" | "partial_refund";
|
|
539
574
|
orderDate: string | Date | z.objectOutputType<{
|
|
540
575
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
541
576
|
}, z.ZodTypeAny, "passthrough">;
|
|
@@ -543,15 +578,15 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
543
578
|
unitPrice: number;
|
|
544
579
|
totalPrice: number;
|
|
545
580
|
storeId?: string | undefined;
|
|
581
|
+
platformFee?: number | undefined;
|
|
582
|
+
paymentMethod?: string | undefined;
|
|
583
|
+
notes?: string | undefined;
|
|
546
584
|
storeName?: string | undefined;
|
|
547
585
|
physicalLocation?: {
|
|
548
586
|
zone: string;
|
|
549
587
|
shelf: string;
|
|
550
588
|
bin: string;
|
|
551
589
|
} | undefined;
|
|
552
|
-
platformFee?: number | undefined;
|
|
553
|
-
paymentMethod?: string | undefined;
|
|
554
|
-
notes?: string | undefined;
|
|
555
590
|
items?: {
|
|
556
591
|
productId: string;
|
|
557
592
|
quantity: number;
|
|
@@ -559,7 +594,7 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
559
594
|
unitPrice: number;
|
|
560
595
|
totalPrice: number;
|
|
561
596
|
listingType?: "standard" | "auction" | "pre-order" | "prize-draw" | "classified" | "digital-code" | "live" | undefined;
|
|
562
|
-
prizeRevealStatus?: "
|
|
597
|
+
prizeRevealStatus?: "closed" | "open" | "pending" | "revealed" | undefined;
|
|
563
598
|
prizeRevealDeadline?: string | undefined;
|
|
564
599
|
revealedItemNumber?: number | undefined;
|
|
565
600
|
}[] | undefined;
|
|
@@ -591,8 +626,8 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
591
626
|
code: string;
|
|
592
627
|
type: "auto" | "coupon" | "deal";
|
|
593
628
|
discountAmount: number;
|
|
594
|
-
storeId?: string | undefined;
|
|
595
629
|
scope?: "seller" | "admin" | undefined;
|
|
630
|
+
storeId?: string | undefined;
|
|
596
631
|
couponId?: string | undefined;
|
|
597
632
|
}[] | undefined;
|
|
598
633
|
depositAmount?: number | undefined;
|
|
@@ -603,7 +638,7 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
603
638
|
emiTokenAmount?: number | undefined;
|
|
604
639
|
emiSurchargeAmount?: number | undefined;
|
|
605
640
|
emiInstallments?: {
|
|
606
|
-
status: "
|
|
641
|
+
status: "paid" | "pending" | "overdue";
|
|
607
642
|
amount: number;
|
|
608
643
|
index: number;
|
|
609
644
|
dueDate: string | Date | z.objectOutputType<{
|
|
@@ -665,13 +700,21 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
665
700
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
666
701
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
667
702
|
shippingProofUploadedBy?: string | undefined;
|
|
703
|
+
outOfStockPolicy?: "cancel_order" | "skip_items" | undefined;
|
|
704
|
+
droppedItems?: {
|
|
705
|
+
productId: string;
|
|
706
|
+
productTitle: string;
|
|
707
|
+
requestedQty: number;
|
|
708
|
+
availableQty: number;
|
|
709
|
+
}[] | undefined;
|
|
710
|
+
refundPending?: boolean | undefined;
|
|
668
711
|
}, {
|
|
669
712
|
currency: string;
|
|
670
|
-
status: "
|
|
713
|
+
status: "pending" | "cancelled" | "processing" | "refunded" | "confirmed" | "shipped" | "delivered" | "return_requested" | "returned";
|
|
714
|
+
id: string;
|
|
671
715
|
createdAt: string | Date | z.objectInputType<{
|
|
672
716
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
673
717
|
}, z.ZodTypeAny, "passthrough">;
|
|
674
|
-
id: string;
|
|
675
718
|
updatedAt: string | Date | z.objectInputType<{
|
|
676
719
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
677
720
|
}, z.ZodTypeAny, "passthrough">;
|
|
@@ -680,7 +723,7 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
680
723
|
quantity: number;
|
|
681
724
|
productTitle: string;
|
|
682
725
|
userEmail: string;
|
|
683
|
-
paymentStatus: "
|
|
726
|
+
paymentStatus: "paid" | "failed" | "pending" | "processing" | "refunded" | "partial_refund";
|
|
684
727
|
orderDate: string | Date | z.objectInputType<{
|
|
685
728
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
686
729
|
}, z.ZodTypeAny, "passthrough">;
|
|
@@ -688,15 +731,15 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
688
731
|
unitPrice: number;
|
|
689
732
|
totalPrice: number;
|
|
690
733
|
storeId?: string | undefined;
|
|
734
|
+
platformFee?: number | undefined;
|
|
735
|
+
paymentMethod?: string | undefined;
|
|
736
|
+
notes?: string | undefined;
|
|
691
737
|
storeName?: string | undefined;
|
|
692
738
|
physicalLocation?: {
|
|
693
739
|
zone: string;
|
|
694
740
|
shelf: string;
|
|
695
741
|
bin: string;
|
|
696
742
|
} | undefined;
|
|
697
|
-
platformFee?: number | undefined;
|
|
698
|
-
paymentMethod?: string | undefined;
|
|
699
|
-
notes?: string | undefined;
|
|
700
743
|
items?: {
|
|
701
744
|
productId: string;
|
|
702
745
|
quantity: number;
|
|
@@ -704,7 +747,7 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
704
747
|
unitPrice: number;
|
|
705
748
|
totalPrice: number;
|
|
706
749
|
listingType?: "standard" | "auction" | "pre-order" | "prize-draw" | "classified" | "digital-code" | "live" | undefined;
|
|
707
|
-
prizeRevealStatus?: "
|
|
750
|
+
prizeRevealStatus?: "closed" | "open" | "pending" | "revealed" | undefined;
|
|
708
751
|
prizeRevealDeadline?: string | undefined;
|
|
709
752
|
revealedItemNumber?: number | undefined;
|
|
710
753
|
}[] | undefined;
|
|
@@ -736,8 +779,8 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
736
779
|
code: string;
|
|
737
780
|
type: "auto" | "coupon" | "deal";
|
|
738
781
|
discountAmount: number;
|
|
739
|
-
storeId?: string | undefined;
|
|
740
782
|
scope?: "seller" | "admin" | undefined;
|
|
783
|
+
storeId?: string | undefined;
|
|
741
784
|
couponId?: string | undefined;
|
|
742
785
|
}[] | undefined;
|
|
743
786
|
depositAmount?: number | undefined;
|
|
@@ -748,7 +791,7 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
748
791
|
emiTokenAmount?: number | undefined;
|
|
749
792
|
emiSurchargeAmount?: number | undefined;
|
|
750
793
|
emiInstallments?: {
|
|
751
|
-
status: "
|
|
794
|
+
status: "paid" | "pending" | "overdue";
|
|
752
795
|
amount: number;
|
|
753
796
|
index: number;
|
|
754
797
|
dueDate: string | Date | z.objectInputType<{
|
|
@@ -810,6 +853,14 @@ export declare const orderFirestoreSchema: z.ZodObject<{
|
|
|
810
853
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
811
854
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
812
855
|
shippingProofUploadedBy?: string | undefined;
|
|
856
|
+
outOfStockPolicy?: "cancel_order" | "skip_items" | undefined;
|
|
857
|
+
droppedItems?: {
|
|
858
|
+
productId: string;
|
|
859
|
+
productTitle: string;
|
|
860
|
+
requestedQty: number;
|
|
861
|
+
availableQty: number;
|
|
862
|
+
}[] | undefined;
|
|
863
|
+
refundPending?: boolean | undefined;
|
|
813
864
|
}>;
|
|
814
865
|
export type OrderFromSchema = z.infer<typeof orderFirestoreSchema>;
|
|
815
866
|
export declare const orderStatusSchema: z.ZodEnum<["pending", "confirmed", "processing", "shipped", "delivered", "cancelled", "refunded", "return_requested", "returned"]>;
|
|
@@ -847,12 +898,12 @@ export declare const orderTimelineSchema: z.ZodObject<{
|
|
|
847
898
|
timestamp: z.ZodString;
|
|
848
899
|
actor: z.ZodOptional<z.ZodString>;
|
|
849
900
|
}, "strip", z.ZodTypeAny, {
|
|
850
|
-
status: "
|
|
901
|
+
status: "pending" | "cancelled" | "processing" | "refunded" | "confirmed" | "shipped" | "delivered" | "return_requested" | "returned";
|
|
851
902
|
timestamp: string;
|
|
852
903
|
message?: string | undefined;
|
|
853
904
|
actor?: string | undefined;
|
|
854
905
|
}, {
|
|
855
|
-
status: "
|
|
906
|
+
status: "pending" | "cancelled" | "processing" | "refunded" | "confirmed" | "shipped" | "delivered" | "return_requested" | "returned";
|
|
856
907
|
timestamp: string;
|
|
857
908
|
message?: string | undefined;
|
|
858
909
|
actor?: string | undefined;
|
|
@@ -921,12 +972,12 @@ export declare const orderSchema: z.ZodObject<{
|
|
|
921
972
|
timestamp: z.ZodString;
|
|
922
973
|
actor: z.ZodOptional<z.ZodString>;
|
|
923
974
|
}, "strip", z.ZodTypeAny, {
|
|
924
|
-
status: "
|
|
975
|
+
status: "pending" | "cancelled" | "processing" | "refunded" | "confirmed" | "shipped" | "delivered" | "return_requested" | "returned";
|
|
925
976
|
timestamp: string;
|
|
926
977
|
message?: string | undefined;
|
|
927
978
|
actor?: string | undefined;
|
|
928
979
|
}, {
|
|
929
|
-
status: "
|
|
980
|
+
status: "pending" | "cancelled" | "processing" | "refunded" | "confirmed" | "shipped" | "delivered" | "return_requested" | "returned";
|
|
930
981
|
timestamp: string;
|
|
931
982
|
message?: string | undefined;
|
|
932
983
|
actor?: string | undefined;
|
|
@@ -953,7 +1004,7 @@ export declare const orderSchema: z.ZodObject<{
|
|
|
953
1004
|
total: number;
|
|
954
1005
|
paymentStatus: string;
|
|
955
1006
|
subtotal: number;
|
|
956
|
-
orderStatus: "
|
|
1007
|
+
orderStatus: "pending" | "cancelled" | "processing" | "refunded" | "confirmed" | "shipped" | "delivered" | "return_requested" | "returned";
|
|
957
1008
|
createdAt?: string | undefined;
|
|
958
1009
|
updatedAt?: string | undefined;
|
|
959
1010
|
notes?: string | undefined;
|
|
@@ -965,7 +1016,7 @@ export declare const orderSchema: z.ZodObject<{
|
|
|
965
1016
|
paymentGateway?: string | undefined;
|
|
966
1017
|
shippingCost?: number | undefined;
|
|
967
1018
|
timeline?: {
|
|
968
|
-
status: "
|
|
1019
|
+
status: "pending" | "cancelled" | "processing" | "refunded" | "confirmed" | "shipped" | "delivered" | "return_requested" | "returned";
|
|
969
1020
|
timestamp: string;
|
|
970
1021
|
message?: string | undefined;
|
|
971
1022
|
actor?: string | undefined;
|
|
@@ -990,7 +1041,7 @@ export declare const orderSchema: z.ZodObject<{
|
|
|
990
1041
|
total: number;
|
|
991
1042
|
paymentStatus: string;
|
|
992
1043
|
subtotal: number;
|
|
993
|
-
orderStatus: "
|
|
1044
|
+
orderStatus: "pending" | "cancelled" | "processing" | "refunded" | "confirmed" | "shipped" | "delivered" | "return_requested" | "returned";
|
|
994
1045
|
createdAt?: string | undefined;
|
|
995
1046
|
updatedAt?: string | undefined;
|
|
996
1047
|
notes?: string | undefined;
|
|
@@ -1002,7 +1053,7 @@ export declare const orderSchema: z.ZodObject<{
|
|
|
1002
1053
|
paymentGateway?: string | undefined;
|
|
1003
1054
|
shippingCost?: number | undefined;
|
|
1004
1055
|
timeline?: {
|
|
1005
|
-
status: "
|
|
1056
|
+
status: "pending" | "cancelled" | "processing" | "refunded" | "confirmed" | "shipped" | "delivered" | "return_requested" | "returned";
|
|
1006
1057
|
timestamp: string;
|
|
1007
1058
|
message?: string | undefined;
|
|
1008
1059
|
actor?: string | undefined;
|
|
@@ -1022,12 +1073,12 @@ export declare const orderListParamsSchema: z.ZodObject<{
|
|
|
1022
1073
|
perPage?: number | undefined;
|
|
1023
1074
|
userId?: string | undefined;
|
|
1024
1075
|
paymentStatus?: string | undefined;
|
|
1025
|
-
orderStatus?: "
|
|
1076
|
+
orderStatus?: "pending" | "cancelled" | "processing" | "refunded" | "confirmed" | "shipped" | "delivered" | "return_requested" | "returned" | undefined;
|
|
1026
1077
|
}, {
|
|
1027
1078
|
sort?: string | undefined;
|
|
1028
1079
|
page?: number | undefined;
|
|
1029
1080
|
perPage?: number | undefined;
|
|
1030
1081
|
userId?: string | undefined;
|
|
1031
1082
|
paymentStatus?: string | undefined;
|
|
1032
|
-
orderStatus?: "
|
|
1083
|
+
orderStatus?: "pending" | "cancelled" | "processing" | "refunded" | "confirmed" | "shipped" | "delivered" | "return_requested" | "returned" | undefined;
|
|
1033
1084
|
}>;
|
|
@@ -25,6 +25,13 @@ export const orderShippingMethodSchema = z.enum(["custom"]);
|
|
|
25
25
|
export const orderRefundStatusSchema = z.enum(["pending", "processing", "completed", "rejected"]);
|
|
26
26
|
export const orderPayoutStatusSchema = z.enum(["eligible", "requested", "paid"]);
|
|
27
27
|
export const orderRefundTypeSchema = z.enum(["full", "partial"]);
|
|
28
|
+
export const outOfStockPolicySchema = z.enum(["cancel_order", "skip_items"]);
|
|
29
|
+
export const orderDroppedItemSchema = z.object({
|
|
30
|
+
productId: z.string(),
|
|
31
|
+
productTitle: z.string(),
|
|
32
|
+
requestedQty: z.number().int().positive(),
|
|
33
|
+
availableQty: z.number().int().nonnegative(),
|
|
34
|
+
});
|
|
28
35
|
export const emiInstallmentStatusSchema = z.enum(["pending", "paid", "overdue"]);
|
|
29
36
|
export const emiInstallmentSchema = z.object({
|
|
30
37
|
index: z.number().int().positive(),
|
|
@@ -159,6 +166,9 @@ export const orderFirestoreSchema = z.object({
|
|
|
159
166
|
shippingProofUploadedAt: firestoreDateSchema.optional(),
|
|
160
167
|
shippingProofUploadedBy: z.string().optional(),
|
|
161
168
|
physicalLocation: physicalLocationSchema.optional(),
|
|
169
|
+
outOfStockPolicy: outOfStockPolicySchema.optional(),
|
|
170
|
+
droppedItems: z.array(orderDroppedItemSchema).optional(),
|
|
171
|
+
refundPending: z.boolean().optional(),
|
|
162
172
|
...auditTimestampsShape,
|
|
163
173
|
});
|
|
164
174
|
// --- Sub-schemas --------------------------------------------------------------
|
|
@@ -78,6 +78,21 @@ export interface Order {
|
|
|
78
78
|
};
|
|
79
79
|
createdAt?: string;
|
|
80
80
|
updatedAt?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Reveal-mode prize-draw fields (SB4-H/SB8-C). Set once the reveal
|
|
83
|
+
* endpoint has assigned a prize to this order; used to drive the
|
|
84
|
+
* "Reveal my prize" CTA on the order-detail page.
|
|
85
|
+
*/
|
|
86
|
+
prizeWon?: {
|
|
87
|
+
itemNumber: number;
|
|
88
|
+
title: string;
|
|
89
|
+
images: string[];
|
|
90
|
+
wonAt: string;
|
|
91
|
+
};
|
|
92
|
+
prizeRevealDeadline?: string;
|
|
93
|
+
prizeRevealExpired?: boolean;
|
|
94
|
+
/** Source prize-draw product id, when this order came from one. */
|
|
95
|
+
prizeDrawProductId?: string;
|
|
81
96
|
}
|
|
82
97
|
export interface OrderListResponse {
|
|
83
98
|
items: Order[];
|
|
@@ -151,21 +151,21 @@ export declare const payoutFirestoreSchema: z.ZodObject<{
|
|
|
151
151
|
}, z.ZodTypeAny, "passthrough">>]>>;
|
|
152
152
|
}, "strip", z.ZodTypeAny, {
|
|
153
153
|
currency: string;
|
|
154
|
-
status: "
|
|
155
|
-
|
|
154
|
+
status: "paid" | "failed" | "pending" | "processing";
|
|
155
|
+
id: string;
|
|
156
156
|
createdAt: string | Date | z.objectOutputType<{
|
|
157
157
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
158
158
|
}, z.ZodTypeAny, "passthrough">;
|
|
159
|
-
id: string;
|
|
160
159
|
updatedAt: string | Date | z.objectOutputType<{
|
|
161
160
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
162
161
|
}, z.ZodTypeAny, "passthrough">;
|
|
163
|
-
|
|
164
|
-
amount: number;
|
|
162
|
+
storeId: string;
|
|
165
163
|
requestedAt: string | Date | z.objectOutputType<{
|
|
166
164
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
167
165
|
}, z.ZodTypeAny, "passthrough">;
|
|
166
|
+
sellerName: string;
|
|
168
167
|
sellerEmail: string;
|
|
168
|
+
amount: number;
|
|
169
169
|
grossAmount: number;
|
|
170
170
|
platformFee: number;
|
|
171
171
|
platformFeeRate: number;
|
|
@@ -201,21 +201,21 @@ export declare const payoutFirestoreSchema: z.ZodObject<{
|
|
|
201
201
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
202
202
|
}, {
|
|
203
203
|
currency: string;
|
|
204
|
-
status: "
|
|
205
|
-
|
|
204
|
+
status: "paid" | "failed" | "pending" | "processing";
|
|
205
|
+
id: string;
|
|
206
206
|
createdAt: string | Date | z.objectInputType<{
|
|
207
207
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
208
208
|
}, z.ZodTypeAny, "passthrough">;
|
|
209
|
-
id: string;
|
|
210
209
|
updatedAt: string | Date | z.objectInputType<{
|
|
211
210
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
212
211
|
}, z.ZodTypeAny, "passthrough">;
|
|
213
|
-
|
|
214
|
-
amount: number;
|
|
212
|
+
storeId: string;
|
|
215
213
|
requestedAt: string | Date | z.objectInputType<{
|
|
216
214
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
217
215
|
}, z.ZodTypeAny, "passthrough">;
|
|
216
|
+
sellerName: string;
|
|
218
217
|
sellerEmail: string;
|
|
218
|
+
amount: number;
|
|
219
219
|
grossAmount: number;
|
|
220
220
|
platformFee: number;
|
|
221
221
|
platformFeeRate: number;
|
|
@@ -290,7 +290,7 @@ export declare const paymentRecordSchema: z.ZodObject<{
|
|
|
290
290
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
291
291
|
}, "strip", z.ZodTypeAny, {
|
|
292
292
|
currency: string;
|
|
293
|
-
status: "
|
|
293
|
+
status: "failed" | "captured" | "pending" | "authorized" | "refunded" | "partially_refunded";
|
|
294
294
|
id: string;
|
|
295
295
|
amount: number;
|
|
296
296
|
orderId: string;
|
|
@@ -303,7 +303,7 @@ export declare const paymentRecordSchema: z.ZodObject<{
|
|
|
303
303
|
orderId: string;
|
|
304
304
|
gateway: "bank_transfer" | "upi" | "razorpay" | "stripe" | "paypal" | "cod" | "whatsapp";
|
|
305
305
|
currency?: string | undefined;
|
|
306
|
-
status?: "
|
|
306
|
+
status?: "failed" | "captured" | "pending" | "authorized" | "refunded" | "partially_refunded" | undefined;
|
|
307
307
|
createdAt?: string | undefined;
|
|
308
308
|
gatewayPaymentId?: string | undefined;
|
|
309
309
|
}>;
|
|
@@ -10,10 +10,10 @@ import { ROUTES } from "../../../next";
|
|
|
10
10
|
import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
|
|
11
11
|
import { formatCurrency } from "../../../utils";
|
|
12
12
|
import { getDefaultCurrency } from "../../../core/baseline-resolver";
|
|
13
|
-
const CLS_PREORDER_BADGE = "inline-flex items-center rounded-full bg-warning-surface px-2 py-0
|
|
14
|
-
const CLS_SALE_BADGE = "rounded-full bg-success-surface px-2 py-0
|
|
15
|
-
const CLS_TRENDING_BADGE = "rounded-full bg-indigo-600 px-2 py-0
|
|
16
|
-
const CLS_LIMITED_BADGE = "rounded-full bg-info-surface px-2 py-0
|
|
13
|
+
const CLS_PREORDER_BADGE = "inline-flex items-center rounded-full bg-warning-surface px-[var(--appkit-space-2)] py-[var(--appkit-space-0-5)] text-white";
|
|
14
|
+
const CLS_SALE_BADGE = "rounded-full bg-success-surface px-[var(--appkit-space-2)] py-[var(--appkit-space-0-5)] text-[length:var(--appkit-text-xs)] font-bold text-white";
|
|
15
|
+
const CLS_TRENDING_BADGE = "rounded-full bg-indigo-600 px-[var(--appkit-space-2)] py-[var(--appkit-space-0-5)] text-[length:var(--appkit-text-xs)] font-bold text-white";
|
|
16
|
+
const CLS_LIMITED_BADGE = "rounded-full bg-info-surface px-[var(--appkit-space-2)] py-[var(--appkit-space-0-5)] text-[length:var(--appkit-text-xs)] font-bold text-white";
|
|
17
17
|
import { BaseListingCard, Button, RichText, Row, Span, Stack, Text, TextLink } from "../../../ui";
|
|
18
18
|
import { normalizeRichTextHtml } from "../../../utils/string.formatter";
|
|
19
19
|
import { PreorderBadge } from "./PreorderCard";
|
|
@@ -64,5 +64,5 @@ export function MarketplacePreorderCard({ product, className = "", variant = "gr
|
|
|
64
64
|
/* ── Compact list layout ── */
|
|
65
65
|
_jsxs(_Fragment, { children: [_jsxs(Row, { className: "min-w-0", align: "start", justify: "between", gap: "sm", children: [_jsx(TextLink, { href: detailHref, className: "min-w-0 flex-1", children: _jsx(Text, { size: "sm", weight: "medium", color: "primary", truncate: 2, children: product.title }) }), wishlistActions && (_jsx(Button, { type: "button", variant: "ghost", size: "sm", className: `shrink-0 p-[0.25rem] leading-none ${inWishlist ? "text-primary" : "text-[var(--appkit-color-text-faint)]"}`, onClick: handleWishlist, "aria-label": inWishlist ? mergedLabels.removeFromWishlist : mergedLabels.addToWishlist, children: inWishlist ? "♥" : "♡" }))] }), _jsxs(Row, { align: "center", gap: "sm", wrap: true, children: [_jsx(Text, { className: "text-primary", size: "sm", weight: "bold", children: formatCurrency(product.price, getDefaultCurrency()) }), shipDate && _jsx(PreorderBadge, { shipDate: shipDate })] }), _jsx(Button, { type: "button", variant: "primary", size: "sm", textSize: "xs", className: "self-start mt-0.5", onClick: handleNavigate, children: mergedLabels.reserveNow })] })) : (
|
|
66
66
|
/* ── Full grid layout ── */
|
|
67
|
-
_jsxs(_Fragment, { children: [_jsx(TextLink, { href: detailHref, children: _jsx(Text, { size: "sm", weight: "medium", color: "primary", truncate: 2, children: product.title }) }), product.description ? (_jsx(RichText, { html: normalizeRichTextHtml(product.description), proseClass: "prose prose-sm max-w-none dark:prose-invert prose-p:my-0", className: "line-clamp-2 text-xs text-[var(--appkit-color-text-muted)]" })) : null, _jsxs(Row, { justify: "between", className: "mt-1", gap: "sm", children: [_jsx(Text, { size: "sm", weight: "semibold", color: "primary", children: formatCurrency(product.price, getDefaultCurrency()) }), shipDate && _jsx(PreorderBadge, { shipDate: shipDate })] }), _jsxs(Row, { justify: "between", className: "mt-2", gap: "sm", children: [_jsx(Button, { type: "button", variant: "primary", size: "sm", textSize: "xs", className: "flex-1", onClick: handleNavigate, children: mergedLabels.reserveNow }), onAddToCart ? (_jsx(Button, { type: "button", variant: "outline", size: "sm", textSize: "xs", className: "flex-1", onClick: (e) => { e.stopPropagation(); onAddToCart(product); }, children: mergedLabels.addToCart })) : null, wishlistActions ? (_jsx(Button, { type: "button", variant: "ghost", size: "sm", className: `${inWishlist ? "text-primary" : "text-[var(--appkit-color-text-muted)]"}`, onClick: handleWishlist, "aria-label": inWishlist ? mergedLabels.removeFromWishlist : mergedLabels.addToWishlist, children: inWishlist ? "♥" : "♡" })) : null] })] })) })] }));
|
|
67
|
+
_jsxs(_Fragment, { children: [_jsx(TextLink, { href: detailHref, children: _jsx(Text, { size: "sm", weight: "medium", color: "primary", truncate: 2, children: product.title }) }), product.description ? (_jsx(RichText, { html: normalizeRichTextHtml(product.description), proseClass: "prose prose-sm max-w-none dark:prose-invert prose-p:my-0", className: "line-clamp-2 text-[length:var(--appkit-text-xs)] text-[var(--appkit-color-text-muted)]" })) : null, _jsxs(Row, { justify: "between", className: "mt-1", gap: "sm", children: [_jsx(Text, { size: "sm", weight: "semibold", color: "primary", children: formatCurrency(product.price, getDefaultCurrency()) }), shipDate && _jsx(PreorderBadge, { shipDate: shipDate })] }), _jsxs(Row, { justify: "between", className: "mt-2", gap: "sm", children: [_jsx(Button, { type: "button", variant: "primary", size: "sm", textSize: "xs", className: "flex-1", onClick: handleNavigate, children: mergedLabels.reserveNow }), onAddToCart ? (_jsx(Button, { type: "button", variant: "outline", size: "sm", textSize: "xs", className: "flex-1", onClick: (e) => { e.stopPropagation(); onAddToCart(product); }, children: mergedLabels.addToCart })) : null, wishlistActions ? (_jsx(Button, { type: "button", variant: "ghost", size: "sm", className: `${inWishlist ? "text-primary" : "text-[var(--appkit-color-text-muted)]"}`, onClick: handleWishlist, "aria-label": inWishlist ? mergedLabels.removeFromWishlist : mergedLabels.addToWishlist, children: inWishlist ? "♥" : "♡" })) : null] })] })) })] }));
|
|
68
68
|
}
|
|
@@ -29,7 +29,7 @@ export function PreOrderActionsClient({ productId, price, currency, depositAmoun
|
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
return (_jsxs(Stack, { gap: "md", children: [price !== null && (_jsxs(Div, { children: [_jsx(Text, { size: "2xl", weight: "bold", color: "primary", children: formatCurrency(price, currency) }), depositAmount !== null && (_jsxs(Text, { className: "mt-0.5", color: "muted", size: "xs", children: ["Reserve with ", formatCurrency(depositAmount, currency), depositPercent !== null ? ` (${depositPercent}% deposit)` : ""] }))] })), error && (_jsx(Text, { className: "text-error", size: "xs", children: error })), success && (_jsx(Text, { className: "text-success", size: "xs", children: "\u2713 Reserved! Redirecting to checkout\u2026" })), _jsx(LoginRequiredModal, { isOpen: showLoginModal, onClose: () => setShowLoginModal(false), message: "You need to be signed in to reserve this pre-order. Please log in or create an account to continue." }), _jsxs(Stack, { gap: "sm", children: [_jsx(Button, { variant: "primary", size: "md", className: "w-full", disabled: isPending, onClick: handleReserve, children: isPending ? "Processing…" : "Reserve Now" }), isCancellable && (_jsx(Text, { size: "xs", align: "
|
|
32
|
+
return (_jsxs(Stack, { gap: "md", children: [price !== null && (_jsxs(Div, { children: [_jsx(Text, { size: "2xl", weight: "bold", color: "primary", children: formatCurrency(price, currency) }), depositAmount !== null && (_jsxs(Text, { className: "mt-0.5", color: "muted", size: "xs", children: ["Reserve with ", formatCurrency(depositAmount, currency), depositPercent !== null ? ` (${depositPercent}% deposit)` : ""] }))] })), error && (_jsx(Text, { className: "text-error", size: "xs", children: error })), success && (_jsx(Text, { className: "text-success", size: "xs", children: "\u2713 Reserved! Redirecting to checkout\u2026" })), _jsx(LoginRequiredModal, { isOpen: showLoginModal, onClose: () => setShowLoginModal(false), message: "You need to be signed in to reserve this pre-order. Please log in or create an account to continue." }), _jsxs(Stack, { gap: "sm", children: [_jsx(Button, { variant: "primary", size: "md", className: "w-full", disabled: isPending, onClick: handleReserve, children: isPending ? "Processing…" : "Reserve Now" }), isCancellable && (_jsx(Text, { size: "xs", align: "start", color: "muted", children: "\u2713 Free cancellation before production" }))] }), tags.length > 0 && (_jsx(Div, { border: "default", className: "border-t", padding: "t-md", children: _jsx(Row, { wrap: true, gap: "xs", className: "", children: tags.map((tag) => (_jsx(Span, { size: "xs", rounded: "full", padding: "pill-sm-tall", surface: "subtle", color: "muted", children: tag }, tag))) }) })), _jsx(Div, { border: "default", className: "border-t", padding: "t-md", children: _jsx(Row, { className: "text-center", justify: "center", gap: "md", wrap: true, children: [
|
|
33
33
|
{ icon: "🔒", label: "Secure\nPayment" },
|
|
34
34
|
{ icon: "📅", label: "Guaranteed\nDelivery" },
|
|
35
35
|
{ icon: "↩", label: "Free\nCancellation" },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Div, Span } from "../../../ui";
|
|
3
|
-
const CLS_NEW_BADGE = "rounded-full bg-indigo-600 px-2
|
|
3
|
+
const CLS_NEW_BADGE = "rounded-full bg-indigo-600 px-[var(--appkit-space-2-5)] py-[var(--appkit-space-0-5)] text-white";
|
|
4
4
|
const STATUS_MAP = {
|
|
5
5
|
pending: { label: "Pending", color: "bg-warning-surface text-warning" },
|
|
6
6
|
confirmed: { label: "Confirmed", color: "bg-info-surface text-info" },
|