@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
@@ -21,6 +21,8 @@ import { userRepository, sessionRepository, storeRepository, productRepository,
21
21
  import { sendNotification } from "../../../../features/admin/actions/notification-actions";
22
22
  import { isSellerUser } from "../../../../features/auth/role-predicates";
23
23
  import { getAdminAuth } from "../../../../providers/db-firebase";
24
+ import { recordAdminAction } from "../../features/audit-log/actions";
25
+ import { AdminAuditActionValues } from "../../../../features/audit-log/schemas/firestore";
24
26
  async function cascadeAddressClusterBan(uid, banData) {
25
27
  const userAddresses = await addressesRepository.listByOwner("user", uid);
26
28
  const uniqueHashes = [...new Set(userAddresses.map((a) => a.addressHash).filter(Boolean))];
@@ -84,6 +86,15 @@ export async function runHardBanCascade(input, ctx) {
84
86
  hardBanExpiresAt: expiresAt ?? null,
85
87
  ...(fraudOrderId ? { hardBanFraudOrderId: fraudOrderId } : {}),
86
88
  });
89
+ void recordAdminAction({
90
+ actorUid: bannedBy,
91
+ action: AdminAuditActionValues.USER_HARD_BAN,
92
+ targetType: "user",
93
+ targetId: uid,
94
+ targetLabel: target.displayName ?? uid,
95
+ reason,
96
+ metadata: { expiresAt: expiresAt?.toISOString() ?? null, fraudOrderId: fraudOrderId ?? null },
97
+ });
87
98
  // 3. Delete active sessions
88
99
  try {
89
100
  const sessions = await sessionRepository.findActiveByUser(uid);
@@ -1,4 +1,5 @@
1
1
  import type { JobContext } from "../runtime/types";
2
+ export declare const SANDBOX_COLLECTIONS: readonly ["categories", "stores", "products", "blogPosts", "events"];
2
3
  export interface TesterSandboxCleanupOptions {
3
4
  /** true = wipe every isTestData:true doc regardless of testDataExpiresAt (manual force-purge). */
4
5
  force?: boolean;
@@ -1,6 +1,9 @@
1
1
  import { batchDelete, getTestDataRefs } from "../handlers/_helpers";
2
2
  import { BID_FIELDS } from "../../../../constants/field-names";
3
- const SANDBOX_COLLECTIONS = ["categories", "stores", "products", "blogPosts", "events"];
3
+ // Exported so testerSandboxRefresh.ts (the every-4h revert+prune job) reuses
4
+ // the exact same collection scope instead of redefining it — one source of
5
+ // truth for "what counts as sandbox scope."
6
+ export const SANDBOX_COLLECTIONS = ["categories", "stores", "products", "blogPosts", "events"];
4
7
  const BID_CHUNK_SIZE = 30; // Firestore `in` query cap
5
8
  export async function runTesterSandboxCleanup(ctx, opts = {}) {
6
9
  const cutoff = opts.force ? null : new Date();
@@ -0,0 +1,12 @@
1
+ import type { JobContext } from "../runtime/types";
2
+ /**
3
+ * Reverts every live tester-sandbox fixture back to its canonical seeded
4
+ * shape (undoing edits made through admin/seller forms) and prunes any
5
+ * isTestData doc that isn't one of the known fixtures (something a tester
6
+ * created during QA, e.g. a cloned product). Runs every 4 hours — distinct
7
+ * from `runTesterSandboxCleanup`, which only deletes docs whose 7-day
8
+ * `testDataExpiresAt` TTL has actually lapsed and never touches still-live
9
+ * docs' fields. Scoped to the tester sandbox only (`isTestData: true`) —
10
+ * the permanent Beyblade catalog real visitors browse is never touched.
11
+ */
12
+ export declare function runTesterSandboxRefresh(ctx: JobContext): Promise<void>;
@@ -0,0 +1,85 @@
1
+ import { batchDelete, getTestDataRefs } from "../handlers/_helpers";
2
+ import { BID_FIELDS } from "../../../../constants/field-names";
3
+ import { SANDBOX_COLLECTIONS } from "./testerSandboxCleanup";
4
+ // Direct imports from each defining module (not the seed-data barrel) —
5
+ // this is internal appkit code, not part of the package's public API surface.
6
+ import { categoriesTesterSeedData } from "../../../../features/tester/seed-data/categories-tester-seed-data";
7
+ import { storesTesterSeedData } from "../../../../features/tester/seed-data/stores-tester-seed-data";
8
+ import { productsTesterSeedData } from "../../../../features/tester/seed-data/products-tester-seed-data";
9
+ import { blogTesterSeedData } from "../../../../features/tester/seed-data/blog-tester-seed-data";
10
+ import { eventsTesterSeedData } from "../../../../features/tester/seed-data/events-tester-seed-data";
11
+ import { bidsTesterSeedData } from "../../../../features/tester/seed-data/bids-tester-seed-data";
12
+ const SEED_BY_COLLECTION = {
13
+ categories: categoriesTesterSeedData,
14
+ stores: storesTesterSeedData,
15
+ products: productsTesterSeedData,
16
+ blogPosts: blogTesterSeedData,
17
+ events: eventsTesterSeedData,
18
+ };
19
+ const BID_CHUNK_SIZE = 30; // Firestore `in` query cap
20
+ /**
21
+ * Reverts every live tester-sandbox fixture back to its canonical seeded
22
+ * shape (undoing edits made through admin/seller forms) and prunes any
23
+ * isTestData doc that isn't one of the known fixtures (something a tester
24
+ * created during QA, e.g. a cloned product). Runs every 4 hours — distinct
25
+ * from `runTesterSandboxCleanup`, which only deletes docs whose 7-day
26
+ * `testDataExpiresAt` TTL has actually lapsed and never touches still-live
27
+ * docs' fields. Scoped to the tester sandbox only (`isTestData: true`) —
28
+ * the permanent Beyblade catalog real visitors browse is never touched.
29
+ */
30
+ export async function runTesterSandboxRefresh(ctx) {
31
+ let reverted = 0;
32
+ let deletedExtras = 0;
33
+ for (const collection of SANDBOX_COLLECTIONS) {
34
+ const seedDocs = SEED_BY_COLLECTION[collection] ?? [];
35
+ const validIds = new Set(seedDocs.map((d) => d.id).filter((id) => Boolean(id)));
36
+ if (seedDocs.length > 0) {
37
+ const batch = ctx.db.batch();
38
+ for (const doc of seedDocs) {
39
+ const { id, ...data } = doc;
40
+ if (!id)
41
+ continue;
42
+ // merge:true mirrors seed-cli.mjs's loadGeneric — the seed payload
43
+ // carries every canonical field, so this fully overwrites anything
44
+ // a tester edited through the UI.
45
+ batch.set(ctx.db.collection(collection).doc(id), data, { merge: true });
46
+ reverted++;
47
+ }
48
+ await batch.commit();
49
+ }
50
+ const testDataRefs = await getTestDataRefs(ctx.db, collection, null);
51
+ const extraRefs = testDataRefs.filter((ref) => !validIds.has(ref.id));
52
+ deletedExtras += await batchDelete(ctx, extraRefs);
53
+ }
54
+ // Bids aren't isTestData-flagged themselves — scoped by productId
55
+ // referencing a sandbox product instead, mirroring runTesterSandboxCleanup's
56
+ // cascade convention.
57
+ const sandboxProductIds = (SEED_BY_COLLECTION.products ?? [])
58
+ .map((d) => d.id)
59
+ .filter((id) => Boolean(id));
60
+ const validBidIds = new Set(bidsTesterSeedData.map((d) => d.id).filter((id) => Boolean(id)));
61
+ if (bidsTesterSeedData.length > 0) {
62
+ const bidBatch = ctx.db.batch();
63
+ for (const bid of bidsTesterSeedData) {
64
+ const { id, ...data } = bid;
65
+ if (!id)
66
+ continue;
67
+ bidBatch.set(ctx.db.collection("bids").doc(id), data, { merge: true });
68
+ reverted++;
69
+ }
70
+ await bidBatch.commit();
71
+ }
72
+ const extraBidRefs = [];
73
+ for (let i = 0; i < sandboxProductIds.length; i += BID_CHUNK_SIZE) {
74
+ const chunk = sandboxProductIds.slice(i, i + BID_CHUNK_SIZE);
75
+ if (chunk.length === 0)
76
+ continue;
77
+ const snap = await ctx.db.collection("bids").where(BID_FIELDS.PRODUCT_ID, "in", chunk).get();
78
+ for (const doc of snap.docs) {
79
+ if (!validBidIds.has(doc.id))
80
+ extraBidRefs.push(doc.ref);
81
+ }
82
+ }
83
+ deletedExtras += await batchDelete(ctx, extraBidRefs);
84
+ ctx.logger.info("Tester sandbox refresh complete", { reverted, deletedExtras });
85
+ }
@@ -20,6 +20,7 @@
20
20
  import { normalizeError } from "../../../../errors/normalize";
21
21
  import { notificationRepository } from "../../../../features/admin/repository/notification.repository";
22
22
  import { sendWhatsAppTemplateMessage, sendWhatsAppBusinessMessage, } from "../../../../features/whatsapp-bot/helpers/whatsapp";
23
+ import { isChannelHealthy, recordChannelOutcome } from "../../notifications/channel-health";
23
24
  const MAX_ATTEMPTS = 3;
24
25
  const RETRY_DELAY_MS = 1500;
25
26
  function delay(ms) {
@@ -27,6 +28,20 @@ function delay(ms) {
27
28
  }
28
29
  export async function runWhatsAppNotify(payload, ctx) {
29
30
  const { toPhone, title, message, templateName, templateLanguage, notificationId, phoneNumberId, accessToken } = payload;
31
+ if (!(await isChannelHealthy("whatsapp"))) {
32
+ ctx.logger.warn("whatsappNotify: WhatsApp channel circuit is open — skipping send", { notificationId });
33
+ await notificationRepository
34
+ .update(notificationId, { whatsappStatus: "skipped" })
35
+ .catch((err) => {
36
+ void normalizeError(err);
37
+ });
38
+ return {
39
+ summary: { total: 1, succeeded: 0, skipped: 1, failed: 0 },
40
+ succeeded: [],
41
+ skipped: [notificationId],
42
+ failed: [],
43
+ };
44
+ }
30
45
  let sent = false;
31
46
  let lastError;
32
47
  for (let attempt = 1; attempt <= MAX_ATTEMPTS && !sent; attempt++) {
@@ -61,6 +76,7 @@ export async function runWhatsAppNotify(payload, ctx) {
61
76
  if (!templateName) {
62
77
  ctx.logger.warn("whatsappNotify: no approved template configured for this notification type — sent as free-form text, which Meta rejects outside the 24h customer-service window", { notificationId });
63
78
  }
79
+ await recordChannelOutcome("whatsapp", sent);
64
80
  await notificationRepository
65
81
  .update(notificationId, { whatsappStatus: sent ? "sent" : "failed" })
66
82
  .catch((err) => {
@@ -0,0 +1,2 @@
1
+ import type { ScheduleHandler } from "../runtime/types";
2
+ export declare const dailyStatusDigestHandler: ScheduleHandler;
@@ -0,0 +1,4 @@
1
+ import { runDailyStatusDigest } from "../core/dailyStatusDigest";
2
+ export const dailyStatusDigestHandler = async (ctx) => {
3
+ await runDailyStatusDigest(ctx);
4
+ };
@@ -29,6 +29,7 @@ export { hardBanReinstatementHandler } from "./hardBanReinstatement";
29
29
  export { paymentReviewAutoApproveHandler } from "./paymentReviewAutoApprove";
30
30
  export { productStatsSyncHandler } from "./productStatsSync";
31
31
  export { revenueRollupHandler } from "./revenueRollup";
32
+ export { dailyStatusDigestHandler } from "./dailyStatusDigest";
32
33
  export { positionsReconcileHandler } from "./positionsReconcile";
33
34
  export { payoutBatchHandler } from "./payoutBatch";
34
35
  export { weeklyPayoutEligibilityHandler } from "./weeklyPayoutEligibility";
@@ -52,6 +53,7 @@ export { onScamReportCreateHandler } from "./onScamReportCreate";
52
53
  export { onScamReportUpdateHandler } from "./onScamReportUpdate";
53
54
  export { draftPruneHandler } from "./draftPrune";
54
55
  export { testerSandboxCleanupHandler } from "./testerSandboxCleanup";
56
+ export { testerSandboxRefreshHandler } from "./testerSandboxRefresh";
55
57
  export { emiInstallmentReminderHandler } from "./emiInstallmentReminder";
56
58
  export { onShipmentItemWriteHandler } from "./onShipmentItemWrite";
57
59
  export { onShipmentLotWriteHandler, onShipmentHeaderWriteHandler } from "./onShipmentAllocationSync";
@@ -29,6 +29,7 @@ export { hardBanReinstatementHandler } from "./hardBanReinstatement";
29
29
  export { paymentReviewAutoApproveHandler } from "./paymentReviewAutoApprove";
30
30
  export { productStatsSyncHandler } from "./productStatsSync";
31
31
  export { revenueRollupHandler } from "./revenueRollup";
32
+ export { dailyStatusDigestHandler } from "./dailyStatusDigest";
32
33
  export { positionsReconcileHandler } from "./positionsReconcile";
33
34
  export { payoutBatchHandler } from "./payoutBatch";
34
35
  export { weeklyPayoutEligibilityHandler } from "./weeklyPayoutEligibility";
@@ -64,6 +65,8 @@ export { onScamReportUpdateHandler } from "./onScamReportUpdate";
64
65
  export { draftPruneHandler } from "./draftPrune";
65
66
  // Tester program — 7-day auto-expiry sweep for the shared admin-seeded test sandbox
66
67
  export { testerSandboxCleanupHandler } from "./testerSandboxCleanup";
68
+ // Tester program — every-4h revert-live-edits + prune-extras refresh (faster than the 7-day sweep above)
69
+ export { testerSandboxRefreshHandler } from "./testerSandboxRefresh";
67
70
  // EMI — installment reminder + overdue-flagging sweep
68
71
  export { emiInstallmentReminderHandler } from "./emiInstallmentReminder";
69
72
  // Procurement Shipments — 3-function recompute cascade (item→lot, lot/header→shipment allocation, cascade-delete)
@@ -0,0 +1,2 @@
1
+ import type { ScheduleHandler } from "../runtime/types";
2
+ export declare const testerSandboxRefreshHandler: ScheduleHandler;
@@ -0,0 +1,2 @@
1
+ import { runTesterSandboxRefresh } from "../core/testerSandboxRefresh";
2
+ export const testerSandboxRefreshHandler = (ctx) => runTesterSandboxRefresh(ctx);
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Circuit breaker for outbound notification channels (email, WhatsApp).
3
+ *
4
+ * Persisted as a singleton Firestore doc `system/channelHealth` so the
5
+ * "is this channel currently known-bad" state survives across requests and
6
+ * Firebase Function invocations — a channel that just failed 3 times in a
7
+ * row is treated as down for a 15-minute cooldown instead of being retried
8
+ * on every subsequent send attempt (wasted latency + hammering a dead
9
+ * provider). After the cooldown, the next attempt is a half-open probe:
10
+ * its own outcome decides whether the circuit re-closes or re-opens.
11
+ */
12
+ export type NotificationChannel = "email" | "whatsapp";
13
+ /**
14
+ * Returns false only when the circuit is open and still within its cooldown
15
+ * window. Any other state (closed, or open-but-cooldown-elapsed) is treated
16
+ * as healthy — the latter lets the next call through as a half-open probe.
17
+ */
18
+ export declare function isChannelHealthy(channel: NotificationChannel): Promise<boolean>;
19
+ export declare function recordChannelOutcome(channel: NotificationChannel, success: boolean): Promise<void>;
20
+ /**
21
+ * Runs `fn` up to 3 times (500ms then 1.5s between attempts) and records the
22
+ * final outcome against the channel's health state. `fn` must throw on
23
+ * failure — for a helper that returns a boolean instead (e.g. the WhatsApp
24
+ * Cloud API helpers), convert `false` into a thrown error at the call site
25
+ * before passing it in.
26
+ */
27
+ export declare function withChannelRetry<T>(channel: NotificationChannel, fn: () => Promise<T>): Promise<T>;
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Circuit breaker for outbound notification channels (email, WhatsApp).
3
+ *
4
+ * Persisted as a singleton Firestore doc `system/channelHealth` so the
5
+ * "is this channel currently known-bad" state survives across requests and
6
+ * Firebase Function invocations — a channel that just failed 3 times in a
7
+ * row is treated as down for a 15-minute cooldown instead of being retried
8
+ * on every subsequent send attempt (wasted latency + hammering a dead
9
+ * provider). After the cooldown, the next attempt is a half-open probe:
10
+ * its own outcome decides whether the circuit re-closes or re-opens.
11
+ */
12
+ import { getAdminDb } from "../../../providers/db-firebase";
13
+ import { normalizeError } from "../../../errors/normalize";
14
+ import { serverLogger } from "../../../monitoring";
15
+ const HEALTH_COLLECTION = "system";
16
+ const HEALTH_DOC = "channelHealth";
17
+ const FAILURE_THRESHOLD = 3;
18
+ const COOLDOWN_MS = 15 * 60 * 1000;
19
+ const RETRY_DELAYS_MS = [500, 1500];
20
+ function defaultState() {
21
+ return { consecutiveFailures: 0, state: "closed" };
22
+ }
23
+ async function readHealthDoc() {
24
+ try {
25
+ const snap = await getAdminDb().collection(HEALTH_COLLECTION).doc(HEALTH_DOC).get();
26
+ return snap.data() ?? {};
27
+ }
28
+ catch (err) {
29
+ void normalizeError(err);
30
+ return {};
31
+ }
32
+ }
33
+ /**
34
+ * Returns false only when the circuit is open and still within its cooldown
35
+ * window. Any other state (closed, or open-but-cooldown-elapsed) is treated
36
+ * as healthy — the latter lets the next call through as a half-open probe.
37
+ */
38
+ export async function isChannelHealthy(channel) {
39
+ const doc = await readHealthDoc();
40
+ const state = doc[channel];
41
+ if (!state || state.state !== "open")
42
+ return true;
43
+ if (state.openedAt && Date.now() - state.openedAt >= COOLDOWN_MS)
44
+ return true;
45
+ return false;
46
+ }
47
+ export async function recordChannelOutcome(channel, success) {
48
+ try {
49
+ const doc = await readHealthDoc();
50
+ const prev = doc[channel] ?? defaultState();
51
+ const next = success
52
+ ? defaultState()
53
+ : (() => {
54
+ const consecutiveFailures = prev.consecutiveFailures + 1;
55
+ return consecutiveFailures >= FAILURE_THRESHOLD
56
+ ? { consecutiveFailures, state: "open", openedAt: Date.now() }
57
+ : { consecutiveFailures, state: "closed" };
58
+ })();
59
+ await getAdminDb()
60
+ .collection(HEALTH_COLLECTION)
61
+ .doc(HEALTH_DOC)
62
+ .set({ [channel]: next }, { merge: true });
63
+ }
64
+ catch (err) {
65
+ void normalizeError(err);
66
+ serverLogger.warn("channel-health: failed to record outcome", { channel, success });
67
+ }
68
+ }
69
+ function delay(ms) {
70
+ return new Promise((resolve) => setTimeout(resolve, ms));
71
+ }
72
+ /**
73
+ * Runs `fn` up to 3 times (500ms then 1.5s between attempts) and records the
74
+ * final outcome against the channel's health state. `fn` must throw on
75
+ * failure — for a helper that returns a boolean instead (e.g. the WhatsApp
76
+ * Cloud API helpers), convert `false` into a thrown error at the call site
77
+ * before passing it in.
78
+ */
79
+ export async function withChannelRetry(channel, fn) {
80
+ const maxAttempts = RETRY_DELAYS_MS.length + 1;
81
+ // Narrowed to Error at catch time rather than held as `unknown` — same
82
+ // conversion the throw below used to do, just done once at the source so
83
+ // `unknown` never escapes the catch clause (CLAUDE.md Root Cause #31).
84
+ let lastError;
85
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) {
86
+ try {
87
+ const result = await fn();
88
+ await recordChannelOutcome(channel, true);
89
+ return result;
90
+ }
91
+ catch (err) {
92
+ void normalizeError(err);
93
+ lastError = err instanceof Error ? err : new Error(String(err));
94
+ if (attempt < maxAttempts) {
95
+ await delay(RETRY_DELAYS_MS[attempt - 1]);
96
+ }
97
+ }
98
+ }
99
+ await recordChannelOutcome(channel, false);
100
+ throw lastError ?? new Error(`${channel} channel failed after ${maxAttempts} attempts`);
101
+ }
@@ -4,7 +4,6 @@ export declare const brandInputSchema: z.ZodObject<{
4
4
  slug: z.ZodString;
5
5
  description: z.ZodOptional<z.ZodString>;
6
6
  logoURL: z.ZodOptional<z.ZodString>;
7
- bannerURL: z.ZodOptional<z.ZodString>;
8
7
  website: z.ZodOptional<z.ZodString>;
9
8
  country: z.ZodOptional<z.ZodString>;
10
9
  founded: z.ZodOptional<z.ZodNumber>;
@@ -18,7 +17,6 @@ export declare const brandInputSchema: z.ZodObject<{
18
17
  country?: string | undefined;
19
18
  description?: string | undefined;
20
19
  logoURL?: string | undefined;
21
- bannerURL?: string | undefined;
22
20
  website?: string | undefined;
23
21
  founded?: number | undefined;
24
22
  }, {
@@ -29,7 +27,6 @@ export declare const brandInputSchema: z.ZodObject<{
29
27
  isActive?: boolean | undefined;
30
28
  displayOrder?: number | undefined;
31
29
  logoURL?: string | undefined;
32
- bannerURL?: string | undefined;
33
30
  website?: string | undefined;
34
31
  founded?: number | undefined;
35
32
  }>;
@@ -38,7 +35,6 @@ export declare const brandUpdateSchema: z.ZodObject<Omit<{
38
35
  slug: z.ZodOptional<z.ZodString>;
39
36
  description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
40
37
  logoURL: z.ZodOptional<z.ZodOptional<z.ZodString>>;
41
- bannerURL: z.ZodOptional<z.ZodOptional<z.ZodString>>;
42
38
  website: z.ZodOptional<z.ZodOptional<z.ZodString>>;
43
39
  country: z.ZodOptional<z.ZodOptional<z.ZodString>>;
44
40
  founded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -51,7 +47,6 @@ export declare const brandUpdateSchema: z.ZodObject<Omit<{
51
47
  isActive?: boolean | undefined;
52
48
  displayOrder?: number | undefined;
53
49
  logoURL?: string | undefined;
54
- bannerURL?: string | undefined;
55
50
  website?: string | undefined;
56
51
  founded?: number | undefined;
57
52
  }, {
@@ -61,7 +56,6 @@ export declare const brandUpdateSchema: z.ZodObject<Omit<{
61
56
  isActive?: boolean | undefined;
62
57
  displayOrder?: number | undefined;
63
58
  logoURL?: string | undefined;
64
- bannerURL?: string | undefined;
65
59
  website?: string | undefined;
66
60
  founded?: number | undefined;
67
61
  }>;
@@ -5,7 +5,6 @@ export const brandInputSchema = z.object({
5
5
  slug: z.string().min(1).regex(/^brand-[a-z0-9-]+$/, "Slug must start with 'brand-' and contain only lowercase letters, numbers, and hyphens"),
6
6
  description: z.string().max(BRAND_DESCRIPTION_MAX_LENGTH).optional(),
7
7
  logoURL: z.string().url().optional(),
8
- bannerURL: z.string().url().optional(),
9
8
  website: z.string().url().optional(),
10
9
  country: z.string().optional(),
11
10
  founded: z.number().int().min(1800).max(new Date().getFullYear()).optional(),
@@ -81,6 +81,8 @@ export declare const bundleCreateSchema: z.ZodObject<{
81
81
  * "brand" — brand discovery collection; does not touch product reverse pointers.
82
82
  */
83
83
  bundleKind: z.ZodEnum<["special", "brand"]>;
84
+ /** Which brand this bundle belongs to, for the brand page's bundle tab — distinct from bundleQueryRule.filter.brandSlug (a dynamic-rule query filter). */
85
+ brandSlug: z.ZodOptional<z.ZodString>;
84
86
  bundlePrice: z.ZodNumber;
85
87
  bundleQueryRule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
86
88
  type: z.ZodLiteral<"static">;
@@ -185,6 +187,7 @@ export declare const bundleCreateSchema: z.ZodObject<{
185
187
  } | undefined;
186
188
  description?: string | undefined;
187
189
  slug?: string | undefined;
190
+ brandSlug?: string | undefined;
188
191
  isActive?: boolean | undefined;
189
192
  bundleItemDetails?: {
190
193
  productId: string;
@@ -216,6 +219,7 @@ export declare const bundleCreateSchema: z.ZodObject<{
216
219
  } | undefined;
217
220
  description?: string | undefined;
218
221
  slug?: string | undefined;
222
+ brandSlug?: string | undefined;
219
223
  isActive?: boolean | undefined;
220
224
  bundleItemDetails?: {
221
225
  productId: string;
@@ -226,6 +230,7 @@ export declare const bundleUpdateSchema: z.ZodObject<{
226
230
  name: z.ZodOptional<z.ZodString>;
227
231
  description: z.ZodOptional<z.ZodString>;
228
232
  bundleKind: z.ZodOptional<z.ZodEnum<["special", "brand"]>>;
233
+ brandSlug: z.ZodOptional<z.ZodString>;
229
234
  bundlePrice: z.ZodOptional<z.ZodNumber>;
230
235
  bundleQueryRule: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
231
236
  type: z.ZodLiteral<"static">;
@@ -311,6 +316,7 @@ export declare const bundleUpdateSchema: z.ZodObject<{
311
316
  } | undefined;
312
317
  name?: string | undefined;
313
318
  description?: string | undefined;
319
+ brandSlug?: string | undefined;
314
320
  isActive?: boolean | undefined;
315
321
  bundleKind?: "brand" | "special" | undefined;
316
322
  bundleProductIds?: string[] | undefined;
@@ -341,6 +347,7 @@ export declare const bundleUpdateSchema: z.ZodObject<{
341
347
  } | undefined;
342
348
  name?: string | undefined;
343
349
  description?: string | undefined;
350
+ brandSlug?: string | undefined;
344
351
  isActive?: boolean | undefined;
345
352
  bundleKind?: "brand" | "special" | undefined;
346
353
  bundleProductIds?: string[] | undefined;
@@ -52,6 +52,8 @@ export const bundleCreateSchema = z.object({
52
52
  * "brand" — brand discovery collection; does not touch product reverse pointers.
53
53
  */
54
54
  bundleKind: z.enum([BUNDLE_KIND_SPECIAL, BUNDLE_KIND_BRAND]),
55
+ /** Which brand this bundle belongs to, for the brand page's bundle tab — distinct from bundleQueryRule.filter.brandSlug (a dynamic-rule query filter). */
56
+ brandSlug: z.string().optional(),
55
57
  bundlePrice: z.number().min(1),
56
58
  bundleQueryRule: bundleQueryRuleSchema,
57
59
  bundleProductIds: productIdsSchema,
@@ -64,6 +66,7 @@ export const bundleUpdateSchema = z.object({
64
66
  name: z.string().min(2).max(120).optional(),
65
67
  description: z.string().max(2000).optional(),
66
68
  bundleKind: z.enum([BUNDLE_KIND_SPECIAL, BUNDLE_KIND_BRAND]).optional(),
69
+ brandSlug: z.string().optional(),
67
70
  bundlePrice: z.number().min(1).optional(),
68
71
  bundleQueryRule: bundleQueryRuleSchema.optional(),
69
72
  bundleProductIds: productIdsSchema.optional(),
@@ -45,11 +45,6 @@ export declare const createOrderSchema: z.ZodObject<{
45
45
  couponCode: z.ZodOptional<z.ZodString>;
46
46
  }, "strip", z.ZodTypeAny, {
47
47
  paymentMethod: "upi" | "razorpay" | "cod";
48
- items: {
49
- price: number;
50
- productId: string;
51
- quantity: number;
52
- }[];
53
48
  shippingAddress: {
54
49
  country: string;
55
50
  phone: string;
@@ -60,14 +55,14 @@ export declare const createOrderSchema: z.ZodObject<{
60
55
  pincode: string;
61
56
  addressLine2?: string | undefined;
62
57
  };
63
- couponCode?: string | undefined;
64
- }, {
65
- paymentMethod: "upi" | "razorpay" | "cod";
66
58
  items: {
67
59
  price: number;
68
60
  productId: string;
69
61
  quantity: number;
70
62
  }[];
63
+ couponCode?: string | undefined;
64
+ }, {
65
+ paymentMethod: "upi" | "razorpay" | "cod";
71
66
  shippingAddress: {
72
67
  phone: string;
73
68
  city: string;
@@ -78,6 +73,11 @@ export declare const createOrderSchema: z.ZodObject<{
78
73
  country?: string | undefined;
79
74
  addressLine2?: string | undefined;
80
75
  };
76
+ items: {
77
+ price: number;
78
+ productId: string;
79
+ quantity: number;
80
+ }[];
81
81
  couponCode?: string | undefined;
82
82
  }>;
83
83
  export declare const updateOrderStatusSchema: z.ZodObject<{
package/dist/client.d.ts CHANGED
@@ -39,6 +39,8 @@ export { Divider } from "./ui/components/Divider";
39
39
  export { Tabs, TabsList, TabsTrigger, TabsContent } from "./ui/components/Tabs";
40
40
  export type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps } from "./ui/components/Tabs";
41
41
  export { SellerProductsView } from "./features/seller/components/SellerProductsView";
42
+ export { SellerOrderDetailPanel } from "./features/seller/components/SellerOrdersView";
43
+ export { SellerPayoutDetailContent } from "./features/seller/components/SellerPayoutsView";
42
44
  export { Drawer } from "./ui/components/Drawer";
43
45
  export { FilterDrawer } from "./ui/components/FilterDrawer";
44
46
  export { Modal } from "./ui/components/Modal";
@@ -122,6 +124,10 @@ export { ProgressBarFill } from "./ui/components/ProgressBarFill";
122
124
  export type { ProgressBarFillProps } from "./ui/components/ProgressBarFill";
123
125
  export { Main, Section, Nav, Ul, Ol, Li, Table, Thead, Tbody, Tr, Th, Td, Code, Pre, Blockquote } from "./ui/components/Semantic";
124
126
  export { Badge } from "./ui/components/Badge";
127
+ export { Avatar, AvatarGroup } from "./ui/components/Avatar";
128
+ export type { AvatarProps, AvatarGroupProps } from "./ui/components/Avatar";
129
+ export { AvatarDisplay } from "./ui/components/AvatarDisplay";
130
+ export type { AvatarDisplayProps } from "./ui/components/AvatarDisplay";
125
131
  export { Button } from "./ui/components/Button";
126
132
  export { ClaimCouponButton } from "./ui/components/ClaimCouponButton";
127
133
  export type { ClaimCouponButtonProps } from "./ui/components/ClaimCouponButton";
@@ -145,6 +151,8 @@ export type { FieldTextareaProps } from "./ui/forms";
145
151
  export { FieldTextarea } from "./ui/forms";
146
152
  export type { ColorPickerFieldProps } from "./ui/forms";
147
153
  export { ColorPickerField } from "./ui/forms";
154
+ export type { FormErrorSummaryProps } from "./ui/forms";
155
+ export { FormErrorSummary } from "./ui/forms";
148
156
  export { Select } from "./ui/components/Select";
149
157
  export type { SelectOption, SelectProps } from "./ui/components/Select";
150
158
  export { Heading } from "./ui/components/Typography";
@@ -168,7 +176,7 @@ export type { ZodSetupProps } from "./validation/ZodSetup";
168
176
  export { AdminSidebar } from "./features/admin/components/AdminSidebar";
169
177
  export type { AdminSidebarProps, AdminNavItem, AdminNavGroup } from "./features/admin/components/AdminSidebar";
170
178
  export { AdminDashboardView, AdminAnalyticsView, AdminPageViewsReportView, AdminPrizeDrawsView, AdminCarouselView, AdminSublistingCategoriesView, AdminFulfillmentView, DataTable, DataListingView, useAdminListingData, toRecordArray, toStringValue, toRelativeDate } from "./features/admin/index";
171
- export type { AdminDashboardViewProps, AdminAnalyticsViewProps, AdminAnalyticsViewLabels, AdminPageViewsReportViewProps, AdminPrizeDrawsViewProps, AdminCarouselViewProps, AdminFulfillmentViewProps, AdminListingScaffoldRow, ListingViewConfig } from "./features/admin/index";
179
+ export type { AdminDashboardViewProps, AdminAnalyticsViewProps, AdminAnalyticsViewLabels, AdminPrizeDrawsViewProps, AdminCarouselViewProps, AdminFulfillmentViewProps, AdminListingScaffoldRow, ListingViewConfig } from "./features/admin/index";
172
180
  export type { BulkActionItem } from "./ui/components/BulkActionBar";
173
181
  export { PERMISSION_GROUPS, PERMISSION_DOMAINS, getPermissionsForDomain, formatPermLabel } from "./features/auth/permissions/constants";
174
182
  export { ADMIN_ENDPOINTS } from "./constants/index";
@@ -195,8 +203,8 @@ export { AuctionBidsTable } from "./features/auctions/components/AuctionBidsTabl
195
203
  export type { AuctionBidsTableProps, AuctionWithBids } from "./features/auctions/components/AuctionBidsTable";
196
204
  export { ProtectedRoute, AuthStatusPanel, ForgotPasswordView, LoginForm, RegisterForm, ResetPasswordView, VerifyEmailView } from "./features/auth/index";
197
205
  export type { AuthGuardUser, ForgotPasswordViewProps, LoginFormProps, LoginFormValues, RegisterFormProps, RegisterFormValues, ResetPasswordViewProps, VerifyEmailViewProps, } from "./features/auth/index";
198
- export { useLogout, useLogin, useGoogleLogin, useLinkGoogleAccount, useRegister, useForgotPassword, useResetPassword, useVerifyEmail, useChangePassword, useRequestPasswordChangeOtp, useVerifyPasswordChangeOtp, useChangeEmail } from "./features/auth/index";
199
- export type { LoginCredentials, RegisterData, ForgotPasswordData, ResetPasswordData, VerifyEmailData, ChangePasswordData, ChangeEmailData } from "./features/auth/index";
206
+ export { useLogout, useLogin, useGoogleLogin, useLinkGoogleAccount, useRegister, useForgotPassword, useResetPassword, useVerifyEmail, useChangeEmail } from "./features/auth/index";
207
+ export type { LoginCredentials, RegisterData, ForgotPasswordData, ResetPasswordData, VerifyEmailData, ChangeEmailData } from "./features/auth/index";
200
208
  export { CartView, CartItemRow, CartSummary, CartDrawer, CheckoutView, CheckoutSuccessView, CheckoutAddressStep, useGuestCart, useCartCount, useAddToCart, useCart, useGuestCartMerge, useCartQuery } from "./features/cart/index";
201
209
  export { getCartOps, CART_OPS_CHANGE_EVENT } from "./features/cart/utils/pending-ops";
202
210
  export type { CartOp } from "./features/cart/utils/pending-ops";
@@ -283,9 +291,15 @@ export type { SellerDashboardViewProps as StoreDashboardViewProps, SellerDashboa
283
291
  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";
284
292
  export type { SellerPayoutSettingsViewProps, SellerShippingViewProps, SellerReviewsViewProps, SellerPayoutRequestViewProps, SellerAnalyticsViewProps, SellerPayoutsViewProps, SellerCouponEditorViewProps, CouponEditorDraft, SellerBidsViewProps, SellerAddressesViewProps, SellerPreOrdersViewProps, SellerPrizeDrawsViewProps, SellerOffersViewProps, SellerGroupedListingsViewProps, SellerAnalyticsAlertsViewProps, BarcodeFieldProps, FulfillmentViewProps } from "./features/seller/components/index";
285
293
  export type { SellerAnalyticsSummary, SellerAnalyticsTopProduct } from "./features/seller/types/index";
286
- export { UserAccountHubView, UserOrdersView, OrderDetailView, UserNotificationsView, UserReturnsView, UserSupportView, useNotifications } from "./features/account/index";
287
- export type { UserAccountHubViewProps, UserAccountHubViewLabels, UserOrdersViewProps, UserOrdersViewLabels, OrderDetailViewProps, OrderDetailViewLabels, UserNotificationsViewProps, UserNotificationsViewLabels, UserReturnsViewProps, UserReturnsViewLabels, UserSupportViewProps } from "./features/account/index";
294
+ export { UserAccountHubView, UserOrdersView, UserBidsView, OrderDetailView, UserNotificationsView, UserReturnsView, UserSupportView, useNotifications } from "./features/account/index";
295
+ export type { UserAccountHubViewProps, UserAccountHubViewLabels, UserOrdersViewProps, OrderDetailViewProps, OrderDetailViewLabels, UserNotificationsViewProps, UserNotificationsViewLabels, UserReturnsViewProps, UserSupportViewProps } from "./features/account/index";
288
296
  export { useOrders, useOrder, OrdersList } from "./features/orders/index";
297
+ export { OrderStatusTimeline } from "./features/orders/components/OrderStatusTimeline";
298
+ export type { OrderStatusTimelineProps } from "./features/orders/components/OrderStatusTimeline";
299
+ export { MANUAL_PAYMENT_METHODS, isManualPaymentMethod, PAYMENT_REVIEW_QUEUE_MODES, isPaymentReviewQueueMode, PAYMENT_WINDOW_MINUTES, } from "./features/orders/constants/payment-window";
300
+ export type { PaymentReviewQueueMode } from "./features/orders/constants/payment-window";
301
+ export { UserOrderTrackView } from "./features/account/components/UserOrderTrackView";
302
+ export type { UserOrderTrackViewProps, UserOrderTrackViewLabels } from "./features/account/components/UserOrderTrackView";
289
303
  export { useCouponValidate } from "./features/promotions/hooks/useCouponValidate";
290
304
  export { BlogPostView } from "./features/blog/components/BlogPostView";
291
305
  export type { BlogPostViewProps } from "./features/blog/components/BlogPostView";
@@ -366,7 +380,8 @@ export type { PaymentProofReviewMessageInput } from "./features/whatsapp-bot/typ
366
380
  export type { AdminNotificationDocument, ItemRequestDocument, ModerationQueueDocument, ReportDocument, CustomRoleDocument, AnalyticsCardDocument, ListingTemplateDocument, } from "./features/store-extensions/index";
367
381
  export { CommandPalette, useCommandPaletteHotkey } from "./features/shell/index";
368
382
  export type { CommandPaletteGroup } from "./features/shell/index";
369
- export { AdminBlogEditorView, AdminBundleEditorView, AdminCarouselEditorView, AdminCategoryEditorView, AdminCouponEditorView, AdminFaqEditorView, AdminOrderEditorView, AdminProductEditorView, AdminScammerEditorView, AdminSublistingCategoryEditorView, AdminSupportTicketDetailView, } from "./features/admin/index";
383
+ export { AdminBlogEditorView, AdminBundleEditorView, AdminCarouselEditorView, AdminCategoryEditorView, AdminCouponEditorView, AdminFaqEditorView, AdminOrderEditorView, AdminPayoutMarkPaidModal, AdminAuditLogView, ViewAuditLogEntryModal, AdminProductEditorView, AdminScammerEditorView, AdminStoreEditorView, AdminSublistingCategoryEditorView, AdminSupportTicketDetailView, } from "./features/admin/index";
384
+ export type { AdminStoreEditorViewProps, AdminPayoutMarkPaidModalProps, AdminAuditLogViewProps, AuditLogEntryDetail, ViewAuditLogEntryModalProps } from "./features/admin/index";
370
385
  export { ADMIN_CHECKOUT_BYPASS_FLAG_KEY } from "./features/admin/schemas/firestore";
371
386
  export { SpinWheelView, EventRaffleEntryForm } from "./features/events/index";
372
387
  export { Card, CardBody } from "./ui/index";