@mohasinac/appkit 4.10.0 → 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 (319) 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/audit-log/actions.d.ts +25 -0
  8. package/dist/_internal/server/features/audit-log/actions.js +38 -0
  9. package/dist/_internal/server/features/brands/actions.js +0 -2
  10. package/dist/_internal/server/features/brands/og.d.ts +4 -1
  11. package/dist/_internal/server/features/brands/og.js +1 -1
  12. package/dist/_internal/server/features/grouped/data.d.ts +4 -0
  13. package/dist/_internal/server/features/grouped/data.js +24 -0
  14. package/dist/_internal/server/features/grouped/index.d.ts +1 -1
  15. package/dist/_internal/server/features/grouped/index.js +1 -1
  16. package/dist/_internal/server/features/orders/actions.js +9 -0
  17. package/dist/_internal/server/features/orders/adapters.js +25 -0
  18. package/dist/_internal/server/functions/scheduled.d.ts +3 -1
  19. package/dist/_internal/server/functions/scheduled.js +17 -1
  20. package/dist/_internal/server/jobs/core/dailyStatusDigest.d.ts +40 -0
  21. package/dist/_internal/server/jobs/core/dailyStatusDigest.js +164 -0
  22. package/dist/_internal/server/jobs/core/hardBanCascade.js +11 -0
  23. package/dist/_internal/server/jobs/core/testerSandboxCleanup.d.ts +1 -0
  24. package/dist/_internal/server/jobs/core/testerSandboxCleanup.js +4 -1
  25. package/dist/_internal/server/jobs/core/testerSandboxRefresh.d.ts +12 -0
  26. package/dist/_internal/server/jobs/core/testerSandboxRefresh.js +85 -0
  27. package/dist/_internal/server/jobs/core/whatsappNotify.js +16 -0
  28. package/dist/_internal/server/jobs/handlers/dailyStatusDigest.d.ts +2 -0
  29. package/dist/_internal/server/jobs/handlers/dailyStatusDigest.js +4 -0
  30. package/dist/_internal/server/jobs/handlers/index.d.ts +2 -0
  31. package/dist/_internal/server/jobs/handlers/index.js +3 -0
  32. package/dist/_internal/server/jobs/handlers/testerSandboxRefresh.d.ts +2 -0
  33. package/dist/_internal/server/jobs/handlers/testerSandboxRefresh.js +2 -0
  34. package/dist/_internal/server/notifications/channel-health.d.ts +27 -0
  35. package/dist/_internal/server/notifications/channel-health.js +101 -0
  36. package/dist/_internal/shared/features/brands/schema.d.ts +0 -6
  37. package/dist/_internal/shared/features/brands/schema.js +0 -1
  38. package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +7 -0
  39. package/dist/_internal/shared/features/categories/bundle-schemas.js +3 -0
  40. package/dist/_internal/shared/features/orders/schema.d.ts +8 -8
  41. package/dist/client.d.ts +21 -6
  42. package/dist/client.js +13 -3
  43. package/dist/constants/api-endpoints.d.ts +6 -9
  44. package/dist/constants/api-endpoints.js +2 -3
  45. package/dist/contracts/client-auth.d.ts +3 -7
  46. package/dist/contracts/email.d.ts +1 -0
  47. package/dist/features/account/components/AddressForm.js +24 -2
  48. package/dist/features/account/components/BecomeSellerView.d.ts +1 -2
  49. package/dist/features/account/components/BecomeSellerView.js +1 -1
  50. package/dist/features/account/components/NotificationBell.js +1 -1
  51. package/dist/features/account/components/UserBidsView.d.ts +1 -0
  52. package/dist/features/account/components/UserBidsView.js +47 -0
  53. package/dist/features/account/components/UserOrdersView.d.ts +4 -11
  54. package/dist/features/account/components/UserOrdersView.js +54 -4
  55. package/dist/features/account/components/UserReturnsView.d.ts +4 -9
  56. package/dist/features/account/components/UserReturnsView.js +37 -3
  57. package/dist/features/account/components/index.d.ts +3 -2
  58. package/dist/features/account/components/index.js +1 -0
  59. package/dist/features/admin/actions/admin-actions.js +22 -0
  60. package/dist/features/admin/actions/admin-coupon-actions.js +10 -0
  61. package/dist/features/admin/actions/notification-actions.js +4 -3
  62. package/dist/features/admin/components/AdminAdsView.d.ts +2 -3
  63. package/dist/features/admin/components/AdminAdsView.js +86 -89
  64. package/dist/features/admin/components/AdminAllEventEntriesView.js +18 -3
  65. package/dist/features/admin/components/AdminAuditLogView.d.ts +11 -0
  66. package/dist/features/admin/components/AdminAuditLogView.js +95 -0
  67. package/dist/features/admin/components/AdminBlogEditorView.js +37 -3
  68. package/dist/features/admin/components/AdminBrandEditorView.js +10 -6
  69. package/dist/features/admin/components/AdminBundleEditorView.js +18 -2
  70. package/dist/features/admin/components/AdminCarouselEditorView.js +2 -2
  71. package/dist/features/admin/components/AdminCarouselGroupEditorView.js +2 -2
  72. package/dist/features/admin/components/AdminCartsView.js +34 -4
  73. package/dist/features/admin/components/AdminCategoryEditorView.js +5 -4
  74. package/dist/features/admin/components/AdminCouponEditorView.js +2 -2
  75. package/dist/features/admin/components/AdminFaqEditorView.js +2 -2
  76. package/dist/features/admin/components/AdminHistoryView.js +11 -1
  77. package/dist/features/admin/components/AdminNotificationsView.js +27 -1
  78. package/dist/features/admin/components/AdminOrderEditorView.d.ts +10 -1
  79. package/dist/features/admin/components/AdminOrderEditorView.js +4 -3
  80. package/dist/features/admin/components/AdminOrdersView.js +92 -24
  81. package/dist/features/admin/components/AdminPayoutMarkPaidModal.d.ts +7 -0
  82. package/dist/features/admin/components/AdminPayoutMarkPaidModal.js +47 -0
  83. package/dist/features/admin/components/AdminPayoutsView.js +15 -31
  84. package/dist/features/admin/components/AdminProductEditorView.js +26 -3
  85. package/dist/features/admin/components/AdminSiteSettingsView.js +20 -1
  86. package/dist/features/admin/components/AdminStoreAddressesView.js +22 -2
  87. package/dist/features/admin/components/AdminStoresView.js +7 -0
  88. package/dist/features/admin/components/AdminSublistingCategoryEditorView.js +2 -2
  89. package/dist/features/admin/components/AdminTesterChecklistItemEditorView.js +2 -2
  90. package/dist/features/admin/components/AdminUserEditorView.d.ts +2 -2
  91. package/dist/features/admin/components/AdminUserEditorView.js +4 -2
  92. package/dist/features/admin/components/AdminUsersView.js +1 -1
  93. package/dist/features/admin/components/AdminWishlistsView.js +14 -1
  94. package/dist/features/admin/components/DataListingView.d.ts +2 -2
  95. package/dist/features/admin/components/ViewAuditLogEntryModal.d.ts +19 -0
  96. package/dist/features/admin/components/ViewAuditLogEntryModal.js +22 -0
  97. package/dist/features/admin/components/ViewNotificationModal.d.ts +21 -0
  98. package/dist/features/admin/components/ViewNotificationModal.js +15 -0
  99. package/dist/features/admin/components/analytics/AdminPageViewsReportView.d.ts +4 -7
  100. package/dist/features/admin/components/analytics/AdminPageViewsReportView.js +56 -36
  101. package/dist/features/admin/components/index.d.ts +8 -1
  102. package/dist/features/admin/components/index.js +4 -0
  103. package/dist/features/admin/constants/filter-tabs.d.ts +49 -0
  104. package/dist/features/admin/constants/filter-tabs.js +27 -0
  105. package/dist/features/admin/hooks/useAdminListing.d.ts +6 -0
  106. package/dist/features/admin/hooks/useAdminListing.js +3 -1
  107. package/dist/features/admin/hooks/useAdminListingData.d.ts +9 -1
  108. package/dist/features/admin/hooks/useAdminListingData.js +9 -2
  109. package/dist/features/admin/repository/site-settings.repository.d.ts +5 -0
  110. package/dist/features/admin/schemas/firestore.d.ts +12 -0
  111. package/dist/features/analytics/types.d.ts +1 -1
  112. package/dist/features/analytics/types.js +8 -0
  113. package/dist/features/auctions/schemas/index.d.ts +5 -0
  114. package/dist/features/audit-log/repository/audit-log.repository.d.ts +45 -0
  115. package/dist/features/audit-log/repository/audit-log.repository.js +30 -0
  116. package/dist/features/audit-log/schemas/firestore.d.ts +59 -0
  117. package/dist/features/audit-log/schemas/firestore.js +35 -0
  118. package/dist/features/auth/actions/index.d.ts +0 -1
  119. package/dist/features/auth/actions/index.js +0 -1
  120. package/dist/features/auth/hooks/useAuth.d.ts +8 -35
  121. package/dist/features/auth/hooks/useAuth.js +21 -37
  122. package/dist/features/auth/permissions/constants.d.ts +1 -1
  123. package/dist/features/auth/permissions/constants.js +2 -0
  124. package/dist/features/blog/schemas/index.d.ts +32 -0
  125. package/dist/features/catalogue/components/AdminCatalogueApprovalsView.js +31 -3
  126. package/dist/features/catalogue/components/CatalogueItemEditorView.js +2 -1
  127. package/dist/features/categories/components/BrandDetailPageView.js +14 -12
  128. package/dist/features/categories/components/CategoryDetailPageView.js +7 -3
  129. package/dist/features/categories/components/CategoryHighlightsAndFaqSection.d.ts +14 -0
  130. package/dist/features/categories/components/CategoryHighlightsAndFaqSection.js +22 -0
  131. package/dist/features/categories/components/CategoryProductsView.d.ts +1 -5
  132. package/dist/features/categories/components/CategoryProductsView.js +1 -1
  133. package/dist/features/categories/components/CategorySelectorCreate.js +16 -2
  134. package/dist/features/categories/schemas/firestore.d.ts +19 -2
  135. package/dist/features/categories/schemas/index.d.ts +24 -3
  136. package/dist/features/categories/schemas/index.js +3 -1
  137. package/dist/features/categories/types/index.d.ts +7 -0
  138. package/dist/features/checkout/actions/checkout-value-otp-actions.d.ts +17 -3
  139. package/dist/features/checkout/actions/checkout-value-otp-actions.js +101 -22
  140. package/dist/features/contact/components/ContactForm.js +17 -4
  141. package/dist/features/contact/email.d.ts +1 -0
  142. package/dist/features/contact/email.js +3 -0
  143. package/dist/features/events/components/AdminEventEditorView.js +54 -2
  144. package/dist/features/events/components/AdminEventEntriesView.d.ts +2 -16
  145. package/dist/features/events/components/AdminEventEntriesView.js +56 -89
  146. package/dist/features/events/components/EventFormDrawer.js +5 -1
  147. package/dist/features/events/components/EventRaffleEntryForm.d.ts +1 -3
  148. package/dist/features/events/components/EventRaffleEntryForm.js +1 -1
  149. package/dist/features/events/schemas/index.d.ts +22 -0
  150. package/dist/features/grouped/repository/grouped-listings.repository.d.ts +4 -0
  151. package/dist/features/grouped/repository/grouped-listings.repository.js +18 -0
  152. package/dist/features/homepage/components/CharacterHotspotForm.js +202 -187
  153. package/dist/features/homepage/components/SectionCarousel.d.ts +1 -7
  154. package/dist/features/homepage/components/SectionCarousel.js +1 -1
  155. package/dist/features/layout/TitleBarLayout.d.ts +1 -1
  156. package/dist/features/layout/TitleBarLayout.js +3 -3
  157. package/dist/features/media/MediaImage.js +39 -3
  158. package/dist/features/media/types/index.d.ts +10 -0
  159. package/dist/features/media/types/index.js +1 -0
  160. package/dist/features/media/upload/MediaUploadField.d.ts +7 -1
  161. package/dist/features/media/upload/MediaUploadField.js +11 -7
  162. package/dist/features/media/upload/video-poster.d.ts +2 -0
  163. package/dist/features/media/upload/video-poster.js +16 -1
  164. package/dist/features/media/upload/video-poster.test.js +1 -1
  165. package/dist/features/orders/components/OrderStatusTimeline.d.ts +12 -0
  166. package/dist/features/orders/components/OrderStatusTimeline.js +55 -0
  167. package/dist/features/orders/components/index.d.ts +2 -0
  168. package/dist/features/orders/components/index.js +1 -0
  169. package/dist/features/orders/constants/payment-window.d.ts +25 -0
  170. package/dist/features/orders/constants/payment-window.js +25 -0
  171. package/dist/features/orders/repository/orders.repository.d.ts +32 -0
  172. package/dist/features/orders/repository/orders.repository.js +56 -0
  173. package/dist/features/orders/schemas/index.d.ts +24 -24
  174. package/dist/features/orders/types/index.d.ts +33 -0
  175. package/dist/features/pre-orders/schemas/index.d.ts +5 -0
  176. package/dist/features/products/components/BidHistory.js +9 -1
  177. package/dist/features/products/components/GroupSettingsPanel.js +25 -3
  178. package/dist/features/products/components/PrizeDrawDetailPageView.js +1 -1
  179. package/dist/features/products/components/PrizeDrawEntryActions.d.ts +1 -4
  180. package/dist/features/products/components/PrizeDrawEntryActions.js +1 -1
  181. package/dist/features/products/components/ProductDetailActions.d.ts +1 -2
  182. package/dist/features/products/components/ProductDetailActions.js +1 -1
  183. package/dist/features/products/components/ProductGrid.js +15 -1
  184. package/dist/features/products/constants/action-defs.d.ts +1 -0
  185. package/dist/features/products/constants/action-defs.js +1 -0
  186. package/dist/features/products/schemas/index.d.ts +5 -0
  187. package/dist/features/promotions/components/CouponsIndexListing.d.ts +1 -3
  188. package/dist/features/promotions/components/CouponsIndexListing.js +1 -1
  189. package/dist/features/search/components/SearchView.d.ts +1 -3
  190. package/dist/features/search/components/SearchView.js +1 -1
  191. package/dist/features/seller/components/QuickProductForm.js +2 -1
  192. package/dist/features/seller/components/SellerBidsView.js +66 -107
  193. package/dist/features/seller/components/SellerGoogleReviewsView.js +17 -1
  194. package/dist/features/seller/components/SellerOrdersView.d.ts +15 -3
  195. package/dist/features/seller/components/SellerOrdersView.js +134 -163
  196. package/dist/features/seller/components/SellerPayoutMethodsView.js +60 -48
  197. package/dist/features/seller/components/SellerPayoutSettingsView.js +69 -4
  198. package/dist/features/seller/components/SellerPayoutsView.d.ts +12 -0
  199. package/dist/features/seller/components/SellerPayoutsView.js +25 -5
  200. package/dist/features/seller/components/SellerProductShell.d.ts +10 -3
  201. package/dist/features/seller/components/SellerProductShell.js +89 -36
  202. package/dist/features/seller/components/SellerProductsFilterDrawer.d.ts +2 -7
  203. package/dist/features/seller/components/SellerProductsFilterDrawer.js +4 -4
  204. package/dist/features/seller/components/SellerProductsView.d.ts +2 -4
  205. package/dist/features/seller/components/SellerProductsView.js +131 -189
  206. package/dist/features/seller/components/SellerReviewsView.js +95 -133
  207. package/dist/features/seller/components/SellerShippingConfigsView.js +47 -67
  208. package/dist/features/seller/components/SellerShippingView.js +41 -4
  209. package/dist/features/seller/components/SellerStoreCategoriesView.js +51 -59
  210. package/dist/features/seller/components/SellerStorefrontView.d.ts +6 -1
  211. package/dist/features/seller/components/SellerStorefrontView.js +42 -5
  212. package/dist/features/seller/components/index.d.ts +2 -2
  213. package/dist/features/seller/components/index.js +2 -2
  214. package/dist/features/shell/FormShell.d.ts +24 -4
  215. package/dist/features/shell/FormShell.js +12 -6
  216. package/dist/features/shell/QuickFormDrawer.js +67 -12
  217. package/dist/features/shell/StepForm.d.ts +30 -1
  218. package/dist/features/shell/StepForm.js +47 -4
  219. package/dist/features/shell/index.d.ts +1 -1
  220. package/dist/features/shell/index.js +1 -1
  221. package/dist/features/shipments/components/AdminShipmentEditorView.js +2 -2
  222. package/dist/features/shipments/schemas/validation.d.ts +14 -4
  223. package/dist/features/tester/components/AdminTesterFeedbackListView.js +23 -2
  224. package/dist/features/tester/components/TesterChecklistStepRow.js +1 -1
  225. package/dist/features/tester/components/TesterHubView.js +3 -2
  226. package/dist/features/tester/seed-data/orders-tester-seed-data.js +9 -1
  227. package/dist/features/tester/seed-data/products-tester-seed-data.js +43 -32
  228. package/dist/features/tester/seed-data/tester-checklist-seed-data.js +404 -15
  229. package/dist/index.d.ts +15 -3
  230. package/dist/index.js +22 -5
  231. package/dist/next/routing/route-map.d.ts +11 -0
  232. package/dist/next/routing/route-map.js +5 -0
  233. package/dist/providers/email-resend/provider.js +1 -0
  234. package/dist/providers/firebase-client/auth.d.ts +1 -0
  235. package/dist/providers/firebase-client/auth.js +7 -1
  236. package/dist/repositories/index.d.ts +1 -0
  237. package/dist/repositories/index.js +1 -0
  238. package/dist/schemas/registry.d.ts +61 -25
  239. package/dist/security/pii-mask.js +1 -1
  240. package/dist/seed/categories-seed-data.js +69 -0
  241. package/dist/seed/products-auctions-seed-data.js +11 -0
  242. package/dist/seed/products-standard-seed-data.js +93 -4
  243. package/dist/seed/site-settings-seed-data.js +13 -1
  244. package/dist/seed/store-extensions-seed-data.js +1 -1
  245. package/dist/server-entry.d.ts +2 -1
  246. package/dist/server-entry.js +20 -2
  247. package/dist/server.d.ts +7 -2
  248. package/dist/server.js +8 -3
  249. package/dist/styles.css +1 -1
  250. package/dist/tailwind-utilities.css +1 -1
  251. package/dist/ui/components/Form.d.ts +11 -2
  252. package/dist/ui/components/Form.js +4 -3
  253. package/dist/ui/components/FormField.d.ts +3 -1
  254. package/dist/ui/components/FormField.js +22 -4
  255. package/dist/ui/components/ListingLayout.d.ts +1 -2
  256. package/dist/ui/components/ListingLayout.js +1 -1
  257. package/dist/ui/components/RecordDetailModal.d.ts +68 -0
  258. package/dist/ui/components/RecordDetailModal.js +8 -0
  259. package/dist/ui/components/SlottedListingView.js +9 -1
  260. package/dist/ui/forms/FormErrorSummary.d.ts +25 -0
  261. package/dist/ui/forms/FormErrorSummary.js +37 -0
  262. package/dist/ui/forms/FormShell.d.ts +37 -2
  263. package/dist/ui/forms/FormShell.js +37 -7
  264. package/dist/ui/forms/FormShell.style.css +17 -0
  265. package/dist/ui/forms/index.d.ts +2 -0
  266. package/dist/ui/forms/index.js +1 -0
  267. package/dist/ui/index.d.ts +4 -0
  268. package/dist/ui/index.js +5 -0
  269. package/dist/utils/media-url.d.ts +3 -1
  270. package/dist/utils/media-url.js +20 -1
  271. package/dist/validation/schemas.d.ts +4 -4
  272. package/package.json +1 -1
  273. package/dist/_internal/client/features/classified/ClassifiedDetailView.d.ts +0 -9
  274. package/dist/_internal/client/features/classified/ClassifiedDetailView.js +0 -55
  275. package/dist/_internal/client/features/digital-code/DigitalCodeDetailView.d.ts +0 -18
  276. package/dist/_internal/client/features/digital-code/DigitalCodeDetailView.js +0 -21
  277. package/dist/_internal/client/features/live/LiveItemDetailView.d.ts +0 -9
  278. package/dist/_internal/client/features/live/LiveItemDetailView.js +0 -25
  279. package/dist/_internal/server/jobs/core/prizeRevealClose.d.ts +0 -2
  280. package/dist/_internal/server/jobs/core/prizeRevealClose.js +0 -28
  281. package/dist/_internal/server/jobs/core/prizeRevealExpiry.d.ts +0 -2
  282. package/dist/_internal/server/jobs/core/prizeRevealExpiry.js +0 -61
  283. package/dist/_internal/server/jobs/core/prizeRevealOpen.d.ts +0 -2
  284. package/dist/_internal/server/jobs/core/prizeRevealOpen.js +0 -68
  285. package/dist/_internal/server/jobs/core/prizeRevealReminder.d.ts +0 -2
  286. package/dist/_internal/server/jobs/core/prizeRevealReminder.js +0 -49
  287. package/dist/_internal/server/jobs/handlers/prizeRevealClose.d.ts +0 -2
  288. package/dist/_internal/server/jobs/handlers/prizeRevealClose.js +0 -2
  289. package/dist/_internal/server/jobs/handlers/prizeRevealExpiry.d.ts +0 -2
  290. package/dist/_internal/server/jobs/handlers/prizeRevealExpiry.js +0 -2
  291. package/dist/_internal/server/jobs/handlers/prizeRevealOpen.d.ts +0 -2
  292. package/dist/_internal/server/jobs/handlers/prizeRevealOpen.js +0 -2
  293. package/dist/_internal/server/jobs/handlers/prizeRevealReminder.d.ts +0 -2
  294. package/dist/_internal/server/jobs/handlers/prizeRevealReminder.js +0 -2
  295. package/dist/features/auth/consent-otp.d.ts +0 -57
  296. package/dist/features/auth/consent-otp.js +0 -127
  297. package/dist/features/cart/components/CheckoutOtpModal.d.ts +0 -15
  298. package/dist/features/cart/components/CheckoutOtpModal.js +0 -12
  299. package/dist/features/checkout/actions/checkout-actions.d.ts +0 -31
  300. package/dist/features/checkout/actions/checkout-actions.js +0 -124
  301. package/dist/features/classified/components/ClassifiedIndexListing.d.ts +0 -5
  302. package/dist/features/classified/components/ClassifiedIndexListing.js +0 -123
  303. package/dist/features/classified/components/ClassifiedListView.d.ts +0 -6
  304. package/dist/features/classified/components/ClassifiedListView.js +0 -44
  305. package/dist/features/digital-codes/components/DigitalCodesIndexListing.d.ts +0 -5
  306. package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +0 -114
  307. package/dist/features/digital-codes/components/DigitalCodesListView.d.ts +0 -6
  308. package/dist/features/digital-codes/components/DigitalCodesListView.js +0 -38
  309. package/dist/features/live/components/LiveItemsIndexListing.d.ts +0 -5
  310. package/dist/features/live/components/LiveItemsIndexListing.js +0 -115
  311. package/dist/features/live/components/LiveItemsListView.d.ts +0 -6
  312. package/dist/features/live/components/LiveItemsListView.js +0 -44
  313. package/dist/features/seller/components/SellerTemplatesView.d.ts +0 -12
  314. package/dist/features/seller/components/SellerTemplatesView.js +0 -276
  315. package/dist/react/hooks/useVisibleItems.d.ts +0 -37
  316. package/dist/react/hooks/useVisibleItems.js +0 -59
  317. package/dist/ui/components/TabStrip.d.ts +0 -34
  318. package/dist/ui/components/TabStrip.js +0 -56
  319. package/dist/ui/components/TabStrip.style.css +0 -97
