@mohasinac/appkit 3.8.2 → 3.9.1

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.
Files changed (508) hide show
  1. package/dist/_internal/client/features/live/LiveItemDetailView.js +2 -2
  2. package/dist/_internal/client/features/lottery/LotteryAdminEditView.d.ts +4 -4
  3. package/dist/_internal/client/features/lottery/LotteryAdminEditView.js +8 -8
  4. package/dist/_internal/client/features/lottery/LotteryAdminSlotView.d.ts +1 -1
  5. package/dist/_internal/client/features/lottery/LotteryAdminSlotView.js +2 -2
  6. package/dist/_internal/server/features/bundles/actions.js +2 -2
  7. package/dist/_internal/server/features/bundles/og.d.ts +1 -1
  8. package/dist/_internal/server/features/bundles/og.js +4 -5
  9. package/dist/_internal/server/features/checkout/actions.js +57 -21
  10. package/dist/_internal/server/features/checkout/stock-restore.d.ts +19 -0
  11. package/dist/_internal/server/features/checkout/stock-restore.js +80 -0
  12. package/dist/_internal/server/features/checkout/upi-resolution.d.ts +11 -0
  13. package/dist/_internal/server/features/checkout/upi-resolution.js +28 -0
  14. package/dist/_internal/server/features/classified/og.js +1 -1
  15. package/dist/_internal/server/features/digital-code/og.js +1 -1
  16. package/dist/_internal/server/features/item-requests/og.d.ts +2 -2
  17. package/dist/_internal/server/features/item-requests/og.js +4 -5
  18. package/dist/_internal/server/features/live/og.js +1 -1
  19. package/dist/_internal/server/features/lottery/adapters.d.ts +2 -2
  20. package/dist/_internal/server/features/lottery/adapters.js +1 -1
  21. package/dist/_internal/server/features/orders/actions.d.ts +28 -0
  22. package/dist/_internal/server/features/orders/actions.js +239 -4
  23. package/dist/_internal/server/features/orders/adapters.js +3 -0
  24. package/dist/_internal/server/features/payments/data.js +3 -2
  25. package/dist/_internal/server/features/payouts/actions.d.ts +2 -2
  26. package/dist/_internal/server/features/payouts/actions.js +4 -3
  27. package/dist/_internal/server/features/pre-orders/service.d.ts +1 -1
  28. package/dist/_internal/server/features/pre-orders/service.js +3 -2
  29. package/dist/_internal/server/features/prize-draws/og.js +5 -5
  30. package/dist/_internal/server/features/products/og.js +1 -1
  31. package/dist/_internal/server/features/promotions/service.js +3 -1
  32. package/dist/_internal/server/features/refunds/actions.d.ts +2 -2
  33. package/dist/_internal/server/features/refunds/actions.js +7 -6
  34. package/dist/_internal/server/functions/firestore.js +1 -1
  35. package/dist/_internal/server/functions/scheduled.d.ts +4 -1
  36. package/dist/_internal/server/functions/scheduled.js +26 -2
  37. package/dist/_internal/server/jobs/core/emiInstallmentReminder.js +1 -1
  38. package/dist/_internal/server/jobs/core/hardBanCascade.d.ts +4 -0
  39. package/dist/_internal/server/jobs/core/hardBanCascade.js +15 -4
  40. package/dist/_internal/server/jobs/core/hardBanReinstatement.d.ts +16 -0
  41. package/dist/_internal/server/jobs/core/hardBanReinstatement.js +63 -0
  42. package/dist/_internal/server/jobs/core/jobRunners.js +3 -1
  43. package/dist/_internal/server/jobs/core/onScamReportCreate.js +1 -1
  44. package/dist/_internal/server/jobs/core/paymentReviewAutoApprove.d.ts +10 -0
  45. package/dist/_internal/server/jobs/core/paymentReviewAutoApprove.js +60 -0
  46. package/dist/_internal/server/jobs/core/paymentWindowTimeout.d.ts +15 -0
  47. package/dist/_internal/server/jobs/core/paymentWindowTimeout.js +59 -0
  48. package/dist/_internal/server/jobs/core/pendingOrderTimeout.d.ts +7 -0
  49. package/dist/_internal/server/jobs/core/pendingOrderTimeout.js +32 -6
  50. package/dist/_internal/server/jobs/handlers/hardBanReinstatement.d.ts +2 -0
  51. package/dist/_internal/server/jobs/handlers/hardBanReinstatement.js +2 -0
  52. package/dist/_internal/server/jobs/handlers/index.d.ts +3 -0
  53. package/dist/_internal/server/jobs/handlers/index.js +3 -0
  54. package/dist/_internal/server/jobs/handlers/messages.d.ts +4 -0
  55. package/dist/_internal/server/jobs/handlers/messages.js +4 -0
  56. package/dist/_internal/server/jobs/handlers/onShipmentAllocationSync.d.ts +3 -3
  57. package/dist/_internal/server/jobs/handlers/onShipmentAllocationSync.js +12 -12
  58. package/dist/_internal/server/jobs/handlers/onShipmentItemWrite.d.ts +1 -1
  59. package/dist/_internal/server/jobs/handlers/onShipmentItemWrite.js +5 -5
  60. package/dist/_internal/server/jobs/handlers/paymentReviewAutoApprove.d.ts +2 -0
  61. package/dist/_internal/server/jobs/handlers/paymentReviewAutoApprove.js +2 -0
  62. package/dist/_internal/server/jobs/handlers/paymentWindowTimeout.d.ts +2 -0
  63. package/dist/_internal/server/jobs/handlers/paymentWindowTimeout.js +2 -0
  64. package/dist/_internal/shared/actions/action-registry.js +27 -0
  65. package/dist/_internal/shared/checkout/order-math.js +3 -2
  66. package/dist/_internal/shared/checkout/rules/_defaults.js +1 -0
  67. package/dist/_internal/shared/checkout/rules/preorder.rule.js +7 -0
  68. package/dist/_internal/shared/checkout/rules/prize-draw.rule.js +7 -0
  69. package/dist/_internal/shared/checkout/rules/types.d.ts +11 -0
  70. package/dist/_internal/shared/features/auctions/errors.js +1 -1
  71. package/dist/_internal/shared/features/categories/bundle-copy.d.ts +0 -1
  72. package/dist/_internal/shared/features/categories/bundle-copy.js +0 -1
  73. package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +6 -6
  74. package/dist/_internal/shared/features/categories/bundle-schemas.js +2 -2
  75. package/dist/_internal/shared/features/checkout/config.d.ts +3 -3
  76. package/dist/_internal/shared/features/checkout/config.js +3 -3
  77. package/dist/_internal/shared/features/emi/schedule.d.ts +6 -6
  78. package/dist/_internal/shared/features/emi/schedule.js +10 -9
  79. package/dist/_internal/shared/features/promotions/errors.js +1 -1
  80. package/dist/_internal/shared/fees/calculator.d.ts +5 -5
  81. package/dist/_internal/shared/fees/calculator.js +19 -19
  82. package/dist/client.d.ts +1 -1
  83. package/dist/client.js +1 -1
  84. package/dist/constants/api-endpoints.d.ts +9 -0
  85. package/dist/constants/api-endpoints.js +3 -0
  86. package/dist/constants/field-names.d.ts +4 -0
  87. package/dist/constants/field-names.js +4 -0
  88. package/dist/features/admin/components/AdminArtView.js +2 -2
  89. package/dist/features/admin/components/AdminBidsView.js +2 -2
  90. package/dist/features/admin/components/AdminBundleEditorView.d.ts +1 -1
  91. package/dist/features/admin/components/AdminBundleEditorView.js +8 -8
  92. package/dist/features/admin/components/AdminBundlesView.js +6 -6
  93. package/dist/features/admin/components/AdminClassifiedView.js +2 -2
  94. package/dist/features/admin/components/AdminDigitalCodesView.js +2 -2
  95. package/dist/features/admin/components/AdminLiveView.js +2 -2
  96. package/dist/features/admin/components/AdminOrderEditorView.d.ts +6 -1
  97. package/dist/features/admin/components/AdminOrderEditorView.js +45 -5
  98. package/dist/features/admin/components/AdminOrdersView.js +8 -3
  99. package/dist/features/admin/components/AdminPayoutsView.js +2 -2
  100. package/dist/features/admin/components/AdminPrizeDrawsView.js +2 -2
  101. package/dist/features/admin/components/AdminReturnRequestsView.js +2 -2
  102. package/dist/features/admin/components/AdminSectionsView.js +4 -4
  103. package/dist/features/admin/components/AdminSiteSettingsView.js +11 -11
  104. package/dist/features/admin/components/AdminStickersView.js +2 -2
  105. package/dist/features/admin/components/AdminSupportTicketDetailView.js +1 -1
  106. package/dist/features/admin/components/sections/adminSectionsBuildParse.js +13 -5
  107. package/dist/features/admin/components/sections/adminSectionsTypes.d.ts +4 -0
  108. package/dist/features/admin/components/sections/adminSectionsTypes.js +9 -5
  109. package/dist/features/admin/hooks/useAdminListingData.d.ts +1 -1
  110. package/dist/features/admin/hooks/useAdminListingData.js +3 -2
  111. package/dist/features/admin/schemas/firestore.d.ts +9 -7
  112. package/dist/features/admin/schemas/firestore.js +4 -3
  113. package/dist/features/auctions/components/AuctionBidsTable.js +3 -3
  114. package/dist/features/auth/checkout-value-otp.d.ts +46 -0
  115. package/dist/features/auth/checkout-value-otp.js +73 -0
  116. package/dist/features/auth/repository/user.repository.d.ts +6 -0
  117. package/dist/features/auth/repository/user.repository.js +19 -0
  118. package/dist/features/auth/schemas/firestore.d.ts +10 -0
  119. package/dist/features/auth/schemas/firestore.js +2 -0
  120. package/dist/features/cart/actions/cart-actions.d.ts +1 -1
  121. package/dist/features/cart/actions/cart-actions.js +4 -4
  122. package/dist/features/cart/components/CartView.d.ts +2 -2
  123. package/dist/features/cart/components/ShippingPicker.d.ts +4 -4
  124. package/dist/features/cart/components/ShippingPicker.js +11 -11
  125. package/dist/features/cart/repository/cart.repository.d.ts +1 -1
  126. package/dist/features/cart/repository/cart.repository.js +2 -2
  127. package/dist/features/cart/schemas/firestore.d.ts +2 -2
  128. package/dist/features/catalogue/components/CatalogueItemEditorView.js +3 -3
  129. package/dist/features/catalogue/components/PublicCatalogueView.js +2 -2
  130. package/dist/features/catalogue/schemas/validation.js +1 -1
  131. package/dist/features/categories/components/BundleCollage.js +2 -2
  132. package/dist/features/categories/components/BundleDetailView.js +2 -2
  133. package/dist/features/categories/components/BundleItemsPicker.d.ts +1 -1
  134. package/dist/features/categories/components/BundleItemsPicker.js +2 -2
  135. package/dist/features/categories/components/CategoryBundlesListing.js +2 -2
  136. package/dist/features/categories/schemas/firestore.d.ts +1 -1
  137. package/dist/features/categories/schemas/index.d.ts +3 -3
  138. package/dist/features/categories/schemas/index.js +2 -2
  139. package/dist/features/checkout/actions/checkout-value-otp-actions.d.ts +16 -0
  140. package/dist/features/checkout/actions/checkout-value-otp-actions.js +83 -0
  141. package/dist/features/checkout/actions/index.d.ts +1 -0
  142. package/dist/features/checkout/actions/index.js +1 -0
  143. package/dist/features/checkout/schemas/firestore.d.ts +1 -1
  144. package/dist/features/classified/components/index.d.ts +0 -4
  145. package/dist/features/classified/components/index.js +0 -2
  146. package/dist/features/digital-codes/components/index.d.ts +0 -4
  147. package/dist/features/digital-codes/components/index.js +0 -2
  148. package/dist/features/events/schemas/index.d.ts +1 -1
  149. package/dist/features/events/schemas/index.js +1 -1
  150. package/dist/features/homepage/components/BrandsSection.d.ts +4 -1
  151. package/dist/features/homepage/components/BrandsSection.js +2 -2
  152. package/dist/features/homepage/components/CustomCardsSection.js +3 -3
  153. package/dist/features/homepage/components/CustomerReviewsSection.d.ts +4 -1
  154. package/dist/features/homepage/components/CustomerReviewsSection.js +2 -2
  155. package/dist/features/homepage/components/EventsSection.d.ts +4 -1
  156. package/dist/features/homepage/components/EventsSection.js +2 -2
  157. package/dist/features/homepage/components/FeaturedAuctionsSection.d.ts +2 -1
  158. package/dist/features/homepage/components/FeaturedAuctionsSection.js +2 -2
  159. package/dist/features/homepage/components/FeaturedBundlesSection.js +2 -2
  160. package/dist/features/homepage/components/FeaturedPreOrdersSection.d.ts +2 -1
  161. package/dist/features/homepage/components/FeaturedPreOrdersSection.js +2 -2
  162. package/dist/features/homepage/components/FeaturedProductsSection.d.ts +2 -1
  163. package/dist/features/homepage/components/FeaturedProductsSection.js +2 -2
  164. package/dist/features/homepage/components/FeaturedStoresSection.d.ts +4 -1
  165. package/dist/features/homepage/components/FeaturedStoresSection.js +2 -2
  166. package/dist/features/homepage/components/HomepageCustomerReviewsSection.d.ts +4 -1
  167. package/dist/features/homepage/components/HomepageCustomerReviewsSection.js +2 -2
  168. package/dist/features/homepage/components/SectionCarousel.d.ts +3 -1
  169. package/dist/features/homepage/components/SectionCarousel.js +2 -2
  170. package/dist/features/homepage/components/ShopByCategorySection.d.ts +4 -1
  171. package/dist/features/homepage/components/ShopByCategorySection.js +2 -2
  172. package/dist/features/homepage/lib/section-renderer.js +9 -9
  173. package/dist/features/homepage/schemas/firestore.d.ts +8 -0
  174. package/dist/features/live/components/index.d.ts +0 -4
  175. package/dist/features/live/components/index.js +0 -2
  176. package/dist/features/lottery/types/index.d.ts +3 -3
  177. package/dist/features/lottery/types/index.js +5 -5
  178. package/dist/features/orders/components/OrderPaymentSummary.js +2 -2
  179. package/dist/features/orders/components/OrderSiblingPayments.js +1 -1
  180. package/dist/features/orders/components/RefundHistoryTable.js +1 -1
  181. package/dist/features/orders/components/RefundRequestView.js +1 -1
  182. package/dist/features/orders/constants/payment-window.d.ts +10 -0
  183. package/dist/features/orders/constants/payment-window.js +10 -0
  184. package/dist/features/orders/repository/orders.repository.d.ts +25 -0
  185. package/dist/features/orders/repository/orders.repository.js +50 -1
  186. package/dist/features/orders/schemas/firestore.d.ts +50 -2
  187. package/dist/features/orders/schemas/index.d.ts +24 -24
  188. package/dist/features/orders/schemas/index.js +20 -20
  189. package/dist/features/orders/types/index.d.ts +4 -0
  190. package/dist/features/orders/utils/bundle-grouping.d.ts +1 -1
  191. package/dist/features/orders/utils/bundle-grouping.js +1 -1
  192. package/dist/features/payments/schemas/index.d.ts +10 -10
  193. package/dist/features/payments/schemas/index.js +9 -9
  194. package/dist/features/pre-orders/components/PreOrderDetailPageView.js +2 -2
  195. package/dist/features/products/components/ArtStickersListView.d.ts +7 -0
  196. package/dist/features/products/components/ArtStickersListView.js +57 -0
  197. package/dist/features/products/components/GroupSettingsPanel.js +1 -1
  198. package/dist/features/products/components/MakeOfferButton.js +3 -3
  199. package/dist/features/products/components/MarketplaceBundleCard.d.ts +1 -1
  200. package/dist/features/products/components/MarketplaceBundleCard.js +2 -2
  201. package/dist/features/products/components/PrizeDrawCollage.js +2 -2
  202. package/dist/features/products/components/PrizeDrawItemsEditor.js +2 -2
  203. package/dist/features/products/components/PrizeRevealModal.js +1 -1
  204. package/dist/features/products/components/ProductDetailPageView.js +2 -9
  205. package/dist/features/products/components/ProductForm.js +2 -2
  206. package/dist/features/products/components/ProductGrid.js +2 -2
  207. package/dist/features/products/components/ProductsIndexListing.d.ts +13 -1
  208. package/dist/features/products/components/ProductsIndexListing.js +7 -5
  209. package/dist/features/products/components/ProductsIndexPageView.js +6 -1
  210. package/dist/features/products/constants/listing-tabs.d.ts +42 -17
  211. package/dist/features/products/constants/listing-tabs.js +25 -6
  212. package/dist/features/products/schemas/catalog-product.d.ts +5 -5
  213. package/dist/features/products/schemas/catalog-product.js +1 -1
  214. package/dist/features/products/schemas/firestore.d.ts +5 -5
  215. package/dist/features/products/schemas/firestore.js +2 -2
  216. package/dist/features/products/types/index.d.ts +5 -2
  217. package/dist/features/promotions/components/CouponCard.js +2 -2
  218. package/dist/features/promotions/schemas/firestore.d.ts +2 -0
  219. package/dist/features/promotions/schemas/firestore.js +1 -0
  220. package/dist/features/promotions/schemas/index.d.ts +14 -14
  221. package/dist/features/promotions/schemas/index.js +6 -6
  222. package/dist/features/scams/components/ScamProfileView.js +3 -7
  223. package/dist/features/scams/components/ScamRegistryView.js +2 -6
  224. package/dist/features/scams/schemas/firestore.d.ts +1 -1
  225. package/dist/features/search/components/Search.d.ts +1 -1
  226. package/dist/features/seller/actions/offer-actions.js +1 -1
  227. package/dist/features/seller/components/PrintCenterView.js +2 -2
  228. package/dist/features/seller/components/QuickProductForm.js +5 -5
  229. package/dist/features/seller/components/SellerArtView.js +2 -2
  230. package/dist/features/seller/components/SellerAuctionsView.js +2 -2
  231. package/dist/features/seller/components/SellerBidsView.js +2 -2
  232. package/dist/features/seller/components/SellerBundlesView.js +6 -6
  233. package/dist/features/seller/components/SellerClassifiedView.js +2 -2
  234. package/dist/features/seller/components/SellerDigitalCodesView.js +2 -2
  235. package/dist/features/seller/components/SellerLiveView.js +2 -2
  236. package/dist/features/seller/components/SellerOffersView.js +2 -2
  237. package/dist/features/seller/components/SellerOrdersView.js +3 -3
  238. package/dist/features/seller/components/SellerPayoutRequestView.js +2 -2
  239. package/dist/features/seller/components/SellerPayoutSettingsView.js +2 -2
  240. package/dist/features/seller/components/SellerPayoutsView.js +2 -2
  241. package/dist/features/seller/components/SellerPreOrdersView.js +2 -2
  242. package/dist/features/seller/components/SellerPrizeDrawsView.js +2 -2
  243. package/dist/features/seller/components/SellerProductShell.js +8 -8
  244. package/dist/features/seller/components/SellerProductsView.js +1 -1
  245. package/dist/features/seller/components/SellerShippingView.js +6 -6
  246. package/dist/features/seller/components/SellerStickersView.js +2 -2
  247. package/dist/features/seller/hooks/useSellerListingData.d.ts +1 -1
  248. package/dist/features/seller/hooks/useSellerListingData.js +3 -2
  249. package/dist/features/shipments/components/AdminShipmentEditorView.js +10 -10
  250. package/dist/features/shipments/components/AdminShipmentLotItemsView.js +4 -4
  251. package/dist/features/shipments/components/AdminShipmentProjectionsView.js +5 -5
  252. package/dist/features/shipments/components/AdminShipmentsView.js +4 -4
  253. package/dist/features/shipments/repository/shipment-lots.repository.d.ts +2 -2
  254. package/dist/features/shipments/repository/shipment-lots.repository.js +8 -8
  255. package/dist/features/shipments/schemas/firestore.d.ts +21 -21
  256. package/dist/features/shipments/schemas/firestore.js +9 -9
  257. package/dist/features/shipments/schemas/validation.d.ts +30 -30
  258. package/dist/features/shipments/schemas/validation.js +6 -6
  259. package/dist/features/shipments/utils/cost-allocation.d.ts +5 -5
  260. package/dist/features/shipments/utils/cost-allocation.js +39 -38
  261. package/dist/features/store-extensions/schemas/firestore.d.ts +5 -5
  262. package/dist/features/stores/components/StoreDetailLayoutView.js +9 -13
  263. package/dist/features/stores/schemas/firestore.d.ts +7 -7
  264. package/dist/features/stores/schemas/index.d.ts +84 -84
  265. package/dist/features/stores/schemas/index.js +5 -5
  266. package/dist/features/tester/seed-data/categories-tester-seed-data.js +1 -1
  267. package/dist/features/tester/seed-data/products-tester-seed-data.js +6 -6
  268. package/dist/features/tester/seed-data/tester-checklist-seed-data.js +9 -2
  269. package/dist/features/whatsapp-bot/helpers/whatsapp.d.ts +8 -1
  270. package/dist/features/whatsapp-bot/helpers/whatsapp.js +13 -2
  271. package/dist/features/whatsapp-bot/types/index.d.ts +9 -1
  272. package/dist/index.d.ts +3 -7
  273. package/dist/index.js +7 -5
  274. package/dist/next/routing/route-map.d.ts +2 -0
  275. package/dist/next/routing/route-map.js +6 -0
  276. package/dist/schemas/firestore-helpers.d.ts +2 -2
  277. package/dist/schemas/firestore-helpers.js +2 -2
  278. package/dist/schemas/registry.d.ts +73 -73
  279. package/dist/seed/bids-seed-data.js +6 -6
  280. package/dist/seed/blog-posts-seed-data.js +1 -0
  281. package/dist/seed/cart-seed-data.js +13 -13
  282. package/dist/seed/catalogue-seed-data.js +6 -6
  283. package/dist/seed/categories-seed-data.js +5 -5
  284. package/dist/seed/claimed-coupons-seed-data.js +3 -3
  285. package/dist/seed/coupons-seed-data.js +20 -20
  286. package/dist/seed/events-seed-data.js +27 -27
  287. package/dist/seed/factories/bid.factory.js +1 -1
  288. package/dist/seed/faq-seed-data.js +20 -1
  289. package/dist/seed/grouped-listings-seed-data.d.ts +2 -2
  290. package/dist/seed/grouped-listings-seed-data.js +3 -3
  291. package/dist/seed/homepage-sections-seed-data.js +10 -0
  292. package/dist/seed/offers-seed-data.js +19 -19
  293. package/dist/seed/orders-seed-data.js +29 -29
  294. package/dist/seed/payouts-seed-data.js +7 -7
  295. package/dist/seed/products-auctions-seed-data.js +6 -6
  296. package/dist/seed/products-preorders-seed-data.d.ts +2 -2
  297. package/dist/seed/products-preorders-seed-data.js +1 -1
  298. package/dist/seed/products-standard-seed-data.js +8 -8
  299. package/dist/seed/scammers-seed-data.js +2 -2
  300. package/dist/seed/shipments-seed-data.js +29 -29
  301. package/dist/seed/site-settings-seed-data.js +3 -2
  302. package/dist/seed/store-extensions-seed-data.js +8 -8
  303. package/dist/seed/stores-seed-data.js +37 -8
  304. package/dist/seed/users-seed-data.js +38 -1
  305. package/dist/server-entry.d.ts +1 -3
  306. package/dist/server-entry.js +1 -3
  307. package/dist/server.d.ts +2 -1
  308. package/dist/server.js +3 -1
  309. package/dist/ui/components/HorizontalScroller.js +3 -0
  310. package/dist/ui/components/PriceDisplay.js +3 -12
  311. package/dist/utils/number.formatter.d.ts +2 -7
  312. package/dist/utils/number.formatter.js +3 -8
  313. package/package.json +1 -1
  314. package/scripts/seed-cli.mjs +8 -3
  315. package/dist/_internal/client/scaffolds/DashboardScaffold.d.ts +0 -34
  316. package/dist/_internal/client/scaffolds/DashboardScaffold.js +0 -26
  317. package/dist/_internal/client/theme/__tests__/ThemeProvider.test.d.ts +0 -1
  318. package/dist/_internal/client/theme/__tests__/ThemeProvider.test.js +0 -109
  319. package/dist/_internal/server/features/auctions/__tests__/service.test.d.ts +0 -1
  320. package/dist/_internal/server/features/auctions/__tests__/service.test.js +0 -140
  321. package/dist/_internal/server/features/checkout/__tests__/actions.test.d.ts +0 -1
  322. package/dist/_internal/server/features/checkout/__tests__/actions.test.js +0 -600
  323. package/dist/_internal/server/features/refunds/__tests__/actions.test.d.ts +0 -1
  324. package/dist/_internal/server/features/refunds/__tests__/actions.test.js +0 -263
  325. package/dist/_internal/server/jobs/core/__tests__/auctionSettlement.test.d.ts +0 -1
  326. package/dist/_internal/server/jobs/core/__tests__/auctionSettlement.test.js +0 -249
  327. package/dist/_internal/server/jobs/core/__tests__/couponExpiry.test.d.ts +0 -1
  328. package/dist/_internal/server/jobs/core/__tests__/couponExpiry.test.js +0 -65
  329. package/dist/_internal/server/jobs/core/__tests__/listingProcessor.test.d.ts +0 -1
  330. package/dist/_internal/server/jobs/core/__tests__/listingProcessor.test.js +0 -163
  331. package/dist/_internal/server/jobs/core/__tests__/mediaTmpCleanup.test.d.ts +0 -1
  332. package/dist/_internal/server/jobs/core/__tests__/mediaTmpCleanup.test.js +0 -115
  333. package/dist/_internal/server/jobs/core/__tests__/onBidPlaced.test.d.ts +0 -1
  334. package/dist/_internal/server/jobs/core/__tests__/onBidPlaced.test.js +0 -201
  335. package/dist/_internal/server/jobs/core/__tests__/onOrderCreate.test.d.ts +0 -1
  336. package/dist/_internal/server/jobs/core/__tests__/onOrderCreate.test.js +0 -169
  337. package/dist/_internal/server/jobs/core/__tests__/onOrderStatusChange.test.d.ts +0 -1
  338. package/dist/_internal/server/jobs/core/__tests__/onOrderStatusChange.test.js +0 -148
  339. package/dist/_internal/server/jobs/core/__tests__/onProductStockChange.test.d.ts +0 -1
  340. package/dist/_internal/server/jobs/core/__tests__/onProductStockChange.test.js +0 -210
  341. package/dist/_internal/server/jobs/core/__tests__/onReviewWrite.test.d.ts +0 -1
  342. package/dist/_internal/server/jobs/core/__tests__/onReviewWrite.test.js +0 -190
  343. package/dist/_internal/server/jobs/core/__tests__/onUserBanChange.test.d.ts +0 -1
  344. package/dist/_internal/server/jobs/core/__tests__/onUserBanChange.test.js +0 -161
  345. package/dist/_internal/server/jobs/core/__tests__/payoutBatch.test.d.ts +0 -1
  346. package/dist/_internal/server/jobs/core/__tests__/payoutBatch.test.js +0 -302
  347. package/dist/_internal/server/jobs/core/__tests__/pendingOrderTimeout.test.d.ts +0 -1
  348. package/dist/_internal/server/jobs/core/__tests__/pendingOrderTimeout.test.js +0 -96
  349. package/dist/_internal/server/jobs/core/__tests__/triggerEventRaffle.test.d.ts +0 -1
  350. package/dist/_internal/server/jobs/core/__tests__/triggerEventRaffle.test.js +0 -252
  351. package/dist/_internal/server/jobs/core/__tests__/wrapJobHandler.test.d.ts +0 -1
  352. package/dist/_internal/server/jobs/core/__tests__/wrapJobHandler.test.js +0 -129
  353. package/dist/_internal/server/jobs/core/onCatalogueSubmittedForApproval.d.ts +0 -15
  354. package/dist/_internal/server/jobs/core/onCatalogueSubmittedForApproval.js +0 -38
  355. package/dist/_internal/server/providers/index.d.ts +0 -11
  356. package/dist/_internal/server/providers/index.js +0 -11
  357. package/dist/_internal/server/providers/payment/razorpay-mock.d.ts +0 -52
  358. package/dist/_internal/server/providers/payment/razorpay-mock.js +0 -118
  359. package/dist/_internal/server/providers/resolve.d.ts +0 -36
  360. package/dist/_internal/server/providers/resolve.js +0 -31
  361. package/dist/_internal/server/providers/shipping/shiprocket-mock.d.ts +0 -29
  362. package/dist/_internal/server/providers/shipping/shiprocket-mock.js +0 -152
  363. package/dist/_internal/shared/types/__tests__/action-result.test.d.ts +0 -1
  364. package/dist/_internal/shared/types/__tests__/action-result.test.js +0 -65
  365. package/dist/errors/__tests__/error-mapping.test.d.ts +0 -1
  366. package/dist/errors/__tests__/error-mapping.test.js +0 -122
  367. package/dist/errors/__tests__/safe-read.test.d.ts +0 -1
  368. package/dist/errors/__tests__/safe-read.test.js +0 -39
  369. package/dist/features/addresses/repository/__tests__/addresses.repository.test.d.ts +0 -1
  370. package/dist/features/addresses/repository/__tests__/addresses.repository.test.js +0 -386
  371. package/dist/features/admin/components/AdminListingScaffold.d.ts +0 -41
  372. package/dist/features/admin/components/AdminListingScaffold.js +0 -68
  373. package/dist/features/admin/components/QuickActionsPanel.d.ts +0 -15
  374. package/dist/features/admin/components/QuickActionsPanel.js +0 -5
  375. package/dist/features/admin/repository/__tests__/notification.repository.test.d.ts +0 -1
  376. package/dist/features/admin/repository/__tests__/notification.repository.test.js +0 -356
  377. package/dist/features/admin/repository/__tests__/site-settings.repository.test.d.ts +0 -1
  378. package/dist/features/admin/repository/__tests__/site-settings.repository.test.js +0 -298
  379. package/dist/features/auctions/repository/__tests__/bid.repository.test.d.ts +0 -1
  380. package/dist/features/auctions/repository/__tests__/bid.repository.test.js +0 -290
  381. package/dist/features/auctions/repository/auctions.repository.d.ts +0 -12
  382. package/dist/features/auctions/repository/auctions.repository.js +0 -42
  383. package/dist/features/auth/repository/__tests__/session.repository.test.d.ts +0 -1
  384. package/dist/features/auth/repository/__tests__/session.repository.test.js +0 -310
  385. package/dist/features/auth/repository/__tests__/session.test.d.ts +0 -1
  386. package/dist/features/auth/repository/__tests__/session.test.js +0 -146
  387. package/dist/features/auth/repository/__tests__/sms-counter.repository.test.d.ts +0 -1
  388. package/dist/features/auth/repository/__tests__/sms-counter.repository.test.js +0 -171
  389. package/dist/features/auth/repository/__tests__/sms-counter.test.d.ts +0 -1
  390. package/dist/features/auth/repository/__tests__/sms-counter.test.js +0 -88
  391. package/dist/features/auth/repository/__tests__/token.repository.test.d.ts +0 -1
  392. package/dist/features/auth/repository/__tests__/token.repository.test.js +0 -260
  393. package/dist/features/auth/repository/__tests__/token.test.d.ts +0 -1
  394. package/dist/features/auth/repository/__tests__/token.test.js +0 -140
  395. package/dist/features/auth/repository/__tests__/user.repository.test.d.ts +0 -1
  396. package/dist/features/auth/repository/__tests__/user.repository.test.js +0 -352
  397. package/dist/features/auth/repository/__tests__/user.test.d.ts +0 -1
  398. package/dist/features/auth/repository/__tests__/user.test.js +0 -226
  399. package/dist/features/before-after/repository/before-after.repository.d.ts +0 -13
  400. package/dist/features/before-after/repository/before-after.repository.js +0 -36
  401. package/dist/features/before-after/server.d.ts +0 -6
  402. package/dist/features/before-after/server.js +0 -6
  403. package/dist/features/cart/repository/__tests__/cart.repository.test.d.ts +0 -1
  404. package/dist/features/cart/repository/__tests__/cart.repository.test.js +0 -371
  405. package/dist/features/categories/repository/__tests__/categories.repository.test.d.ts +0 -1
  406. package/dist/features/categories/repository/__tests__/categories.repository.test.js +0 -813
  407. package/dist/features/collections/repository/collections.repository.d.ts +0 -8
  408. package/dist/features/collections/repository/collections.repository.js +0 -16
  409. package/dist/features/collections/server.d.ts +0 -6
  410. package/dist/features/collections/server.js +0 -6
  411. package/dist/features/events/repository/__tests__/event.repository.test.d.ts +0 -1
  412. package/dist/features/events/repository/__tests__/event.repository.test.js +0 -299
  413. package/dist/features/faq/repository/__tests__/faqs.repository.test.d.ts +0 -1
  414. package/dist/features/faq/repository/__tests__/faqs.repository.test.js +0 -311
  415. package/dist/features/forms/Form.d.ts +0 -25
  416. package/dist/features/forms/Form.js +0 -37
  417. package/dist/features/history/repository/__tests__/user-history.repository.test.d.ts +0 -1
  418. package/dist/features/history/repository/__tests__/user-history.repository.test.js +0 -180
  419. package/dist/features/homepage/repository/__tests__/carousel.repository.test.d.ts +0 -1
  420. package/dist/features/homepage/repository/__tests__/carousel.repository.test.js +0 -182
  421. package/dist/features/homepage/repository/__tests__/homepage-sections.repository.test.d.ts +0 -1
  422. package/dist/features/homepage/repository/__tests__/homepage-sections.repository.test.js +0 -185
  423. package/dist/features/layout/ListingLayout.d.ts +0 -34
  424. package/dist/features/layout/ListingLayout.js +0 -103
  425. package/dist/features/messages/repository/__tests__/conversations.repository.test.d.ts +0 -1
  426. package/dist/features/messages/repository/__tests__/conversations.repository.test.js +0 -257
  427. package/dist/features/orders/repository/__tests__/orders.repository.test.d.ts +0 -1
  428. package/dist/features/orders/repository/__tests__/orders.repository.test.js +0 -211
  429. package/dist/features/payments/repository/__tests__/payout.repository.test.d.ts +0 -1
  430. package/dist/features/payments/repository/__tests__/payout.repository.test.js +0 -292
  431. package/dist/features/pre-orders/repository/preorders.repository.d.ts +0 -8
  432. package/dist/features/pre-orders/repository/preorders.repository.js +0 -25
  433. package/dist/features/products/repository/__tests__/product-features.repository.test.d.ts +0 -1
  434. package/dist/features/products/repository/__tests__/product-features.repository.test.js +0 -329
  435. package/dist/features/products/repository/__tests__/products.repository.test.d.ts +0 -1
  436. package/dist/features/products/repository/__tests__/products.repository.test.js +0 -607
  437. package/dist/features/promotions/repository/__tests__/claimed-coupons.repository.test.d.ts +0 -1
  438. package/dist/features/promotions/repository/__tests__/claimed-coupons.repository.test.js +0 -219
  439. package/dist/features/promotions/repository/__tests__/coupons.repository.test.d.ts +0 -1
  440. package/dist/features/promotions/repository/__tests__/coupons.repository.test.js +0 -480
  441. package/dist/features/promotions/repository/promotions.repository.d.ts +0 -14
  442. package/dist/features/promotions/repository/promotions.repository.js +0 -43
  443. package/dist/features/reviews/repository/__tests__/reviews.repository.test.d.ts +0 -1
  444. package/dist/features/reviews/repository/__tests__/reviews.repository.test.js +0 -327
  445. package/dist/features/scams/repository/__tests__/scammer.repository.test.d.ts +0 -1
  446. package/dist/features/scams/repository/__tests__/scammer.repository.test.js +0 -385
  447. package/dist/features/search/repository/__tests__/search.repository.test.d.ts +0 -1
  448. package/dist/features/search/repository/__tests__/search.repository.test.js +0 -369
  449. package/dist/features/seller/components/SellerStatCard.d.ts +0 -14
  450. package/dist/features/seller/components/SellerStatCard.js +0 -6
  451. package/dist/features/seller/components/seller-products-styles.d.ts +0 -7
  452. package/dist/features/seller/components/seller-products-styles.js +0 -14
  453. package/dist/features/seller/repository/__tests__/offer.repository.test.d.ts +0 -1
  454. package/dist/features/seller/repository/__tests__/offer.repository.test.js +0 -458
  455. package/dist/features/seller/repository/seller.repository.d.ts +0 -22
  456. package/dist/features/seller/repository/seller.repository.js +0 -72
  457. package/dist/features/site-settings/components/__tests__/ThemeManagerView.test.d.ts +0 -1
  458. package/dist/features/site-settings/components/__tests__/ThemeManagerView.test.js +0 -37
  459. package/dist/features/stores/repository/__tests__/store.repository.test.d.ts +0 -1
  460. package/dist/features/stores/repository/__tests__/store.repository.test.js +0 -261
  461. package/dist/features/stores/repository/stores.repository.d.ts +0 -11
  462. package/dist/features/stores/repository/stores.repository.js +0 -37
  463. package/dist/features/support/repository/__tests__/support.repository.test.d.ts +0 -1
  464. package/dist/features/support/repository/__tests__/support.repository.test.js +0 -312
  465. package/dist/features/wishlist/repository/__tests__/user-wishlist.repository.test.d.ts +0 -1
  466. package/dist/features/wishlist/repository/__tests__/user-wishlist.repository.test.js +0 -139
  467. package/dist/features/wishlist/repository/wishlist.repository.d.ts +0 -13
  468. package/dist/features/wishlist/repository/wishlist.repository.js +0 -31
  469. package/dist/providers/db-firebase/__tests__/filter-aliases.test.d.ts +0 -1
  470. package/dist/providers/db-firebase/__tests__/filter-aliases.test.js +0 -93
  471. package/dist/providers/shipping-shiprocket/index.d.ts +0 -297
  472. package/dist/providers/shipping-shiprocket/index.js +0 -194
  473. package/dist/providers/shipping-shiprocket/shiprocket-provider.d.ts +0 -45
  474. package/dist/providers/shipping-shiprocket/shiprocket-provider.js +0 -168
  475. package/dist/react/contexts/ThemeContext.d.ts +0 -13
  476. package/dist/react/contexts/ThemeContext.js +0 -64
  477. package/dist/schemas/webhooks/shiprocket.d.ts +0 -30
  478. package/dist/schemas/webhooks/shiprocket.js +0 -22
  479. package/dist/seed/actions/demo-seed-actions.d.ts +0 -42
  480. package/dist/seed/actions/demo-seed-actions.js +0 -36
  481. package/dist/seed/actions/index.d.ts +0 -1
  482. package/dist/seed/actions/index.js +0 -1
  483. package/dist/seed/sub-listings-seed-data.d.ts +0 -123
  484. package/dist/seed/sub-listings-seed-data.js +0 -447
  485. package/dist/seed/tester-checklist-seed-data.d.ts +0 -2
  486. package/dist/seed/tester-checklist-seed-data.js +0 -248
  487. package/dist/ui/components/DashboardStatsCard.d.ts +0 -15
  488. package/dist/ui/components/DashboardStatsCard.js +0 -27
  489. package/dist/ui/components/DashboardStatsCard.style.css +0 -68
  490. package/dist/ui/components/DynamicSelect.d.ts +0 -23
  491. package/dist/ui/components/DynamicSelect.js +0 -77
  492. package/dist/ui/components/DynamicSelect.style.css +0 -101
  493. package/dist/ui/components/InlineCreateSelect.d.ts +0 -48
  494. package/dist/ui/components/InlineCreateSelect.js +0 -75
  495. package/dist/ui/components/ListingViewShell.d.ts +0 -37
  496. package/dist/ui/components/ListingViewShell.js +0 -9
  497. package/dist/ui/components/PaginatedMultiSelect.d.ts +0 -28
  498. package/dist/ui/components/PaginatedMultiSelect.js +0 -141
  499. package/dist/ui/components/PaginatedMultiSelect.style.css +0 -272
  500. package/dist/ui/components/SectionTabs.d.ts +0 -19
  501. package/dist/ui/components/SectionTabs.js +0 -66
  502. package/dist/ui/components/SectionTabs.style.css +0 -164
  503. package/dist/ui/components/__tests__/BulkActionBar.test.d.ts +0 -1
  504. package/dist/ui/components/__tests__/BulkActionBar.test.js +0 -96
  505. package/dist/ui/components/__tests__/ListingToolbar.test.d.ts +0 -1
  506. package/dist/ui/components/__tests__/ListingToolbar.test.js +0 -125
  507. package/dist/ui/components/__tests__/new-primitives.test.d.ts +0 -1
  508. package/dist/ui/components/__tests__/new-primitives.test.js +0 -187
