@mohasinac/appkit 4.53.1 → 4.54.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/.build-stamp.json +3 -3
- package/dist/_internal/client/theme/ThemeProvider.js +15 -1
- package/dist/_internal/server/features/auth/capabilities.js +7 -5
- package/dist/_internal/server/features/categories/price-guidance-resolve.d.ts +66 -0
- package/dist/_internal/server/features/categories/price-guidance-resolve.js +138 -0
- package/dist/_internal/server/features/checkout/actions.d.ts +22 -6
- package/dist/_internal/server/features/checkout/actions.js +96 -51
- package/dist/_internal/server/features/checkout/index.d.ts +1 -1
- package/dist/_internal/server/features/checkout/index.js +1 -1
- package/dist/_internal/server/features/checkout/supplier-identity.js +28 -6
- package/dist/_internal/server/features/orders/adapters.js +1 -3
- package/dist/_internal/server/features/price-index/market.d.ts +57 -0
- package/dist/_internal/server/features/price-index/market.js +120 -0
- package/dist/_internal/server/features/products/list-public.d.ts +12 -0
- package/dist/_internal/server/features/products/list-public.js +10 -1
- package/dist/_internal/server/features/products/listing-tab-counts.d.ts +25 -1
- package/dist/_internal/server/features/products/listing-tab-counts.js +184 -10
- package/dist/_internal/server/features/search/index-build/sources.js +43 -2
- package/dist/_internal/server/features/site-settings/adapters.js +1 -1
- package/dist/_internal/server/features/stores/adapters.d.ts +1 -1
- package/dist/_internal/server/features/stores/adapters.js +0 -1
- package/dist/_internal/server/features/stores/tabs.d.ts +7 -2
- package/dist/_internal/server/features/stores/tabs.js +5 -3
- package/dist/_internal/server/jobs/core/analyticsAlertEvaluate.js +2 -5
- package/dist/_internal/server/jobs/core/jobRunners.js +0 -10
- package/dist/_internal/server/jobs/core/onOrderCreate.js +10 -104
- package/dist/_internal/server/jobs/core/onOrderStatusChange.d.ts +0 -2
- package/dist/_internal/server/jobs/core/onOrderStatusChange.js +0 -1
- package/dist/_internal/server/jobs/core/onScamReportCreate.js +0 -1
- package/dist/_internal/server/jobs/core/onScamReportRejected.js +0 -1
- package/dist/_internal/server/jobs/core/onScamReportVerified.js +0 -1
- package/dist/_internal/server/jobs/core/paymentWindowTimeout.js +0 -1
- package/dist/_internal/server/jobs/core/pendingOrderTimeout.js +0 -1
- package/dist/_internal/server/notifications/channel-health.d.ts +7 -3
- package/dist/_internal/server/notifications/channel-health.js +2 -2
- package/dist/_internal/server/notifications/send-guard.d.ts +1 -1
- package/dist/_internal/server/notifications/send-guard.js +2 -4
- package/dist/_internal/shared/actions/action-registry.d.ts +1 -1
- package/dist/_internal/shared/actions/action-registry.js +128 -28
- package/dist/_internal/shared/checkout/order-math.d.ts +1 -1
- package/dist/_internal/shared/checkout/order-math.js +1 -1
- package/dist/_internal/shared/features/categories/bundle-copy.d.ts +1 -1
- package/dist/_internal/shared/features/checkout/config.d.ts +0 -2
- package/dist/_internal/shared/features/checkout/config.js +0 -2
- package/dist/_internal/shared/features/messaging/config.d.ts +7 -5
- package/dist/_internal/shared/features/messaging/config.js +1 -4
- package/dist/_internal/shared/features/site-settings/fees.d.ts +0 -2
- package/dist/_internal/shared/features/site-settings/fees.js +0 -2
- package/dist/_internal/shared/features/site-settings/supplier-of-record.d.ts +56 -0
- package/dist/_internal/shared/features/site-settings/supplier-of-record.js +57 -0
- package/dist/_internal/shared/fees/calculator.d.ts +0 -8
- package/dist/_internal/shared/fees/calculator.js +0 -7
- package/dist/_internal/shared/listing-types/tiers.d.ts +94 -0
- package/dist/_internal/shared/listing-types/tiers.js +150 -0
- package/dist/_internal/shared/search/match.js +28 -2
- package/dist/cli/index.js +0 -2
- package/dist/client.d.ts +25 -4
- package/dist/client.js +36 -5
- package/dist/constants/api-endpoints.d.ts +28 -15
- package/dist/constants/api-endpoints.js +14 -8
- package/dist/constants/field-names.d.ts +1 -0
- package/dist/constants/field-names.js +1 -0
- package/dist/constants/notification-types.d.ts +1 -1
- package/dist/constants/notification-types.js +1 -1
- package/dist/core/integration-keys.d.ts +5 -5
- package/dist/core/integration-keys.js +21 -10
- package/dist/features/about/components/FeesView.js +0 -6
- package/dist/features/about/components/GuidesHubView.js +15 -2
- package/dist/features/account/components/NotificationPreferencesPanel.js +3 -4
- package/dist/features/account/components/UserOrdersView.js +26 -7
- package/dist/features/account/types/index.d.ts +0 -2
- package/dist/features/addresses/utils/postal-autofill.d.ts +39 -0
- package/dist/features/addresses/utils/postal-autofill.js +54 -0
- package/dist/features/admin/actions/notification-actions.d.ts +2 -8
- package/dist/features/admin/actions/notification-actions.js +9 -104
- package/dist/features/admin/components/AdminGuideHubView.js +1 -8
- package/dist/features/admin/components/AdminOrderEditorView.d.ts +1 -1
- package/dist/features/admin/components/AdminOrdersView.js +0 -2
- package/dist/features/admin/components/AdminSectionsView.js +3 -2
- package/dist/features/admin/components/AdminSiteSettingsView.js +22 -68
- package/dist/features/admin/components/AdminStoreEditorView.js +72 -34
- package/dist/features/admin/components/OwnerQuickActions.d.ts +29 -0
- package/dist/features/admin/components/OwnerQuickActions.js +142 -0
- package/dist/features/admin/components/sections/adminSectionsTypes.js +13 -4
- package/dist/features/admin/components/sections/icon-options.d.ts +21 -0
- package/dist/features/admin/components/sections/icon-options.js +23 -0
- package/dist/features/admin/components/sections/sectionTemplates.js +4 -1
- package/dist/features/admin/constants/site-settings-tabs.d.ts +7 -12
- package/dist/features/admin/constants/site-settings-tabs.js +6 -12
- package/dist/features/admin/repository/site-settings.repository.js +1 -1
- package/dist/features/admin/schemas/admin-editor-forms.d.ts +1 -1
- package/dist/features/admin/schemas/admin-editor-forms.js +4 -1
- package/dist/features/admin/schemas/admin-user-form.d.ts +0 -61
- package/dist/features/admin/schemas/admin-user-form.js +3 -44
- package/dist/features/admin/schemas/firestore.d.ts +28 -54
- package/dist/features/admin/schemas/firestore.js +40 -18
- package/dist/features/auctions/components/AuctionDetailPageView.js +12 -10
- package/dist/features/auctions/components/MarketplaceAuctionCard.d.ts +11 -1
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +9 -2
- package/dist/features/auth/checkout-value-otp.d.ts +1 -1
- package/dist/features/auth/checkout-value-otp.js +1 -1
- package/dist/features/auth/permissions/constants.d.ts +29 -2
- package/dist/features/auth/permissions/constants.js +67 -1
- package/dist/features/blog/components/BlogFeaturedCard.d.ts +11 -1
- package/dist/features/blog/components/BlogFeaturedCard.js +9 -2
- package/dist/features/cart/components/CartDrawer.js +3 -2
- package/dist/features/cart/components/CartGroupLineRow.js +2 -1
- package/dist/features/cart/components/CartPriceBreakdown.d.ts +0 -2
- package/dist/features/cart/components/CartPriceBreakdown.js +1 -1
- package/dist/features/cart/components/StoreAddonsPicker.d.ts +2 -5
- package/dist/features/cart/components/StoreAddonsPicker.js +4 -5
- package/dist/features/cart/hooks/useAddToCart.js +10 -5
- package/dist/features/cart/repository/cart.repository.js +1 -2
- package/dist/features/cart/schemas/firestore.d.ts +1 -2
- package/dist/features/cart/utils/pending-ops.d.ts +11 -1
- package/dist/features/cart/utils/pending-ops.js +14 -2
- package/dist/features/categories/api/[id]/price-guidance/route.js +1 -24
- package/dist/features/categories/components/BrandDetailPageView.js +15 -6
- package/dist/features/categories/components/BrandDetailTabs.d.ts +7 -1
- package/dist/features/categories/components/BrandDetailTabs.js +18 -3
- package/dist/features/categories/components/BundleCollage.js +3 -2
- package/dist/features/categories/components/BundleDetailView.js +2 -1
- package/dist/features/categories/components/BundleItemsPicker.js +3 -4
- package/dist/features/categories/components/CategoryDetailPageView.js +19 -8
- package/dist/features/categories/components/CategoryDetailTabs.d.ts +7 -1
- package/dist/features/categories/components/CategoryDetailTabs.js +29 -7
- package/dist/features/categories/components/CategoryGrid.d.ts +11 -1
- package/dist/features/categories/components/CategoryGrid.js +9 -2
- package/dist/features/checkout/actions/checkout-value-otp-actions.d.ts +10 -5
- package/dist/features/checkout/actions/checkout-value-otp-actions.js +2 -88
- package/dist/features/classified/components/ClassifiedDetailPageView.js +12 -2
- package/dist/features/digital-codes/components/DigitalCodeDetailPageView.js +12 -2
- package/dist/features/events/components/EventCard.d.ts +11 -1
- package/dist/features/events/components/EventCard.js +9 -2
- package/dist/features/grouped/components/GroupedListingDetailView.js +3 -1
- package/dist/features/homepage/components/CTABannerSection.d.ts +3 -1
- package/dist/features/homepage/components/CTABannerSection.js +6 -3
- package/dist/features/homepage/components/HeroCarousel.js +8 -6
- package/dist/features/homepage/components/MarketplaceHomepageView.js +33 -7
- package/dist/features/homepage/components/SectionCarousel.js +13 -5
- package/dist/features/homepage/components/SecurityHighlightsSection.d.ts +8 -3
- package/dist/features/homepage/components/SecurityHighlightsSection.js +2 -2
- package/dist/features/homepage/components/StatsCounterSection.d.ts +9 -4
- package/dist/features/homepage/components/StatsCounterSection.js +2 -2
- package/dist/features/homepage/components/TestimonialsCarousel.js +1 -1
- package/dist/features/homepage/components/TrustFeaturesSection.d.ts +18 -4
- package/dist/features/homepage/components/TrustFeaturesSection.js +5 -5
- package/dist/features/homepage/components/WelcomeSection.d.ts +13 -2
- package/dist/features/homepage/components/WelcomeSection.js +3 -3
- package/dist/features/homepage/components/WhatsAppCommunitySection.d.ts +28 -0
- package/dist/features/homepage/components/WhatsAppCommunitySection.js +42 -6
- package/dist/features/homepage/components/WhatsAppGlyph.d.ts +20 -0
- package/dist/features/homepage/components/WhatsAppGlyph.js +20 -0
- package/dist/features/homepage/constants/hero-carousel-styles.d.ts +8 -6
- package/dist/features/homepage/constants/hero-carousel-styles.js +8 -6
- package/dist/features/homepage/constants/section-copy.d.ts +12 -10
- package/dist/features/homepage/constants/section-copy.js +28 -6
- package/dist/features/homepage/constants/stat-icons.d.ts +12 -0
- package/dist/features/homepage/constants/stat-icons.js +17 -0
- package/dist/features/homepage/constants/trust-icon-aliases.d.ts +8 -0
- package/dist/features/homepage/constants/trust-icon-aliases.js +75 -0
- package/dist/features/homepage/lib/section-defaults.d.ts +16 -1
- package/dist/features/homepage/lib/section-defaults.js +24 -4
- package/dist/features/homepage/lib/section-renderer.js +48 -8
- package/dist/features/homepage/schemas/firestore.d.ts +18 -1
- package/dist/features/layout/AppLayoutShell.js +2 -1
- package/dist/features/layout/BottomActions.d.ts +1 -0
- package/dist/features/layout/BottomActions.js +330 -0
- package/dist/features/layout/BottomChrome.d.ts +45 -0
- package/dist/features/layout/BottomChrome.js +5 -17
- package/dist/features/layout/SideActionDock.js +36 -13
- package/dist/features/layout/index.d.ts +2 -7
- package/dist/features/layout/index.js +7 -7
- package/dist/features/layout/useIsDesktop.d.ts +36 -0
- package/dist/features/layout/useIsDesktop.js +48 -0
- package/dist/features/live/components/LiveItemDetailPageView.js +12 -2
- package/dist/features/orders/actions/refund-actions.js +0 -1
- package/dist/features/orders/components/OrderAddonBadges.d.ts +1 -3
- package/dist/features/orders/components/OrderAddonBadges.js +3 -4
- package/dist/features/orders/components/OrderPaymentSummary.js +15 -2
- package/dist/features/orders/components/YourPurchaseStrip.d.ts +24 -0
- package/dist/features/orders/components/YourPurchaseStrip.js +77 -0
- package/dist/features/orders/components/index.d.ts +2 -1
- package/dist/features/orders/components/index.js +1 -1
- package/dist/features/orders/repository/orders.repository.d.ts +0 -8
- package/dist/features/orders/repository/orders.repository.js +0 -2
- package/dist/features/orders/schemas/firestore.d.ts +17 -9
- package/dist/features/orders/types/index.d.ts +2 -5
- package/dist/features/orders/utils/order-announcement-message.d.ts +18 -0
- package/dist/features/orders/utils/order-announcement-message.js +16 -0
- package/dist/features/orders/utils/payment-proof-message.d.ts +20 -0
- package/dist/features/orders/utils/payment-proof-message.js +17 -0
- package/dist/features/parts/components/PartDetailPageView.js +96 -1
- package/dist/features/parts/schemas/firestore.d.ts +247 -0
- package/dist/features/parts/schemas/firestore.js +6 -6
- package/dist/features/pre-orders/components/MarketplacePreorderCard.d.ts +11 -1
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +10 -3
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +12 -10
- package/dist/features/price-index/components/PriceIndexToolView.d.ts +21 -0
- package/dist/features/price-index/components/PriceIndexToolView.js +230 -27
- package/dist/features/price-index/lookup-target.d.ts +48 -0
- package/dist/features/price-index/lookup-target.js +107 -0
- package/dist/features/products/api/[id]/route.js +8 -1
- package/dist/features/products/api/route.js +16 -4
- package/dist/features/products/components/AvailabilityScopeHint.d.ts +22 -0
- package/dist/features/products/components/AvailabilityScopeHint.js +27 -0
- package/dist/features/products/components/CompareOverlay.d.ts +2 -1
- package/dist/features/products/components/CompareOverlay.js +2 -1
- package/dist/features/products/components/GroupSettingsPanel.js +2 -1
- package/dist/features/products/components/InteractiveProductCard.d.ts +7 -1
- package/dist/features/products/components/InteractiveProductCard.js +16 -4
- package/dist/features/products/components/MarketplaceBundleCard.d.ts +11 -1
- package/dist/features/products/components/MarketplaceBundleCard.js +9 -2
- package/dist/features/products/components/MarketplacePrizeDrawCard.d.ts +11 -1
- package/dist/features/products/components/MarketplacePrizeDrawCard.js +9 -2
- package/dist/features/products/components/PrizeDrawDetailPageView.js +2 -1
- package/dist/features/products/components/ProductDetailPageView.js +34 -4
- package/dist/features/products/components/ProductGrid.d.ts +14 -1
- package/dist/features/products/components/ProductGrid.js +22 -5
- package/dist/features/products/components/ProductsIndexListing.js +2 -2
- package/dist/features/products/components/SublistingCarouselSection.js +2 -1
- package/dist/features/products/repository/products.repository.d.ts +1 -0
- package/dist/features/products/repository/products.repository.js +5 -1
- package/dist/features/products/utils/group-member-image.d.ts +9 -2
- package/dist/features/products/utils/group-member-image.js +2 -1
- package/dist/features/reviews/api/[id]/route.js +83 -23
- package/dist/features/reviews/components/PurchaseReviewAffordance.d.ts +6 -0
- package/dist/features/reviews/components/PurchaseReviewAffordance.js +42 -0
- package/dist/features/reviews/components/ReviewFormDrawer.d.ts +34 -0
- package/dist/features/reviews/components/ReviewFormDrawer.js +127 -0
- package/dist/features/reviews/components/index.d.ts +4 -0
- package/dist/features/reviews/components/index.js +2 -0
- package/dist/features/scams/schemas/index.d.ts +10 -10
- package/dist/features/search/action-index/settings-entries.js +0 -9
- package/dist/features/seller/actions/seller-actions.d.ts +1 -1
- package/dist/features/seller/actions/seller-actions.js +49 -3
- package/dist/features/seller/components/SellerPayoutSettingsView.js +30 -2
- package/dist/features/seller/components/SellerProductShell.d.ts +17 -1
- package/dist/features/seller/components/SellerProductsView.js +3 -2
- package/dist/features/seller/hooks/useStoreListingEntitlements.d.ts +8 -0
- package/dist/features/seller/hooks/useStoreListingEntitlements.js +70 -0
- package/dist/features/store-extensions/repository/store-extensions.repositories.d.ts +1 -6
- package/dist/features/store-extensions/repository/store-extensions.repositories.js +1 -10
- package/dist/features/store-extensions/schemas/firestore.d.ts +1 -17
- package/dist/features/store-extensions/schemas/firestore.js +0 -10
- package/dist/features/stores/components/InteractiveStoreCard.d.ts +11 -1
- package/dist/features/stores/components/InteractiveStoreCard.js +9 -2
- package/dist/features/stores/components/StoreAuctionsListing.js +2 -1
- package/dist/features/stores/components/StoreCapabilitiesGuideView.js +0 -1
- package/dist/features/stores/components/StoreGuideHubView.js +2 -8
- package/dist/features/stores/components/StoreSettingsGuideView.js +2 -6
- package/dist/features/stores/components/index.d.ts +0 -2
- package/dist/features/stores/components/index.js +0 -1
- package/dist/features/stores/repository/store.repository.d.ts +1 -26
- package/dist/features/stores/repository/store.repository.js +5 -60
- package/dist/features/stores/schemas/firestore.d.ts +6 -25
- package/dist/features/stores/schemas/firestore.js +6 -3
- package/dist/features/stores/schemas/index.d.ts +1 -87
- package/dist/features/stores/schemas/index.js +10 -15
- package/dist/features/tester/seed-data/authored/admin__site-system.js +0 -48
- package/dist/features/tester/seed-data/authored/buying__buying-checkout.js +0 -40
- package/dist/features/tester/seed-data/authored/content-discovery__authenticity-checker.js +114 -2
- package/dist/features/tester/seed-data/authored/selling__quick-add-minimum-details.js +0 -16
- package/dist/features/tester/seed-data/authored/selling__seller-guide.js +1 -1
- package/dist/features/tester/seed-data/authored/selling__seller-marketing-extras.js +0 -79
- package/dist/features/tester/seed-data/authored/selling__seller-orders.js +1 -1
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +427 -69
- package/dist/index.d.ts +20 -32
- package/dist/index.js +34 -43
- package/dist/next/routing/route-map.d.ts +2 -8
- package/dist/next/routing/route-map.js +21 -4
- package/dist/providers/db-firebase/base.repository.d.ts +1 -1
- package/dist/providers/db-firebase/base.repository.js +1 -1
- package/dist/providers/payment-razorpay/index.d.ts +125 -0
- package/dist/providers/payment-razorpay/index.js +232 -0
- package/dist/providers/payment-razorpay/signature.d.ts +53 -0
- package/dist/providers/payment-razorpay/signature.js +71 -0
- package/dist/providers/shipping-shiprocket/index.d.ts +98 -0
- package/dist/providers/shipping-shiprocket/index.js +356 -0
- package/dist/providers.d.ts +3 -0
- package/dist/providers.js +3 -0
- package/dist/react/hooks/useCanSeePrices.d.ts +0 -27
- package/dist/react/hooks/useCanSeePrices.js +25 -0
- package/dist/repositories/index.d.ts +1 -1
- package/dist/repositories/index.js +1 -1
- package/dist/schemas/registry.d.ts +10 -115
- package/dist/schemas/registry.js +1 -2
- package/dist/security/pii-encrypt.js +1 -1
- package/dist/seed/_helpers/category-forest.js +27 -0
- package/dist/seed/_helpers/category-parts-glossary-map.js +1816 -86
- package/dist/seed/_helpers/category-parts.d.ts +1 -1
- package/dist/seed/_helpers/category-parts.js +13412 -3020
- package/dist/seed/carousel-slides-seed-data.js +47 -10
- package/dist/seed/categories-seed-data.js +48 -6
- package/dist/seed/faq-seed-data.js +2 -2
- package/dist/seed/homepage-sections-seed-data.js +286 -54
- package/dist/seed/index.d.ts +1 -1
- package/dist/seed/index.js +1 -1
- package/dist/seed/manifest.d.ts +1 -1
- package/dist/seed/manifest.js +1 -2
- package/dist/seed/model-composition-seed-data.js +6 -8
- package/dist/seed/part-glossary/chunk0.d.ts +9 -0
- package/dist/seed/part-glossary/chunk0.js +35448 -0
- package/dist/seed/part-glossary/chunk1.d.ts +9 -0
- package/dist/seed/part-glossary/chunk1.js +40494 -0
- package/dist/seed/part-glossary/chunk2.d.ts +9 -0
- package/dist/seed/part-glossary/chunk2.js +51242 -0
- package/dist/seed/part-glossary/chunk3.d.ts +9 -0
- package/dist/seed/part-glossary/chunk3.js +53337 -0
- package/dist/seed/part-glossary/chunk4.d.ts +9 -0
- package/dist/seed/part-glossary/chunk4.js +51454 -0
- package/dist/seed/part-glossary-seed-data.d.ts +1 -1
- package/dist/seed/part-glossary-seed-data.js +23 -47483
- package/dist/seed/products-beyblade-x-seed-data.js +36 -1
- package/dist/seed/site-settings-seed-data.js +34 -35
- package/dist/seed/store-extensions-seed-data.d.ts +1 -2
- package/dist/seed/store-extensions-seed-data.js +1 -23
- package/dist/seed/stores-seed-data.js +0 -1
- package/dist/server-entry.d.ts +1 -1
- package/dist/server-entry.js +1 -1
- package/dist/server.d.ts +10 -10
- package/dist/server.js +24 -22
- package/dist/styles.css +392 -43
- package/dist/tailwind-utilities.css +1 -1
- package/dist/tokens/themes/default-dark.js +1 -1
- package/dist/tokens/themes/default-light.js +2 -1
- package/dist/tokens/tokens.css +6 -2
- package/dist/ui/components/Button.d.ts +11 -0
- package/dist/ui/components/Button.js +11 -0
- package/dist/ui/components/Button.style.css +29 -0
- package/dist/ui/components/CarouselNav.d.ts +57 -0
- package/dist/ui/components/CarouselNav.js +25 -0
- package/dist/ui/components/CarouselNav.style.css +265 -0
- package/dist/ui/components/GatedPrice.js +30 -3
- package/dist/ui/components/GatedPrice.style.css +43 -40
- package/dist/ui/components/HorizontalScroller.d.ts +12 -1
- package/dist/ui/components/HorizontalScroller.js +43 -3
- package/dist/ui/components/ImageMosaic.d.ts +8 -1
- package/dist/ui/components/ImageMosaic.js +3 -2
- package/dist/ui/components/ImageMosaic.style.css +22 -0
- package/dist/ui/components/Layout.style.css +6 -0
- package/dist/ui/components/Semantic.d.ts +3 -2
- package/dist/ui/components/Semantic.js +1 -0
- package/dist/ui/components/Typography.d.ts +2 -0
- package/dist/ui/components/Typography.js +2 -0
- package/dist/ui/components/Typography.style.css +19 -0
- package/dist/ui/components/index.style.css +1 -0
- package/dist/ui/index.d.ts +3 -1
- package/dist/ui/index.js +4 -0
- package/package.json +3 -2
- package/scripts/seed-cli.mjs +133 -27
- package/dist/_internal/server/jobs/core/whatsappCatalogImport.d.ts +0 -27
- package/dist/_internal/server/jobs/core/whatsappCatalogImport.js +0 -172
- package/dist/_internal/server/jobs/core/whatsappNotify.d.ts +0 -35
- package/dist/_internal/server/jobs/core/whatsappNotify.js +0 -140
- package/dist/features/admin/components/AdminWhatsAppGuideView.d.ts +0 -2
- package/dist/features/admin/components/AdminWhatsAppGuideView.js +0 -35
- package/dist/features/orders/components/MarketplaceOrderCard.d.ts +0 -36
- package/dist/features/orders/components/MarketplaceOrderCard.js +0 -57
- package/dist/features/stores/components/StoreWhatsAppGuideView.d.ts +0 -3
- package/dist/features/stores/components/StoreWhatsAppGuideView.js +0 -12
- package/dist/features/whatsapp-bot/api/send-status/route.d.ts +0 -12
- package/dist/features/whatsapp-bot/api/send-status/route.js +0 -38
- package/dist/features/whatsapp-bot/api/webhook/route.d.ts +0 -12
- package/dist/features/whatsapp-bot/api/webhook/route.js +0 -43
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.d.ts +0 -6
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +0 -270
- package/dist/features/whatsapp-bot/components/WhatsAppChatButton.d.ts +0 -9
- package/dist/features/whatsapp-bot/components/WhatsAppChatButton.js +0 -7
- package/dist/features/whatsapp-bot/components/index.d.ts +0 -3
- package/dist/features/whatsapp-bot/components/index.js +0 -2
- package/dist/features/whatsapp-bot/helpers/payment-proof-message.d.ts +0 -14
- package/dist/features/whatsapp-bot/helpers/payment-proof-message.js +0 -17
- package/dist/features/whatsapp-bot/helpers/whatsapp.d.ts +0 -52
- package/dist/features/whatsapp-bot/helpers/whatsapp.js +0 -283
- package/dist/features/whatsapp-bot/index.d.ts +0 -3
- package/dist/features/whatsapp-bot/index.js +0 -3
- package/dist/features/whatsapp-bot/manifest.d.ts +0 -2
- package/dist/features/whatsapp-bot/manifest.js +0 -13
- package/dist/features/whatsapp-bot/messages/en.json +0 -7
- package/dist/features/whatsapp-bot/server.d.ts +0 -7
- package/dist/features/whatsapp-bot/server.js +0 -7
- package/dist/features/whatsapp-bot/types/index.d.ts +0 -126
- package/dist/features/whatsapp-bot/types/index.js +0 -1
package/dist/.build-stamp.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"stampVersion": 1,
|
|
3
|
-
"version": "4.
|
|
4
|
-
"head": "
|
|
3
|
+
"version": "4.54.0",
|
|
4
|
+
"head": "9acce85ff44a5e7a1d6110bedceb5f29dc0e999c",
|
|
5
5
|
"branch": "main",
|
|
6
6
|
"dirty": false,
|
|
7
|
-
"builtAt": "2026-10-
|
|
7
|
+
"builtAt": "2026-10-20T05:45:17.216Z"
|
|
8
8
|
}
|
|
@@ -20,7 +20,21 @@ function readModePreference() {
|
|
|
20
20
|
catch (_err) {
|
|
21
21
|
void normalizeError(_err); /* localStorage unavailable in privacy/iframe context */
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
/*
|
|
24
|
+
* 🛑 LIGHT, not "auto" — a product decision, not a technical one.
|
|
25
|
+
*
|
|
26
|
+
* "auto" follows `prefers-color-scheme`, and most phones and an increasing
|
|
27
|
+
* share of desktops now report dark. That made dark the de-facto default
|
|
28
|
+
* for a storefront whose product photography is shot on white: every
|
|
29
|
+
* listing tile rendered a bright cut-out against a near-black card, which
|
|
30
|
+
* is the opposite of how the catalogue was designed to read.
|
|
31
|
+
*
|
|
32
|
+
* This changes the DEFAULT only. A visitor who has chosen either mode has
|
|
33
|
+
* "light"/"dark"/"auto" in localStorage and is returned above, untouched —
|
|
34
|
+
* including anyone who deliberately picked "auto". The dark theme itself is
|
|
35
|
+
* unchanged and one click away.
|
|
36
|
+
*/
|
|
37
|
+
return "light";
|
|
24
38
|
}
|
|
25
39
|
function resolveEffectiveMode(preference) {
|
|
26
40
|
if (preference === "light" || preference === "dark")
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Call this server-side only — never trust client-provided capability arrays.
|
|
6
6
|
*/
|
|
7
7
|
import { storeRepository } from "../../../../repositories/index.js";
|
|
8
|
-
import { DEFAULT_STORE_CAPABILITIES, } from "../../../../features/auth/permissions/constants.js";
|
|
8
|
+
import { DEFAULT_STORE_CAPABILITIES, resolveStoreCapabilities, } from "../../../../features/auth/permissions/constants.js";
|
|
9
9
|
/**
|
|
10
10
|
* Return the resolved capability set for a store.
|
|
11
11
|
* Falls back to DEFAULT_STORE_CAPABILITIES when the store has no capabilities field.
|
|
@@ -16,10 +16,12 @@ export async function getStoreCapabilities(storeId) {
|
|
|
16
16
|
const store = await storeRepository.findById(storeId);
|
|
17
17
|
if (!store)
|
|
18
18
|
return [...DEFAULT_STORE_CAPABILITIES];
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
/*
|
|
20
|
+
* The merge itself lives in `resolveStoreCapabilities` so a caller holding
|
|
21
|
+
* the store document already can run the same rule without a second read.
|
|
22
|
+
* This function is now just "fetch, then resolve".
|
|
23
|
+
*/
|
|
24
|
+
return resolveStoreCapabilities(store.capabilities);
|
|
23
25
|
}
|
|
24
26
|
/**
|
|
25
27
|
* Check whether a store has a specific capability.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { CategoryPriceGuidance } from "../../../../features/categories/schemas/category-content";
|
|
2
|
+
/**
|
|
3
|
+
* How far up the chain to look.
|
|
4
|
+
*
|
|
5
|
+
* `parentIds` holds the FULL ancestor chain (CLAUDE.md § "Category Tree"), and
|
|
6
|
+
* the forest is four tiers, so eight is slack rather than a limit. It exists so
|
|
7
|
+
* a malformed chain cannot turn one lookup into an unbounded read.
|
|
8
|
+
*/
|
|
9
|
+
export declare const MAX_GUIDANCE_ANCESTORS = 8;
|
|
10
|
+
/** The fields of a category document this resolution reads. */
|
|
11
|
+
export interface GuidanceLeafDoc {
|
|
12
|
+
id?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
parentIds?: string[];
|
|
15
|
+
productDefaults?: {
|
|
16
|
+
priceGuidance?: CategoryPriceGuidance;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A resolved band together with WHERE it came from.
|
|
21
|
+
*
|
|
22
|
+
* 🛑 The provenance is not decoration, and a caller that drops it will
|
|
23
|
+
* misattribute. `MARKET_BANDS` is keyed on era and part leaves, never on the
|
|
24
|
+
* ~216 named-model leaves, so a model lookup almost always resolves an
|
|
25
|
+
* ancestor's band — "typical for Burst DB" is a true statement about the data
|
|
26
|
+
* and "typical for Rage Longinus" is not. A renderer needs to be able to say
|
|
27
|
+
* which one it is showing.
|
|
28
|
+
*/
|
|
29
|
+
export interface ResolvedGuidance {
|
|
30
|
+
guidance: CategoryPriceGuidance;
|
|
31
|
+
/** The node the band was read off — the leaf itself, or an ancestor. */
|
|
32
|
+
fromCategoryId: string;
|
|
33
|
+
fromName?: string;
|
|
34
|
+
/** `false` when the leaf carried its own band. */
|
|
35
|
+
inherited: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Nearest-first ancestor walk for one leaf.
|
|
39
|
+
*
|
|
40
|
+
* The leaf's own band wins; only a leaf with none falls back to the nearest
|
|
41
|
+
* ancestor that has one.
|
|
42
|
+
*
|
|
43
|
+
* 🛑 ONE bounded `findByIds`, never a sequential walk. A seller form hits this
|
|
44
|
+
* on every category change, and paying up to eight round trips for a hint is
|
|
45
|
+
* how a hint becomes the slowest thing on the page.
|
|
46
|
+
*
|
|
47
|
+
* 🛑 `parentIds` is stored ROOT-FIRST, so it is reversed to walk nearest-first.
|
|
48
|
+
* Walking it as stored would hand a model leaf the ROOT's band — and since the
|
|
49
|
+
* root carries a tax default but no market band, that would usually resolve to
|
|
50
|
+
* nothing and read as "no data" for a leaf whose era has a measured band.
|
|
51
|
+
*/
|
|
52
|
+
export declare function resolveInheritedGuidance(leaf: GuidanceLeafDoc): Promise<CategoryPriceGuidance | undefined>;
|
|
53
|
+
/**
|
|
54
|
+
* The same resolution for MANY leaves, in two batched reads total.
|
|
55
|
+
*
|
|
56
|
+
* Read 1 fetches the leaves; read 2 fetches the UNION of every ancestor id
|
|
57
|
+
* none of them resolved locally. A per-leaf `resolveInheritedGuidance` would be
|
|
58
|
+
* N+1 reads against Rule #6's ~3-round-trip budget, and the tool resolves up to
|
|
59
|
+
* `PRICE_INDEX_SEARCH_LIMIT` leaves at once.
|
|
60
|
+
*
|
|
61
|
+
* Leaves that resolve to nothing are ABSENT from the returned map rather than
|
|
62
|
+
* present with `undefined` — the caller distinguishes "no band applies here"
|
|
63
|
+
* from "this id does not exist", and both are legitimate answers it must be
|
|
64
|
+
* able to tell apart.
|
|
65
|
+
*/
|
|
66
|
+
export declare function resolveInheritedGuidanceMany(ids: readonly string[]): Promise<Map<string, ResolvedGuidance>>;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* WHY: Two surfaces now need "the price guidance that applies to this leaf":
|
|
3
|
+
* the seller form's hint (`/api/categories/[id]/price-guidance`) and the
|
|
4
|
+
* public realised-price tool's gated market half
|
|
5
|
+
* (`/api/tools/price-index/market`). The ancestor walk was written
|
|
6
|
+
* privately inside the first of those, which is exactly the shape Root
|
|
7
|
+
* Cause #75 describes — a rule reachable by copy-paste gets copied, and
|
|
8
|
+
* the copy never learns about the branch added later.
|
|
9
|
+
* WHAT: The nearest-first inherited `priceGuidance` resolution, for one leaf
|
|
10
|
+
* and for many, in one place.
|
|
11
|
+
*
|
|
12
|
+
* EXPORTS:
|
|
13
|
+
* MAX_GUIDANCE_ANCESTORS — the walk bound
|
|
14
|
+
* ResolvedGuidance — a band PLUS which node it came from
|
|
15
|
+
* resolveInheritedGuidance — one leaf document -> its applicable guidance
|
|
16
|
+
* resolveInheritedGuidanceMany — N leaf ids -> a Map, two batched reads
|
|
17
|
+
*
|
|
18
|
+
* 🛑 Why a leaf's OWN band wins. `MARKET_BANDS` is keyed on era / part /
|
|
19
|
+
* launcher / stadium leaves (`category-burst-db`, `category-metal-energy-rings`),
|
|
20
|
+
* never on the ~216 named-model leaves — the crawl measured a generation,
|
|
21
|
+
* not a bey. So a model leaf has no band of its own and inherits its era's,
|
|
22
|
+
* which is the whole reason this walk exists rather than a direct read.
|
|
23
|
+
*
|
|
24
|
+
* @tag domain:categories
|
|
25
|
+
* @tag layer:server
|
|
26
|
+
* @tag pattern:resolver
|
|
27
|
+
* @tag access:server-only
|
|
28
|
+
* @tag consumers:categories/api/[id]/price-guidance,price-index/market
|
|
29
|
+
* @tag sideEffects:none
|
|
30
|
+
*/
|
|
31
|
+
import { categoriesRepository } from "../../../../features/categories/repository/categories.repository.js";
|
|
32
|
+
/**
|
|
33
|
+
* How far up the chain to look.
|
|
34
|
+
*
|
|
35
|
+
* `parentIds` holds the FULL ancestor chain (CLAUDE.md § "Category Tree"), and
|
|
36
|
+
* the forest is four tiers, so eight is slack rather than a limit. It exists so
|
|
37
|
+
* a malformed chain cannot turn one lookup into an unbounded read.
|
|
38
|
+
*/
|
|
39
|
+
export const MAX_GUIDANCE_ANCESTORS = 8;
|
|
40
|
+
/**
|
|
41
|
+
* Nearest-first ancestor walk for one leaf.
|
|
42
|
+
*
|
|
43
|
+
* The leaf's own band wins; only a leaf with none falls back to the nearest
|
|
44
|
+
* ancestor that has one.
|
|
45
|
+
*
|
|
46
|
+
* 🛑 ONE bounded `findByIds`, never a sequential walk. A seller form hits this
|
|
47
|
+
* on every category change, and paying up to eight round trips for a hint is
|
|
48
|
+
* how a hint becomes the slowest thing on the page.
|
|
49
|
+
*
|
|
50
|
+
* 🛑 `parentIds` is stored ROOT-FIRST, so it is reversed to walk nearest-first.
|
|
51
|
+
* Walking it as stored would hand a model leaf the ROOT's band — and since the
|
|
52
|
+
* root carries a tax default but no market band, that would usually resolve to
|
|
53
|
+
* nothing and read as "no data" for a leaf whose era has a measured band.
|
|
54
|
+
*/
|
|
55
|
+
export async function resolveInheritedGuidance(leaf) {
|
|
56
|
+
if (leaf.productDefaults?.priceGuidance)
|
|
57
|
+
return leaf.productDefaults.priceGuidance;
|
|
58
|
+
const parentIds = (leaf.parentIds ?? []).slice(0, MAX_GUIDANCE_ANCESTORS);
|
|
59
|
+
if (parentIds.length === 0)
|
|
60
|
+
return undefined;
|
|
61
|
+
const nearestFirst = [...parentIds].reverse();
|
|
62
|
+
const ancestors = await categoriesRepository.findByIds(nearestFirst);
|
|
63
|
+
const byId = new Map(ancestors.map((a) => [a.id, a]));
|
|
64
|
+
for (const pid of nearestFirst) {
|
|
65
|
+
const guidance = byId.get(pid)?.productDefaults?.priceGuidance;
|
|
66
|
+
if (guidance)
|
|
67
|
+
return guidance;
|
|
68
|
+
}
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The same resolution for MANY leaves, in two batched reads total.
|
|
73
|
+
*
|
|
74
|
+
* Read 1 fetches the leaves; read 2 fetches the UNION of every ancestor id
|
|
75
|
+
* none of them resolved locally. A per-leaf `resolveInheritedGuidance` would be
|
|
76
|
+
* N+1 reads against Rule #6's ~3-round-trip budget, and the tool resolves up to
|
|
77
|
+
* `PRICE_INDEX_SEARCH_LIMIT` leaves at once.
|
|
78
|
+
*
|
|
79
|
+
* Leaves that resolve to nothing are ABSENT from the returned map rather than
|
|
80
|
+
* present with `undefined` — the caller distinguishes "no band applies here"
|
|
81
|
+
* from "this id does not exist", and both are legitimate answers it must be
|
|
82
|
+
* able to tell apart.
|
|
83
|
+
*/
|
|
84
|
+
export async function resolveInheritedGuidanceMany(ids) {
|
|
85
|
+
const out = new Map();
|
|
86
|
+
const unique = [...new Set(ids.filter((id) => typeof id === "string" && id.length > 0))];
|
|
87
|
+
if (unique.length === 0)
|
|
88
|
+
return out;
|
|
89
|
+
const leaves = (await categoriesRepository.getManyByIds(unique));
|
|
90
|
+
/*
|
|
91
|
+
* Everything still unanswered after the leaves' own bands, paired with the
|
|
92
|
+
* nearest-first chain it needs — collected before the second read so that
|
|
93
|
+
* read is one call for every leaf at once.
|
|
94
|
+
*/
|
|
95
|
+
const pending = [];
|
|
96
|
+
const wanted = new Set();
|
|
97
|
+
for (const leaf of leaves) {
|
|
98
|
+
const id = leaf.id;
|
|
99
|
+
if (!id)
|
|
100
|
+
continue;
|
|
101
|
+
const own = leaf.productDefaults?.priceGuidance;
|
|
102
|
+
if (own) {
|
|
103
|
+
out.set(id, {
|
|
104
|
+
guidance: own,
|
|
105
|
+
fromCategoryId: id,
|
|
106
|
+
...(leaf.name ? { fromName: leaf.name } : {}),
|
|
107
|
+
inherited: false,
|
|
108
|
+
});
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
const chain = [...(leaf.parentIds ?? []).slice(0, MAX_GUIDANCE_ANCESTORS)].reverse();
|
|
112
|
+
if (chain.length === 0)
|
|
113
|
+
continue;
|
|
114
|
+
pending.push({ id, chain });
|
|
115
|
+
for (const pid of chain)
|
|
116
|
+
wanted.add(pid);
|
|
117
|
+
}
|
|
118
|
+
if (pending.length === 0)
|
|
119
|
+
return out;
|
|
120
|
+
const ancestors = (await categoriesRepository.findByIds([...wanted]));
|
|
121
|
+
const byId = new Map(ancestors.filter((a) => a.id).map((a) => [a.id, a]));
|
|
122
|
+
for (const { id, chain } of pending) {
|
|
123
|
+
for (const pid of chain) {
|
|
124
|
+
const ancestor = byId.get(pid);
|
|
125
|
+
const guidance = ancestor?.productDefaults?.priceGuidance;
|
|
126
|
+
if (guidance) {
|
|
127
|
+
out.set(id, {
|
|
128
|
+
guidance,
|
|
129
|
+
fromCategoryId: pid,
|
|
130
|
+
...(ancestor?.name ? { fromName: ancestor.name } : {}),
|
|
131
|
+
inherited: true,
|
|
132
|
+
});
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return out;
|
|
138
|
+
}
|
|
@@ -113,7 +113,6 @@ export interface CheckoutPricingPreviewStore {
|
|
|
113
113
|
subtotal: number;
|
|
114
114
|
shippingFee: number;
|
|
115
115
|
codHandlingFee: number;
|
|
116
|
-
whatsappNotifyFee: number;
|
|
117
116
|
giftWrapFee: number;
|
|
118
117
|
shipmentProtectionFee: number;
|
|
119
118
|
saleProtectionFee: number;
|
|
@@ -145,7 +144,6 @@ export interface CheckoutPricingPreview {
|
|
|
145
144
|
subtotal: number;
|
|
146
145
|
shippingFee: number;
|
|
147
146
|
codHandlingFee: number;
|
|
148
|
-
whatsappNotifyFee: number;
|
|
149
147
|
giftWrapFee: number;
|
|
150
148
|
shipmentProtectionFee: number;
|
|
151
149
|
saleProtectionFee: number;
|
|
@@ -168,7 +166,7 @@ export interface CheckoutPricingPreview {
|
|
|
168
166
|
/**
|
|
169
167
|
* Read-only "what will I actually be charged" preview for the checkout
|
|
170
168
|
* Order Summary. Reuses the exact same building blocks
|
|
171
|
-
* createCheckoutOrderAction /
|
|
169
|
+
* createCheckoutOrderAction / verifyAndPlaceGatewayOrderAction use when an
|
|
172
170
|
* order is actually placed — resolveShippingCost, the compute*Fee helpers,
|
|
173
171
|
* computeGroupCouponDiscount, and the GST calc — so the number shown to the
|
|
174
172
|
* buyer can never diverge from what gets charged/recorded. Never decrements
|
|
@@ -184,9 +182,27 @@ export declare function attachPaymentAction(input: {
|
|
|
184
182
|
paymentId: string;
|
|
185
183
|
paidAmount: number;
|
|
186
184
|
}): Promise<void>;
|
|
187
|
-
export interface
|
|
188
|
-
/**
|
|
185
|
+
export interface VerifyAndPlaceGatewayOrderInput {
|
|
186
|
+
/**
|
|
187
|
+
* The gateway order id every lookup for this payment is keyed on, and what
|
|
188
|
+
* gets stored as `order.paymentId`: PhonePe's own `merchantOrderId`
|
|
189
|
+
* (generated in `PhonePeProvider.createOrder()`), or Razorpay's `order_…`.
|
|
190
|
+
*/
|
|
189
191
|
merchantOrderId: string;
|
|
192
|
+
/**
|
|
193
|
+
* Razorpay's client callback, when the buyer-present path has it. Omit on
|
|
194
|
+
* the webhook path and for PhonePe, which has no such callback.
|
|
195
|
+
*
|
|
196
|
+
* Verified IN ADDITION to the server-side order fetch, never instead of it
|
|
197
|
+
* — see the block comment above. A present-but-invalid signature is a hard
|
|
198
|
+
* failure: it means the browser's callback was forged or tampered with,
|
|
199
|
+
* even if the order did turn out to be paid.
|
|
200
|
+
*/
|
|
201
|
+
razorpaySignature?: {
|
|
202
|
+
razorpay_order_id: string;
|
|
203
|
+
razorpay_payment_id: string;
|
|
204
|
+
razorpay_signature: string;
|
|
205
|
+
};
|
|
190
206
|
/**
|
|
191
207
|
* Buyer identity. Omit on the webhook path — no session exists there, so
|
|
192
208
|
* it's resolved from `uid` packed into PhonePe's `metaInfo` at
|
|
@@ -205,4 +221,4 @@ export interface VerifyAndPlacePhonePeOrderInput {
|
|
|
205
221
|
*/
|
|
206
222
|
outOfStockPolicy?: OutOfStockPolicy;
|
|
207
223
|
}
|
|
208
|
-
export declare function
|
|
224
|
+
export declare function verifyAndPlaceGatewayOrderAction(input: VerifyAndPlaceGatewayOrderInput): Promise<CheckoutOrderResult>;
|