@mohasinac/appkit 4.10.0 → 4.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) 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/features/products/data.d.ts +2 -2
  19. package/dist/_internal/server/features/products/data.js +5 -23
  20. package/dist/_internal/server/functions/scheduled.d.ts +3 -1
  21. package/dist/_internal/server/functions/scheduled.js +17 -1
  22. package/dist/_internal/server/jobs/core/dailyStatusDigest.d.ts +40 -0
  23. package/dist/_internal/server/jobs/core/dailyStatusDigest.js +164 -0
  24. package/dist/_internal/server/jobs/core/hardBanCascade.js +11 -0
  25. package/dist/_internal/server/jobs/core/testerSandboxCleanup.d.ts +1 -0
  26. package/dist/_internal/server/jobs/core/testerSandboxCleanup.js +4 -1
  27. package/dist/_internal/server/jobs/core/testerSandboxRefresh.d.ts +12 -0
  28. package/dist/_internal/server/jobs/core/testerSandboxRefresh.js +85 -0
  29. package/dist/_internal/server/jobs/core/whatsappNotify.js +16 -0
  30. package/dist/_internal/server/jobs/handlers/dailyStatusDigest.d.ts +2 -0
  31. package/dist/_internal/server/jobs/handlers/dailyStatusDigest.js +4 -0
  32. package/dist/_internal/server/jobs/handlers/index.d.ts +2 -0
  33. package/dist/_internal/server/jobs/handlers/index.js +3 -0
  34. package/dist/_internal/server/jobs/handlers/testerSandboxRefresh.d.ts +2 -0
  35. package/dist/_internal/server/jobs/handlers/testerSandboxRefresh.js +2 -0
  36. package/dist/_internal/server/notifications/channel-health.d.ts +27 -0
  37. package/dist/_internal/server/notifications/channel-health.js +101 -0
  38. package/dist/_internal/shared/features/brands/schema.d.ts +0 -6
  39. package/dist/_internal/shared/features/brands/schema.js +0 -1
  40. package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +7 -0
  41. package/dist/_internal/shared/features/categories/bundle-schemas.js +3 -0
  42. package/dist/_internal/shared/features/orders/schema.d.ts +8 -8
  43. package/dist/_internal/shared/features/products/to-product-item.d.ts +25 -0
  44. package/dist/_internal/shared/features/products/to-product-item.js +45 -0
  45. package/dist/client.d.ts +21 -6
  46. package/dist/client.js +13 -3
  47. package/dist/constants/api-endpoints.d.ts +6 -9
  48. package/dist/constants/api-endpoints.js +2 -3
  49. package/dist/contracts/client-auth.d.ts +3 -7
  50. package/dist/contracts/email.d.ts +1 -0
  51. package/dist/features/account/components/AddressForm.js +24 -2
  52. package/dist/features/account/components/BecomeSellerView.d.ts +1 -2
  53. package/dist/features/account/components/BecomeSellerView.js +1 -1
  54. package/dist/features/account/components/NotificationBell.js +1 -1
  55. package/dist/features/account/components/UserBidsView.d.ts +1 -0
  56. package/dist/features/account/components/UserBidsView.js +47 -0
  57. package/dist/features/account/components/UserOrdersView.d.ts +4 -11
  58. package/dist/features/account/components/UserOrdersView.js +54 -4
  59. package/dist/features/account/components/UserReturnsView.d.ts +4 -9
  60. package/dist/features/account/components/UserReturnsView.js +37 -3
  61. package/dist/features/account/components/index.d.ts +3 -2
  62. package/dist/features/account/components/index.js +1 -0
  63. package/dist/features/admin/actions/admin-actions.js +22 -0
  64. package/dist/features/admin/actions/admin-coupon-actions.js +10 -0
  65. package/dist/features/admin/actions/notification-actions.js +4 -3
  66. package/dist/features/admin/components/AdminAdsView.d.ts +2 -3
  67. package/dist/features/admin/components/AdminAdsView.js +86 -89
  68. package/dist/features/admin/components/AdminAllEventEntriesView.js +18 -3
  69. package/dist/features/admin/components/AdminAuditLogView.d.ts +11 -0
  70. package/dist/features/admin/components/AdminAuditLogView.js +95 -0
  71. package/dist/features/admin/components/AdminBlogEditorView.js +37 -3
  72. package/dist/features/admin/components/AdminBrandEditorView.js +10 -6
  73. package/dist/features/admin/components/AdminBundleEditorView.js +18 -2
  74. package/dist/features/admin/components/AdminCarouselEditorView.js +2 -2
  75. package/dist/features/admin/components/AdminCarouselGroupEditorView.js +2 -2
  76. package/dist/features/admin/components/AdminCartsView.js +34 -4
  77. package/dist/features/admin/components/AdminCategoryEditorView.js +5 -4
  78. package/dist/features/admin/components/AdminCouponEditorView.js +2 -2
  79. package/dist/features/admin/components/AdminFaqEditorView.js +2 -2
  80. package/dist/features/admin/components/AdminHistoryView.js +11 -1
  81. package/dist/features/admin/components/AdminNotificationsView.js +27 -1
  82. package/dist/features/admin/components/AdminOrderEditorView.d.ts +10 -1
  83. package/dist/features/admin/components/AdminOrderEditorView.js +4 -3
  84. package/dist/features/admin/components/AdminOrdersView.js +92 -24
  85. package/dist/features/admin/components/AdminPayoutMarkPaidModal.d.ts +7 -0
  86. package/dist/features/admin/components/AdminPayoutMarkPaidModal.js +47 -0
  87. package/dist/features/admin/components/AdminPayoutsView.js +15 -31
  88. package/dist/features/admin/components/AdminProductEditorView.js +26 -3
  89. package/dist/features/admin/components/AdminSiteSettingsView.js +20 -1
  90. package/dist/features/admin/components/AdminStoreAddressesView.js +22 -2
  91. package/dist/features/admin/components/AdminStoresView.js +7 -0
  92. package/dist/features/admin/components/AdminSublistingCategoryEditorView.js +2 -2
  93. package/dist/features/admin/components/AdminTesterChecklistItemEditorView.js +2 -2
  94. package/dist/features/admin/components/AdminUserEditorView.d.ts +2 -2
  95. package/dist/features/admin/components/AdminUserEditorView.js +4 -2
  96. package/dist/features/admin/components/AdminUsersView.js +1 -1
  97. package/dist/features/admin/components/AdminWishlistsView.js +14 -1
  98. package/dist/features/admin/components/DataListingView.d.ts +2 -2
  99. package/dist/features/admin/components/ViewAuditLogEntryModal.d.ts +19 -0
  100. package/dist/features/admin/components/ViewAuditLogEntryModal.js +22 -0
  101. package/dist/features/admin/components/ViewNotificationModal.d.ts +21 -0
  102. package/dist/features/admin/components/ViewNotificationModal.js +15 -0
  103. package/dist/features/admin/components/analytics/AdminPageViewsReportView.d.ts +4 -7
  104. package/dist/features/admin/components/analytics/AdminPageViewsReportView.js +56 -36
  105. package/dist/features/admin/components/index.d.ts +8 -1
  106. package/dist/features/admin/components/index.js +4 -0
  107. package/dist/features/admin/constants/filter-tabs.d.ts +49 -0
  108. package/dist/features/admin/constants/filter-tabs.js +27 -0
  109. package/dist/features/admin/hooks/useAdminListing.d.ts +6 -0
  110. package/dist/features/admin/hooks/useAdminListing.js +3 -1
  111. package/dist/features/admin/hooks/useAdminListingData.d.ts +9 -1
  112. package/dist/features/admin/hooks/useAdminListingData.js +9 -2
  113. package/dist/features/admin/repository/site-settings.repository.d.ts +5 -0
  114. package/dist/features/admin/schemas/firestore.d.ts +12 -0
  115. package/dist/features/analytics/types.d.ts +1 -1
  116. package/dist/features/analytics/types.js +8 -0
  117. package/dist/features/auctions/schemas/index.d.ts +5 -0
  118. package/dist/features/audit-log/repository/audit-log.repository.d.ts +45 -0
  119. package/dist/features/audit-log/repository/audit-log.repository.js +30 -0
  120. package/dist/features/audit-log/schemas/firestore.d.ts +59 -0
  121. package/dist/features/audit-log/schemas/firestore.js +35 -0
  122. package/dist/features/auth/actions/index.d.ts +0 -1
  123. package/dist/features/auth/actions/index.js +0 -1
  124. package/dist/features/auth/hooks/useAuth.d.ts +8 -35
  125. package/dist/features/auth/hooks/useAuth.js +21 -37
  126. package/dist/features/auth/permissions/constants.d.ts +1 -1
  127. package/dist/features/auth/permissions/constants.js +2 -0
  128. package/dist/features/blog/schemas/index.d.ts +32 -0
  129. package/dist/features/catalogue/components/AdminCatalogueApprovalsView.js +31 -3
  130. package/dist/features/catalogue/components/CatalogueItemEditorView.js +2 -1
  131. package/dist/features/categories/components/BrandDetailPageView.js +14 -12
  132. package/dist/features/categories/components/CategoryDetailPageView.js +7 -3
  133. package/dist/features/categories/components/CategoryHighlightsAndFaqSection.d.ts +14 -0
  134. package/dist/features/categories/components/CategoryHighlightsAndFaqSection.js +22 -0
  135. package/dist/features/categories/components/CategoryProductsView.d.ts +1 -5
  136. package/dist/features/categories/components/CategoryProductsView.js +1 -1
  137. package/dist/features/categories/components/CategorySelectorCreate.js +16 -2
  138. package/dist/features/categories/schemas/firestore.d.ts +19 -2
  139. package/dist/features/categories/schemas/index.d.ts +24 -3
  140. package/dist/features/categories/schemas/index.js +3 -1
  141. package/dist/features/categories/types/index.d.ts +7 -0
  142. package/dist/features/checkout/actions/checkout-value-otp-actions.d.ts +17 -3
  143. package/dist/features/checkout/actions/checkout-value-otp-actions.js +101 -22
  144. package/dist/features/contact/components/ContactForm.js +17 -4
  145. package/dist/features/contact/email.d.ts +1 -0
  146. package/dist/features/contact/email.js +3 -0
  147. package/dist/features/events/components/AdminEventEditorView.js +54 -2
  148. package/dist/features/events/components/AdminEventEntriesView.d.ts +2 -16
  149. package/dist/features/events/components/AdminEventEntriesView.js +56 -89
  150. package/dist/features/events/components/EventFormDrawer.js +5 -1
  151. package/dist/features/events/components/EventRaffleEntryForm.d.ts +1 -3
  152. package/dist/features/events/components/EventRaffleEntryForm.js +1 -1
  153. package/dist/features/events/schemas/index.d.ts +22 -0
  154. package/dist/features/grouped/components/GroupedListingsCarousel.js +4 -1
  155. package/dist/features/grouped/repository/grouped-listings.repository.d.ts +4 -0
  156. package/dist/features/grouped/repository/grouped-listings.repository.js +18 -0
  157. package/dist/features/homepage/components/CharacterHotspotForm.js +202 -187
  158. package/dist/features/homepage/components/SectionCarousel.d.ts +1 -7
  159. package/dist/features/homepage/components/SectionCarousel.js +1 -1
  160. package/dist/features/layout/TitleBarLayout.d.ts +1 -1
  161. package/dist/features/layout/TitleBarLayout.js +3 -3
  162. package/dist/features/media/MediaImage.js +39 -3
  163. package/dist/features/media/types/index.d.ts +10 -0
  164. package/dist/features/media/types/index.js +1 -0
  165. package/dist/features/media/upload/MediaUploadField.d.ts +7 -1
  166. package/dist/features/media/upload/MediaUploadField.js +11 -7
  167. package/dist/features/media/upload/video-poster.d.ts +2 -0
  168. package/dist/features/media/upload/video-poster.js +16 -1
  169. package/dist/features/media/upload/video-poster.test.js +1 -1
  170. package/dist/features/orders/components/OrderStatusTimeline.d.ts +12 -0
  171. package/dist/features/orders/components/OrderStatusTimeline.js +55 -0
  172. package/dist/features/orders/components/index.d.ts +2 -0
  173. package/dist/features/orders/components/index.js +1 -0
  174. package/dist/features/orders/constants/payment-window.d.ts +25 -0
  175. package/dist/features/orders/constants/payment-window.js +25 -0
  176. package/dist/features/orders/repository/orders.repository.d.ts +32 -0
  177. package/dist/features/orders/repository/orders.repository.js +56 -0
  178. package/dist/features/orders/schemas/index.d.ts +24 -24
  179. package/dist/features/orders/types/index.d.ts +33 -0
  180. package/dist/features/pre-orders/schemas/index.d.ts +5 -0
  181. package/dist/features/products/components/BidHistory.js +9 -1
  182. package/dist/features/products/components/GroupSettingsPanel.js +25 -3
  183. package/dist/features/products/components/PrizeDrawDetailPageView.js +1 -1
  184. package/dist/features/products/components/PrizeDrawEntryActions.d.ts +1 -4
  185. package/dist/features/products/components/PrizeDrawEntryActions.js +1 -1
  186. package/dist/features/products/components/ProductDetailActions.d.ts +1 -2
  187. package/dist/features/products/components/ProductDetailActions.js +1 -1
  188. package/dist/features/products/components/ProductGrid.js +15 -1
  189. package/dist/features/products/constants/action-defs.d.ts +1 -0
  190. package/dist/features/products/constants/action-defs.js +1 -0
  191. package/dist/features/products/schemas/index.d.ts +5 -0
  192. package/dist/features/promotions/components/CouponsIndexListing.d.ts +1 -3
  193. package/dist/features/promotions/components/CouponsIndexListing.js +1 -1
  194. package/dist/features/search/components/SearchView.d.ts +1 -3
  195. package/dist/features/search/components/SearchView.js +1 -1
  196. package/dist/features/seller/components/QuickProductForm.js +2 -1
  197. package/dist/features/seller/components/SellerBidsView.js +66 -107
  198. package/dist/features/seller/components/SellerGoogleReviewsView.js +17 -1
  199. package/dist/features/seller/components/SellerOrdersView.d.ts +15 -3
  200. package/dist/features/seller/components/SellerOrdersView.js +134 -163
  201. package/dist/features/seller/components/SellerPayoutMethodsView.js +60 -48
  202. package/dist/features/seller/components/SellerPayoutSettingsView.js +69 -4
  203. package/dist/features/seller/components/SellerPayoutsView.d.ts +12 -0
  204. package/dist/features/seller/components/SellerPayoutsView.js +25 -5
  205. package/dist/features/seller/components/SellerProductShell.d.ts +10 -3
  206. package/dist/features/seller/components/SellerProductShell.js +89 -36
  207. package/dist/features/seller/components/SellerProductsFilterDrawer.d.ts +2 -7
  208. package/dist/features/seller/components/SellerProductsFilterDrawer.js +4 -4
  209. package/dist/features/seller/components/SellerProductsView.d.ts +2 -4
  210. package/dist/features/seller/components/SellerProductsView.js +131 -189
  211. package/dist/features/seller/components/SellerReviewsView.js +95 -133
  212. package/dist/features/seller/components/SellerShippingConfigsView.js +47 -67
  213. package/dist/features/seller/components/SellerShippingView.js +41 -4
  214. package/dist/features/seller/components/SellerStoreCategoriesView.js +51 -59
  215. package/dist/features/seller/components/SellerStorefrontView.d.ts +6 -1
  216. package/dist/features/seller/components/SellerStorefrontView.js +42 -5
  217. package/dist/features/seller/components/index.d.ts +2 -2
  218. package/dist/features/seller/components/index.js +2 -2
  219. package/dist/features/shell/FormShell.d.ts +24 -4
  220. package/dist/features/shell/FormShell.js +12 -6
  221. package/dist/features/shell/QuickFormDrawer.js +67 -12
  222. package/dist/features/shell/StepForm.d.ts +30 -1
  223. package/dist/features/shell/StepForm.js +47 -4
  224. package/dist/features/shell/index.d.ts +1 -1
  225. package/dist/features/shell/index.js +1 -1
  226. package/dist/features/shipments/components/AdminShipmentEditorView.js +2 -2
  227. package/dist/features/shipments/schemas/validation.d.ts +14 -4
  228. package/dist/features/tester/components/AdminTesterFeedbackListView.js +23 -2
  229. package/dist/features/tester/components/TesterChecklistStepRow.js +1 -1
  230. package/dist/features/tester/components/TesterHubView.js +3 -2
  231. package/dist/features/tester/seed-data/orders-tester-seed-data.js +9 -1
  232. package/dist/features/tester/seed-data/products-tester-seed-data.js +43 -32
  233. package/dist/features/tester/seed-data/tester-checklist-seed-data.js +404 -15
  234. package/dist/index.d.ts +15 -3
  235. package/dist/index.js +22 -5
  236. package/dist/next/routing/route-map.d.ts +11 -0
  237. package/dist/next/routing/route-map.js +5 -0
  238. package/dist/providers/email-resend/provider.js +1 -0
  239. package/dist/providers/firebase-client/auth.d.ts +1 -0
  240. package/dist/providers/firebase-client/auth.js +7 -1
  241. package/dist/repositories/index.d.ts +1 -0
  242. package/dist/repositories/index.js +1 -0
  243. package/dist/schemas/registry.d.ts +61 -25
  244. package/dist/security/pii-mask.js +1 -1
  245. package/dist/seed/categories-seed-data.js +69 -0
  246. package/dist/seed/products-auctions-seed-data.js +11 -0
  247. package/dist/seed/products-standard-seed-data.js +93 -4
  248. package/dist/seed/site-settings-seed-data.js +13 -1
  249. package/dist/seed/store-extensions-seed-data.js +1 -1
  250. package/dist/server-entry.d.ts +2 -1
  251. package/dist/server-entry.js +20 -2
  252. package/dist/server.d.ts +7 -2
  253. package/dist/server.js +8 -3
  254. package/dist/styles.css +1 -1
  255. package/dist/tailwind-utilities.css +1 -1
  256. package/dist/ui/components/Form.d.ts +11 -2
  257. package/dist/ui/components/Form.js +4 -3
  258. package/dist/ui/components/FormField.d.ts +3 -1
  259. package/dist/ui/components/FormField.js +22 -4
  260. package/dist/ui/components/ListingLayout.d.ts +1 -2
  261. package/dist/ui/components/ListingLayout.js +1 -1
  262. package/dist/ui/components/RecordDetailModal.d.ts +68 -0
  263. package/dist/ui/components/RecordDetailModal.js +8 -0
  264. package/dist/ui/components/SlottedListingView.js +9 -1
  265. package/dist/ui/forms/FormErrorSummary.d.ts +25 -0
  266. package/dist/ui/forms/FormErrorSummary.js +37 -0
  267. package/dist/ui/forms/FormShell.d.ts +37 -2
  268. package/dist/ui/forms/FormShell.js +37 -7
  269. package/dist/ui/forms/FormShell.style.css +17 -0
  270. package/dist/ui/forms/index.d.ts +2 -0
  271. package/dist/ui/forms/index.js +1 -0
  272. package/dist/ui/index.d.ts +4 -0
  273. package/dist/ui/index.js +5 -0
  274. package/dist/utils/media-url.d.ts +3 -1
  275. package/dist/utils/media-url.js +20 -1
  276. package/dist/validation/schemas.d.ts +4 -4
  277. package/package.json +1 -1
  278. package/dist/_internal/client/features/classified/ClassifiedDetailView.d.ts +0 -9
  279. package/dist/_internal/client/features/classified/ClassifiedDetailView.js +0 -55
  280. package/dist/_internal/client/features/digital-code/DigitalCodeDetailView.d.ts +0 -18
  281. package/dist/_internal/client/features/digital-code/DigitalCodeDetailView.js +0 -21
  282. package/dist/_internal/client/features/live/LiveItemDetailView.d.ts +0 -9
  283. package/dist/_internal/client/features/live/LiveItemDetailView.js +0 -25
  284. package/dist/_internal/server/jobs/core/prizeRevealClose.d.ts +0 -2
  285. package/dist/_internal/server/jobs/core/prizeRevealClose.js +0 -28
  286. package/dist/_internal/server/jobs/core/prizeRevealExpiry.d.ts +0 -2
  287. package/dist/_internal/server/jobs/core/prizeRevealExpiry.js +0 -61
  288. package/dist/_internal/server/jobs/core/prizeRevealOpen.d.ts +0 -2
  289. package/dist/_internal/server/jobs/core/prizeRevealOpen.js +0 -68
  290. package/dist/_internal/server/jobs/core/prizeRevealReminder.d.ts +0 -2
  291. package/dist/_internal/server/jobs/core/prizeRevealReminder.js +0 -49
  292. package/dist/_internal/server/jobs/handlers/prizeRevealClose.d.ts +0 -2
  293. package/dist/_internal/server/jobs/handlers/prizeRevealClose.js +0 -2
  294. package/dist/_internal/server/jobs/handlers/prizeRevealExpiry.d.ts +0 -2
  295. package/dist/_internal/server/jobs/handlers/prizeRevealExpiry.js +0 -2
  296. package/dist/_internal/server/jobs/handlers/prizeRevealOpen.d.ts +0 -2
  297. package/dist/_internal/server/jobs/handlers/prizeRevealOpen.js +0 -2
  298. package/dist/_internal/server/jobs/handlers/prizeRevealReminder.d.ts +0 -2
  299. package/dist/_internal/server/jobs/handlers/prizeRevealReminder.js +0 -2
  300. package/dist/features/auth/consent-otp.d.ts +0 -57
  301. package/dist/features/auth/consent-otp.js +0 -127
  302. package/dist/features/cart/components/CheckoutOtpModal.d.ts +0 -15
  303. package/dist/features/cart/components/CheckoutOtpModal.js +0 -12
  304. package/dist/features/checkout/actions/checkout-actions.d.ts +0 -31
  305. package/dist/features/checkout/actions/checkout-actions.js +0 -124
  306. package/dist/features/classified/components/ClassifiedIndexListing.d.ts +0 -5
  307. package/dist/features/classified/components/ClassifiedIndexListing.js +0 -123
  308. package/dist/features/classified/components/ClassifiedListView.d.ts +0 -6
  309. package/dist/features/classified/components/ClassifiedListView.js +0 -44
  310. package/dist/features/digital-codes/components/DigitalCodesIndexListing.d.ts +0 -5
  311. package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +0 -114
  312. package/dist/features/digital-codes/components/DigitalCodesListView.d.ts +0 -6
  313. package/dist/features/digital-codes/components/DigitalCodesListView.js +0 -38
  314. package/dist/features/live/components/LiveItemsIndexListing.d.ts +0 -5
  315. package/dist/features/live/components/LiveItemsIndexListing.js +0 -115
  316. package/dist/features/live/components/LiveItemsListView.d.ts +0 -6
  317. package/dist/features/live/components/LiveItemsListView.js +0 -44
  318. package/dist/features/seller/components/SellerTemplatesView.d.ts +0 -12
  319. package/dist/features/seller/components/SellerTemplatesView.js +0 -276
  320. package/dist/react/hooks/useVisibleItems.d.ts +0 -37
  321. package/dist/react/hooks/useVisibleItems.js +0 -59
  322. package/dist/ui/components/TabStrip.d.ts +0 -34
  323. package/dist/ui/components/TabStrip.js +0 -56
  324. package/dist/ui/components/TabStrip.style.css +0 -97
