@mohasinac/appkit 4.59.0 → 4.60.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/features/layout/DashboardLayoutClient.js +62 -5
- package/dist/_internal/client/features/maintenance/views/MaintenanceDashboardView.js +2 -2
- package/dist/_internal/server/features/brands/actions.js +78 -4
- package/dist/_internal/server/features/checkout/actions.d.ts +36 -13
- package/dist/_internal/server/features/checkout/actions.js +668 -183
- package/dist/_internal/server/features/checkout/supplier-identity.js +18 -1
- package/dist/_internal/server/features/gateway-events/index.d.ts +10 -0
- package/dist/_internal/server/features/gateway-events/index.js +10 -0
- package/dist/_internal/server/features/gateway-events/ingest.d.ts +127 -0
- package/dist/_internal/server/features/gateway-events/ingest.js +188 -0
- package/dist/_internal/server/features/gateway-events/redact.d.ts +66 -0
- package/dist/_internal/server/features/gateway-events/redact.js +151 -0
- package/dist/_internal/server/features/grievance/actions.d.ts +63 -0
- package/dist/_internal/server/features/grievance/actions.js +173 -0
- package/dist/_internal/server/features/grievance/index.d.ts +8 -0
- package/dist/_internal/server/features/grievance/index.js +8 -0
- package/dist/_internal/server/features/grouped/data.js +28 -3
- package/dist/_internal/server/features/lottery/actions.js +99 -4
- package/dist/_internal/server/features/order-completion/actions.d.ts +92 -0
- package/dist/_internal/server/features/order-completion/actions.js +336 -0
- package/dist/_internal/server/features/order-completion/index.d.ts +7 -0
- package/dist/_internal/server/features/order-completion/index.js +7 -0
- package/dist/_internal/server/features/orders/actions.d.ts +13 -0
- package/dist/_internal/server/features/orders/actions.js +56 -2
- package/dist/_internal/server/features/orders/adapters.js +26 -0
- package/dist/_internal/server/features/orders/cancellation-refund.d.ts +116 -0
- package/dist/_internal/server/features/orders/cancellation-refund.js +466 -0
- package/dist/_internal/server/features/orders/index.d.ts +2 -1
- package/dist/_internal/server/features/orders/index.js +1 -1
- package/dist/_internal/server/features/orders/service.d.ts +60 -0
- package/dist/_internal/server/features/orders/service.js +74 -0
- package/dist/_internal/server/features/payment-cases/disputes.d.ts +76 -0
- package/dist/_internal/server/features/payment-cases/disputes.js +241 -0
- package/dist/_internal/server/features/payment-cases/index.d.ts +9 -0
- package/dist/_internal/server/features/payment-cases/index.js +9 -0
- package/dist/_internal/server/features/payouts/actions.d.ts +28 -3
- package/dist/_internal/server/features/payouts/actions.js +84 -10
- package/dist/_internal/server/features/points/adjust.d.ts +61 -0
- package/dist/_internal/server/features/points/adjust.js +121 -0
- package/dist/_internal/server/features/points/award.d.ts +65 -0
- package/dist/_internal/server/features/points/award.js +145 -0
- package/dist/_internal/server/features/price-index/market.d.ts +33 -0
- package/dist/_internal/server/features/price-index/market.js +54 -1
- package/dist/_internal/server/features/products/data.js +40 -22
- package/dist/_internal/server/features/protection-claims/actions.d.ts +72 -0
- package/dist/_internal/server/features/protection-claims/actions.js +228 -0
- package/dist/_internal/server/features/protection-claims/index.d.ts +8 -0
- package/dist/_internal/server/features/protection-claims/index.js +8 -0
- package/dist/_internal/server/features/refunds/actions.d.ts +20 -0
- package/dist/_internal/server/features/refunds/actions.js +259 -17
- package/dist/_internal/server/features/refunds/capacity.d.ts +29 -0
- package/dist/_internal/server/features/refunds/capacity.js +37 -0
- package/dist/_internal/server/features/reviews/actions.js +3 -2
- package/dist/_internal/server/features/search/index-build/sources.js +20 -1
- package/dist/_internal/server/features/shipping/reconcile.d.ts +10 -1
- package/dist/_internal/server/features/shipping/reconcile.js +34 -3
- package/dist/_internal/server/features/shipping/reimbursement.d.ts +117 -0
- package/dist/_internal/server/features/shipping/reimbursement.js +223 -0
- package/dist/_internal/server/features/stores/tabs.d.ts +19 -4
- package/dist/_internal/server/features/stores/tabs.js +24 -4
- package/dist/_internal/server/functions/https.d.ts +31 -1
- package/dist/_internal/server/functions/https.js +52 -1
- package/dist/_internal/server/functions/scheduled.d.ts +72 -1
- package/dist/_internal/server/functions/scheduled.js +124 -1
- package/dist/_internal/server/jobs/core/autoPayoutEligibility.js +62 -16
- package/dist/_internal/server/jobs/core/boxRollupReconcile.d.ts +46 -0
- package/dist/_internal/server/jobs/core/boxRollupReconcile.js +142 -0
- package/dist/_internal/server/jobs/core/dailyDataCleanup.js +149 -1
- package/dist/_internal/server/jobs/core/dailyStatusDigest.d.ts +14 -0
- package/dist/_internal/server/jobs/core/dailyStatusDigest.js +79 -1
- package/dist/_internal/server/jobs/core/index.d.ts +2 -0
- package/dist/_internal/server/jobs/core/index.js +2 -0
- package/dist/_internal/server/jobs/core/marketPriceRollup.d.ts +64 -0
- package/dist/_internal/server/jobs/core/marketPriceRollup.js +153 -0
- package/dist/_internal/server/jobs/core/obligationSweep.d.ts +36 -0
- package/dist/_internal/server/jobs/core/obligationSweep.js +503 -0
- package/dist/_internal/server/jobs/core/paymentReconcile.d.ts +79 -0
- package/dist/_internal/server/jobs/core/paymentReconcile.js +614 -0
- package/dist/_internal/server/jobs/core/paymentWindowTimeout.js +34 -0
- package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.js +35 -4
- package/dist/_internal/server/jobs/handlers/boxRollupReconcile.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/boxRollupReconcile.js +15 -0
- package/dist/_internal/server/jobs/handlers/countersReconcileNow.d.ts +65 -0
- package/dist/_internal/server/jobs/handlers/countersReconcileNow.js +89 -0
- package/dist/_internal/server/jobs/handlers/index.d.ts +5 -0
- package/dist/_internal/server/jobs/handlers/index.js +5 -0
- package/dist/_internal/server/jobs/handlers/marketPriceRollup.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/marketPriceRollup.js +2 -0
- package/dist/_internal/server/jobs/handlers/obligationSweep.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/obligationSweep.js +15 -0
- package/dist/_internal/server/jobs/handlers/onShipmentAllocationSync.js +30 -1
- package/dist/_internal/server/jobs/handlers/paymentReconcile.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/paymentReconcile.js +6 -0
- package/dist/_internal/shared/actions/action-registry.d.ts +1 -1
- package/dist/_internal/shared/actions/action-registry.js +71 -0
- package/dist/_internal/shared/checkout/coupon-discount.d.ts +73 -0
- package/dist/_internal/shared/checkout/coupon-discount.js +103 -0
- package/dist/_internal/shared/checkout/lanes.d.ts +42 -0
- package/dist/_internal/shared/checkout/lanes.js +46 -0
- package/dist/_internal/shared/checkout/order-math.d.ts +149 -1
- package/dist/_internal/shared/checkout/order-math.js +251 -3
- package/dist/_internal/shared/checkout/refundable-base.d.ts +116 -0
- package/dist/_internal/shared/checkout/refundable-base.js +122 -0
- package/dist/_internal/shared/features/auctions/config.d.ts +14 -1
- package/dist/_internal/shared/features/auctions/config.js +30 -1
- package/dist/_internal/shared/features/brands/schema.d.ts +42 -0
- package/dist/_internal/shared/features/brands/schema.js +18 -0
- package/dist/_internal/shared/features/orders/refund-copy.d.ts +22 -0
- package/dist/_internal/shared/features/orders/refund-copy.js +34 -0
- package/dist/_internal/shared/features/print/label-profiles.d.ts +198 -0
- package/dist/_internal/shared/features/print/label-profiles.js +350 -0
- package/dist/_internal/shared/features/products/to-product-item.js +33 -5
- package/dist/_internal/shared/fees/calculator.d.ts +31 -2
- package/dist/_internal/shared/fees/calculator.js +103 -5
- package/dist/_internal/shared/fees/india-states.d.ts +195 -0
- package/dist/_internal/shared/fees/india-states.js +190 -0
- package/dist/_internal/shared/fees/payout-hold.d.ts +80 -0
- package/dist/_internal/shared/fees/payout-hold.js +74 -0
- package/dist/_internal/shared/obligations/deadlines.d.ts +94 -0
- package/dist/_internal/shared/obligations/deadlines.js +155 -0
- package/dist/_internal/shared/shipping/quote.d.ts +96 -0
- package/dist/_internal/shared/shipping/quote.js +67 -0
- package/dist/_internal/shared/time/business-days.d.ts +91 -0
- package/dist/_internal/shared/time/business-days.js +185 -0
- package/dist/cli/index.js +0 -2
- package/dist/client.d.ts +9 -4
- package/dist/client.js +26 -3
- package/dist/configs/tailwind.d.ts +0 -12
- package/dist/configs/tailwind.js +28 -15
- package/dist/constants/api-endpoints.d.ts +51 -9
- package/dist/constants/api-endpoints.js +23 -7
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/contracts/index.d.ts +1 -1
- package/dist/contracts/payment.d.ts +131 -0
- package/dist/features/about/components/AboutView.js +1 -1
- package/dist/features/about/components/DeveloperView.js +5 -2
- package/dist/features/about/components/FAQPageView.js +2 -1
- package/dist/features/about/components/FeesView.js +2 -1
- package/dist/features/about/components/HelpPageView.js +2 -1
- package/dist/features/about/components/HowAuctionsWorkView.js +2 -1
- package/dist/features/about/components/HowCheckoutWorksView.js +2 -1
- package/dist/features/about/components/HowEmiWorksView.js +2 -1
- package/dist/features/about/components/HowOffersWorkView.js +2 -1
- package/dist/features/about/components/HowOrdersWorkView.js +2 -1
- package/dist/features/about/components/HowPayoutsWorkView.js +2 -1
- package/dist/features/about/components/HowPreOrdersWorkView.js +2 -1
- package/dist/features/about/components/HowReviewsWorkView.js +2 -1
- package/dist/features/about/components/PolicyPageView.js +2 -1
- package/dist/features/about/components/ProseHero.d.ts +73 -0
- package/dist/features/about/components/ProseHero.js +18 -0
- package/dist/features/about/components/SecurityPrivacyView.js +2 -1
- package/dist/features/about/components/ShippingPolicyView.js +2 -1
- package/dist/features/about/components/TrackOrderView.js +2 -1
- package/dist/features/about/components/UnauthorizedView.js +1 -1
- package/dist/features/about/index.d.ts +2 -0
- package/dist/features/about/index.js +5 -0
- package/dist/features/account/actions/address-actions.d.ts +26 -2
- package/dist/features/account/actions/address-actions.js +25 -1
- package/dist/features/account/components/BuyerShoppingGuideView.js +1 -1
- package/dist/features/account/components/NotificationPreferencesPanel.js +1 -1
- package/dist/features/account/components/UserOrdersView.js +17 -0
- package/dist/features/account/components/UserSidebar.js +1 -1
- package/dist/features/account/hooks/useNotifications.js +29 -0
- package/dist/features/admin/actions/admin-coupon-actions.js +36 -0
- package/dist/features/admin/components/AdminBeysView.js +2 -2
- package/dist/features/admin/components/AdminBlogEditorView.js +2 -2
- package/dist/features/admin/components/AdminBrandEditorView.js +32 -2
- package/dist/features/admin/components/AdminBundleEditorView.js +1 -1
- package/dist/features/admin/components/AdminCarouselEditorView.js +1 -1
- package/dist/features/admin/components/AdminCategoriesView.js +1 -1
- package/dist/features/admin/components/AdminCategoryEditorView.js +73 -17
- package/dist/features/admin/components/AdminContactEditorView.js +1 -1
- package/dist/features/admin/components/AdminCouponEditorView.js +26 -1
- package/dist/features/admin/components/AdminFaqEditorView.js +1 -1
- package/dist/features/admin/components/AdminFaqsView.js +2 -2
- package/dist/features/admin/components/AdminGatewayEventsView.d.ts +54 -0
- package/dist/features/admin/components/AdminGatewayEventsView.js +209 -0
- package/dist/features/admin/components/AdminGuideHubView.js +1 -1
- package/dist/features/admin/components/AdminMoneyCasesView.d.ts +60 -0
- package/dist/features/admin/components/AdminMoneyCasesView.js +287 -0
- package/dist/features/admin/components/AdminPartsView.js +2 -2
- package/dist/features/admin/components/AdminProductsView.js +75 -4
- package/dist/features/admin/components/AdminSidebar.js +2 -2
- package/dist/features/admin/components/AdminSiteSettingsView.js +65 -7
- package/dist/features/admin/components/AdminSublistingCategoriesView.js +2 -0
- package/dist/features/admin/components/AdminSupportTicketDetailView.js +1 -1
- package/dist/features/admin/components/AdminSupportTicketsView.js +2 -2
- package/dist/features/admin/components/AdminTesterChecklistView.js +2 -2
- package/dist/features/admin/components/AdminUsersView.js +72 -1
- package/dist/features/admin/components/AdminViewCards.d.ts +3 -1
- package/dist/features/admin/components/AdminViewCards.js +4 -4
- package/dist/features/admin/components/DataListingView.d.ts +28 -0
- package/dist/features/admin/components/DataListingView.js +175 -14
- package/dist/features/admin/components/DataTable.d.ts +12 -1
- package/dist/features/admin/components/DataTable.js +3 -3
- package/dist/features/admin/components/OwnerQuickActions.d.ts +1 -1
- package/dist/features/admin/components/OwnerQuickActions.js +60 -2
- package/dist/features/admin/components/RecordOwnerQuickActions.d.ts +1 -1
- package/dist/features/admin/components/RecordOwnerQuickActions.js +61 -14
- package/dist/features/admin/components/analytics/AdminStatCard.d.ts +35 -1
- package/dist/features/admin/components/analytics/AdminStatCard.js +77 -2
- package/dist/features/admin/components/index.d.ts +4 -0
- package/dist/features/admin/components/index.js +6 -0
- package/dist/features/admin/constants/filter-tabs.d.ts +156 -0
- package/dist/features/admin/constants/filter-tabs.js +106 -0
- package/dist/features/admin/repository/site-settings.repository.d.ts +22 -0
- package/dist/features/admin/repository/site-settings.repository.js +82 -1
- package/dist/features/admin/schemas/admin-editor-forms.d.ts +21 -0
- package/dist/features/admin/schemas/admin-editor-forms.js +44 -0
- package/dist/features/admin/schemas/firestore.js +5 -1
- package/dist/features/admin/schemas/site-settings-form.js +30 -1
- package/dist/features/auctions/actions/bid-actions.js +13 -1
- package/dist/features/auctions/components/AuctionBottomActions.js +2 -2
- package/dist/features/auctions/components/AuctionDetailPageView.js +3 -1
- package/dist/features/auctions/components/MarketplaceAuctionCard.d.ts +11 -0
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +5 -3
- package/dist/features/auctions/components/PlaceBidFormClient.d.ts +8 -1
- package/dist/features/auctions/components/PlaceBidFormClient.js +2 -2
- package/dist/features/audit-log/schemas/firestore.d.ts +28 -0
- package/dist/features/audit-log/schemas/firestore.js +14 -0
- package/dist/features/auth/permissions/constants.d.ts +17 -1
- package/dist/features/auth/permissions/constants.js +18 -0
- package/dist/features/blog/components/BlogPostView.js +1 -1
- package/dist/features/catalogue/components/AdminCatalogueApprovalsView.js +1 -1
- package/dist/features/categories/api/[id]/description-template/route.js +107 -1
- package/dist/features/categories/components/BrandDetailPageView.js +2 -2
- package/dist/features/categories/components/BreadcrumbTrail.js +7 -1
- package/dist/features/categories/components/BundleDetailView.js +1 -1
- package/dist/features/categories/components/CategoryDetailPageView.js +2 -2
- package/dist/features/categories/components/CategoryForm.js +12 -1
- package/dist/features/categories/components/CategoryTemplatePicker.js +38 -5
- package/dist/features/categories/repository/market-price-index.repository.d.ts +123 -0
- package/dist/features/categories/repository/market-price-index.repository.js +105 -0
- package/dist/features/categories/repository/price-observation.repository.d.ts +166 -0
- package/dist/features/categories/repository/price-observation.repository.js +132 -0
- package/dist/features/events/components/EventSaleBanner.js +1 -1
- package/dist/features/events/components/EventStatusBadge.js +1 -1
- package/dist/features/faq/components/FAQAccordion.js +2 -1
- package/dist/features/faq/components/FAQCategorySidebar.js +2 -2
- package/dist/features/faq/components/FAQHelpfulButtons.js +4 -4
- package/dist/features/faq/components/RelatedFAQs.js +1 -1
- package/dist/features/filters/FilterFacetSection.js +1 -1
- package/dist/features/filters/SwitchFilter.js +1 -1
- package/dist/features/gateway-events/repository/gateway-events.repository.d.ts +117 -0
- package/dist/features/gateway-events/repository/gateway-events.repository.js +274 -0
- package/dist/features/gateway-events/schemas/firestore.d.ts +217 -0
- package/dist/features/gateway-events/schemas/firestore.js +125 -0
- package/dist/features/gateway-events/schemas/index.d.ts +81 -0
- package/dist/features/gateway-events/schemas/index.js +79 -0
- package/dist/features/grouped/components/GroupedListingDetailView.js +1 -1
- package/dist/features/homepage/components/AnnouncementBar.js +37 -1
- package/dist/features/homepage/components/AnnouncementBar.style.css +30 -0
- package/dist/features/homepage/components/BrandsSection.js +1 -1
- package/dist/features/homepage/components/CTABannerSection.js +1 -1
- package/dist/features/homepage/components/FeaturedBundlesSection.js +14 -24
- package/dist/features/homepage/components/HeroCarousel.js +2 -2
- package/dist/features/homepage/components/SocialPostCard.js +1 -1
- package/dist/features/inventory/components/AdminMoveLedgerView.d.ts +7 -0
- package/dist/features/inventory/components/AdminMoveLedgerView.js +157 -0
- package/dist/features/inventory/components/AdminStorageBoxesView.d.ts +11 -0
- package/dist/features/inventory/components/AdminStorageBoxesView.js +168 -0
- package/dist/features/inventory/components/ReceiveStationView.d.ts +39 -0
- package/dist/features/inventory/components/ReceiveStationView.js +413 -0
- package/dist/features/inventory/components/operator-message.d.ts +29 -0
- package/dist/features/inventory/components/operator-message.js +41 -0
- package/dist/features/inventory/index.d.ts +13 -0
- package/dist/features/inventory/index.js +28 -0
- package/dist/features/inventory/repository/inventory-movements.repository.d.ts +97 -0
- package/dist/features/inventory/repository/inventory-movements.repository.js +186 -0
- package/dist/features/inventory/repository/inventory-placements.repository.d.ts +179 -0
- package/dist/features/inventory/repository/inventory-placements.repository.js +345 -0
- package/dist/features/inventory/repository/storage-boxes.repository.d.ts +83 -0
- package/dist/features/inventory/repository/storage-boxes.repository.js +127 -0
- package/dist/features/inventory/schemas/firestore.d.ts +197 -0
- package/dist/features/inventory/schemas/firestore.js +159 -0
- package/dist/features/layout/AppLayoutShell.d.ts +12 -1
- package/dist/features/layout/AppLayoutShell.js +25 -12
- package/dist/features/layout/AutoBreadcrumbs.js +162 -3
- package/dist/features/layout/AutoBreadcrumbs.style.css +45 -0
- package/dist/features/layout/BottomNavbar.d.ts +1 -1
- package/dist/features/layout/BottomNavbar.js +2 -2
- package/dist/features/media/MediaAvatar.js +1 -1
- package/dist/features/media/MediaImage.d.ts +24 -4
- package/dist/features/media/MediaImage.js +44 -4
- package/dist/features/media/MediaLightbox.js +1 -1
- package/dist/features/media/modals/ImageCropModal.js +1 -1
- package/dist/features/media/modals/ImageEditor.js +1 -1
- package/dist/features/media/upload/MediaUploadField.js +91 -3
- package/dist/features/obligations/constants/policies.d.ts +92 -0
- package/dist/features/obligations/constants/policies.js +378 -0
- package/dist/features/obligations/repository/obligations.repository.d.ts +68 -0
- package/dist/features/obligations/repository/obligations.repository.js +158 -0
- package/dist/features/obligations/schemas/firestore.d.ts +160 -0
- package/dist/features/obligations/schemas/firestore.js +87 -0
- package/dist/features/orders/actions/order-actions.d.ts +43 -4
- package/dist/features/orders/actions/order-actions.js +60 -3
- package/dist/features/orders/actions/refund-actions.js +70 -10
- package/dist/features/orders/components/OrderCompletionPanel.d.ts +27 -0
- package/dist/features/orders/components/OrderCompletionPanel.js +192 -0
- package/dist/features/orders/components/OrdersList.js +2 -2
- package/dist/features/orders/components/RefundHistoryTable.js +3 -1
- package/dist/features/orders/components/index.d.ts +2 -0
- package/dist/features/orders/components/index.js +6 -0
- package/dist/features/orders/constants/transitions.d.ts +59 -0
- package/dist/features/orders/constants/transitions.js +104 -0
- package/dist/features/orders/repository/orders.repository.d.ts +109 -6
- package/dist/features/orders/repository/orders.repository.js +464 -21
- package/dist/features/orders/schemas/firestore.d.ts +270 -0
- package/dist/features/orders/schemas/firestore.js +24 -0
- package/dist/features/orders/schemas/index.d.ts +61 -0
- package/dist/features/orders/schemas/index.js +22 -0
- package/dist/features/orders/types/index.d.ts +79 -0
- package/dist/features/parts/components/PartsIndexPageView.js +8 -1
- package/dist/features/payment-cases/repository/payment-cases.repository.d.ts +170 -0
- package/dist/features/payment-cases/repository/payment-cases.repository.js +342 -0
- package/dist/features/payment-cases/schemas/firestore.d.ts +229 -0
- package/dist/features/payment-cases/schemas/firestore.js +105 -0
- package/dist/features/payment-cases/schemas/resolve-form.d.ts +97 -0
- package/dist/features/payment-cases/schemas/resolve-form.js +114 -0
- package/dist/features/payments/repository/payout.repository.d.ts +0 -1
- package/dist/features/payments/repository/payout.repository.js +0 -1
- package/dist/features/points/repository/points.repository.d.ts +122 -0
- package/dist/features/points/repository/points.repository.js +304 -1
- package/dist/features/points/schemas/adjust-form.d.ts +58 -0
- package/dist/features/points/schemas/adjust-form.js +63 -0
- package/dist/features/points/schemas/firestore.d.ts +108 -1
- package/dist/features/points/schemas/firestore.js +84 -0
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +3 -3
- package/dist/features/pre-orders/components/PreOrderBadge.js +1 -1
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +1 -1
- package/dist/features/price-index/components/PriceIndexToolView.d.ts +23 -4
- package/dist/features/price-index/components/PriceIndexToolView.js +71 -6
- package/dist/features/price-index/market-stats.d.ts +82 -0
- package/dist/features/price-index/market-stats.js +230 -0
- package/dist/features/print/components/BoxLabelPrintView.d.ts +25 -0
- package/dist/features/print/components/BoxLabelPrintView.js +66 -0
- package/dist/features/print/components/LabelProfilePicker.d.ts +13 -0
- package/dist/features/print/components/LabelProfilePicker.js +38 -0
- package/dist/features/print/components/labels.d.ts +117 -0
- package/dist/features/print/components/labels.js +258 -0
- package/dist/features/print/components/labels.style.css +46 -0
- package/dist/features/print/index.d.ts +6 -0
- package/dist/features/print/index.js +16 -0
- package/dist/features/products/columns/productTableColumns.js +5 -4
- package/dist/features/products/components/MarketplaceBundleCard.js +2 -2
- package/dist/features/products/components/MarketplacePrizeDrawCard.js +6 -6
- package/dist/features/products/components/PrizeDrawCollage.js +1 -1
- package/dist/features/products/components/PrizeDrawItemsEditor.js +1 -1
- package/dist/features/products/components/PrizeRevealModal.js +2 -2
- package/dist/features/products/components/ProductDetailPageView.js +18 -4
- package/dist/features/products/components/ProductForm.js +34 -23
- package/dist/features/products/components/ProductGrid.js +86 -62
- package/dist/features/products/constants/card-badges.d.ts +97 -0
- package/dist/features/products/constants/card-badges.js +100 -0
- package/dist/features/products/repository/products.repository.js +34 -1
- package/dist/features/products/schemas/firestore.d.ts +46 -3
- package/dist/features/products/schemas/firestore.js +21 -0
- package/dist/features/promotions/components/PromotionsView.js +1 -1
- package/dist/features/promotions/repository/claimed-coupons.repository.d.ts +32 -0
- package/dist/features/promotions/repository/claimed-coupons.repository.js +58 -0
- package/dist/features/promotions/schemas/firestore.js +30 -3
- package/dist/features/promotions/schemas/index.d.ts +6 -6
- package/dist/features/protection-claims/repository/protection-claims.repository.d.ts +54 -0
- package/dist/features/protection-claims/repository/protection-claims.repository.js +174 -0
- package/dist/features/protection-claims/schemas/firestore.d.ts +168 -0
- package/dist/features/protection-claims/schemas/firestore.js +130 -0
- package/dist/features/reviews/actions/review-actions.js +3 -2
- package/dist/features/reviews/components/ReviewModal.js +1 -1
- package/dist/features/reviews/components/ReviewsList.js +1 -1
- package/dist/features/reviews/schemas/firestore.d.ts +20 -1
- package/dist/features/scams/constants/scam-types.d.ts +2 -0
- package/dist/features/scams/constants/scam-types.js +18 -0
- package/dist/features/scams/schemas/report-form.d.ts +3 -3
- package/dist/features/scams/schemas/report-form.js +26 -1
- package/dist/features/search/components/Search.js +9 -9
- package/dist/features/search/components/SearchResultsClient.js +18 -3
- package/dist/features/search/components/SearchResultsPageView.d.ts +1 -6
- package/dist/features/search/components/SearchResultsPageView.js +2 -2
- package/dist/features/seller/actions/offer-actions.js +16 -1
- package/dist/features/seller/actions/seller-actions.js +14 -3
- package/dist/features/seller/components/CategoryInlineSelect.js +75 -11
- package/dist/features/seller/components/PrintCenterView.d.ts +5 -0
- package/dist/features/seller/components/PrintCenterView.js +41 -30
- package/dist/features/seller/components/SellerOrdersView.js +1 -1
- package/dist/features/seller/components/SellerPayoutRequestView.js +16 -5
- package/dist/features/seller/components/SellerPayoutSettingsView.js +1 -1
- package/dist/features/seller/components/SellerProductShell.d.ts +16 -0
- package/dist/features/seller/components/SellerProductShell.js +123 -13
- package/dist/features/seller/components/SellerReviewsView.js +4 -2
- package/dist/features/seller/components/SellerSidebar.js +1 -1
- package/dist/features/seller/schemas/coupon-form.d.ts +26 -0
- package/dist/features/seller/schemas/coupon-form.js +27 -0
- package/dist/features/seller/schemas/product-form.d.ts +3 -0
- package/dist/features/seller/schemas/product-form.js +5 -0
- package/dist/features/shell/FormShell.js +2 -2
- package/dist/features/shell/QuickFormDrawer.js +14 -0
- package/dist/features/shell/SectionForm.d.ts +19 -0
- package/dist/features/shell/SectionForm.js +133 -9
- package/dist/features/shell/SectionForm.style.css +54 -0
- package/dist/features/shipments/components/AdminShipmentsView.js +16 -1
- package/dist/features/shipments/repository/shipment-items.repository.d.ts +9 -0
- package/dist/features/shipments/repository/shipment-items.repository.js +14 -0
- package/dist/features/site-settings/components/ActionPermissionsManager.js +1 -1
- package/dist/features/sticker-trace/components/StickerCommitPanel.js +1 -1
- package/dist/features/store-extensions/schemas/report-review-form.d.ts +8 -8
- package/dist/features/stores/components/StoreGuideHubView.js +1 -1
- package/dist/features/stores/components/StoreHeader.js +1 -1
- package/dist/features/support/schemas/firestore.d.ts +73 -2
- package/dist/features/support/schemas/firestore.js +59 -0
- package/dist/index.d.ts +16 -24
- package/dist/index.js +38 -47
- package/dist/next/ErrorBoundary.js +1 -1
- package/dist/next/routing/route-map.d.ts +24 -0
- package/dist/next/routing/route-map.js +40 -0
- package/dist/providers/payment-manual/index.d.ts +15 -1
- package/dist/providers/payment-manual/index.js +37 -0
- package/dist/providers/payment-phonepe/index.d.ts +14 -1
- package/dist/providers/payment-phonepe/index.js +36 -0
- package/dist/providers/payment-razorpay/index.d.ts +44 -1
- package/dist/providers/payment-razorpay/index.js +99 -0
- package/dist/providers/shipping-shiprocket/index.d.ts +18 -0
- package/dist/providers/shipping-shiprocket/index.js +18 -0
- package/dist/schemas/registry.d.ts +44 -11
- package/dist/server-entry.d.ts +2 -0
- package/dist/server-entry.js +27 -0
- package/dist/server.d.ts +42 -0
- package/dist/server.js +93 -0
- package/dist/styles.css +418 -149
- package/dist/tailwind-utilities.css +1 -1
- package/dist/tokens/themes/default-dark.js +15 -12
- package/dist/tokens/themes/default-light.js +14 -11
- package/dist/tokens/tokens.css +106 -23
- package/dist/ui/DataTable.style.css +4 -4
- package/dist/ui/columns/cell-renderers.d.ts +20 -0
- package/dist/ui/columns/cell-renderers.js +26 -1
- package/dist/ui/columns/index.d.ts +1 -1
- package/dist/ui/columns/index.js +4 -1
- package/dist/ui/components/Badge.style.css +1 -1
- package/dist/ui/components/Breadcrumb.js +19 -1
- package/dist/ui/components/BulkActionBar.style.css +4 -4
- package/dist/ui/components/Button.style.css +1 -1
- package/dist/ui/components/Checkbox.style.css +1 -1
- package/dist/ui/components/FallbackShell.js +1 -1
- package/dist/ui/components/Form.d.ts +14 -1
- package/dist/ui/components/Form.js +2 -2
- package/dist/ui/components/FormField.js +18 -4
- package/dist/ui/components/FormField.style.css +43 -3
- package/dist/ui/components/GatedPrice.style.css +1 -1
- package/dist/ui/components/IconButton.style.css +1 -1
- package/dist/ui/components/Input.js +22 -1
- package/dist/ui/components/Input.style.css +38 -22
- package/dist/ui/components/ListingFilterDrawer.js +1 -1
- package/dist/ui/components/ListingToolbar.js +1 -1
- package/dist/ui/components/PaginatedSelect.js +0 -0
- package/dist/ui/components/Radio.style.css +1 -1
- package/dist/ui/components/Repeater.d.ts +53 -0
- package/dist/ui/components/Repeater.js +7 -0
- package/dist/ui/components/RichTextEditor.d.ts +20 -1
- package/dist/ui/components/RichTextEditor.js +23 -2
- package/dist/ui/components/Select.style.css +7 -21
- package/dist/ui/components/Semantic.js +27 -3
- package/dist/ui/components/TagInput.style.css +4 -9
- package/dist/ui/components/Textarea.style.css +4 -18
- package/dist/ui/components/Toggle.style.css +1 -1
- package/dist/ui/components/Typography.d.ts +3 -3
- package/dist/ui/components/Typography.js +15 -15
- package/dist/ui/components/ViewToggle.style.css +4 -4
- package/dist/ui/forms/AddAnotherToggle.d.ts +16 -0
- package/dist/ui/forms/AddAnotherToggle.js +56 -0
- package/dist/ui/forms/ColorPickerField.js +15 -2
- package/dist/ui/forms/FieldCheckbox.js +15 -2
- package/dist/ui/forms/FieldInput.d.ts +22 -1
- package/dist/ui/forms/FieldInput.js +19 -5
- package/dist/ui/forms/FieldLabel.d.ts +35 -0
- package/dist/ui/forms/FieldLabel.js +70 -0
- package/dist/ui/forms/FieldSelect.d.ts +4 -1
- package/dist/ui/forms/FieldSelect.js +27 -5
- package/dist/ui/forms/FieldTextarea.d.ts +4 -1
- package/dist/ui/forms/FieldTextarea.js +22 -5
- package/dist/ui/forms/FormShell.d.ts +17 -1
- package/dist/ui/forms/FormShell.js +36 -2
- package/dist/ui/forms/FormShell.style.css +41 -33
- package/dist/ui/forms/index.d.ts +5 -1
- package/dist/ui/forms/index.js +2 -0
- package/dist/ui/icons/icon-registry.d.ts +1 -0
- package/dist/ui/icons/icon-registry.js +17 -1
- package/dist/utils/id-generators.d.ts +80 -0
- package/dist/utils/id-generators.js +93 -0
- package/dist/utils/search-txt-builders.d.ts +12 -0
- package/dist/utils/search-txt-builders.js +17 -0
- package/package.json +1 -1
- package/scripts/seed-cli.mjs +106 -5
- package/dist/features/loyalty/api/admin/loyalty/grant/route.d.ts +0 -12
- package/dist/features/loyalty/api/admin/loyalty/grant/route.js +0 -38
- package/dist/features/loyalty/api/balance/route.d.ts +0 -12
- package/dist/features/loyalty/api/balance/route.js +0 -41
- package/dist/features/loyalty/api/earn/route.d.ts +0 -12
- package/dist/features/loyalty/api/earn/route.js +0 -38
- package/dist/features/loyalty/api/history/route.d.ts +0 -12
- package/dist/features/loyalty/api/history/route.js +0 -58
- package/dist/features/loyalty/api/redeem/route.d.ts +0 -12
- package/dist/features/loyalty/api/redeem/route.js +0 -38
- package/dist/features/loyalty/columns/index.d.ts +0 -17
- package/dist/features/loyalty/columns/index.js +0 -40
- package/dist/features/loyalty/components/CoinsDisplay.d.ts +0 -12
- package/dist/features/loyalty/components/CoinsDisplay.js +0 -10
- package/dist/features/loyalty/components/index.d.ts +0 -1
- package/dist/features/loyalty/components/index.js +0 -1
- package/dist/features/loyalty/hooks/useLoyaltyBalance.d.ts +0 -4
- package/dist/features/loyalty/hooks/useLoyaltyBalance.js +0 -25
- package/dist/features/loyalty/index.d.ts +0 -6
- package/dist/features/loyalty/index.js +0 -6
- package/dist/features/loyalty/manifest.d.ts +0 -2
- package/dist/features/loyalty/manifest.js +0 -16
- package/dist/features/loyalty/messages/en.json +0 -19
- package/dist/features/loyalty/repository/loyalty.repository.d.ts +0 -8
- package/dist/features/loyalty/repository/loyalty.repository.js +0 -22
- package/dist/features/loyalty/schemas/index.d.ts +0 -85
- package/dist/features/loyalty/schemas/index.js +0 -40
- package/dist/features/loyalty/server.d.ts +0 -6
- package/dist/features/loyalty/server.js +0 -6
- package/dist/features/loyalty/types/index.d.ts +0 -31
- package/dist/features/loyalty/types/index.js +0 -1
- package/dist/features/loyalty/types/loyalty-config.d.ts +0 -7
- package/dist/features/loyalty/types/loyalty-config.js +0 -1
- package/dist/features/loyalty/types/loyalty-math.d.ts +0 -9
- package/dist/features/loyalty/types/loyalty-math.js +0 -27
- package/dist/features/products/components/ProductOwnerQuickActions.d.ts +0 -11
- package/dist/features/products/components/ProductOwnerQuickActions.js +0 -120
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
import Razorpay from "razorpay";
|
|
54
54
|
import { IPaymentProvider } from "../../contracts/index.js";
|
|
55
55
|
import { getDefaultCurrency } from "../../core/baseline-resolver.js";
|
|
56
|
+
import { paiseToRupees } from "../../core/money.js";
|
|
56
57
|
import { verifyWebhookSignature } from "./signature.js";
|
|
57
58
|
export { verifyPaymentSignature, verifyWebhookSignature, } from "./signature.js";
|
|
58
59
|
/** Razorpay's own order status vocabulary → the contract's. */
|
|
@@ -229,4 +230,102 @@ export class RazorpayProvider extends IPaymentProvider {
|
|
|
229
230
|
metadata: order.notes,
|
|
230
231
|
};
|
|
231
232
|
}
|
|
233
|
+
/*
|
|
234
|
+
* ── DISPUTES ──────────────────────────────────────────────────────────────
|
|
235
|
+
*
|
|
236
|
+
* Razorpay is the only registered provider that HAS disputes, so this is the
|
|
237
|
+
* only real implementation of the three.
|
|
238
|
+
*
|
|
239
|
+
* 🛑 Two unit conversions, both easy to get wrong and both silent when wrong:
|
|
240
|
+
*
|
|
241
|
+
* amount / amount_deducted — currency SUBUNITS → decimal rupees.
|
|
242
|
+
* respond_by / created_at — Unix timestamp in SECONDS → Date.
|
|
243
|
+
*
|
|
244
|
+
* The second is the nastier one. `new Date(1761000000)` is 21 January 1970,
|
|
245
|
+
* so a missed `* 1000` does not throw and does not look like a unit bug — it
|
|
246
|
+
* looks like corrupt data, and on a dispute it would make a live `respondBy`
|
|
247
|
+
* deadline sort as 55 years overdue, which an escalation query would then
|
|
248
|
+
* either flood on or ignore. The existing `refund`/`getOrder` methods above
|
|
249
|
+
* already multiply, which is the precedent to copy.
|
|
250
|
+
*/
|
|
251
|
+
/**
|
|
252
|
+
* Typed STRUCTURALLY rather than against the SDK's `Disputes.RazorpayDispute`
|
|
253
|
+
* namespace type.
|
|
254
|
+
*
|
|
255
|
+
* Two reasons: the namespace is declared inside `types/disputes.d.ts` and is
|
|
256
|
+
* not part of the package's documented export surface, so importing it couples
|
|
257
|
+
* us to an internal; and naming only the fields we read makes the mapping
|
|
258
|
+
* auditable against the SDK by eye. Every field below was checked against the
|
|
259
|
+
* installed 2.9.8 declaration — `id`, `payment_id`, `amount`, `currency`,
|
|
260
|
+
* `amount_deducted`, `reason_code`, `respond_by`, `status`, `phase`,
|
|
261
|
+
* `created_at` — rather than recalled.
|
|
262
|
+
*
|
|
263
|
+
* `status` and `phase` are `string` in the SDK too, so nothing is lost by not
|
|
264
|
+
* importing it.
|
|
265
|
+
*/
|
|
266
|
+
toDispute(d) {
|
|
267
|
+
return {
|
|
268
|
+
id: String(d.id),
|
|
269
|
+
paymentId: String(d.payment_id),
|
|
270
|
+
amount: paiseToRupees(Number(d.amount)),
|
|
271
|
+
currency: String(d.currency),
|
|
272
|
+
amountDeducted: paiseToRupees(Number(d.amount_deducted ?? 0)),
|
|
273
|
+
reasonCode: String(d.reason_code ?? ""),
|
|
274
|
+
respondBy: new Date(Number(d.respond_by) * 1000),
|
|
275
|
+
status: String(d.status ?? ""),
|
|
276
|
+
phase: String(d.phase ?? ""),
|
|
277
|
+
createdAt: new Date(Number(d.created_at) * 1000),
|
|
278
|
+
gateway: this.name,
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Payments in a window, for reconciliation.
|
|
283
|
+
*
|
|
284
|
+
* 🛑 `from`/`to` are Unix timestamps in **SECONDS** and `count` is capped at
|
|
285
|
+
* **100 by the API** (verified in `RazorpayPaginationOptions`). The cap is
|
|
286
|
+
* NOT raised by asking: a caller wanting more must page with `skip`, and this
|
|
287
|
+
* method deliberately does not, because an unbounded page loop inside a 540 s
|
|
288
|
+
* function is how a reconciler turns into a timeout. At this project's volume
|
|
289
|
+
* one page is several days of payments; the count is logged so the day that
|
|
290
|
+
* stops being true is visible rather than silently truncating.
|
|
291
|
+
*/
|
|
292
|
+
async listPayments(opts) {
|
|
293
|
+
const result = await this.razorpay.payments.all({
|
|
294
|
+
from: Math.floor(opts.from.getTime() / 1000),
|
|
295
|
+
to: Math.ceil(opts.to.getTime() / 1000),
|
|
296
|
+
count: Math.min(opts.limit ?? 100, 100),
|
|
297
|
+
});
|
|
298
|
+
return (result.items ?? []).map((p) => {
|
|
299
|
+
const captured = Number(p.created_at);
|
|
300
|
+
return {
|
|
301
|
+
id: String(p.id),
|
|
302
|
+
...(p.order_id ? { orderId: String(p.order_id) } : {}),
|
|
303
|
+
amount: paiseToRupees(Number(p.amount)),
|
|
304
|
+
currency: String(p.currency),
|
|
305
|
+
status: String(p.status),
|
|
306
|
+
amountRefunded: paiseToRupees(Number(p.amount_refunded ?? 0)),
|
|
307
|
+
...(p.refund_status ? { refundStatus: String(p.refund_status) } : {}),
|
|
308
|
+
...(Number.isFinite(captured) ? { capturedAt: new Date(captured * 1000) } : {}),
|
|
309
|
+
gateway: this.name,
|
|
310
|
+
};
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
async getDispute(disputeId) {
|
|
314
|
+
return this.toDispute(await this.razorpay.disputes.fetch(disputeId));
|
|
315
|
+
}
|
|
316
|
+
async listDisputes() {
|
|
317
|
+
const result = await this.razorpay.disputes.all();
|
|
318
|
+
return (result.items ?? []).map((d) => this.toDispute(d));
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Accept liability — irreversible.
|
|
322
|
+
*
|
|
323
|
+
* `confirmIrrevocable` is required by the contract and is not read here, and
|
|
324
|
+
* that is the point: its job is to make the CALLER state intent at the call
|
|
325
|
+
* site. A runtime check would be theatre, since the type already makes
|
|
326
|
+
* `false` uncompilable.
|
|
327
|
+
*/
|
|
328
|
+
async acceptDispute(disputeId, _confirmIrrevocable) {
|
|
329
|
+
return this.toDispute(await this.razorpay.disputes.accept(disputeId));
|
|
330
|
+
}
|
|
232
331
|
}
|
|
@@ -99,6 +99,24 @@ export declare class ShiprocketShippingProvider extends IShippingProvider {
|
|
|
99
99
|
private call;
|
|
100
100
|
/** Their order payload wants the address flattened across many keys. */
|
|
101
101
|
private addressFields;
|
|
102
|
+
/**
|
|
103
|
+
* 🛑 WIRING A CALLER FOR THIS OWES ONE EXTRA WRITE: set
|
|
104
|
+
* `order.platformBookedShipment = true` in the same commit.
|
|
105
|
+
*
|
|
106
|
+
* That flag is the gate `isReimbursableShipment()`
|
|
107
|
+
* (`_internal/shared/shipping/quote.ts`) uses to decide whether a seller may
|
|
108
|
+
* be reimbursed for postage. It FAILS OPEN — absent means "the seller shipped
|
|
109
|
+
* it themselves", which is correct and deliberate, because a self-shipped
|
|
110
|
+
* parcel has no flag to set and a fail-closed gate would refuse every
|
|
111
|
+
* legitimate claim.
|
|
112
|
+
*
|
|
113
|
+
* Measured 2026-10-21: this method has **no callers**, and the flag has
|
|
114
|
+
* **no writers**. Those two facts cancel out — there are no platform-booked
|
|
115
|
+
* parcels, so nothing is wrongly reimbursed. Wire this without the flag and
|
|
116
|
+
* they stop cancelling out: the platform pays the courier here, then
|
|
117
|
+
* reimburses the seller for that same spend on approval. Postage paid twice,
|
|
118
|
+
* silently, because the gate has no way to know we booked it.
|
|
119
|
+
*/
|
|
102
120
|
createShipment(data: CreateShipmentInput): Promise<Shipment>;
|
|
103
121
|
trackShipment(trackingId: string): Promise<TrackingInfo>;
|
|
104
122
|
cancelShipment(shipmentId: string): Promise<void>;
|
|
@@ -249,6 +249,24 @@ export class ShiprocketShippingProvider extends IShippingProvider {
|
|
|
249
249
|
[`${p}_phone`]: a.phone,
|
|
250
250
|
};
|
|
251
251
|
}
|
|
252
|
+
/**
|
|
253
|
+
* 🛑 WIRING A CALLER FOR THIS OWES ONE EXTRA WRITE: set
|
|
254
|
+
* `order.platformBookedShipment = true` in the same commit.
|
|
255
|
+
*
|
|
256
|
+
* That flag is the gate `isReimbursableShipment()`
|
|
257
|
+
* (`_internal/shared/shipping/quote.ts`) uses to decide whether a seller may
|
|
258
|
+
* be reimbursed for postage. It FAILS OPEN — absent means "the seller shipped
|
|
259
|
+
* it themselves", which is correct and deliberate, because a self-shipped
|
|
260
|
+
* parcel has no flag to set and a fail-closed gate would refuse every
|
|
261
|
+
* legitimate claim.
|
|
262
|
+
*
|
|
263
|
+
* Measured 2026-10-21: this method has **no callers**, and the flag has
|
|
264
|
+
* **no writers**. Those two facts cancel out — there are no platform-booked
|
|
265
|
+
* parcels, so nothing is wrongly reimbursed. Wire this without the flag and
|
|
266
|
+
* they stop cancelling out: the platform pays the courier here, then
|
|
267
|
+
* reimburses the seller for that same spend on approval. Postage paid twice,
|
|
268
|
+
* silently, because the gate has no way to know we booked it.
|
|
269
|
+
*/
|
|
252
270
|
async createShipment(data) {
|
|
253
271
|
const body = {
|
|
254
272
|
order_id: data.orderId,
|
|
@@ -2122,11 +2122,11 @@ export declare const SCHEMAS: {
|
|
|
2122
2122
|
minAmount: import("zod").ZodEffects<import("zod").ZodNumber, number, number>;
|
|
2123
2123
|
discountValue: import("zod").ZodNumber;
|
|
2124
2124
|
}, "strip", import("zod").ZodTypeAny, {
|
|
2125
|
-
discountValue: number;
|
|
2126
2125
|
minAmount: number;
|
|
2127
|
-
}, {
|
|
2128
2126
|
discountValue: number;
|
|
2127
|
+
}, {
|
|
2129
2128
|
minAmount: number;
|
|
2129
|
+
discountValue: number;
|
|
2130
2130
|
}>, "many">>;
|
|
2131
2131
|
usage: import("zod").ZodObject<{
|
|
2132
2132
|
totalLimit: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -2265,8 +2265,8 @@ export declare const SCHEMAS: {
|
|
|
2265
2265
|
applicableCategories?: string[] | undefined;
|
|
2266
2266
|
} | undefined;
|
|
2267
2267
|
tiers?: {
|
|
2268
|
-
discountValue: number;
|
|
2269
2268
|
minAmount: number;
|
|
2269
|
+
discountValue: number;
|
|
2270
2270
|
}[] | undefined;
|
|
2271
2271
|
}, {
|
|
2272
2272
|
code: string;
|
|
@@ -2323,8 +2323,8 @@ export declare const SCHEMAS: {
|
|
|
2323
2323
|
applicableCategories?: string[] | undefined;
|
|
2324
2324
|
} | undefined;
|
|
2325
2325
|
tiers?: {
|
|
2326
|
-
discountValue: number;
|
|
2327
2326
|
minAmount: number;
|
|
2327
|
+
discountValue: number;
|
|
2328
2328
|
}[] | undefined;
|
|
2329
2329
|
}>;
|
|
2330
2330
|
readonly couponUsage: import("zod").ZodObject<{
|
|
@@ -2871,6 +2871,7 @@ export declare const SCHEMAS: {
|
|
|
2871
2871
|
amount: import("zod").ZodEffects<import("zod").ZodNumber, number, number>;
|
|
2872
2872
|
itemIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
2873
2873
|
reason: import("zod").ZodString;
|
|
2874
|
+
reasonCode: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2874
2875
|
refundedAt: import("zod").ZodUnion<[import("zod").ZodDate, import("zod").ZodString, import("zod").ZodObject<{
|
|
2875
2876
|
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
2876
2877
|
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
@@ -2879,7 +2880,12 @@ export declare const SCHEMAS: {
|
|
|
2879
2880
|
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
2880
2881
|
}, import("zod").ZodTypeAny, "passthrough">>]>;
|
|
2881
2882
|
refundedBy: import("zod").ZodString;
|
|
2883
|
+
status: import("zod").ZodOptional<import("zod").ZodEnum<["reserved", "processed", "failed"]>>;
|
|
2884
|
+
failureReason: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2885
|
+
gatewayRefundId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2886
|
+
gateway: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2882
2887
|
phonepeRefundId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2888
|
+
razorpayRefundId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2883
2889
|
manualTransactionId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2884
2890
|
proofDocumentUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2885
2891
|
proofDocumentMimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -2893,8 +2899,14 @@ export declare const SCHEMAS: {
|
|
|
2893
2899
|
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
2894
2900
|
}, import("zod").ZodTypeAny, "passthrough">;
|
|
2895
2901
|
refundedBy: string;
|
|
2902
|
+
status?: "failed" | "processed" | "reserved" | undefined;
|
|
2903
|
+
failureReason?: string | undefined;
|
|
2904
|
+
gateway?: string | undefined;
|
|
2896
2905
|
itemIds?: string[] | undefined;
|
|
2906
|
+
reasonCode?: string | undefined;
|
|
2907
|
+
gatewayRefundId?: string | undefined;
|
|
2897
2908
|
phonepeRefundId?: string | undefined;
|
|
2909
|
+
razorpayRefundId?: string | undefined;
|
|
2898
2910
|
manualTransactionId?: string | undefined;
|
|
2899
2911
|
proofDocumentUrl?: string | undefined;
|
|
2900
2912
|
proofDocumentMimeType?: string | undefined;
|
|
@@ -2908,8 +2920,14 @@ export declare const SCHEMAS: {
|
|
|
2908
2920
|
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
2909
2921
|
}, import("zod").ZodTypeAny, "passthrough">;
|
|
2910
2922
|
refundedBy: string;
|
|
2923
|
+
status?: "failed" | "processed" | "reserved" | undefined;
|
|
2924
|
+
failureReason?: string | undefined;
|
|
2925
|
+
gateway?: string | undefined;
|
|
2911
2926
|
itemIds?: string[] | undefined;
|
|
2927
|
+
reasonCode?: string | undefined;
|
|
2928
|
+
gatewayRefundId?: string | undefined;
|
|
2912
2929
|
phonepeRefundId?: string | undefined;
|
|
2930
|
+
razorpayRefundId?: string | undefined;
|
|
2913
2931
|
manualTransactionId?: string | undefined;
|
|
2914
2932
|
proofDocumentUrl?: string | undefined;
|
|
2915
2933
|
proofDocumentMimeType?: string | undefined;
|
|
@@ -3083,8 +3101,14 @@ export declare const SCHEMAS: {
|
|
|
3083
3101
|
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
3084
3102
|
}, import("zod").ZodTypeAny, "passthrough">;
|
|
3085
3103
|
refundedBy: string;
|
|
3104
|
+
status?: "failed" | "processed" | "reserved" | undefined;
|
|
3105
|
+
failureReason?: string | undefined;
|
|
3106
|
+
gateway?: string | undefined;
|
|
3086
3107
|
itemIds?: string[] | undefined;
|
|
3108
|
+
reasonCode?: string | undefined;
|
|
3109
|
+
gatewayRefundId?: string | undefined;
|
|
3087
3110
|
phonepeRefundId?: string | undefined;
|
|
3111
|
+
razorpayRefundId?: string | undefined;
|
|
3088
3112
|
manualTransactionId?: string | undefined;
|
|
3089
3113
|
proofDocumentUrl?: string | undefined;
|
|
3090
3114
|
proofDocumentMimeType?: string | undefined;
|
|
@@ -3231,8 +3255,14 @@ export declare const SCHEMAS: {
|
|
|
3231
3255
|
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
3232
3256
|
}, import("zod").ZodTypeAny, "passthrough">;
|
|
3233
3257
|
refundedBy: string;
|
|
3258
|
+
status?: "failed" | "processed" | "reserved" | undefined;
|
|
3259
|
+
failureReason?: string | undefined;
|
|
3260
|
+
gateway?: string | undefined;
|
|
3234
3261
|
itemIds?: string[] | undefined;
|
|
3262
|
+
reasonCode?: string | undefined;
|
|
3263
|
+
gatewayRefundId?: string | undefined;
|
|
3235
3264
|
phonepeRefundId?: string | undefined;
|
|
3265
|
+
razorpayRefundId?: string | undefined;
|
|
3236
3266
|
manualTransactionId?: string | undefined;
|
|
3237
3267
|
proofDocumentUrl?: string | undefined;
|
|
3238
3268
|
proofDocumentMimeType?: string | undefined;
|
|
@@ -4593,6 +4623,7 @@ export declare const SCHEMAS: {
|
|
|
4593
4623
|
seoTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4594
4624
|
seoDescription: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4595
4625
|
barcodeId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4626
|
+
sku: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4596
4627
|
startingBid: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
4597
4628
|
reservePrice: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
4598
4629
|
buyNowPrice: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -4683,6 +4714,7 @@ export declare const SCHEMAS: {
|
|
|
4683
4714
|
seoTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4684
4715
|
seoDescription: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4685
4716
|
barcodeId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4717
|
+
sku: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4686
4718
|
startingBid: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
4687
4719
|
reservePrice: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
4688
4720
|
buyNowPrice: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -4773,6 +4805,7 @@ export declare const SCHEMAS: {
|
|
|
4773
4805
|
seoTitle: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4774
4806
|
seoDescription: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4775
4807
|
barcodeId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4808
|
+
sku: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4776
4809
|
startingBid: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
4777
4810
|
reservePrice: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
4778
4811
|
buyNowPrice: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -5282,16 +5315,16 @@ export declare const SCHEMAS: {
|
|
|
5282
5315
|
status: import("zod").ZodEnum<["under-review", "actioned", "dismissed"]>;
|
|
5283
5316
|
resolution: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5284
5317
|
}, "strict", import("zod").ZodTypeAny, {
|
|
5285
|
-
status: "
|
|
5318
|
+
status: "under-review" | "actioned" | "dismissed";
|
|
5286
5319
|
resolution?: string | undefined;
|
|
5287
5320
|
}, {
|
|
5288
|
-
status: "
|
|
5321
|
+
status: "under-review" | "actioned" | "dismissed";
|
|
5289
5322
|
resolution?: string | undefined;
|
|
5290
5323
|
}>, {
|
|
5291
|
-
status: "
|
|
5324
|
+
status: "under-review" | "actioned" | "dismissed";
|
|
5292
5325
|
resolution?: string | undefined;
|
|
5293
5326
|
}, {
|
|
5294
|
-
status: "
|
|
5327
|
+
status: "under-review" | "actioned" | "dismissed";
|
|
5295
5328
|
resolution?: string | undefined;
|
|
5296
5329
|
}>;
|
|
5297
5330
|
readonly reportCreate: import("zod").ZodObject<{
|
|
@@ -6044,7 +6077,7 @@ export declare const SCHEMAS: {
|
|
|
6044
6077
|
phones: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
6045
6078
|
upiIds: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
6046
6079
|
emails: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
6047
|
-
scamType: import("zod").ZodString
|
|
6080
|
+
scamType: import("zod").ZodEffects<import("zod").ZodString, import("..").ScamType, string>;
|
|
6048
6081
|
scamPlatform: import("zod").ZodString;
|
|
6049
6082
|
amountLost: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
6050
6083
|
itemInvolved: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -6054,7 +6087,7 @@ export declare const SCHEMAS: {
|
|
|
6054
6087
|
}, "strip", import("zod").ZodTypeAny, {
|
|
6055
6088
|
displayName: string;
|
|
6056
6089
|
description: string;
|
|
6057
|
-
scamType:
|
|
6090
|
+
scamType: import("..").ScamType;
|
|
6058
6091
|
scamPlatform: string;
|
|
6059
6092
|
agreed: true;
|
|
6060
6093
|
reportedByAnon?: boolean | undefined;
|
|
@@ -6078,7 +6111,7 @@ export declare const SCHEMAS: {
|
|
|
6078
6111
|
}>, {
|
|
6079
6112
|
displayName: string;
|
|
6080
6113
|
description: string;
|
|
6081
|
-
scamType:
|
|
6114
|
+
scamType: import("..").ScamType;
|
|
6082
6115
|
scamPlatform: string;
|
|
6083
6116
|
agreed: true;
|
|
6084
6117
|
reportedByAnon?: boolean | undefined;
|
package/dist/server-entry.d.ts
CHANGED
|
@@ -69,6 +69,8 @@ export { getCategoryForDetail, listRootCategories, listFeaturedCategories, listM
|
|
|
69
69
|
export { getGroupedListingForDetail, getGroupedListingWithItems, listGroupedListings, listFeaturedGroupedListings, listSitemapGroupedListings, getGroupsForProduct, getGroupsWithItemsForProduct, GROUPED_LISTINGS_PAGE_SIZE, GROUPED_LISTINGS_FEATURED_LIMIT, GROUPED_LISTINGS_SITEMAP_LIMIT, buildGroupedListingMetadata, renderGroupedListingOg, type GroupedListingWithItems, type ListGroupedListingsParams, type SitemapGroupedListing, type GroupedListingMetadataOptions, } from "./_internal/server/features/grouped/index";
|
|
70
70
|
export { createCheckoutOrderAction, attachPaymentAction, verifyAndPlaceGatewayOrderAction, previewCheckoutPricing, resolveShippingCost, formatShippingAddress, CHECKOUT_DEFAULT_COMMISSIONS, CHECKOUT_PAYMENT_METHODS, type CreateCheckoutOrderInput, type VerifyAndPlaceGatewayOrderInput, type CheckoutOrderResult, type CheckoutPaymentMethod, type CheckoutPricingPreviewInput, type CheckoutPricingPreview, } from "./_internal/server/features/checkout/index";
|
|
71
71
|
export { unitPriceFor, lineTotalFor, sumGroupGst, computePreOrderDepositAmount, type GroupGstSummary, type GstRateSlice, } from "./_internal/shared/checkout/order-math";
|
|
72
|
+
export { computeGroupCouponDiscount, computeCartCouponDiscount, type GroupCouponDiscountResult, } from "./_internal/shared/checkout/coupon-discount";
|
|
73
|
+
export { refundCapacity, refundableBase, committedRefundTotal, platformFeeWithheld, wouldBeFullRefund, MONEY_EPSILON, type RefundCapacity, type RefundableOrderLike, } from "./_internal/shared/checkout/refundable-base";
|
|
72
74
|
export { processRefundAction, type ProcessRefundInput, } from "./_internal/server/features/refunds/actions";
|
|
73
75
|
export { getSublistingCategoryForDetail } from "./_internal/server/features/sublisting-categories/index";
|
|
74
76
|
export { getStoreForDetail, listStoreProductsInitial, listStoreAuctionsInitial, listStorePreOrdersInitial, listSitemapStores, STORES_PAGE_SIZE, STORES_PRODUCTS_PAGE_SIZE, STORES_SITEMAP_LIMIT, STORES_FEATURED_LIMIT, } from "./_internal/server/features/stores/index";
|
package/dist/server-entry.js
CHANGED
|
@@ -107,6 +107,33 @@ export { createCheckoutOrderAction, attachPaymentAction, verifyAndPlaceGatewayOr
|
|
|
107
107
|
// order recorded none — with the verify-side mismatch guard omitting it too, so
|
|
108
108
|
// the three were consistently wrong and the undercharge was undetectable.
|
|
109
109
|
export { unitPriceFor, lineTotalFor, sumGroupGst, computePreOrderDepositAmount, } from "./_internal/shared/checkout/order-math.js";
|
|
110
|
+
/*
|
|
111
|
+
* The coupon discount, exported for the SAME reason `sumGroupGst` above was —
|
|
112
|
+
* and it is the third defect of that exact shape in this one route.
|
|
113
|
+
*
|
|
114
|
+
* `/api/payment/create-order` decides what the gateway CAPTURES, and it had no
|
|
115
|
+
* coupon term anywhere in the file (measured: zero occurrences). So a buyer
|
|
116
|
+
* with a coupon was shown ₹X−discount, charged ₹X, and had ₹X−discount
|
|
117
|
+
* recorded against their order. The post-capture guard is one-sided
|
|
118
|
+
* (`paid < expected − 1`), so an OVER-capture never trips it — which is why
|
|
119
|
+
* this survived: every number inside our own system agreed, and only the
|
|
120
|
+
* buyer's card statement disagreed.
|
|
121
|
+
*
|
|
122
|
+
* Pure math, no Firestore, no server-only imports — same contract as the
|
|
123
|
+
* order-math block above.
|
|
124
|
+
*/
|
|
125
|
+
export { computeGroupCouponDiscount, computeCartCouponDiscount, } from "./_internal/shared/checkout/coupon-discount.js";
|
|
126
|
+
/*
|
|
127
|
+
* Refund capacity. Exported because the admin refund ROUTE carried its own
|
|
128
|
+
* copy of the `amount >= totalPrice` test (D3) — a second answer to "is this
|
|
129
|
+
* refund full", already wrong, in a file that cannot deep-import
|
|
130
|
+
* `_internal/shared`. One implementation, or they drift again.
|
|
131
|
+
*
|
|
132
|
+
* `platformFeeWithheld` is the single worst money defect's fix (D32): it
|
|
133
|
+
* returns the fee ACTUALLY CHARGED, never a recomputed percentage, which is
|
|
134
|
+
* how a ₹5,000 order came to withhold ₹118 from a buyer who paid ₹11.80.
|
|
135
|
+
*/
|
|
136
|
+
export { refundCapacity, refundableBase, committedRefundTotal, platformFeeWithheld, wouldBeFullRefund, MONEY_EPSILON, } from "./_internal/shared/checkout/refundable-base.js";
|
|
110
137
|
// S-SBUNI-RULES: refund action
|
|
111
138
|
export { processRefundAction, } from "./_internal/server/features/refunds/actions.js";
|
|
112
139
|
// S3: sublisting categories data layer
|
package/dist/server.d.ts
CHANGED
|
@@ -19,6 +19,26 @@ export type { DegradedReadReport } from "./errors/safe-read";
|
|
|
19
19
|
export { ServerErrorsRepository, serverErrorsRepository, } from "./features/server-errors/repository/server-errors.repository";
|
|
20
20
|
export { SERVER_ERRORS_COLLECTION, SERVER_ERROR_FIELDS, SERVER_ERROR_STACK_MAX_BYTES, SERVER_ERROR_RETENTION_DAYS, } from "./features/server-errors/schemas/firestore";
|
|
21
21
|
export type { ServerErrorDocument, ServerErrorSource, } from "./features/server-errors/schemas/firestore";
|
|
22
|
+
export { GatewayEventsRepository, gatewayEventsRepository, } from "./features/gateway-events/repository/gateway-events.repository";
|
|
23
|
+
export type { GatewayEventClaimInput, GatewayEventClaimResult, GatewayEventSettleInput, } from "./features/gateway-events/repository/gateway-events.repository";
|
|
24
|
+
export { GATEWAY_EVENTS_COLLECTION, GATEWAY_EVENT_FIELDS, GATEWAY_EVENT_RETENTION_DAYS, GATEWAY_EVENT_LEASE_SECONDS, GATEWAY_EVENT_MAX_ATTEMPTS, GATEWAY_EVENT_PAYLOAD_MAX_BYTES, GATEWAY_EVENT_ERROR_MAX_BYTES, createGatewayEventId, } from "./features/gateway-events/schemas/firestore";
|
|
25
|
+
export type { GatewayEventDocument, GatewayEventKind, GatewayEventStatus, } from "./features/gateway-events/schemas/firestore";
|
|
26
|
+
export { ingestGatewayEvent, settleGatewayEvent, statusForDispatch, resolveDuplicateDelivery, redactGatewayPayload, } from "./_internal/server/features/gateway-events";
|
|
27
|
+
export type { IngestGatewayEventInput, SettleGatewayEventInput, DuplicateAction, DuplicateResolution, } from "./_internal/server/features/gateway-events";
|
|
28
|
+
export { PaymentCasesRepository, paymentCasesRepository, } from "./features/payment-cases/repository/payment-cases.repository";
|
|
29
|
+
export type { OpenCaseInput, OpenCaseResult, ResolveCaseInput, } from "./features/payment-cases/repository/payment-cases.repository";
|
|
30
|
+
export { PAYMENT_CASES_COLLECTION, PAYMENT_CASE_FIELDS, PAYMENT_CASE_KINDS, PAYMENT_CASE_STATUSES, PAYMENT_CASE_ACTIVE_STATUSES, PAYMENT_CASE_SEVERITY_RANK, PAYMENT_CASE_RESOLUTION_MIN, createPaymentCaseId, } from "./features/payment-cases/schemas/firestore";
|
|
31
|
+
export type { PaymentCaseDocument, PaymentCaseKind, PaymentCaseStatus, PaymentCaseSeverity, } from "./features/payment-cases/schemas/firestore";
|
|
32
|
+
export { ingestDispute, reconcileDisputes, DISPUTE_EVENT_PREFIX, } from "./_internal/server/features/payment-cases";
|
|
33
|
+
export type { DisputeWebhookEntity } from "./_internal/server/features/payment-cases";
|
|
34
|
+
export { ObligationsRepository, obligationsRepository, } from "./features/obligations/repository/obligations.repository";
|
|
35
|
+
export type { OpenObligationInput, CloseObligationInput, } from "./features/obligations/repository/obligations.repository";
|
|
36
|
+
export { ProtectionClaimsRepository, protectionClaimsRepository, } from "./features/protection-claims/repository/protection-claims.repository";
|
|
37
|
+
export type { FileClaimInput } from "./features/protection-claims/repository/protection-claims.repository";
|
|
38
|
+
export { PROTECTION_CLAIMS_COLLECTION, PROTECTION_CLAIM_FIELDS, PROTECTION_CLAIM_ACTIVE_STATUSES, PROTECTION_CLAIM_DETAIL_MIN, PROTECTION_CLAIM_DETAIL_MAX, ALL_PROTECTION_CLAIM_STATUSES, ALL_PROTECTION_CLAIM_REASONS, REASON_TO_KIND, createProtectionClaimId, } from "./features/protection-claims/schemas/firestore";
|
|
39
|
+
export type { ProtectionClaimDocument, ProtectionClaimStatus, ProtectionClaimReason, } from "./features/protection-claims/schemas/firestore";
|
|
40
|
+
export { fileProtectionClaimAction, adjudicateProtectionClaimAction, getMyProtectionClaimsAction, canClaimProtection, } from "./_internal/server/features/protection-claims";
|
|
41
|
+
export type { FileProtectionClaimInput } from "./_internal/server/features/protection-claims";
|
|
22
42
|
export { wrapAction, isOk, unwrap, } from "./_internal/shared/types/action-result";
|
|
23
43
|
export type { ActionResult } from "./_internal/shared/types/action-result";
|
|
24
44
|
export { setActionErrorReporter, hasActionErrorReporter, } from "./_internal/shared/types/action-error-reporter";
|
|
@@ -192,6 +212,23 @@ export { updateCategory } from "./features/categories/server";
|
|
|
192
212
|
export { sendCheckoutValueOtp, verifyCheckoutValueOtp, isCheckoutValueOtpVerified, } from "./features/checkout/server";
|
|
193
213
|
export { FailedCheckoutRepository, failedCheckoutRepository } from "./features/checkout/server";
|
|
194
214
|
export { reconcileOrderShipping } from "./_internal/server/features/shipping/reconcile";
|
|
215
|
+
export { submitShippingEvidence, approveShippingReimbursement, } from "./_internal/server/features/shipping/reimbursement";
|
|
216
|
+
export type { SubmitShippingEvidenceInput, ApproveShippingReimbursementInput, } from "./_internal/server/features/shipping/reimbursement";
|
|
217
|
+
export { cancelOrderWithRefund } from "./_internal/server/features/orders/cancellation-refund";
|
|
218
|
+
export type { CancelWithRefundOptions, CancelWithRefundResult, } from "./_internal/server/features/orders/cancellation-refund";
|
|
219
|
+
/**
|
|
220
|
+
* `admin_adjustment`'s first human writer (D48).
|
|
221
|
+
*
|
|
222
|
+
* Public for the same reason `cancelOrderWithRefund` above is: the consumer
|
|
223
|
+
* owns `POST /api/admin/points`, and **there is no `./_internal/*` subpath**, so
|
|
224
|
+
* a consumer route cannot reach it any other way.
|
|
225
|
+
*
|
|
226
|
+
* 🛑 Export the ACTION, not the repository's `append`. `append` would let a
|
|
227
|
+
* route write any kind with any actor; this function fixes the kind, applies
|
|
228
|
+
* the credit-only expiry, writes the `adminAuditLog` row and notifies the
|
|
229
|
+
* buyer. A route reaching past it would silently skip three of those.
|
|
230
|
+
*/
|
|
231
|
+
export { adjustUserPoints } from "./_internal/server/features/points/adjust";
|
|
195
232
|
export { pointsRepository, PointsRepository } from "./features/points/repository/points.repository";
|
|
196
233
|
export type { FailedCheckoutMeta, FailedPaymentMeta } from "./features/checkout/server";
|
|
197
234
|
export { EmailButton, EmailColumn, EmailContainer, EmailDivider, EmailDoc, EmailFooter, EmailHeader, EmailImage, EmailLink, EmailRow, } from "./features/email";
|
|
@@ -562,3 +599,8 @@ export { configurePlatformSupplier, getPlatformSupplier, resetPlatformSupplier,
|
|
|
562
599
|
export type { PlatformSupplierIdentity } from "./_internal/shared/features/site-settings/supplier-of-record";
|
|
563
600
|
export { ShiprocketShippingProvider } from "./providers/shipping-shiprocket/index";
|
|
564
601
|
export type { ShiprocketConfig } from "./providers/shipping-shiprocket/index";
|
|
602
|
+
export { fileGrievanceAction, recordGrievanceFirstResponseAction, } from "./_internal/server/features/grievance";
|
|
603
|
+
export type { FileGrievanceInput } from "./_internal/server/features/grievance";
|
|
604
|
+
export { GRIEVANCE_PERIODS } from "./features/support/schemas/firestore";
|
|
605
|
+
export { getRateableItemsAction, rateOrderItemAction, markOrderCompleteAction, } from "./_internal/server/features/order-completion";
|
|
606
|
+
export type { RateableOrderItem, RateOrderItemInput, } from "./_internal/server/features/order-completion";
|
package/dist/server.js
CHANGED
|
@@ -51,6 +51,44 @@ export { safeRead, installDegradedReadReporter, } from "./errors/safe-read.js";
|
|
|
51
51
|
// Used by routeHandler, wrapJobHandler (workstream 14), and the safeRead reporter.
|
|
52
52
|
export { ServerErrorsRepository, serverErrorsRepository, } from "./features/server-errors/repository/server-errors.repository.js";
|
|
53
53
|
export { SERVER_ERRORS_COLLECTION, SERVER_ERROR_FIELDS, SERVER_ERROR_STACK_MAX_BYTES, SERVER_ERROR_RETENTION_DAYS, } from "./features/server-errors/schemas/firestore.js";
|
|
54
|
+
/*
|
|
55
|
+
* [SERVER-ONLY] gatewayEvents — the durable inbox for payment-gateway webhooks.
|
|
56
|
+
*
|
|
57
|
+
* Exported from `server.ts` ONLY, never `index.ts`. The repository's import
|
|
58
|
+
* chain reaches `firebase-admin` through `providers/db-firebase`, and a symbol
|
|
59
|
+
* reachable from the main barrel drags that into the CLIENT bundle — which
|
|
60
|
+
* fails the Turbopack production build on every page (Root Cause #6/#24), since
|
|
61
|
+
* `firebase-admin/app` is a static top-level import.
|
|
62
|
+
*/
|
|
63
|
+
export { GatewayEventsRepository, gatewayEventsRepository, } from "./features/gateway-events/repository/gateway-events.repository.js";
|
|
64
|
+
export { GATEWAY_EVENTS_COLLECTION, GATEWAY_EVENT_FIELDS, GATEWAY_EVENT_RETENTION_DAYS, GATEWAY_EVENT_LEASE_SECONDS, GATEWAY_EVENT_MAX_ATTEMPTS, GATEWAY_EVENT_PAYLOAD_MAX_BYTES, GATEWAY_EVENT_ERROR_MAX_BYTES, createGatewayEventId, } from "./features/gateway-events/schemas/firestore.js";
|
|
65
|
+
export { ingestGatewayEvent, settleGatewayEvent, statusForDispatch, resolveDuplicateDelivery, redactGatewayPayload, } from "./_internal/server/features/gateway-events/index.js";
|
|
66
|
+
/*
|
|
67
|
+
* [SERVER-ONLY] paymentCases — the one operator queue for money at risk.
|
|
68
|
+
*
|
|
69
|
+
* Same reason as gatewayEvents above: the repository's chain reaches
|
|
70
|
+
* `firebase-admin`, so this must never appear in `index.ts`.
|
|
71
|
+
*/
|
|
72
|
+
export { PaymentCasesRepository, paymentCasesRepository, } from "./features/payment-cases/repository/payment-cases.repository.js";
|
|
73
|
+
export { PAYMENT_CASES_COLLECTION, PAYMENT_CASE_FIELDS, PAYMENT_CASE_KINDS, PAYMENT_CASE_STATUSES, PAYMENT_CASE_ACTIVE_STATUSES, PAYMENT_CASE_SEVERITY_RANK, PAYMENT_CASE_RESOLUTION_MIN, createPaymentCaseId, } from "./features/payment-cases/schemas/firestore.js";
|
|
74
|
+
export { ingestDispute, reconcileDisputes, DISPUTE_EVENT_PREFIX, } from "./_internal/server/features/payment-cases/index.js";
|
|
75
|
+
/*
|
|
76
|
+
* [SERVER-ONLY] obligations — deadlines with money consequences.
|
|
77
|
+
*
|
|
78
|
+
* The REPOSITORY is server-only (its chain reaches firebase-admin). The pure
|
|
79
|
+
* `deadlinesFor` / `resolveDueAt` helpers and the policy registry go in the
|
|
80
|
+
* MAIN barrel instead, because a buyer page rendering "Dispatch by Thu 3 Nov"
|
|
81
|
+
* is exactly the point of them being pure — see `index.ts`.
|
|
82
|
+
*/
|
|
83
|
+
export { ObligationsRepository, obligationsRepository, } from "./features/obligations/repository/obligations.repository.js";
|
|
84
|
+
/*
|
|
85
|
+
* [SERVER-ONLY] protectionClaims — Phase 6. The first callers
|
|
86
|
+
* `adjudicateClaim()` and `protectionAvailability()` have ever had: we charge
|
|
87
|
+
* 2% / 3% for cover whose entire decision layer sat uncalled (D11).
|
|
88
|
+
*/
|
|
89
|
+
export { ProtectionClaimsRepository, protectionClaimsRepository, } from "./features/protection-claims/repository/protection-claims.repository.js";
|
|
90
|
+
export { PROTECTION_CLAIMS_COLLECTION, PROTECTION_CLAIM_FIELDS, PROTECTION_CLAIM_ACTIVE_STATUSES, PROTECTION_CLAIM_DETAIL_MIN, PROTECTION_CLAIM_DETAIL_MAX, ALL_PROTECTION_CLAIM_STATUSES, ALL_PROTECTION_CLAIM_REASONS, REASON_TO_KIND, createProtectionClaimId, } from "./features/protection-claims/schemas/firestore.js";
|
|
91
|
+
export { fileProtectionClaimAction, adjudicateProtectionClaimAction, getMyProtectionClaimsAction, canClaimProtection, } from "./_internal/server/features/protection-claims/index.js";
|
|
54
92
|
// [SERVER-ONLY] ActionResult envelope + wrapAction helper for "use server" functions.
|
|
55
93
|
// Mirrors the routeHandler envelope so client wrappers consume both surfaces uniformly.
|
|
56
94
|
export { wrapAction, isOk, unwrap, } from "./_internal/shared/types/action-result.js";
|
|
@@ -687,6 +725,36 @@ export { FailedCheckoutRepository, failedCheckoutRepository } from "./features/c
|
|
|
687
725
|
* place a parcel is marked shipped.
|
|
688
726
|
*/
|
|
689
727
|
export { reconcileOrderShipping } from "./_internal/server/features/shipping/reconcile.js";
|
|
728
|
+
/*
|
|
729
|
+
* D45's self-shipped half. Server entry only: it writes an order, appends to
|
|
730
|
+
* the points ledger, and `approveShippingReimbursement` throws on a `"system"`
|
|
731
|
+
* approver — none of which belongs anywhere a client bundle can reach.
|
|
732
|
+
*/
|
|
733
|
+
export { submitShippingEvidence, approveShippingReimbursement, } from "./_internal/server/features/shipping/reimbursement.js";
|
|
734
|
+
/*
|
|
735
|
+
* Cancel an order and settle the refund it owes (D14). SERVER ENTRY ONLY, for
|
|
736
|
+
* the same reason as its neighbour above: it calls the payment provider and
|
|
737
|
+
* writes to `orders` and `paymentCases`.
|
|
738
|
+
*
|
|
739
|
+
* Public because the consumer owns the seller/admin order PATCH route, which is
|
|
740
|
+
* the one cancel path that can reach a DISPATCHED order — the two buyer paths
|
|
741
|
+
* refuse that case before it gets here. There is no `./_internal/*` subpath, so
|
|
742
|
+
* a consumer route cannot reach it any other way.
|
|
743
|
+
*/
|
|
744
|
+
export { cancelOrderWithRefund } from "./_internal/server/features/orders/cancellation-refund.js";
|
|
745
|
+
/**
|
|
746
|
+
* `admin_adjustment`'s first human writer (D48).
|
|
747
|
+
*
|
|
748
|
+
* Public for the same reason `cancelOrderWithRefund` above is: the consumer
|
|
749
|
+
* owns `POST /api/admin/points`, and **there is no `./_internal/*` subpath**, so
|
|
750
|
+
* a consumer route cannot reach it any other way.
|
|
751
|
+
*
|
|
752
|
+
* 🛑 Export the ACTION, not the repository's `append`. `append` would let a
|
|
753
|
+
* route write any kind with any actor; this function fixes the kind, applies
|
|
754
|
+
* the credit-only expiry, writes the `adminAuditLog` row and notifies the
|
|
755
|
+
* buyer. A route reaching past it would silently skip three of those.
|
|
756
|
+
*/
|
|
757
|
+
export { adjustUserPoints } from "./_internal/server/features/points/adjust.js";
|
|
690
758
|
export { pointsRepository, PointsRepository } from "./features/points/repository/points.repository.js";
|
|
691
759
|
// [SERVER-ONLY] Email primitives — table-based, inline-styled components
|
|
692
760
|
// that render email-client-compatible HTML via renderToStaticMarkup. Use
|
|
@@ -1538,3 +1606,28 @@ export { configurePlatformSupplier, getPlatformSupplier, resetPlatformSupplier,
|
|
|
1538
1606
|
// credentials are empty — so it parses every response through Zod and refuses
|
|
1539
1607
|
// at construction when unconfigured. See the module header.
|
|
1540
1608
|
export { ShiprocketShippingProvider } from "./providers/shipping-shiprocket/index.js";
|
|
1609
|
+
/*
|
|
1610
|
+
* [SERVER-ONLY] grievance — Phase 10 intake and clock.
|
|
1611
|
+
*
|
|
1612
|
+
* 🛑 Intake and clock ONLY. Nothing is published: the Consumer Protection
|
|
1613
|
+
* (E-Commerce) Rules 2020 require a NAMED grievance officer and statutory
|
|
1614
|
+
* periods, and this project publishes the business name with designation
|
|
1615
|
+
* "Support" on the same generic support address (D17). The periods here are
|
|
1616
|
+
* internal defaults chosen SHORTER than any plausible statutory period, so the
|
|
1617
|
+
* clock fires early — a deadline we beat is harmless, one we miss is the thing
|
|
1618
|
+
* the regime punishes. The public page stays untouched until the owner supplies
|
|
1619
|
+
* the officer and the real numbers.
|
|
1620
|
+
*/
|
|
1621
|
+
export { fileGrievanceAction, recordGrievanceFirstResponseAction, } from "./_internal/server/features/grievance/index.js";
|
|
1622
|
+
export { GRIEVANCE_PERIODS } from "./features/support/schemas/firestore.js";
|
|
1623
|
+
/*
|
|
1624
|
+
* [SERVER-ONLY] order-completion — per-item ratings and the fast completion
|
|
1625
|
+
* path (owner's rule, 2026-10-21).
|
|
1626
|
+
*
|
|
1627
|
+
* Completion has two writers: `obligationSweep`'s `order-complete` at 7 days,
|
|
1628
|
+
* and the buyer marking it complete after rating at least one item. The second
|
|
1629
|
+
* is the "immediate disburse" path — and it needs no extra mechanism, because
|
|
1630
|
+
* `payout-release` is already blocked on `order-complete`, so closing that
|
|
1631
|
+
* obligation early opens the payout gate early as a consequence.
|
|
1632
|
+
*/
|
|
1633
|
+
export { getRateableItemsAction, rateOrderItemAction, markOrderCompleteAction, } from "./_internal/server/features/order-completion/index.js";
|