@mohasinac/appkit 4.9.5 → 4.11.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.
Files changed (395) hide show
  1. package/dist/_internal/client/features/layout/DashboardLayoutClient.d.ts +6 -1
  2. package/dist/_internal/client/features/layout/DashboardLayoutClient.js +4 -1
  3. package/dist/_internal/client/features/lottery/LotteryPullForm.d.ts +1 -1
  4. package/dist/_internal/client/features/lottery/LotteryPullForm.js +2 -2
  5. package/dist/_internal/server/features/admin/daily-digest-actions.d.ts +18 -0
  6. package/dist/_internal/server/features/admin/daily-digest-actions.js +37 -0
  7. package/dist/_internal/server/features/auctions/actions.js +3 -2
  8. package/dist/_internal/server/features/auctions/service.d.ts +4 -3
  9. package/dist/_internal/server/features/auctions/service.js +6 -6
  10. package/dist/_internal/server/features/audit-log/actions.d.ts +25 -0
  11. package/dist/_internal/server/features/audit-log/actions.js +38 -0
  12. package/dist/_internal/server/features/brands/actions.js +0 -2
  13. package/dist/_internal/server/features/brands/og.d.ts +4 -1
  14. package/dist/_internal/server/features/brands/og.js +1 -1
  15. package/dist/_internal/server/features/bundles/data.d.ts +9 -0
  16. package/dist/_internal/server/features/bundles/data.js +14 -0
  17. package/dist/_internal/server/features/bundles/index.d.ts +1 -1
  18. package/dist/_internal/server/features/bundles/index.js +1 -1
  19. package/dist/_internal/server/features/catalogue/og.d.ts +20 -0
  20. package/dist/_internal/server/features/catalogue/og.js +27 -0
  21. package/dist/_internal/server/features/grouped/data.d.ts +16 -0
  22. package/dist/_internal/server/features/grouped/data.js +50 -1
  23. package/dist/_internal/server/features/grouped/index.d.ts +1 -1
  24. package/dist/_internal/server/features/grouped/index.js +1 -1
  25. package/dist/_internal/server/features/orders/actions.js +9 -0
  26. package/dist/_internal/server/features/orders/adapters.js +25 -0
  27. package/dist/_internal/server/features/products/data.d.ts +23 -0
  28. package/dist/_internal/server/features/products/data.js +159 -0
  29. package/dist/_internal/server/features/products/index.d.ts +1 -1
  30. package/dist/_internal/server/features/products/index.js +1 -1
  31. package/dist/_internal/server/functions/scheduled.d.ts +3 -1
  32. package/dist/_internal/server/functions/scheduled.js +17 -1
  33. package/dist/_internal/server/jobs/core/dailyStatusDigest.d.ts +40 -0
  34. package/dist/_internal/server/jobs/core/dailyStatusDigest.js +164 -0
  35. package/dist/_internal/server/jobs/core/hardBanCascade.js +11 -0
  36. package/dist/_internal/server/jobs/core/testerSandboxCleanup.d.ts +1 -0
  37. package/dist/_internal/server/jobs/core/testerSandboxCleanup.js +4 -1
  38. package/dist/_internal/server/jobs/core/testerSandboxRefresh.d.ts +12 -0
  39. package/dist/_internal/server/jobs/core/testerSandboxRefresh.js +85 -0
  40. package/dist/_internal/server/jobs/core/whatsappNotify.js +16 -0
  41. package/dist/_internal/server/jobs/handlers/dailyStatusDigest.d.ts +2 -0
  42. package/dist/_internal/server/jobs/handlers/dailyStatusDigest.js +4 -0
  43. package/dist/_internal/server/jobs/handlers/index.d.ts +2 -0
  44. package/dist/_internal/server/jobs/handlers/index.js +3 -0
  45. package/dist/_internal/server/jobs/handlers/testerSandboxRefresh.d.ts +2 -0
  46. package/dist/_internal/server/jobs/handlers/testerSandboxRefresh.js +2 -0
  47. package/dist/_internal/server/notifications/channel-health.d.ts +27 -0
  48. package/dist/_internal/server/notifications/channel-health.js +101 -0
  49. package/dist/_internal/shared/features/auctions/config.d.ts +20 -0
  50. package/dist/_internal/shared/features/auctions/config.js +31 -1
  51. package/dist/_internal/shared/features/brands/schema.d.ts +0 -6
  52. package/dist/_internal/shared/features/brands/schema.js +0 -1
  53. package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +7 -0
  54. package/dist/_internal/shared/features/categories/bundle-schemas.js +3 -0
  55. package/dist/_internal/shared/features/orders/schema.d.ts +8 -8
  56. package/dist/_internal/shared/listing-types/art/config.d.ts +1 -1
  57. package/dist/_internal/shared/listing-types/art/config.js +1 -1
  58. package/dist/_internal/shared/listing-types/classified/config.d.ts +1 -1
  59. package/dist/_internal/shared/listing-types/classified/config.js +1 -1
  60. package/dist/_internal/shared/listing-types/digital-code/config.d.ts +1 -1
  61. package/dist/_internal/shared/listing-types/digital-code/config.js +1 -1
  62. package/dist/_internal/shared/listing-types/live/config.d.ts +1 -1
  63. package/dist/_internal/shared/listing-types/live/config.js +1 -1
  64. package/dist/_internal/shared/listing-types/prize-draw/config.d.ts +1 -1
  65. package/dist/_internal/shared/listing-types/prize-draw/config.js +1 -1
  66. package/dist/_internal/shared/listing-types/stickers/config.d.ts +1 -1
  67. package/dist/_internal/shared/listing-types/stickers/config.js +1 -1
  68. package/dist/client.d.ts +21 -12
  69. package/dist/client.js +14 -7
  70. package/dist/constants/api-endpoints.d.ts +9 -9
  71. package/dist/constants/api-endpoints.js +3 -3
  72. package/dist/contracts/client-auth.d.ts +3 -7
  73. package/dist/contracts/email.d.ts +1 -0
  74. package/dist/features/account/components/AddressForm.js +24 -2
  75. package/dist/features/account/components/BecomeSellerView.d.ts +1 -2
  76. package/dist/features/account/components/BecomeSellerView.js +1 -1
  77. package/dist/features/account/components/NotificationBell.js +1 -1
  78. package/dist/features/account/components/UserBidsView.d.ts +1 -0
  79. package/dist/features/account/components/UserBidsView.js +47 -0
  80. package/dist/features/account/components/UserOrdersView.d.ts +4 -11
  81. package/dist/features/account/components/UserOrdersView.js +54 -4
  82. package/dist/features/account/components/UserReturnsView.d.ts +4 -9
  83. package/dist/features/account/components/UserReturnsView.js +37 -3
  84. package/dist/features/account/components/index.d.ts +3 -2
  85. package/dist/features/account/components/index.js +1 -0
  86. package/dist/features/admin/actions/admin-actions.js +22 -0
  87. package/dist/features/admin/actions/admin-coupon-actions.js +10 -0
  88. package/dist/features/admin/actions/notification-actions.js +4 -3
  89. package/dist/features/admin/components/AdminAdsView.d.ts +2 -3
  90. package/dist/features/admin/components/AdminAdsView.js +86 -89
  91. package/dist/features/admin/components/AdminAllEventEntriesView.js +18 -3
  92. package/dist/features/admin/components/AdminAuditLogView.d.ts +11 -0
  93. package/dist/features/admin/components/AdminAuditLogView.js +95 -0
  94. package/dist/features/admin/components/AdminBlogEditorView.js +37 -3
  95. package/dist/features/admin/components/AdminBrandEditorView.js +10 -6
  96. package/dist/features/admin/components/AdminBundleEditorView.js +18 -2
  97. package/dist/features/admin/components/AdminCarouselEditorView.js +2 -2
  98. package/dist/features/admin/components/AdminCarouselGroupEditorView.js +2 -2
  99. package/dist/features/admin/components/AdminCartsView.js +34 -4
  100. package/dist/features/admin/components/AdminCategoryEditorView.js +5 -4
  101. package/dist/features/admin/components/AdminCouponEditorView.js +2 -2
  102. package/dist/features/admin/components/AdminFaqEditorView.js +2 -2
  103. package/dist/features/admin/components/AdminHistoryView.js +11 -1
  104. package/dist/features/admin/components/AdminNotificationsView.js +27 -1
  105. package/dist/features/admin/components/AdminOrderEditorView.d.ts +10 -1
  106. package/dist/features/admin/components/AdminOrderEditorView.js +4 -3
  107. package/dist/features/admin/components/AdminOrdersView.js +92 -24
  108. package/dist/features/admin/components/AdminPayoutMarkPaidModal.d.ts +7 -0
  109. package/dist/features/admin/components/AdminPayoutMarkPaidModal.js +47 -0
  110. package/dist/features/admin/components/AdminPayoutsView.js +15 -31
  111. package/dist/features/admin/components/AdminProductEditorView.js +26 -3
  112. package/dist/features/admin/components/AdminSiteSettingsView.js +31 -4
  113. package/dist/features/admin/components/AdminStoreAddressesView.js +22 -2
  114. package/dist/features/admin/components/AdminStoresView.js +7 -0
  115. package/dist/features/admin/components/AdminSublistingCategoryEditorView.js +2 -2
  116. package/dist/features/admin/components/AdminTesterChecklistItemEditorView.js +2 -2
  117. package/dist/features/admin/components/AdminUserEditorView.d.ts +2 -2
  118. package/dist/features/admin/components/AdminUserEditorView.js +4 -2
  119. package/dist/features/admin/components/AdminUsersView.js +1 -1
  120. package/dist/features/admin/components/AdminWishlistsView.js +14 -1
  121. package/dist/features/admin/components/DataListingView.d.ts +2 -2
  122. package/dist/features/admin/components/ViewAuditLogEntryModal.d.ts +19 -0
  123. package/dist/features/admin/components/ViewAuditLogEntryModal.js +22 -0
  124. package/dist/features/admin/components/ViewNotificationModal.d.ts +21 -0
  125. package/dist/features/admin/components/ViewNotificationModal.js +15 -0
  126. package/dist/features/admin/components/analytics/AdminPageViewsReportView.d.ts +4 -7
  127. package/dist/features/admin/components/analytics/AdminPageViewsReportView.js +56 -36
  128. package/dist/features/admin/components/index.d.ts +8 -1
  129. package/dist/features/admin/components/index.js +4 -0
  130. package/dist/features/admin/constants/filter-tabs.d.ts +49 -0
  131. package/dist/features/admin/constants/filter-tabs.js +27 -0
  132. package/dist/features/admin/hooks/useAdminListing.d.ts +6 -0
  133. package/dist/features/admin/hooks/useAdminListing.js +3 -1
  134. package/dist/features/admin/hooks/useAdminListingData.d.ts +9 -1
  135. package/dist/features/admin/hooks/useAdminListingData.js +9 -2
  136. package/dist/features/admin/repository/site-settings.repository.d.ts +5 -0
  137. package/dist/features/admin/schemas/firestore.d.ts +21 -0
  138. package/dist/features/admin/schemas/firestore.js +6 -0
  139. package/dist/features/analytics/types.d.ts +1 -1
  140. package/dist/features/analytics/types.js +8 -0
  141. package/dist/features/auctions/actions/bid-actions.js +4 -1
  142. package/dist/features/auctions/components/AuctionBottomActions.d.ts +2 -1
  143. package/dist/features/auctions/components/AuctionBottomActions.js +14 -1
  144. package/dist/features/auctions/components/AuctionDetailPageView.js +21 -9
  145. package/dist/features/auctions/components/LiveMinIncrement.d.ts +18 -0
  146. package/dist/features/auctions/components/LiveMinIncrement.js +17 -0
  147. package/dist/features/auctions/components/PlaceBidFormClient.d.ts +5 -2
  148. package/dist/features/auctions/components/PlaceBidFormClient.js +7 -3
  149. package/dist/features/auctions/schemas/index.d.ts +5 -0
  150. package/dist/features/audit-log/repository/audit-log.repository.d.ts +45 -0
  151. package/dist/features/audit-log/repository/audit-log.repository.js +30 -0
  152. package/dist/features/audit-log/schemas/firestore.d.ts +59 -0
  153. package/dist/features/audit-log/schemas/firestore.js +35 -0
  154. package/dist/features/auth/actions/index.d.ts +0 -1
  155. package/dist/features/auth/actions/index.js +0 -1
  156. package/dist/features/auth/hooks/useAuth.d.ts +8 -35
  157. package/dist/features/auth/hooks/useAuth.js +21 -37
  158. package/dist/features/auth/permissions/constants.d.ts +1 -1
  159. package/dist/features/auth/permissions/constants.js +2 -0
  160. package/dist/features/blog/schemas/index.d.ts +32 -0
  161. package/dist/features/catalogue/components/AdminCatalogueApprovalsView.js +31 -3
  162. package/dist/features/catalogue/components/CatalogueItemEditorView.js +2 -1
  163. package/dist/features/catalogue/components/PublicCatalogueItemDetailView.d.ts +11 -0
  164. package/dist/features/catalogue/components/PublicCatalogueItemDetailView.js +33 -0
  165. package/dist/features/catalogue/components/PublicCatalogueView.js +2 -1
  166. package/dist/features/catalogue/index.d.ts +2 -0
  167. package/dist/features/catalogue/index.js +1 -0
  168. package/dist/features/categories/components/BrandDetailPageView.js +14 -12
  169. package/dist/features/categories/components/BundleDetailView.d.ts +3 -1
  170. package/dist/features/categories/components/BundleDetailView.js +3 -2
  171. package/dist/features/categories/components/CategoryDetailPageView.js +7 -3
  172. package/dist/features/categories/components/CategoryHighlightsAndFaqSection.d.ts +14 -0
  173. package/dist/features/categories/components/CategoryHighlightsAndFaqSection.js +22 -0
  174. package/dist/features/categories/components/CategoryProductsView.d.ts +1 -5
  175. package/dist/features/categories/components/CategoryProductsView.js +1 -1
  176. package/dist/features/categories/components/CategorySelectorCreate.js +16 -2
  177. package/dist/features/categories/schemas/firestore.d.ts +19 -2
  178. package/dist/features/categories/schemas/index.d.ts +24 -3
  179. package/dist/features/categories/schemas/index.js +3 -1
  180. package/dist/features/categories/types/index.d.ts +7 -0
  181. package/dist/features/checkout/actions/checkout-value-otp-actions.d.ts +17 -3
  182. package/dist/features/checkout/actions/checkout-value-otp-actions.js +101 -22
  183. package/dist/features/classified/components/ClassifiedContactSellerPanel.d.ts +12 -0
  184. package/dist/features/classified/components/ClassifiedContactSellerPanel.js +49 -0
  185. package/dist/features/classified/components/ClassifiedDetailPageView.d.ts +7 -0
  186. package/dist/features/classified/components/ClassifiedDetailPageView.js +69 -0
  187. package/dist/features/contact/components/ContactForm.js +17 -4
  188. package/dist/features/contact/components/ContactPageView.js +8 -2
  189. package/dist/features/contact/email.d.ts +1 -0
  190. package/dist/features/contact/email.js +3 -0
  191. package/dist/features/digital-codes/components/DigitalCodeDetailPageView.d.ts +19 -0
  192. package/dist/features/digital-codes/components/DigitalCodeDetailPageView.js +79 -0
  193. package/dist/features/events/components/AdminEventEditorView.js +54 -2
  194. package/dist/features/events/components/AdminEventEntriesView.d.ts +2 -16
  195. package/dist/features/events/components/AdminEventEntriesView.js +56 -89
  196. package/dist/features/events/components/EventFormDrawer.js +5 -1
  197. package/dist/features/events/components/EventRaffleEntryForm.d.ts +1 -3
  198. package/dist/features/events/components/EventRaffleEntryForm.js +1 -1
  199. package/dist/features/events/schemas/index.d.ts +22 -0
  200. package/dist/features/grouped/components/GroupedListingsCarousel.d.ts +13 -0
  201. package/dist/features/grouped/components/GroupedListingsCarousel.js +31 -0
  202. package/dist/features/grouped/repository/grouped-listings.repository.d.ts +12 -0
  203. package/dist/features/grouped/repository/grouped-listings.repository.js +34 -0
  204. package/dist/features/homepage/components/CharacterHotspotForm.js +202 -187
  205. package/dist/features/homepage/components/SectionCarousel.d.ts +1 -7
  206. package/dist/features/homepage/components/SectionCarousel.js +1 -1
  207. package/dist/features/layout/BottomActions.js +4 -3
  208. package/dist/features/layout/BottomActionsContext.d.ts +10 -0
  209. package/dist/features/layout/BottomActionsContext.js +5 -1
  210. package/dist/features/layout/TitleBarLayout.d.ts +1 -1
  211. package/dist/features/layout/TitleBarLayout.js +3 -3
  212. package/dist/features/layout/hooks/useBottomActions.d.ts +2 -0
  213. package/dist/features/layout/hooks/useBottomActions.js +4 -1
  214. package/dist/features/live/components/LiveItemDetailPageView.d.ts +9 -0
  215. package/dist/features/live/components/LiveItemDetailPageView.js +74 -0
  216. package/dist/features/media/MediaImage.js +39 -3
  217. package/dist/features/media/MediaVideo.js +17 -1
  218. package/dist/features/media/types/index.d.ts +10 -0
  219. package/dist/features/media/types/index.js +1 -0
  220. package/dist/features/media/upload/MediaUploadField.d.ts +7 -1
  221. package/dist/features/media/upload/MediaUploadField.js +11 -7
  222. package/dist/features/media/upload/video-poster.d.ts +2 -0
  223. package/dist/features/media/upload/video-poster.js +16 -1
  224. package/dist/features/media/upload/video-poster.test.js +1 -1
  225. package/dist/features/orders/components/OrderStatusTimeline.d.ts +12 -0
  226. package/dist/features/orders/components/OrderStatusTimeline.js +55 -0
  227. package/dist/features/orders/components/index.d.ts +2 -0
  228. package/dist/features/orders/components/index.js +1 -0
  229. package/dist/features/orders/constants/payment-window.d.ts +25 -0
  230. package/dist/features/orders/constants/payment-window.js +25 -0
  231. package/dist/features/orders/repository/orders.repository.d.ts +32 -0
  232. package/dist/features/orders/repository/orders.repository.js +56 -0
  233. package/dist/features/orders/schemas/index.d.ts +24 -24
  234. package/dist/features/orders/types/index.d.ts +33 -0
  235. package/dist/features/pre-orders/components/PreOrderDetailPageView.js +9 -1
  236. package/dist/features/pre-orders/schemas/index.d.ts +5 -0
  237. package/dist/features/products/components/BidHistory.js +9 -1
  238. package/dist/features/products/components/GroupSettingsPanel.js +25 -3
  239. package/dist/features/products/components/PrizeDrawDetailPageView.js +11 -1
  240. package/dist/features/products/components/PrizeDrawEntryActions.d.ts +1 -4
  241. package/dist/features/products/components/PrizeDrawEntryActions.js +1 -1
  242. package/dist/features/products/components/ProductDetailActions.d.ts +1 -2
  243. package/dist/features/products/components/ProductDetailActions.js +1 -1
  244. package/dist/features/products/components/ProductDetailPageView.js +11 -116
  245. package/dist/features/products/components/ProductGrid.js +15 -1
  246. package/dist/features/products/components/RelatedItemsSection.d.ts +16 -0
  247. package/dist/features/products/components/RelatedItemsSection.js +17 -0
  248. package/dist/features/products/constants/action-defs.d.ts +1 -0
  249. package/dist/features/products/constants/action-defs.js +1 -0
  250. package/dist/features/products/schemas/index.d.ts +5 -0
  251. package/dist/features/promotions/components/CouponsIndexListing.d.ts +1 -3
  252. package/dist/features/promotions/components/CouponsIndexListing.js +1 -1
  253. package/dist/features/search/components/SearchView.d.ts +1 -3
  254. package/dist/features/search/components/SearchView.js +1 -1
  255. package/dist/features/seller/components/QuickProductForm.js +2 -1
  256. package/dist/features/seller/components/SellerBidsView.js +66 -107
  257. package/dist/features/seller/components/SellerGoogleReviewsView.js +17 -1
  258. package/dist/features/seller/components/SellerOrdersView.d.ts +15 -3
  259. package/dist/features/seller/components/SellerOrdersView.js +134 -163
  260. package/dist/features/seller/components/SellerPayoutMethodsView.js +60 -48
  261. package/dist/features/seller/components/SellerPayoutSettingsView.js +69 -4
  262. package/dist/features/seller/components/SellerPayoutsView.d.ts +12 -0
  263. package/dist/features/seller/components/SellerPayoutsView.js +25 -5
  264. package/dist/features/seller/components/SellerProductShell.d.ts +10 -3
  265. package/dist/features/seller/components/SellerProductShell.js +90 -37
  266. package/dist/features/seller/components/SellerProductsFilterDrawer.d.ts +2 -7
  267. package/dist/features/seller/components/SellerProductsFilterDrawer.js +4 -4
  268. package/dist/features/seller/components/SellerProductsView.d.ts +2 -4
  269. package/dist/features/seller/components/SellerProductsView.js +131 -189
  270. package/dist/features/seller/components/SellerReviewsView.js +95 -133
  271. package/dist/features/seller/components/SellerShippingConfigsView.js +47 -67
  272. package/dist/features/seller/components/SellerShippingView.js +41 -4
  273. package/dist/features/seller/components/SellerStoreCategoriesView.js +51 -59
  274. package/dist/features/seller/components/SellerStorefrontView.d.ts +6 -1
  275. package/dist/features/seller/components/SellerStorefrontView.js +42 -5
  276. package/dist/features/seller/components/index.d.ts +2 -2
  277. package/dist/features/seller/components/index.js +2 -2
  278. package/dist/features/shell/FormShell.d.ts +24 -4
  279. package/dist/features/shell/FormShell.js +12 -6
  280. package/dist/features/shell/QuickFormDrawer.js +67 -12
  281. package/dist/features/shell/StepForm.d.ts +30 -1
  282. package/dist/features/shell/StepForm.js +47 -4
  283. package/dist/features/shell/index.d.ts +1 -1
  284. package/dist/features/shell/index.js +1 -1
  285. package/dist/features/shipments/components/AdminShipmentEditorView.js +2 -2
  286. package/dist/features/shipments/schemas/validation.d.ts +14 -4
  287. package/dist/features/tester/components/AdminTesterFeedbackListView.js +23 -2
  288. package/dist/features/tester/components/TesterChecklistStepRow.js +1 -1
  289. package/dist/features/tester/components/TesterHubView.js +3 -2
  290. package/dist/features/tester/seed-data/orders-tester-seed-data.js +9 -1
  291. package/dist/features/tester/seed-data/products-tester-seed-data.js +43 -32
  292. package/dist/features/tester/seed-data/tester-checklist-seed-data.js +487 -18
  293. package/dist/index.d.ts +17 -3
  294. package/dist/index.js +23 -5
  295. package/dist/next/routing/route-map.d.ts +13 -0
  296. package/dist/next/routing/route-map.js +12 -0
  297. package/dist/providers/email-resend/provider.js +1 -0
  298. package/dist/providers/firebase-client/auth.d.ts +1 -0
  299. package/dist/providers/firebase-client/auth.js +7 -1
  300. package/dist/repositories/index.d.ts +1 -0
  301. package/dist/repositories/index.js +1 -0
  302. package/dist/schemas/registry.d.ts +61 -25
  303. package/dist/security/pii-mask.js +1 -1
  304. package/dist/seed/bids-seed-data.js +48 -3
  305. package/dist/seed/categories-seed-data.js +69 -0
  306. package/dist/seed/grouped-listings-seed-data.js +167 -0
  307. package/dist/seed/payouts-seed-data.js +4 -4
  308. package/dist/seed/products-art-seed-data.js +188 -5
  309. package/dist/seed/products-auctions-seed-data.js +226 -6
  310. package/dist/seed/products-classifieds-seed-data.js +255 -8
  311. package/dist/seed/products-digital-codes-seed-data.js +258 -19
  312. package/dist/seed/products-live-items-seed-data.js +143 -10
  313. package/dist/seed/products-preorders-seed-data.js +213 -8
  314. package/dist/seed/products-prize-draws-seed-data.js +198 -0
  315. package/dist/seed/products-standard-seed-data.js +234 -4
  316. package/dist/seed/products-stickers-seed-data.js +178 -5
  317. package/dist/seed/site-settings-seed-data.js +23 -30
  318. package/dist/seed/store-extensions-seed-data.js +2 -2
  319. package/dist/server-entry.d.ts +6 -2
  320. package/dist/server-entry.js +24 -3
  321. package/dist/server.d.ts +10 -3
  322. package/dist/server.js +11 -4
  323. package/dist/styles.css +29 -1
  324. package/dist/tailwind-utilities.css +1 -1
  325. package/dist/ui/components/Form.d.ts +11 -2
  326. package/dist/ui/components/Form.js +4 -3
  327. package/dist/ui/components/FormField.d.ts +3 -1
  328. package/dist/ui/components/FormField.js +22 -4
  329. package/dist/ui/components/ImageLightbox.js +37 -3
  330. package/dist/ui/components/ImageLightbox.style.css +28 -0
  331. package/dist/ui/components/ListingLayout.d.ts +1 -2
  332. package/dist/ui/components/ListingLayout.js +1 -1
  333. package/dist/ui/components/RecordDetailModal.d.ts +68 -0
  334. package/dist/ui/components/RecordDetailModal.js +8 -0
  335. package/dist/ui/components/SlottedListingView.js +9 -1
  336. package/dist/ui/forms/FormErrorSummary.d.ts +25 -0
  337. package/dist/ui/forms/FormErrorSummary.js +37 -0
  338. package/dist/ui/forms/FormShell.d.ts +37 -2
  339. package/dist/ui/forms/FormShell.js +37 -7
  340. package/dist/ui/forms/FormShell.style.css +17 -0
  341. package/dist/ui/forms/index.d.ts +2 -0
  342. package/dist/ui/forms/index.js +1 -0
  343. package/dist/ui/index.d.ts +4 -0
  344. package/dist/ui/index.js +5 -0
  345. package/dist/utils/media-url.d.ts +12 -1
  346. package/dist/utils/media-url.js +59 -1
  347. package/dist/validation/schemas.d.ts +4 -4
  348. package/package.json +1 -1
  349. package/dist/_internal/client/features/classified/ClassifiedDetailView.d.ts +0 -9
  350. package/dist/_internal/client/features/classified/ClassifiedDetailView.js +0 -55
  351. package/dist/_internal/client/features/digital-code/DigitalCodeDetailView.d.ts +0 -18
  352. package/dist/_internal/client/features/digital-code/DigitalCodeDetailView.js +0 -21
  353. package/dist/_internal/client/features/live/LiveItemDetailView.d.ts +0 -9
  354. package/dist/_internal/client/features/live/LiveItemDetailView.js +0 -25
  355. package/dist/_internal/server/jobs/core/prizeRevealClose.d.ts +0 -2
  356. package/dist/_internal/server/jobs/core/prizeRevealClose.js +0 -28
  357. package/dist/_internal/server/jobs/core/prizeRevealExpiry.d.ts +0 -2
  358. package/dist/_internal/server/jobs/core/prizeRevealExpiry.js +0 -61
  359. package/dist/_internal/server/jobs/core/prizeRevealOpen.d.ts +0 -2
  360. package/dist/_internal/server/jobs/core/prizeRevealOpen.js +0 -68
  361. package/dist/_internal/server/jobs/core/prizeRevealReminder.d.ts +0 -2
  362. package/dist/_internal/server/jobs/core/prizeRevealReminder.js +0 -49
  363. package/dist/_internal/server/jobs/handlers/prizeRevealClose.d.ts +0 -2
  364. package/dist/_internal/server/jobs/handlers/prizeRevealClose.js +0 -2
  365. package/dist/_internal/server/jobs/handlers/prizeRevealExpiry.d.ts +0 -2
  366. package/dist/_internal/server/jobs/handlers/prizeRevealExpiry.js +0 -2
  367. package/dist/_internal/server/jobs/handlers/prizeRevealOpen.d.ts +0 -2
  368. package/dist/_internal/server/jobs/handlers/prizeRevealOpen.js +0 -2
  369. package/dist/_internal/server/jobs/handlers/prizeRevealReminder.d.ts +0 -2
  370. package/dist/_internal/server/jobs/handlers/prizeRevealReminder.js +0 -2
  371. package/dist/features/auth/consent-otp.d.ts +0 -57
  372. package/dist/features/auth/consent-otp.js +0 -127
  373. package/dist/features/cart/components/CheckoutOtpModal.d.ts +0 -15
  374. package/dist/features/cart/components/CheckoutOtpModal.js +0 -12
  375. package/dist/features/checkout/actions/checkout-actions.d.ts +0 -31
  376. package/dist/features/checkout/actions/checkout-actions.js +0 -124
  377. package/dist/features/classified/components/ClassifiedIndexListing.d.ts +0 -5
  378. package/dist/features/classified/components/ClassifiedIndexListing.js +0 -123
  379. package/dist/features/classified/components/ClassifiedListView.d.ts +0 -6
  380. package/dist/features/classified/components/ClassifiedListView.js +0 -44
  381. package/dist/features/digital-codes/components/DigitalCodesIndexListing.d.ts +0 -5
  382. package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +0 -114
  383. package/dist/features/digital-codes/components/DigitalCodesListView.d.ts +0 -6
  384. package/dist/features/digital-codes/components/DigitalCodesListView.js +0 -38
  385. package/dist/features/live/components/LiveItemsIndexListing.d.ts +0 -5
  386. package/dist/features/live/components/LiveItemsIndexListing.js +0 -115
  387. package/dist/features/live/components/LiveItemsListView.d.ts +0 -6
  388. package/dist/features/live/components/LiveItemsListView.js +0 -44
  389. package/dist/features/seller/components/SellerTemplatesView.d.ts +0 -12
  390. package/dist/features/seller/components/SellerTemplatesView.js +0 -276
  391. package/dist/react/hooks/useVisibleItems.d.ts +0 -37
  392. package/dist/react/hooks/useVisibleItems.js +0 -59
  393. package/dist/ui/components/TabStrip.d.ts +0 -34
  394. package/dist/ui/components/TabStrip.js +0 -56
  395. package/dist/ui/components/TabStrip.style.css +0 -97