@@ -4,7 +4,7 @@ import { SectionCarousel } from "./SectionCarousel";
4
4
  import { useFeaturedAuctions } from "../hooks/useFeaturedAuctions";
5
5
  import { MarketplaceAuctionCard } from "../../auctions/components/MarketplaceAuctionCard";
6
6
  import { CAROUSEL_PER_VIEW } from "../constants/carousel-per-view";
7
- export function FeaturedAuctionsSection({ title = "Live Auctions", description, viewMoreHref, viewMoreLabel = "View all auctions →", className = "", filterByBrand, initialItems, rows = 1, autoScroll = false, scrollInterval = 5000, }) {
7
+ export function FeaturedAuctionsSection({ title = "Live Auctions", description, viewMoreHref, viewMoreLabel = "View all auctions →", className = "", filterByBrand, initialItems, rows = 1, autoScroll = false, scrollInterval = 5000, loop = true, }) {
8
8
  const { data: items = [], isLoading } = useFeaturedAuctions({ filterByBrand, initialData: initialItems });
9
- return (_jsx(SectionCarousel, { title: title, description: description, pillLabel: "Live Auctions", headingVariant: "editorial", viewMoreHref: viewMoreHref, viewMoreLabel: viewMoreLabel, items: items, isLoading: isLoading, skeletonCount: 4, perView: CAROUSEL_PER_VIEW.standard, gap: 16, rows: Math.min(Math.max(rows, 1), 4), autoScroll: autoScroll, autoScrollInterval: scrollInterval, keyExtractor: (product) => product.id, renderItem: (product) => (_jsx(MarketplaceAuctionCard, { product: product })), className: className }));
9
+ return (_jsx(SectionCarousel, { title: title, description: description, pillLabel: "Live Auctions", headingVariant: "editorial", viewMoreHref: viewMoreHref, viewMoreLabel: viewMoreLabel, items: items, isLoading: isLoading, skeletonCount: 4, perView: CAROUSEL_PER_VIEW.standard, gap: 16, rows: Math.min(Math.max(rows, 1), 4), autoScroll: autoScroll, autoScrollInterval: scrollInterval, loop: loop, keyExtractor: (product) => product.id, renderItem: (product) => (_jsx(MarketplaceAuctionCard, { product: product })), className: className }));
10
10
  }
@@ -24,7 +24,7 @@ function FeaturedBundleCard({ bundle, onBuyNow }) {
24
24
  const memberCount = bundle.bundleProductIds?.length ?? 0;
25
25
  const cover = bundle.display?.coverImage;
26
26
  const href = String(ROUTES.PUBLIC.BUNDLE_DETAIL?.(bundle.slug) ?? "#");
27
- return (_jsxs(Stack, { gap: "none", surface: "default", rounded: "xl", border: "default", children: [_jsxs(Link, { href: href, className: "group block p-[var(--appkit-space-3)] hover:no-underline", children: [_jsx(Div, { className: `relative mb-2 aspect-square ${__O.hidden}`, rounded: "lg", surface: "subtle", children: cover ? (_jsx(MediaImage, { src: cover, alt: bundle.name, size: "card", className: "transition-transform group-hover:scale-105" })) : (_jsx(Row, { textSize: "3xl", className: "h-full w-full", align: "center", justify: "center", children: PLACEHOLDER_EMOJI })) }), _jsx(Text, { className: "line-clamp-2", size: "sm", weight: "semibold", children: bundle.name }), _jsxs(Row, { gap: "sm", align: "center", className: "mt-1", wrap: true, children: [_jsx(Text, { size: "sm", weight: "bold", children: bundle.bundlePriceInPaise
28
- ? formatCurrency(bundle.bundlePriceInPaise / 100, "INR")
27
+ return (_jsxs(Stack, { gap: "none", surface: "default", rounded: "xl", border: "default", children: [_jsxs(Link, { href: href, className: "group block p-[var(--appkit-space-3)] hover:no-underline", children: [_jsx(Div, { className: `relative mb-2 aspect-square ${__O.hidden}`, rounded: "lg", surface: "subtle", children: cover ? (_jsx(MediaImage, { src: cover, alt: bundle.name, size: "card", className: "transition-transform group-hover:scale-105" })) : (_jsx(Row, { textSize: "3xl", className: "h-full w-full", align: "center", justify: "center", children: PLACEHOLDER_EMOJI })) }), _jsx(Text, { className: "line-clamp-2", size: "sm", weight: "semibold", children: bundle.name }), _jsxs(Row, { gap: "sm", align: "center", className: "mt-1", wrap: true, children: [_jsx(Text, { size: "sm", weight: "bold", children: bundle.bundlePrice
28
+ ? formatCurrency(bundle.bundlePrice, "INR")
29
29
  : BUNDLE_COPY.featured.priceFallback }), _jsxs(Text, { size: "xs", color: "muted", children: ["\u00B7 ", BUNDLE_COPY.featured.itemCount(memberCount)] }), stock !== "in_stock" && (_jsx(Badge, { variant: BUNDLE_STOCK_VARIANT[stock], children: BUNDLE_COPY.stockBadge.listVariantOutOfStock }))] })] }), onBuyNow && (_jsx(Div, { border: "subtle", className: `border-t ${__P.p3}`, padding: "t-xs", children: _jsx(BundleBuyNowCta, { bundleSlug: bundle.slug, outOfStock: stock === "out_of_stock", onBuyNow: onBuyNow, compact: true }) }))] }));
30
30
  }
@@ -11,5 +11,6 @@ export interface FeaturedPreOrdersSectionProps {
11
11
  rows?: number;
12
12
  autoScroll?: boolean;
13
13
  scrollInterval?: number;
14
+ loop?: boolean;
14
15
  }
15
- export declare function FeaturedPreOrdersSection({ title, description, viewMoreHref, viewMoreLabel, className, filterByBrand, initialItems, rows, autoScroll, scrollInterval, }: FeaturedPreOrdersSectionProps): React.JSX.Element;
16
+ export declare function FeaturedPreOrdersSection({ title, description, viewMoreHref, viewMoreLabel, className, filterByBrand, initialItems, rows, autoScroll, scrollInterval, loop, }: FeaturedPreOrdersSectionProps): React.JSX.Element;
@@ -4,7 +4,7 @@ import { SectionCarousel } from "./SectionCarousel";
4
4
  import { useFeaturedPreOrders } from "../hooks/useFeaturedPreOrders";
5
5
  import { MarketplacePreorderCard } from "../../pre-orders/components/MarketplacePreorderCard";
6
6
  import { CAROUSEL_PER_VIEW } from "../constants/carousel-per-view";
7
- export function FeaturedPreOrdersSection({ title = "Reserve Before It Ships", description, viewMoreHref, viewMoreLabel = "View all pre-orders →", className = "", filterByBrand, initialItems, rows = 1, autoScroll = false, scrollInterval = 5000, }) {
7
+ export function FeaturedPreOrdersSection({ title = "Reserve Before It Ships", description, viewMoreHref, viewMoreLabel = "View all pre-orders →", className = "", filterByBrand, initialItems, rows = 1, autoScroll = false, scrollInterval = 5000, loop = true, }) {
8
8
  const { data: items = [], isLoading } = useFeaturedPreOrders({ filterByBrand, initialData: initialItems });
9
- return (_jsx(SectionCarousel, { title: title, description: description, pillLabel: "Pre-Order Incoming", headingVariant: "editorial", viewMoreHref: viewMoreHref, viewMoreLabel: viewMoreLabel, items: items, isLoading: isLoading, skeletonCount: 4, perView: CAROUSEL_PER_VIEW.standard, gap: 16, rows: Math.min(Math.max(rows, 1), 4), autoScroll: autoScroll, autoScrollInterval: scrollInterval, keyExtractor: (product) => product.id, renderItem: (product) => (_jsx(MarketplacePreorderCard, { product: product })), className: className }));
9
+ return (_jsx(SectionCarousel, { title: title, description: description, pillLabel: "Pre-Order Incoming", headingVariant: "editorial", viewMoreHref: viewMoreHref, viewMoreLabel: viewMoreLabel, items: items, isLoading: isLoading, skeletonCount: 4, perView: CAROUSEL_PER_VIEW.standard, gap: 16, rows: Math.min(Math.max(rows, 1), 4), autoScroll: autoScroll, autoScrollInterval: scrollInterval, loop: loop, keyExtractor: (product) => product.id, renderItem: (product) => (_jsx(MarketplacePreorderCard, { product: product })), className: className }));
10
10
  }
@@ -11,5 +11,6 @@ export interface FeaturedProductsSectionProps {
11
11
  maxItems?: number;
12
12
  autoScroll?: boolean;
13
13
  scrollInterval?: number;
14
+ loop?: boolean;
14
15
  }
15
- export declare function FeaturedProductsSection({ title, description, viewMoreHref, viewMoreLabel, className, filterByBrand, initialItems, rows, autoScroll, scrollInterval, }: FeaturedProductsSectionProps): import("react").JSX.Element;
16
+ export declare function FeaturedProductsSection({ title, description, viewMoreHref, viewMoreLabel, className, filterByBrand, initialItems, rows, autoScroll, scrollInterval, loop, }: FeaturedProductsSectionProps): import("react").JSX.Element;
@@ -5,7 +5,7 @@ import { useFeaturedProducts } from "../hooks/useFeaturedProducts";
5
5
  import { InteractiveProductCard } from "../../products/components/InteractiveProductCard";
6
6
  import { ROUTES } from "../../../next";
7
7
  import { CAROUSEL_PER_VIEW } from "../constants/carousel-per-view";
8
- export function FeaturedProductsSection({ title = "Featured Products", description, viewMoreHref, viewMoreLabel = "View all products →", className = "", filterByBrand, initialItems, rows = 1, autoScroll = false, scrollInterval = 5000, }) {
8
+ export function FeaturedProductsSection({ title = "Featured Products", description, viewMoreHref, viewMoreLabel = "View all products →", className = "", filterByBrand, initialItems, rows = 1, autoScroll = false, scrollInterval = 5000, loop = true, }) {
9
9
  const { data, isLoading } = useFeaturedProducts({
10
10
  filterByBrand,
11
11
  initialData: initialItems?.length
@@ -13,5 +13,5 @@ export function FeaturedProductsSection({ title = "Featured Products", descripti
13
13
  : undefined,
14
14
  });
15
15
  const items = data?.items ?? [];
16
- return (_jsx(SectionCarousel, { title: title, description: description, pillLabel: "Featured Products", headingVariant: "editorial", viewMoreHref: viewMoreHref, viewMoreLabel: viewMoreLabel, items: items, isLoading: isLoading, skeletonCount: 4, perView: CAROUSEL_PER_VIEW.standard, gap: 16, rows: Math.min(Math.max(rows, 1), 4), autoScroll: autoScroll, autoScrollInterval: scrollInterval, keyExtractor: (product) => product.id, renderItem: (product) => (_jsx(InteractiveProductCard, { product: product, href: String(ROUTES.PUBLIC.PRODUCT_DETAIL(product.slug ?? product.id ?? "")) })), className: className }));
16
+ return (_jsx(SectionCarousel, { title: title, description: description, pillLabel: "Featured Products", headingVariant: "editorial", viewMoreHref: viewMoreHref, viewMoreLabel: viewMoreLabel, items: items, isLoading: isLoading, skeletonCount: 4, perView: CAROUSEL_PER_VIEW.standard, gap: 16, rows: Math.min(Math.max(rows, 1), 4), autoScroll: autoScroll, autoScrollInterval: scrollInterval, loop: loop, keyExtractor: (product) => product.id, renderItem: (product) => (_jsx(InteractiveProductCard, { product: product, href: String(ROUTES.PUBLIC.PRODUCT_DETAIL(product.slug ?? product.id ?? "")) })), className: className }));
17
17
  }
@@ -8,5 +8,8 @@ export interface FeaturedStoresSectionProps {
8
8
  limit?: number;
9
9
  className?: string;
10
10
  initialItems?: StoreListItem[];
11
+ autoScroll?: boolean;
12
+ scrollInterval?: number;
13
+ loop?: boolean;
11
14
  }
12
- export declare function FeaturedStoresSection({ title, description, viewMoreHref, viewMoreLabel, limit, className, initialItems, }: FeaturedStoresSectionProps): React.JSX.Element;
15
+ export declare function FeaturedStoresSection({ title, description, viewMoreHref, viewMoreLabel, limit, className, initialItems, autoScroll, scrollInterval, loop, }: FeaturedStoresSectionProps): React.JSX.Element;
@@ -5,7 +5,7 @@ import { useFeaturedStores } from "../hooks/useFeaturedStores";
5
5
  import { InteractiveStoreCard } from "../../stores/components/InteractiveStoreCard";
6
6
  import { ROUTES } from "../../../next";
7
7
  import { CAROUSEL_PER_VIEW } from "../constants/carousel-per-view";
8
- export function FeaturedStoresSection({ title = "Featured Stores", description, viewMoreHref, viewMoreLabel = "View all stores →", limit = 8, className = "", initialItems, }) {
8
+ export function FeaturedStoresSection({ title = "Featured Stores", description, viewMoreHref, viewMoreLabel = "View all stores →", limit = 8, className = "", initialItems, autoScroll = false, scrollInterval = 5000, loop = true, }) {
9
9
  const { data: items = [], isLoading } = useFeaturedStores(limit, { initialData: initialItems });
10
- return (_jsx(SectionCarousel, { title: title, description: description, pillLabel: "Top Stores", headingVariant: "editorial", viewMoreHref: viewMoreHref, viewMoreLabel: viewMoreLabel, items: items, isLoading: isLoading, skeletonCount: 4, perView: CAROUSEL_PER_VIEW.standard, gap: 16, keyExtractor: (store) => store.id, renderItem: (store) => (_jsx(InteractiveStoreCard, { store: store, href: ROUTES.PUBLIC.STORE_DETAIL(store.storeSlug) })), className: className }));
10
+ return (_jsx(SectionCarousel, { title: title, description: description, pillLabel: "Top Stores", headingVariant: "editorial", viewMoreHref: viewMoreHref, viewMoreLabel: viewMoreLabel, items: items, isLoading: isLoading, skeletonCount: 4, perView: CAROUSEL_PER_VIEW.standard, gap: 16, autoScroll: autoScroll, autoScrollInterval: scrollInterval, loop: loop, keyExtractor: (store) => store.id, renderItem: (store) => (_jsx(InteractiveStoreCard, { store: store, href: ROUTES.PUBLIC.STORE_DETAIL(store.storeSlug) })), className: className }));
11
11
  }
@@ -5,5 +5,8 @@ export interface HomepageCustomerReviewsSectionProps {
5
5
  viewMoreHref?: string;
6
6
  viewMoreLabel?: string;
7
7
  className?: string;
8
+ autoScroll?: boolean;
9
+ scrollInterval?: number;
10
+ loop?: boolean;
8
11
  }
9
- export declare function HomepageCustomerReviewsSection({ title, subtitle, viewMoreHref, viewMoreLabel, className, }: HomepageCustomerReviewsSectionProps): React.JSX.Element;
12
+ export declare function HomepageCustomerReviewsSection({ title, subtitle, viewMoreHref, viewMoreLabel, className, autoScroll, scrollInterval, loop, }: HomepageCustomerReviewsSectionProps): React.JSX.Element;
@@ -3,7 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { CustomerReviewsSection } from "./CustomerReviewsSection";
4
4
  import { useHomepageReviews } from "../hooks/useHomepageReviews";
5
5
  import { ReviewCard } from "../../reviews/components";
6
- export function HomepageCustomerReviewsSection({ title = "What Our Customers Say", subtitle, viewMoreHref, viewMoreLabel = "See all reviews →", className = "", }) {
6
+ export function HomepageCustomerReviewsSection({ title = "What Our Customers Say", subtitle, viewMoreHref, viewMoreLabel = "See all reviews →", className = "", autoScroll = true, scrollInterval = 4500, loop = true, }) {
7
7
  const { data: reviews = [], isLoading } = useHomepageReviews();
8
- return (_jsx(CustomerReviewsSection, { title: title, subtitle: subtitle, items: reviews, renderItem: (review) => (_jsx(ReviewCard, { review: review, className: "h-full border-zinc-200 shadow-sm border-[var(--appkit-color-border)]" })), viewMoreHref: viewMoreHref, viewMoreLabel: viewMoreLabel, isLoading: isLoading, keyExtractor: (review) => review.id, className: className }));
8
+ return (_jsx(CustomerReviewsSection, { title: title, subtitle: subtitle, items: reviews, renderItem: (review) => (_jsx(ReviewCard, { review: review, className: "h-full border-zinc-200 shadow-sm border-[var(--appkit-color-border)]" })), viewMoreHref: viewMoreHref, viewMoreLabel: viewMoreLabel, isLoading: isLoading, keyExtractor: (review) => review.id, className: className, autoScroll: autoScroll, scrollInterval: scrollInterval, loop: loop }));
9
9
  }
@@ -41,6 +41,8 @@ export interface SectionCarouselProps<T = unknown> {
41
41
  autoScroll?: boolean;
42
42
  /** Interval between auto-scroll steps in ms. Default: 3500 */
43
43
  autoScrollInterval?: number;
44
+ /** Circular auto-rotate at the carousel edges. Default: true */
45
+ loop?: boolean;
44
46
  /** Key extractor for the HorizontalScroller. */
45
47
  keyExtractor?: (item: T, index: number) => string;
46
48
  /**
@@ -72,4 +74,4 @@ export interface SectionCarouselProps<T = unknown> {
72
74
  */
73
75
  minItemWidth?: number;
74
76
  }
75
- export declare function SectionCarousel<T = unknown>({ title, description, headingVariant, pillLabel, backgroundImage, viewMoreHref, viewMoreLabel, items, renderItem, perView, gap, autoScroll, autoScrollInterval, keyExtractor, rows, className, isLoading, skeletonCount, lightText, showPeek: _showPeek, minItemWidth, }: SectionCarouselProps<T>): React.JSX.Element | null;
77
+ export declare function SectionCarousel<T = unknown>({ title, description, headingVariant, pillLabel, backgroundImage, viewMoreHref, viewMoreLabel, items, renderItem, perView, gap, autoScroll, autoScrollInterval, loop, keyExtractor, rows, className, isLoading, skeletonCount, lightText, showPeek: _showPeek, minItemWidth, }: SectionCarouselProps<T>): React.JSX.Element | null;
@@ -12,7 +12,7 @@ function CarouselSkeleton({ count }) {
12
12
  return (_jsx(Div, { layout: "flex", gap: "4", className: `${__O.hidden}`, padding: "x-md", children: Array.from({ length: count }).map((_, i) => (_jsxs(Stack, { className: "flex-none min-w-[clamp(150px,18vw,260px)] max-w-[clamp(240px,36vw,380px)] h-[clamp(180px,26vh,260px)]", gap: "sm", children: [_jsx(Div, { className: `aspect-square ${skeleton.image}`, rounded: "xl" }), _jsx(Div, { className: `${skeleton.text} w-3/4` }), _jsx(Div, { className: `${skeleton.text} w-1/2` })] }, i))) }));
13
13
  }
14
14
  // --- Component ---------------------------------------------------------------
15
- export function SectionCarousel({ title, description, headingVariant = "editorial", pillLabel, backgroundImage, viewMoreHref, viewMoreLabel = "View all →", items, renderItem, perView = CAROUSEL_PER_VIEW.standard, gap = 16, autoScroll = false, autoScrollInterval = 3500, keyExtractor, rows = 1, className = "", isLoading = false, skeletonCount = 4, lightText, showPeek: _showPeek = false, minItemWidth = 220, }) {
15
+ export function SectionCarousel({ title, description, headingVariant = "editorial", pillLabel, backgroundImage, viewMoreHref, viewMoreLabel = "View all →", items, renderItem, perView = CAROUSEL_PER_VIEW.standard, gap = 16, autoScroll = false, autoScrollInterval = 3500, loop = true, keyExtractor, rows = 1, className = "", isLoading = false, skeletonCount = 4, lightText, showPeek: _showPeek = false, minItemWidth = 220, }) {
16
16
  if (!isLoading && items.length === 0)
17
17
  return null;
18
18
  const hasBg = Boolean(backgroundImage);
@@ -41,5 +41,5 @@ export function SectionCarousel({ title, description, headingVariant = "editoria
41
41
  headingClass,
42
42
  ]
43
43
  .filter(Boolean)
44
- .join(" "), children: title }), headingVariant === "editorial" && (_jsxs(Row, { align: "center", justify: "center", gap: "sm", textSize: "xs", color: "faint", className: "mt-1 select-none", "aria-hidden": "true", children: [_jsx(Span, { className: "h-px w-6 bg-current" }), _jsx(Span, { size: "xs", children: "\u2736" }), _jsx(Span, { className: "h-px w-6 bg-current" })] })), description && (_jsx(Text, { className: `${descVariant} mt-2`, size: "base", children: description }))] }), isLoading ? (_jsx(CarouselSkeleton, { count: skeletonCount })) : (_jsx(HorizontalScroller, { items: items, renderItem: renderItem, perView: perView, gap: gap, autoScroll: autoScroll, autoScrollInterval: autoScrollInterval, loop: true, keyExtractor: keyExtractor, rows: rows, minItemWidth: minItemWidth, showArrows: true, snapToItems: true, showFadeEdges: true, showScrollbar: false, pauseOnHover: true })), viewMoreHref && !isLoading && (_jsx(Row, { className: "mt-6", justify: "start", children: _jsx(TextLink, { rounded: "lg", paddingX: "xl", paddingY: "sm", href: viewMoreHref, className: `inline-flex items-[center] gap-[0.375rem] border transition-colors ${useLightText ? "border-white/40 text-white hover:bg-[rgba(255,255,255,0.1)]" : "border-[var(--appkit-color-border)] text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-surface-elevated)]"}`, size: "sm", weight: "medium", children: viewMoreLabel }) }))] })] }));
44
+ .join(" "), children: title }), headingVariant === "editorial" && (_jsxs(Row, { align: "center", justify: "center", gap: "sm", textSize: "xs", color: "faint", className: "mt-1 select-none", "aria-hidden": "true", children: [_jsx(Span, { className: "h-px w-6 bg-current" }), _jsx(Span, { size: "xs", children: "\u2736" }), _jsx(Span, { className: "h-px w-6 bg-current" })] })), description && (_jsx(Text, { className: `${descVariant} mt-2`, size: "base", children: description }))] }), isLoading ? (_jsx(CarouselSkeleton, { count: skeletonCount })) : (_jsx(HorizontalScroller, { items: items, renderItem: renderItem, perView: perView, gap: gap, autoScroll: autoScroll, autoScrollInterval: autoScrollInterval, loop: loop, keyExtractor: keyExtractor, rows: rows, minItemWidth: minItemWidth, showArrows: true, snapToItems: true, showFadeEdges: true, showScrollbar: false, pauseOnHover: true })), viewMoreHref && !isLoading && (_jsx(Row, { className: "mt-6", justify: "start", children: _jsx(TextLink, { rounded: "lg", paddingX: "xl", paddingY: "sm", href: viewMoreHref, className: `inline-flex items-[center] gap-[0.375rem] border transition-colors ${useLightText ? "border-white/40 text-white hover:bg-[rgba(255,255,255,0.1)]" : "border-[var(--appkit-color-border)] text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-surface-elevated)]"}`, size: "sm", weight: "medium", children: viewMoreLabel }) }))] })] }));
45
45
  }