package/dist/client.js CHANGED
@@ -52,6 +52,8 @@ export { Alert } from "./ui/components/Alert";
52
52
  export { Divider } from "./ui/components/Divider";
53
53
  export { Tabs, TabsList, TabsTrigger, TabsContent } from "./ui/components/Tabs";
54
54
  export { SellerProductsView } from "./features/seller/components/SellerProductsView";
55
+ export { SellerOrderDetailPanel } from "./features/seller/components/SellerOrdersView";
56
+ export { SellerPayoutDetailContent } from "./features/seller/components/SellerPayoutsView";
55
57
  // [CLIENT-ONLY]-Cannot run in SSR mode â€" uses browser-only APIs (window, navigator, localStorage, matchMedia, DOM events) that do not exist in Node.js.
56
58
  // Drawer - Component for drawer.
57
59
  export { Drawer } from "./ui/components/Drawer";
@@ -186,6 +188,8 @@ export { DynamicBgDiv } from "./ui/components/DynamicBgDiv";
186
188
  export { ProgressBarFill } from "./ui/components/ProgressBarFill";
187
189
  export { Main, Section, Nav, Ul, Ol, Li, Table, Thead, Tbody, Tr, Th, Td, Code, Pre, Blockquote } from "./ui/components/Semantic";
188
190
  export { Badge } from "./ui/components/Badge";