@@ -1,41 +1,61 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useQuery } from "@tanstack/react-query";
4
- import { Alert, Div, Stack, Text } from "../../../../ui";
5
- import { DataTable } from "../DataTable";
6
- import { apiClient } from "../../../../http";
3
+ import { useState } from "react";
4
+ import { SIEVE_OP, sieveFilter, sortBy } from "@mohasinac/appkit/client";
5
+ import { Label, Input, PaginatedSelect } from "../../../../ui";
6
+ import { DataListingView } from "../DataListingView";
7
7
  import { ADMIN_ENDPOINTS } from "../../../../constants/api-endpoints";
8
+ import { PAGE_VIEW_ENTITY_TYPES } from "../../../analytics/types";
9
+ const ENTITY_TYPE_OPTIONS = PAGE_VIEW_ENTITY_TYPES.map((t) => ({ value: t, label: t }));
10
+ function today() {
11
+ // eslint-disable-next-line lir/no-raw-date
12
+ return new Date().toISOString().slice(0, 10);
13
+ }
14
+ function daysAgo(n) {
15
+ // eslint-disable-next-line lir/no-raw-date
16
+ const d = new Date();
17
+ d.setDate(d.getDate() - n);
18
+ return d.toISOString().slice(0, 10);
19
+ }
20
+ const COLUMNS = [
21
+ { key: "entityType", header: "Type" },
22
+ { key: "entityId", header: "Entity" },
23
+ { key: "url", header: "URL" },
24
+ { key: "count", header: "Views", sortable: true },
25
+ ];
8
26
  /** Admin analytics tab — page views for the requested date range, grouped by
9
- * entity (product/store/category/homepage/auction/review/user-profile) and
10
- * by raw URL. Backed by the day-bucketed pageViews collection. */
11
- export function AdminPageViewsReportView({ startDate, endDate }) {
12
- const endpoint = `${ADMIN_ENDPOINTS.ANALYTICS_PAGE_VIEWS}?startDate=${startDate}&endDate=${endDate}`;
13
- const query = useQuery({
14
- queryKey: ["admin-page-views", endpoint],
15
- queryFn: () => apiClient.get(endpoint),
16
- staleTime: 60000,
17
- });
18
- if (query.error) {
19
- return (_jsx(Alert, { variant: "error", title: "Could not load page views", children: query.error instanceof Error ? query.error.message : "Unknown error" }));
20
- }
21
- const data = query.data;
22
- return (_jsxs(Stack, { gap: "lg", children: [_jsx(Text, { size: "sm", color: "muted", children: data ? `${data.total.toLocaleString()} total views, ${startDate} – ${endDate}` : "Loading…" }), _jsxs(Div, { children: [_jsx(Text, { size: "sm", weight: "semibold", className: "mb-2", children: "By entity" }), _jsx(DataTable, { columns: [
23
- { key: "entityType", header: "Type" },
24
- { key: "entityId", header: "Entity" },
25
- { key: "url", header: "URL" },
26
- { key: "count", header: "Views" },
27
- ], rows: (data?.byEntity ?? []).map((row) => ({
28
- id: `${row.entityType}:${row.entityId}`,
29
- entityType: row.entityType,
30
- entityId: row.entityId,
31
- url: row.url,
32
- count: row.count.toLocaleString(),
33
- })), isLoading: query.isLoading, emptyLabel: "No page views recorded for this range." })] }), _jsxs(Div, { children: [_jsx(Text, { size: "sm", weight: "semibold", className: "mb-2", children: "By URL" }), _jsx(DataTable, { columns: [
34
- { key: "url", header: "URL" },
35
- { key: "count", header: "Views" },
36
- ], rows: (data?.byUrl ?? []).map((row) => ({
37
- id: row.url,
38
- url: row.url,
39
- count: row.count.toLocaleString(),
40
- })), isLoading: query.isLoading, emptyLabel: "No page views recorded for this range." })] })] }));
27
+ * entity (see PAGE_VIEW_ENTITY_TYPES for the full list), searchable by
28
+ * entity/URL, filterable by entity type, sortable by view count, and
29
+ * paginated. Backed by the day-bucketed pageViews collection. */
30
+ export function AdminPageViewsReportView() {
31
+ const [startDate, setStartDate] = useState(daysAgo(30));
32
+ const [endDate, setEndDate] = useState(today());
33
+ const config = {
34
+ portal: "admin",
35
+ title: "Page Views",
36
+ searchPlaceholder: "Search by entity or URL",
37
+ emptyLabel: "No page views recorded for this range.",
38
+ filterKeys: ["entityType"],
39
+ defaultSort: sortBy("count", "DESC"),
40
+ queryKey: ["admin", "analytics", "pageviews", "listing", startDate, endDate],
41
+ endpoint: `${ADMIN_ENDPOINTS.ANALYTICS_PAGE_VIEWS}?startDate=${startDate}&endDate=${endDate}`,
42
+ sortOptions: [
43
+ { value: sortBy("count", "DESC"), label: "Most views" },
44
+ { value: sortBy("count", "ASC"), label: "Fewest views" },
45
+ ],
46
+ columns: COLUMNS,
47
+ mapRows: (response) => response.items.map((item) => ({
48
+ id: `${item.entityType}:${item.entityId}`,
49
+ entityType: item.entityType,
50
+ entityId: item.entityId,
51
+ url: item.url,
52
+ count: item.count,
53
+ })),
54
+ getTotal: (response) => response.total,
55
+ buildFilters: (state) => state.entityType ? sieveFilter("entityType", SIEVE_OP.EQ, state.entityType) : undefined,
56
+ renderFilterPanel: ({ pendingFilters, setPendingFilters }) => (_jsx(PaginatedSelect, { value: pendingFilters.entityType || undefined, onChange: (v) => setPendingFilters((p) => ({ ...p, entityType: v ?? "" })), options: ENTITY_TYPE_OPTIONS })),
57
+ rowHrefTemplate: (row) => row.url,
58
+ renderAboveContent: () => (_jsxs(Label, { layout: "flex", gap: "md", color: "muted", size: "sm", className: "px-[var(--appkit-space-3)] pb-[var(--appkit-space-2)]", children: [_jsx(Input, { type: "date", value: startDate, max: endDate, onChange: (e) => setStartDate(e.target.value), className: "rounded-lg border px-[var(--appkit-space-2-5)] py-[var(--appkit-space-1-5)] text-[length:var(--appkit-text-sm)] border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface-elevated)] text-[var(--appkit-color-text)]" }), "to", _jsx(Input, { type: "date", value: endDate, min: startDate, max: today(), onChange: (e) => setEndDate(e.target.value), className: "rounded-lg border px-[var(--appkit-space-2-5)] py-[var(--appkit-space-1-5)] text-[length:var(--appkit-text-sm)] border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface-elevated)] text-[var(--appkit-color-text)]" })] })),
59
+ };
60
+ return _jsx(DataListingView, { config: config });
41
61
  }
@@ -97,6 +97,14 @@ export { AdminHistoryView } from "./AdminHistoryView";
97
97
  export type { AdminHistoryViewProps } from "./AdminHistoryView";
98
98
  export { AdminPayoutsView } from "./AdminPayoutsView";
99
99
  export type { AdminPayoutsViewProps } from "./AdminPayoutsView";
100
+ export { AdminPayoutMarkPaidModal } from "./AdminPayoutMarkPaidModal";
101
+ export type { AdminPayoutMarkPaidModalProps } from "./AdminPayoutMarkPaidModal";
102
+ export { AdminAuditLogView } from "./AdminAuditLogView";
103
+ export type { AdminAuditLogViewProps } from "./AdminAuditLogView";
104
+ export { ViewAuditLogEntryModal } from "./ViewAuditLogEntryModal";
105
+ export type { AuditLogEntryDetail, ViewAuditLogEntryModalProps } from "./ViewAuditLogEntryModal";
106
+ export { ViewNotificationModal } from "./ViewNotificationModal";
107
+ export type { NotificationEntryDetail, ViewNotificationModalProps } from "./ViewNotificationModal";
100
108
  export { AdminReviewsView } from "./AdminReviewsView";
101
109
  export type { AdminReviewsViewProps } from "./AdminReviewsView";
102
110
  export { AdminSectionsView } from "./AdminSectionsView";
@@ -134,7 +142,6 @@ export type { AdminRevenueChartProps, AdminOrdersChartProps, } from "./analytics
134
142
  export { AdminTopProductsTable } from "./analytics/AdminTopProductsTable";
135
143
  export type { AdminTopProductsTableProps, AdminTopProductsTableLabels, } from "./analytics/AdminTopProductsTable";
136
144
  export { AdminPageViewsReportView } from "./analytics/AdminPageViewsReportView";
137
- export type { AdminPageViewsReportViewProps } from "./analytics/AdminPageViewsReportView";
138
145
  export { AdminFeatureFlagsView } from "./AdminFeatureFlagsView";
139
146
  export type { AdminFeatureFlagsViewProps } from "./AdminFeatureFlagsView";
140
147
  export { AdminNewsletterView } from "./AdminNewsletterView";
@@ -53,6 +53,10 @@ export { AdminCartsView } from "./AdminCartsView";
53
53
  export { AdminWishlistsView } from "./AdminWishlistsView";
54
54
  export { AdminHistoryView } from "./AdminHistoryView";
55
55
  export { AdminPayoutsView } from "./AdminPayoutsView";
56
+ export { AdminPayoutMarkPaidModal } from "./AdminPayoutMarkPaidModal";
57
+ export { AdminAuditLogView } from "./AdminAuditLogView";
58
+ export { ViewAuditLogEntryModal } from "./ViewAuditLogEntryModal";
59
+ export { ViewNotificationModal } from "./ViewNotificationModal";
56
60
  export { AdminReviewsView } from "./AdminReviewsView";
57
61
  export { AdminSectionsView } from "./AdminSectionsView";
58
62
  export { AdminSessionsManager } from "./AdminSessionsManager";
@@ -148,6 +148,36 @@ export declare const ADMIN_PAYOUT_STATUS_TABS: readonly [{
148
148
  readonly id: "failed";
149
149
  readonly label: "Failed";
150
150
  }];
151
+ /** Admin > Audit Log — action-type filter chip set. IDs match
152
+ * `AdminAuditActionValues` (`appkit/src/features/audit-log/schemas/firestore.ts`) exactly. */
153
+ export declare const ADMIN_AUDIT_LOG_ACTION_TABS: readonly [{
154
+ readonly id: "All";
155
+ readonly label: "All";
156
+ }, {
157
+ readonly id: "user_hard_ban";
158
+ readonly label: "Hard ban";
159
+ }, {
160
+ readonly id: "user_soft_ban";
161
+ readonly label: "Soft ban";
162
+ }, {
163
+ readonly id: "user_unban";
164
+ readonly label: "Unban";
165
+ }, {
166
+ readonly id: "checkout_bypass";
167
+ readonly label: "Checkout bypass";
168
+ }, {
169
+ readonly id: "coupon_update";
170
+ readonly label: "Coupon update";
171
+ }, {
172
+ readonly id: "payout_mark_paid";
173
+ readonly label: "Payout paid";
174
+ }, {
175
+ readonly id: "store_status_change";
176
+ readonly label: "Store status";
177
+ }, {
178
+ readonly id: "user_role_change";
179
+ readonly label: "Role change";
180
+ }];
151
181
  /** Admin > Orders — order-state filter chip set. Lowercase IDs match
152
182
  * `OrderStatusValues` and the actual Firestore document `status` field. */
153
183
  export declare const ADMIN_ORDER_STATUS_TABS: readonly [{
@@ -175,6 +205,25 @@ export declare const ADMIN_ORDER_STATUS_TABS: readonly [{
175
205
  readonly id: "return_requested";
176
206
  readonly label: "Return Requested";
177
207
  }];
208
+ /**
209
+ * Admin > Orders — manual-payment (cash / UPI / EMI) review queue.
210
+ *
211
+ * Deliberately NOT a `status` chip set: these two states are *derived* from
212
+ * `paymentProofUrl` + `paymentReviewOutcome`, both of which are absent-by-
213
+ * default fields that no Firestore equality filter can select on. The IDs are
214
+ * `PaymentReviewQueueMode` values and are sent as the `paymentReview` query
215
+ * param (not a Sieve filter) — see `orderRepository.listPaymentReviewQueue`.
216
+ */
217
+ export declare const ADMIN_ORDER_PAYMENT_REVIEW_TABS: readonly [{
218
+ readonly id: "All";
219
+ readonly label: "All";
220
+ }, {
221
+ readonly id: "awaiting_proof";
222
+ readonly label: "Awaiting payment";
223
+ }, {
224
+ readonly id: "awaiting_verification";
225
+ readonly label: "Awaiting verification";
226
+ }];
178
227
  /** Admin > Reviews — moderation state filter chip set. */
179
228
  export declare const ADMIN_REVIEW_STATUS_TABS: readonly [{
180
229
  readonly id: "All";
@@ -74,6 +74,19 @@ export const ADMIN_PAYOUT_STATUS_TABS = [
74
74
  { id: "paid", label: "Paid" },
75
75
  { id: "failed", label: "Failed" },
76
76
  ];
77
+ /** Admin > Audit Log — action-type filter chip set. IDs match
78
+ * `AdminAuditActionValues` (`appkit/src/features/audit-log/schemas/firestore.ts`) exactly. */
79
+ export const ADMIN_AUDIT_LOG_ACTION_TABS = [
80
+ ALL_TAB,
81
+ { id: "user_hard_ban", label: "Hard ban" },
82
+ { id: "user_soft_ban", label: "Soft ban" },
83
+ { id: "user_unban", label: "Unban" },
84
+ { id: "checkout_bypass", label: "Checkout bypass" },
85
+ { id: "coupon_update", label: "Coupon update" },
86
+ { id: "payout_mark_paid", label: "Payout paid" },
87
+ { id: "store_status_change", label: "Store status" },
88
+ { id: "user_role_change", label: "Role change" },
89
+ ];
77
90
  /** Admin > Orders — order-state filter chip set. Lowercase IDs match
78
91
  * `OrderStatusValues` and the actual Firestore document `status` field. */
79
92
  export const ADMIN_ORDER_STATUS_TABS = [
@@ -86,6 +99,20 @@ export const ADMIN_ORDER_STATUS_TABS = [
86
99
  { id: "refunded", label: "Refunded" },
87
100
  { id: "return_requested", label: "Return Requested" },
88
101
  ];
102
+ /**
103
+ * Admin > Orders — manual-payment (cash / UPI / EMI) review queue.
104
+ *
105
+ * Deliberately NOT a `status` chip set: these two states are *derived* from
106
+ * `paymentProofUrl` + `paymentReviewOutcome`, both of which are absent-by-
107
+ * default fields that no Firestore equality filter can select on. The IDs are
108
+ * `PaymentReviewQueueMode` values and are sent as the `paymentReview` query
109
+ * param (not a Sieve filter) — see `orderRepository.listPaymentReviewQueue`.
110
+ */
111
+ export const ADMIN_ORDER_PAYMENT_REVIEW_TABS = [
112
+ ALL_TAB,
113
+ { id: "awaiting_proof", label: "Awaiting payment" },
114
+ { id: "awaiting_verification", label: "Awaiting verification" },
115
+ ];
89
116
  /** Admin > Reviews — moderation state filter chip set. */
90
117
  export const ADMIN_REVIEW_STATUS_TABS = [
91
118
  ALL_TAB,
@@ -9,6 +9,12 @@ export interface AdminListingConfig<TResponse, TRow extends {
9
9
  mapRows: (response: TResponse) => TRow[];
10
10
  getTotal?: (response: TResponse, rows: TRow[]) => number;
11
11
  buildFilters: (filterState: Record<string, string>) => string | undefined;
12
+ /**
13
+ * Extra query params derived from the same filter state, for endpoints whose
14
+ * filter can't be expressed as a Sieve string. Use `buildFilters` for
15
+ * anything Sieve *can* express — this is the escape hatch, not the default.
16
+ */
17
+ buildExtraParams?: (filterState: Record<string, string>) => Record<string, string | undefined> | undefined;
12
18
  initialView?: "grid" | "list" | "table";
13
19
  /** Values used for filterKeys absent from the URL — lets a view default to
14
20
  * a non-"All" filter state (e.g. hide inactive rows) on first load, while
@@ -6,7 +6,7 @@ import { usePanelUrlSync } from "../../../react/hooks/use-panel-url-sync";
6
6
  import { useDataViewMode } from "../../account/hooks/useDataViewMode";
7
7
  import { useAdminListingData } from "./useAdminListingData";
8
8
  export function useAdminListing(config) {
9
- const { filterKeys, defaultSort, pageSize: defaultPageSize = 25, queryKey, endpoint, mapRows, getTotal, buildFilters, filterDefaults = {}, } = config;
9
+ const { filterKeys, defaultSort, pageSize: defaultPageSize = 25, queryKey, endpoint, mapRows, getTotal, buildFilters, buildExtraParams, filterDefaults = {}, } = config;
10
10
  // Persisted, viewport-aware view-mode: below 768px defaults to "list"
11
11
  // (AdminViewCards' one-full-width-card-per-row layout) unless the caller
12
12
  // explicitly pins hideTableView (grid-only views like coupons); the user's
@@ -52,6 +52,7 @@ export function useAdminListing(config) {
52
52
  const hasActiveState = !!table.get("q") || table.get("sort") !== defaultSort || activeFilterCount > 0;
53
53
  const currentFilterState = Object.fromEntries(filterKeys.map((k) => [k, table.get(k)]));
54
54
  const filters = buildFilters(currentFilterState);
55
+ const extraParams = buildExtraParams?.(currentFilterState);
55
56
  const { rows, total, isLoading, errorMessage, refetch } = useAdminListingData({
56
57
  queryKey,
57
58
  endpoint,
@@ -60,6 +61,7 @@ export function useAdminListing(config) {
60
61
  sorts: table.get("sort") || defaultSort,
61
62
  filters,
62
63
  q: table.get("q") || undefined,
64
+ extraParams,
63
65
  mapRows,
64
66
  getTotal,
65
67
  });
@@ -15,6 +15,14 @@ interface UseAdminListingDataOptions<TResponse, TRow extends {
15
15
  sorts?: string;
16
16
  filters?: string;
17
17
  q?: string;
18
+ /**
19
+ * Extra query-string params appended verbatim, for listing endpoints whose
20
+ * filter isn't expressible as a Sieve string (e.g. the admin orders
21
+ * payment-review queue, which keys off the *absence* of a field). Keys with
22
+ * an `undefined` value are dropped. Participates in the react-query key, so
23
+ * changing one refetches rather than serving another mode's cached page.
24
+ */
25
+ extraParams?: Record<string, string | undefined>;
18
26
  mapRows: (response: TResponse) => TRow[];
19
27
  getTotal?: (response: TResponse, rows: TRow[]) => number;
20
28
  }
@@ -29,7 +37,7 @@ export interface UseAdminListingDataResult<TRow extends {
29
37
  }
30
38
  export declare function useAdminListingData<TResponse, TRow extends {
31
39
  id: string;
32
- }>({ queryKey, endpoint, page, pageSize, sorts, filters, q, mapRows, getTotal, }: UseAdminListingDataOptions<TResponse, TRow>): UseAdminListingDataResult<TRow>;
40
+ }>({ queryKey, endpoint, page, pageSize, sorts, filters, q, extraParams, mapRows, getTotal, }: UseAdminListingDataOptions<TResponse, TRow>): UseAdminListingDataResult<TRow>;
33
41
  export declare function toRecordArray(value: unknown): ListingItemRecord[];
34
42
  export declare function toStringValue(value: unknown, fallback?: string): string;
35
43
  export declare function toCurrency(value: unknown): string;
@@ -7,7 +7,7 @@ function withQueryParams(endpoint, params) {
7
7
  const query = new URLSearchParams(params).toString();
8
8
  return `${endpoint}${hasQuery ? "&" : "?"}${query}`;
9
9
  }
10
- export function useAdminListingData({ queryKey, endpoint, page = 1, pageSize = 25, sorts = "-createdAt", filters, q, mapRows, getTotal, }) {
10
+ export function useAdminListingData({ queryKey, endpoint, page = 1, pageSize = 25, sorts = "-createdAt", filters, q, extraParams, mapRows, getTotal, }) {
11
11
  const params = {
12
12
  page: String(page),
13
13
  pageSize: String(pageSize),
@@ -17,8 +17,15 @@ export function useAdminListingData({ queryKey, endpoint, page = 1, pageSize = 2
17
17
  params.filters = filters;
18
18
  if (q)
19
19
  params.q = q;
20
+ const extraEntries = Object.entries(extraParams ?? {})
21
+ .filter((entry) => entry[1] !== undefined && entry[1] !== "")
22
+ .sort(([a], [b]) => a.localeCompare(b));
23
+ for (const [key, value] of extraEntries)
24
+ params[key] = value;
20
25
  const query = useQuery({
21
- queryKey: [...queryKey, page, pageSize, sorts, filters ?? "", q ?? ""],
26
+ // extraEntries is sorted so an identical param set always produces an
27
+ // identical key regardless of object insertion order.
28
+ queryKey: [...queryKey, page, pageSize, sorts, filters ?? "", q ?? "", extraEntries],
22
29
  queryFn: () => apiClient.get(withQueryParams(endpoint, params)),
23
30
  staleTime: 60000,
24
31
  });
@@ -103,6 +103,11 @@ export declare class SiteSettingsRepository extends BaseRepository<SiteSettingsD
103
103
  fromName: string;
104
104
  fromEmail: string;
105
105
  replyTo: string;
106
+ dailyDigest?: {
107
+ enabled: boolean;
108
+ recipients: string[];
109
+ ccRecipients: string[];
110
+ };
106
111
  }>;
107
112
  /**
108
113
  * Check if site settings exist
@@ -388,6 +388,15 @@ export interface SiteSettingsDocument extends BaseDocument {
388
388
  legalName: string;
389
389
  address: string;
390
390
  };
391
+ auctionConfig: {
392
+ /** Ordered ascending by upTo; the last tier's upTo MUST be null (open-ended, "and above"). Drives the tiered minimum bid increment — see resolveMinBidIncrement in _internal/shared/features/auctions/config.ts. */
393
+ bidIncrementTiers: {
394
+ upTo: number | null;
395
+ increment: number;
396
+ }[];
397
+ autoExtendWindowMinutes: number;
398
+ settlementGracePeriodHours: number;
399
+ };
391
400
  socialLinks: {
392
401
  facebook?: string;
393
402
  twitter?: string;
@@ -398,6 +407,18 @@ export interface SiteSettingsDocument extends BaseDocument {
398
407
  fromName: string;
399
408
  fromEmail: string;
400
409
  replyTo: string;
410
+ /**
411
+ * Daily ops digest — the previous 24h of order activity, emailed to the
412
+ * team. Its arrival doubles as the platform health signal (if it stops
413
+ * landing, Firestore/Functions/Resend needs a look).
414
+ */
415
+ dailyDigest?: {
416
+ enabled: boolean;
417
+ /** Primary recipients (TO). */
418
+ recipients: string[];
419
+ /** Optional additional recipients (CC) — admin-extendable. */
420
+ ccRecipients: string[];
421
+ };
401
422
  };
402
423
  seo: {
403
424
  defaultTitle: string;
@@ -2,6 +2,7 @@
2
2
  * Admin Feature Firestore Document Types & Constants
3
3
  * Covers: notifications, chat rooms, site settings
4
4
  */
5
+ import { DEFAULT_AUCTION_BID_INCREMENT_TIERS } from "../../../_internal/shared/features/auctions/config";
5
6
  // Flag-key constants. Consumers MUST reference the bypass flag via this
6
7
  // constant so audit-checkout-bypass rule 1 (substring scan) only sees a
7
8
  // single occurrence in schemas. Splitting the literal makes the substring
@@ -216,6 +217,11 @@ export const DEFAULT_SITE_SETTINGS_DATA = {
216
217
  legalName: "",
217
218
  address: "",
218
219
  },
220
+ auctionConfig: {
221
+ bidIncrementTiers: DEFAULT_AUCTION_BID_INCREMENT_TIERS,
222
+ autoExtendWindowMinutes: 5,
223
+ settlementGracePeriodHours: 24,
224
+ },
219
225
  featureFlags: {
220
226
  chats: true,
221
227
  // Real per-SMS cost via the Firebase phone-auth quota — kept off by
@@ -2,5 +2,5 @@
2
2
  * page-views.repository.ts (server-only, imports firebase-admin) so the
3
3
  * client-side tracker component can import just this without pulling
4
4
  * firebase-admin into the client bundle. */
5
- export declare const PAGE_VIEW_ENTITY_TYPES: readonly ["product", "store", "category", "homepage", "auction", "review", "user-profile"];
5
+ export declare const PAGE_VIEW_ENTITY_TYPES: readonly ["product", "store", "category", "homepage", "auction", "review", "user-profile", "blog", "event", "pre-order", "prize-draw", "classified", "digital-code", "live", "bundle"];
6
6
  export type PageViewEntityType = (typeof PAGE_VIEW_ENTITY_TYPES)[number];
@@ -10,4 +10,12 @@ export const PAGE_VIEW_ENTITY_TYPES = [
10
10
  "auction",
11
11
  "review",
12
12
  "user-profile",
13
+ "blog",
14
+ "event",
15
+ "pre-order",
16
+ "prize-draw",
17
+ "classified",
18
+ "digital-code",
19
+ "live",
20
+ "bundle",
13
21
  ];
@@ -14,8 +14,10 @@ import { isAuctionListing } from "../../products/utils/listing-type";
14
14
  import { userRepository } from "../../auth/repository/user.repository";
15
15
  import { unitOfWork } from "../../../core/unit-of-work";
16
16
  import { storeRepository } from "../../stores/repository/store.repository";
17
+ import { siteSettingsRepository } from "../../../repositories";
17
18
  import { getAdminRealtimeDb } from "../../../providers/db-firebase";
18
19
  import { maskPublicBid } from "../../../security";
20
+ import { resolveMinBidIncrement } from "../../../_internal/shared/features/auctions/config";
19
21
  import { ERROR_MESSAGES, AuthorizationError, ValidationError, NotFoundError, } from "../../../errors";
20
22
  import { BID_ERROR_CODES } from "../../../errors/error-codes";
21
23
  import { increment } from "../../../contracts/field-ops";
@@ -47,7 +49,8 @@ export async function placeBid(userId, userEmail, input) {
47
49
  const baseBid = (product.currentBid ?? 0) > 0
48
50
  ? product.currentBid
49
51
  : (product.startingBid ?? product.price);
50
- const minIncrement = product.minBidIncrement ?? 1;
52
+ const settings = await siteSettingsRepository.getSingleton();
53
+ const minIncrement = resolveMinBidIncrement(baseBid, settings.auctionConfig?.bidIncrementTiers ?? [], product.minBidIncrement);
51
54
  // Proxy-bid semantics (eBay style): the buyer's `bidAmount` is treated as
52
55
  // their **maximum** they're willing to pay; the visible price only steps up
53
56
  // in `minIncrement` units as needed to stay ahead of the previous high bid.
@@ -3,5 +3,6 @@ export interface AuctionBottomActionsProps {
3
3
  currency: string;
4
4
  bidCount: number;
5
5
  isEnded: boolean;
6
+ auctionEndDate: Date | null;
6
7
  }
7
- export declare function AuctionBottomActions({ currentBid, currency, bidCount, isEnded, }: AuctionBottomActionsProps): null;
8
+ export declare function AuctionBottomActions({ currentBid, currency, bidCount, isEnded, auctionEndDate, }: AuctionBottomActionsProps): null;
@@ -2,8 +2,20 @@
2
2
  import { useBottomActions } from "../../layout/hooks/useBottomActions";
3
3
  import { formatCurrency } from "../../../utils/number.formatter";
4
4
  import { ACTION_ID, ACTION_META } from "../../products/constants/action-defs";
5
- export function AuctionBottomActions({ currentBid, currency, bidCount, isEnded, }) {
5
+ import { useCountdown } from "../../../react";
6
+ function formatCountdownLabel(remaining) {
7
+ if (!remaining)
8
+ return undefined;
9
+ const { days, hours, minutes, seconds } = remaining;
10
+ if (days > 0)
11
+ return `Ends in ${days}d ${hours}h ${minutes}m`;
12
+ if (hours > 0)
13
+ return `Ends in ${hours}h ${minutes}m ${seconds}s`;
14
+ return `Ends in ${minutes}m ${seconds}s`;
15
+ }
16
+ export function AuctionBottomActions({ currentBid, currency, bidCount, isEnded, auctionEndDate, }) {
6
17
  const placeBidMeta = ACTION_META[ACTION_ID.PLACE_BID];
18
+ const remaining = useCountdown(auctionEndDate ?? undefined);
7
19
  useBottomActions(isEnded
8
20
  ? {}
9
21
  : {
@@ -17,6 +29,7 @@ export function AuctionBottomActions({ currentBid, currency, bidCount, isEnded,
17
29
  },
18
30
  },
19
31
  ],
32
+ secondaryLabel: formatCountdownLabel(remaining),
20
33
  infoLabel: `${formatCurrency(currentBid, currency)} · ${bidCount} bid${bidCount !== 1 ? "s" : ""}`,
21
34
  });
22
35
  return null;