@mohasinac/appkit 3.8.1 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/client/features/live/LiveItemDetailView.js +2 -2
- package/dist/_internal/client/features/lottery/LotteryAdminEditView.d.ts +4 -4
- package/dist/_internal/client/features/lottery/LotteryAdminEditView.js +8 -8
- package/dist/_internal/client/features/lottery/LotteryAdminSlotView.d.ts +1 -1
- package/dist/_internal/client/features/lottery/LotteryAdminSlotView.js +2 -2
- package/dist/_internal/server/features/bundles/actions.js +2 -2
- package/dist/_internal/server/features/bundles/og.d.ts +1 -1
- package/dist/_internal/server/features/bundles/og.js +4 -5
- package/dist/_internal/server/features/checkout/actions.js +57 -21
- package/dist/_internal/server/features/checkout/stock-restore.d.ts +19 -0
- package/dist/_internal/server/features/checkout/stock-restore.js +80 -0
- package/dist/_internal/server/features/checkout/upi-resolution.d.ts +11 -0
- package/dist/_internal/server/features/checkout/upi-resolution.js +28 -0
- package/dist/_internal/server/features/classified/og.js +1 -1
- package/dist/_internal/server/features/digital-code/og.js +1 -1
- package/dist/_internal/server/features/item-requests/og.d.ts +2 -2
- package/dist/_internal/server/features/item-requests/og.js +4 -5
- package/dist/_internal/server/features/live/og.js +1 -1
- package/dist/_internal/server/features/lottery/adapters.d.ts +2 -2
- package/dist/_internal/server/features/lottery/adapters.js +1 -1
- package/dist/_internal/server/features/orders/actions.d.ts +28 -0
- package/dist/_internal/server/features/orders/actions.js +239 -4
- package/dist/_internal/server/features/orders/adapters.js +3 -0
- package/dist/_internal/server/features/payments/data.js +3 -2
- package/dist/_internal/server/features/payouts/actions.d.ts +2 -2
- package/dist/_internal/server/features/payouts/actions.js +4 -3
- package/dist/_internal/server/features/pre-orders/service.d.ts +1 -1
- package/dist/_internal/server/features/pre-orders/service.js +3 -2
- package/dist/_internal/server/features/prize-draws/og.js +5 -5
- package/dist/_internal/server/features/products/og.js +1 -1
- package/dist/_internal/server/features/promotions/service.js +3 -1
- package/dist/_internal/server/features/refunds/actions.d.ts +2 -2
- package/dist/_internal/server/features/refunds/actions.js +7 -6
- package/dist/_internal/server/functions/firestore.js +1 -1
- package/dist/_internal/server/functions/scheduled.d.ts +4 -1
- package/dist/_internal/server/functions/scheduled.js +26 -2
- package/dist/_internal/server/jobs/core/emiInstallmentReminder.js +1 -1
- package/dist/_internal/server/jobs/core/hardBanCascade.d.ts +4 -0
- package/dist/_internal/server/jobs/core/hardBanCascade.js +15 -4
- package/dist/_internal/server/jobs/core/hardBanReinstatement.d.ts +16 -0
- package/dist/_internal/server/jobs/core/hardBanReinstatement.js +63 -0
- package/dist/_internal/server/jobs/core/jobRunners.js +3 -1
- package/dist/_internal/server/jobs/core/onScamReportCreate.js +1 -1
- package/dist/_internal/server/jobs/core/paymentReviewAutoApprove.d.ts +10 -0
- package/dist/_internal/server/jobs/core/paymentReviewAutoApprove.js +60 -0
- package/dist/_internal/server/jobs/core/paymentWindowTimeout.d.ts +15 -0
- package/dist/_internal/server/jobs/core/paymentWindowTimeout.js +59 -0
- package/dist/_internal/server/jobs/core/pendingOrderTimeout.d.ts +7 -0
- package/dist/_internal/server/jobs/core/pendingOrderTimeout.js +32 -6
- package/dist/_internal/server/jobs/handlers/hardBanReinstatement.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/hardBanReinstatement.js +2 -0
- package/dist/_internal/server/jobs/handlers/index.d.ts +3 -0
- package/dist/_internal/server/jobs/handlers/index.js +3 -0
- package/dist/_internal/server/jobs/handlers/messages.d.ts +4 -0
- package/dist/_internal/server/jobs/handlers/messages.js +4 -0
- package/dist/_internal/server/jobs/handlers/onShipmentAllocationSync.d.ts +3 -3
- package/dist/_internal/server/jobs/handlers/onShipmentAllocationSync.js +12 -12
- package/dist/_internal/server/jobs/handlers/onShipmentItemWrite.d.ts +1 -1
- package/dist/_internal/server/jobs/handlers/onShipmentItemWrite.js +5 -5
- package/dist/_internal/server/jobs/handlers/paymentReviewAutoApprove.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/paymentReviewAutoApprove.js +2 -0
- package/dist/_internal/server/jobs/handlers/paymentWindowTimeout.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/paymentWindowTimeout.js +2 -0
- package/dist/_internal/shared/actions/action-registry.js +27 -0
- package/dist/_internal/shared/checkout/order-math.js +3 -2
- package/dist/_internal/shared/checkout/rules/_defaults.js +1 -0
- package/dist/_internal/shared/checkout/rules/preorder.rule.js +7 -0
- package/dist/_internal/shared/checkout/rules/prize-draw.rule.js +7 -0
- package/dist/_internal/shared/checkout/rules/types.d.ts +11 -0
- package/dist/_internal/shared/features/auctions/errors.js +1 -1
- package/dist/_internal/shared/features/categories/bundle-copy.d.ts +0 -1
- package/dist/_internal/shared/features/categories/bundle-copy.js +0 -1
- package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +6 -6
- package/dist/_internal/shared/features/categories/bundle-schemas.js +2 -2
- package/dist/_internal/shared/features/checkout/config.d.ts +3 -3
- package/dist/_internal/shared/features/checkout/config.js +3 -3
- package/dist/_internal/shared/features/emi/schedule.d.ts +6 -6
- package/dist/_internal/shared/features/emi/schedule.js +10 -9
- package/dist/_internal/shared/features/promotions/errors.js +1 -1
- package/dist/_internal/shared/fees/calculator.d.ts +5 -5
- package/dist/_internal/shared/fees/calculator.js +19 -19
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/constants/api-endpoints.d.ts +9 -0
- package/dist/constants/api-endpoints.js +3 -0
- package/dist/constants/field-names.d.ts +4 -0
- package/dist/constants/field-names.js +4 -0
- package/dist/features/admin/components/AdminArtView.js +2 -2
- package/dist/features/admin/components/AdminBidsView.js +2 -2
- package/dist/features/admin/components/AdminBundleEditorView.d.ts +1 -1
- package/dist/features/admin/components/AdminBundleEditorView.js +8 -8
- package/dist/features/admin/components/AdminBundlesView.js +6 -6
- package/dist/features/admin/components/AdminClassifiedView.js +2 -2
- package/dist/features/admin/components/AdminDigitalCodesView.js +2 -2
- package/dist/features/admin/components/AdminLiveView.js +2 -2
- package/dist/features/admin/components/AdminOrderEditorView.d.ts +6 -1
- package/dist/features/admin/components/AdminOrderEditorView.js +45 -5
- package/dist/features/admin/components/AdminOrdersView.js +8 -3
- package/dist/features/admin/components/AdminPayoutsView.js +2 -2
- package/dist/features/admin/components/AdminPrizeDrawsView.js +2 -2
- package/dist/features/admin/components/AdminReturnRequestsView.js +2 -2
- package/dist/features/admin/components/AdminSiteSettingsView.js +11 -11
- package/dist/features/admin/components/AdminStickersView.js +2 -2
- package/dist/features/admin/components/AdminSupportTicketDetailView.js +1 -1
- package/dist/features/admin/hooks/useAdminListingData.d.ts +1 -1
- package/dist/features/admin/hooks/useAdminListingData.js +3 -2
- package/dist/features/admin/schemas/firestore.d.ts +9 -7
- package/dist/features/admin/schemas/firestore.js +4 -3
- package/dist/features/auctions/components/AuctionBidsTable.js +3 -3
- package/dist/features/auth/checkout-value-otp.d.ts +46 -0
- package/dist/features/auth/checkout-value-otp.js +73 -0
- package/dist/features/auth/repository/user.repository.d.ts +6 -0
- package/dist/features/auth/repository/user.repository.js +19 -0
- package/dist/features/auth/schemas/firestore.d.ts +10 -0
- package/dist/features/auth/schemas/firestore.js +2 -0
- package/dist/features/cart/actions/cart-actions.d.ts +1 -1
- package/dist/features/cart/actions/cart-actions.js +4 -4
- package/dist/features/cart/components/CartView.d.ts +2 -2
- package/dist/features/cart/components/ShippingPicker.d.ts +4 -4
- package/dist/features/cart/components/ShippingPicker.js +11 -11
- package/dist/features/cart/repository/cart.repository.d.ts +1 -1
- package/dist/features/cart/repository/cart.repository.js +2 -2
- package/dist/features/cart/schemas/firestore.d.ts +2 -2
- package/dist/features/catalogue/components/CatalogueItemEditorView.js +3 -3
- package/dist/features/catalogue/components/PublicCatalogueView.js +2 -2
- package/dist/features/catalogue/schemas/validation.js +1 -1
- package/dist/features/categories/components/BundleCollage.js +2 -2
- package/dist/features/categories/components/BundleDetailView.js +2 -2
- package/dist/features/categories/components/BundleItemsPicker.d.ts +1 -1
- package/dist/features/categories/components/BundleItemsPicker.js +2 -2
- package/dist/features/categories/components/CategoryBundlesListing.js +2 -2
- package/dist/features/categories/schemas/firestore.d.ts +1 -1
- package/dist/features/categories/schemas/index.d.ts +3 -3
- package/dist/features/categories/schemas/index.js +2 -2
- package/dist/features/checkout/actions/checkout-value-otp-actions.d.ts +16 -0
- package/dist/features/checkout/actions/checkout-value-otp-actions.js +83 -0
- package/dist/features/checkout/actions/index.d.ts +1 -0
- package/dist/features/checkout/actions/index.js +1 -0
- package/dist/features/checkout/schemas/firestore.d.ts +1 -1
- package/dist/features/classified/components/index.d.ts +0 -4
- package/dist/features/classified/components/index.js +0 -2
- package/dist/features/digital-codes/components/index.d.ts +0 -4
- package/dist/features/digital-codes/components/index.js +0 -2
- package/dist/features/events/schemas/index.d.ts +1 -1
- package/dist/features/events/schemas/index.js +1 -1
- package/dist/features/homepage/components/FeaturedBundlesSection.js +2 -2
- package/dist/features/live/components/index.d.ts +0 -4
- package/dist/features/live/components/index.js +0 -2
- package/dist/features/lottery/types/index.d.ts +3 -3
- package/dist/features/lottery/types/index.js +5 -5
- package/dist/features/orders/components/OrderPaymentSummary.js +2 -2
- package/dist/features/orders/components/OrderSiblingPayments.js +1 -1
- package/dist/features/orders/components/RefundHistoryTable.js +1 -1
- package/dist/features/orders/components/RefundRequestView.js +1 -1
- package/dist/features/orders/constants/payment-window.d.ts +10 -0
- package/dist/features/orders/constants/payment-window.js +10 -0
- package/dist/features/orders/repository/orders.repository.d.ts +25 -0
- package/dist/features/orders/repository/orders.repository.js +50 -1
- package/dist/features/orders/schemas/firestore.d.ts +50 -2
- package/dist/features/orders/schemas/index.d.ts +24 -24
- package/dist/features/orders/schemas/index.js +20 -20
- package/dist/features/orders/types/index.d.ts +4 -0
- package/dist/features/orders/utils/bundle-grouping.d.ts +1 -1
- package/dist/features/orders/utils/bundle-grouping.js +1 -1
- package/dist/features/payments/schemas/index.d.ts +10 -10
- package/dist/features/payments/schemas/index.js +9 -9
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +2 -2
- package/dist/features/products/components/ArtStickersListView.d.ts +7 -0
- package/dist/features/products/components/ArtStickersListView.js +57 -0
- package/dist/features/products/components/GroupSettingsPanel.js +1 -1
- package/dist/features/products/components/MakeOfferButton.js +3 -3
- package/dist/features/products/components/MarketplaceBundleCard.d.ts +1 -1
- package/dist/features/products/components/MarketplaceBundleCard.js +2 -2
- package/dist/features/products/components/PrizeDrawCollage.js +2 -2
- package/dist/features/products/components/PrizeDrawItemsEditor.js +2 -2
- package/dist/features/products/components/PrizeRevealModal.js +1 -1
- package/dist/features/products/components/ProductDetailPageView.js +2 -9
- package/dist/features/products/components/ProductForm.js +2 -2
- package/dist/features/products/components/ProductGrid.js +2 -2
- package/dist/features/products/components/ProductsIndexListing.d.ts +13 -1
- package/dist/features/products/components/ProductsIndexListing.js +7 -5
- package/dist/features/products/components/ProductsIndexPageView.js +6 -1
- package/dist/features/products/constants/listing-tabs.d.ts +42 -17
- package/dist/features/products/constants/listing-tabs.js +25 -6
- package/dist/features/products/schemas/catalog-product.d.ts +5 -5
- package/dist/features/products/schemas/catalog-product.js +1 -1
- package/dist/features/products/schemas/firestore.d.ts +5 -5
- package/dist/features/products/schemas/firestore.js +2 -2
- package/dist/features/products/types/index.d.ts +5 -2
- package/dist/features/promotions/components/CouponCard.js +2 -2
- package/dist/features/promotions/schemas/firestore.d.ts +2 -0
- package/dist/features/promotions/schemas/firestore.js +1 -0
- package/dist/features/promotions/schemas/index.d.ts +14 -14
- package/dist/features/promotions/schemas/index.js +6 -6
- package/dist/features/scams/components/ScamProfileView.js +3 -7
- package/dist/features/scams/components/ScamRegistryView.js +2 -6
- package/dist/features/scams/schemas/firestore.d.ts +1 -1
- package/dist/features/search/components/Search.d.ts +1 -1
- package/dist/features/seller/actions/offer-actions.js +1 -1
- package/dist/features/seller/components/PrintCenterView.js +2 -2
- package/dist/features/seller/components/QuickProductForm.js +5 -5
- package/dist/features/seller/components/SellerArtView.js +2 -2
- package/dist/features/seller/components/SellerAuctionsView.js +2 -2
- package/dist/features/seller/components/SellerBidsView.js +2 -2
- package/dist/features/seller/components/SellerBundlesView.js +6 -6
- package/dist/features/seller/components/SellerClassifiedView.js +2 -2
- package/dist/features/seller/components/SellerDigitalCodesView.js +2 -2
- package/dist/features/seller/components/SellerLiveView.js +2 -2
- package/dist/features/seller/components/SellerOffersView.js +2 -2
- package/dist/features/seller/components/SellerOrdersView.js +3 -3
- package/dist/features/seller/components/SellerPayoutRequestView.js +2 -2
- package/dist/features/seller/components/SellerPayoutSettingsView.js +2 -2
- package/dist/features/seller/components/SellerPayoutsView.js +2 -2
- package/dist/features/seller/components/SellerPreOrdersView.js +2 -2
- package/dist/features/seller/components/SellerPrizeDrawsView.js +2 -2
- package/dist/features/seller/components/SellerProductShell.js +8 -8
- package/dist/features/seller/components/SellerProductsView.js +1 -1
- package/dist/features/seller/components/SellerShippingView.js +6 -6
- package/dist/features/seller/components/SellerStickersView.js +2 -2
- package/dist/features/seller/hooks/useSellerListingData.d.ts +1 -1
- package/dist/features/seller/hooks/useSellerListingData.js +3 -2
- package/dist/features/shipments/components/AdminShipmentEditorView.js +10 -10
- package/dist/features/shipments/components/AdminShipmentLotItemsView.js +4 -4
- package/dist/features/shipments/components/AdminShipmentProjectionsView.js +5 -5
- package/dist/features/shipments/components/AdminShipmentsView.js +4 -4
- package/dist/features/shipments/repository/shipment-lots.repository.d.ts +2 -2
- package/dist/features/shipments/repository/shipment-lots.repository.js +8 -8
- package/dist/features/shipments/schemas/firestore.d.ts +21 -21
- package/dist/features/shipments/schemas/firestore.js +9 -9
- package/dist/features/shipments/schemas/validation.d.ts +30 -30
- package/dist/features/shipments/schemas/validation.js +6 -6
- package/dist/features/shipments/utils/cost-allocation.d.ts +5 -5
- package/dist/features/shipments/utils/cost-allocation.js +39 -38
- package/dist/features/store-extensions/schemas/firestore.d.ts +5 -5
- package/dist/features/stores/components/StoreDetailLayoutView.js +9 -13
- package/dist/features/stores/schemas/firestore.d.ts +7 -7
- package/dist/features/stores/schemas/index.d.ts +84 -84
- package/dist/features/stores/schemas/index.js +5 -5
- package/dist/features/tester/seed-data/categories-tester-seed-data.js +1 -1
- package/dist/features/tester/seed-data/products-tester-seed-data.js +6 -6
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +9 -2
- package/dist/features/whatsapp-bot/helpers/whatsapp.d.ts +8 -1
- package/dist/features/whatsapp-bot/helpers/whatsapp.js +13 -2
- package/dist/features/whatsapp-bot/types/index.d.ts +9 -1
- package/dist/index.d.ts +4 -7
- package/dist/index.js +9 -5
- package/dist/next/routing/route-map.d.ts +2 -0
- package/dist/next/routing/route-map.js +6 -0
- package/dist/schemas/firestore-helpers.d.ts +2 -2
- package/dist/schemas/firestore-helpers.js +2 -2
- package/dist/schemas/registry.d.ts +73 -73
- package/dist/security/index.d.ts +2 -1
- package/dist/security/index.js +5 -1
- package/dist/security/pii-encrypt.d.ts +2 -53
- package/dist/security/pii-encrypt.js +19 -100
- package/dist/security/pii-mask.d.ts +67 -0
- package/dist/security/pii-mask.js +100 -0
- package/dist/seed/bids-seed-data.js +6 -6
- package/dist/seed/blog-posts-seed-data.js +1 -0
- package/dist/seed/cart-seed-data.js +13 -13
- package/dist/seed/catalogue-seed-data.js +6 -6
- package/dist/seed/categories-seed-data.js +5 -5
- package/dist/seed/claimed-coupons-seed-data.js +3 -3
- package/dist/seed/coupons-seed-data.js +20 -20
- package/dist/seed/events-seed-data.js +27 -27
- package/dist/seed/factories/bid.factory.js +1 -1
- package/dist/seed/faq-seed-data.js +20 -1
- package/dist/seed/grouped-listings-seed-data.d.ts +2 -2
- package/dist/seed/grouped-listings-seed-data.js +3 -3
- package/dist/seed/offers-seed-data.js +19 -19
- package/dist/seed/orders-seed-data.js +29 -29
- package/dist/seed/payouts-seed-data.js +7 -7
- package/dist/seed/products-auctions-seed-data.js +6 -6
- package/dist/seed/products-preorders-seed-data.d.ts +2 -2
- package/dist/seed/products-preorders-seed-data.js +1 -1
- package/dist/seed/products-standard-seed-data.js +8 -8
- package/dist/seed/scammers-seed-data.js +2 -2
- package/dist/seed/shipments-seed-data.js +29 -29
- package/dist/seed/site-settings-seed-data.js +3 -2
- package/dist/seed/store-extensions-seed-data.js +8 -8
- package/dist/seed/stores-seed-data.js +37 -8
- package/dist/seed/users-seed-data.js +38 -1
- package/dist/server-entry.d.ts +1 -3
- package/dist/server-entry.js +1 -3
- package/dist/server.d.ts +2 -1
- package/dist/server.js +3 -1
- package/dist/ui/components/PriceDisplay.js +3 -12
- package/dist/utils/number.formatter.d.ts +2 -7
- package/dist/utils/number.formatter.js +3 -8
- package/package.json +1 -1
- package/scripts/seed-cli.mjs +17 -3
- package/dist/_internal/client/scaffolds/DashboardScaffold.d.ts +0 -34
- package/dist/_internal/client/scaffolds/DashboardScaffold.js +0 -26
- package/dist/_internal/client/theme/__tests__/ThemeProvider.test.d.ts +0 -1
- package/dist/_internal/client/theme/__tests__/ThemeProvider.test.js +0 -109
- package/dist/_internal/server/features/auctions/__tests__/service.test.d.ts +0 -1
- package/dist/_internal/server/features/auctions/__tests__/service.test.js +0 -140
- package/dist/_internal/server/features/checkout/__tests__/actions.test.d.ts +0 -1
- package/dist/_internal/server/features/checkout/__tests__/actions.test.js +0 -600
- package/dist/_internal/server/features/refunds/__tests__/actions.test.d.ts +0 -1
- package/dist/_internal/server/features/refunds/__tests__/actions.test.js +0 -263
- package/dist/_internal/server/jobs/core/__tests__/auctionSettlement.test.d.ts +0 -1
- package/dist/_internal/server/jobs/core/__tests__/auctionSettlement.test.js +0 -249
- package/dist/_internal/server/jobs/core/__tests__/couponExpiry.test.d.ts +0 -1
- package/dist/_internal/server/jobs/core/__tests__/couponExpiry.test.js +0 -65
- package/dist/_internal/server/jobs/core/__tests__/listingProcessor.test.d.ts +0 -1
- package/dist/_internal/server/jobs/core/__tests__/listingProcessor.test.js +0 -163
- package/dist/_internal/server/jobs/core/__tests__/mediaTmpCleanup.test.d.ts +0 -1
- package/dist/_internal/server/jobs/core/__tests__/mediaTmpCleanup.test.js +0 -115
- package/dist/_internal/server/jobs/core/__tests__/onBidPlaced.test.d.ts +0 -1
- package/dist/_internal/server/jobs/core/__tests__/onBidPlaced.test.js +0 -201
- package/dist/_internal/server/jobs/core/__tests__/onOrderCreate.test.d.ts +0 -1
- package/dist/_internal/server/jobs/core/__tests__/onOrderCreate.test.js +0 -169
- package/dist/_internal/server/jobs/core/__tests__/onOrderStatusChange.test.d.ts +0 -1
- package/dist/_internal/server/jobs/core/__tests__/onOrderStatusChange.test.js +0 -148
- package/dist/_internal/server/jobs/core/__tests__/onProductStockChange.test.d.ts +0 -1
- package/dist/_internal/server/jobs/core/__tests__/onProductStockChange.test.js +0 -210
- package/dist/_internal/server/jobs/core/__tests__/onReviewWrite.test.d.ts +0 -1
- package/dist/_internal/server/jobs/core/__tests__/onReviewWrite.test.js +0 -190
- package/dist/_internal/server/jobs/core/__tests__/onUserBanChange.test.d.ts +0 -1
- package/dist/_internal/server/jobs/core/__tests__/onUserBanChange.test.js +0 -161
- package/dist/_internal/server/jobs/core/__tests__/payoutBatch.test.d.ts +0 -1
- package/dist/_internal/server/jobs/core/__tests__/payoutBatch.test.js +0 -302
- package/dist/_internal/server/jobs/core/__tests__/pendingOrderTimeout.test.d.ts +0 -1
- package/dist/_internal/server/jobs/core/__tests__/pendingOrderTimeout.test.js +0 -96
- package/dist/_internal/server/jobs/core/__tests__/triggerEventRaffle.test.d.ts +0 -1
- package/dist/_internal/server/jobs/core/__tests__/triggerEventRaffle.test.js +0 -252
- package/dist/_internal/server/jobs/core/__tests__/wrapJobHandler.test.d.ts +0 -1
- package/dist/_internal/server/jobs/core/__tests__/wrapJobHandler.test.js +0 -129
- package/dist/_internal/server/jobs/core/onCatalogueSubmittedForApproval.d.ts +0 -15
- package/dist/_internal/server/jobs/core/onCatalogueSubmittedForApproval.js +0 -38
- package/dist/_internal/server/providers/index.d.ts +0 -11
- package/dist/_internal/server/providers/index.js +0 -11
- package/dist/_internal/server/providers/payment/razorpay-mock.d.ts +0 -52
- package/dist/_internal/server/providers/payment/razorpay-mock.js +0 -118
- package/dist/_internal/server/providers/resolve.d.ts +0 -36
- package/dist/_internal/server/providers/resolve.js +0 -31
- package/dist/_internal/server/providers/shipping/shiprocket-mock.d.ts +0 -29
- package/dist/_internal/server/providers/shipping/shiprocket-mock.js +0 -152
- package/dist/_internal/shared/types/__tests__/action-result.test.d.ts +0 -1
- package/dist/_internal/shared/types/__tests__/action-result.test.js +0 -65
- package/dist/errors/__tests__/error-mapping.test.d.ts +0 -1
- package/dist/errors/__tests__/error-mapping.test.js +0 -122
- package/dist/errors/__tests__/safe-read.test.d.ts +0 -1
- package/dist/errors/__tests__/safe-read.test.js +0 -39
- package/dist/features/addresses/repository/__tests__/addresses.repository.test.d.ts +0 -1
- package/dist/features/addresses/repository/__tests__/addresses.repository.test.js +0 -386
- package/dist/features/admin/components/AdminListingScaffold.d.ts +0 -41
- package/dist/features/admin/components/AdminListingScaffold.js +0 -68
- package/dist/features/admin/components/QuickActionsPanel.d.ts +0 -15
- package/dist/features/admin/components/QuickActionsPanel.js +0 -5
- package/dist/features/admin/repository/__tests__/notification.repository.test.d.ts +0 -1
- package/dist/features/admin/repository/__tests__/notification.repository.test.js +0 -356
- package/dist/features/admin/repository/__tests__/site-settings.repository.test.d.ts +0 -1
- package/dist/features/admin/repository/__tests__/site-settings.repository.test.js +0 -298
- package/dist/features/auctions/repository/__tests__/bid.repository.test.d.ts +0 -1
- package/dist/features/auctions/repository/__tests__/bid.repository.test.js +0 -290
- package/dist/features/auctions/repository/auctions.repository.d.ts +0 -12
- package/dist/features/auctions/repository/auctions.repository.js +0 -42
- package/dist/features/auth/repository/__tests__/session.repository.test.d.ts +0 -1
- package/dist/features/auth/repository/__tests__/session.repository.test.js +0 -310
- package/dist/features/auth/repository/__tests__/session.test.d.ts +0 -1
- package/dist/features/auth/repository/__tests__/session.test.js +0 -146
- package/dist/features/auth/repository/__tests__/sms-counter.repository.test.d.ts +0 -1
- package/dist/features/auth/repository/__tests__/sms-counter.repository.test.js +0 -171
- package/dist/features/auth/repository/__tests__/sms-counter.test.d.ts +0 -1
- package/dist/features/auth/repository/__tests__/sms-counter.test.js +0 -88
- package/dist/features/auth/repository/__tests__/token.repository.test.d.ts +0 -1
- package/dist/features/auth/repository/__tests__/token.repository.test.js +0 -260
- package/dist/features/auth/repository/__tests__/token.test.d.ts +0 -1
- package/dist/features/auth/repository/__tests__/token.test.js +0 -140
- package/dist/features/auth/repository/__tests__/user.repository.test.d.ts +0 -1
- package/dist/features/auth/repository/__tests__/user.repository.test.js +0 -352
- package/dist/features/auth/repository/__tests__/user.test.d.ts +0 -1
- package/dist/features/auth/repository/__tests__/user.test.js +0 -226
- package/dist/features/before-after/repository/before-after.repository.d.ts +0 -13
- package/dist/features/before-after/repository/before-after.repository.js +0 -36
- package/dist/features/before-after/server.d.ts +0 -6
- package/dist/features/before-after/server.js +0 -6
- package/dist/features/cart/repository/__tests__/cart.repository.test.d.ts +0 -1
- package/dist/features/cart/repository/__tests__/cart.repository.test.js +0 -371
- package/dist/features/categories/repository/__tests__/categories.repository.test.d.ts +0 -1
- package/dist/features/categories/repository/__tests__/categories.repository.test.js +0 -813
- package/dist/features/collections/repository/collections.repository.d.ts +0 -8
- package/dist/features/collections/repository/collections.repository.js +0 -16
- package/dist/features/collections/server.d.ts +0 -6
- package/dist/features/collections/server.js +0 -6
- package/dist/features/events/repository/__tests__/event.repository.test.d.ts +0 -1
- package/dist/features/events/repository/__tests__/event.repository.test.js +0 -299
- package/dist/features/faq/repository/__tests__/faqs.repository.test.d.ts +0 -1
- package/dist/features/faq/repository/__tests__/faqs.repository.test.js +0 -311
- package/dist/features/forms/Form.d.ts +0 -25
- package/dist/features/forms/Form.js +0 -37
- package/dist/features/history/repository/__tests__/user-history.repository.test.d.ts +0 -1
- package/dist/features/history/repository/__tests__/user-history.repository.test.js +0 -180
- package/dist/features/homepage/repository/__tests__/carousel.repository.test.d.ts +0 -1
- package/dist/features/homepage/repository/__tests__/carousel.repository.test.js +0 -182
- package/dist/features/homepage/repository/__tests__/homepage-sections.repository.test.d.ts +0 -1
- package/dist/features/homepage/repository/__tests__/homepage-sections.repository.test.js +0 -185
- package/dist/features/layout/ListingLayout.d.ts +0 -34
- package/dist/features/layout/ListingLayout.js +0 -103
- package/dist/features/messages/repository/__tests__/conversations.repository.test.d.ts +0 -1
- package/dist/features/messages/repository/__tests__/conversations.repository.test.js +0 -257
- package/dist/features/orders/repository/__tests__/orders.repository.test.d.ts +0 -1
- package/dist/features/orders/repository/__tests__/orders.repository.test.js +0 -211
- package/dist/features/payments/repository/__tests__/payout.repository.test.d.ts +0 -1
- package/dist/features/payments/repository/__tests__/payout.repository.test.js +0 -292
- package/dist/features/pre-orders/repository/preorders.repository.d.ts +0 -8
- package/dist/features/pre-orders/repository/preorders.repository.js +0 -25
- package/dist/features/products/repository/__tests__/product-features.repository.test.d.ts +0 -1
- package/dist/features/products/repository/__tests__/product-features.repository.test.js +0 -329
- package/dist/features/products/repository/__tests__/products.repository.test.d.ts +0 -1
- package/dist/features/products/repository/__tests__/products.repository.test.js +0 -607
- package/dist/features/promotions/repository/__tests__/claimed-coupons.repository.test.d.ts +0 -1
- package/dist/features/promotions/repository/__tests__/claimed-coupons.repository.test.js +0 -219
- package/dist/features/promotions/repository/__tests__/coupons.repository.test.d.ts +0 -1
- package/dist/features/promotions/repository/__tests__/coupons.repository.test.js +0 -480
- package/dist/features/promotions/repository/promotions.repository.d.ts +0 -14
- package/dist/features/promotions/repository/promotions.repository.js +0 -43
- package/dist/features/reviews/repository/__tests__/reviews.repository.test.d.ts +0 -1
- package/dist/features/reviews/repository/__tests__/reviews.repository.test.js +0 -327
- package/dist/features/scams/repository/__tests__/scammer.repository.test.d.ts +0 -1
- package/dist/features/scams/repository/__tests__/scammer.repository.test.js +0 -385
- package/dist/features/search/repository/__tests__/search.repository.test.d.ts +0 -1
- package/dist/features/search/repository/__tests__/search.repository.test.js +0 -369
- package/dist/features/seller/components/SellerStatCard.d.ts +0 -14
- package/dist/features/seller/components/SellerStatCard.js +0 -6
- package/dist/features/seller/components/seller-products-styles.d.ts +0 -7
- package/dist/features/seller/components/seller-products-styles.js +0 -14
- package/dist/features/seller/repository/__tests__/offer.repository.test.d.ts +0 -1
- package/dist/features/seller/repository/__tests__/offer.repository.test.js +0 -458
- package/dist/features/seller/repository/seller.repository.d.ts +0 -22
- package/dist/features/seller/repository/seller.repository.js +0 -72
- package/dist/features/site-settings/components/__tests__/ThemeManagerView.test.d.ts +0 -1
- package/dist/features/site-settings/components/__tests__/ThemeManagerView.test.js +0 -37
- package/dist/features/stores/repository/__tests__/store.repository.test.d.ts +0 -1
- package/dist/features/stores/repository/__tests__/store.repository.test.js +0 -261
- package/dist/features/stores/repository/stores.repository.d.ts +0 -11
- package/dist/features/stores/repository/stores.repository.js +0 -37
- package/dist/features/support/repository/__tests__/support.repository.test.d.ts +0 -1
- package/dist/features/support/repository/__tests__/support.repository.test.js +0 -312
- package/dist/features/wishlist/repository/__tests__/user-wishlist.repository.test.d.ts +0 -1
- package/dist/features/wishlist/repository/__tests__/user-wishlist.repository.test.js +0 -139
- package/dist/features/wishlist/repository/wishlist.repository.d.ts +0 -13
- package/dist/features/wishlist/repository/wishlist.repository.js +0 -31
- package/dist/providers/db-firebase/__tests__/filter-aliases.test.d.ts +0 -1
- package/dist/providers/db-firebase/__tests__/filter-aliases.test.js +0 -93
- package/dist/providers/shipping-shiprocket/index.d.ts +0 -297
- package/dist/providers/shipping-shiprocket/index.js +0 -194
- package/dist/providers/shipping-shiprocket/shiprocket-provider.d.ts +0 -45
- package/dist/providers/shipping-shiprocket/shiprocket-provider.js +0 -168
- package/dist/react/contexts/ThemeContext.d.ts +0 -13
- package/dist/react/contexts/ThemeContext.js +0 -64
- package/dist/schemas/webhooks/shiprocket.d.ts +0 -30
- package/dist/schemas/webhooks/shiprocket.js +0 -22
- package/dist/seed/actions/demo-seed-actions.d.ts +0 -42
- package/dist/seed/actions/demo-seed-actions.js +0 -36
- package/dist/seed/actions/index.d.ts +0 -1
- package/dist/seed/actions/index.js +0 -1
- package/dist/seed/sub-listings-seed-data.d.ts +0 -123
- package/dist/seed/sub-listings-seed-data.js +0 -447
- package/dist/seed/tester-checklist-seed-data.d.ts +0 -2
- package/dist/seed/tester-checklist-seed-data.js +0 -248
- package/dist/ui/components/DashboardStatsCard.d.ts +0 -15
- package/dist/ui/components/DashboardStatsCard.js +0 -27
- package/dist/ui/components/DashboardStatsCard.style.css +0 -68
- package/dist/ui/components/DynamicSelect.d.ts +0 -23
- package/dist/ui/components/DynamicSelect.js +0 -77
- package/dist/ui/components/DynamicSelect.style.css +0 -101
- package/dist/ui/components/InlineCreateSelect.d.ts +0 -48
- package/dist/ui/components/InlineCreateSelect.js +0 -75
- package/dist/ui/components/ListingViewShell.d.ts +0 -37
- package/dist/ui/components/ListingViewShell.js +0 -9
- package/dist/ui/components/PaginatedMultiSelect.d.ts +0 -28
- package/dist/ui/components/PaginatedMultiSelect.js +0 -141
- package/dist/ui/components/PaginatedMultiSelect.style.css +0 -272
- package/dist/ui/components/SectionTabs.d.ts +0 -19
- package/dist/ui/components/SectionTabs.js +0 -66
- package/dist/ui/components/SectionTabs.style.css +0 -164
- package/dist/ui/components/__tests__/BulkActionBar.test.d.ts +0 -1
- package/dist/ui/components/__tests__/BulkActionBar.test.js +0 -96
- package/dist/ui/components/__tests__/ListingToolbar.test.d.ts +0 -1
- package/dist/ui/components/__tests__/ListingToolbar.test.js +0 -125
- package/dist/ui/components/__tests__/new-primitives.test.d.ts +0 -1
- package/dist/ui/components/__tests__/new-primitives.test.js +0 -187
|
@@ -19,7 +19,7 @@ import { allocateShipmentCosts } from "../features/shipments/utils/cost-allocati
|
|
|
19
19
|
const NOW = new Date();
|
|
20
20
|
const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
|
|
21
21
|
const daysFromNow = (n) => new Date(NOW.getTime() + n * 86400000);
|
|
22
|
-
const
|
|
22
|
+
const SEED_LABOR_RATE_PER_HOUR = 200; // ₹200/hr
|
|
23
23
|
const SEED_MAX_HOURS_PER_DAY = 4;
|
|
24
24
|
const rawShipments = [
|
|
25
25
|
{
|
|
@@ -30,8 +30,8 @@ const rawShipments = [
|
|
|
30
30
|
status: "planning",
|
|
31
31
|
etaDate: daysFromNow(21),
|
|
32
32
|
notes: "Base Set booster boxes + a graded Charizard for the owner's personal collection.",
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
customsTotal: 45000,
|
|
34
|
+
shippingTotal: 18000,
|
|
35
35
|
laborHoursSpent: 0,
|
|
36
36
|
},
|
|
37
37
|
{
|
|
@@ -43,8 +43,8 @@ const rawShipments = [
|
|
|
43
43
|
trackingNumber: "1Z999AA10123456784",
|
|
44
44
|
carrier: "UPS",
|
|
45
45
|
etaDate: daysFromNow(9),
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
customsTotal: 30000,
|
|
47
|
+
shippingTotal: 22000,
|
|
48
48
|
laborHoursSpent: 0,
|
|
49
49
|
},
|
|
50
50
|
{
|
|
@@ -57,8 +57,8 @@ const rawShipments = [
|
|
|
57
57
|
carrier: "SF Express",
|
|
58
58
|
etaDate: daysAgo(3),
|
|
59
59
|
receivedDate: daysAgo(3),
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
customsTotal: 15000,
|
|
61
|
+
shippingTotal: 9000,
|
|
62
62
|
laborHoursSpent: 6,
|
|
63
63
|
},
|
|
64
64
|
{
|
|
@@ -71,20 +71,20 @@ const rawShipments = [
|
|
|
71
71
|
carrier: "China Post",
|
|
72
72
|
etaDate: daysAgo(30),
|
|
73
73
|
receivedDate: daysAgo(28),
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
customsTotal: 8000,
|
|
75
|
+
shippingTotal: 6000,
|
|
76
76
|
laborHoursSpent: 5,
|
|
77
77
|
},
|
|
78
78
|
];
|
|
79
79
|
const rawLots = [
|
|
80
|
-
{ id: "lot-tokyo-01", shipmentId: rawShipments[0].id, lotName: "Base Set Booster Boxes", supplierOrderRef: "TTC-88213", weightGrams: 6000,
|
|
81
|
-
{ id: "lot-tokyo-02", shipmentId: rawShipments[0].id, lotName: "Charizard PSA 9 — personal", supplierOrderRef: "TTC-88214", weightGrams: 400,
|
|
82
|
-
{ id: "lot-vault-01", shipmentId: rawShipments[1].id, lotName: "Redline Hot Wheels lot", supplierOrderRef: "VV-4471", weightGrams: 3200,
|
|
83
|
-
{ id: "lot-vault-02", shipmentId: rawShipments[1].id, lotName: "Diecast Trucks lot", supplierOrderRef: "VV-4472", weightGrams: 5400,
|
|
84
|
-
{ id: "lot-gundam-01", shipmentId: rawShipments[2].id, lotName: "MG Gunpla lot", supplierOrderRef: "GG-9021", weightGrams: 8000,
|
|
85
|
-
{ id: "lot-gundam-02", shipmentId: rawShipments[2].id, lotName: "HG Gunpla assorted", supplierOrderRef: "GG-9022", weightGrams: 3000,
|
|
86
|
-
{ id: "lot-beyblade-01", shipmentId: rawShipments[3].id, lotName: "Burst Series lot", supplierOrderRef: "BA-3301", weightGrams: 4500,
|
|
87
|
-
{ id: "lot-beyblade-02", shipmentId: rawShipments[3].id, lotName: "Launchers + stadiums", supplierOrderRef: "BA-3302", weightGrams: 2200,
|
|
80
|
+
{ id: "lot-tokyo-01", shipmentId: rawShipments[0].id, lotName: "Base Set Booster Boxes", supplierOrderRef: "TTC-88213", weightGrams: 6000, purchaseCost: 450000 },
|
|
81
|
+
{ id: "lot-tokyo-02", shipmentId: rawShipments[0].id, lotName: "Charizard PSA 9 — personal", supplierOrderRef: "TTC-88214", weightGrams: 400, purchaseCost: 220000 },
|
|
82
|
+
{ id: "lot-vault-01", shipmentId: rawShipments[1].id, lotName: "Redline Hot Wheels lot", supplierOrderRef: "VV-4471", weightGrams: 3200, purchaseCost: 180000 },
|
|
83
|
+
{ id: "lot-vault-02", shipmentId: rawShipments[1].id, lotName: "Diecast Trucks lot", supplierOrderRef: "VV-4472", weightGrams: 5400, purchaseCost: 95000, remainderItemCount: 120, remainderEstimatedValue: 360000 },
|
|
84
|
+
{ id: "lot-gundam-01", shipmentId: rawShipments[2].id, lotName: "MG Gunpla lot", supplierOrderRef: "GG-9021", weightGrams: 8000, purchaseCost: 120000 },
|
|
85
|
+
{ id: "lot-gundam-02", shipmentId: rawShipments[2].id, lotName: "HG Gunpla assorted", supplierOrderRef: "GG-9022", weightGrams: 3000, purchaseCost: 40000 },
|
|
86
|
+
{ id: "lot-beyblade-01", shipmentId: rawShipments[3].id, lotName: "Burst Series lot", supplierOrderRef: "BA-3301", weightGrams: 4500, purchaseCost: 60000 },
|
|
87
|
+
{ id: "lot-beyblade-02", shipmentId: rawShipments[3].id, lotName: "Launchers + stadiums", supplierOrderRef: "BA-3302", weightGrams: 2200, purchaseCost: 25000 },
|
|
88
88
|
];
|
|
89
89
|
const rawItems = [
|
|
90
90
|
{ id: "item-tokyo-01a", lotId: "lot-tokyo-01", shipmentId: rawShipments[0].id, title: "Base Set Booster Box (Japanese)", quantity: 6, isForSelfUse: false, price: 9500000 },
|
|
@@ -114,18 +114,18 @@ for (const shipment of rawShipments) {
|
|
|
114
114
|
const lotsForShipment = rawLots.filter((lot) => lot.shipmentId === shipment.id);
|
|
115
115
|
const allocationInputs = lotsForShipment.map((lot) => ({
|
|
116
116
|
id: lot.id,
|
|
117
|
-
|
|
117
|
+
purchaseCost: lot.purchaseCost,
|
|
118
118
|
weightGrams: lot.weightGrams,
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
mainItemsProjectedRevenue: mainItemsRevenue(lot.id),
|
|
120
|
+
remainderEstimatedValue: lot.remainderEstimatedValue,
|
|
121
121
|
itemCount: rawItems.filter((item) => item.lotId === lot.id).length,
|
|
122
122
|
}));
|
|
123
123
|
const { perLot, totals } = allocateShipmentCosts({
|
|
124
124
|
lots: allocationInputs,
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
customsTotal: shipment.customsTotal,
|
|
126
|
+
shippingTotal: shipment.shippingTotal,
|
|
127
127
|
laborHoursSpent: shipment.laborHoursSpent,
|
|
128
|
-
|
|
128
|
+
laborRatePerHour: SEED_LABOR_RATE_PER_HOUR,
|
|
129
129
|
maxHoursPerDay: SEED_MAX_HOURS_PER_DAY,
|
|
130
130
|
});
|
|
131
131
|
for (const lot of lotsForShipment) {
|
|
@@ -137,12 +137,12 @@ for (const shipment of rawShipments) {
|
|
|
137
137
|
lotName: lot.lotName,
|
|
138
138
|
supplierOrderRef: lot.supplierOrderRef,
|
|
139
139
|
weightGrams: lot.weightGrams,
|
|
140
|
-
|
|
140
|
+
purchaseCost: lot.purchaseCost,
|
|
141
141
|
images: [],
|
|
142
142
|
remainderItemCount: lot.remainderItemCount,
|
|
143
|
-
|
|
143
|
+
remainderEstimatedValue: lot.remainderEstimatedValue,
|
|
144
144
|
itemCount: rawItems.filter((item) => item.lotId === lot.id).length,
|
|
145
|
-
|
|
145
|
+
mainItemsProjectedRevenue: mainItemsRevenue(lot.id),
|
|
146
146
|
...computed,
|
|
147
147
|
});
|
|
148
148
|
}
|
|
@@ -157,10 +157,10 @@ for (const shipment of rawShipments) {
|
|
|
157
157
|
etaDate: shipment.etaDate,
|
|
158
158
|
receivedDate: shipment.receivedDate,
|
|
159
159
|
notes: shipment.notes,
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
customsTotal: shipment.customsTotal,
|
|
161
|
+
shippingTotal: shipment.shippingTotal,
|
|
162
162
|
laborHoursSpent: shipment.laborHoursSpent,
|
|
163
|
-
|
|
163
|
+
laborRatePerHour: SEED_LABOR_RATE_PER_HOUR,
|
|
164
164
|
totals,
|
|
165
165
|
totalsComputedAt: daysAgo(1),
|
|
166
166
|
createdBy: "user-admin-mohsin-c",
|
|
@@ -96,10 +96,11 @@ export const siteSettingsSeedData = {
|
|
|
96
96
|
razorpayEnabled: false,
|
|
97
97
|
upiManualEnabled: true,
|
|
98
98
|
codEnabled: true,
|
|
99
|
+
otpCheckoutThreshold: 5000,
|
|
99
100
|
},
|
|
100
101
|
emi: {
|
|
101
102
|
enabled: true,
|
|
102
|
-
|
|
103
|
+
minOrderValue: 10000,
|
|
103
104
|
tenureOptions: [2, 3, 4, 5, 6],
|
|
104
105
|
tokenPercent: 10,
|
|
105
106
|
billingDay: 5,
|
|
@@ -366,7 +367,7 @@ export const siteSettingsSeedData = {
|
|
|
366
367
|
minimumTransactionFee: 0,
|
|
367
368
|
gatewayFeePercent: 2,
|
|
368
369
|
codDepositPercent: 10,
|
|
369
|
-
|
|
370
|
+
codHandlingFeeMin: 200,
|
|
370
371
|
codHandlingFeePercent: 10,
|
|
371
372
|
sellerShippingFixed: 0,
|
|
372
373
|
platformShippingPercent: 0,
|
|
@@ -74,7 +74,7 @@ export const shippingConfigsSeedData = [
|
|
|
74
74
|
storeId: "store-kaiba-corp-cards",
|
|
75
75
|
label: "Free over ₹999",
|
|
76
76
|
method: "free",
|
|
77
|
-
|
|
77
|
+
freeAbove: 999,
|
|
78
78
|
estimatedDays: 5,
|
|
79
79
|
isDefault: true,
|
|
80
80
|
isActive: true,
|
|
@@ -84,8 +84,8 @@ export const shippingConfigsSeedData = [
|
|
|
84
84
|
storeId: "store-kaiba-corp-cards",
|
|
85
85
|
label: "Express (2 days)",
|
|
86
86
|
method: "express",
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
flatRate: 199,
|
|
88
|
+
expressSurcharge: 99,
|
|
89
89
|
estimatedDays: 2,
|
|
90
90
|
isDefault: false,
|
|
91
91
|
isActive: true,
|
|
@@ -95,7 +95,7 @@ export const shippingConfigsSeedData = [
|
|
|
95
95
|
storeId: "store-letitrip-official",
|
|
96
96
|
label: "Free over ₹999",
|
|
97
97
|
method: "free",
|
|
98
|
-
|
|
98
|
+
freeAbove: 999,
|
|
99
99
|
estimatedDays: 5,
|
|
100
100
|
isDefault: true,
|
|
101
101
|
isActive: true,
|
|
@@ -105,7 +105,7 @@ export const shippingConfigsSeedData = [
|
|
|
105
105
|
storeId: "store-letitrip-official",
|
|
106
106
|
label: "Flat ₹99",
|
|
107
107
|
method: "flat",
|
|
108
|
-
|
|
108
|
+
flatRate: 99,
|
|
109
109
|
estimatedDays: 4,
|
|
110
110
|
isDefault: false,
|
|
111
111
|
isActive: true,
|
|
@@ -212,7 +212,7 @@ export const itemRequestsSeedData = [
|
|
|
212
212
|
description: "Hunting a LOB 1st Edition Blue-Eyes, grade 8 or above. Budget ₹2,50,000.",
|
|
213
213
|
category: "trading-cards",
|
|
214
214
|
brand: "konami",
|
|
215
|
-
|
|
215
|
+
maxBudget: 250000,
|
|
216
216
|
imageUrls: [seedExtMedia("https://images.ygoprodeck.com/images/cards/cropped/89631139.jpg")],
|
|
217
217
|
status: "open",
|
|
218
218
|
replyCount: 2,
|
|
@@ -228,7 +228,7 @@ export const itemRequestsSeedData = [
|
|
|
228
228
|
description: "Need all 5 pieces in NM+ condition. Willing to pay premium for matching set.",
|
|
229
229
|
category: "trading-cards",
|
|
230
230
|
brand: "konami",
|
|
231
|
-
|
|
231
|
+
maxBudget: 150000,
|
|
232
232
|
imageUrls: [seedExtMedia("https://images.ygoprodeck.com/images/cards/cropped/33396948.jpg")],
|
|
233
233
|
status: "open",
|
|
234
234
|
replyCount: 0,
|
|
@@ -244,7 +244,7 @@ export const itemRequestsSeedData = [
|
|
|
244
244
|
description: "Sealed only. 1st Ed or Unlimited OK. For platform demo.",
|
|
245
245
|
category: "trading-cards",
|
|
246
246
|
brand: "konami",
|
|
247
|
-
|
|
247
|
+
maxBudget: 15000,
|
|
248
248
|
imageUrls: [seedExtMedia("https://images.ygoprodeck.com/images/cards/cropped/46986414.jpg")],
|
|
249
249
|
status: "fulfilled",
|
|
250
250
|
replyCount: 4,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* WHY: Provides a minimal set of seed stores for the Beyblade-focused demo catalog.
|
|
3
|
-
* WHAT: Exports
|
|
4
|
-
* kept for admin/catalogue flows that assume one exists)
|
|
5
|
-
* Beyblade specialist storefront that owns the seeded product catalog)
|
|
3
|
+
* WHAT: Exports 3 StoreDocument partials — letitrip-official (platform's first-party store,
|
|
4
|
+
* kept for admin/catalogue flows that assume one exists), beyblade-arena (the
|
|
5
|
+
* Beyblade specialist storefront that owns the seeded product catalog), and
|
|
6
|
+
* tester-qa-seller (the dedicated isTester account's own seller store).
|
|
6
7
|
*
|
|
7
8
|
* EXPORTS:
|
|
8
|
-
* storesSeedData — array of
|
|
9
|
+
* storesSeedData — array of 3 Partial<StoreDocument> for the seed runner
|
|
9
10
|
*
|
|
10
11
|
* @tag domain:stores
|
|
11
12
|
* @tag layer:seed
|
|
@@ -47,7 +48,7 @@ export const storesSeedData = [
|
|
|
47
48
|
providerId: "provider-letitrip-standard",
|
|
48
49
|
label: "Standard Shipping",
|
|
49
50
|
type: "custom",
|
|
50
|
-
fee: {
|
|
51
|
+
fee: { flat: 49, freeAbove: 999 },
|
|
51
52
|
etaDaysMin: 3,
|
|
52
53
|
etaDaysMax: 5,
|
|
53
54
|
requiresAwbUpload: true,
|
|
@@ -56,7 +57,7 @@ export const storesSeedData = [
|
|
|
56
57
|
providerId: "provider-letitrip-express",
|
|
57
58
|
label: "Express Shipping",
|
|
58
59
|
type: "custom",
|
|
59
|
-
fee: {
|
|
60
|
+
fee: { flat: 99 },
|
|
60
61
|
etaDaysMin: 1,
|
|
61
62
|
etaDaysMax: 2,
|
|
62
63
|
requiresAwbUpload: true,
|
|
@@ -65,7 +66,7 @@ export const storesSeedData = [
|
|
|
65
66
|
providerId: "provider-letitrip-pickup",
|
|
66
67
|
label: "Store Pickup (Mumbai HQ)",
|
|
67
68
|
type: "store-pickup",
|
|
68
|
-
fee: {
|
|
69
|
+
fee: { flat: 0 },
|
|
69
70
|
etaDaysMin: 0,
|
|
70
71
|
etaDaysMax: 1,
|
|
71
72
|
},
|
|
@@ -116,7 +117,7 @@ export const storesSeedData = [
|
|
|
116
117
|
shippingConfig: {
|
|
117
118
|
defaultProviderId: "provider-beyblade-standard",
|
|
118
119
|
providers: [
|
|
119
|
-
{ providerId: "provider-beyblade-standard", label: "Standard", type: "custom", fee: {
|
|
120
|
+
{ providerId: "provider-beyblade-standard", label: "Standard", type: "custom", fee: { flat: 45, freeAbove: 599 }, etaDaysMin: 3, etaDaysMax: 6, requiresAwbUpload: true },
|
|
120
121
|
],
|
|
121
122
|
},
|
|
122
123
|
isPublic: true,
|
|
@@ -126,4 +127,32 @@ export const storesSeedData = [
|
|
|
126
127
|
createdAt: daysAgo(150),
|
|
127
128
|
updatedAt: daysAgo(4),
|
|
128
129
|
},
|
|
130
|
+
// ── Store 3: Tester QA Seller Store (owned by the dedicated isTester account) ──
|
|
131
|
+
{
|
|
132
|
+
id: "store-tester-qa-seller",
|
|
133
|
+
storeSlug: "store-tester-qa-seller",
|
|
134
|
+
ownerId: "user-tester-qa",
|
|
135
|
+
storeName: "Tester QA Seller Store",
|
|
136
|
+
storeDescription: "Personal seller store for the dedicated QA tester account — used to exercise seller-side flows (listing, orders, payouts) from the Tester Hub checklist.",
|
|
137
|
+
storeCategory: "category-spinning-tops",
|
|
138
|
+
storeLogoURL: seedExtMedia("https://picsum.photos/seed/store-logo-tester-qa-seller-20260101/400/400"),
|
|
139
|
+
storeBannerURL: seedExtMedia("https://picsum.photos/seed/store-banner-tester-qa-seller-20260101/1600/400"),
|
|
140
|
+
status: STORE_FIELDS.STATUS_VALUES.ACTIVE,
|
|
141
|
+
bio: "QA tester's own seller store — auto-approved via the isTester flag.",
|
|
142
|
+
location: "Bengaluru, Karnataka, India",
|
|
143
|
+
returnPolicy: "N/A — QA test store.",
|
|
144
|
+
shippingPolicy: "N/A — QA test store.",
|
|
145
|
+
shippingConfig: {
|
|
146
|
+
defaultProviderId: "provider-tester-standard",
|
|
147
|
+
providers: [
|
|
148
|
+
{ providerId: "provider-tester-standard", label: "Standard", type: "custom", fee: { flat: 49, freeAbove: 999 }, etaDaysMin: 3, etaDaysMax: 5, requiresAwbUpload: true },
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
isPublic: true,
|
|
152
|
+
isVacationMode: false,
|
|
153
|
+
stats: { totalProducts: 0, itemsSold: 0, totalReviews: 0, averageRating: 0 },
|
|
154
|
+
capabilities: ["host_preorders", "verified_seller", "create_coupons"],
|
|
155
|
+
createdAt: daysAgo(1),
|
|
156
|
+
updatedAt: daysAgo(1),
|
|
157
|
+
},
|
|
129
158
|
];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* WHY: Provides 18 seed user accounts covering all marketplace roles and demographics.
|
|
3
|
-
* WHAT: Exports 18 UserDocument partials — 1 admin, 7 sellers (store owners
|
|
3
|
+
* WHAT: Exports 18 UserDocument partials — 1 admin, 7 sellers (store owners, one of which
|
|
4
|
+
* is also the dedicated isTester QA account), 10 buyers.
|
|
4
5
|
* All passwords are TempPass123! in the Firebase Auth emulator. UIDs match slugs.
|
|
5
6
|
*
|
|
6
7
|
* EXPORTS:
|
|
@@ -509,4 +510,40 @@ export const usersSeedData = [
|
|
|
509
510
|
createdAt: daysAgo(110),
|
|
510
511
|
updatedAt: daysAgo(3),
|
|
511
512
|
},
|
|
513
|
+
// ── Tester QA account (role stays "seller" — isTester unlocks Tester Hub + auto-approved store) ──
|
|
514
|
+
{
|
|
515
|
+
uid: "user-tester-qa",
|
|
516
|
+
email: "tester@letitrip.in",
|
|
517
|
+
phoneNumber: `${_ph}9999900018`,
|
|
518
|
+
phoneVerified: true,
|
|
519
|
+
displayName: "QA Tester",
|
|
520
|
+
photoURL: seedExtMedia("https://picsum.photos/seed/user-avatar-qa-tester-20260101/400/400"),
|
|
521
|
+
role: USER_FIELDS.ROLE_VALUES.SELLER,
|
|
522
|
+
isTester: true,
|
|
523
|
+
emailVerified: true,
|
|
524
|
+
disabled: false,
|
|
525
|
+
storeId: "store-tester-qa-seller",
|
|
526
|
+
storeSlug: "store-tester-qa-seller",
|
|
527
|
+
storeStatus: "approved",
|
|
528
|
+
payoutDetails: {
|
|
529
|
+
method: "upi",
|
|
530
|
+
upiId: "tester-qa@upi",
|
|
531
|
+
isConfigured: true,
|
|
532
|
+
},
|
|
533
|
+
publicProfile: {
|
|
534
|
+
isPublic: true,
|
|
535
|
+
showEmail: false,
|
|
536
|
+
showPhone: false,
|
|
537
|
+
showOrders: false,
|
|
538
|
+
showWishlist: false,
|
|
539
|
+
bio: "Dedicated QA tester account for the Tester QA Program — runs through the checklist against the shared test sandbox.",
|
|
540
|
+
location: "Bengaluru, Karnataka",
|
|
541
|
+
storeName: "Tester QA Seller Store",
|
|
542
|
+
storeCategory: "trading-cards",
|
|
543
|
+
},
|
|
544
|
+
stats: { totalOrders: 0, auctionsWon: 0, itemsSold: 0, reviewsCount: 0 },
|
|
545
|
+
metadata: { lastSignInTime: daysAgo(1), creationTime: daysAgo(1).toISOString(), loginCount: 5 },
|
|
546
|
+
createdAt: daysAgo(1),
|
|
547
|
+
updatedAt: daysAgo(1),
|
|
548
|
+
},
|
|
512
549
|
];
|
package/dist/server-entry.d.ts
CHANGED
|
@@ -24,13 +24,11 @@ export { PreOrderDetailPageView } from "./features/pre-orders/index";
|
|
|
24
24
|
export { AuctionDetailPageView } from "./features/auctions/index";
|
|
25
25
|
export { AuctionsListView } from "./features/auctions/components/AuctionsListView";
|
|
26
26
|
export { BundlesListView } from "./features/categories/components/BundlesListView";
|
|
27
|
-
export { ClassifiedListView } from "./features/classified/components/ClassifiedListView";
|
|
28
|
-
export { DigitalCodesListView } from "./features/digital-codes/components/DigitalCodesListView";
|
|
29
|
-
export { LiveItemsListView } from "./features/live/components/LiveItemsListView";
|
|
30
27
|
export { PrizeDrawsListingView } from "./features/products/components/PrizeDrawsListingView";
|
|
31
28
|
export { PrizeDrawDetailPageView } from "./features/products/components/PrizeDrawDetailPageView";
|
|
32
29
|
export { ProductDetailPageView } from "./features/products/components/ProductDetailPageView";
|
|
33
30
|
export { ProductsIndexPageView } from "./features/products/components/ProductsIndexPageView";
|
|
31
|
+
export { ArtStickersListView } from "./features/products/components/ArtStickersListView";
|
|
34
32
|
export { ReviewsIndexPageView } from "./features/reviews/components/ReviewsIndexPageView";
|
|
35
33
|
export { ReviewDetailPageView } from "./features/reviews/components/ReviewDetailPageView";
|
|
36
34
|
export { StoresIndexPageView } from "./features/stores/components/StoresIndexPageView";
|
package/dist/server-entry.js
CHANGED
|
@@ -29,13 +29,11 @@ export { PreOrderDetailPageView } from "./features/pre-orders/index";
|
|
|
29
29
|
export { AuctionDetailPageView } from "./features/auctions/index";
|
|
30
30
|
export { AuctionsListView } from "./features/auctions/components/AuctionsListView";
|
|
31
31
|
export { BundlesListView } from "./features/categories/components/BundlesListView";
|
|
32
|
-
export { ClassifiedListView } from "./features/classified/components/ClassifiedListView";
|
|
33
|
-
export { DigitalCodesListView } from "./features/digital-codes/components/DigitalCodesListView";
|
|
34
|
-
export { LiveItemsListView } from "./features/live/components/LiveItemsListView";
|
|
35
32
|
export { PrizeDrawsListingView } from "./features/products/components/PrizeDrawsListingView";
|
|
36
33
|
export { PrizeDrawDetailPageView } from "./features/products/components/PrizeDrawDetailPageView";
|
|
37
34
|
export { ProductDetailPageView } from "./features/products/components/ProductDetailPageView";
|
|
38
35
|
export { ProductsIndexPageView } from "./features/products/components/ProductsIndexPageView";
|
|
36
|
+
export { ArtStickersListView } from "./features/products/components/ArtStickersListView";
|
|
39
37
|
export { ReviewsIndexPageView } from "./features/reviews/components/ReviewsIndexPageView";
|
|
40
38
|
export { ReviewDetailPageView } from "./features/reviews/components/ReviewDetailPageView";
|
|
41
39
|
export { StoresIndexPageView } from "./features/stores/components/StoresIndexPageView";
|
package/dist/server.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { SERVER_ERRORS_COLLECTION, SERVER_ERROR_FIELDS, SERVER_ERROR_STACK_MAX_B
|
|
|
6
6
|
export type { ServerErrorDocument, ServerErrorSource, } from "./features/server-errors/schemas/firestore";
|
|
7
7
|
export { wrapAction, isOk, unwrap, } from "./_internal/shared/types/action-result";
|
|
8
8
|
export type { ActionResult } from "./_internal/shared/types/action-result";
|
|
9
|
-
export { attachPaymentProofAction, adminVerifyPaymentAction, } from "./_internal/server/features/orders/actions";
|
|
9
|
+
export { attachPaymentProofAction, adminVerifyPaymentAction, adminRequestProofReuploadAction, adminRejectPaymentAsFraudAction, raiseOrderDisputeAction, } from "./_internal/server/features/orders/actions";
|
|
10
10
|
export { wrapJobHandler, wrapScheduleHandler, wrapTriggerHandler, wrapCallableHandler, } from "./_internal/server/jobs/core/wrapJobHandler";
|
|
11
11
|
export { analyzeLogs } from "./_internal/server/features/maintenance/analyze";
|
|
12
12
|
export type { AnalyzeOptions, AnalyzeReport, } from "./_internal/server/features/maintenance/analyze";
|
|
@@ -262,6 +262,7 @@ export { grantCheckoutConsentViaSms } from "./features/checkout/server";
|
|
|
262
262
|
export { sendCheckoutConsentOtp } from "./features/checkout/server";
|
|
263
263
|
export { verifyCheckoutConsentOtp } from "./features/checkout/server";
|
|
264
264
|
export { grantAdminCheckoutBypass } from "./features/checkout/server";
|
|
265
|
+
export { sendCheckoutValueOtp, verifyCheckoutValueOtp, isCheckoutValueOtpVerified, } from "./features/checkout/server";
|
|
265
266
|
export { EmailButton, EmailColumn, EmailContainer, EmailDivider, EmailDoc, EmailFooter, EmailHeader, EmailImage, EmailLink, EmailRow, } from "./features/email";
|
|
266
267
|
export type { EmailButtonProps, EmailColumnProps, EmailContainerProps, EmailDividerProps, EmailDocProps, EmailFooterProps, EmailHeaderProps, EmailImageProps, EmailLinkProps, EmailRowProps, EmailTone, } from "./features/email";
|
|
267
268
|
export { sendContactEmail } from "./features/contact/server";
|
package/dist/server.js
CHANGED
|
@@ -12,7 +12,7 @@ export { SERVER_ERRORS_COLLECTION, SERVER_ERROR_FIELDS, SERVER_ERROR_STACK_MAX_B
|
|
|
12
12
|
// Mirrors the routeHandler envelope so client wrappers consume both surfaces uniformly.
|
|
13
13
|
export { wrapAction, isOk, unwrap, } from "./_internal/shared/types/action-result";
|
|
14
14
|
// [SERVER-ONLY] P-1 manual payment proof server actions.
|
|
15
|
-
export { attachPaymentProofAction, adminVerifyPaymentAction, } from "./_internal/server/features/orders/actions";
|
|
15
|
+
export { attachPaymentProofAction, adminVerifyPaymentAction, adminRequestProofReuploadAction, adminRejectPaymentAsFraudAction, raiseOrderDisputeAction, } from "./_internal/server/features/orders/actions";
|
|
16
16
|
// [SERVER-ONLY] Cloud Function handler wrappers — persist exceptions to
|
|
17
17
|
// serverErrors (source: "function") before re-throwing so retry semantics
|
|
18
18
|
// are preserved. Apply at the consumer's runtime adapter boundary.
|
|
@@ -762,6 +762,8 @@ export { sendCheckoutConsentOtp } from "./features/checkout/server";
|
|
|
762
762
|
export { verifyCheckoutConsentOtp } from "./features/checkout/server";
|
|
763
763
|
// grantAdminCheckoutBypass - Admin bypass that skips OTP + payment for admin-placed orders.
|
|
764
764
|
export { grantAdminCheckoutBypass } from "./features/checkout/server";
|
|
765
|
+
// [SERVER-ONLY] Tier PP — high-value checkout OTP gate (distinct from the shipping-consent OTP above).
|
|
766
|
+
export { sendCheckoutValueOtp, verifyCheckoutValueOtp, isCheckoutValueOtpVerified, } from "./features/checkout/server";
|
|
765
767
|
// [SERVER-ONLY] Email primitives — table-based, inline-styled components
|
|
766
768
|
// that render email-client-compatible HTML via renderToStaticMarkup. Use
|
|
767
769
|
// these instead of authoring raw <table>/<tr>/<td> in email templates.
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Span } from "./Typography";
|
|
3
3
|
import { Row } from "./Layout";
|
|
4
|
-
import { getDefaultCurrency
|
|
5
|
-
|
|
6
|
-
return new Intl.NumberFormat(getDefaultLocale(), {
|
|
7
|
-
style: "currency",
|
|
8
|
-
currency,
|
|
9
|
-
maximumFractionDigits: 2,
|
|
10
|
-
}).format(amount);
|
|
11
|
-
}
|
|
12
|
-
function formatPercent(value) {
|
|
13
|
-
return `${Math.round(value * 100)}%`;
|
|
14
|
-
}
|
|
4
|
+
import { getDefaultCurrency } from "../../core/baseline-resolver";
|
|
5
|
+
import { formatCurrency, formatPercentage } from "../../utils/number.formatter";
|
|
15
6
|
export function PriceDisplay({ amount, currency = getDefaultCurrency(), originalAmount, variant = "compact", className, }) {
|
|
16
7
|
const hasDiscount = originalAmount !== undefined && originalAmount > amount;
|
|
17
8
|
const discountPct = hasDiscount
|
|
@@ -23,5 +14,5 @@ export function PriceDisplay({ amount, currency = getDefaultCurrency(), original
|
|
|
23
14
|
const originalClass = variant === "detail"
|
|
24
15
|
? "appkit-price-display__original appkit-price-display__original--detail"
|
|
25
16
|
: "appkit-price-display__original appkit-price-display__original--compact";
|
|
26
|
-
return (_jsxs(Row, { wrap: true, align: "baseline", gap: "xs", className: `appkit-price-display ${className ?? ""}`.trim(), children: [_jsx(Span, { className: priceClass, children: formatCurrency(amount, currency) }), hasDiscount && (_jsxs(_Fragment, { children: [_jsx(Span, { className: originalClass, children: formatCurrency(originalAmount, currency) }), _jsxs(Span, { className: "appkit-price-display__discount", children: ["-",
|
|
17
|
+
return (_jsxs(Row, { wrap: true, align: "baseline", gap: "xs", className: `appkit-price-display ${className ?? ""}`.trim(), children: [_jsx(Span, { className: priceClass, children: formatCurrency(amount, currency) }), hasDiscount && (_jsxs(_Fragment, { children: [_jsx(Span, { className: originalClass, children: formatCurrency(originalAmount, currency) }), _jsxs(Span, { className: "appkit-price-display__discount", children: ["-", formatPercentage(discountPct, 0)] })] }))] }));
|
|
27
18
|
}
|
|
@@ -5,13 +5,8 @@ export declare function formatCurrency(amount: number, currency?: string, locale
|
|
|
5
5
|
export declare function formatNumber(num: number, locale?: string, options?: {
|
|
6
6
|
decimals?: number;
|
|
7
7
|
}): string;
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
* Canonical helper for every paise-denominated amount across the codebase —
|
|
11
|
-
* see CLAUDE.md's Recurrent Root Cause Patterns for why this was previously
|
|
12
|
-
* duplicated as a local `formatPaise`/`toRupees` in 5+ admin/seller views.
|
|
13
|
-
*/
|
|
14
|
-
export declare function formatPaise(paise: number, currency?: string, locale?: string): string;
|
|
8
|
+
/** Rounds to 2 decimal places for rupee-denominated money math (avoids float drift). */
|
|
9
|
+
export declare function roundRupees(amount: number): number;
|
|
15
10
|
export declare function formatPercentage(num: number, decimals?: number): string;
|
|
16
11
|
export declare function formatFileSize(bytes: number): string;
|
|
17
12
|
export declare function formatCompactNumber(num: number): string;
|
|
@@ -17,14 +17,9 @@ export function formatNumber(num, locale, options) {
|
|
|
17
17
|
maximumFractionDigits: options?.decimals,
|
|
18
18
|
}).format(num);
|
|
19
19
|
}
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
* see CLAUDE.md's Recurrent Root Cause Patterns for why this was previously
|
|
24
|
-
* duplicated as a local `formatPaise`/`toRupees` in 5+ admin/seller views.
|
|
25
|
-
*/
|
|
26
|
-
export function formatPaise(paise, currency, locale) {
|
|
27
|
-
return formatCurrency(paise / 100, currency, locale);
|
|
20
|
+
/** Rounds to 2 decimal places for rupee-denominated money math (avoids float drift). */
|
|
21
|
+
export function roundRupees(amount) {
|
|
22
|
+
return Math.round(amount * 100) / 100;
|
|
28
23
|
}
|
|
29
24
|
export function formatPercentage(num, decimals = 0) {
|
|
30
25
|
return `${(num * 100).toFixed(decimals)}%`;
|
package/package.json
CHANGED
package/scripts/seed-cli.mjs
CHANGED
|
@@ -117,6 +117,15 @@ if (ACTION === "load" && !PII_KEY_PRESENT) {
|
|
|
117
117
|
// firebase-admin init
|
|
118
118
|
// ---------------------------------------------------------------------------
|
|
119
119
|
const require = createRequire(import.meta.url);
|
|
120
|
+
// appkit's pii-encrypt.ts calls a bare `require("crypto")` at runtime (not a
|
|
121
|
+
// static import — deliberately, so bundlers like Turbopack never see a
|
|
122
|
+
// node:module dependency and refuse to build the client bundle). A bare
|
|
123
|
+
// `require` identifier resolves via the global scope in Node ESM, so it must
|
|
124
|
+
// exist as a global before the dynamic `import("@mohasinac/appkit")` below
|
|
125
|
+
// ever triggers that code path. Only this standalone-script environment
|
|
126
|
+
// needs it — Next.js's own server bundle (webpack/Turbopack) provides an
|
|
127
|
+
// ambient `require` automatically.
|
|
128
|
+
globalThis.require = require;
|
|
120
129
|
const admin = require("firebase-admin");
|
|
121
130
|
|
|
122
131
|
function parsePrivateKey(raw) {
|
|
@@ -152,6 +161,12 @@ console.log(`✓ Connected to project: ${process.env.FIREBASE_ADMIN_PROJECT_ID |
|
|
|
152
161
|
// Pull seed data + helpers from @mohasinac/appkit
|
|
153
162
|
// ---------------------------------------------------------------------------
|
|
154
163
|
const appkit = await import("@mohasinac/appkit");
|
|
164
|
+
// PII crypto functions moved server-only in appkit 3.8.1 (they touch
|
|
165
|
+
// firebase-admin's crypto chain) — no longer exported from the main
|
|
166
|
+
// client-safe barrel, only from "@mohasinac/appkit/server". The *_PII_FIELDS
|
|
167
|
+
// / *_PII_INDEX_MAP constants are plain data and stay in the main barrel.
|
|
168
|
+
const appkitServer = await import("@mohasinac/appkit/server");
|
|
169
|
+
const { encryptPiiFields, addPiiIndices, encryptPayoutDetails, encryptPayoutBankAccount, encryptShippingConfig } = appkitServer;
|
|
155
170
|
|
|
156
171
|
const {
|
|
157
172
|
// seed data
|
|
@@ -182,9 +197,8 @@ const {
|
|
|
182
197
|
GROUPED_LISTINGS_COLLECTION, SCAMMER_COLLECTION,
|
|
183
198
|
WISHLIST_COLLECTION, HISTORY_COLLECTION, PRODUCT_FEATURES_COLLECTION,
|
|
184
199
|
TESTER_CHECKLIST_ITEM_COLLECTION,
|
|
185
|
-
// PII
|
|
186
|
-
|
|
187
|
-
encryptPayoutDetails, encryptPayoutBankAccount, encryptShippingConfig,
|
|
200
|
+
// PII field/index constants (plain data, still in the main barrel — the
|
|
201
|
+
// crypto functions themselves come from appkitServer above)
|
|
188
202
|
USER_PII_FIELDS, USER_PII_INDEX_MAP,
|
|
189
203
|
ADDRESS_PII_FIELDS, ORDER_PII_FIELDS, BID_PII_FIELDS, PAYOUT_PII_FIELDS,
|
|
190
204
|
REVIEW_PII_FIELDS, OFFER_PII_FIELDS, EVENT_ENTRY_PII_FIELDS, CHAT_PII_FIELDS,
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DashboardScaffold — admin / seller / user dashboard chrome.
|
|
3
|
-
*
|
|
4
|
-
* Responsive nav strategy (mobile-first):
|
|
5
|
-
* xs / sm — bottom nav bar (visible <lg)
|
|
6
|
-
* md — off-canvas drawer triggered by `slotMenuToggle`
|
|
7
|
-
* lg+ — sticky left sidebar (always visible)
|
|
8
|
-
*
|
|
9
|
-
* Drives nav rendering through `renderNav` so consumers can pipe in any
|
|
10
|
-
* nav config (admin/store/user groups). The scaffold owns the responsive
|
|
11
|
-
* placement; the consumer owns the items.
|
|
12
|
-
*/
|
|
13
|
-
import * as React from "react";
|
|
14
|
-
export interface DashboardScaffoldRenderContext {
|
|
15
|
-
/** Whether the off-canvas drawer is open. */
|
|
16
|
-
drawerOpen: boolean;
|
|
17
|
-
/** Imperatively toggle the drawer (consumer-supplied trigger calls this). */
|
|
18
|
-
toggleDrawer: () => void;
|
|
19
|
-
}
|
|
20
|
-
export interface DashboardScaffoldProps {
|
|
21
|
-
children: React.ReactNode;
|
|
22
|
-
/** Top breadcrumb / page-title strip. */
|
|
23
|
-
slotPageHeader?: React.ReactNode;
|
|
24
|
-
/** Navigation items — rendered into all three placements (sidebar, drawer, bottom). */
|
|
25
|
-
renderNav?: (ctx: DashboardScaffoldRenderContext) => React.ReactNode;
|
|
26
|
-
/** Compact bottom nav (mobile only). If omitted, falls back to renderNav. */
|
|
27
|
-
renderBottomNav?: (ctx: DashboardScaffoldRenderContext) => React.ReactNode;
|
|
28
|
-
/** Trigger element that toggles the off-canvas drawer (md only). */
|
|
29
|
-
slotMenuToggle?: React.ReactNode;
|
|
30
|
-
/** Initial drawer-open state. */
|
|
31
|
-
initialDrawerOpen?: boolean;
|
|
32
|
-
className?: string;
|
|
33
|
-
}
|
|
34
|
-
export declare function DashboardScaffold({ children, slotPageHeader, renderNav, renderBottomNav, slotMenuToggle, initialDrawerOpen, className, }: DashboardScaffoldProps): React.JSX.Element;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
/**
|
|
4
|
-
* DashboardScaffold — admin / seller / user dashboard chrome.
|
|
5
|
-
*
|
|
6
|
-
* Responsive nav strategy (mobile-first):
|
|
7
|
-
* xs / sm — bottom nav bar (visible <lg)
|
|
8
|
-
* md — off-canvas drawer triggered by `slotMenuToggle`
|
|
9
|
-
* lg+ — sticky left sidebar (always visible)
|
|
10
|
-
*
|
|
11
|
-
* Drives nav rendering through `renderNav` so consumers can pipe in any
|
|
12
|
-
* nav config (admin/store/user groups). The scaffold owns the responsive
|
|
13
|
-
* placement; the consumer owns the items.
|
|
14
|
-
*/
|
|
15
|
-
import * as React from "react";
|
|
16
|
-
import { Div, Main, Nav, Span, Stack } from "../../../ui";
|
|
17
|
-
import { useVisualViewportInset } from "../../../react/hooks/useVisualViewportInset";
|
|
18
|
-
export function DashboardScaffold({ children, slotPageHeader, renderNav, renderBottomNav, slotMenuToggle, initialDrawerOpen = false, className, }) {
|
|
19
|
-
const [drawerOpen, setDrawerOpen] = React.useState(initialDrawerOpen);
|
|
20
|
-
const toggleDrawer = React.useCallback(() => setDrawerOpen((v) => !v), []);
|
|
21
|
-
const ctx = { drawerOpen, toggleDrawer };
|
|
22
|
-
const isKeyboardOpen = useVisualViewportInset();
|
|
23
|
-
const nav = renderNav ? renderNav(ctx) : null;
|
|
24
|
-
const bottomNav = renderBottomNav ? renderBottomNav(ctx) : nav;
|
|
25
|
-
return (_jsxs(Div, { layout: "flex", className: `appkit-dashboard-scaffold min-h-screen ${className ?? ""}`, children: [nav ? (_jsx("aside", { className: "sticky top-0 hidden h-screen w-64 shrink-0 overflow-y-auto border-r border-[var(--appkit-color-border)] lg:block", "data-dashboard-slot": "sidebar", children: nav })) : null, nav ? (_jsxs("div", { className: `fixed inset-0 z-40 transition-transform md:block lg:hidden ${drawerOpen ? "translate-x-0" : "-translate-x-full"}`, "data-dashboard-slot": "drawer", "aria-hidden": !drawerOpen, children: [_jsx("div", { className: "absolute inset-0 bg-black/40", onClick: () => setDrawerOpen(false), role: "presentation" }), _jsx(Nav, { "aria-label": "Dashboard sidebar", className: "relative h-full w-64 overflow-y-auto bg-[var(--appkit-color-surface)] shadow-xl", children: nav })] })) : null, _jsxs(Stack, { className: "min-w-0 flex-1", children: [(slotPageHeader || slotMenuToggle) && (_jsxs("div", { className: "sticky top-0 z-20 flex items-center gap-[var(--appkit-space-3)] border-b border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] px-[var(--appkit-space-4)] py-[var(--appkit-space-2)]", "data-dashboard-slot": "page-header", children: [slotMenuToggle ? (_jsx(Span, { className: "lg:hidden", onClick: toggleDrawer, role: "presentation", children: slotMenuToggle })) : null, _jsx(Div, { className: "min-w-0 flex-1", children: slotPageHeader })] })), _jsx(Main, { className: "min-w-0 flex-1 pb-[var(--appkit-space-20)] lg:pb-[var(--appkit-space-0)]", "data-dashboard-slot": "main", children: children }), bottomNav ? (_jsx(Nav, { "aria-label": "Bottom navigation", "aria-hidden": isKeyboardOpen, className: `fixed bottom-0 left-0 right-0 z-[var(--appkit-z-bottom-nav)] border-t border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] lg:hidden transition-transform duration-200 ease-out ${isKeyboardOpen ? "translate-y-full pointer-events-none" : "translate-y-0"}`, "data-dashboard-slot": "bottom-nav", children: bottomNav })) : null] })] }));
|
|
26
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|