@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
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @mohasinac/shipping-shiprocket — Shiprocket shipping API client
|
|
3
|
-
*
|
|
4
|
-
* Thin HTTP client for the Shiprocket REST API.
|
|
5
|
-
* No credential management — caller is responsible for obtaining and
|
|
6
|
-
* passing the JWT token (see your project's platform auth layer).
|
|
7
|
-
*
|
|
8
|
-
* API base: https://apiv2.shiprocket.in/v1/external
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* import {
|
|
13
|
-
* shiprocketAuthenticate,
|
|
14
|
-
* shiprocketCreateOrder,
|
|
15
|
-
* shiprocketTrackByAWB,
|
|
16
|
-
* } from "@mohasinac/shipping-shiprocket";
|
|
17
|
-
*
|
|
18
|
-
* const { token } = await shiprocketAuthenticate({ email, password });
|
|
19
|
-
* const order = await shiprocketCreateOrder(token, orderData);
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
import { normalizeError } from "../../errors/normalize";
|
|
23
|
-
const BASE_URL = "https://apiv2.shiprocket.in/v1/external";
|
|
24
|
-
// --- Internal fetch helper ----------------------------------------------------
|
|
25
|
-
async function shiprocketFetch(endpoint, options = {}) {
|
|
26
|
-
const { token, headers = {}, ...rest } = options;
|
|
27
|
-
const reqHeaders = {
|
|
28
|
-
"Content-Type": "application/json",
|
|
29
|
-
...headers,
|
|
30
|
-
};
|
|
31
|
-
if (token)
|
|
32
|
-
reqHeaders["Authorization"] = `Bearer ${token}`;
|
|
33
|
-
const response = await fetch(`${BASE_URL}${endpoint}`, {
|
|
34
|
-
...rest,
|
|
35
|
-
headers: reqHeaders,
|
|
36
|
-
});
|
|
37
|
-
const text = await response.text();
|
|
38
|
-
let json;
|
|
39
|
-
try {
|
|
40
|
-
json = JSON.parse(text);
|
|
41
|
-
}
|
|
42
|
-
catch (_err) {
|
|
43
|
-
void normalizeError(_err);
|
|
44
|
-
throw new Error(`Shiprocket API non-JSON response ${response.status}: ${text.slice(0, 200)}`);
|
|
45
|
-
}
|
|
46
|
-
if (!response.ok) {
|
|
47
|
-
const message = json?.message ??
|
|
48
|
-
`Shiprocket API error ${response.status}`;
|
|
49
|
-
throw new Error(message);
|
|
50
|
-
}
|
|
51
|
-
return json;
|
|
52
|
-
}
|
|
53
|
-
// --- Re-export Provider Class -------------------------------------------------
|
|
54
|
-
export { ShiprocketProvider } from "./shiprocket-provider";
|
|
55
|
-
// --- API Functions (prefer ShiprocketProvider class for new code) -------------
|
|
56
|
-
/**
|
|
57
|
-
* @deprecated Use `ShiprocketProvider.authenticate()` instead.
|
|
58
|
-
* @internal
|
|
59
|
-
*/
|
|
60
|
-
export async function shiprocketAuthenticate(credentials) {
|
|
61
|
-
return shiprocketFetch("/auth/login", {
|
|
62
|
-
method: "POST",
|
|
63
|
-
body: JSON.stringify(credentials),
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* @deprecated Use `ShiprocketProvider.getPickupLocations()` instead.
|
|
68
|
-
* @internal
|
|
69
|
-
*/
|
|
70
|
-
export async function shiprocketGetPickupLocations(token) {
|
|
71
|
-
return shiprocketFetch("/settings/company/pickup", { token });
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* @deprecated Use `ShiprocketProvider.addPickupLocation()` instead.
|
|
75
|
-
* @internal
|
|
76
|
-
*/
|
|
77
|
-
export async function shiprocketAddPickupLocation(token, data) {
|
|
78
|
-
return shiprocketFetch("/settings/company/addpickup", { method: "POST", token, body: JSON.stringify(data) });
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* @deprecated Use `ShiprocketProvider.verifyPickupOTP()` instead.
|
|
82
|
-
* @internal
|
|
83
|
-
*/
|
|
84
|
-
export async function shiprocketVerifyPickupOTP(token, data) {
|
|
85
|
-
return shiprocketFetch("/settings/company/verifyOtpForPickup", { method: "POST", token, body: JSON.stringify(data) });
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* @deprecated Use `ShiprocketProvider.createShipment()` instead.
|
|
89
|
-
* @internal
|
|
90
|
-
*/
|
|
91
|
-
export async function shiprocketCreateOrder(token, order) {
|
|
92
|
-
return shiprocketFetch("/orders/create/adhoc", { method: "POST", token, body: JSON.stringify(order) });
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* @deprecated Use `ShiprocketProvider.createShipment()` instead (generates AWB internally).
|
|
96
|
-
* @internal
|
|
97
|
-
*/
|
|
98
|
-
export async function shiprocketGenerateAWB(token, params) {
|
|
99
|
-
return shiprocketFetch("/courier/assign/awb", {
|
|
100
|
-
method: "POST",
|
|
101
|
-
token,
|
|
102
|
-
body: JSON.stringify(params),
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* @deprecated Use `ShiprocketProvider.createShipment()` instead (schedules pickup internally).
|
|
107
|
-
* @internal
|
|
108
|
-
*/
|
|
109
|
-
export async function shiprocketGeneratePickup(token, params) {
|
|
110
|
-
return shiprocketFetch("/courier/generate/pickup", {
|
|
111
|
-
method: "POST",
|
|
112
|
-
token,
|
|
113
|
-
body: JSON.stringify(params),
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* @deprecated Use `ShiprocketProvider.trackShipment()` instead.
|
|
118
|
-
* @internal
|
|
119
|
-
*/
|
|
120
|
-
export async function shiprocketTrackByAWB(token, awb) {
|
|
121
|
-
return shiprocketFetch(`/courier/track/awb/${awb}`, { token });
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* @deprecated Use `ShiprocketProvider.checkServiceability()` instead.
|
|
125
|
-
* @internal
|
|
126
|
-
*/
|
|
127
|
-
export async function shiprocketCheckServiceability(token, paramsOrPickup, deliveryPostcode, weight, cod = false) {
|
|
128
|
-
const params = typeof paramsOrPickup === "string"
|
|
129
|
-
? {
|
|
130
|
-
pickup_postcode: paramsOrPickup,
|
|
131
|
-
delivery_postcode: deliveryPostcode ?? "",
|
|
132
|
-
weight: weight ?? 0,
|
|
133
|
-
cod: cod ? 1 : 0,
|
|
134
|
-
}
|
|
135
|
-
: paramsOrPickup;
|
|
136
|
-
const sp = new URLSearchParams();
|
|
137
|
-
sp.set("pickup_postcode", params.pickup_postcode);
|
|
138
|
-
sp.set("delivery_postcode", params.delivery_postcode);
|
|
139
|
-
sp.set("weight", String(params.weight));
|
|
140
|
-
if (params.cod !== undefined)
|
|
141
|
-
sp.set("cod", String(params.cod));
|
|
142
|
-
return shiprocketFetch(`/courier/serviceability/?${sp.toString()}`, { token });
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Cancel one or more Shiprocket orders by their order IDs.
|
|
146
|
-
* @deprecated Use `ShiprocketProvider.cancelShipment()` instead.
|
|
147
|
-
* @internal
|
|
148
|
-
*/
|
|
149
|
-
export async function shiprocketCancelOrder(token, orderIds) {
|
|
150
|
-
return shiprocketFetch("/orders/cancel", {
|
|
151
|
-
method: "POST",
|
|
152
|
-
token,
|
|
153
|
-
body: JSON.stringify({ ids: orderIds }),
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Fetch full order details (including nested shipment IDs) for a Shiprocket order.
|
|
158
|
-
* @deprecated Use `ShiprocketProvider.generateLabel()` instead (calls this internally).
|
|
159
|
-
* @internal
|
|
160
|
-
*/
|
|
161
|
-
export async function shiprocketGetOrderDetail(token, orderId) {
|
|
162
|
-
return shiprocketFetch(`/orders/show/${orderId}`, { token });
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Request a shipping label PDF for one or more Shiprocket shipment IDs.
|
|
166
|
-
* Returns a label URL — fetch that URL separately to get the raw PDF bytes.
|
|
167
|
-
* @deprecated Use `ShiprocketProvider.generateLabel()` instead.
|
|
168
|
-
* @internal
|
|
169
|
-
*/
|
|
170
|
-
export async function shiprocketPrintLabel(token, shipmentIds) {
|
|
171
|
-
return shiprocketFetch("/orders/print/label", {
|
|
172
|
-
method: "POST",
|
|
173
|
-
token,
|
|
174
|
-
body: JSON.stringify({ shipment_id: shipmentIds }),
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
/** Shiprocket tokens are valid for approx. 10 days */
|
|
178
|
-
export const SHIPROCKET_TOKEN_TTL_MS = 9 * 24 * 60 * 60 * 1000;
|
|
179
|
-
export function isShiprocketTokenExpired(expiry) {
|
|
180
|
-
if (!expiry)
|
|
181
|
-
return true;
|
|
182
|
-
return new Date() >= new Date(expiry);
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Public tracking URL Shiprocket exposes for every AWB. All consumers that
|
|
186
|
-
* record `trackingUrl` on an order should build it via this helper so the
|
|
187
|
-
* base URL stays single-source-of-truth.
|
|
188
|
-
*/
|
|
189
|
-
export const SHIPROCKET_TRACKING_URL_BASE = "https://shiprocket.co/tracking";
|
|
190
|
-
export function buildShiprocketTrackingUrl(awb) {
|
|
191
|
-
return `${SHIPROCKET_TRACKING_URL_BASE}/${encodeURIComponent(awb)}`;
|
|
192
|
-
}
|
|
193
|
-
/** Status saved on an order immediately after pickup is generated. */
|
|
194
|
-
export const SHIPROCKET_STATUS_PICKUP_SCHEDULED = "Pickup Scheduled";
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { IShippingProvider, CreateShipmentInput, Shipment, TrackingInfo, ServiceabilityResult } from "../../contracts/shipping";
|
|
2
|
-
import { type ShiprocketAuthRequest, type ShiprocketAddPickupRequest, type ShiprocketVerifyPickupOTPRequest, type ShiprocketPickupLocation } from "./index";
|
|
3
|
-
export interface ShiprocketProviderConfig {
|
|
4
|
-
email: string;
|
|
5
|
-
password: string;
|
|
6
|
-
/** Cached token — provider will re-authenticate if expired */
|
|
7
|
-
token?: string;
|
|
8
|
-
tokenExpiry?: Date;
|
|
9
|
-
/** Called when the provider refreshes the token so callers can persist it */
|
|
10
|
-
onTokenRefresh?: (token: string, expiry: Date) => void | Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* `IShippingProvider` implementation backed by the Shiprocket REST API.
|
|
14
|
-
*
|
|
15
|
-
* Wraps the standalone HTTP functions with token lifecycle management
|
|
16
|
-
* and maps Shiprocket-specific data shapes to the generic contract types.
|
|
17
|
-
*
|
|
18
|
-
* Register via `ProviderRegistry`:
|
|
19
|
-
* ```ts
|
|
20
|
-
* registry.register("shipping", new ShiprocketProvider(config));
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export declare class ShiprocketProvider implements IShippingProvider {
|
|
24
|
-
private token;
|
|
25
|
-
private tokenExpiry;
|
|
26
|
-
private readonly config;
|
|
27
|
-
constructor(config: ShiprocketProviderConfig);
|
|
28
|
-
private ensureToken;
|
|
29
|
-
createShipment(data: CreateShipmentInput): Promise<Shipment>;
|
|
30
|
-
trackShipment(trackingId: string): Promise<TrackingInfo>;
|
|
31
|
-
cancelShipment(shipmentId: string): Promise<void>;
|
|
32
|
-
checkServiceability(pincode: string, weight: number): Promise<ServiceabilityResult>;
|
|
33
|
-
generateLabel(shipmentId: string): Promise<ArrayBuffer>;
|
|
34
|
-
/** Authenticate and obtain a fresh token. */
|
|
35
|
-
authenticate(credentials?: ShiprocketAuthRequest): Promise<{
|
|
36
|
-
token: string;
|
|
37
|
-
expiry: Date;
|
|
38
|
-
}>;
|
|
39
|
-
/** Get all registered pickup locations. */
|
|
40
|
-
getPickupLocations(): Promise<ShiprocketPickupLocation[]>;
|
|
41
|
-
/** Add a new pickup location. */
|
|
42
|
-
addPickupLocation(data: ShiprocketAddPickupRequest): Promise<import("./index").ShiprocketAddPickupResponse>;
|
|
43
|
-
/** Verify a pickup location via OTP. */
|
|
44
|
-
verifyPickupOTP(data: ShiprocketVerifyPickupOTPRequest): Promise<import("./index").ShiprocketVerifyPickupOTPResponse>;
|
|
45
|
-
}
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { shiprocketAuthenticate, shiprocketCreateOrder, shiprocketGenerateAWB, shiprocketGeneratePickup, shiprocketTrackByAWB, shiprocketCheckServiceability, shiprocketGetPickupLocations, shiprocketAddPickupLocation, shiprocketVerifyPickupOTP, shiprocketCancelOrder, shiprocketGetOrderDetail, shiprocketPrintLabel, isShiprocketTokenExpired, SHIPROCKET_TOKEN_TTL_MS, } from "./index";
|
|
2
|
-
// --- Shiprocket Provider Class -------------------------------------------------
|
|
3
|
-
/**
|
|
4
|
-
* `IShippingProvider` implementation backed by the Shiprocket REST API.
|
|
5
|
-
*
|
|
6
|
-
* Wraps the standalone HTTP functions with token lifecycle management
|
|
7
|
-
* and maps Shiprocket-specific data shapes to the generic contract types.
|
|
8
|
-
*
|
|
9
|
-
* Register via `ProviderRegistry`:
|
|
10
|
-
* ```ts
|
|
11
|
-
* registry.register("shipping", new ShiprocketProvider(config));
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
export class ShiprocketProvider {
|
|
15
|
-
constructor(config) {
|
|
16
|
-
this.config = config;
|
|
17
|
-
this.token = config.token;
|
|
18
|
-
this.tokenExpiry = config.tokenExpiry;
|
|
19
|
-
}
|
|
20
|
-
// --- Token Management ------------------------------------------------------
|
|
21
|
-
async ensureToken() {
|
|
22
|
-
if (this.token && !isShiprocketTokenExpired(this.tokenExpiry)) {
|
|
23
|
-
return this.token;
|
|
24
|
-
}
|
|
25
|
-
const res = await shiprocketAuthenticate({
|
|
26
|
-
email: this.config.email,
|
|
27
|
-
password: this.config.password,
|
|
28
|
-
});
|
|
29
|
-
this.token = res.token;
|
|
30
|
-
this.tokenExpiry = new Date(Date.now() + SHIPROCKET_TOKEN_TTL_MS);
|
|
31
|
-
await this.config.onTokenRefresh?.(this.token, this.tokenExpiry);
|
|
32
|
-
return this.token;
|
|
33
|
-
}
|
|
34
|
-
// --- IShippingProvider -----------------------------------------------------
|
|
35
|
-
async createShipment(data) {
|
|
36
|
-
const token = await this.ensureToken();
|
|
37
|
-
const orderReq = {
|
|
38
|
-
order_id: data.orderId,
|
|
39
|
-
order_date: new Date().toISOString().split("T")[0],
|
|
40
|
-
pickup_location: data.pickup.name,
|
|
41
|
-
billing_customer_name: data.delivery.name,
|
|
42
|
-
billing_address: data.delivery.addressLine1,
|
|
43
|
-
billing_address_2: data.delivery.addressLine2,
|
|
44
|
-
billing_city: data.delivery.city,
|
|
45
|
-
billing_pincode: data.delivery.pincode,
|
|
46
|
-
billing_state: data.delivery.state,
|
|
47
|
-
billing_country: data.delivery.country,
|
|
48
|
-
billing_email: "",
|
|
49
|
-
billing_phone: data.delivery.phone,
|
|
50
|
-
shipping_is_billing: true,
|
|
51
|
-
order_items: [
|
|
52
|
-
{
|
|
53
|
-
name: data.orderId,
|
|
54
|
-
sku: data.orderId,
|
|
55
|
-
units: 1,
|
|
56
|
-
selling_price: data.codAmount ?? 0,
|
|
57
|
-
},
|
|
58
|
-
],
|
|
59
|
-
payment_method: data.isCod ? "COD" : "Prepaid",
|
|
60
|
-
sub_total: data.codAmount ?? 0,
|
|
61
|
-
length: data.dimensions.length,
|
|
62
|
-
breadth: data.dimensions.width,
|
|
63
|
-
height: data.dimensions.height,
|
|
64
|
-
weight: data.dimensions.weight,
|
|
65
|
-
};
|
|
66
|
-
const orderRes = await shiprocketCreateOrder(token, orderReq);
|
|
67
|
-
const awbRes = await shiprocketGenerateAWB(token, {
|
|
68
|
-
shipment_id: orderRes.shipment_id,
|
|
69
|
-
});
|
|
70
|
-
await shiprocketGeneratePickup(token, {
|
|
71
|
-
shipment_id: [orderRes.shipment_id],
|
|
72
|
-
});
|
|
73
|
-
return {
|
|
74
|
-
id: String(orderRes.order_id),
|
|
75
|
-
trackingId: awbRes.awb_code,
|
|
76
|
-
orderId: data.orderId,
|
|
77
|
-
status: orderRes.status,
|
|
78
|
-
courier: awbRes.courier_name,
|
|
79
|
-
estimatedDelivery: awbRes.expected_delivery,
|
|
80
|
-
createdAt: new Date().toISOString(),
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
async trackShipment(trackingId) {
|
|
84
|
-
const token = await this.ensureToken();
|
|
85
|
-
const res = await shiprocketTrackByAWB(token, trackingId);
|
|
86
|
-
const td = res.tracking_data;
|
|
87
|
-
const events = (td.shipment_track_activities ?? []).map((a) => ({
|
|
88
|
-
status: a.sr_status_label ?? a.status,
|
|
89
|
-
location: a.location,
|
|
90
|
-
timestamp: a.date,
|
|
91
|
-
description: a.activity,
|
|
92
|
-
}));
|
|
93
|
-
return {
|
|
94
|
-
trackingId,
|
|
95
|
-
currentStatus: td.current_status,
|
|
96
|
-
estimatedDelivery: td.shipment_track?.[0]?.edd ?? undefined,
|
|
97
|
-
events,
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
async cancelShipment(shipmentId) {
|
|
101
|
-
const token = await this.ensureToken();
|
|
102
|
-
// shipmentId is Shipment.id = String(orderRes.order_id)
|
|
103
|
-
await shiprocketCancelOrder(token, [parseInt(shipmentId, 10)]);
|
|
104
|
-
}
|
|
105
|
-
async checkServiceability(pincode, weight) {
|
|
106
|
-
const token = await this.ensureToken();
|
|
107
|
-
const res = await shiprocketCheckServiceability(token, {
|
|
108
|
-
pickup_postcode: "",
|
|
109
|
-
delivery_postcode: pincode,
|
|
110
|
-
weight,
|
|
111
|
-
});
|
|
112
|
-
const couriers = (res.data?.available_courier_companies ?? []).map((c) => ({
|
|
113
|
-
name: c.name,
|
|
114
|
-
estimatedDays: parseInt(c.etd, 10) || 0,
|
|
115
|
-
rate: c.rate,
|
|
116
|
-
}));
|
|
117
|
-
return { isServiceable: couriers.length > 0, couriers };
|
|
118
|
-
}
|
|
119
|
-
async generateLabel(shipmentId) {
|
|
120
|
-
const token = await this.ensureToken();
|
|
121
|
-
// shipmentId is Shipment.id = String(orderRes.order_id); label API needs the
|
|
122
|
-
// Shiprocket shipment_id (different numeric field), so look it up first.
|
|
123
|
-
const orderId = parseInt(shipmentId, 10);
|
|
124
|
-
const detail = await shiprocketGetOrderDetail(token, orderId);
|
|
125
|
-
const srShipmentId = detail.data?.shipments?.[0]?.id;
|
|
126
|
-
if (!srShipmentId) {
|
|
127
|
-
throw new Error(`No shipment found for Shiprocket order ${orderId}`);
|
|
128
|
-
}
|
|
129
|
-
const labelRes = await shiprocketPrintLabel(token, [srShipmentId]);
|
|
130
|
-
if (!labelRes.label_url) {
|
|
131
|
-
throw new Error("Shiprocket did not return a label URL");
|
|
132
|
-
}
|
|
133
|
-
const pdfRes = await fetch(labelRes.label_url);
|
|
134
|
-
if (!pdfRes.ok) {
|
|
135
|
-
throw new Error(`Failed to download label PDF: ${pdfRes.status}`);
|
|
136
|
-
}
|
|
137
|
-
return pdfRes.arrayBuffer();
|
|
138
|
-
}
|
|
139
|
-
// --- Shiprocket-Specific Methods ------------------------------------------
|
|
140
|
-
/** Authenticate and obtain a fresh token. */
|
|
141
|
-
async authenticate(credentials) {
|
|
142
|
-
const creds = credentials ?? {
|
|
143
|
-
email: this.config.email,
|
|
144
|
-
password: this.config.password,
|
|
145
|
-
};
|
|
146
|
-
const res = await shiprocketAuthenticate(creds);
|
|
147
|
-
this.token = res.token;
|
|
148
|
-
this.tokenExpiry = new Date(Date.now() + SHIPROCKET_TOKEN_TTL_MS);
|
|
149
|
-
await this.config.onTokenRefresh?.(this.token, this.tokenExpiry);
|
|
150
|
-
return { token: this.token, expiry: this.tokenExpiry };
|
|
151
|
-
}
|
|
152
|
-
/** Get all registered pickup locations. */
|
|
153
|
-
async getPickupLocations() {
|
|
154
|
-
const token = await this.ensureToken();
|
|
155
|
-
const res = await shiprocketGetPickupLocations(token);
|
|
156
|
-
return res.shipping_address ?? [];
|
|
157
|
-
}
|
|
158
|
-
/** Add a new pickup location. */
|
|
159
|
-
async addPickupLocation(data) {
|
|
160
|
-
const token = await this.ensureToken();
|
|
161
|
-
return shiprocketAddPickupLocation(token, data);
|
|
162
|
-
}
|
|
163
|
-
/** Verify a pickup location via OTP. */
|
|
164
|
-
async verifyPickupOTP(data) {
|
|
165
|
-
const token = await this.ensureToken();
|
|
166
|
-
return shiprocketVerifyPickupOTP(token, data);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export type ThemeMode = "light" | "dark";
|
|
3
|
-
interface ThemeContextType {
|
|
4
|
-
theme: ThemeMode;
|
|
5
|
-
toggleTheme: () => void;
|
|
6
|
-
setTheme: (theme: ThemeMode) => void;
|
|
7
|
-
}
|
|
8
|
-
export declare function ThemeProvider({ children, initialTheme, }: {
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
initialTheme?: ThemeMode;
|
|
11
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export declare function useTheme(): ThemeContextType;
|
|
13
|
-
export {};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { createContext, useContext, useEffect, useState, useCallback, useMemo, } from "react";
|
|
4
|
-
const ThemeContext = createContext(undefined);
|
|
5
|
-
const THEME_STORAGE_KEY = "theme";
|
|
6
|
-
const THEME_COOKIE_MAX_AGE = 31536000; // 1 year
|
|
7
|
-
function applyTheme(newTheme) {
|
|
8
|
-
const root = document.documentElement;
|
|
9
|
-
if (newTheme === "dark") {
|
|
10
|
-
root.classList.add("dark");
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
root.classList.remove("dark");
|
|
14
|
-
}
|
|
15
|
-
root.setAttribute("data-theme", newTheme);
|
|
16
|
-
}
|
|
17
|
-
function persistTheme(theme) {
|
|
18
|
-
localStorage.setItem(THEME_STORAGE_KEY, theme);
|
|
19
|
-
document.cookie = `${THEME_STORAGE_KEY}=${theme}; path=/; max-age=${THEME_COOKIE_MAX_AGE}; SameSite=Lax`;
|
|
20
|
-
}
|
|
21
|
-
export function ThemeProvider({ children, initialTheme = "light", }) {
|
|
22
|
-
const [theme, setThemeState] = useState(initialTheme);
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
const savedTheme = localStorage.getItem(THEME_STORAGE_KEY);
|
|
25
|
-
if (savedTheme) {
|
|
26
|
-
if (savedTheme !== initialTheme) {
|
|
27
|
-
setThemeState(savedTheme);
|
|
28
|
-
applyTheme(savedTheme);
|
|
29
|
-
persistTheme(savedTheme);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
const systemTheme = window.matchMedia("(prefers-color-scheme: dark)")
|
|
34
|
-
.matches
|
|
35
|
-
? "dark"
|
|
36
|
-
: "light";
|
|
37
|
-
setThemeState(systemTheme);
|
|
38
|
-
applyTheme(systemTheme);
|
|
39
|
-
persistTheme(systemTheme);
|
|
40
|
-
}
|
|
41
|
-
}, []);
|
|
42
|
-
const setTheme = useCallback((newTheme) => {
|
|
43
|
-
setThemeState(newTheme);
|
|
44
|
-
persistTheme(newTheme);
|
|
45
|
-
applyTheme(newTheme);
|
|
46
|
-
}, []);
|
|
47
|
-
const toggleTheme = useCallback(() => {
|
|
48
|
-
setThemeState((prev) => {
|
|
49
|
-
const newTheme = prev === "light" ? "dark" : "light";
|
|
50
|
-
persistTheme(newTheme);
|
|
51
|
-
applyTheme(newTheme);
|
|
52
|
-
return newTheme;
|
|
53
|
-
});
|
|
54
|
-
}, []);
|
|
55
|
-
const value = useMemo(() => ({ theme, toggleTheme, setTheme }), [theme, toggleTheme, setTheme]);
|
|
56
|
-
return (_jsx(ThemeContext.Provider, { value: value, children: children }));
|
|
57
|
-
}
|
|
58
|
-
export function useTheme() {
|
|
59
|
-
const context = useContext(ThemeContext);
|
|
60
|
-
if (context === undefined) {
|
|
61
|
-
throw new Error("useTheme must be used within a ThemeProvider");
|
|
62
|
-
}
|
|
63
|
-
return context;
|
|
64
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const shiprocketTrackingUpdateSchema: z.ZodObject<{
|
|
3
|
-
awb: z.ZodString;
|
|
4
|
-
order_id: z.ZodString;
|
|
5
|
-
shipment_id: z.ZodString;
|
|
6
|
-
current_status: z.ZodString;
|
|
7
|
-
current_status_id: z.ZodNumber;
|
|
8
|
-
courier_agent_assigned: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
-
etd: z.ZodOptional<z.ZodString>;
|
|
10
|
-
pickup_generated: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
order_id: string;
|
|
13
|
-
awb: string;
|
|
14
|
-
shipment_id: string;
|
|
15
|
-
current_status: string;
|
|
16
|
-
current_status_id: number;
|
|
17
|
-
courier_agent_assigned?: boolean | undefined;
|
|
18
|
-
etd?: string | undefined;
|
|
19
|
-
pickup_generated?: boolean | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
order_id: string;
|
|
22
|
-
awb: string;
|
|
23
|
-
shipment_id: string;
|
|
24
|
-
current_status: string;
|
|
25
|
-
current_status_id: number;
|
|
26
|
-
courier_agent_assigned?: boolean | undefined;
|
|
27
|
-
etd?: string | undefined;
|
|
28
|
-
pickup_generated?: boolean | undefined;
|
|
29
|
-
}>;
|
|
30
|
-
export type ShiprocketTrackingUpdate = z.infer<typeof shiprocketTrackingUpdateSchema>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// [SCHEMA] Shiprocket webhook envelopes (W7).
|
|
2
|
-
//
|
|
3
|
-
// Shiprocket POSTs tracking updates with the shape captured by the
|
|
4
|
-
// pre-existing `ShiprocketWebhookPayload` interface at
|
|
5
|
-
// `appkit/src/providers/shipping-shiprocket/index.ts`. This module ports
|
|
6
|
-
// that interface into a Zod schema so the consumer route
|
|
7
|
-
// (src/app/api/webhooks/shiprocket/route.ts) can validate at the
|
|
8
|
-
// boundary instead of casting through `as ShiprocketWebhookPayload`.
|
|
9
|
-
import { z } from "zod";
|
|
10
|
-
// ---------------------------------------------------------------------------
|
|
11
|
-
// Tracking-update payload.
|
|
12
|
-
// ---------------------------------------------------------------------------
|
|
13
|
-
export const shiprocketTrackingUpdateSchema = z.object({
|
|
14
|
-
awb: z.string(),
|
|
15
|
-
order_id: z.string(),
|
|
16
|
-
shipment_id: z.string(),
|
|
17
|
-
current_status: z.string(),
|
|
18
|
-
current_status_id: z.number().int(),
|
|
19
|
-
courier_agent_assigned: z.boolean().optional(),
|
|
20
|
-
etd: z.string().optional(),
|
|
21
|
-
pickup_generated: z.boolean().optional(),
|
|
22
|
-
});
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Demo Seed Domain Actions — appkit
|
|
3
|
-
*
|
|
4
|
-
* Admin-controlled seed actions.
|
|
5
|
-
* Delegates to the consumer's POST /api/demo/seed route which contains
|
|
6
|
-
* the actual collection-specific seeding logic (800+ lines with PII encryption,
|
|
7
|
-
* Auth user creation, subcollection handling, etc.).
|
|
8
|
-
*/
|
|
9
|
-
export type SeedCollectionName = "users" | "addresses" | "categories" | "stores" | "products" | "orders" | "reviews" | "bids" | "coupons" | "carousels" | "carouselSlides" | "homepageSections" | "siteSettings" | "faqs" | "notifications" | "payouts" | "blogPosts" | "events" | "eventEntries" | "sessions" | "carts" | "wishlists" | "history" | "conversations" | "groupedListings" | "scammerProfiles" | "supportTickets" | "productFeatures" | "offers" | "couponUsage" | "claimedCoupons" | "payoutMethods" | "shippingConfigs" | "analyticsCards" | "analyticsAlerts" | "storeCategories" | "listingTemplates" | "moderationQueue" | "reports" | "itemRequests" | "storeWhatsAppConfig" | "storeGoogleConfig" | "roleOverrides" | "customRoles" | "adminNotifications" | "lotteryEntries" | "shipments" | "shipmentLots" | "shipmentItems" | "catalogueItems";
|
|
10
|
-
export interface SeedOperationResult {
|
|
11
|
-
success?: boolean;
|
|
12
|
-
message: string;
|
|
13
|
-
details: {
|
|
14
|
-
created?: number;
|
|
15
|
-
updated?: number;
|
|
16
|
-
deleted?: number;
|
|
17
|
-
skipped?: number;
|
|
18
|
-
errors?: number;
|
|
19
|
-
collections?: string[];
|
|
20
|
-
dryRun?: boolean;
|
|
21
|
-
collectionPlans?: Array<{
|
|
22
|
-
name: string;
|
|
23
|
-
seedCount: number;
|
|
24
|
-
existingCount: number;
|
|
25
|
-
wouldCreate?: number;
|
|
26
|
-
wouldDelete?: number;
|
|
27
|
-
wouldSkip?: number;
|
|
28
|
-
}>;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Execute seed operation by calling the consumer's API route.
|
|
33
|
-
*
|
|
34
|
-
* @param vars action ("load" | "delete") and optional collection list
|
|
35
|
-
* @param apiBaseUrl base URL for the seed API route (e.g., "http://localhost:3000" or production URL)
|
|
36
|
-
* @returns operation result with counts and collection names
|
|
37
|
-
*/
|
|
38
|
-
export declare function demoSeed(vars: {
|
|
39
|
-
action: "load" | "delete";
|
|
40
|
-
collections?: SeedCollectionName[];
|
|
41
|
-
dryRun?: boolean;
|
|
42
|
-
}, apiBaseUrl: string): Promise<SeedOperationResult>;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Demo Seed Domain Actions — appkit
|
|
3
|
-
*
|
|
4
|
-
* Admin-controlled seed actions.
|
|
5
|
-
* Delegates to the consumer's POST /api/demo/seed route which contains
|
|
6
|
-
* the actual collection-specific seeding logic (800+ lines with PII encryption,
|
|
7
|
-
* Auth user creation, subcollection handling, etc.).
|
|
8
|
-
*/
|
|
9
|
-
import { ValidationError } from "../../errors/index";
|
|
10
|
-
import { serverLogger } from "../../monitoring/index";
|
|
11
|
-
/**
|
|
12
|
-
* Execute seed operation by calling the consumer's API route.
|
|
13
|
-
*
|
|
14
|
-
* @param vars action ("load" | "delete") and optional collection list
|
|
15
|
-
* @param apiBaseUrl base URL for the seed API route (e.g., "http://localhost:3000" or production URL)
|
|
16
|
-
* @returns operation result with counts and collection names
|
|
17
|
-
*/
|
|
18
|
-
export async function demoSeed(vars, apiBaseUrl) {
|
|
19
|
-
const response = await fetch(`${apiBaseUrl}/api/demo/seed`, {
|
|
20
|
-
method: "POST",
|
|
21
|
-
headers: { "Content-Type": "application/json" },
|
|
22
|
-
body: JSON.stringify(vars),
|
|
23
|
-
});
|
|
24
|
-
if (!response.ok) {
|
|
25
|
-
const errorBody = await response
|
|
26
|
-
.json()
|
|
27
|
-
.catch(() => ({ message: "Seed operation failed" }));
|
|
28
|
-
serverLogger.error("demoSeed failed", {
|
|
29
|
-
status: response.status,
|
|
30
|
-
body: errorBody,
|
|
31
|
-
});
|
|
32
|
-
throw new ValidationError(errorBody.message ?? "Seed operation failed");
|
|
33
|
-
}
|
|
34
|
-
const result = await response.json();
|
|
35
|
-
return result.data;
|
|
36
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./demo-seed-actions";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./demo-seed-actions";
|