@mohasinac/appkit 4.9.5 → 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/client/features/layout/DashboardLayoutClient.d.ts +6 -1
- package/dist/_internal/client/features/layout/DashboardLayoutClient.js +4 -1
- package/dist/_internal/client/features/lottery/LotteryPullForm.d.ts +1 -1
- package/dist/_internal/client/features/lottery/LotteryPullForm.js +2 -2
- package/dist/_internal/server/features/admin/daily-digest-actions.d.ts +18 -0
- package/dist/_internal/server/features/admin/daily-digest-actions.js +37 -0
- package/dist/_internal/server/features/auctions/actions.js +3 -2
- package/dist/_internal/server/features/auctions/service.d.ts +4 -3
- package/dist/_internal/server/features/auctions/service.js +6 -6
- package/dist/_internal/server/features/audit-log/actions.d.ts +25 -0
- package/dist/_internal/server/features/audit-log/actions.js +38 -0
- package/dist/_internal/server/features/brands/actions.js +0 -2
- package/dist/_internal/server/features/brands/og.d.ts +4 -1
- package/dist/_internal/server/features/brands/og.js +1 -1
- package/dist/_internal/server/features/bundles/data.d.ts +9 -0
- package/dist/_internal/server/features/bundles/data.js +14 -0
- package/dist/_internal/server/features/bundles/index.d.ts +1 -1
- package/dist/_internal/server/features/bundles/index.js +1 -1
- package/dist/_internal/server/features/catalogue/og.d.ts +20 -0
- package/dist/_internal/server/features/catalogue/og.js +27 -0
- package/dist/_internal/server/features/grouped/data.d.ts +16 -0
- package/dist/_internal/server/features/grouped/data.js +50 -1
- package/dist/_internal/server/features/grouped/index.d.ts +1 -1
- package/dist/_internal/server/features/grouped/index.js +1 -1
- package/dist/_internal/server/features/orders/actions.js +9 -0
- package/dist/_internal/server/features/orders/adapters.js +25 -0
- package/dist/_internal/server/features/products/data.d.ts +23 -0
- package/dist/_internal/server/features/products/data.js +159 -0
- package/dist/_internal/server/features/products/index.d.ts +1 -1
- package/dist/_internal/server/features/products/index.js +1 -1
- package/dist/_internal/server/functions/scheduled.d.ts +3 -1
- package/dist/_internal/server/functions/scheduled.js +17 -1
- package/dist/_internal/server/jobs/core/dailyStatusDigest.d.ts +40 -0
- package/dist/_internal/server/jobs/core/dailyStatusDigest.js +164 -0
- package/dist/_internal/server/jobs/core/hardBanCascade.js +11 -0
- package/dist/_internal/server/jobs/core/testerSandboxCleanup.d.ts +1 -0
- package/dist/_internal/server/jobs/core/testerSandboxCleanup.js +4 -1
- package/dist/_internal/server/jobs/core/testerSandboxRefresh.d.ts +12 -0
- package/dist/_internal/server/jobs/core/testerSandboxRefresh.js +85 -0
- package/dist/_internal/server/jobs/core/whatsappNotify.js +16 -0
- package/dist/_internal/server/jobs/handlers/dailyStatusDigest.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/dailyStatusDigest.js +4 -0
- package/dist/_internal/server/jobs/handlers/index.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/index.js +3 -0
- package/dist/_internal/server/jobs/handlers/testerSandboxRefresh.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/testerSandboxRefresh.js +2 -0
- package/dist/_internal/server/notifications/channel-health.d.ts +27 -0
- package/dist/_internal/server/notifications/channel-health.js +101 -0
- package/dist/_internal/shared/features/auctions/config.d.ts +20 -0
- package/dist/_internal/shared/features/auctions/config.js +31 -1
- package/dist/_internal/shared/features/brands/schema.d.ts +0 -6
- package/dist/_internal/shared/features/brands/schema.js +0 -1
- package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +7 -0
- package/dist/_internal/shared/features/categories/bundle-schemas.js +3 -0
- package/dist/_internal/shared/features/orders/schema.d.ts +8 -8
- package/dist/_internal/shared/listing-types/art/config.d.ts +1 -1
- package/dist/_internal/shared/listing-types/art/config.js +1 -1
- package/dist/_internal/shared/listing-types/classified/config.d.ts +1 -1
- package/dist/_internal/shared/listing-types/classified/config.js +1 -1
- package/dist/_internal/shared/listing-types/digital-code/config.d.ts +1 -1
- package/dist/_internal/shared/listing-types/digital-code/config.js +1 -1
- package/dist/_internal/shared/listing-types/live/config.d.ts +1 -1
- package/dist/_internal/shared/listing-types/live/config.js +1 -1
- package/dist/_internal/shared/listing-types/prize-draw/config.d.ts +1 -1
- package/dist/_internal/shared/listing-types/prize-draw/config.js +1 -1
- package/dist/_internal/shared/listing-types/stickers/config.d.ts +1 -1
- package/dist/_internal/shared/listing-types/stickers/config.js +1 -1
- package/dist/client.d.ts +21 -12
- package/dist/client.js +14 -7
- package/dist/constants/api-endpoints.d.ts +9 -9
- package/dist/constants/api-endpoints.js +3 -3
- package/dist/contracts/client-auth.d.ts +3 -7
- package/dist/contracts/email.d.ts +1 -0
- package/dist/features/account/components/AddressForm.js +24 -2
- package/dist/features/account/components/BecomeSellerView.d.ts +1 -2
- package/dist/features/account/components/BecomeSellerView.js +1 -1
- package/dist/features/account/components/NotificationBell.js +1 -1
- package/dist/features/account/components/UserBidsView.d.ts +1 -0
- package/dist/features/account/components/UserBidsView.js +47 -0
- package/dist/features/account/components/UserOrdersView.d.ts +4 -11
- package/dist/features/account/components/UserOrdersView.js +54 -4
- package/dist/features/account/components/UserReturnsView.d.ts +4 -9
- package/dist/features/account/components/UserReturnsView.js +37 -3
- package/dist/features/account/components/index.d.ts +3 -2
- package/dist/features/account/components/index.js +1 -0
- package/dist/features/admin/actions/admin-actions.js +22 -0
- package/dist/features/admin/actions/admin-coupon-actions.js +10 -0
- package/dist/features/admin/actions/notification-actions.js +4 -3
- package/dist/features/admin/components/AdminAdsView.d.ts +2 -3
- package/dist/features/admin/components/AdminAdsView.js +86 -89
- package/dist/features/admin/components/AdminAllEventEntriesView.js +18 -3
- package/dist/features/admin/components/AdminAuditLogView.d.ts +11 -0
- package/dist/features/admin/components/AdminAuditLogView.js +95 -0
- package/dist/features/admin/components/AdminBlogEditorView.js +37 -3
- package/dist/features/admin/components/AdminBrandEditorView.js +10 -6
- package/dist/features/admin/components/AdminBundleEditorView.js +18 -2
- package/dist/features/admin/components/AdminCarouselEditorView.js +2 -2
- package/dist/features/admin/components/AdminCarouselGroupEditorView.js +2 -2
- package/dist/features/admin/components/AdminCartsView.js +34 -4
- package/dist/features/admin/components/AdminCategoryEditorView.js +5 -4
- package/dist/features/admin/components/AdminCouponEditorView.js +2 -2
- package/dist/features/admin/components/AdminFaqEditorView.js +2 -2
- package/dist/features/admin/components/AdminHistoryView.js +11 -1
- package/dist/features/admin/components/AdminNotificationsView.js +27 -1
- package/dist/features/admin/components/AdminOrderEditorView.d.ts +10 -1
- package/dist/features/admin/components/AdminOrderEditorView.js +4 -3
- package/dist/features/admin/components/AdminOrdersView.js +92 -24
- package/dist/features/admin/components/AdminPayoutMarkPaidModal.d.ts +7 -0
- package/dist/features/admin/components/AdminPayoutMarkPaidModal.js +47 -0
- package/dist/features/admin/components/AdminPayoutsView.js +15 -31
- package/dist/features/admin/components/AdminProductEditorView.js +26 -3
- package/dist/features/admin/components/AdminSiteSettingsView.js +31 -4
- package/dist/features/admin/components/AdminStoreAddressesView.js +22 -2
- package/dist/features/admin/components/AdminStoresView.js +7 -0
- package/dist/features/admin/components/AdminSublistingCategoryEditorView.js +2 -2
- package/dist/features/admin/components/AdminTesterChecklistItemEditorView.js +2 -2
- package/dist/features/admin/components/AdminUserEditorView.d.ts +2 -2
- package/dist/features/admin/components/AdminUserEditorView.js +4 -2
- package/dist/features/admin/components/AdminUsersView.js +1 -1
- package/dist/features/admin/components/AdminWishlistsView.js +14 -1
- package/dist/features/admin/components/DataListingView.d.ts +2 -2
- package/dist/features/admin/components/ViewAuditLogEntryModal.d.ts +19 -0
- package/dist/features/admin/components/ViewAuditLogEntryModal.js +22 -0
- package/dist/features/admin/components/ViewNotificationModal.d.ts +21 -0
- package/dist/features/admin/components/ViewNotificationModal.js +15 -0
- package/dist/features/admin/components/analytics/AdminPageViewsReportView.d.ts +4 -7
- package/dist/features/admin/components/analytics/AdminPageViewsReportView.js +56 -36
- package/dist/features/admin/components/index.d.ts +8 -1
- package/dist/features/admin/components/index.js +4 -0
- package/dist/features/admin/constants/filter-tabs.d.ts +49 -0
- package/dist/features/admin/constants/filter-tabs.js +27 -0
- package/dist/features/admin/hooks/useAdminListing.d.ts +6 -0
- package/dist/features/admin/hooks/useAdminListing.js +3 -1
- package/dist/features/admin/hooks/useAdminListingData.d.ts +9 -1
- package/dist/features/admin/hooks/useAdminListingData.js +9 -2
- package/dist/features/admin/repository/site-settings.repository.d.ts +5 -0
- package/dist/features/admin/schemas/firestore.d.ts +21 -0
- package/dist/features/admin/schemas/firestore.js +6 -0
- package/dist/features/analytics/types.d.ts +1 -1
- package/dist/features/analytics/types.js +8 -0
- package/dist/features/auctions/actions/bid-actions.js +4 -1
- package/dist/features/auctions/components/AuctionBottomActions.d.ts +2 -1
- package/dist/features/auctions/components/AuctionBottomActions.js +14 -1
- package/dist/features/auctions/components/AuctionDetailPageView.js +21 -9
- package/dist/features/auctions/components/LiveMinIncrement.d.ts +18 -0
- package/dist/features/auctions/components/LiveMinIncrement.js +17 -0
- package/dist/features/auctions/components/PlaceBidFormClient.d.ts +5 -2
- package/dist/features/auctions/components/PlaceBidFormClient.js +7 -3
- package/dist/features/auctions/schemas/index.d.ts +5 -0
- package/dist/features/audit-log/repository/audit-log.repository.d.ts +45 -0
- package/dist/features/audit-log/repository/audit-log.repository.js +30 -0
- package/dist/features/audit-log/schemas/firestore.d.ts +59 -0
- package/dist/features/audit-log/schemas/firestore.js +35 -0
- package/dist/features/auth/actions/index.d.ts +0 -1
- package/dist/features/auth/actions/index.js +0 -1
- package/dist/features/auth/hooks/useAuth.d.ts +8 -35
- package/dist/features/auth/hooks/useAuth.js +21 -37
- package/dist/features/auth/permissions/constants.d.ts +1 -1
- package/dist/features/auth/permissions/constants.js +2 -0
- package/dist/features/blog/schemas/index.d.ts +32 -0
- package/dist/features/catalogue/components/AdminCatalogueApprovalsView.js +31 -3
- package/dist/features/catalogue/components/CatalogueItemEditorView.js +2 -1
- package/dist/features/catalogue/components/PublicCatalogueItemDetailView.d.ts +11 -0
- package/dist/features/catalogue/components/PublicCatalogueItemDetailView.js +33 -0
- package/dist/features/catalogue/components/PublicCatalogueView.js +2 -1
- package/dist/features/catalogue/index.d.ts +2 -0
- package/dist/features/catalogue/index.js +1 -0
- package/dist/features/categories/components/BrandDetailPageView.js +14 -12
- package/dist/features/categories/components/BundleDetailView.d.ts +3 -1
- package/dist/features/categories/components/BundleDetailView.js +3 -2
- package/dist/features/categories/components/CategoryDetailPageView.js +7 -3
- package/dist/features/categories/components/CategoryHighlightsAndFaqSection.d.ts +14 -0
- package/dist/features/categories/components/CategoryHighlightsAndFaqSection.js +22 -0
- package/dist/features/categories/components/CategoryProductsView.d.ts +1 -5
- package/dist/features/categories/components/CategoryProductsView.js +1 -1
- package/dist/features/categories/components/CategorySelectorCreate.js +16 -2
- package/dist/features/categories/schemas/firestore.d.ts +19 -2
- package/dist/features/categories/schemas/index.d.ts +24 -3
- package/dist/features/categories/schemas/index.js +3 -1
- package/dist/features/categories/types/index.d.ts +7 -0
- package/dist/features/checkout/actions/checkout-value-otp-actions.d.ts +17 -3
- package/dist/features/checkout/actions/checkout-value-otp-actions.js +101 -22
- package/dist/features/classified/components/ClassifiedContactSellerPanel.d.ts +12 -0
- package/dist/features/classified/components/ClassifiedContactSellerPanel.js +49 -0
- package/dist/features/classified/components/ClassifiedDetailPageView.d.ts +7 -0
- package/dist/features/classified/components/ClassifiedDetailPageView.js +69 -0
- package/dist/features/contact/components/ContactForm.js +17 -4
- package/dist/features/contact/components/ContactPageView.js +8 -2
- package/dist/features/contact/email.d.ts +1 -0
- package/dist/features/contact/email.js +3 -0
- package/dist/features/digital-codes/components/DigitalCodeDetailPageView.d.ts +19 -0
- package/dist/features/digital-codes/components/DigitalCodeDetailPageView.js +79 -0
- package/dist/features/events/components/AdminEventEditorView.js +54 -2
- package/dist/features/events/components/AdminEventEntriesView.d.ts +2 -16
- package/dist/features/events/components/AdminEventEntriesView.js +56 -89
- package/dist/features/events/components/EventFormDrawer.js +5 -1
- package/dist/features/events/components/EventRaffleEntryForm.d.ts +1 -3
- package/dist/features/events/components/EventRaffleEntryForm.js +1 -1
- package/dist/features/events/schemas/index.d.ts +22 -0
- package/dist/features/grouped/components/GroupedListingsCarousel.d.ts +13 -0
- package/dist/features/grouped/components/GroupedListingsCarousel.js +31 -0
- package/dist/features/grouped/repository/grouped-listings.repository.d.ts +12 -0
- package/dist/features/grouped/repository/grouped-listings.repository.js +34 -0
- package/dist/features/homepage/components/CharacterHotspotForm.js +202 -187
- package/dist/features/homepage/components/SectionCarousel.d.ts +1 -7
- package/dist/features/homepage/components/SectionCarousel.js +1 -1
- package/dist/features/layout/BottomActions.js +4 -3
- package/dist/features/layout/BottomActionsContext.d.ts +10 -0
- package/dist/features/layout/BottomActionsContext.js +5 -1
- package/dist/features/layout/TitleBarLayout.d.ts +1 -1
- package/dist/features/layout/TitleBarLayout.js +3 -3
- package/dist/features/layout/hooks/useBottomActions.d.ts +2 -0
- package/dist/features/layout/hooks/useBottomActions.js +4 -1
- package/dist/features/live/components/LiveItemDetailPageView.d.ts +9 -0
- package/dist/features/live/components/LiveItemDetailPageView.js +74 -0
- package/dist/features/media/MediaImage.js +39 -3
- package/dist/features/media/MediaVideo.js +17 -1
- package/dist/features/media/types/index.d.ts +10 -0
- package/dist/features/media/types/index.js +1 -0
- package/dist/features/media/upload/MediaUploadField.d.ts +7 -1
- package/dist/features/media/upload/MediaUploadField.js +11 -7
- package/dist/features/media/upload/video-poster.d.ts +2 -0
- package/dist/features/media/upload/video-poster.js +16 -1
- package/dist/features/media/upload/video-poster.test.js +1 -1
- package/dist/features/orders/components/OrderStatusTimeline.d.ts +12 -0
- package/dist/features/orders/components/OrderStatusTimeline.js +55 -0
- package/dist/features/orders/components/index.d.ts +2 -0
- package/dist/features/orders/components/index.js +1 -0
- package/dist/features/orders/constants/payment-window.d.ts +25 -0
- package/dist/features/orders/constants/payment-window.js +25 -0
- package/dist/features/orders/repository/orders.repository.d.ts +32 -0
- package/dist/features/orders/repository/orders.repository.js +56 -0
- package/dist/features/orders/schemas/index.d.ts +24 -24
- package/dist/features/orders/types/index.d.ts +33 -0
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +9 -1
- package/dist/features/pre-orders/schemas/index.d.ts +5 -0
- package/dist/features/products/components/BidHistory.js +9 -1
- package/dist/features/products/components/GroupSettingsPanel.js +25 -3
- package/dist/features/products/components/PrizeDrawDetailPageView.js +11 -1
- package/dist/features/products/components/PrizeDrawEntryActions.d.ts +1 -4
- package/dist/features/products/components/PrizeDrawEntryActions.js +1 -1
- package/dist/features/products/components/ProductDetailActions.d.ts +1 -2
- package/dist/features/products/components/ProductDetailActions.js +1 -1
- package/dist/features/products/components/ProductDetailPageView.js +11 -116
- package/dist/features/products/components/ProductGrid.js +15 -1
- package/dist/features/products/components/RelatedItemsSection.d.ts +16 -0
- package/dist/features/products/components/RelatedItemsSection.js +17 -0
- package/dist/features/products/constants/action-defs.d.ts +1 -0
- package/dist/features/products/constants/action-defs.js +1 -0
- package/dist/features/products/schemas/index.d.ts +5 -0
- package/dist/features/promotions/components/CouponsIndexListing.d.ts +1 -3
- package/dist/features/promotions/components/CouponsIndexListing.js +1 -1
- package/dist/features/search/components/SearchView.d.ts +1 -3
- package/dist/features/search/components/SearchView.js +1 -1
- package/dist/features/seller/components/QuickProductForm.js +2 -1
- package/dist/features/seller/components/SellerBidsView.js +66 -107
- package/dist/features/seller/components/SellerGoogleReviewsView.js +17 -1
- package/dist/features/seller/components/SellerOrdersView.d.ts +15 -3
- package/dist/features/seller/components/SellerOrdersView.js +134 -163
- package/dist/features/seller/components/SellerPayoutMethodsView.js +60 -48
- package/dist/features/seller/components/SellerPayoutSettingsView.js +69 -4
- package/dist/features/seller/components/SellerPayoutsView.d.ts +12 -0
- package/dist/features/seller/components/SellerPayoutsView.js +25 -5
- package/dist/features/seller/components/SellerProductShell.d.ts +10 -3
- package/dist/features/seller/components/SellerProductShell.js +90 -37
- package/dist/features/seller/components/SellerProductsFilterDrawer.d.ts +2 -7
- package/dist/features/seller/components/SellerProductsFilterDrawer.js +4 -4
- package/dist/features/seller/components/SellerProductsView.d.ts +2 -4
- package/dist/features/seller/components/SellerProductsView.js +131 -189
- package/dist/features/seller/components/SellerReviewsView.js +95 -133
- package/dist/features/seller/components/SellerShippingConfigsView.js +47 -67
- package/dist/features/seller/components/SellerShippingView.js +41 -4
- package/dist/features/seller/components/SellerStoreCategoriesView.js +51 -59
- package/dist/features/seller/components/SellerStorefrontView.d.ts +6 -1
- package/dist/features/seller/components/SellerStorefrontView.js +42 -5
- package/dist/features/seller/components/index.d.ts +2 -2
- package/dist/features/seller/components/index.js +2 -2
- package/dist/features/shell/FormShell.d.ts +24 -4
- package/dist/features/shell/FormShell.js +12 -6
- package/dist/features/shell/QuickFormDrawer.js +67 -12
- package/dist/features/shell/StepForm.d.ts +30 -1
- package/dist/features/shell/StepForm.js +47 -4
- package/dist/features/shell/index.d.ts +1 -1
- package/dist/features/shell/index.js +1 -1
- package/dist/features/shipments/components/AdminShipmentEditorView.js +2 -2
- package/dist/features/shipments/schemas/validation.d.ts +14 -4
- package/dist/features/tester/components/AdminTesterFeedbackListView.js +23 -2
- package/dist/features/tester/components/TesterChecklistStepRow.js +1 -1
- package/dist/features/tester/components/TesterHubView.js +3 -2
- package/dist/features/tester/seed-data/orders-tester-seed-data.js +9 -1
- package/dist/features/tester/seed-data/products-tester-seed-data.js +43 -32
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +487 -18
- package/dist/index.d.ts +17 -3
- package/dist/index.js +23 -5
- package/dist/next/routing/route-map.d.ts +13 -0
- package/dist/next/routing/route-map.js +12 -0
- package/dist/providers/email-resend/provider.js +1 -0
- package/dist/providers/firebase-client/auth.d.ts +1 -0
- package/dist/providers/firebase-client/auth.js +7 -1
- package/dist/repositories/index.d.ts +1 -0
- package/dist/repositories/index.js +1 -0
- package/dist/schemas/registry.d.ts +61 -25
- package/dist/security/pii-mask.js +1 -1
- package/dist/seed/bids-seed-data.js +48 -3
- package/dist/seed/categories-seed-data.js +69 -0
- package/dist/seed/grouped-listings-seed-data.js +167 -0
- package/dist/seed/payouts-seed-data.js +4 -4
- package/dist/seed/products-art-seed-data.js +188 -5
- package/dist/seed/products-auctions-seed-data.js +226 -6
- package/dist/seed/products-classifieds-seed-data.js +255 -8
- package/dist/seed/products-digital-codes-seed-data.js +258 -19
- package/dist/seed/products-live-items-seed-data.js +143 -10
- package/dist/seed/products-preorders-seed-data.js +213 -8
- package/dist/seed/products-prize-draws-seed-data.js +198 -0
- package/dist/seed/products-standard-seed-data.js +234 -4
- package/dist/seed/products-stickers-seed-data.js +178 -5
- package/dist/seed/site-settings-seed-data.js +23 -30
- package/dist/seed/store-extensions-seed-data.js +2 -2
- package/dist/server-entry.d.ts +6 -2
- package/dist/server-entry.js +24 -3
- package/dist/server.d.ts +10 -3
- package/dist/server.js +11 -4
- package/dist/styles.css +29 -1
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/components/Form.d.ts +11 -2
- package/dist/ui/components/Form.js +4 -3
- package/dist/ui/components/FormField.d.ts +3 -1
- package/dist/ui/components/FormField.js +22 -4
- package/dist/ui/components/ImageLightbox.js +37 -3
- package/dist/ui/components/ImageLightbox.style.css +28 -0
- package/dist/ui/components/ListingLayout.d.ts +1 -2
- package/dist/ui/components/ListingLayout.js +1 -1
- package/dist/ui/components/RecordDetailModal.d.ts +68 -0
- package/dist/ui/components/RecordDetailModal.js +8 -0
- package/dist/ui/components/SlottedListingView.js +9 -1
- package/dist/ui/forms/FormErrorSummary.d.ts +25 -0
- package/dist/ui/forms/FormErrorSummary.js +37 -0
- package/dist/ui/forms/FormShell.d.ts +37 -2
- package/dist/ui/forms/FormShell.js +37 -7
- package/dist/ui/forms/FormShell.style.css +17 -0
- package/dist/ui/forms/index.d.ts +2 -0
- package/dist/ui/forms/index.js +1 -0
- package/dist/ui/index.d.ts +4 -0
- package/dist/ui/index.js +5 -0
- package/dist/utils/media-url.d.ts +12 -1
- package/dist/utils/media-url.js +59 -1
- package/dist/validation/schemas.d.ts +4 -4
- package/package.json +1 -1
- package/dist/_internal/client/features/classified/ClassifiedDetailView.d.ts +0 -9
- package/dist/_internal/client/features/classified/ClassifiedDetailView.js +0 -55
- package/dist/_internal/client/features/digital-code/DigitalCodeDetailView.d.ts +0 -18
- package/dist/_internal/client/features/digital-code/DigitalCodeDetailView.js +0 -21
- package/dist/_internal/client/features/live/LiveItemDetailView.d.ts +0 -9
- package/dist/_internal/client/features/live/LiveItemDetailView.js +0 -25
- package/dist/_internal/server/jobs/core/prizeRevealClose.d.ts +0 -2
- package/dist/_internal/server/jobs/core/prizeRevealClose.js +0 -28
- package/dist/_internal/server/jobs/core/prizeRevealExpiry.d.ts +0 -2
- package/dist/_internal/server/jobs/core/prizeRevealExpiry.js +0 -61
- package/dist/_internal/server/jobs/core/prizeRevealOpen.d.ts +0 -2
- package/dist/_internal/server/jobs/core/prizeRevealOpen.js +0 -68
- package/dist/_internal/server/jobs/core/prizeRevealReminder.d.ts +0 -2
- package/dist/_internal/server/jobs/core/prizeRevealReminder.js +0 -49
- package/dist/_internal/server/jobs/handlers/prizeRevealClose.d.ts +0 -2
- package/dist/_internal/server/jobs/handlers/prizeRevealClose.js +0 -2
- package/dist/_internal/server/jobs/handlers/prizeRevealExpiry.d.ts +0 -2
- package/dist/_internal/server/jobs/handlers/prizeRevealExpiry.js +0 -2
- package/dist/_internal/server/jobs/handlers/prizeRevealOpen.d.ts +0 -2
- package/dist/_internal/server/jobs/handlers/prizeRevealOpen.js +0 -2
- package/dist/_internal/server/jobs/handlers/prizeRevealReminder.d.ts +0 -2
- package/dist/_internal/server/jobs/handlers/prizeRevealReminder.js +0 -2
- package/dist/features/auth/consent-otp.d.ts +0 -57
- package/dist/features/auth/consent-otp.js +0 -127
- package/dist/features/cart/components/CheckoutOtpModal.d.ts +0 -15
- package/dist/features/cart/components/CheckoutOtpModal.js +0 -12
- package/dist/features/checkout/actions/checkout-actions.d.ts +0 -31
- package/dist/features/checkout/actions/checkout-actions.js +0 -124
- package/dist/features/classified/components/ClassifiedIndexListing.d.ts +0 -5
- package/dist/features/classified/components/ClassifiedIndexListing.js +0 -123
- package/dist/features/classified/components/ClassifiedListView.d.ts +0 -6
- package/dist/features/classified/components/ClassifiedListView.js +0 -44
- package/dist/features/digital-codes/components/DigitalCodesIndexListing.d.ts +0 -5
- package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +0 -114
- package/dist/features/digital-codes/components/DigitalCodesListView.d.ts +0 -6
- package/dist/features/digital-codes/components/DigitalCodesListView.js +0 -38
- package/dist/features/live/components/LiveItemsIndexListing.d.ts +0 -5
- package/dist/features/live/components/LiveItemsIndexListing.js +0 -115
- package/dist/features/live/components/LiveItemsListView.d.ts +0 -6
- package/dist/features/live/components/LiveItemsListView.js +0 -44
- package/dist/features/seller/components/SellerTemplatesView.d.ts +0 -12
- package/dist/features/seller/components/SellerTemplatesView.js +0 -276
- package/dist/react/hooks/useVisibleItems.d.ts +0 -37
- package/dist/react/hooks/useVisibleItems.js +0 -59
- package/dist/ui/components/TabStrip.d.ts +0 -34
- package/dist/ui/components/TabStrip.js +0 -56
- package/dist/ui/components/TabStrip.style.css +0 -97
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
import { normalizeError } from "../../../../errors/normalize";
|
|
21
21
|
import { notificationRepository } from "../../../../features/admin/repository/notification.repository";
|
|
22
22
|
import { sendWhatsAppTemplateMessage, sendWhatsAppBusinessMessage, } from "../../../../features/whatsapp-bot/helpers/whatsapp";
|
|
23
|
+
import { isChannelHealthy, recordChannelOutcome } from "../../notifications/channel-health";
|
|
23
24
|
const MAX_ATTEMPTS = 3;
|
|
24
25
|
const RETRY_DELAY_MS = 1500;
|
|
25
26
|
function delay(ms) {
|
|
@@ -27,6 +28,20 @@ function delay(ms) {
|
|
|
27
28
|
}
|
|
28
29
|
export async function runWhatsAppNotify(payload, ctx) {
|
|
29
30
|
const { toPhone, title, message, templateName, templateLanguage, notificationId, phoneNumberId, accessToken } = payload;
|
|
31
|
+
if (!(await isChannelHealthy("whatsapp"))) {
|
|
32
|
+
ctx.logger.warn("whatsappNotify: WhatsApp channel circuit is open — skipping send", { notificationId });
|
|
33
|
+
await notificationRepository
|
|
34
|
+
.update(notificationId, { whatsappStatus: "skipped" })
|
|
35
|
+
.catch((err) => {
|
|
36
|
+
void normalizeError(err);
|
|
37
|
+
});
|
|
38
|
+
return {
|
|
39
|
+
summary: { total: 1, succeeded: 0, skipped: 1, failed: 0 },
|
|
40
|
+
succeeded: [],
|
|
41
|
+
skipped: [notificationId],
|
|
42
|
+
failed: [],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
30
45
|
let sent = false;
|
|
31
46
|
let lastError;
|
|
32
47
|
for (let attempt = 1; attempt <= MAX_ATTEMPTS && !sent; attempt++) {
|
|
@@ -61,6 +76,7 @@ export async function runWhatsAppNotify(payload, ctx) {
|
|
|
61
76
|
if (!templateName) {
|
|
62
77
|
ctx.logger.warn("whatsappNotify: no approved template configured for this notification type — sent as free-form text, which Meta rejects outside the 24h customer-service window", { notificationId });
|
|
63
78
|
}
|
|
79
|
+
await recordChannelOutcome("whatsapp", sent);
|
|
64
80
|
await notificationRepository
|
|
65
81
|
.update(notificationId, { whatsappStatus: sent ? "sent" : "failed" })
|
|
66
82
|
.catch((err) => {
|
|
@@ -29,6 +29,7 @@ export { hardBanReinstatementHandler } from "./hardBanReinstatement";
|
|
|
29
29
|
export { paymentReviewAutoApproveHandler } from "./paymentReviewAutoApprove";
|
|
30
30
|
export { productStatsSyncHandler } from "./productStatsSync";
|
|
31
31
|
export { revenueRollupHandler } from "./revenueRollup";
|
|
32
|
+
export { dailyStatusDigestHandler } from "./dailyStatusDigest";
|
|
32
33
|
export { positionsReconcileHandler } from "./positionsReconcile";
|
|
33
34
|
export { payoutBatchHandler } from "./payoutBatch";
|
|
34
35
|
export { weeklyPayoutEligibilityHandler } from "./weeklyPayoutEligibility";
|
|
@@ -52,6 +53,7 @@ export { onScamReportCreateHandler } from "./onScamReportCreate";
|
|
|
52
53
|
export { onScamReportUpdateHandler } from "./onScamReportUpdate";
|
|
53
54
|
export { draftPruneHandler } from "./draftPrune";
|
|
54
55
|
export { testerSandboxCleanupHandler } from "./testerSandboxCleanup";
|
|
56
|
+
export { testerSandboxRefreshHandler } from "./testerSandboxRefresh";
|
|
55
57
|
export { emiInstallmentReminderHandler } from "./emiInstallmentReminder";
|
|
56
58
|
export { onShipmentItemWriteHandler } from "./onShipmentItemWrite";
|
|
57
59
|
export { onShipmentLotWriteHandler, onShipmentHeaderWriteHandler } from "./onShipmentAllocationSync";
|
|
@@ -29,6 +29,7 @@ export { hardBanReinstatementHandler } from "./hardBanReinstatement";
|
|
|
29
29
|
export { paymentReviewAutoApproveHandler } from "./paymentReviewAutoApprove";
|
|
30
30
|
export { productStatsSyncHandler } from "./productStatsSync";
|
|
31
31
|
export { revenueRollupHandler } from "./revenueRollup";
|
|
32
|
+
export { dailyStatusDigestHandler } from "./dailyStatusDigest";
|
|
32
33
|
export { positionsReconcileHandler } from "./positionsReconcile";
|
|
33
34
|
export { payoutBatchHandler } from "./payoutBatch";
|
|
34
35
|
export { weeklyPayoutEligibilityHandler } from "./weeklyPayoutEligibility";
|
|
@@ -64,6 +65,8 @@ export { onScamReportUpdateHandler } from "./onScamReportUpdate";
|
|
|
64
65
|
export { draftPruneHandler } from "./draftPrune";
|
|
65
66
|
// Tester program — 7-day auto-expiry sweep for the shared admin-seeded test sandbox
|
|
66
67
|
export { testerSandboxCleanupHandler } from "./testerSandboxCleanup";
|
|
68
|
+
// Tester program — every-4h revert-live-edits + prune-extras refresh (faster than the 7-day sweep above)
|
|
69
|
+
export { testerSandboxRefreshHandler } from "./testerSandboxRefresh";
|
|
67
70
|
// EMI — installment reminder + overdue-flagging sweep
|
|
68
71
|
export { emiInstallmentReminderHandler } from "./emiInstallmentReminder";
|
|
69
72
|
// Procurement Shipments — 3-function recompute cascade (item→lot, lot/header→shipment allocation, cascade-delete)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Circuit breaker for outbound notification channels (email, WhatsApp).
|
|
3
|
+
*
|
|
4
|
+
* Persisted as a singleton Firestore doc `system/channelHealth` so the
|
|
5
|
+
* "is this channel currently known-bad" state survives across requests and
|
|
6
|
+
* Firebase Function invocations — a channel that just failed 3 times in a
|
|
7
|
+
* row is treated as down for a 15-minute cooldown instead of being retried
|
|
8
|
+
* on every subsequent send attempt (wasted latency + hammering a dead
|
|
9
|
+
* provider). After the cooldown, the next attempt is a half-open probe:
|
|
10
|
+
* its own outcome decides whether the circuit re-closes or re-opens.
|
|
11
|
+
*/
|
|
12
|
+
export type NotificationChannel = "email" | "whatsapp";
|
|
13
|
+
/**
|
|
14
|
+
* Returns false only when the circuit is open and still within its cooldown
|
|
15
|
+
* window. Any other state (closed, or open-but-cooldown-elapsed) is treated
|
|
16
|
+
* as healthy — the latter lets the next call through as a half-open probe.
|
|
17
|
+
*/
|
|
18
|
+
export declare function isChannelHealthy(channel: NotificationChannel): Promise<boolean>;
|
|
19
|
+
export declare function recordChannelOutcome(channel: NotificationChannel, success: boolean): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Runs `fn` up to 3 times (500ms then 1.5s between attempts) and records the
|
|
22
|
+
* final outcome against the channel's health state. `fn` must throw on
|
|
23
|
+
* failure — for a helper that returns a boolean instead (e.g. the WhatsApp
|
|
24
|
+
* Cloud API helpers), convert `false` into a thrown error at the call site
|
|
25
|
+
* before passing it in.
|
|
26
|
+
*/
|
|
27
|
+
export declare function withChannelRetry<T>(channel: NotificationChannel, fn: () => Promise<T>): Promise<T>;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Circuit breaker for outbound notification channels (email, WhatsApp).
|
|
3
|
+
*
|
|
4
|
+
* Persisted as a singleton Firestore doc `system/channelHealth` so the
|
|
5
|
+
* "is this channel currently known-bad" state survives across requests and
|
|
6
|
+
* Firebase Function invocations — a channel that just failed 3 times in a
|
|
7
|
+
* row is treated as down for a 15-minute cooldown instead of being retried
|
|
8
|
+
* on every subsequent send attempt (wasted latency + hammering a dead
|
|
9
|
+
* provider). After the cooldown, the next attempt is a half-open probe:
|
|
10
|
+
* its own outcome decides whether the circuit re-closes or re-opens.
|
|
11
|
+
*/
|
|
12
|
+
import { getAdminDb } from "../../../providers/db-firebase";
|
|
13
|
+
import { normalizeError } from "../../../errors/normalize";
|
|
14
|
+
import { serverLogger } from "../../../monitoring";
|
|
15
|
+
const HEALTH_COLLECTION = "system";
|
|
16
|
+
const HEALTH_DOC = "channelHealth";
|
|
17
|
+
const FAILURE_THRESHOLD = 3;
|
|
18
|
+
const COOLDOWN_MS = 15 * 60 * 1000;
|
|
19
|
+
const RETRY_DELAYS_MS = [500, 1500];
|
|
20
|
+
function defaultState() {
|
|
21
|
+
return { consecutiveFailures: 0, state: "closed" };
|
|
22
|
+
}
|
|
23
|
+
async function readHealthDoc() {
|
|
24
|
+
try {
|
|
25
|
+
const snap = await getAdminDb().collection(HEALTH_COLLECTION).doc(HEALTH_DOC).get();
|
|
26
|
+
return snap.data() ?? {};
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
void normalizeError(err);
|
|
30
|
+
return {};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Returns false only when the circuit is open and still within its cooldown
|
|
35
|
+
* window. Any other state (closed, or open-but-cooldown-elapsed) is treated
|
|
36
|
+
* as healthy — the latter lets the next call through as a half-open probe.
|
|
37
|
+
*/
|
|
38
|
+
export async function isChannelHealthy(channel) {
|
|
39
|
+
const doc = await readHealthDoc();
|
|
40
|
+
const state = doc[channel];
|
|
41
|
+
if (!state || state.state !== "open")
|
|
42
|
+
return true;
|
|
43
|
+
if (state.openedAt && Date.now() - state.openedAt >= COOLDOWN_MS)
|
|
44
|
+
return true;
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
export async function recordChannelOutcome(channel, success) {
|
|
48
|
+
try {
|
|
49
|
+
const doc = await readHealthDoc();
|
|
50
|
+
const prev = doc[channel] ?? defaultState();
|
|
51
|
+
const next = success
|
|
52
|
+
? defaultState()
|
|
53
|
+
: (() => {
|
|
54
|
+
const consecutiveFailures = prev.consecutiveFailures + 1;
|
|
55
|
+
return consecutiveFailures >= FAILURE_THRESHOLD
|
|
56
|
+
? { consecutiveFailures, state: "open", openedAt: Date.now() }
|
|
57
|
+
: { consecutiveFailures, state: "closed" };
|
|
58
|
+
})();
|
|
59
|
+
await getAdminDb()
|
|
60
|
+
.collection(HEALTH_COLLECTION)
|
|
61
|
+
.doc(HEALTH_DOC)
|
|
62
|
+
.set({ [channel]: next }, { merge: true });
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
void normalizeError(err);
|
|
66
|
+
serverLogger.warn("channel-health: failed to record outcome", { channel, success });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function delay(ms) {
|
|
70
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Runs `fn` up to 3 times (500ms then 1.5s between attempts) and records the
|
|
74
|
+
* final outcome against the channel's health state. `fn` must throw on
|
|
75
|
+
* failure — for a helper that returns a boolean instead (e.g. the WhatsApp
|
|
76
|
+
* Cloud API helpers), convert `false` into a thrown error at the call site
|
|
77
|
+
* before passing it in.
|
|
78
|
+
*/
|
|
79
|
+
export async function withChannelRetry(channel, fn) {
|
|
80
|
+
const maxAttempts = RETRY_DELAYS_MS.length + 1;
|
|
81
|
+
// Narrowed to Error at catch time rather than held as `unknown` — same
|
|
82
|
+
// conversion the throw below used to do, just done once at the source so
|
|
83
|
+
// `unknown` never escapes the catch clause (CLAUDE.md Root Cause #31).
|
|
84
|
+
let lastError;
|
|
85
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
86
|
+
try {
|
|
87
|
+
const result = await fn();
|
|
88
|
+
await recordChannelOutcome(channel, true);
|
|
89
|
+
return result;
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
void normalizeError(err);
|
|
93
|
+
lastError = err instanceof Error ? err : new Error(String(err));
|
|
94
|
+
if (attempt < maxAttempts) {
|
|
95
|
+
await delay(RETRY_DELAYS_MS[attempt - 1]);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
await recordChannelOutcome(channel, false);
|
|
100
|
+
throw lastError ?? new Error(`${channel} channel failed after ${maxAttempts} attempts`);
|
|
101
|
+
}
|
|
@@ -4,3 +4,23 @@ export declare const AUCTIONS_SITEMAP_LIMIT = 5000;
|
|
|
4
4
|
export declare const AUCTION_DEFAULT_EXTENSION_MINUTES = 5;
|
|
5
5
|
export declare const AUCTION_MIN_BID_INCREMENT = 1;
|
|
6
6
|
export declare const AUCTION_SNIPING_WINDOW_SECONDS = 300;
|
|
7
|
+
export interface BidIncrementTier {
|
|
8
|
+
/** Upper bound (inclusive) of this band's current-bid range. `null` = open-ended ("and above"), must be the last tier. */
|
|
9
|
+
upTo: number | null;
|
|
10
|
+
increment: number;
|
|
11
|
+
}
|
|
12
|
+
/** Seed/fallback tier table — single source of truth reused by both DEFAULT_SITE_SETTINGS_DATA and the admin editor's initial state. */
|
|
13
|
+
export declare const DEFAULT_AUCTION_BID_INCREMENT_TIERS: BidIncrementTier[];
|
|
14
|
+
/**
|
|
15
|
+
* Resolve the tiered minimum bid increment for a given current bid amount.
|
|
16
|
+
* Tier lookup is inclusive of each band's upper bound — e.g. with the
|
|
17
|
+
* default tiers, a current bid of exactly 1000 resolves to the 100
|
|
18
|
+
* increment (the 100-1000 tier), not the 200 increment of the next band.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveTieredBidIncrement(currentBidAmount: number, tiers: BidIncrementTier[]): number;
|
|
21
|
+
/**
|
|
22
|
+
* Effective minimum bid increment = max(admin tier floor, per-listing
|
|
23
|
+
* override). A seller's per-listing "Minimum Bid Increment" can require
|
|
24
|
+
* MORE than the platform tier, but can never undercut it.
|
|
25
|
+
*/
|
|
26
|
+
export declare function resolveMinBidIncrement(currentBidAmount: number, tiers: BidIncrementTier[], override?: number | null): number;
|
|
@@ -2,5 +2,35 @@ export const AUCTIONS_PAGE_SIZE = 20;
|
|
|
2
2
|
export const AUCTIONS_ACTIVE_LIMIT = 50;
|
|
3
3
|
export const AUCTIONS_SITEMAP_LIMIT = 5000;
|
|
4
4
|
export const AUCTION_DEFAULT_EXTENSION_MINUTES = 5;
|
|
5
|
-
export const AUCTION_MIN_BID_INCREMENT = 1; // ₹1
|
|
5
|
+
export const AUCTION_MIN_BID_INCREMENT = 1; // ₹1 — last-resort fallback when bidIncrementTiers is empty/missing
|
|
6
6
|
export const AUCTION_SNIPING_WINDOW_SECONDS = 300; // 5 minutes — triggers auto-extend
|
|
7
|
+
/** Seed/fallback tier table — single source of truth reused by both DEFAULT_SITE_SETTINGS_DATA and the admin editor's initial state. */
|
|
8
|
+
export const DEFAULT_AUCTION_BID_INCREMENT_TIERS = [
|
|
9
|
+
{ upTo: 100, increment: 10 },
|
|
10
|
+
{ upTo: 1000, increment: 100 },
|
|
11
|
+
{ upTo: 5000, increment: 200 },
|
|
12
|
+
{ upTo: 10000, increment: 500 },
|
|
13
|
+
{ upTo: null, increment: 1000 },
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the tiered minimum bid increment for a given current bid amount.
|
|
17
|
+
* Tier lookup is inclusive of each band's upper bound — e.g. with the
|
|
18
|
+
* default tiers, a current bid of exactly 1000 resolves to the 100
|
|
19
|
+
* increment (the 100-1000 tier), not the 200 increment of the next band.
|
|
20
|
+
*/
|
|
21
|
+
export function resolveTieredBidIncrement(currentBidAmount, tiers) {
|
|
22
|
+
for (const tier of tiers) {
|
|
23
|
+
if (tier.upTo === null || currentBidAmount <= tier.upTo)
|
|
24
|
+
return tier.increment;
|
|
25
|
+
}
|
|
26
|
+
return tiers[tiers.length - 1]?.increment ?? AUCTION_MIN_BID_INCREMENT;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Effective minimum bid increment = max(admin tier floor, per-listing
|
|
30
|
+
* override). A seller's per-listing "Minimum Bid Increment" can require
|
|
31
|
+
* MORE than the platform tier, but can never undercut it.
|
|
32
|
+
*/
|
|
33
|
+
export function resolveMinBidIncrement(currentBidAmount, tiers, override) {
|
|
34
|
+
const tierValue = resolveTieredBidIncrement(currentBidAmount, tiers);
|
|
35
|
+
return typeof override === "number" && override > tierValue ? override : tierValue;
|
|
36
|
+
}
|
|
@@ -4,7 +4,6 @@ export declare const brandInputSchema: z.ZodObject<{
|
|
|
4
4
|
slug: z.ZodString;
|
|
5
5
|
description: z.ZodOptional<z.ZodString>;
|
|
6
6
|
logoURL: z.ZodOptional<z.ZodString>;
|
|
7
|
-
bannerURL: z.ZodOptional<z.ZodString>;
|
|
8
7
|
website: z.ZodOptional<z.ZodString>;
|
|
9
8
|
country: z.ZodOptional<z.ZodString>;
|
|
10
9
|
founded: z.ZodOptional<z.ZodNumber>;
|
|
@@ -18,7 +17,6 @@ export declare const brandInputSchema: z.ZodObject<{
|
|
|
18
17
|
country?: string | undefined;
|
|
19
18
|
description?: string | undefined;
|
|
20
19
|
logoURL?: string | undefined;
|
|
21
|
-
bannerURL?: string | undefined;
|
|
22
20
|
website?: string | undefined;
|
|
23
21
|
founded?: number | undefined;
|
|
24
22
|
}, {
|
|
@@ -29,7 +27,6 @@ export declare const brandInputSchema: z.ZodObject<{
|
|
|
29
27
|
isActive?: boolean | undefined;
|
|
30
28
|
displayOrder?: number | undefined;
|
|
31
29
|
logoURL?: string | undefined;
|
|
32
|
-
bannerURL?: string | undefined;
|
|
33
30
|
website?: string | undefined;
|
|
34
31
|
founded?: number | undefined;
|
|
35
32
|
}>;
|
|
@@ -38,7 +35,6 @@ export declare const brandUpdateSchema: z.ZodObject<Omit<{
|
|
|
38
35
|
slug: z.ZodOptional<z.ZodString>;
|
|
39
36
|
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
40
37
|
logoURL: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
41
|
-
bannerURL: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
42
38
|
website: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
43
39
|
country: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
44
40
|
founded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -51,7 +47,6 @@ export declare const brandUpdateSchema: z.ZodObject<Omit<{
|
|
|
51
47
|
isActive?: boolean | undefined;
|
|
52
48
|
displayOrder?: number | undefined;
|
|
53
49
|
logoURL?: string | undefined;
|
|
54
|
-
bannerURL?: string | undefined;
|
|
55
50
|
website?: string | undefined;
|
|
56
51
|
founded?: number | undefined;
|
|
57
52
|
}, {
|
|
@@ -61,7 +56,6 @@ export declare const brandUpdateSchema: z.ZodObject<Omit<{
|
|
|
61
56
|
isActive?: boolean | undefined;
|
|
62
57
|
displayOrder?: number | undefined;
|
|
63
58
|
logoURL?: string | undefined;
|
|
64
|
-
bannerURL?: string | undefined;
|
|
65
59
|
website?: string | undefined;
|
|
66
60
|
founded?: number | undefined;
|
|
67
61
|
}>;
|
|
@@ -5,7 +5,6 @@ export const brandInputSchema = z.object({
|
|
|
5
5
|
slug: z.string().min(1).regex(/^brand-[a-z0-9-]+$/, "Slug must start with 'brand-' and contain only lowercase letters, numbers, and hyphens"),
|
|
6
6
|
description: z.string().max(BRAND_DESCRIPTION_MAX_LENGTH).optional(),
|
|
7
7
|
logoURL: z.string().url().optional(),
|
|
8
|
-
bannerURL: z.string().url().optional(),
|
|
9
8
|
website: z.string().url().optional(),
|
|
10
9
|
country: z.string().optional(),
|
|
11
10
|
founded: z.number().int().min(1800).max(new Date().getFullYear()).optional(),
|
|
@@ -81,6 +81,8 @@ export declare const bundleCreateSchema: z.ZodObject<{
|
|
|
81
81
|
* "brand" — brand discovery collection; does not touch product reverse pointers.
|
|
82
82
|
*/
|
|
83
83
|
bundleKind: z.ZodEnum<["special", "brand"]>;
|
|
84
|
+
/** Which brand this bundle belongs to, for the brand page's bundle tab — distinct from bundleQueryRule.filter.brandSlug (a dynamic-rule query filter). */
|
|
85
|
+
brandSlug: z.ZodOptional<z.ZodString>;
|
|
84
86
|
bundlePrice: z.ZodNumber;
|
|
85
87
|
bundleQueryRule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
86
88
|
type: z.ZodLiteral<"static">;
|
|
@@ -185,6 +187,7 @@ export declare const bundleCreateSchema: z.ZodObject<{
|
|
|
185
187
|
} | undefined;
|
|
186
188
|
description?: string | undefined;
|
|
187
189
|
slug?: string | undefined;
|
|
190
|
+
brandSlug?: string | undefined;
|
|
188
191
|
isActive?: boolean | undefined;
|
|
189
192
|
bundleItemDetails?: {
|
|
190
193
|
productId: string;
|
|
@@ -216,6 +219,7 @@ export declare const bundleCreateSchema: z.ZodObject<{
|
|
|
216
219
|
} | undefined;
|
|
217
220
|
description?: string | undefined;
|
|
218
221
|
slug?: string | undefined;
|
|
222
|
+
brandSlug?: string | undefined;
|
|
219
223
|
isActive?: boolean | undefined;
|
|
220
224
|
bundleItemDetails?: {
|
|
221
225
|
productId: string;
|
|
@@ -226,6 +230,7 @@ export declare const bundleUpdateSchema: z.ZodObject<{
|
|
|
226
230
|
name: z.ZodOptional<z.ZodString>;
|
|
227
231
|
description: z.ZodOptional<z.ZodString>;
|
|
228
232
|
bundleKind: z.ZodOptional<z.ZodEnum<["special", "brand"]>>;
|
|
233
|
+
brandSlug: z.ZodOptional<z.ZodString>;
|
|
229
234
|
bundlePrice: z.ZodOptional<z.ZodNumber>;
|
|
230
235
|
bundleQueryRule: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
231
236
|
type: z.ZodLiteral<"static">;
|
|
@@ -311,6 +316,7 @@ export declare const bundleUpdateSchema: z.ZodObject<{
|
|
|
311
316
|
} | undefined;
|
|
312
317
|
name?: string | undefined;
|
|
313
318
|
description?: string | undefined;
|
|
319
|
+
brandSlug?: string | undefined;
|
|
314
320
|
isActive?: boolean | undefined;
|
|
315
321
|
bundleKind?: "brand" | "special" | undefined;
|
|
316
322
|
bundleProductIds?: string[] | undefined;
|
|
@@ -341,6 +347,7 @@ export declare const bundleUpdateSchema: z.ZodObject<{
|
|
|
341
347
|
} | undefined;
|
|
342
348
|
name?: string | undefined;
|
|
343
349
|
description?: string | undefined;
|
|
350
|
+
brandSlug?: string | undefined;
|
|
344
351
|
isActive?: boolean | undefined;
|
|
345
352
|
bundleKind?: "brand" | "special" | undefined;
|
|
346
353
|
bundleProductIds?: string[] | undefined;
|
|
@@ -52,6 +52,8 @@ export const bundleCreateSchema = z.object({
|
|
|
52
52
|
* "brand" — brand discovery collection; does not touch product reverse pointers.
|
|
53
53
|
*/
|
|
54
54
|
bundleKind: z.enum([BUNDLE_KIND_SPECIAL, BUNDLE_KIND_BRAND]),
|
|
55
|
+
/** Which brand this bundle belongs to, for the brand page's bundle tab — distinct from bundleQueryRule.filter.brandSlug (a dynamic-rule query filter). */
|
|
56
|
+
brandSlug: z.string().optional(),
|
|
55
57
|
bundlePrice: z.number().min(1),
|
|
56
58
|
bundleQueryRule: bundleQueryRuleSchema,
|
|
57
59
|
bundleProductIds: productIdsSchema,
|
|
@@ -64,6 +66,7 @@ export const bundleUpdateSchema = z.object({
|
|
|
64
66
|
name: z.string().min(2).max(120).optional(),
|
|
65
67
|
description: z.string().max(2000).optional(),
|
|
66
68
|
bundleKind: z.enum([BUNDLE_KIND_SPECIAL, BUNDLE_KIND_BRAND]).optional(),
|
|
69
|
+
brandSlug: z.string().optional(),
|
|
67
70
|
bundlePrice: z.number().min(1).optional(),
|
|
68
71
|
bundleQueryRule: bundleQueryRuleSchema.optional(),
|
|
69
72
|
bundleProductIds: productIdsSchema.optional(),
|
|
@@ -45,11 +45,6 @@ export declare const createOrderSchema: z.ZodObject<{
|
|
|
45
45
|
couponCode: z.ZodOptional<z.ZodString>;
|
|
46
46
|
}, "strip", z.ZodTypeAny, {
|
|
47
47
|
paymentMethod: "upi" | "razorpay" | "cod";
|
|
48
|
-
items: {
|
|
49
|
-
price: number;
|
|
50
|
-
productId: string;
|
|
51
|
-
quantity: number;
|
|
52
|
-
}[];
|
|
53
48
|
shippingAddress: {
|
|
54
49
|
country: string;
|
|
55
50
|
phone: string;
|
|
@@ -60,14 +55,14 @@ export declare const createOrderSchema: z.ZodObject<{
|
|
|
60
55
|
pincode: string;
|
|
61
56
|
addressLine2?: string | undefined;
|
|
62
57
|
};
|
|
63
|
-
couponCode?: string | undefined;
|
|
64
|
-
}, {
|
|
65
|
-
paymentMethod: "upi" | "razorpay" | "cod";
|
|
66
58
|
items: {
|
|
67
59
|
price: number;
|
|
68
60
|
productId: string;
|
|
69
61
|
quantity: number;
|
|
70
62
|
}[];
|
|
63
|
+
couponCode?: string | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
paymentMethod: "upi" | "razorpay" | "cod";
|
|
71
66
|
shippingAddress: {
|
|
72
67
|
phone: string;
|
|
73
68
|
city: string;
|
|
@@ -78,6 +73,11 @@ export declare const createOrderSchema: z.ZodObject<{
|
|
|
78
73
|
country?: string | undefined;
|
|
79
74
|
addressLine2?: string | undefined;
|
|
80
75
|
};
|
|
76
|
+
items: {
|
|
77
|
+
price: number;
|
|
78
|
+
productId: string;
|
|
79
|
+
quantity: number;
|
|
80
|
+
}[];
|
|
81
81
|
couponCode?: string | undefined;
|
|
82
82
|
}>;
|
|
83
83
|
export declare const updateOrderStatusSchema: z.ZodObject<{
|
|
@@ -7,7 +7,7 @@ export const config = {
|
|
|
7
7
|
slugPrefix: "art-",
|
|
8
8
|
cartLine: "single-product",
|
|
9
9
|
detailRoute: (idOrSlug) => String(ROUTES.PUBLIC.PRODUCT_DETAIL(idOrSlug)),
|
|
10
|
-
badge:
|
|
10
|
+
badge: { label: "Art Print", className: "bg-primary-700 text-white" },
|
|
11
11
|
priceLabel: "Price (₹)",
|
|
12
12
|
typeLabel: "Art Print",
|
|
13
13
|
showsStockQuantity: true,
|
|
@@ -7,7 +7,7 @@ export const config = {
|
|
|
7
7
|
slugPrefix: "classified-",
|
|
8
8
|
cartLine: "blocked",
|
|
9
9
|
detailRoute: (idOrSlug) => String(ROUTES.PUBLIC.CLASSIFIED_DETAIL(idOrSlug)),
|
|
10
|
-
badge:
|
|
10
|
+
badge: { label: "Classified", className: "bg-secondary text-white" },
|
|
11
11
|
priceLabel: "Asking Price (₹)",
|
|
12
12
|
typeLabel: "Classified",
|
|
13
13
|
showsStockQuantity: true,
|
|
@@ -7,7 +7,7 @@ export const config = {
|
|
|
7
7
|
slugPrefix: "digitalcode-",
|
|
8
8
|
cartLine: "single-product",
|
|
9
9
|
detailRoute: (idOrSlug) => String(ROUTES.PUBLIC.DIGITAL_CODE_DETAIL(idOrSlug)),
|
|
10
|
-
badge:
|
|
10
|
+
badge: { label: "Digital Code", className: "bg-success-surface text-success" },
|
|
11
11
|
priceLabel: "Price per Code (₹)",
|
|
12
12
|
typeLabel: "Digital Code",
|
|
13
13
|
showsStockQuantity: false,
|
|
@@ -7,7 +7,7 @@ export const config = {
|
|
|
7
7
|
slugPrefix: "live-",
|
|
8
8
|
cartLine: "single-product",
|
|
9
9
|
detailRoute: (idOrSlug) => String(ROUTES.PUBLIC.LIVE_DETAIL(idOrSlug)),
|
|
10
|
-
badge:
|
|
10
|
+
badge: { label: "Live Item", className: "bg-danger-surface text-error" },
|
|
11
11
|
priceLabel: "Price (₹)",
|
|
12
12
|
typeLabel: "Live Item",
|
|
13
13
|
showsStockQuantity: true,
|
|
@@ -7,7 +7,7 @@ export const config = {
|
|
|
7
7
|
slugPrefix: "prizedraw-",
|
|
8
8
|
cartLine: "single-product",
|
|
9
9
|
detailRoute: (idOrSlug) => String(ROUTES.PUBLIC.PRIZE_DRAW_DETAIL(idOrSlug)),
|
|
10
|
-
badge:
|
|
10
|
+
badge: { label: "Prize Draw", className: "bg-primary text-white" },
|
|
11
11
|
priceLabel: "Price (₹)",
|
|
12
12
|
typeLabel: "Prize Draw",
|
|
13
13
|
showsStockQuantity: false,
|
|
@@ -7,7 +7,7 @@ export const config = {
|
|
|
7
7
|
slugPrefix: "sticker-",
|
|
8
8
|
cartLine: "single-product",
|
|
9
9
|
detailRoute: (idOrSlug) => String(ROUTES.PUBLIC.PRODUCT_DETAIL(idOrSlug)),
|
|
10
|
-
badge:
|
|
10
|
+
badge: { label: "Sticker Sheet", className: "bg-primary-700 text-white" },
|
|
11
11
|
priceLabel: "Price (₹)",
|
|
12
12
|
typeLabel: "Stickers",
|
|
13
13
|
showsStockQuantity: true,
|