191
+ export { Avatar, AvatarGroup } from "./ui/components/Avatar";
192
+ export { AvatarDisplay } from "./ui/components/AvatarDisplay";
189
193
  export { Button } from "./ui/components/Button";
190
194
  export { ClaimCouponButton } from "./ui/components/ClaimCouponButton";
191
195
  export { Checkbox } from "./ui/components/Checkbox";
@@ -199,6 +203,7 @@ export { FieldSelect } from "./ui/forms";
199
203
  export { FieldCheckbox } from "./ui/forms";
200
204
  export { FieldTextarea } from "./ui/forms";
201
205
  export { ColorPickerField } from "./ui/forms";
206
+ export { FormErrorSummary } from "./ui/forms";
202
207
  export { Select } from "./ui/components/Select";
203
208
  export { Heading } from "./ui/components/Typography";
204
209
  export { Label, Text, Span, Caption } from "./ui/components/Typography";
@@ -231,7 +236,7 @@ export { PageViewTracker } from "./features/analytics/components/PageViewTracker
231
236
  export { PAGE_VIEW_ENTITY_TYPES } from "./features/analytics/types";
232
237
  export { AuctionBidsTable } from "./features/auctions/components/AuctionBidsTable";
233
238
  export { ProtectedRoute, AuthStatusPanel, ForgotPasswordView, LoginForm, RegisterForm, ResetPasswordView, VerifyEmailView } from "./features/auth/index";