@@ -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
@@ -407,6 +407,18 @@ export interface SiteSettingsDocument extends BaseDocument {
407
407
  fromName: string;
408
408
  fromEmail: string;
409
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
+ };
410
422
  };
411
423
  seo: {
412
424
  defaultTitle: string;
@@ -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
  ];
@@ -28,6 +28,7 @@ export declare const auctionItemSchema: z.ZodObject<{
28
28
  thumbnailUrl: z.ZodOptional<z.ZodString>;
29
29
  source: z.ZodOptional<z.ZodEnum<["upload", "youtube", "external"]>>;
30
30
  youtubeId: z.ZodOptional<z.ZodString>;
31
+ duration: z.ZodOptional<z.ZodNumber>;
31
32
  }, "strip", z.ZodTypeAny, {
32
33
  type: "video" | "image" | "file";
33
34
  url: string;
@@ -35,6 +36,7 @@ export declare const auctionItemSchema: z.ZodObject<{
35
36
  alt?: string | undefined;
36
37
  thumbnailUrl?: string | undefined;
37
38
  youtubeId?: string | undefined;
39
+ duration?: number | undefined;
38
40
  }, {
39
41
  type: "video" | "image" | "file";
40
42
  url: string;
@@ -42,6 +44,7 @@ export declare const auctionItemSchema: z.ZodObject<{
42
44
  alt?: string | undefined;
43
45
  thumbnailUrl?: string | undefined;
44
46
  youtubeId?: string | undefined;
47
+ duration?: number | undefined;
45
48
  }>, "many">>;
46
49
  currency: z.ZodString;
47
50
  price: z.ZodNumber;
@@ -84,6 +87,7 @@ export declare const auctionItemSchema: z.ZodObject<{
84
87
  alt?: string | undefined;
85
88
  thumbnailUrl?: string | undefined;
86
89
  youtubeId?: string | undefined;
90
+ duration?: number | undefined;
87
91
  }[] | undefined;
88
92
  storeSlug?: string | undefined;
89
93
  }, {
@@ -113,6 +117,7 @@ export declare const auctionItemSchema: z.ZodObject<{
113
117
  alt?: string | undefined;
114
118
  thumbnailUrl?: string | undefined;
115
119
  youtubeId?: string | undefined;
120
+ duration?: number | undefined;
116
121
  }[] | undefined;
117
122
  storeSlug?: string | undefined;
118
123
  }>;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * AdminAuditLogRepository — thin wrapper over the `adminAuditLog` collection.
3
+ * See `appkit/src/features/audit-log/schemas/firestore.ts` for the doc shape.
4
+ */
5
+ import { BaseRepository, parseSieveDateValue, type SieveModel, type FirebaseSieveResult } from "../../../providers/db-firebase";
6
+ import { type AdminAuditLogDocument } from "../schemas/firestore";
7
+ export declare class AdminAuditLogRepository extends BaseRepository<AdminAuditLogDocument> {
8
+ constructor();
9
+ static readonly SIEVE_FIELDS: {
10
+ id: {
11
+ canFilter: boolean;
12
+ canSort: boolean;
13
+ };
14
+ actorUid: {
15
+ canFilter: boolean;
16
+ canSort: boolean;
17
+ };
18
+ actorName: {
19
+ canFilter: boolean;
20
+ canSort: boolean;
21
+ };
22
+ action: {
23
+ canFilter: boolean;
24
+ canSort: boolean;
25
+ };
26
+ targetType: {
27
+ canFilter: boolean;
28
+ canSort: boolean;
29
+ };
30
+ targetId: {
31
+ canFilter: boolean;
32
+ canSort: boolean;
33
+ };
34
+ createdAt: {
35
+ canFilter: boolean;
36
+ canSort: boolean;
37
+ parseValue: typeof parseSieveDateValue;
38
+ };
39
+ };
40
+ /**
41
+ * Paginated, Firestore-native audit-log list (admin use).
42
+ */
43
+ list(model: SieveModel): Promise<FirebaseSieveResult<AdminAuditLogDocument>>;
44
+ }
45
+ export declare const adminAuditLogRepository: AdminAuditLogRepository;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * AdminAuditLogRepository — thin wrapper over the `adminAuditLog` collection.
3
+ * See `appkit/src/features/audit-log/schemas/firestore.ts` for the doc shape.
4
+ */
5
+ import { BaseRepository, parseSieveDateValue, } from "../../../providers/db-firebase";
6
+ import { ADMIN_AUDIT_LOG_COLLECTION } from "../schemas/firestore";
7
+ export class AdminAuditLogRepository extends BaseRepository {
8
+ constructor() {
9
+ super(ADMIN_AUDIT_LOG_COLLECTION);
10
+ }
11
+ /**
12
+ * Paginated, Firestore-native audit-log list (admin use).
13
+ */
14
+ async list(model) {
15
+ return this.sieveQuery(model, AdminAuditLogRepository.SIEVE_FIELDS, {
16
+ defaultPageSize: 50,
17
+ maxPageSize: 200,
18
+ });
19
+ }
20
+ }
21
+ AdminAuditLogRepository.SIEVE_FIELDS = {
22
+ id: { canFilter: true, canSort: false },
23
+ actorUid: { canFilter: true, canSort: false },
24
+ actorName: { canFilter: true, canSort: false },
25
+ action: { canFilter: true, canSort: true },
26
+ targetType: { canFilter: true, canSort: false },
27
+ targetId: { canFilter: true, canSort: false },
28
+ createdAt: { canFilter: true, canSort: true, parseValue: parseSieveDateValue },
29
+ };
30
+ export const adminAuditLogRepository = new AdminAuditLogRepository();
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Admin Audit Log Firestore Document Types & Constants
3
+ *
4
+ * Collection: adminAuditLog
5
+ * Document ID: Firestore auto-ID (no slug prefix — see CLAUDE.md "True
6
+ * Firestore auto-IDs" list, same convention as `notifications`/`sessions`/`jobs`).
7
+ *
8
+ * A queryable record of high-value privileged admin actions — bans, checkout
9
+ * bypass, coupon edits, payout mark-paid, store status changes, role changes.
10
+ * This is deliberately an MVP scope (instrumenting existing high-value call
11
+ * sites), not an exhaustive every-write-path audit trail — see CLAUDE.md's
12
+ * "Admin Audit Log" section for the full instrumented-action list.
13
+ */
14
+ import type { BaseDocument } from "../../../_internal/shared/types/base-document";
15
+ import type { JsonValue } from "../../../schemas/types";
16
+ export declare const ADMIN_AUDIT_LOG_COLLECTION = "adminAuditLog";
17
+ export declare const AdminAuditActionValues: {
18
+ readonly USER_HARD_BAN: "user_hard_ban";
19
+ readonly USER_SOFT_BAN: "user_soft_ban";
20
+ readonly USER_UNBAN: "user_unban";
21
+ readonly CHECKOUT_BYPASS: "checkout_bypass";
22
+ readonly COUPON_UPDATE: "coupon_update";
23
+ readonly PAYOUT_MARK_PAID: "payout_mark_paid";
24
+ readonly STORE_STATUS_CHANGE: "store_status_change";
25
+ readonly USER_ROLE_CHANGE: "user_role_change";
26
+ };
27
+ export type AdminAuditAction = (typeof AdminAuditActionValues)[keyof typeof AdminAuditActionValues];
28
+ export interface AdminAuditLogDocument extends BaseDocument {
29
+ actorUid: string;
30
+ actorName?: string;
31
+ action: AdminAuditAction;
32
+ /** e.g. "user" | "store" | "coupon" | "payout" — the kind of entity affected. */
33
+ targetType: string;
34
+ targetId: string;
35
+ /** Denormalized human-readable label (display name, coupon code, etc.) so the log list never needs a join. */
36
+ targetLabel?: string;
37
+ reason?: string;
38
+ metadata?: Record<string, JsonValue>;
39
+ }
40
+ export declare const ADMIN_AUDIT_LOG_FIELDS: {
41
+ readonly ACTOR_UID: "actorUid";
42
+ readonly ACTOR_NAME: "actorName";
43
+ readonly ACTION: "action";
44
+ readonly TARGET_TYPE: "targetType";
45
+ readonly TARGET_ID: "targetId";
46
+ readonly TARGET_LABEL: "targetLabel";
47
+ readonly REASON: "reason";
48
+ readonly CREATED_AT: "createdAt";
49
+ readonly ACTION_VALUES: {
50
+ readonly USER_HARD_BAN: "user_hard_ban";
51
+ readonly USER_SOFT_BAN: "user_soft_ban";
52
+ readonly USER_UNBAN: "user_unban";
53
+ readonly CHECKOUT_BYPASS: "checkout_bypass";
54
+ readonly COUPON_UPDATE: "coupon_update";
55
+ readonly PAYOUT_MARK_PAID: "payout_mark_paid";
56
+ readonly STORE_STATUS_CHANGE: "store_status_change";
57
+ readonly USER_ROLE_CHANGE: "user_role_change";
58
+ };
59
+ };
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Admin Audit Log Firestore Document Types & Constants
3
+ *
4
+ * Collection: adminAuditLog
5
+ * Document ID: Firestore auto-ID (no slug prefix — see CLAUDE.md "True
6
+ * Firestore auto-IDs" list, same convention as `notifications`/`sessions`/`jobs`).
7
+ *
8
+ * A queryable record of high-value privileged admin actions — bans, checkout
9
+ * bypass, coupon edits, payout mark-paid, store status changes, role changes.
10
+ * This is deliberately an MVP scope (instrumenting existing high-value call
11
+ * sites), not an exhaustive every-write-path audit trail — see CLAUDE.md's
12
+ * "Admin Audit Log" section for the full instrumented-action list.
13
+ */
14
+ export const ADMIN_AUDIT_LOG_COLLECTION = "adminAuditLog";
15
+ export const AdminAuditActionValues = {
16
+ USER_HARD_BAN: "user_hard_ban",
17
+ USER_SOFT_BAN: "user_soft_ban",
18
+ USER_UNBAN: "user_unban",
19
+ CHECKOUT_BYPASS: "checkout_bypass",
20
+ COUPON_UPDATE: "coupon_update",
21
+ PAYOUT_MARK_PAID: "payout_mark_paid",
22
+ STORE_STATUS_CHANGE: "store_status_change",
23
+ USER_ROLE_CHANGE: "user_role_change",
24
+ };
25
+ export const ADMIN_AUDIT_LOG_FIELDS = {
26
+ ACTOR_UID: "actorUid",
27
+ ACTOR_NAME: "actorName",
28
+ ACTION: "action",
29
+ TARGET_TYPE: "targetType",
30
+ TARGET_ID: "targetId",
31
+ TARGET_LABEL: "targetLabel",
32
+ REASON: "reason",
33
+ CREATED_AT: "createdAt",
34
+ ACTION_VALUES: AdminAuditActionValues,
35
+ };
@@ -1,3 +1,2 @@
1
1
  export * from "./profile-actions";
2
2
  export * from "./realtime-token-actions";
3
- export * from "./password-change-otp-actions";
@@ -1,3 +1,2 @@
1
1
  export * from "./profile-actions";
2
2
  export * from "./realtime-token-actions";
3
- export * from "./password-change-otp-actions";
@@ -21,10 +21,6 @@ export interface RegisterData {
21
21
  displayName?: string;
22
22
  acceptTerms: boolean;
23
23
  }
24
- export interface ChangePasswordData {
25
- currentPassword: string;
26
- newPassword: string;
27
- }
28
24
  export interface ChangeEmailData {
29
25
  currentPassword: string;
30
26
  newEmail: string;
@@ -91,38 +87,15 @@ export declare function useResetPassword(options?: {
91
87
  onError?: (error: Error) => void;
92
88
  }): import("@tanstack/react-query").UseMutationResult<JsonValue, Error, ResetPasswordData, unknown>;
93
89
  /**
94
- * Password change is now a 3-step flow (root-caused 2026-08-20see
95
- * appkit/src/features/auth/password-change-otp.ts): the old single-step
96
- * reauthenticateAndChangePassword() applied the new password immediately
97
- * client-side, before any server-verified identity check beyond the
98
- * session cookie. Step order:
99
- * 1. useRequestPasswordChangeOtp verifies currentPassword via Firebase
100
- * reauth (proves the caller actually knows it, without changing
101
- * anything yet), then emails a 6-digit code.
102
- * 2. useVerifyPasswordChangeOtp — verifies the code server-side.
103
- * 3. useChangePassword — only now actually applies newPassword; the API
104
- * route rejects this call unless step 2 already succeeded.
90
+ * Password change is Firebase-only (no custom OTP code, no Resend) the
91
+ * "Change Password" settings action sends the exact same reset-link email
92
+ * as "Forgot Password" (see useForgotPassword above), to the signed-in
93
+ * user's own address. Completing the link requires access to that inbox,
94
+ * which a stolen session cookie alone can't provide — closing the same gap
95
+ * the older OTP-code system existed for, through inbox possession instead
96
+ * of a typed code. There is no separate hook for this: consumers call
97
+ * useForgotPassword({ email: user.email }) directly from the settings page.
105
98
  */
106
- export declare function useRequestPasswordChangeOtp(options?: {
107
- onSuccess?: (data: {
108
- maskedEmail: string;
109
- }) => void;
110
- onError?: (error: Error) => void;
111
- }): import("@tanstack/react-query").UseMutationResult<{
112
- maskedEmail: string;
113
- }, Error, {
114
- currentPassword: string;
115
- }, unknown>;
116
- export declare function useVerifyPasswordChangeOtp(options?: {
117
- onSuccess?: (data: JsonValue) => void;
118
- onError?: (error: Error) => void;
119
- }): import("@tanstack/react-query").UseMutationResult<JsonValue, Error, {
120
- code: string;
121
- }, unknown>;
122
- export declare function useChangePassword(options?: {
123
- onSuccess?: (data: JsonValue) => void;
124
- onError?: (error: Error) => void;
125
- }): import("@tanstack/react-query").UseMutationResult<JsonValue, Error, ChangePasswordData, unknown>;
126
99
  export declare function useChangeEmail(options?: {
127
100
  onSuccess?: (data: JsonValue) => void;
128
101
  onError?: (error: Error) => void;
@@ -7,7 +7,7 @@ import { getClientSessionAdapter } from "../../../contracts/client-session";
7
7
  import { apiClient } from "../../../http";
8
8
  import { useAuthEvent } from "./useAuthEvent";
9
9
  import { RealtimeEventStatus } from "../../../react/hooks/useRealtimeEvent";
10
- import { AUTH_ENDPOINTS, ACCOUNT_ENDPOINTS, } from "../../../constants/api-endpoints";
10
+ import { AUTH_ENDPOINTS, } from "../../../constants/api-endpoints";
11
11
  export function useCurrentUser(opts) {
12
12
  const query = useQuery({
13
13
  queryKey: ["auth", "me"],
@@ -307,7 +307,18 @@ export function useRegister(options) {
307
307
  // `auth.currentUser` is populated for client-side Firebase usage
308
308
  // (RTDB presence, etc) — do NOT call /api/auth/session again here,
309
309
  // that would create a second, orphaned session document.
310
- await getClientAuthProvider().signInWithEmailAndPassword(data.email.trim(), data.password);
310
+ const authProvider = getClientAuthProvider();
311
+ await authProvider.signInWithEmailAndPassword(data.email.trim(), data.password);
312
+ // Verification email is Firebase-native only (no Resend) — see project
313
+ // policy on "profile related auth changes". Deliberately non-fatal:
314
+ // the account already exists at this point, so a send failure must not
315
+ // fail registration — the user can re-request verification later.
316
+ try {
317
+ await authProvider.sendEmailVerification();
318
+ }
319
+ catch (err) {
320
+ void normalizeError(err);
321
+ }
311
322
  return { success: true, ...response };
312
323
  },
313
324
  onSuccess: options?.onSuccess,
@@ -354,42 +365,15 @@ export function useResetPassword(options) {
354
365
  });
355
366
  }
356
367
  /**
357
- * Password change is now a 3-step flow (root-caused 2026-08-20see
358
- * appkit/src/features/auth/password-change-otp.ts): the old single-step
359
- * reauthenticateAndChangePassword() applied the new password immediately
360
- * client-side, before any server-verified identity check beyond the
361
- * session cookie. Step order:
362
- * 1. useRequestPasswordChangeOtp verifies currentPassword via Firebase
363
- * reauth (proves the caller actually knows it, without changing
364
- * anything yet), then emails a 6-digit code.
365
- * 2. useVerifyPasswordChangeOtp — verifies the code server-side.
366
- * 3. useChangePassword — only now actually applies newPassword; the API
367
- * route rejects this call unless step 2 already succeeded.
368
+ * Password change is Firebase-only (no custom OTP code, no Resend) the
369
+ * "Change Password" settings action sends the exact same reset-link email
370
+ * as "Forgot Password" (see useForgotPassword above), to the signed-in
371
+ * user's own address. Completing the link requires access to that inbox,
372
+ * which a stolen session cookie alone can't provide — closing the same gap
373
+ * the older OTP-code system existed for, through inbox possession instead
374
+ * of a typed code. There is no separate hook for this: consumers call
375
+ * useForgotPassword({ email: user.email }) directly from the settings page.
368
376
  */
369
- export function useRequestPasswordChangeOtp(options) {
370
- return useMutation({
371
- mutationFn: async ({ currentPassword }) => {
372
- await getClientAuthProvider().reauthenticateOnly(currentPassword);
373
- return apiClient.post(ACCOUNT_ENDPOINTS.CHANGE_PASSWORD_OTP_REQUEST, {});
374
- },
375
- onSuccess: options?.onSuccess,
376
- onError: options?.onError,
377
- });
378
- }
379
- export function useVerifyPasswordChangeOtp(options) {
380
- return useMutation({
381
- mutationFn: async ({ code }) => apiClient.post(ACCOUNT_ENDPOINTS.CHANGE_PASSWORD_OTP_VERIFY, { code }),
382
- onSuccess: options?.onSuccess,
383
- onError: options?.onError,
384
- });
385
- }
386
- export function useChangePassword(options) {
387
- return useMutation({
388
- mutationFn: async (data) => apiClient.post(ACCOUNT_ENDPOINTS.CHANGE_PASSWORD, data),
389
- onSuccess: options?.onSuccess,
390
- onError: options?.onError,
391
- });
392
- }
393
377
  export function useChangeEmail(options) {
394
378
  return useMutation({
395
379
  mutationFn: async (data) => {
@@ -11,7 +11,7 @@
11
11
  * Permission naming: admin:resource:action
12
12
  * Ban action naming: plain verb phrase — write_reviews, place_bids, etc.
13
13
  */
14
- export type Permission = "admin:dashboard:view" | "admin:users:read" | "admin:users:write" | "admin:users:delete" | "admin:user-bans:read" | "admin:user-bans:write" | "admin:products:read" | "admin:products:write" | "admin:products:delete" | "admin:orders:read" | "admin:orders:write" | "admin:returns:read" | "admin:returns:write" | "admin:stores:read" | "admin:stores:write" | "admin:store-addresses:read" | "admin:addresses:read" | "admin:addresses:write" | "admin:analytics:view" | "admin:payouts:read" | "admin:payouts:write" | "admin:categories:read" | "admin:categories:write" | "admin:categories:delete" | "admin:brands:read" | "admin:brands:write" | "admin:brands:delete" | "admin:coupons:read" | "admin:coupons:write" | "admin:coupons:delete" | "admin:deals:read" | "admin:deals:write" | "admin:featured:read" | "admin:featured:write" | "admin:reviews:read" | "admin:reviews:write" | "admin:reviews:delete" | "admin:blog:read" | "admin:blog:write" | "admin:blog:delete" | "admin:blog:publish" | "admin:bids:read" | "admin:bids:write" | "admin:media:read" | "admin:media:write" | "admin:media:delete" | "admin:site:read" | "admin:site:write" | "admin:settings:write" | "admin:navigation:read" | "admin:navigation:write" | "admin:sections:read" | "admin:sections:write" | "admin:carousel:read" | "admin:carousel:write" | "admin:carousel:delete" | "admin:ads:read" | "admin:ads:write" | "admin:ads:delete" | "admin:faqs:read" | "admin:faqs:write" | "admin:faqs:delete" | "admin:tester-checklist:read" | "admin:tester-checklist:write" | "admin:tester-checklist:delete" | "admin:tester-feedback:read" | "admin:tester-feedback:write" | "admin:newsletter:read" | "admin:newsletter:write" | "admin:contact:read" | "admin:events:read" | "admin:events:write" | "admin:events:delete" | "admin:event-entries:read" | "admin:event-entries:write" | "admin:support-tickets:read" | "admin:support-tickets:write" | "admin:shipments:read" | "admin:shipments:write" | "admin:catalogue:read" | "admin:catalogue:write" | "admin:support-tickets:assign" | "admin:support-tickets:close" | "admin:scammers:read" | "admin:scammers:write" | "admin:scammers:verify" | "admin:scammers:delete" | "admin:sessions:read" | "admin:sessions:delete" | "admin:notifications:read" | "admin:notifications:write" | "admin:carts:read" | "admin:wishlists:read" | "admin:feature-flags:read" | "admin:feature-flags:write" | "admin:copilot:view" | "admin:team:read" | "admin:team:write" | "admin:maintenance:view-server-errors" | "admin:maintenance:view-client-errors" | "admin:maintenance:view-function-errors" | "admin:maintenance:view-cloud-logs" | "admin:maintenance:view-payment-rollbacks" | "admin:maintenance:run-analysis" | "admin:maintenance:purge-errors";
14
+ export type Permission = "admin:dashboard:view" | "admin:users:read" | "admin:users:write" | "admin:users:delete" | "admin:user-bans:read" | "admin:user-bans:write" | "admin:products:read" | "admin:products:write" | "admin:products:delete" | "admin:orders:read" | "admin:orders:write" | "admin:returns:read" | "admin:returns:write" | "admin:stores:read" | "admin:stores:write" | "admin:store-addresses:read" | "admin:addresses:read" | "admin:addresses:write" | "admin:analytics:view" | "admin:payouts:read" | "admin:payouts:write" | "admin:audit-log:read" | "admin:categories:read" | "admin:categories:write" | "admin:categories:delete" | "admin:brands:read" | "admin:brands:write" | "admin:brands:delete" | "admin:coupons:read" | "admin:coupons:write" | "admin:coupons:delete" | "admin:deals:read" | "admin:deals:write" | "admin:featured:read" | "admin:featured:write" | "admin:reviews:read" | "admin:reviews:write" | "admin:reviews:delete" | "admin:blog:read" | "admin:blog:write" | "admin:blog:delete" | "admin:blog:publish" | "admin:bids:read" | "admin:bids:write" | "admin:media:read" | "admin:media:write" | "admin:media:delete" | "admin:site:read" | "admin:site:write" | "admin:settings:write" | "admin:navigation:read" | "admin:navigation:write" | "admin:sections:read" | "admin:sections:write" | "admin:carousel:read" | "admin:carousel:write" | "admin:carousel:delete" | "admin:ads:read" | "admin:ads:write" | "admin:ads:delete" | "admin:faqs:read" | "admin:faqs:write" | "admin:faqs:delete" | "admin:tester-checklist:read" | "admin:tester-checklist:write" | "admin:tester-checklist:delete" | "admin:tester-feedback:read" | "admin:tester-feedback:write" | "admin:newsletter:read" | "admin:newsletter:write" | "admin:contact:read" | "admin:events:read" | "admin:events:write" | "admin:events:delete" | "admin:event-entries:read" | "admin:event-entries:write" | "admin:support-tickets:read" | "admin:support-tickets:write" | "admin:shipments:read" | "admin:shipments:write" | "admin:catalogue:read" | "admin:catalogue:write" | "admin:support-tickets:assign" | "admin:support-tickets:close" | "admin:scammers:read" | "admin:scammers:write" | "admin:scammers:verify" | "admin:scammers:delete" | "admin:sessions:read" | "admin:sessions:delete" | "admin:notifications:read" | "admin:notifications:write" | "admin:carts:read" | "admin:wishlists:read" | "admin:feature-flags:read" | "admin:feature-flags:write" | "admin:copilot:view" | "admin:team:read" | "admin:team:write" | "admin:maintenance:view-server-errors" | "admin:maintenance:view-client-errors" | "admin:maintenance:view-function-errors" | "admin:maintenance:view-cloud-logs" | "admin:maintenance:view-payment-rollbacks" | "admin:maintenance:run-analysis" | "admin:maintenance:purge-errors";
15
15
  /**
16
16
  * Granular user actions that can be soft-banned individually.
17
17
  * A user may have multiple simultaneous soft bans of different types.
@@ -148,6 +148,7 @@ export const PERMISSION_GROUPS = {
148
148
  "admin:payouts:write",
149
149
  "admin:orders:read",
150
150
  "admin:returns:read",
151
+ "admin:audit-log:read",
151
152
  ],
152
153
  data_analyst: [
153
154
  "admin:dashboard:view",
@@ -268,6 +269,7 @@ export const ROUTE_PERMISSION_MAP = {
268
269
  "/admin/store-addresses": "admin:store-addresses:read",
269
270
  "/admin/analytics": "admin:analytics:view",
270
271
  "/admin/payouts": "admin:payouts:read",
272
+ "/admin/audit-log": "admin:audit-log:read",
271
273
  "/admin/shipments": "admin:shipments:read",
272
274
  "/admin/catalogue-approvals": "admin:catalogue:read",
273
275
  "/admin/categories": "admin:categories:read",