@@ -14,5 +14,8 @@ export interface ShopByCategorySectionProps {
14
14
  rootOnly?: boolean;
15
15
  rootCategoryId?: string;
16
16
  };
17
+ autoScroll?: boolean;
18
+ scrollInterval?: number;
19
+ loop?: boolean;
17
20
  }
18
- export declare function ShopByCategorySection({ title, subtitle, limit, viewMoreHref, viewMoreLabel, className, initialItems, cta, filters, }: ShopByCategorySectionProps): import("react").JSX.Element | null;
21
+ export declare function ShopByCategorySection({ title, subtitle, limit, viewMoreHref, viewMoreLabel, className, initialItems, cta, filters, autoScroll, scrollInterval, loop, }: ShopByCategorySectionProps): import("react").JSX.Element | null;
@@ -37,7 +37,7 @@ function FilterChip({ label, active, onClick, }) {
37
37
  : "border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface-elevated)] text-[var(--appkit-color-text-muted)] hover:border-[var(--appkit-color-primary)]",
38
38
  ].join(" "), children: label }));
39
39
  }
40
- export function ShopByCategorySection({ title = "Shop by Category", subtitle, limit = 12, viewMoreHref, viewMoreLabel = "View all categories →", className = "", initialItems, cta, filters, }) {
40
+ export function ShopByCategorySection({ title = "Shop by Category", subtitle, limit = 12, viewMoreHref, viewMoreLabel = "View all categories →", className = "", initialItems, cta, filters, autoScroll = true, scrollInterval = 3500, loop = true, }) {
41
41
  const themed = { textPrimary: THEMED_TEXT_PRIMARY };
42
42
  const { data: allCategories = [], isLoading } = useTopCategories(limit, { initialData: initialItems });
43
43
  const [activeFilter, setActiveFilter] = useState("all");
@@ -68,5 +68,5 @@ export function ShopByCategorySection({ title = "Shop by Category", subtitle, li
68
68
  if (!cat)
69
69
  return null;
70
70
  return (_jsx(FilterChip, { label: cat.name, active: activeFilter === id, onClick: () => setActiveFilter(activeFilter === id ? "all" : id) }, id));
71
- })] })), isLoading ? (_jsx(Div, { layout: "flex", gap: "3", className: `${__O.hidden} px-[0.25rem]`, children: Array.from({ length: 6 }).map((_, i) => (_jsx(Div, { className: "flex-none h-[104px] w-[108px] animate-pulse", surface: "subtle", rounded: "xl" }, i))) })) : (_jsx(HorizontalScroller, { items: categories, renderItem: (cat) => _jsx(CategoryChip, { category: cat }), perView: CAROUSEL_PER_VIEW.standard, gap: 16, keyExtractor: (cat) => cat.id, autoScroll: true, autoScrollInterval: 3500, showArrows: true, snapToItems: true, showFadeEdges: true, showScrollbar: false, loop: true, pauseOnHover: true })), cta && !isLoading && (_jsx(Div, { className: "mt-6 text-left", children: _jsx(Link, { href: cta.href, className: CTA_CLASSES[cta.variant], children: cta.label }) })), !cta && viewMoreHref && !isLoading && (_jsx(Div, { className: "mt-6 text-left", children: _jsx(Link, { href: viewMoreHref, className: "inline-flex items-center gap-[var(--appkit-space-1)] text-[length:var(--appkit-text-sm)] font-medium text-[var(--appkit-color-primary)] hover:opacity-80", children: viewMoreLabel }) }))] }) }));
71
+ })] })), isLoading ? (_jsx(Div, { layout: "flex", gap: "3", className: `${__O.hidden} px-[0.25rem]`, children: Array.from({ length: 6 }).map((_, i) => (_jsx(Div, { className: "flex-none h-[104px] w-[108px] animate-pulse", surface: "subtle", rounded: "xl" }, i))) })) : (_jsx(HorizontalScroller, { items: categories, renderItem: (cat) => _jsx(CategoryChip, { category: cat }), perView: CAROUSEL_PER_VIEW.standard, gap: 16, keyExtractor: (cat) => cat.id, autoScroll: autoScroll, autoScrollInterval: scrollInterval, showArrows: true, snapToItems: true, showFadeEdges: true, showScrollbar: false, loop: loop, pauseOnHover: true })), cta && !isLoading && (_jsx(Div, { className: "mt-6 text-left", children: _jsx(Link, { href: cta.href, className: CTA_CLASSES[cta.variant], children: cta.label }) })), !cta && viewMoreHref && !isLoading && (_jsx(Div, { className: "mt-6 text-left", children: _jsx(Link, { href: viewMoreHref, className: "inline-flex items-center gap-[var(--appkit-space-1)] text-[length:var(--appkit-text-sm)] font-medium text-[var(--appkit-color-primary)] hover:opacity-80", children: viewMoreLabel }) }))] }) }));
72
72
  }