234
- export { useLogout, useLogin, useGoogleLogin, useLinkGoogleAccount, useRegister, useForgotPassword, useResetPassword, useVerifyEmail, useChangePassword, useRequestPasswordChangeOtp, useVerifyPasswordChangeOtp, useChangeEmail } from "./features/auth/index";
239
+ export { useLogout, useLogin, useGoogleLogin, useLinkGoogleAccount, useRegister, useForgotPassword, useResetPassword, useVerifyEmail, useChangeEmail } from "./features/auth/index";
235
240
  export { CartView, CartItemRow, CartSummary, CartDrawer, CheckoutView, CheckoutSuccessView, CheckoutAddressStep, useGuestCart, useCartCount, useAddToCart, useCart, useGuestCartMerge, useCartQuery } from "./features/cart/index";
236
241
  export { getCartOps, CART_OPS_CHANGE_EVENT } from "./features/cart/utils/pending-ops";
237
242
  export { useAddresses, useCreateAddress, useUpdateAddress, useDeleteAddress, useSetDefaultAddress, useAddress } from "./features/account/index";
@@ -290,8 +295,13 @@ export { SellerOffersPanel } from "./features/seller/components/SellerOffersPane
290
295
  export { UserOffersPanel } from "./features/account/components/UserOffersPanel";
291
296
  export { SellerDashboardView as StoreDashboardView, SellerDashboardView, useSellerDashboard as useStoreDashboard, useSellerDashboard } from "./features/seller/index";
292
297
  export { SellerPayoutSettingsView, SellerShippingView, SellerReviewsView, SellerPayoutRequestView, SellerAnalyticsStats, SellerTopProducts, SellerAnalyticsView, SellerPayoutsView, SellerCouponEditorView, SellerBidsView, SellerAddressesView, SellerPreOrdersView, SellerPrizeDrawsView, PrintCenterView, SellerOffersView, SellerGroupedListingsView, StoreGroupedListingsView, SellerAnalyticsAlertsView, StoreAnalyticsAlertsView, BarcodeField, FulfillmentView } from "./features/seller/components/index";
293
- export { UserAccountHubView, UserOrdersView, OrderDetailView, UserNotificationsView, UserReturnsView, UserSupportView, useNotifications } from "./features/account/index";
298
+ export { UserAccountHubView, UserOrdersView, UserBidsView, OrderDetailView, UserNotificationsView, UserReturnsView, UserSupportView, useNotifications } from "./features/account/index";
294
299
  export { useOrders, useOrder, OrdersList } from "./features/orders/index";
300
+ export { OrderStatusTimeline } from "./features/orders/components/OrderStatusTimeline";
301
+ // Manual-payment (cash / UPI / EMI) shared constants — pure data + predicates,
302
+ // no server deps. Used by the buyer proof-upload page and order-detail CTAs.
303
+ export { MANUAL_PAYMENT_METHODS, isManualPaymentMethod, PAYMENT_REVIEW_QUEUE_MODES, isPaymentReviewQueueMode, PAYMENT_WINDOW_MINUTES, } from "./features/orders/constants/payment-window";
304
+ export { UserOrderTrackView } from "./features/account/components/UserOrderTrackView";
295
305
  export { useCouponValidate } from "./features/promotions/hooks/useCouponValidate";
296
306
  export { BlogPostView } from "./features/blog/components/BlogPostView";
297
307
  export { BlogCard, BlogCategoryTabs, BlogListView } from "./features/blog/components/BlogListView";