@@ -53,7 +53,7 @@ function renderSectionElement(section, newsletterFormSlot, faqItems, slides, liv
53
53
  }
54
54
  case "categories": {
55
55
  const cfg = config;
56
- return (_jsx(ShopByCategorySection, { title: cleanTitle(cfg?.title) || "Shop by Category", viewMoreHref: ROUTES.PUBLIC.CATEGORIES, viewMoreLabel: "All categories \u2192", initialItems: sectionData.categories, cta: cfg?.cta, filters: cfg?.filters }));
56
+ return (_jsx(ShopByCategorySection, { title: cleanTitle(cfg?.title) || "Shop by Category", viewMoreHref: ROUTES.PUBLIC.CATEGORIES, viewMoreLabel: "All categories \u2192", initialItems: sectionData.categories, cta: cfg?.cta, filters: cfg?.filters, autoScroll: cfg?.autoScroll, scrollInterval: cfg?.scrollInterval, loop: cfg?.loop }));
57
57
  }
58
58
  case "stats": {
59
59
  const cfg = config;
@@ -84,27 +84,27 @@ function renderSectionElement(section, newsletterFormSlot, faqItems, slides, liv
84
84
  }
85
85
  case "products": {
86
86
  const cfg = config;
87
- return (_jsx(FeaturedProductsSection, { title: cleanTitle(cfg?.title) || "Featured Products", viewMoreHref: ROUTES.PUBLIC.PRODUCTS, viewMoreLabel: "View all products \u2192", filterByBrand: cfg?.filterByBrand, initialItems: sectionData.products, rows: cfg?.rows, maxItems: cfg?.maxItems, autoScroll: cfg?.autoScroll, scrollInterval: cfg?.scrollInterval }));
87
+ return (_jsx(FeaturedProductsSection, { title: cleanTitle(cfg?.title) || "Featured Products", viewMoreHref: ROUTES.PUBLIC.PRODUCTS, viewMoreLabel: "View all products \u2192", filterByBrand: cfg?.filterByBrand, initialItems: sectionData.products, rows: cfg?.rows, maxItems: cfg?.maxItems, autoScroll: cfg?.autoScroll, scrollInterval: cfg?.scrollInterval, loop: cfg?.loop }));
88
88
  }
89
89
  case "auctions": {
90
90
  const cfg = config;
91
- return (_jsx(FeaturedAuctionsSection, { title: cleanTitle(cfg?.title) || "Live Auctions", viewMoreHref: ROUTES.PUBLIC.AUCTIONS, viewMoreLabel: "View all auctions \u2192", filterByBrand: cfg?.filterByBrand, initialItems: sectionData.auctions, rows: cfg?.rows, autoScroll: cfg?.autoScroll, scrollInterval: cfg?.scrollInterval }));
91
+ return (_jsx(FeaturedAuctionsSection, { title: cleanTitle(cfg?.title) || "Live Auctions", viewMoreHref: ROUTES.PUBLIC.AUCTIONS, viewMoreLabel: "View all auctions \u2192", filterByBrand: cfg?.filterByBrand, initialItems: sectionData.auctions, rows: cfg?.rows, autoScroll: cfg?.autoScroll, scrollInterval: cfg?.scrollInterval, loop: cfg?.loop }));
92
92
  }
93
93
  case "pre-orders": {
94
94
  const cfg = config;
95
- return (_jsx(FeaturedPreOrdersSection, { title: cleanTitle(cfg?.title) || "Reserve Before It Ships", viewMoreHref: ROUTES.PUBLIC.PRE_ORDERS, viewMoreLabel: "View all pre-orders \u2192", filterByBrand: cfg?.filterByBrand, initialItems: sectionData.preOrders, rows: cfg?.rows, autoScroll: cfg?.autoScroll, scrollInterval: cfg?.scrollInterval }));
95
+ return (_jsx(FeaturedPreOrdersSection, { title: cleanTitle(cfg?.title) || "Reserve Before It Ships", viewMoreHref: ROUTES.PUBLIC.PRE_ORDERS, viewMoreLabel: "View all pre-orders \u2192", filterByBrand: cfg?.filterByBrand, initialItems: sectionData.preOrders, rows: cfg?.rows, autoScroll: cfg?.autoScroll, scrollInterval: cfg?.scrollInterval, loop: cfg?.loop }));
96
96
  }
97
97
  case "stores": {
98
98
  const cfg = config;
99
- return (_jsx(FeaturedStoresSection, { title: cleanTitle(cfg?.title) || "Featured Stores", viewMoreHref: ROUTES.PUBLIC.STORES, viewMoreLabel: "View all stores \u2192", initialItems: sectionData.stores }));
99
+ return (_jsx(FeaturedStoresSection, { title: cleanTitle(cfg?.title) || "Featured Stores", viewMoreHref: ROUTES.PUBLIC.STORES, viewMoreLabel: "View all stores \u2192", initialItems: sectionData.stores, autoScroll: cfg?.autoScroll, scrollInterval: cfg?.scrollInterval, loop: cfg?.loop }));
100
100
  }
101
101
  case "events": {
102
102
  const cfg = config;
103
- return (_jsx(EventsSection, { title: cleanTitle(cfg?.title) || "Events & Offers", viewMoreHref: ROUTES.PUBLIC.EVENTS, viewMoreLabel: "View all events \u2192", initialItems: sectionData.events }));
103
+ return (_jsx(EventsSection, { title: cleanTitle(cfg?.title) || "Events & Offers", viewMoreHref: ROUTES.PUBLIC.EVENTS, viewMoreLabel: "View all events \u2192", initialItems: sectionData.events, autoScroll: cfg?.autoScroll, scrollInterval: cfg?.scrollInterval, loop: cfg?.loop }));
104
104
  }
105
105
  case "reviews": {
106
106
  const cfg = config;
107
- return (_jsx(HomepageCustomerReviewsSection, { title: cleanTitle(cfg?.title) || "What Our Customers Say", viewMoreHref: ROUTES.PUBLIC.REVIEWS, viewMoreLabel: "See all reviews \u2192" }));
107
+ return (_jsx(HomepageCustomerReviewsSection, { title: cleanTitle(cfg?.title) || "What Our Customers Say", viewMoreHref: ROUTES.PUBLIC.REVIEWS, viewMoreLabel: "See all reviews \u2192", autoScroll: cfg?.autoScroll, scrollInterval: cfg?.scrollInterval, loop: cfg?.loop }));
108
108
  }
109
109
  case "banner": {
110
110
  const cfg = config;
@@ -156,7 +156,7 @@ function renderSectionElement(section, newsletterFormSlot, faqItems, slides, liv
156
156
  }
157
157
  case "brands": {
158
158
  const cfg = config;
159
- return (_jsx(BrandsSection, { title: cleanTitle(cfg?.title) || "Top Brands", subtitle: cfg?.subtitle, limit: cfg?.maxBrands || 12, viewMoreHref: ROUTES.PUBLIC.CATEGORIES, viewMoreLabel: "All brands \u2192", initialItems: sectionData.brands, cta: cfg?.cta, filters: cfg?.filters }));
159
+ return (_jsx(BrandsSection, { title: cleanTitle(cfg?.title) || "Top Brands", subtitle: cfg?.subtitle, limit: cfg?.maxBrands || 12, viewMoreHref: ROUTES.PUBLIC.CATEGORIES, viewMoreLabel: "All brands \u2192", initialItems: sectionData.brands, cta: cfg?.cta, filters: cfg?.filters, autoScroll: cfg?.autoScroll, scrollInterval: cfg?.scrollInterval, loop: cfg?.loop }));
160
160
  }
161
161
  case "social-feed": {
162
162
  const cfg = config;
@@ -169,7 +169,7 @@ function renderSectionElement(section, newsletterFormSlot, faqItems, slides, liv
169
169
  const cfg = config;
170
170
  if (!cfg?.cards?.length)
171
171
  return null;
172
- return (_jsx(CustomCardsSection, { title: cleanTitle(cfg.title), layout: cfg.layout ?? "grid", columns: cfg.columns ?? 3, cards: cfg.cards, autoScroll: cfg.autoScroll, scrollIntervalMs: cfg.scrollIntervalMs }));
172
+ return (_jsx(CustomCardsSection, { title: cleanTitle(cfg.title), layout: cfg.layout ?? "grid", columns: cfg.columns ?? 3, cards: cfg.cards, autoScroll: cfg.autoScroll, scrollIntervalMs: cfg.scrollIntervalMs, loop: cfg.loop }));
173
173
  }
174
174
  case "google-reviews": {
175
175
  const cfg = config;
@@ -196,6 +196,8 @@ export interface CategoriesSectionConfig {
196
196
  maxCategories: 4;
197
197
  autoScroll: boolean;
198
198
  scrollInterval: number;
199
+ /** Circular auto-rotate at the carousel edges. Default: true. */
200
+ loop?: boolean;
199
201
  /** Optional CTA button rendered below the scroller. */
200
202
  cta?: SectionCTA;
201
203
  /** Optional client-side filter chips above the scroller. */
@@ -213,6 +215,8 @@ export interface BrandsSectionConfig {
213
215
  maxBrands: number;
214
216
  autoScroll: boolean;
215
217
  scrollInterval: number;
218
+ /** Circular auto-rotate at the carousel edges. Default: true. */
219
+ loop?: boolean;
216
220
  /** Optional CTA button rendered below the scroller. */
217
221
  cta?: SectionCTA;
218
222
  /** Optional client-side filter chips above the scroller. */
@@ -306,6 +310,8 @@ export interface ReviewsSectionConfig {
306
310
  mobileItemsPerView: 1;
307
311
  autoScroll: boolean;
308
312
  scrollInterval: number;
313
+ /** Circular auto-rotate at the carousel edges. Default: true. */
314
+ loop?: boolean;
309
315
  source?: "platform" | "google";
310
316
  placeId?: string;
311
317
  }
@@ -496,6 +502,8 @@ export interface CustomCardsSectionConfig {
496
502
  cards: CustomCardsCard[];
497
503
  autoScroll?: boolean;
498
504
  scrollIntervalMs?: number;
505
+ /** Circular auto-rotate at the carousel edges. Default: true. */
506
+ loop?: boolean;
499
507
  }
500
508
  export type CollectionCardType = "products" | "auctions" | "pre-orders" | "stores" | "events" | "blog-posts" | "reviews" | "brands" | "categories";
501
509
  export interface CollectionCardsEntry {
@@ -1,6 +1,2 @@
1
- export { LiveItemsListView } from "./LiveItemsListView";
2
- export type { LiveItemsListViewProps } from "./LiveItemsListView";
3
- export { LiveItemsIndexListing } from "./LiveItemsIndexListing";
4
- export type { LiveItemsIndexListingProps } from "./LiveItemsIndexListing";
5
1
  export { LiveItemFilters } from "./LiveItemFilters";
6
2
  export type { LiveItemFiltersProps } from "./LiveItemFilters";
@@ -1,3 +1 @@
1
- export { LiveItemsListView } from "./LiveItemsListView";
2
- export { LiveItemsIndexListing } from "./LiveItemsIndexListing";
3
1
  export { LiveItemFilters } from "./LiveItemFilters";
@@ -7,7 +7,7 @@
7
7
  export interface LotterySlot {
8
8
  slotNumber: number;
9
9
  name: string;
10
- priceInPaise: number;
10
+ price: number;
11
11
  weight: number;
12
12
  isBooked: boolean;
13
13
  bookedByUserLotteryNumber?: number;
@@ -27,7 +27,7 @@ export interface LotteryConfig {
27
27
  slots: LotterySlot[];
28
28
  totalSlots: number;
29
29
  pricingMode: LotteryPricingMode;
30
- uniformPriceInPaise?: number;
30
+ uniformPrice?: number;
31
31
  drawWindowDurationMinutes: number;
32
32
  maxPullsPerTransaction: number;
33
33
  maxPullsPerUser: number;
@@ -54,7 +54,7 @@ export declare class LotteryError extends Error {
54
54
  * Weight is always at least 1 (never 0).
55
55
  * For uniform pricing: all slots get weight 50.
56
56
  */
57
- export declare function computeWeight(priceInPaise: number, maxPriceInPaise: number): number;
57
+ export declare function computeWeight(price: number, maxPrice: number): number;
58
58
  /**
59
59
  * Pick a slot using weighted random selection. Uses the Web Crypto API, not
60
60
  * `Math.random()`, so the fairness claim shown to users (PrizeRevealModal's
@@ -17,10 +17,10 @@ export class LotteryError extends Error {
17
17
  * Weight is always at least 1 (never 0).
18
18
  * For uniform pricing: all slots get weight 50.
19
19
  */
20
- export function computeWeight(priceInPaise, maxPriceInPaise) {
21
- if (maxPriceInPaise === 0)
20
+ export function computeWeight(price, maxPrice) {
21
+ if (maxPrice === 0)
22
22
  return 50;
23
- return Math.max(1, Math.round((1 - priceInPaise / maxPriceInPaise) * 99) + 1);
23
+ return Math.max(1, Math.round((1 - price / maxPrice) * 99) + 1);
24
24
  }
25
25
  /**
26
26
  * Cryptographically-random integer in [0, maxExclusive) via the Web Crypto
@@ -60,9 +60,9 @@ export function assignSlotWeights(config) {
60
60
  if (config.pricingMode === "uniform") {
61
61
  return config.slots.map((sl) => ({ ...sl, weight: 50 }));
62
62
  }
63
- const maxPrice = Math.max(...config.slots.map((sl) => sl.priceInPaise), 0);
63
+ const maxPrice = Math.max(...config.slots.map((sl) => sl.price), 0);
64
64
  return config.slots.map((sl) => ({
65
65
  ...sl,
66
- weight: computeWeight(sl.priceInPaise, maxPrice),
66
+ weight: computeWeight(sl.price, maxPrice),
67
67
  }));
68
68
  }
@@ -19,7 +19,7 @@ function legacyFallback(order) {
19
19
  method,
20
20
  transactionId: order.paymentTransactionId ?? order.paymentId,
21
21
  proofUrl: order.paymentProofUrl,
22
- amountPaise: order.totalPrice,
22
+ amount: order.totalPrice,
23
23
  verificationMethod: method === "razorpay" ? "webhook" : method === "cod" ? "cod_collection" : "manual_review",
24
24
  };
25
25
  }
@@ -28,5 +28,5 @@ export function OrderPaymentSummary({ order, className = "" }) {
28
28
  if (!record) {
29
29
  return (_jsx(Div, { className: className, rounded: "xl", padding: "md", surface: "muted", border: "default", children: _jsx(Text, { size: "sm", color: "muted", children: "No payment information recorded yet." }) }));
30
30
  }
31
- return (_jsxs(Div, { className: className, rounded: "xl", padding: "md", surface: "muted", border: "default", children: [_jsxs(Row, { justify: "between", align: "center", className: "mb-2", children: [_jsx(Heading, { level: 3, size: "sm", weight: "semibold", color: "muted", children: "Payment" }), _jsx(Badge, { variant: order.paymentStatus === "paid" ? "success" : "default", children: order.paymentStatus ?? "pending" })] }), _jsxs(Stack, { gap: "xs", children: [_jsxs(Row, { justify: "between", children: [_jsx(Text, { size: "sm", color: "muted", children: "Method" }), _jsx(Text, { size: "sm", weight: "medium", children: METHOD_LABEL[record.method] })] }), _jsxs(Row, { justify: "between", children: [_jsx(Text, { size: "sm", color: "muted", children: "Amount" }), _jsx(Text, { size: "sm", weight: "medium", children: formatCurrency(record.amountPaise / 100, order.currency ?? "INR") })] }), record.transactionId && (_jsxs(Row, { justify: "between", children: [_jsx(Text, { size: "sm", color: "muted", children: "Reference" }), _jsx(Text, { size: "sm", weight: "medium", children: record.transactionId })] })), record.paidAt && (_jsxs(Row, { justify: "between", children: [_jsx(Text, { size: "sm", color: "muted", children: "Paid at" }), _jsx(Text, { size: "sm", children: new Date(record.paidAt).toLocaleString() })] })), record.verifiedBy && (_jsxs(Row, { justify: "between", children: [_jsx(Text, { size: "sm", color: "muted", children: "Verified by" }), _jsx(Text, { size: "sm", children: record.verifiedBy })] })), record.gatewayRef?.paymentId && (_jsxs(Row, { justify: "between", children: [_jsx(Text, { size: "sm", color: "muted", children: "Gateway payment ID" }), _jsx(Text, { size: "sm", children: record.gatewayRef.paymentId })] }))] })] }));
31
+ return (_jsxs(Div, { className: className, rounded: "xl", padding: "md", surface: "muted", border: "default", children: [_jsxs(Row, { justify: "between", align: "center", className: "mb-2", children: [_jsx(Heading, { level: 3, size: "sm", weight: "semibold", color: "muted", children: "Payment" }), _jsx(Badge, { variant: order.paymentStatus === "paid" ? "success" : "default", children: order.paymentStatus ?? "pending" })] }), _jsxs(Stack, { gap: "xs", children: [_jsxs(Row, { justify: "between", children: [_jsx(Text, { size: "sm", color: "muted", children: "Method" }), _jsx(Text, { size: "sm", weight: "medium", children: METHOD_LABEL[record.method] })] }), _jsxs(Row, { justify: "between", children: [_jsx(Text, { size: "sm", color: "muted", children: "Amount" }), _jsx(Text, { size: "sm", weight: "medium", children: formatCurrency(record.amount, order.currency ?? "INR") })] }), record.transactionId && (_jsxs(Row, { justify: "between", children: [_jsx(Text, { size: "sm", color: "muted", children: "Reference" }), _jsx(Text, { size: "sm", weight: "medium", children: record.transactionId })] })), record.paidAt && (_jsxs(Row, { justify: "between", children: [_jsx(Text, { size: "sm", color: "muted", children: "Paid at" }), _jsx(Text, { size: "sm", children: new Date(record.paidAt).toLocaleString() })] })), record.verifiedBy && (_jsxs(Row, { justify: "between", children: [_jsx(Text, { size: "sm", color: "muted", children: "Verified by" }), _jsx(Text, { size: "sm", children: record.verifiedBy })] })), record.gatewayRef?.paymentId && (_jsxs(Row, { justify: "between", children: [_jsx(Text, { size: "sm", color: "muted", children: "Gateway payment ID" }), _jsx(Text, { size: "sm", children: record.gatewayRef.paymentId })] }))] })] }));
32
32
  }
@@ -11,6 +11,6 @@ export function OrderSiblingPayments({ siblings, currentOrderId, className = "",
11
11
  return null;
12
12
  return (_jsxs(Div, { className: `${className}`, rounded: "xl", padding: "md", surface: "muted", border: "default", children: [_jsx(Heading, { level: 3, className: "mb-3", color: "muted", size: "sm", weight: "semibold", children: REFUND_COPY.siblingPayments.heading(others.length) }), _jsx(Stack, { gap: "xs", children: others.map((o) => {
13
13
  const href = String(ROUTES.USER.ORDER_DETAIL(o.id));
14
- return (_jsxs(Row, { justify: "between", align: "center", gap: "sm", children: [_jsx(Link, { href: href, className: "text-[length:var(--appkit-text-sm)] font-medium text-[color:var(--appkit-color-primary)] hover:underline", children: o.id }), _jsxs(Row, { gap: "sm", align: "center", children: [_jsx(Text, { size: "xs", color: "muted", transform: "capitalize", children: o.status }), _jsx(Text, { size: "xs", weight: "semibold", children: formatCurrency(o.totalPrice / 100, o.currency ?? "INR") })] })] }, o.id));
14
+ return (_jsxs(Row, { justify: "between", align: "center", gap: "sm", children: [_jsx(Link, { href: href, className: "text-[length:var(--appkit-text-sm)] font-medium text-[color:var(--appkit-color-primary)] hover:underline", children: o.id }), _jsxs(Row, { gap: "sm", align: "center", children: [_jsx(Text, { size: "xs", color: "muted", transform: "capitalize", children: o.status }), _jsx(Text, { size: "xs", weight: "semibold", children: formatCurrency(o.totalPrice, o.currency ?? "INR") })] })] }, o.id));
15
15
  }) })] }));
16
16
  }
@@ -10,7 +10,7 @@ function formatDate(d) {
10
10
  return dt.toLocaleDateString("en-IN", { day: "numeric", month: "short", year: "numeric" });
11
11
  }
12
12
  function RefundRow({ event, currency }) {
13
- return (_jsxs(Row, { border: "subtle", justify: "between", align: "start", gap: "sm", className: "border-b last:border-0", padding: "y-sm", children: [_jsxs(Stack, { gap: "xs", className: "flex-1", children: [_jsxs(Row, { gap: "sm", align: "center", children: [_jsx(Badge, { variant: event.type === "full" ? "danger" : "warning", children: event.type === "full" ? REFUND_COPY.history.badgeFull : REFUND_COPY.history.badgePartial }), _jsx(Text, { size: "xs", color: "muted", children: formatDate(event.refundedAt) })] }), _jsx(Text, { size: "sm", children: event.reason }), event.manualTransactionId && (_jsxs(Text, { size: "xs", color: "muted", children: [REFUND_COPY.history.labelTxn, " ", event.manualTransactionId] })), event.razorpayRefundId && (_jsxs(Text, { size: "xs", color: "muted", children: [REFUND_COPY.history.labelRazorpay, " ", event.razorpayRefundId] }))] }), _jsx(Text, { size: "sm", weight: "semibold", className: "shrink-0", children: formatCurrency(event.amount / 100, currency) })] }));
13
+ return (_jsxs(Row, { border: "subtle", justify: "between", align: "start", gap: "sm", className: "border-b last:border-0", padding: "y-sm", children: [_jsxs(Stack, { gap: "xs", className: "flex-1", children: [_jsxs(Row, { gap: "sm", align: "center", children: [_jsx(Badge, { variant: event.type === "full" ? "danger" : "warning", children: event.type === "full" ? REFUND_COPY.history.badgeFull : REFUND_COPY.history.badgePartial }), _jsx(Text, { size: "xs", color: "muted", children: formatDate(event.refundedAt) })] }), _jsx(Text, { size: "sm", children: event.reason }), event.manualTransactionId && (_jsxs(Text, { size: "xs", color: "muted", children: [REFUND_COPY.history.labelTxn, " ", event.manualTransactionId] })), event.razorpayRefundId && (_jsxs(Text, { size: "xs", color: "muted", children: [REFUND_COPY.history.labelRazorpay, " ", event.razorpayRefundId] }))] }), _jsx(Text, { size: "sm", weight: "semibold", className: "shrink-0", children: formatCurrency(event.amount, currency) })] }));
14
14
  }
15
15
  /** Warning triangle icon — inline SVG kept here since it's a single-use decorative element. */
16
16
  function WarningIcon() {
@@ -41,5 +41,5 @@ export function RefundRequestView({ order, onSubmitRequest, isLoading = false, c
41
41
  setError(err instanceof Error ? err.message : REFUND_COPY.request.errorFallback);
42
42
  }
43
43
  };
44
- return (_jsxs(Stack, { gap: "md", className: className, children: [_jsxs(Text, { size: "sm", color: "muted", children: [REFUND_COPY.request.orderTotalLabel, " ", _jsx(Span, { weight: "bold", children: formatCurrency(order.totalPrice / 100, order.currency ?? "INR") })] }), _jsxs(Stack, { gap: "xs", children: [_jsxs(Text, { size: "sm", weight: "semibold", children: [REFUND_COPY.request.reasonLabel, " ", _jsx(Span, { "aria-hidden": true, children: "*" })] }), _jsx(Textarea, { value: reason, onChange: (e) => setReason(e.target.value), placeholder: REFUND_COPY.request.reasonPlaceholder, rows: 3, "aria-required": "true", "aria-label": REFUND_COPY.request.reasonLabel })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "semibold", children: REFUND_COPY.request.acknowledgeHeading }), REFUND_COPY.request.acknowledgments.map((text, i) => (_jsx(Checkbox, { checked: acknowledged[i], onChange: () => handleToggle(i), label: _jsx(Text, { size: "sm", className: "leading-snug", children: text }), "aria-label": `Acknowledgment ${i + 1}` }, i)))] }), error && (_jsx(Text, { size: "sm", color: "danger", role: "alert", children: error })), _jsx(Button, { variant: "danger", onClick: handleSubmit, disabled: !canSubmit, "aria-busy": isLoading, children: isLoading ? REFUND_COPY.request.submittingLabel : REFUND_COPY.request.submitLabel })] }));
44
+ return (_jsxs(Stack, { gap: "md", className: className, children: [_jsxs(Text, { size: "sm", color: "muted", children: [REFUND_COPY.request.orderTotalLabel, " ", _jsx(Span, { weight: "bold", children: formatCurrency(order.totalPrice, order.currency ?? "INR") })] }), _jsxs(Stack, { gap: "xs", children: [_jsxs(Text, { size: "sm", weight: "semibold", children: [REFUND_COPY.request.reasonLabel, " ", _jsx(Span, { "aria-hidden": true, children: "*" })] }), _jsx(Textarea, { value: reason, onChange: (e) => setReason(e.target.value), placeholder: REFUND_COPY.request.reasonPlaceholder, rows: 3, "aria-required": "true", "aria-label": REFUND_COPY.request.reasonLabel })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "semibold", children: REFUND_COPY.request.acknowledgeHeading }), REFUND_COPY.request.acknowledgments.map((text, i) => (_jsx(Checkbox, { checked: acknowledged[i], onChange: () => handleToggle(i), label: _jsx(Text, { size: "sm", className: "leading-snug", children: text }), "aria-label": `Acknowledgment ${i + 1}` }, i)))] }), error && (_jsx(Text, { size: "sm", color: "danger", role: "alert", children: error })), _jsx(Button, { variant: "danger", onClick: handleSubmit, disabled: !canSubmit, "aria-busy": isLoading, children: isLoading ? REFUND_COPY.request.submittingLabel : REFUND_COPY.request.submitLabel })] }));
45
45
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 15-minute payment window shared constant — imported by the checkout action
3
+ * (stamps `order.paymentDeadline`), the buyer countdown UI, and the
4
+ * `paymentWindowTimeout` sweep job, so they can never drift out of sync.
5
+ */
6
+ export declare const PAYMENT_WINDOW_MINUTES = 15;
7
+ export declare const PAYMENT_WINDOW_MS: number;
8
+ /** Cancellation reasons this feature writes to `OrderDocument.cancellationReason` (a free-form string field). */
9
+ export declare const PAYMENT_WINDOW_EXPIRED_REASON = "payment_window_expired";
10
+ export declare const PAYMENT_FRAUD_REJECTED_REASON = "payment_fraud_rejected";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 15-minute payment window shared constant — imported by the checkout action
3
+ * (stamps `order.paymentDeadline`), the buyer countdown UI, and the
4
+ * `paymentWindowTimeout` sweep job, so they can never drift out of sync.
5
+ */
6
+ export const PAYMENT_WINDOW_MINUTES = 15;
7
+ export const PAYMENT_WINDOW_MS = PAYMENT_WINDOW_MINUTES * 60 * 1000;
8
+ /** Cancellation reasons this feature writes to `OrderDocument.cancellationReason` (a free-form string field). */
9
+ export const PAYMENT_WINDOW_EXPIRED_REASON = "payment_window_expired";
10
+ export const PAYMENT_FRAUD_REJECTED_REASON = "payment_fraud_rejected";
@@ -188,6 +188,31 @@ declare class OrderRepository extends BaseRepository<OrderDocument> {
188
188
  ref: DocumentReference;
189
189
  data: OrderDocument;
190
190
  }>>;
191
+ /**
192
+ * Cloud Functions: 15-minute payment-window sweep — orders past their
193
+ * `paymentDeadline` with no proof uploaded yet. Filters out orders that
194
+ * already have `paymentProofUrl` set in-memory (the 2-hour auto-approve
195
+ * sweep owns those instead) rather than as a Firestore inequality, since a
196
+ * `paymentProofUrl != null` filter would silently exclude every doc where
197
+ * the field isn't set at all — the opposite of what's needed here.
198
+ */
199
+ getExpiredPaymentDeadlines(): Promise<Array<{
200
+ id: string;
201
+ ref: DocumentReference;
202
+ data: OrderDocument;
203
+ }>>;
204
+ /**
205
+ * Cloud Functions: 2-hour auto-approve sweep — orders with a submitted
206
+ * proof that no admin has acted on yet (`paymentReviewOutcome` unset).
207
+ * Filters that in-memory rather than as a Firestore inequality for the
208
+ * same reason as `getExpiredPaymentDeadlines` — a `!= null` filter would
209
+ * silently exclude every doc where the field was never set at all.
210
+ */
211
+ getUnreviewedProofPastDeadline(hours?: number): Promise<Array<{
212
+ id: string;
213
+ ref: DocumentReference;
214
+ data: OrderDocument;
215
+ }>>;
191
216
  /**
192
217
  * Cloud Functions: find delivered orders eligible for the weekly payout sweep.
193
218
  *
@@ -103,7 +103,7 @@ class OrderRepository extends BaseRepository {
103
103
  paymentRecord: {
104
104
  method: "cod",
105
105
  transactionId: note,
106
- amountPaise: order.totalPrice,
106
+ amount: order.totalPrice,
107
107
  paidAt: new Date(),
108
108
  verifiedBy,
109
109
  verificationMethod: "cod_collection",
@@ -291,6 +291,55 @@ class OrderRepository extends BaseRepository {
291
291
  data: this.decryptOrder({ id: d.id, ...d.data() }),
292
292
  }));
293
293
  }
294
+ /**
295
+ * Cloud Functions: 15-minute payment-window sweep — orders past their
296
+ * `paymentDeadline` with no proof uploaded yet. Filters out orders that
297
+ * already have `paymentProofUrl` set in-memory (the 2-hour auto-approve
298
+ * sweep owns those instead) rather than as a Firestore inequality, since a
299
+ * `paymentProofUrl != null` filter would silently exclude every doc where
300
+ * the field isn't set at all — the opposite of what's needed here.
301
+ */
302
+ async getExpiredPaymentDeadlines() {
303
+ const snap = await this.db
304
+ .collection(this.collection)
305
+ .where(ORDER_FIELDS.STATUS, "==", OrderStatusValues.PENDING)
306
+ .where(ORDER_FIELDS.PAYMENT_STATUS, "==", "pending")
307
+ .where(ORDER_FIELDS.PAYMENT_DEADLINE, "<=", new Date())
308
+ .limit(500)
309
+ .get();
310
+ return snap.docs
311
+ .map((d) => ({
312
+ id: d.id,
313
+ ref: d.ref,
314
+ data: this.decryptOrder({ id: d.id, ...d.data() }),
315
+ }))
316
+ .filter((entry) => !entry.data.paymentProofUrl);
317
+ }
318
+ /**
319
+ * Cloud Functions: 2-hour auto-approve sweep — orders with a submitted
320
+ * proof that no admin has acted on yet (`paymentReviewOutcome` unset).
321
+ * Filters that in-memory rather than as a Firestore inequality for the
322
+ * same reason as `getExpiredPaymentDeadlines` — a `!= null` filter would
323
+ * silently exclude every doc where the field was never set at all.
324
+ */
325
+ async getUnreviewedProofPastDeadline(hours = 2) {
326
+ const cutoff = new Date();
327
+ cutoff.setHours(cutoff.getHours() - hours);
328
+ const snap = await this.db
329
+ .collection(this.collection)
330
+ .where(ORDER_FIELDS.STATUS, "==", OrderStatusValues.PENDING)
331
+ .where(ORDER_FIELDS.PAYMENT_STATUS, "==", "pending")
332
+ .where(ORDER_FIELDS.PAYMENT_PROOF_UPLOADED_AT, "<=", cutoff)
333
+ .limit(500)
334
+ .get();
335
+ return snap.docs
336
+ .map((d) => ({
337
+ id: d.id,
338
+ ref: d.ref,
339
+ data: this.decryptOrder({ id: d.id, ...d.data() }),
340
+ }))
341
+ .filter((entry) => !!entry.data.paymentProofUrl && !entry.data.paymentReviewOutcome);
342
+ }
294
343
  /**
295
344
  * Cloud Functions: find delivered orders eligible for the weekly payout sweep.
296
345
  *