@@ -360,7 +370,7 @@ export { normalizeError, getErrorMessage, isApiNormalized, isAppNormalized, isFi
360
370
  // never touches the sibling crypto-importing helpers.
361
371
  export { buildPaymentProofReviewMessage } from "./features/whatsapp-bot/helpers/payment-proof-message";
362
372
  export { CommandPalette, useCommandPaletteHotkey } from "./features/shell/index";
363
- export { AdminBlogEditorView, AdminBundleEditorView, AdminCarouselEditorView, AdminCategoryEditorView, AdminCouponEditorView, AdminFaqEditorView, AdminOrderEditorView, AdminProductEditorView, AdminScammerEditorView, AdminSublistingCategoryEditorView, AdminSupportTicketDetailView, } from "./features/admin/index";
373
+ export { AdminBlogEditorView, AdminBundleEditorView, AdminCarouselEditorView, AdminCategoryEditorView, AdminCouponEditorView, AdminFaqEditorView, AdminOrderEditorView, AdminPayoutMarkPaidModal, AdminAuditLogView, ViewAuditLogEntryModal, AdminProductEditorView, AdminScammerEditorView, AdminStoreEditorView, AdminSublistingCategoryEditorView, AdminSupportTicketDetailView, } from "./features/admin/index";
364
374
  export { ADMIN_CHECKOUT_BYPASS_FLAG_KEY } from "./features/admin/schemas/firestore";
365
375
  export { SpinWheelView, EventRaffleEntryForm } from "./features/events/index";
366
376
  export { Card, CardBody } from "./ui/index";
@@ -31,9 +31,6 @@ export declare const ACCOUNT_ENDPOINTS: {
31
31
  /** @param userId — Firestore user document id */
32
32
  readonly BY_ID: (userId: string) => string;
33
33
  readonly PROFILE: "/api/user/profile";
34
- readonly CHANGE_PASSWORD: "/api/user/change-password";
35
- readonly CHANGE_PASSWORD_OTP_REQUEST: "/api/user/change-password/otp/request";
36
- readonly CHANGE_PASSWORD_OTP_VERIFY: "/api/user/change-password/otp/verify";
37
34
  /** @param userId — for public profile pages */
38
35
  readonly PUBLIC_PROFILE: (userId: string) => string;
39
36
  /** @param userId — seller profile page */
@@ -134,6 +131,8 @@ export declare const ADMIN_ENDPOINTS: {
134
131
  readonly PAYOUT_BY_ID: (id: string) => string;
135
132
  readonly PAYOUTS_WEEKLY: "/api/admin/payouts/weekly";
136
133
  readonly PAYOUTS_EXPORT: "/api/admin/payouts/export";
134
+ readonly AUDIT_LOG: "/api/admin/audit-log";
135
+ readonly AUDIT_LOG_BY_ID: (id: string) => string;
137
136
  readonly SHIPMENTS: "/api/admin/shipments";
138
137
  readonly SHIPMENT_BY_ID: (id: string) => string;
139
138
  readonly SHIPMENT_LOTS: (id: string) => string;
@@ -484,9 +483,6 @@ export declare const API_ENDPOINTS: {
484
483
  /** @param userId — Firestore user document id */
485
484
  readonly BY_ID: (userId: string) => string;
486
485
  readonly PROFILE: "/api/user/profile";
487
- readonly CHANGE_PASSWORD: "/api/user/change-password";
488
- readonly CHANGE_PASSWORD_OTP_REQUEST: "/api/user/change-password/otp/request";
489
- readonly CHANGE_PASSWORD_OTP_VERIFY: "/api/user/change-password/otp/verify";
490
486
  /** @param userId — for public profile pages */
491
487
  readonly PUBLIC_PROFILE: (userId: string) => string;
492
488
  /** @param userId — seller profile page */
@@ -587,6 +583,8 @@ export declare const API_ENDPOINTS: {
587
583
  readonly PAYOUT_BY_ID: (id: string) => string;
588
584
  readonly PAYOUTS_WEEKLY: "/api/admin/payouts/weekly";
589
585
  readonly PAYOUTS_EXPORT: "/api/admin/payouts/export";
586
+ readonly AUDIT_LOG: "/api/admin/audit-log";
587
+ readonly AUDIT_LOG_BY_ID: (id: string) => string;
590
588
  readonly SHIPMENTS: "/api/admin/shipments";
591
589
  readonly SHIPMENT_BY_ID: (id: string) => string;
592
590
  readonly SHIPMENT_LOTS: (id: string) => string;
@@ -939,9 +937,6 @@ export declare const API_ROUTES: {
939
937
  /** @param userId — Firestore user document id */
940
938
  readonly BY_ID: (userId: string) => string;
941
939
  readonly PROFILE: "/api/user/profile";
942
- readonly CHANGE_PASSWORD: "/api/user/change-password";
943
- readonly CHANGE_PASSWORD_OTP_REQUEST: "/api/user/change-password/otp/request";
944
- readonly CHANGE_PASSWORD_OTP_VERIFY: "/api/user/change-password/otp/verify";
945
940
  /** @param userId — for public profile pages */
946
941
  readonly PUBLIC_PROFILE: (userId: string) => string;
947
942
  /** @param userId — seller profile page */
@@ -1042,6 +1037,8 @@ export declare const API_ROUTES: {
1042
1037
  readonly PAYOUT_BY_ID: (id: string) => string;
1043
1038
  readonly PAYOUTS_WEEKLY: "/api/admin/payouts/weekly";
1044
1039
  readonly PAYOUTS_EXPORT: "/api/admin/payouts/export";
1040
+ readonly AUDIT_LOG: "/api/admin/audit-log";
1041
+ readonly AUDIT_LOG_BY_ID: (id: string) => string;
1045
1042
  readonly SHIPMENTS: "/api/admin/shipments";
1046
1043
  readonly SHIPMENT_BY_ID: (id: string) => string;
1047
1044
  readonly SHIPMENT_LOTS: (id: string) => string;
@@ -46,9 +46,6 @@ export const ACCOUNT_ENDPOINTS = {
46
46
  /** @param userId — Firestore user document id */
47
47
  BY_ID: (userId) => `/api/account/${userId}`,
48
48
  PROFILE: "/api/user/profile",
49
- CHANGE_PASSWORD: "/api/user/change-password",
50
- CHANGE_PASSWORD_OTP_REQUEST: "/api/user/change-password/otp/request",
51
- CHANGE_PASSWORD_OTP_VERIFY: "/api/user/change-password/otp/verify",
52
49
  /** @param userId — for public profile pages */
53
50
  PUBLIC_PROFILE: (userId) => `/api/profile/${userId}`,
54
51
  /** @param userId — seller profile page */
@@ -161,6 +158,8 @@ export const ADMIN_ENDPOINTS = {
161
158
  PAYOUT_BY_ID: (id) => `/api/admin/payouts/${id}`,
162
159
  PAYOUTS_WEEKLY: "/api/admin/payouts/weekly",
163
160
  PAYOUTS_EXPORT: "/api/admin/payouts/export",
161
+ AUDIT_LOG: "/api/admin/audit-log",
162
+ AUDIT_LOG_BY_ID: (id) => `/api/admin/audit-log/${id}`,
164
163
  SHIPMENTS: "/api/admin/shipments",
165
164
  SHIPMENT_BY_ID: (id) => `/api/admin/shipments/${id}`,
166
165
  SHIPMENT_LOTS: (id) => `/api/admin/shipments/${id}/lots`,
@@ -9,19 +9,15 @@ export interface IClientAuthProvider {
9
9
  signInWithEmailAndPassword(email: string, password: string): Promise<void>;
10
10
  /** Apply an email verification action code */
11
11
  applyActionCode(code: string): Promise<void>;
12
+ /** Send a verification email to the currently signed-in user's own address */
13
+ sendEmailVerification(): Promise<void>;
12
14
  /** Send a password reset email */
13
15
  sendPasswordResetEmail(email: string): Promise<void>;
14
16
  /** Confirm a password reset with a code and new password */
15
17
  confirmPasswordReset(code: string, newPassword: string): Promise<void>;
16
18
  /** Re-authenticate with current password and change to new password */
17
19
  reauthenticateAndChangePassword(currentPassword: string, newPassword: string): Promise<void>;
18
- /**
19
- * Verify the current password only — does NOT change anything. Used to
20
- * prove current-password knowledge before an OTP is sent, without the
21
- * side effect of immediately applying a new password ahead of that OTP
22
- * being verified (see password-change-otp.ts for why the two steps must
23
- * stay separate).
24
- */
20
+ /** Verify the current password only — does NOT change anything. */
25
21
  reauthenticateOnly(currentPassword: string): Promise<void>;
26
22
  /** Re-authenticate and send a verification email to the new address; email updates after user clicks the link */
27
23
  reauthenticateAndSendEmailUpdateVerification(currentPassword: string, newEmail: string): Promise<void>;
@@ -10,6 +10,7 @@ export interface EmailOptions {
10
10
  text?: string;
11
11
  /** Defaults to SiteConfig.email.fromAddress if omitted. */
12
12
  from?: string;
13
+ cc?: string | string[];
13
14
  replyTo?: string;
14
15
  attachments?: EmailAttachment[];
15
16
  headers?: Record<string, string>;
@@ -1,9 +1,26 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { normalizeError } from "../../../errors/normalize";
4
- import { useState } from "react";
4
+ import { useEffect, useState } from "react";
5
+ import { z } from "zod";
5
6
  import { Button, Checkbox, FormField, FormGroup, Row, useToast } from "../../../ui";
6
7
  import { Form } from "../../../ui/components/Form";
8
+ import { useFormShellState, FormErrorSummary } from "../../../ui/forms";
9
+ // Local form-input schema — `userAddressSchema` (account schemas) uses
10
+ // different field names (`line1`/`line2`, no `fullName`) and a required
11
+ // `id`, since it models the stored Firestore shape, not this form's input.
12
+ const addressFormSchema = z.object({
13
+ label: z.string().optional(),
14
+ fullName: z.string().min(1, "Full name is required"),
15
+ phone: z.string().min(1, "Phone number is required"),
16
+ addressLine1: z.string().min(1, "Address is required"),
17
+ addressLine2: z.string().optional(),
18
+ city: z.string().min(1, "City is required"),
19
+ state: z.string().min(1, "State is required"),
20
+ postalCode: z.string().min(1, "Postal code is required"),
21
+ country: z.string().optional(),
22
+ isDefault: z.boolean().optional(),
23
+ });
7
24
  const DEFAULT_LABELS = {
8
25
  label: "Address Label",
9
26
  fullName: "Full Name",
@@ -47,10 +64,15 @@ export function AddressForm({ initialData, onSubmit, onCancel, isLoading = false
47
64
  country: initialData?.country || defaultCountry,
48
65
  isDefault: initialData?.isDefault || false,
49
66
  });
67
+ const { shellCtx, validate } = useFormShellState(addressFormSchema);
68
+ useEffect(() => {
69
+ validate(formData);
70
+ // eslint-disable-next-line react-hooks/exhaustive-deps
71
+ }, [formData, validate]);
50
72
  const handleChange = (field, value) => {
51
73
  setFormData((prev) => ({ ...prev, [field]: value }));
52
74
  };
53
- return (_jsx(Form, { onSubmit: (e) => e.preventDefault(), spacing: "md", children: ({ setFieldError, clearErrors }) => (_jsxs(_Fragment, { children: [_jsx(FormField, { label: mergedLabels.label, name: "label", type: "text", value: formData.label, onChange: (value) => handleChange("label", value), placeholder: mergedPlaceholders.label, required: true }), _jsx(FormField, { label: mergedLabels.fullName, name: "fullName", type: "text", value: formData.fullName, onChange: (value) => handleChange("fullName", value), placeholder: mergedPlaceholders.fullName, required: true }), _jsx(FormField, { label: mergedLabels.phone, name: "phone", type: "tel", value: formData.phone, onChange: (value) => handleChange("phone", value), placeholder: mergedPlaceholders.phone, required: true }), _jsx(FormField, { label: mergedLabels.addressLine1, name: "addressLine1", type: "text", value: formData.addressLine1, onChange: (value) => handleChange("addressLine1", value), placeholder: mergedPlaceholders.addressLine1, required: true }), _jsx(FormField, { label: mergedLabels.addressLine2, name: "addressLine2", type: "text", value: formData.addressLine2, onChange: (value) => handleChange("addressLine2", value), placeholder: mergedPlaceholders.addressLine2 }), _jsxs(FormGroup, { columns: 3, children: [_jsx(FormField, { label: mergedLabels.city, name: "city", type: "text", value: formData.city, onChange: (value) => handleChange("city", value), placeholder: mergedPlaceholders.city, required: true }), _jsx(FormField, { label: mergedLabels.state, name: "state", type: "text", value: formData.state, onChange: (value) => handleChange("state", value), placeholder: mergedPlaceholders.state, required: true }), _jsx(FormField, { label: mergedLabels.postalCode, name: "postalCode", type: "text", value: formData.postalCode, onChange: (value) => handleChange("postalCode", value), placeholder: mergedPlaceholders.postalCode, required: true })] }), _jsx(FormField, { label: mergedLabels.country, name: "country", type: "text", value: formData.country, onChange: (value) => handleChange("country", value), placeholder: mergedPlaceholders.country, required: true }), _jsx(Checkbox, { checked: formData.isDefault, onChange: (e) => handleChange("isDefault", e.target.checked), label: mergedLabels.setDefault }), _jsxs(Row, { padding: "t-xs", align: "center", justify: "start", gap: "xs", children: [_jsx(Button, { type: "button", variant: "outline", onClick: onCancel, disabled: isLoading, children: mergedLabels.cancel }), _jsx(Button, { type: "submit", variant: "primary", disabled: isLoading, isLoading: isLoading, onClick: async () => {
75
+ return (_jsx(Form, { onSubmit: (e) => e.preventDefault(), spacing: "md", shellCtx: shellCtx, children: ({ setFieldError, clearErrors }) => (_jsxs(_Fragment, { children: [_jsx(FormField, { label: mergedLabels.label, name: "label", type: "text", value: formData.label, onChange: (value) => handleChange("label", value), placeholder: mergedPlaceholders.label, required: true }), _jsx(FormField, { label: mergedLabels.fullName, name: "fullName", type: "text", value: formData.fullName, onChange: (value) => handleChange("fullName", value), placeholder: mergedPlaceholders.fullName, required: true }), _jsx(FormField, { label: mergedLabels.phone, name: "phone", type: "tel", value: formData.phone, onChange: (value) => handleChange("phone", value), placeholder: mergedPlaceholders.phone, required: true }), _jsx(FormField, { label: mergedLabels.addressLine1, name: "addressLine1", type: "text", value: formData.addressLine1, onChange: (value) => handleChange("addressLine1", value), placeholder: mergedPlaceholders.addressLine1, required: true }), _jsx(FormField, { label: mergedLabels.addressLine2, name: "addressLine2", type: "text", value: formData.addressLine2, onChange: (value) => handleChange("addressLine2", value), placeholder: mergedPlaceholders.addressLine2 }), _jsxs(FormGroup, { columns: 3, children: [_jsx(FormField, { label: mergedLabels.city, name: "city", type: "text", value: formData.city, onChange: (value) => handleChange("city", value), placeholder: mergedPlaceholders.city, required: true }), _jsx(FormField, { label: mergedLabels.state, name: "state", type: "text", value: formData.state, onChange: (value) => handleChange("state", value), placeholder: mergedPlaceholders.state, required: true }), _jsx(FormField, { label: mergedLabels.postalCode, name: "postalCode", type: "text", value: formData.postalCode, onChange: (value) => handleChange("postalCode", value), placeholder: mergedPlaceholders.postalCode, required: true })] }), _jsx(FormField, { label: mergedLabels.country, name: "country", type: "text", value: formData.country, onChange: (value) => handleChange("country", value), placeholder: mergedPlaceholders.country, required: true }), _jsx(Checkbox, { checked: formData.isDefault, onChange: (e) => handleChange("isDefault", e.target.checked), label: mergedLabels.setDefault }), _jsx(FormErrorSummary, {}), _jsxs(Row, { padding: "t-xs", align: "center", justify: "start", gap: "xs", children: [_jsx(Button, { type: "button", variant: "outline", onClick: onCancel, disabled: isLoading, children: mergedLabels.cancel }), _jsx(Button, { type: "submit", variant: "primary", disabled: isLoading, isLoading: isLoading, onClick: async () => {
54
76
  clearErrors();
55
77
  const errs = {};
56
78
  if (!formData.fullName.trim())
@@ -11,7 +11,6 @@ export interface BecomeSellerViewProps {
11
11
  renderAlreadySeller?: () => React.ReactNode;
12
12
  /** Which state to render. Shell exposes all three slots; consumer controls which is active. */
13
13
  state?: "guide" | "success" | "already-seller";
14
- isLoading?: boolean;
15
14
  className?: string;
16
15
  }
17
- export declare function BecomeSellerView({ labels, renderGuide, renderSuccess, renderAlreadySeller, state, isLoading: _isLoading, className, }: BecomeSellerViewProps): React.JSX.Element;
16
+ export declare function BecomeSellerView({ labels, renderGuide, renderSuccess, renderAlreadySeller, state, className, }: BecomeSellerViewProps): React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Div, Heading } from "../../../ui";
3
- export function BecomeSellerView({ labels = {}, renderGuide, renderSuccess, renderAlreadySeller, state = "guide", isLoading: _isLoading = false, className = "", }) {
3
+ export function BecomeSellerView({ labels = {}, renderGuide, renderSuccess, renderAlreadySeller, state = "guide", className = "", }) {
4
4
  return (_jsxs(Div, { className: className, children: [labels.title && state === "guide" && (_jsx(Heading, { level: 1, className: "mb-6", size: "2xl", weight: "bold", children: labels.title })), state === "guide" && renderGuide?.(), state === "success" && renderSuccess?.(), state === "already-seller" && renderAlreadySeller?.()] }));
5
5
  }
@@ -32,7 +32,7 @@ const DEFAULT_ICONS = {
32
32
  export function NotificationBell({ limit = 10, viewAllHref, labels, icons, renderLink, onMarkAllReadSuccess, onMarkAllReadError, buttonClassName = "", dropdownClassName = "", hideOnMobile = true, }) {
33
33
  const [isOpen, setIsOpen] = useState(false);
34
34
  const dropdownRef = useRef(null);
35
- const { showSuccess, showError: _showError } = useMessage();
35
+ const { showSuccess } = useMessage();
36
36
  const { showToast } = useToast();
37
37
  const { notifications, unreadCount, isLoading, refetch, markRead, markAllRead, isMarkingAll, } = useNotifications(limit);
38
38
  const notificationIcons = { ...DEFAULT_ICONS, ...icons };
@@ -0,0 +1 @@
1
+ export declare function UserBidsView(): import("react").JSX.Element;
@@ -0,0 +1,47 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { sortBy, sieveFilter, SIEVE_OP } from "../../../utils/sieve-builder";
4
+ import { ACCOUNT_ENDPOINTS } from "../../../constants/api-endpoints";
5
+ import { ROUTES } from "../../../constants/index";
6
+ import { Div, Span, Stack, TextLink } from "../../../ui";
7
+ import { FieldSelect } from "../../../ui/forms";
8
+ import { AuctionBidsTable } from "../../auctions/components/AuctionBidsTable";
9
+ import { DataListingView } from "../../admin/components/DataListingView";
10
+ const SORT_OPTIONS = [
11
+ { value: sortBy("bidDate", "DESC"), label: "Newest first" },
12
+ { value: "bidDate", label: "Oldest first" },
13
+ { value: sortBy("bidAmount", "DESC"), label: "Highest bid" },
14
+ { value: "bidAmount", label: "Lowest bid" },
15
+ ];
16
+ const STATUS_OPTIONS = [
17
+ { value: "", label: "All statuses" },
18
+ { value: "active", label: "Active" },
19
+ { value: "outbid", label: "Outbid" },
20
+ { value: "won", label: "Won" },
21
+ { value: "cancelled", label: "Cancelled" },
22
+ ];
23
+ export function UserBidsView() {
24
+ const config = {
25
+ portal: "user",
26
+ title: "My Bids",
27
+ searchPlaceholder: "Search by auction title…",
28
+ emptyLabel: "You haven't placed any bids yet.",
29
+ filterKeys: ["status"],
30
+ defaultSort: sortBy("bidDate", "DESC"),
31
+ queryKey: ["user", "bids", "listing"],
32
+ endpoint: ACCOUNT_ENDPOINTS.BIDS,
33
+ sortOptions: SORT_OPTIONS,
34
+ hideTableView: true,
35
+ mapRows: (response) => response.bids ?? [],
36
+ getTotal: (response, rows) => response.total ?? rows.length,
37
+ buildFilters: (state) => (state.status ? sieveFilter("status", SIEVE_OP.EQ, state.status) : undefined),
38
+ renderFilterPanel: ({ pendingFilters, setPendingFilters }) => (_jsx(FieldSelect, { name: "status", label: "Bid status", value: pendingFilters.status || "", onChange: (v) => setPendingFilters((p) => ({ ...p, status: v })), options: STATUS_OPTIONS })),
39
+ renderCards: (rows, _view, _selection, isLoading) => {
40
+ if (isLoading) {
41
+ return (_jsx(Stack, { gap: "md", children: Array.from({ length: 3 }).map((_, i) => (_jsx(Div, { className: "h-16 animate-pulse border border-[var(--appkit-color-border)]", rounded: "xl" }, i))) }));
42
+ }
43
+ return (_jsx(AuctionBidsTable, { bids: rows, portal: "buyer", totalPages: 1, currentPage: 1, onPageChange: () => { }, emptyLabel: _jsxs(Span, { children: ["You haven't placed any bids yet.", " ", _jsx(TextLink, { href: String(ROUTES.PUBLIC.AUCTIONS), children: "Browse auctions" })] }) }));
44
+ },
45
+ };
46
+ return _jsx(DataListingView, { config: config });
47
+ }
@@ -1,12 +1,5 @@
1
- import React from "react";
2
- import type { SlottedListingViewProps } from "../../../ui";
3
- export interface UserOrdersViewLabels {
4
- title?: string;
1
+ import type { Order } from "../../orders/types";
2
+ export interface UserOrdersViewProps {
3
+ onOrderClick?: (order: Order) => void;
5
4
  }
6
- export interface UserOrdersViewProps extends Omit<SlottedListingViewProps, "renderTable"> {
7
- labels?: UserOrdersViewLabels;
8
- /** @deprecated Use `renderSearch` instead. */
9
- renderToolbar?: () => React.ReactNode;
10
- renderTable?: () => React.ReactNode;
11
- }
12
- export declare function UserOrdersView({ renderToolbar, renderTable, ...props }: UserOrdersViewProps): React.JSX.Element;
5
+ export declare function UserOrdersView({ onOrderClick }: UserOrdersViewProps): import("react").JSX.Element;
@@ -1,5 +1,55 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { SlottedListingView } from "../../../ui";
3
- export function UserOrdersView({ renderToolbar, renderTable, ...props }) {
4
- return (_jsx(SlottedListingView, { portal: "user", ...props, renderSearch: renderToolbar ? () => renderToolbar() : props.renderSearch, renderTable: renderTable ?? (() => null) }));
1
+ "use client";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { sortBy, sieveFilter, SIEVE_OP } from "../../../utils/sieve-builder";
4
+ import { ACCOUNT_ENDPOINTS } from "../../../constants/api-endpoints";
5
+ import { ROUTES } from "../../../constants/index";
6
+ import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
7
+ import { Button, Div, Grid, Stack, Text, TextLink } from "../../../ui";
8
+ import { PaginatedSelect } from "../../../ui/components/PaginatedSelect";
9
+ import { DataListingView } from "../../admin/components/DataListingView";
10
+ import { OrderCard } from "../../orders/components/OrdersList";
11
+ const CANCELLABLE_STATUSES = new Set(["pending", "confirmed", "processing"]);
12
+ const TRACKABLE_STATUSES = new Set(["shipped"]);
13
+ const SORT_OPTIONS = [
14
+ { value: sortBy("createdAt", "DESC"), label: "Newest first" },
15
+ { value: sortBy("createdAt", "ASC"), label: "Oldest first" },
16
+ { value: sortBy("totalPrice", "DESC"), label: "Highest total" },
17
+ { value: sortBy("totalPrice", "ASC"), label: "Lowest total" },
18
+ ];
19
+ const STATUS_OPTIONS = [
20
+ { value: "pending", label: "Pending" },
21
+ { value: "processing", label: "Processing" },
22
+ { value: "shipped", label: "Shipped" },
23
+ { value: "delivered", label: "Delivered" },
24
+ { value: "cancelled", label: "Cancelled" },
25
+ { value: "refunded", label: "Refunded" },
26
+ { value: "return_requested", label: "Return requested" },
27
+ ];
28
+ export function UserOrdersView({ onOrderClick }) {
29
+ const config = {
30
+ portal: "user",
31
+ title: "My Orders",
32
+ searchPlaceholder: "Search by order id…",
33
+ emptyLabel: "You haven't placed any orders yet.",
34
+ filterKeys: ["status"],
35
+ defaultSort: sortBy("createdAt", "DESC"),
36
+ queryKey: ["user", "orders", "listing"],
37
+ endpoint: ACCOUNT_ENDPOINTS.ORDERS,
38
+ sortOptions: SORT_OPTIONS,
39
+ hideTableView: true,
40
+ mapRows: (response) => response.items ?? [],
41
+ getTotal: (response, rows) => response.total ?? rows.length,
42
+ buildFilters: (state) => (state.status ? sieveFilter("status", SIEVE_OP.EQ, state.status) : undefined),
43
+ renderFilterPanel: ({ pendingFilters, setPendingFilters }) => (_jsx(Div, { children: _jsx(PaginatedSelect, { value: pendingFilters.status || null, onChange: (v) => setPendingFilters((p) => ({ ...p, status: v ?? "" })), options: STATUS_OPTIONS, placeholder: "All statuses", ariaLabel: "Filter by order status" }) })),
44
+ renderCards: (rows, _view, _selection, isLoading) => {
45
+ if (isLoading) {
46
+ return (_jsx(Stack, { gap: "md", children: Array.from({ length: 3 }).map((_, i) => (_jsx(Div, { className: "h-24 animate-pulse border border-[var(--appkit-color-border)]", rounded: "xl" }, i))) }));
47
+ }
48
+ if (rows.length === 0) {
49
+ return _jsx(Text, { color: "muted", children: "You haven't placed any orders yet." });
50
+ }
51
+ return (_jsx(Grid, { gap: "md", className: "grid-cols-1", children: rows.map((order) => (_jsx(OrderCard, { order: order, onClick: onOrderClick, renderActions: () => (_jsxs(_Fragment, { children: [_jsx(Button, { asChild: true, variant: "outline", size: "sm", children: _jsx(TextLink, { href: String(ROUTES.USER.ORDER_DETAIL(order.id)), children: ACTIONS.USER["view-order"].label }) }), TRACKABLE_STATUSES.has(order.orderStatus) && (_jsx(Button, { asChild: true, variant: "ghost", size: "sm", children: _jsx(TextLink, { href: String(ROUTES.USER.ORDER_TRACK(order.id)), children: ACTIONS.USER["track-order"].label }) })), CANCELLABLE_STATUSES.has(order.orderStatus) && (_jsx(Button, { asChild: true, variant: "ghost", size: "sm", children: _jsx(TextLink, { href: String(ROUTES.USER.ORDER_CANCEL(order.id)), children: ACTIONS.USER["cancel-order"].label }) }))] })) }, order.id))) }));
52
+ },
53
+ };
54
+ return _jsx(DataListingView, { config: config });
5
55
  }
@@ -1,10 +1,5 @@
1
- import React from "react";
2
- import type { SlottedListingViewProps } from "../../../ui";
3
- export interface UserReturnsViewLabels {
4
- title?: string;
1
+ import type { Order } from "../../orders/types";
2
+ export interface UserReturnsViewProps {
3
+ onOrderClick?: (order: Order) => void;
5
4
  }
6
- export interface UserReturnsViewProps extends Omit<SlottedListingViewProps, "renderTable"> {
7
- labels?: UserReturnsViewLabels;
8
- renderTable?: () => React.ReactNode;
9
- }
10
- export declare function UserReturnsView({ renderTable, ...props }: UserReturnsViewProps): React.JSX.Element;
5
+ export declare function UserReturnsView({ onOrderClick }: UserReturnsViewProps): import("react").JSX.Element;
@@ -1,5 +1,39 @@
1
+ "use client";
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { SlottedListingView } from "../../../ui";
3
- export function UserReturnsView({ renderTable, ...props }) {
4
- return (_jsx(SlottedListingView, { portal: "user", ...props, renderTable: renderTable ?? (() => null) }));
3
+ import { sortBy } from "../../../constants/sort";
4
+ import { ACCOUNT_ENDPOINTS } from "../../../constants/api-endpoints";
5
+ import { Div, Grid, Stack, Text } from "../../../ui";
6
+ import { DataListingView } from "../../admin/components/DataListingView";
7
+ import { OrderCard } from "../../orders/components/OrdersList";
8
+ const SORT_OPTIONS = [
9
+ { value: sortBy("updatedAt", "DESC"), label: "Recently updated" },
10
+ { value: sortBy("createdAt", "DESC"), label: "Newest" },
11
+ { value: sortBy("createdAt", "ASC"), label: "Oldest" },
12
+ ];
13
+ export function UserReturnsView({ onOrderClick }) {
14
+ const config = {
15
+ portal: "user",
16
+ title: "Returns & Refunds",
17
+ searchPlaceholder: "Search by order id…",
18
+ emptyLabel: "You have no return or refund requests.",
19
+ filterKeys: [],
20
+ defaultSort: sortBy("updatedAt", "DESC"),
21
+ queryKey: ["user", "returns", "listing"],
22
+ endpoint: `${ACCOUNT_ENDPOINTS.ORDERS}?filters=status==return_requested`,
23
+ sortOptions: SORT_OPTIONS,
24
+ hideTableView: true,
25
+ mapRows: (response) => response.items ?? [],
26
+ getTotal: (response, rows) => response.total ?? rows.length,
27
+ buildFilters: () => undefined,
28
+ renderCards: (rows, _view, _selection, isLoading) => {
29
+ if (isLoading) {
30
+ return (_jsx(Stack, { gap: "md", children: Array.from({ length: 3 }).map((_, i) => (_jsx(Div, { className: "h-24 animate-pulse border border-[var(--appkit-color-border)]", rounded: "xl" }, i))) }));
31
+ }
32
+ if (rows.length === 0) {
33
+ return _jsx(Text, { color: "muted", children: "You have no return or refund requests." });
34
+ }
35
+ return (_jsx(Grid, { gap: "md", className: "grid-cols-1", children: rows.map((order) => (_jsx(OrderCard, { order: order, onClick: onOrderClick }, order.id))) }));
36
+ },
37
+ };
38
+ return _jsx(DataListingView, { config: config });
5
39
  }
@@ -17,7 +17,8 @@ export type { ProfileViewProps, ProfileViewLabels } from "./ProfileView";
17
17
  export { UserSettingsView } from "./UserSettingsView";
18
18
  export type { UserSettingsViewProps, UserSettingsViewLabels, } from "./UserSettingsView";
19
19
  export { UserOrdersView } from "./UserOrdersView";
20
- export type { UserOrdersViewProps, UserOrdersViewLabels, } from "./UserOrdersView";
20
+ export type { UserOrdersViewProps } from "./UserOrdersView";
21
+ export { UserBidsView } from "./UserBidsView";
21
22
  export { OrderDetailView } from "./OrderDetailView";
22
23
  export type { OrderDetailViewProps, OrderDetailViewLabels, } from "./OrderDetailView";
23
24
  export { UserAddressesView } from "./UserAddressesView";
@@ -39,7 +40,7 @@ export type { BecomeSellerViewProps, BecomeSellerViewLabels, } from "./BecomeSel
39
40
  export { UserOrderTrackView } from "./UserOrderTrackView";
40
41
  export type { UserOrderTrackViewProps, UserOrderTrackViewLabels, } from "./UserOrderTrackView";
41
42
  export { UserReturnsView } from "./UserReturnsView";
42
- export type { UserReturnsViewProps, UserReturnsViewLabels, } from "./UserReturnsView";
43
+ export type { UserReturnsViewProps } from "./UserReturnsView";
43
44
  export { UserSupportView } from "./UserSupportView";
44
45
  export type { UserSupportViewProps } from "./UserSupportView";
45
46
  export { NotificationPreferencesPanel } from "./NotificationPreferencesPanel";
@@ -8,6 +8,7 @@ export { UserAccountHubView } from "./UserAccountHubView";
8
8
  export { ProfileView } from "./ProfileView";
9
9
  export { UserSettingsView } from "./UserSettingsView";
10
10
  export { UserOrdersView } from "./UserOrdersView";
11
+ export { UserBidsView } from "./UserBidsView";
11
12
  export { OrderDetailView } from "./OrderDetailView";
12
13
  export { UserAddressesView } from "./UserAddressesView";
13
14
  export { UserNotificationsView } from "./UserNotificationsView";
@@ -17,6 +17,8 @@ import { getProviders } from "../../../contracts";
17
17
  import { getAdminAuth } from "../../../providers/db-firebase";
18
18
  import { isAdminUser } from "../../auth/role-predicates";
19
19
  import { assertPrizeDrawNotLocked, assertPrizeDrawWonItemsImmutable, } from "../../../_internal/server/features/products/service";
20
+ import { recordAdminAction } from "../../../_internal/server/features/audit-log/actions";
21
+ import { AdminAuditActionValues } from "../../audit-log/schemas/firestore";
20
22
  const ERR_UID_REQUIRED = "uid is required";
21
23
  export async function revokeSession(adminId, sessionId) {
22
24
  if (!sessionId?.trim()) {
@@ -85,6 +87,16 @@ export async function adminUpdatePayout(adminId, id, input) {
85
87
  adminId,
86
88
  payoutId: id,
87
89
  });
90
+ if (updateData.status === "paid") {
91
+ void recordAdminAction({
92
+ actorUid: adminId,
93
+ action: AdminAuditActionValues.PAYOUT_MARK_PAID,
94
+ targetType: "payout",
95
+ targetId: id,
96
+ targetLabel: existing.sellerName ?? id,
97
+ metadata: { amount: existing.netAmount ?? existing.amount },
98
+ });
99
+ }
88
100
  return updated;
89
101
  }
90
102
  export async function adminUpdateUser(adminId, uid, input) {
@@ -112,6 +124,16 @@ export async function adminUpdateUser(adminId, uid, input) {
112
124
  targetUid: uid,
113
125
  changes: Object.keys(input),
114
126
  });
127
+ if (input.role !== undefined && input.role !== existing.role) {
128
+ void recordAdminAction({
129
+ actorUid: adminId,
130
+ action: AdminAuditActionValues.USER_ROLE_CHANGE,
131
+ targetType: "user",
132
+ targetId: uid,
133
+ targetLabel: existing.displayName ?? uid,
134
+ metadata: { fromRole: existing.role, toRole: input.role },
135
+ });
136
+ }
115
137
  return updated;
116
138
  }
117
139
  /**
@@ -7,6 +7,8 @@
7
7
  import { couponsRepository } from "../../promotions/repository/coupons.repository";
8
8
  import { NotFoundError, ValidationError } from "../../../errors";
9
9
  import { serverLogger } from "../../../monitoring";
10
+ import { recordAdminAction } from "../../../_internal/server/features/audit-log/actions";
11
+ import { AdminAuditActionValues } from "../../audit-log/schemas/firestore";
10
12
  export async function adminCreateCoupon(adminId, input) {
11
13
  const coupon = await couponsRepository.create({
12
14
  ...input,
@@ -60,6 +62,14 @@ export async function adminUpdateCoupon(adminId, id, input) {
60
62
  adminId,
61
63
  couponId: id,
62
64
  });
65
+ void recordAdminAction({
66
+ actorUid: adminId,
67
+ action: AdminAuditActionValues.COUPON_UPDATE,
68
+ targetType: "coupon",
69
+ targetId: id,
70
+ targetLabel: existing.code,
71
+ metadata: { changedFields: Object.keys(input) },
72
+ });
63
73
  return updated;
64
74
  }
65
75
  export async function adminDeleteCoupon(adminId, id) {
@@ -3,6 +3,7 @@ import { notificationRepository } from "../repository/notification.repository";
3
3
  import { siteSettingsRepository } from "../repository/site-settings.repository";
4
4
  import { userRepository } from "../../auth/repository/user.repository";
5
5
  import { createResendProvider } from "../../../providers/email-resend/provider";
6
+ import { isChannelHealthy, withChannelRetry } from "../../../_internal/server/notifications/channel-health";
6
7
  import { enqueueJob } from "../../jobs/actions/enqueue-job";
7
8
  import { serverLogger } from "../../../monitoring";
8
9
  import { decryptPii } from "../../../security/index";
@@ -131,15 +132,15 @@ export async function sendNotification(input) {
131
132
  const apiKey = creds.resendApiKey?.trim() ?? "";
132
133
  const fromEmail = settings.emailSettings?.fromEmail ?? "noreply@letitrip.in";
133
134
  const fromName = settings.emailSettings?.fromName ?? "LetItRip";
134
- if (apiKey && !apiKey.includes("PLACEHOLDER")) {
135
+ if (apiKey && !apiKey.includes("PLACEHOLDER") && (await isChannelHealthy("email"))) {
135
136
  try {
136
137
  const emailProvider = createResendProvider({ apiKey, fromEmail, fromName });
137
- await emailProvider.send({
138
+ await withChannelRetry("email", () => emailProvider.send({
138
139
  to: resolvedEmail,
139
140
  subject: title,
140
141
  html: emailHtml ?? `<p>${message}</p>`,
141
142
  text: message,
142
- });
143
+ }));
143
144
  emailStatus = "sent";
144
145
  }
145
146
  catch (err) {
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import type { StackedViewShellProps } from "../../../ui";
3
2
  export type AdminAdStatus = "draft" | "active" | "scheduled" | "paused";
4
3
  export type AdminAdProvider = "manual" | "adsense" | "thirdParty";
5
4
  export interface AdminAdItem {
@@ -14,7 +13,7 @@ export interface AdminAdItem {
14
13
  endAt?: string;
15
14
  updatedAt?: string;
16
15
  }
17
- export interface AdminAdsViewProps extends Omit<StackedViewShellProps, "sections"> {
16
+ export interface AdminAdsViewProps {
18
17
  endpoint?: string;
19
18
  labels?: {
20
19
  title?: string;
@@ -22,4 +21,4 @@ export interface AdminAdsViewProps extends Omit<StackedViewShellProps, "sections
22
21
  createHref?: string;
23
22
  renderEditLink?: (item: AdminAdItem) => React.ReactNode;
24
23
  }
25
- export declare function AdminAdsView({ endpoint, labels, createHref, renderEditLink, ...rest }: AdminAdsViewProps): React.JSX.Element;
24
+ export declare function AdminAdsView({ endpoint, labels, createHref, renderEditLink, }: AdminAdsViewProps): React.JSX.Element;