@mohasinac/appkit 4.13.1 → 4.15.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 (493) hide show
  1. package/dist/_internal/client/features/layout/DashboardLayoutClient.js +14 -5
  2. package/dist/_internal/client/features/lottery/LotteryAdminEditView.d.ts +3 -0
  3. package/dist/_internal/client/features/lottery/LotteryAdminEditView.js +6 -0
  4. package/dist/_internal/client/features/lottery/LotteryDetailView.d.ts +8 -0
  5. package/dist/_internal/client/features/lottery/LotteryDetailView.js +4 -1
  6. package/dist/_internal/client/features/lottery/LotteryListView.d.ts +7 -0
  7. package/dist/_internal/client/features/lottery/LotteryListView.js +1 -1
  8. package/dist/_internal/client/features/lottery/PrizeDrawLotteryDetailView.js +4 -1
  9. package/dist/_internal/client/features/lottery/slot-collage-items.d.ts +15 -0
  10. package/dist/_internal/client/features/lottery/slot-collage-items.js +13 -0
  11. package/dist/_internal/server/features/auctions/actions.js +8 -2
  12. package/dist/_internal/server/features/bundles/data.d.ts +16 -0
  13. package/dist/_internal/server/features/bundles/data.js +26 -0
  14. package/dist/_internal/server/features/bundles/index.d.ts +1 -1
  15. package/dist/_internal/server/features/bundles/index.js +1 -1
  16. package/dist/_internal/server/features/cart/service.d.ts +3 -3
  17. package/dist/_internal/server/features/checkout/actions.js +25 -0
  18. package/dist/_internal/server/features/checkout/locked-lines.d.ts +38 -0
  19. package/dist/_internal/server/features/checkout/locked-lines.js +171 -0
  20. package/dist/_internal/server/features/checkout/source-context.d.ts +5 -0
  21. package/dist/_internal/server/features/checkout/source-context.js +157 -0
  22. package/dist/_internal/server/features/homepage/index.d.ts +0 -1
  23. package/dist/_internal/server/features/homepage/index.js +7 -1
  24. package/dist/_internal/server/features/lottery/adapters.js +4 -0
  25. package/dist/_internal/server/features/offers/adapters.d.ts +103 -0
  26. package/dist/_internal/server/features/offers/adapters.js +88 -0
  27. package/dist/_internal/server/features/offers/index.d.ts +2 -0
  28. package/dist/_internal/server/features/offers/index.js +1 -0
  29. package/dist/_internal/server/features/orders/adapters.js +24 -0
  30. package/dist/_internal/server/features/products/data.js +15 -37
  31. package/dist/_internal/server/features/products/index.d.ts +1 -1
  32. package/dist/_internal/server/features/products/index.js +1 -1
  33. package/dist/_internal/server/features/products/list-public.d.ts +46 -20
  34. package/dist/_internal/server/features/products/list-public.js +266 -90
  35. package/dist/_internal/server/features/products/listing-tab-counts.d.ts +44 -0
  36. package/dist/_internal/server/features/products/listing-tab-counts.js +97 -0
  37. package/dist/_internal/server/features/site-settings/adapters.d.ts +51 -0
  38. package/dist/_internal/server/features/site-settings/adapters.js +75 -0
  39. package/dist/_internal/server/features/site-settings/index.d.ts +1 -0
  40. package/dist/_internal/server/features/site-settings/index.js +1 -0
  41. package/dist/_internal/server/features/stores/adapters.d.ts +56 -0
  42. package/dist/_internal/server/features/stores/adapters.js +91 -0
  43. package/dist/_internal/server/features/stores/index.d.ts +1 -0
  44. package/dist/_internal/server/features/stores/index.js +1 -0
  45. package/dist/_internal/server/jobs/core/auctionSettlement.js +56 -2
  46. package/dist/_internal/server/jobs/core/offerExpiry.js +55 -19
  47. package/dist/_internal/server/jobs/core/paymentReviewAutoApprove.d.ts +5 -0
  48. package/dist/_internal/server/jobs/core/paymentReviewAutoApprove.js +33 -1
  49. package/dist/_internal/server/jobs/handlers/messages.d.ts +7 -0
  50. package/dist/_internal/server/jobs/handlers/messages.js +10 -0
  51. package/dist/_internal/shared/actions/action-registry.js +17 -1
  52. package/dist/_internal/shared/checkout/lanes.d.ts +25 -0
  53. package/dist/_internal/shared/checkout/lanes.js +26 -0
  54. package/dist/_internal/shared/features/auctions/config.d.ts +27 -0
  55. package/dist/_internal/shared/features/auctions/config.js +27 -0
  56. package/dist/_internal/shared/features/auctions/schema.d.ts +14 -2
  57. package/dist/_internal/shared/features/auctions/schema.js +13 -1
  58. package/dist/_internal/shared/features/blog/schema.d.ts +2 -2
  59. package/dist/_internal/shared/features/cart/schema.d.ts +20 -15
  60. package/dist/_internal/shared/features/cart/schema.js +15 -0
  61. package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +32 -32
  62. package/dist/_internal/shared/features/emi/schedule.d.ts +24 -3
  63. package/dist/_internal/shared/features/emi/schedule.js +20 -5
  64. package/dist/_internal/shared/features/events/schema.d.ts +2 -2
  65. package/dist/_internal/shared/features/homepage/section-gate.d.ts +14 -0
  66. package/dist/_internal/shared/features/homepage/section-gate.js +51 -0
  67. package/dist/_internal/shared/features/offers/config.d.ts +30 -0
  68. package/dist/_internal/shared/features/offers/config.js +59 -0
  69. package/dist/_internal/shared/features/orders/schema.d.ts +8 -8
  70. package/dist/_internal/shared/features/products/schema.d.ts +30 -30
  71. package/dist/_internal/shared/features/products/to-product-item.js +6 -0
  72. package/dist/_internal/shared/features/reviews/schema.d.ts +2 -2
  73. package/dist/_internal/shared/features/site-settings/fees.d.ts +60 -0
  74. package/dist/_internal/shared/features/site-settings/fees.js +39 -0
  75. package/dist/_internal/shared/features/site-settings/types.d.ts +40 -0
  76. package/dist/_internal/shared/features/site-settings/types.js +1 -0
  77. package/dist/_internal/shared/history/history.d.ts +88 -0
  78. package/dist/_internal/shared/history/history.js +198 -0
  79. package/dist/_internal/shared/history/index.d.ts +4 -0
  80. package/dist/_internal/shared/history/index.js +2 -0
  81. package/dist/_internal/shared/history/types.d.ts +61 -0
  82. package/dist/_internal/shared/history/types.js +6 -0
  83. package/dist/_internal/shared/listing-types/_registry.d.ts +54 -1
  84. package/dist/_internal/shared/listing-types/_registry.js +67 -0
  85. package/dist/_internal/shared/listing-types/art/config.d.ts +3 -0
  86. package/dist/_internal/shared/listing-types/art/config.js +5 -0
  87. package/dist/_internal/shared/listing-types/auction/config.d.ts +13 -0
  88. package/dist/_internal/shared/listing-types/auction/config.js +21 -0
  89. package/dist/_internal/shared/listing-types/availability.d.ts +79 -0
  90. package/dist/_internal/shared/listing-types/availability.js +104 -0
  91. package/dist/_internal/shared/listing-types/capabilities.d.ts +15 -0
  92. package/dist/_internal/shared/listing-types/capabilities.js +12 -0
  93. package/dist/_internal/shared/listing-types/classified/config.d.ts +3 -0
  94. package/dist/_internal/shared/listing-types/classified/config.js +5 -0
  95. package/dist/_internal/shared/listing-types/digital-code/config.d.ts +11 -0
  96. package/dist/_internal/shared/listing-types/digital-code/config.js +22 -2
  97. package/dist/_internal/shared/listing-types/live/config.d.ts +3 -0
  98. package/dist/_internal/shared/listing-types/live/config.js +5 -0
  99. package/dist/_internal/shared/listing-types/pre-order/config.d.ts +3 -0
  100. package/dist/_internal/shared/listing-types/pre-order/config.js +19 -0
  101. package/dist/_internal/shared/listing-types/prize-draw/config.d.ts +11 -0
  102. package/dist/_internal/shared/listing-types/prize-draw/config.js +15 -0
  103. package/dist/_internal/shared/listing-types/standard/config.d.ts +3 -0
  104. package/dist/_internal/shared/listing-types/standard/config.js +5 -0
  105. package/dist/_internal/shared/listing-types/stickers/config.d.ts +3 -0
  106. package/dist/_internal/shared/listing-types/stickers/config.js +5 -0
  107. package/dist/client.d.ts +20 -7
  108. package/dist/client.js +22 -4
  109. package/dist/constants/api-endpoints.d.ts +6 -0
  110. package/dist/constants/api-endpoints.js +2 -0
  111. package/dist/constants/field-names.d.ts +57 -8
  112. package/dist/constants/field-names.js +101 -8
  113. package/dist/constants/table-keys.d.ts +17 -0
  114. package/dist/constants/table-keys.js +17 -0
  115. package/dist/errors/error-codes.d.ts +13 -1
  116. package/dist/errors/error-codes.js +13 -1
  117. package/dist/errors/error-display-map.js +12 -3
  118. package/dist/errors/messages.d.ts +10 -2
  119. package/dist/errors/messages.js +10 -2
  120. package/dist/features/about/components/AboutView.d.ts +3 -0
  121. package/dist/features/about/components/AboutView.js +3 -2
  122. package/dist/features/about/components/PolicyPageView.d.ts +2 -1
  123. package/dist/features/about/components/PolicyPageView.js +61 -23
  124. package/dist/features/about/components/PublicProfileView.js +5 -0
  125. package/dist/features/about/schemas/firestore.d.ts +3 -0
  126. package/dist/features/account/components/UserBidsView.js +12 -4
  127. package/dist/features/account/components/UserOrdersView.js +7 -0
  128. package/dist/features/account/components/UserReturnsView.d.ts +3 -0
  129. package/dist/features/account/components/UserReturnsView.js +17 -1
  130. package/dist/features/account/components/index.d.ts +0 -2
  131. package/dist/features/account/components/index.js +0 -1
  132. package/dist/features/account/schemas/index.d.ts +2 -2
  133. package/dist/features/account/types/index.d.ts +21 -2
  134. package/dist/features/addresses/schemas/index.d.ts +4 -4
  135. package/dist/features/admin/components/AdminArtView.js +8 -3
  136. package/dist/features/admin/components/AdminAuditLogView.js +1 -0
  137. package/dist/features/admin/components/AdminBidsView.js +15 -2
  138. package/dist/features/admin/components/AdminBlogEditorView.js +65 -33
  139. package/dist/features/admin/components/AdminClassifiedView.js +8 -3
  140. package/dist/features/admin/components/AdminDigitalCodesView.js +8 -3
  141. package/dist/features/admin/components/AdminFeatureEditorView.js +35 -6
  142. package/dist/features/admin/components/AdminFeatureFlagsView.js +1 -0
  143. package/dist/features/admin/components/AdminLiveView.js +8 -3
  144. package/dist/features/admin/components/AdminNavEditorView.js +15 -5
  145. package/dist/features/admin/components/AdminNewsletterView.js +18 -2
  146. package/dist/features/admin/components/AdminOffersView.d.ts +4 -0
  147. package/dist/features/admin/components/AdminOffersView.js +230 -0
  148. package/dist/features/admin/components/AdminOrdersView.js +10 -1
  149. package/dist/features/admin/components/AdminPaymentMethodsView.js +24 -4
  150. package/dist/features/admin/components/AdminPrizeDrawsView.js +5 -0
  151. package/dist/features/admin/components/AdminProductsView.js +16 -29
  152. package/dist/features/admin/components/AdminScammerEditorView.d.ts +2 -1
  153. package/dist/features/admin/components/AdminScammerEditorView.js +3 -13
  154. package/dist/features/admin/components/AdminScammersView.js +3 -8
  155. package/dist/features/admin/components/AdminSectionsView.js +32 -23
  156. package/dist/features/admin/components/AdminSessionsView.js +17 -2
  157. package/dist/features/admin/components/AdminSiteSettingsView.js +31 -13
  158. package/dist/features/admin/components/AdminSiteView.js +6 -2
  159. package/dist/features/admin/components/AdminStickersView.js +8 -3
  160. package/dist/features/admin/components/ViewAuditLogEntryModal.js +1 -0
  161. package/dist/features/admin/components/index.d.ts +2 -0
  162. package/dist/features/admin/components/index.js +1 -0
  163. package/dist/features/admin/components/sections/adminSectionsTypes.d.ts +4 -2
  164. package/dist/features/admin/components/sections/adminSectionsTypes.js +45 -27
  165. package/dist/features/admin/constants/filter-tabs.d.ts +89 -0
  166. package/dist/features/admin/constants/filter-tabs.js +56 -0
  167. package/dist/features/admin/schemas/firestore.d.ts +122 -3
  168. package/dist/features/admin/schemas/firestore.js +1 -0
  169. package/dist/features/admin/schemas/homepage-section-form.d.ts +22 -0
  170. package/dist/features/admin/schemas/homepage-section-form.js +68 -0
  171. package/dist/features/admin/schemas/nav-item-form.d.ts +74 -0
  172. package/dist/features/admin/schemas/nav-item-form.js +72 -0
  173. package/dist/features/auctions/actions/bid-actions.d.ts +20 -5
  174. package/dist/features/auctions/actions/bid-actions.js +93 -20
  175. package/dist/features/auctions/components/AuctionBidsTable.d.ts +10 -1
  176. package/dist/features/auctions/components/AuctionBidsTable.js +22 -4
  177. package/dist/features/auctions/components/AuctionDetailPageView.js +11 -6
  178. package/dist/features/auctions/components/AuctionsListView.js +5 -6
  179. package/dist/features/auctions/components/MarketplaceAuctionCard.d.ts +7 -0
  180. package/dist/features/auctions/components/MarketplaceAuctionCard.js +19 -2
  181. package/dist/features/auctions/components/PlaceBidFormClient.d.ts +1 -2
  182. package/dist/features/auctions/components/PlaceBidFormClient.js +8 -4
  183. package/dist/features/auctions/components/bid-detail-fields.d.ts +29 -0
  184. package/dist/features/auctions/components/bid-detail-fields.js +103 -0
  185. package/dist/features/auctions/repository/bid.repository.d.ts +13 -0
  186. package/dist/features/auctions/repository/bid.repository.js +23 -0
  187. package/dist/features/auctions/schemas/firestore.d.ts +17 -0
  188. package/dist/features/auctions/schemas/index.d.ts +12 -12
  189. package/dist/features/audit-log/schemas/firestore.d.ts +14 -0
  190. package/dist/features/audit-log/schemas/firestore.js +7 -0
  191. package/dist/features/auth/permissions/constants.d.ts +1 -1
  192. package/dist/features/auth/permissions/constants.js +10 -1
  193. package/dist/features/blog/actions/blog-actions.d.ts +7 -7
  194. package/dist/features/blog/schemas/blog-form.d.ts +80 -0
  195. package/dist/features/blog/schemas/blog-form.js +100 -0
  196. package/dist/features/blog/schemas/index.d.ts +6 -6
  197. package/dist/features/cart/repository/cart.repository.js +1 -0
  198. package/dist/features/cart/schemas/firestore.d.ts +15 -0
  199. package/dist/features/catalogue/schemas/validation.d.ts +4 -4
  200. package/dist/features/categories/components/BrandDetailPageView.js +23 -40
  201. package/dist/features/categories/components/BrandDetailTabs.d.ts +7 -7
  202. package/dist/features/categories/components/BrandDetailTabs.js +8 -12
  203. package/dist/features/categories/components/BundleCollage.js +1 -1
  204. package/dist/features/categories/components/CategoryDetailPageView.js +53 -57
  205. package/dist/features/categories/components/CategoryDetailTabs.d.ts +10 -8
  206. package/dist/features/categories/components/CategoryDetailTabs.js +11 -16
  207. package/dist/features/categories/components/CategoryProductsListing.js +11 -1
  208. package/dist/features/categories/components/ConcernCard.js +7 -1
  209. package/dist/features/categories/schemas/firestore.d.ts +13 -0
  210. package/dist/features/categories/schemas/index.d.ts +26 -26
  211. package/dist/features/classified/components/ClassifiedDetailPageView.d.ts +16 -1
  212. package/dist/features/classified/components/ClassifiedDetailPageView.js +23 -3
  213. package/dist/features/events/components/AdminEventEditorView.js +32 -54
  214. package/dist/features/events/components/AdminEventEntriesView.js +22 -3
  215. package/dist/features/events/components/AdminEventsView.js +15 -11
  216. package/dist/features/events/components/EventFilters.d.ts +9 -1
  217. package/dist/features/events/components/EventFilters.js +45 -21
  218. package/dist/features/events/components/EventsIndexListing.d.ts +6 -1
  219. package/dist/features/events/components/EventsIndexListing.js +2 -2
  220. package/dist/features/events/components/EventsListPageView.js +13 -4
  221. package/dist/features/events/repository/events.repository.d.ts +17 -0
  222. package/dist/features/events/repository/events.repository.js +27 -0
  223. package/dist/features/events/schemas/event-form.d.ts +113 -0
  224. package/dist/features/events/schemas/event-form.js +82 -0
  225. package/dist/features/events/schemas/firestore.d.ts +12 -0
  226. package/dist/features/events/schemas/firestore.js +12 -0
  227. package/dist/features/events/schemas/index.d.ts +50 -50
  228. package/dist/features/events/types/index.d.ts +11 -0
  229. package/dist/features/events/types/index.js +57 -1
  230. package/dist/features/faq/actions/faq-actions.d.ts +12 -12
  231. package/dist/features/faq/schemas/index.d.ts +8 -8
  232. package/dist/features/filters/FilterFacetSection.d.ts +7 -1
  233. package/dist/features/filters/FilterFacetSection.js +11 -3
  234. package/dist/features/grouped/schemas/grouped-listing-form.d.ts +101 -0
  235. package/dist/features/grouped/schemas/grouped-listing-form.js +89 -0
  236. package/dist/features/grouped/schemas/index.d.ts +4 -4
  237. package/dist/features/homepage/actions/homepage-section-actions.d.ts +11 -3
  238. package/dist/features/homepage/actions/homepage-section-actions.js +33 -1
  239. package/dist/features/homepage/components/AnnouncementBar.d.ts +7 -1
  240. package/dist/features/homepage/components/AnnouncementBar.js +3 -3
  241. package/dist/features/homepage/components/MarketplaceHomepageView.js +20 -6
  242. package/dist/features/homepage/hooks/homepage-query.d.ts +16 -0
  243. package/dist/features/homepage/hooks/homepage-query.js +45 -0
  244. package/dist/features/homepage/hooks/useFeaturedAuctions.d.ts +10 -0
  245. package/dist/features/homepage/hooks/useFeaturedAuctions.js +28 -8
  246. package/dist/features/homepage/hooks/useFeaturedPreOrders.js +17 -8
  247. package/dist/features/homepage/hooks/useFeaturedProducts.js +15 -8
  248. package/dist/features/homepage/schemas/index.d.ts +33 -2
  249. package/dist/features/homepage/schemas/index.js +24 -0
  250. package/dist/features/layout/AppLayoutShell.d.ts +11 -1
  251. package/dist/features/layout/AppLayoutShell.js +15 -14
  252. package/dist/features/layout/BackToTop.d.ts +9 -0
  253. package/dist/features/layout/BackToTop.js +10 -1
  254. package/dist/features/layout/BottomActions.js +28 -25
  255. package/dist/features/layout/BottomChrome.d.ts +34 -0
  256. package/dist/features/layout/BottomChrome.js +55 -0
  257. package/dist/features/layout/BottomNavLayout.d.ts +6 -0
  258. package/dist/features/layout/BottomNavLayout.js +7 -1
  259. package/dist/features/layout/BottomNavbar.js +15 -2
  260. package/dist/features/layout/FooterLayout.js +11 -1
  261. package/dist/features/layout/NavbarLayout.js +1 -1
  262. package/dist/features/layout/TitleBarLayout.d.ts +7 -0
  263. package/dist/features/layout/TitleBarLayout.js +28 -5
  264. package/dist/features/layout/index.d.ts +2 -0
  265. package/dist/features/layout/index.js +1 -0
  266. package/dist/features/lottery/types/index.d.ts +3 -0
  267. package/dist/features/media/MediaPickerModal.js +5 -1
  268. package/dist/features/messages/schemas/index.d.ts +2 -2
  269. package/dist/features/orders/components/OrderScopeTabs.d.ts +20 -0
  270. package/dist/features/orders/components/OrderScopeTabs.js +31 -0
  271. package/dist/features/orders/components/OrderStatusTimeline.d.ts +5 -1
  272. package/dist/features/orders/components/OrderStatusTimeline.js +39 -20
  273. package/dist/features/orders/constants/order-scope.d.ts +48 -0
  274. package/dist/features/orders/constants/order-scope.js +111 -0
  275. package/dist/features/orders/repository/orders.repository.d.ts +54 -7
  276. package/dist/features/orders/repository/orders.repository.js +121 -22
  277. package/dist/features/orders/schemas/firestore.d.ts +152 -0
  278. package/dist/features/orders/schemas/firestore.js +30 -0
  279. package/dist/features/orders/schemas/index.d.ts +18 -18
  280. package/dist/features/orders/types/index.d.ts +35 -7
  281. package/dist/features/pre-orders/components/PreOrdersIndexListing.js +14 -9
  282. package/dist/features/pre-orders/components/PreOrdersListView.js +6 -5
  283. package/dist/features/pre-orders/schemas/index.d.ts +1 -1
  284. package/dist/features/products/actions/product-actions.d.ts +14 -0
  285. package/dist/features/products/actions/product-actions.js +49 -11
  286. package/dist/features/products/api/route.d.ts +12 -0
  287. package/dist/features/products/api/route.js +42 -100
  288. package/dist/features/products/components/ArtStickersListView.js +2 -2
  289. package/dist/features/products/components/AuctionsIndexListing.js +13 -11
  290. package/dist/features/products/components/AvailabilityTabs.d.ts +11 -0
  291. package/dist/features/products/components/AvailabilityTabs.js +47 -0
  292. package/dist/features/products/components/GroupSettingsPanel.js +5 -1
  293. package/dist/features/products/components/MakeOfferButton.js +48 -49
  294. package/dist/features/products/components/PrizeDrawCollage.d.ts +20 -4
  295. package/dist/features/products/components/PrizeDrawCollage.js +9 -1
  296. package/dist/features/products/components/PrizeDrawsIndexListing.js +14 -12
  297. package/dist/features/products/components/PrizeDrawsListingView.js +2 -2
  298. package/dist/features/products/components/PrizeDrawsSection.d.ts +7 -1
  299. package/dist/features/products/components/PrizeDrawsSection.js +23 -18
  300. package/dist/features/products/components/ProductDetailPageView.d.ts +4 -1
  301. package/dist/features/products/components/ProductDetailPageView.js +18 -4
  302. package/dist/features/products/components/ProductForm.js +5 -2
  303. package/dist/features/products/components/ProductGrid.js +6 -1
  304. package/dist/features/products/components/ProductsIndexListing.js +22 -32
  305. package/dist/features/products/components/ProductsIndexPageView.js +6 -9
  306. package/dist/features/products/components/index.d.ts +2 -2
  307. package/dist/features/products/components/index.js +1 -1
  308. package/dist/features/products/config/listing-type-listing-config.d.ts +20 -0
  309. package/dist/features/products/config/listing-type-listing-config.js +22 -10
  310. package/dist/features/products/constants/action-defs.d.ts +2 -0
  311. package/dist/features/products/constants/action-defs.js +6 -0
  312. package/dist/features/products/hooks/useAvailabilityScope.d.ts +13 -0
  313. package/dist/features/products/hooks/useAvailabilityScope.js +19 -0
  314. package/dist/features/products/hooks/useProducts.d.ts +5 -0
  315. package/dist/features/products/hooks/useProducts.js +13 -2
  316. package/dist/features/products/repository/products.repository.d.ts +31 -2
  317. package/dist/features/products/repository/products.repository.js +53 -21
  318. package/dist/features/products/schemas/firestore.d.ts +17 -3
  319. package/dist/features/products/schemas/firestore.js +7 -2
  320. package/dist/features/products/schemas/index.d.ts +64 -64
  321. package/dist/features/products/schemas/product-features.validators.d.ts +79 -6
  322. package/dist/features/products/schemas/product-features.validators.js +63 -0
  323. package/dist/features/products/types/index.d.ts +16 -1
  324. package/dist/features/promotions/schemas/index.d.ts +2 -2
  325. package/dist/features/reviews/schemas/index.d.ts +16 -16
  326. package/dist/features/scams/constants/scammer-status-display.d.ts +28 -0
  327. package/dist/features/scams/constants/scammer-status-display.js +79 -0
  328. package/dist/features/search/schemas/index.d.ts +4 -4
  329. package/dist/features/seller/actions/offer-actions.js +57 -4
  330. package/dist/features/seller/components/OfferPhaseTimeline.d.ts +59 -0
  331. package/dist/features/seller/components/OfferPhaseTimeline.js +107 -0
  332. package/dist/features/seller/components/SellerArtView.js +5 -0
  333. package/dist/features/seller/components/SellerAuctionsView.js +13 -15
  334. package/dist/features/seller/components/SellerBidsView.js +11 -4
  335. package/dist/features/seller/components/SellerClassifiedView.js +5 -0
  336. package/dist/features/seller/components/SellerCouponEditorView.js +17 -17
  337. package/dist/features/seller/components/SellerDigitalCodesView.js +5 -0
  338. package/dist/features/seller/components/SellerLiveView.js +5 -0
  339. package/dist/features/seller/components/SellerOffersView.js +2 -1
  340. package/dist/features/seller/components/SellerOrdersView.js +31 -9
  341. package/dist/features/seller/components/SellerPayoutSettingsView.js +56 -31
  342. package/dist/features/seller/components/SellerPreOrdersView.js +5 -0
  343. package/dist/features/seller/components/SellerPrizeDrawsView.js +14 -16
  344. package/dist/features/seller/components/SellerProductShell.js +7 -1
  345. package/dist/features/seller/components/SellerProductsView.js +11 -8
  346. package/dist/features/seller/components/SellerStickersView.js +5 -0
  347. package/dist/features/seller/components/index.d.ts +0 -2
  348. package/dist/features/seller/components/index.js +0 -1
  349. package/dist/features/seller/repository/offer.repository.d.ts +142 -24
  350. package/dist/features/seller/repository/offer.repository.js +165 -26
  351. package/dist/features/seller/schemas/coupon-form.d.ts +72 -0
  352. package/dist/features/seller/schemas/coupon-form.js +116 -0
  353. package/dist/features/seller/schemas/firestore.d.ts +56 -2
  354. package/dist/features/seller/schemas/firestore.js +27 -0
  355. package/dist/features/seller/schemas/index.d.ts +2 -2
  356. package/dist/features/seller/schemas/offer-forms.d.ts +46 -0
  357. package/dist/features/seller/schemas/offer-forms.js +42 -0
  358. package/dist/features/seller/server.d.ts +0 -1
  359. package/dist/features/seller/server.js +0 -1
  360. package/dist/features/shell/SectionForm.d.ts +99 -0
  361. package/dist/features/shell/SectionForm.js +128 -0
  362. package/dist/features/shell/build-sections.d.ts +63 -0
  363. package/dist/features/shell/build-sections.js +207 -0
  364. package/dist/features/shell/entity-form.d.ts +109 -0
  365. package/dist/features/shell/entity-form.js +96 -0
  366. package/dist/features/shell/field-ui-meta.d.ts +115 -0
  367. package/dist/features/shell/field-ui-meta.js +324 -0
  368. package/dist/features/shell/index.d.ts +8 -0
  369. package/dist/features/shell/index.js +4 -0
  370. package/dist/features/status-history/components/StatusTimeline.d.ts +74 -0
  371. package/dist/features/status-history/components/StatusTimeline.js +46 -0
  372. package/dist/features/status-history/index.d.ts +11 -0
  373. package/dist/features/status-history/index.js +10 -0
  374. package/dist/features/store-extensions/components/ReviewDecisionModal.d.ts +27 -0
  375. package/dist/features/store-extensions/components/ReviewDecisionModal.js +82 -0
  376. package/dist/features/store-extensions/index.d.ts +12 -0
  377. package/dist/features/store-extensions/index.js +12 -0
  378. package/dist/features/store-extensions/schemas/admin-notification-form.d.ts +36 -0
  379. package/dist/features/store-extensions/schemas/admin-notification-form.js +114 -0
  380. package/dist/features/store-extensions/schemas/analytics-forms.d.ts +57 -0
  381. package/dist/features/store-extensions/schemas/analytics-forms.js +158 -0
  382. package/dist/features/store-extensions/schemas/custom-role-form.d.ts +85 -0
  383. package/dist/features/store-extensions/schemas/custom-role-form.js +118 -0
  384. package/dist/features/store-extensions/schemas/firestore.d.ts +21 -1
  385. package/dist/features/store-extensions/schemas/firestore.js +60 -0
  386. package/dist/features/store-extensions/schemas/google-config-form.d.ts +53 -0
  387. package/dist/features/store-extensions/schemas/google-config-form.js +105 -0
  388. package/dist/features/store-extensions/schemas/item-request-create-form.d.ts +28 -0
  389. package/dist/features/store-extensions/schemas/item-request-create-form.js +80 -0
  390. package/dist/features/store-extensions/schemas/listing-template-form.d.ts +78 -0
  391. package/dist/features/store-extensions/schemas/listing-template-form.js +87 -0
  392. package/dist/features/store-extensions/schemas/moderation-review-form.d.ts +49 -0
  393. package/dist/features/store-extensions/schemas/moderation-review-form.js +101 -0
  394. package/dist/features/store-extensions/schemas/payout-method-form.d.ts +153 -0
  395. package/dist/features/store-extensions/schemas/payout-method-form.js +155 -0
  396. package/dist/features/store-extensions/schemas/report-create-form.d.ts +25 -0
  397. package/dist/features/store-extensions/schemas/report-create-form.js +79 -0
  398. package/dist/features/store-extensions/schemas/report-review-form.d.ts +47 -0
  399. package/dist/features/store-extensions/schemas/report-review-form.js +111 -0
  400. package/dist/features/store-extensions/schemas/shipping-config-form.d.ts +148 -0
  401. package/dist/features/store-extensions/schemas/shipping-config-form.js +104 -0
  402. package/dist/features/store-extensions/schemas/store-category-form.d.ts +54 -0
  403. package/dist/features/store-extensions/schemas/store-category-form.js +73 -0
  404. package/dist/features/stores/api/[storeSlug]/route.js +2 -25
  405. package/dist/features/stores/components/StoreAuctionsListing.js +15 -1
  406. package/dist/features/stores/components/StoreClassifiedsListing.js +12 -2
  407. package/dist/features/stores/components/StoreDetailLayoutView.js +24 -71
  408. package/dist/features/stores/components/StoreDigitalCodesListing.js +12 -2
  409. package/dist/features/stores/components/StoreLiveItemsListing.js +12 -2
  410. package/dist/features/stores/components/StorePreOrdersListing.js +12 -1
  411. package/dist/features/stores/components/StoreProductsListing.js +11 -1
  412. package/dist/features/stores/repository/store.repository.js +6 -0
  413. package/dist/features/stores/schemas/index.d.ts +6 -6
  414. package/dist/features/support/schemas/index.d.ts +4 -4
  415. package/dist/features/tester/actions/checklist-item-actions.d.ts +4 -4
  416. package/dist/features/tester/seed-data/offers-tester-seed-data.js +119 -3
  417. package/dist/features/tester/seed-data/products-tester-seed-data.js +131 -1
  418. package/dist/features/tester/seed-data/tester-checklist-seed-data.js +431 -1
  419. package/dist/features/wishlist/hooks/useWishlistWithGuest.d.ts +1 -1
  420. package/dist/index.d.ts +25 -12
  421. package/dist/index.js +26 -11
  422. package/dist/next/routing/route-map.d.ts +23 -3
  423. package/dist/next/routing/route-map.js +14 -2
  424. package/dist/providers/db-firebase/base.repository.d.ts +30 -0
  425. package/dist/providers/db-firebase/base.repository.js +50 -1
  426. package/dist/providers/db-firebase/index.d.ts +1 -1
  427. package/dist/providers/db-firebase/index.js +1 -1
  428. package/dist/providers/db-firebase/sieve.d.ts +25 -0
  429. package/dist/providers/db-firebase/sieve.js +52 -18
  430. package/dist/react/hooks/useUrlTable.js +10 -1
  431. package/dist/schemas/firestore-value.d.ts +8 -0
  432. package/dist/schemas/firestore-value.js +44 -0
  433. package/dist/schemas/index.d.ts +1 -1
  434. package/dist/schemas/index.js +1 -1
  435. package/dist/schemas/registry.d.ts +702 -69
  436. package/dist/schemas/registry.js +64 -1
  437. package/dist/seed/_helpers/category-forest.d.ts +2 -0
  438. package/dist/seed/_helpers/category-forest.js +309 -0
  439. package/dist/seed/_helpers/category-tree.d.ts +27 -0
  440. package/dist/seed/_helpers/category-tree.js +103 -0
  441. package/dist/seed/bids-seed-data.js +30 -0
  442. package/dist/seed/catalogue-seed-data.js +12 -12
  443. package/dist/seed/categories-seed-data.js +177 -162
  444. package/dist/seed/events-seed-data.js +61 -10
  445. package/dist/seed/homepage-sections-seed-data.js +5 -1
  446. package/dist/seed/offers-seed-data.js +244 -34
  447. package/dist/seed/orders-seed-data.js +336 -1
  448. package/dist/seed/products-art-seed-data.js +50 -12
  449. package/dist/seed/products-auctions-seed-data.js +138 -18
  450. package/dist/seed/products-classifieds-seed-data.js +80 -16
  451. package/dist/seed/products-digital-codes-seed-data.js +66 -18
  452. package/dist/seed/products-live-items-seed-data.js +64 -13
  453. package/dist/seed/products-preorders-seed-data.d.ts +0 -1
  454. package/dist/seed/products-preorders-seed-data.js +52 -13
  455. package/dist/seed/products-prize-draws-seed-data.js +63 -14
  456. package/dist/seed/products-standard-seed-data.js +99 -26
  457. package/dist/seed/products-stickers-seed-data.js +47 -12
  458. package/dist/seed/reviews-seed-data.js +6 -1
  459. package/dist/seed/site-settings-seed-data.d.ts +1 -38
  460. package/dist/seed/site-settings-seed-data.js +38 -76
  461. package/dist/seed/stores-seed-data.js +71 -1
  462. package/dist/seed/users-seed-data.js +15 -5
  463. package/dist/server-entry.d.ts +1 -2
  464. package/dist/server-entry.js +4 -3
  465. package/dist/server.d.ts +6 -3
  466. package/dist/server.js +13 -4
  467. package/dist/styles.css +78 -12
  468. package/dist/tailwind-utilities.css +1 -1
  469. package/dist/ui/components/Button.style.css +19 -4
  470. package/dist/ui/components/CollapsibleSection.d.ts +17 -1
  471. package/dist/ui/components/CollapsibleSection.js +6 -2
  472. package/dist/ui/components/FilterChipGroup.d.ts +25 -1
  473. package/dist/ui/components/FilterChipGroup.js +21 -4
  474. package/dist/ui/components/HandMode.style.css +47 -0
  475. package/dist/ui/components/Layout.d.ts +9 -2
  476. package/dist/ui/components/Layout.js +1 -1
  477. package/dist/ui/components/ListingLayout.js +8 -8
  478. package/dist/ui/components/ListingLayout.style.css +8 -7
  479. package/dist/ui/components/RecordDetailModal.d.ts +10 -1
  480. package/dist/ui/components/RecordDetailModal.js +2 -2
  481. package/dist/ui/components/StickyToolbar.d.ts +3 -1
  482. package/dist/ui/components/StickyToolbar.js +62 -20
  483. package/dist/ui/components/bottom-chrome-slot.d.ts +21 -0
  484. package/dist/ui/components/bottom-chrome-slot.js +29 -0
  485. package/dist/ui/components/index.style.css +3 -0
  486. package/dist/ui/forms/FormShell.d.ts +43 -13
  487. package/dist/ui/forms/FormShell.js +22 -11
  488. package/dist/ui/forms/index.d.ts +1 -1
  489. package/dist/ui/index.d.ts +1 -1
  490. package/package.json +2 -1
  491. package/scripts/node-esm-loader.mjs +65 -0
  492. package/scripts/seed-cli-loader.mjs +6 -49
  493. package/scripts/seed-cli.mjs +1 -1
@@ -1,32 +1,50 @@
1
1
  import { ROUTES } from "../../../../next/routing/route-map";
2
2
  const LABEL_VERIFIED_SELLERS = "Verified Sellers";
3
- export const SECTION_TYPE_OPTIONS = [
4
- "welcome",
5
- "stats",
6
- "trust-indicators",
7
- "categories",
8
- "brands",
9
- "products",
10
- "pre-orders",
11
- "auctions",
12
- "banner",
13
- "features",
14
- "reviews",
15
- "whatsapp-community",
16
- "faq",
17
- "blog-articles",
18
- "newsletter",
19
- "stores",
20
- "events",
21
- "social-feed",
22
- "carousel",
23
- "custom-cards",
24
- "google-reviews",
25
- "featured-bundles",
26
- "prize-draws",
27
- "event-raffles",
28
- "collection-cards",
29
- ];
3
+ /*
4
+ * The admin dropdown's section types.
5
+ *
6
+ * 🛑 This used to be a bare `as const` array with its OWN `SectionType` derived
7
+ * from it — a second declaration shadowing the real `SectionType` in
8
+ * `features/homepage/schemas/firestore.ts`, which is how the two came to
9
+ * disagree with the create route (Recurrent Root Cause #36's shape, one union
10
+ * over). The route's own copy was missing `featured-bundles`, `prize-draws`,
11
+ * `event-raffles` and `collection-cards`, so choosing any of those four in this
12
+ * dropdown produced a 400 on save — four of twenty-five section types could be
13
+ * configured in full and never created.
14
+ *
15
+ * It is now a `Record<CanonicalSectionType, true>`, so a type added to the
16
+ * union and not offered here is a COMPILE error, and an entry here that is not
17
+ * a real section type is too. Declaration order is preserved because the array
18
+ * is derived from this map's keys, and that order is the dropdown's order.
19
+ */
20
+ const SECTION_TYPE_PRESENCE = {
21
+ welcome: true,
22
+ stats: true,
23
+ "trust-indicators": true,
24
+ categories: true,
25
+ brands: true,
26
+ products: true,
27
+ "pre-orders": true,
28
+ auctions: true,
29
+ banner: true,
30
+ features: true,
31
+ reviews: true,
32
+ "whatsapp-community": true,
33
+ faq: true,
34
+ "blog-articles": true,
35
+ newsletter: true,
36
+ stores: true,
37
+ events: true,
38
+ "social-feed": true,
39
+ carousel: true,
40
+ "custom-cards": true,
41
+ "google-reviews": true,
42
+ "featured-bundles": true,
43
+ "prize-draws": true,
44
+ "event-raffles": true,
45
+ "collection-cards": true,
46
+ };
47
+ export const SECTION_TYPE_OPTIONS = Object.keys(SECTION_TYPE_PRESENCE);
30
48
  export const DEFAULT_PRODUCTS_BUILDER = {
31
49
  title: "Featured Products",
32
50
  subtitle: "",
@@ -188,6 +188,9 @@ export declare const ADMIN_AUDIT_LOG_ACTION_TABS: readonly [{
188
188
  }, {
189
189
  readonly id: "payout_mark_paid";
190
190
  readonly label: "Payout paid";
191
+ }, {
192
+ readonly id: "offer_cancel";
193
+ readonly label: "Offer cancelled";
191
194
  }, {
192
195
  readonly id: "store_status_change";
193
196
  readonly label: "Store status";
@@ -203,6 +206,9 @@ export declare const ADMIN_ORDER_STATUS_TABS: readonly [{
203
206
  }, {
204
207
  readonly id: "pending";
205
208
  readonly label: "Pending";
209
+ }, {
210
+ readonly id: "confirmed";
211
+ readonly label: "Confirmed";
206
212
  }, {
207
213
  readonly id: "processing";
208
214
  readonly label: "Processing";
@@ -221,6 +227,9 @@ export declare const ADMIN_ORDER_STATUS_TABS: readonly [{
221
227
  }, {
222
228
  readonly id: "return_requested";
223
229
  readonly label: "Return Requested";
230
+ }, {
231
+ readonly id: "returned";
232
+ readonly label: "Returned";
224
233
  }];
225
234
  /**
226
235
  * Admin > Orders — manual-payment (cash / UPI / EMI) review queue.
@@ -338,6 +347,12 @@ export declare const ADMIN_EVENT_ENTRY_STATUS_TABS: readonly [{
338
347
  * feature's own events/types/index.ts). A "Published" chip previously
339
348
  * returned zero rows every time — removed rather than aliased since
340
349
  * "Active" already covers the intended meaning. */
350
+ /**
351
+ * Every `EventStatus`, not a subset. `paused` and `cancelled` were missing
352
+ * until 2026-08-24 — a real status with no chip is unreachable, and
353
+ * `audit-filter-tab-enums` never caught it because that audit only checks the
354
+ * reverse (that no chip names a DEAD value).
355
+ */
341
356
  export declare const ADMIN_EVENT_STATUS_TABS: readonly [{
342
357
  readonly id: "All";
343
358
  readonly label: "All";
@@ -347,9 +362,15 @@ export declare const ADMIN_EVENT_STATUS_TABS: readonly [{
347
362
  }, {
348
363
  readonly id: "active";
349
364
  readonly label: "Active";
365
+ }, {
366
+ readonly id: "paused";
367
+ readonly label: "Paused";
350
368
  }, {
351
369
  readonly id: "ended";
352
370
  readonly label: "Ended";
371
+ }, {
372
+ readonly id: "cancelled";
373
+ readonly label: "Cancelled";
353
374
  }];
354
375
  /** Admin > Scammers — scammer profile status filter chip set. */
355
376
  export declare const ADMIN_SCAMMER_STATUS_TABS: readonly [{
@@ -460,6 +481,9 @@ export declare const SELLER_PRODUCT_STATUS_TABS: readonly [{
460
481
  }, {
461
482
  readonly id: "archived";
462
483
  readonly label: "Archived";
484
+ }, {
485
+ readonly id: "in_review";
486
+ readonly label: "In Review";
463
487
  }];
464
488
  /** Seller > Auctions — auction-state filter chip set. Real `ProductStatus`
465
489
  * has no "active"/"ended"/"cancelled" values. "Active" fixed to
@@ -480,6 +504,12 @@ export declare const SELLER_AUCTION_STATUS_TABS: readonly [{
480
504
  }, {
481
505
  readonly id: "draft";
482
506
  readonly label: "Draft";
507
+ }, {
508
+ readonly id: "in_review";
509
+ readonly label: "In Review";
510
+ }, {
511
+ readonly id: "archived";
512
+ readonly label: "Archived";
483
513
  }];
484
514
  /** Seller > Pre-orders — pre-order-state filter chip set. Same root cause
485
515
  * and fix as SELLER_AUCTION_STATUS_TABS above — no "active"/"cancelled"
@@ -497,6 +527,9 @@ export declare const SELLER_PRE_ORDER_STATUS_TABS: readonly [{
497
527
  }, {
498
528
  readonly id: "archived";
499
529
  readonly label: "Archived";
530
+ }, {
531
+ readonly id: "in_review";
532
+ readonly label: "In Review";
500
533
  }];
501
534
  /** Seller > Prize Draws — draw-state filter chip set. Same root cause and
502
535
  * fix as SELLER_AUCTION_STATUS_TABS — "ended" is derived from
@@ -511,6 +544,12 @@ export declare const SELLER_PRIZE_DRAW_STATUS_TABS: readonly [{
511
544
  }, {
512
545
  readonly id: "draft";
513
546
  readonly label: "Draft";
547
+ }, {
548
+ readonly id: "in_review";
549
+ readonly label: "In Review";
550
+ }, {
551
+ readonly id: "archived";
552
+ readonly label: "Archived";
514
553
  }];
515
554
  /** Seller > Orders — order-state filter chip set. Subset of
516
555
  * `ADMIN_ORDER_STATUS_TABS` — sellers don't see `RETURN_REQUESTED` until
@@ -524,6 +563,9 @@ export declare const SELLER_ORDER_STATUS_TABS: readonly [{
524
563
  }, {
525
564
  readonly id: "pending";
526
565
  readonly label: "Pending";
566
+ }, {
567
+ readonly id: "confirmed";
568
+ readonly label: "Confirmed";
527
569
  }, {
528
570
  readonly id: "processing";
529
571
  readonly label: "Processing";
@@ -539,6 +581,44 @@ export declare const SELLER_ORDER_STATUS_TABS: readonly [{
539
581
  }, {
540
582
  readonly id: "refunded";
541
583
  readonly label: "Refunded";
584
+ }, {
585
+ readonly id: "return_requested";
586
+ readonly label: "Return Requested";
587
+ }, {
588
+ readonly id: "returned";
589
+ readonly label: "Returned";
590
+ }];
591
+ /**
592
+ * Admin > Offers — the FULL `OfferStatus` union, unlike the seller variant
593
+ * below, which deliberately surfaces only the four states a seller acts on.
594
+ * An admin is auditing the whole lifecycle, so `countered`, `withdrawn` and
595
+ * `paid` all need to be reachable. Cross-checked against the real union by
596
+ * `audit-filter-tab-enums`.
597
+ */
598
+ export declare const ADMIN_OFFER_STATUS_TABS: readonly [{
599
+ readonly id: "All";
600
+ readonly label: "All";
601
+ }, {
602
+ readonly id: "pending";
603
+ readonly label: "Pending";
604
+ }, {
605
+ readonly id: "countered";
606
+ readonly label: "Countered";
607
+ }, {
608
+ readonly id: "accepted";
609
+ readonly label: "Accepted";
610
+ }, {
611
+ readonly id: "paid";
612
+ readonly label: "Paid";
613
+ }, {
614
+ readonly id: "declined";
615
+ readonly label: "Declined";
616
+ }, {
617
+ readonly id: "expired";
618
+ readonly label: "Expired";
619
+ }, {
620
+ readonly id: "withdrawn";
621
+ readonly label: "Withdrawn";
542
622
  }];
543
623
  /** Seller > Offers — offer-state filter chip set. Real `OfferStatus` is
544
624
  * pending|accepted|declined|countered|expired|withdrawn|paid — there is no
@@ -560,6 +640,15 @@ export declare const SELLER_OFFER_STATUS_TABS: readonly [{
560
640
  }, {
561
641
  readonly id: "expired";
562
642
  readonly label: "Expired";
643
+ }, {
644
+ readonly id: "countered";
645
+ readonly label: "Countered";
646
+ }, {
647
+ readonly id: "withdrawn";
648
+ readonly label: "Withdrawn";
649
+ }, {
650
+ readonly id: "paid";
651
+ readonly label: "Paid";
563
652
  }];
564
653
  /** Seller > Bids — bid-state filter chip set. Uses the empty-sentinel
565
654
  * variant (see `EMPTY_TAB`). */
@@ -10,6 +10,14 @@
10
10
  * primitive and stay in sync when statuses are added.
11
11
  */
12
12
  export const ALL_TAB = { id: "All", label: "All" };
13
+ // COVERAGE (2026-08-24): `audit-filter-tab-enums` gained a check that every
14
+ // value of the backing enum HAS a chip, not just that every chip is a real
15
+ // value. It immediately found ten gaps across the seller sets — `in_review`
16
+ // (where a submission waits on admin approval, arguably the state a seller most
17
+ // wants to filter for), `archived`, `returned`, and the offer states
18
+ // `countered` / `withdrawn` / `paid`. Rows in those states were visible under
19
+ // "All" and isolatable by nothing. All ten now have chips; anything genuinely
20
+ // not worth a chip goes in that audit entry's `omit` list with a reason.
13
21
  /** Admin > Products — listing status filter chip set. Real `ProductStatus`
14
22
  * is draft|published|in_review|archived — "pending" fixed to "in_review"
15
23
  * (its real meaning); the previous id never matched any document. */
@@ -97,6 +105,7 @@ export const ADMIN_AUDIT_LOG_ACTION_TABS = [
97
105
  { id: "checkout_bypass", label: "Checkout bypass" },
98
106
  { id: "coupon_update", label: "Coupon update" },
99
107
  { id: "payout_mark_paid", label: "Payout paid" },
108
+ { id: "offer_cancel", label: "Offer cancelled" },
100
109
  { id: "store_status_change", label: "Store status" },
101
110
  { id: "user_role_change", label: "Role change" },
102
111
  ];
@@ -105,12 +114,17 @@ export const ADMIN_AUDIT_LOG_ACTION_TABS = [
105
114
  export const ADMIN_ORDER_STATUS_TABS = [
106
115
  ALL_TAB,
107
116
  { id: "pending", label: "Pending" },
117
+ // `confirmed` and `returned` were both missing until 2026-08-24 even though
118
+ // both are real `OrderStatusValues` an order reaches — so an admin could see
119
+ // such an order in the All tab and had no chip that would isolate it.
120
+ { id: "confirmed", label: "Confirmed" },
108
121
  { id: "processing", label: "Processing" },
109
122
  { id: "shipped", label: "Shipped" },
110
123
  { id: "delivered", label: "Delivered" },
111
124
  { id: "cancelled", label: "Cancelled" },
112
125
  { id: "refunded", label: "Refunded" },
113
126
  { id: "return_requested", label: "Return Requested" },
127
+ { id: "returned", label: "Returned" },
114
128
  ];
115
129
  /**
116
130
  * Admin > Orders — manual-payment (cash / UPI / EMI) review queue.
@@ -177,11 +191,19 @@ export const ADMIN_EVENT_ENTRY_STATUS_TABS = [
177
191
  * feature's own events/types/index.ts). A "Published" chip previously
178
192
  * returned zero rows every time — removed rather than aliased since
179
193
  * "Active" already covers the intended meaning. */
194
+ /**
195
+ * Every `EventStatus`, not a subset. `paused` and `cancelled` were missing
196
+ * until 2026-08-24 — a real status with no chip is unreachable, and
197
+ * `audit-filter-tab-enums` never caught it because that audit only checks the
198
+ * reverse (that no chip names a DEAD value).
199
+ */
180
200
  export const ADMIN_EVENT_STATUS_TABS = [
181
201
  ALL_TAB,
182
202
  { id: "draft", label: "Draft" },
183
203
  { id: "active", label: "Active" },
204
+ { id: "paused", label: "Paused" },
184
205
  { id: "ended", label: "Ended" },
206
+ { id: "cancelled", label: "Cancelled" },
185
207
  ];
186
208
  /** Admin > Scammers — scammer profile status filter chip set. */
187
209
  export const ADMIN_SCAMMER_STATUS_TABS = [
@@ -242,6 +264,7 @@ export const SELLER_PRODUCT_STATUS_TABS = [
242
264
  { id: "published", label: "Active" },
243
265
  { id: "draft", label: "Draft" },
244
266
  { id: "archived", label: "Archived" },
267
+ { id: "in_review", label: "In Review" },
245
268
  ];
246
269
  /** Seller > Auctions — auction-state filter chip set. Real `ProductStatus`
247
270
  * has no "active"/"ended"/"cancelled" values. "Active" fixed to
@@ -257,6 +280,8 @@ export const SELLER_AUCTION_STATUS_TABS = [
257
280
  ALL_TAB,
258
281
  { id: "published", label: "Active" },
259
282
  { id: "draft", label: "Draft" },
283
+ { id: "in_review", label: "In Review" },
284
+ { id: "archived", label: "Archived" },
260
285
  ];
261
286
  /** Seller > Pre-orders — pre-order-state filter chip set. Same root cause
262
287
  * and fix as SELLER_AUCTION_STATUS_TABS above — no "active"/"cancelled"
@@ -267,6 +292,7 @@ export const SELLER_PRE_ORDER_STATUS_TABS = [
267
292
  { id: "published", label: "Active" },
268
293
  { id: "draft", label: "Draft" },
269
294
  { id: "archived", label: "Archived" },
295
+ { id: "in_review", label: "In Review" },
270
296
  ];
271
297
  /** Seller > Prize Draws — draw-state filter chip set. Same root cause and
272
298
  * fix as SELLER_AUCTION_STATUS_TABS — "ended" is derived from
@@ -276,6 +302,8 @@ export const SELLER_PRIZE_DRAW_STATUS_TABS = [
276
302
  ALL_TAB,
277
303
  { id: "published", label: "Active" },
278
304
  { id: "draft", label: "Draft" },
305
+ { id: "in_review", label: "In Review" },
306
+ { id: "archived", label: "Archived" },
279
307
  ];
280
308
  /** Seller > Orders — order-state filter chip set. Subset of
281
309
  * `ADMIN_ORDER_STATUS_TABS` — sellers don't see `RETURN_REQUESTED` until
@@ -286,11 +314,36 @@ export const SELLER_PRIZE_DRAW_STATUS_TABS = [
286
314
  export const SELLER_ORDER_STATUS_TABS = [
287
315
  ALL_TAB,
288
316
  { id: "pending", label: "Pending" },
317
+ // `confirmed` is settable from SellerOrdersView's own Update-Status dropdown
318
+ // but had no chip here, so a seller could move an order into a state they
319
+ // could then never filter for. `return_requested` was excluded on the theory
320
+ // that sellers never see one — they do, it is the state a buyer's return
321
+ // request lands in and the seller is the one who has to act on it.
322
+ { id: "confirmed", label: "Confirmed" },
289
323
  { id: "processing", label: "Processing" },
290
324
  { id: "shipped", label: "Shipped" },
291
325
  { id: "delivered", label: "Delivered" },
292
326
  { id: "cancelled", label: "Cancelled" },
293
327
  { id: "refunded", label: "Refunded" },
328
+ { id: "return_requested", label: "Return Requested" },
329
+ { id: "returned", label: "Returned" },
330
+ ];
331
+ /**
332
+ * Admin > Offers — the FULL `OfferStatus` union, unlike the seller variant
333
+ * below, which deliberately surfaces only the four states a seller acts on.
334
+ * An admin is auditing the whole lifecycle, so `countered`, `withdrawn` and
335
+ * `paid` all need to be reachable. Cross-checked against the real union by
336
+ * `audit-filter-tab-enums`.
337
+ */
338
+ export const ADMIN_OFFER_STATUS_TABS = [
339
+ ALL_TAB,
340
+ { id: "pending", label: "Pending" },
341
+ { id: "countered", label: "Countered" },
342
+ { id: "accepted", label: "Accepted" },
343
+ { id: "paid", label: "Paid" },
344
+ { id: "declined", label: "Declined" },
345
+ { id: "expired", label: "Expired" },
346
+ { id: "withdrawn", label: "Withdrawn" },
294
347
  ];
295
348
  /** Seller > Offers — offer-state filter chip set. Real `OfferStatus` is
296
349
  * pending|accepted|declined|countered|expired|withdrawn|paid — there is no
@@ -303,6 +356,9 @@ export const SELLER_OFFER_STATUS_TABS = [
303
356
  { id: "accepted", label: "Accepted" },
304
357
  { id: "declined", label: "Rejected" },
305
358
  { id: "expired", label: "Expired" },
359
+ { id: "countered", label: "Countered" },
360
+ { id: "withdrawn", label: "Withdrawn" },
361
+ { id: "paid", label: "Paid" },
306
362
  ];
307
363
  /** Seller > Bids — bid-state filter chip set. Uses the empty-sentinel
308
364
  * variant (see `EMPTY_TAB`). */
@@ -275,15 +275,82 @@ export interface SiteSettingsTheme {
275
275
  /** Theme id applied when the user's resolved mode is `"dark"`. */
276
276
  defaultDarkThemeId?: string;
277
277
  }
278
+ /** Third-party analytics/tag IDs. Public by nature — they ship in page markup. */
279
+ export interface SiteSettingsIntegrations {
280
+ googleAnalyticsId?: string;
281
+ facebookPixelId?: string;
282
+ gtmContainerId?: string;
283
+ }
284
+ /** Admin-tunable platform caps. Enforced server-side; not buyer-facing. */
285
+ export interface SiteSettingsPlatformLimits {
286
+ maxProductsPerStore?: number;
287
+ maxImagesPerProduct?: number;
288
+ maxVideoSizeMb?: number;
289
+ maxCustomFieldsPerProduct?: number;
290
+ maxCustomSectionsPerProduct?: number;
291
+ orderCancellationWindowHours?: number;
292
+ }
293
+ /** Embedded in siteSettings.adSettings — a type alias, not a collection root. */
294
+ export type SiteSettingsAdPlacement = {
295
+ id: string;
296
+ label: string;
297
+ enabled: boolean;
298
+ reservedHeight: number;
299
+ };
300
+ /** Embedded in siteSettings.adSettings — a type alias, not a collection root. */
301
+ export type SiteSettingsAdInventoryItem = {
302
+ id: string;
303
+ name: string;
304
+ provider: "manual" | "adsense" | "thirdParty";
305
+ status: "draft" | "active" | "scheduled" | "paused";
306
+ placementIds: string[];
307
+ requiresConsent: boolean;
308
+ priority: number;
309
+ startAt?: string;
310
+ endAt?: string;
311
+ createdAt: string;
312
+ updatedAt: string;
313
+ updatedBy: string;
314
+ creative: {
315
+ title?: string;
316
+ body?: string;
317
+ imageUrl?: string;
318
+ ctaLabel?: string;
319
+ ctaHref?: string;
320
+ adsenseSlot?: string;
321
+ thirdPartyUrl?: string;
322
+ };
323
+ };
324
+ /**
325
+ * Ad inventory + provider config.
326
+ *
327
+ * `providerCredentials` is masked by `GET /api/admin/ads` and must never be
328
+ * returned by a public endpoint; `inventory` holds draft/paused/scheduled
329
+ * entries that `GET /api/ads` deliberately filters out. Both are therefore in
330
+ * `PRIVATE_SITE_SETTINGS_FIELDS` — the whole group is server-side only.
331
+ */
332
+ export interface SiteSettingsAdSettings {
333
+ consentRequired: boolean;
334
+ placements: readonly SiteSettingsAdPlacement[];
335
+ providerCredentials: {
336
+ adsenseClientId: string;
337
+ thirdPartyScriptUrl: string;
338
+ };
339
+ inventory: SiteSettingsAdInventoryItem[];
340
+ }
278
341
  export interface SiteSettingsDocument extends BaseDocument {
279
342
  id: "global";
280
343
  siteName: string;
344
+ /** Short strapline shown beside the site name in admin chrome. */
345
+ tagline?: string;
281
346
  motto: string;
282
347
  logo: {
283
348
  url: string;
284
349
  alt: string;
285
350
  format: "svg" | "png";
286
351
  };
352
+ /** Favicon URL. Distinct from `logo.url`, which is the wordmark. */
353
+ favicon?: string;
287
354
  background: {
288
355
  light: {
289
356
  type: "color" | "gradient" | "image" | "video";
@@ -452,6 +519,19 @@ export interface SiteSettingsDocument extends BaseDocument {
452
519
  notifications: boolean;
453
520
  sellerRegistration: boolean;
454
521
  preOrders: boolean;
522
+ /**
523
+ * Buyer price negotiation (Make an Offer / counter-offer).
524
+ *
525
+ * The global kill switch. Per-listing opt-in still applies on top of it via
526
+ * `ProductDocument.allowOffers`, and only certain listing types support
527
+ * offers at all (`LISTING_TYPE_CAPABILITIES.canMakeOffer`) — a product needs
528
+ * all three to show the CTA.
529
+ *
530
+ * Guards NEW offers only. Switching it off must not strand in-flight ones:
531
+ * sellers keep responding, buyers keep checking out accepted offers, and
532
+ * both dashboards stay reachable.
533
+ */
534
+ offers: boolean;
455
535
  /** When true, admin users see a bypass button in checkout that skips OTP and payment. Server-enforced. */
456
536
  adminCheckoutBypass?: boolean;
457
537
  listingTypes?: {
@@ -471,11 +551,26 @@ export interface SiteSettingsDocument extends BaseDocument {
471
551
  bundle?: boolean;
472
552
  };
473
553
  };
554
+ /**
555
+ * Admin-authored HTML overrides for the public policy pages. When a key holds
556
+ * a non-empty string, `PolicyPageView` renders it instead of the i18n
557
+ * `sections[]` fallback for that page.
558
+ *
559
+ * These key names are load-bearing — they must match `POLICY_META[*].firestoreField`
560
+ * in `features/about/components/PolicyPageView.tsx` (read side) and the
561
+ * `legalPages` payload built by `AdminSiteSettingsView` (write side). Until
562
+ * 2026-08-24 this type declared `termsOfService`/`privacyPolicy`/`shippingPolicy`,
563
+ * three names that neither side ever used; the read path went through an
564
+ * `as any` cast, so `tsc` never caught the drift (Root Cause #38 family).
565
+ */
474
566
  legalPages: {
475
- termsOfService: string;
476
- privacyPolicy: string;
567
+ terms: string;
568
+ privacy: string;
569
+ cookies: string;
477
570
  refundPolicy: string;
478
- shippingPolicy: string;
571
+ shipping: string;
572
+ ethics: string;
573
+ codeOfConduct: string;
479
574
  };
480
575
  shipping: {
481
576
  estimatedDays: number;
@@ -508,9 +603,21 @@ export interface SiteSettingsDocument extends BaseDocument {
508
603
  };
509
604
  newsletterEnabled?: boolean;
510
605
  };
606
+ /**
607
+ * `message` is canonical — it is what `AnnouncementBar` and the homepage
608
+ * read. `AdminSiteSettingsView` used to write the text under a `text` key
609
+ * instead, so anything typed in the main Site Settings editor was saved and
610
+ * never displayed; `link`/`backgroundColor` were collected and had no
611
+ * renderer at all. Unified on `message` 2026-08-24 (migration
612
+ * `scripts/migrate-settings-wiring.mjs` copies any stray `text` across).
613
+ */
511
614
  announcementBar?: {
512
615
  enabled: boolean;
513
616
  message: string;
617
+ /** Optional destination — renders the message as a link. */
618
+ link?: string;
619
+ /** Optional CSS colour override for the bar background. */
620
+ backgroundColor?: string;
514
621
  };
515
622
  /**
516
623
  * Image watermark configuration applied by the `/api/media/[...slug]` CDN
@@ -544,6 +651,18 @@ export interface SiteSettingsDocument extends BaseDocument {
544
651
  };
545
652
  /** Encrypted provider credentials � never return raw to the client. */
546
653
  credentials?: SiteSettingsCredentials;
654
+ /**
655
+ * These three were written by `AdminSiteSettingsView.buildFullPayload()` and
656
+ * read back by it, but were never declared here. Being absent from the type
657
+ * meant no type-driven check could see them — and the public site-settings
658
+ * deny-list, which strips named fields off a spread, shipped all three to
659
+ * anonymous callers by default (`adSettings.providerCredentials` unmasked,
660
+ * plus every draft/paused ad). Declared 2026-08-24 so they are visible to
661
+ * `audit-public-projection-parity`.
662
+ */
663
+ integrations?: SiteSettingsIntegrations;
664
+ platformLimits?: SiteSettingsPlatformLimits;
665
+ adSettings?: SiteSettingsAdSettings;
547
666
  /**
548
667
  * Theme color overrides — injected as CSS custom properties by LayoutShellClient.
549
668
  * Keys map to --appkit-color-* variables (e.g. primary → --appkit-color-primary).
@@ -241,6 +241,7 @@ export const DEFAULT_SITE_SETTINGS_DATA = {
241
241
  notifications: true,
242
242
  sellerRegistration: true,
243
243
  preOrders: true,
244
+ offers: true,
244
245
  // W1-37 2026-05-23 — Phase 2 listing types enabled by default; all per-type
245
246
  // surfaces (seller + admin via W1-29 + public) are now shipped.
246
247
  listingTypes: {
@@ -0,0 +1,22 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * 🛑 `annotate()` must be the OUTERMOST call on each field — it keys a WeakMap
4
+ * by schema instance and every zod wrapper returns a new one.
5
+ */
6
+ export declare const homepageSectionFormSchema: z.ZodObject<{
7
+ sectionType: z.ZodString;
8
+ order: z.ZodOptional<z.ZodNumber>;
9
+ enabled: z.ZodBoolean;
10
+ configJson: z.ZodEffects<z.ZodString, string, string>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ enabled: boolean;
13
+ sectionType: string;
14
+ configJson: string;
15
+ order?: number | undefined;
16
+ }, {
17
+ enabled: boolean;
18
+ sectionType: string;
19
+ configJson: string;
20
+ order?: number | undefined;
21
+ }>;
22
+ export type HomepageSectionFormValues = z.infer<typeof homepageSectionFormSchema>;
@@ -0,0 +1,68 @@
1
+ /*
2
+ * WHY: `AdminSectionsView` rendered a `<Form>` with no `schema` prop. The route
3
+ * validated `order` / `enabled` / `config`, so nothing invalid was ever
4
+ * stored — but a bad value came back as a 400 banner after a round-trip
5
+ * rather than as an error on the field that caused it.
6
+ * WHAT: The homepage-section form schema.
7
+ *
8
+ * ## `config` stays open, deliberately
9
+ *
10
+ * Its shape differs per section type across 21 types, and the route models it
11
+ * the same way (`z.object({}).passthrough()`). Naming a fixed shape here would
12
+ * strip whatever the current type actually needs — the exact defect that made
13
+ * `productBaseSchema` eat every per-type listing field. The form parses it as
14
+ * JSON and reports malformed input; the per-type meaning stays with the
15
+ * section renderer that owns it.
16
+ *
17
+ * EXPORTS:
18
+ * homepageSectionFormSchema, type HomepageSectionFormValues
19
+ *
20
+ * @tag domain:admin,homepage
21
+ * @tag layer:schema
22
+ * @tag pattern:none
23
+ * @tag access:isomorphic
24
+ * @tag consumers:AdminSectionsView
25
+ * @tag sideEffects:none
26
+ */
27
+ import { z } from "zod";
28
+ import { annotate } from "../../shell/field-ui-meta";
29
+ import { normalizeError } from "../../../errors/normalize";
30
+ /**
31
+ * 🛑 `annotate()` must be the OUTERMOST call on each field — it keys a WeakMap
32
+ * by schema instance and every zod wrapper returns a new one.
33
+ */
34
+ export const homepageSectionFormSchema = z.object({
35
+ sectionType: annotate(z.string().min(1, "Choose a section type."), {
36
+ section: "basics", sectionLabel: "Section", sectionRequired: true,
37
+ quick: true, order: 1, row: "pair",
38
+ }),
39
+ order: annotate(z.coerce
40
+ .number({ invalid_type_error: "Order must be a number." })
41
+ .int("Order must be a whole number.")
42
+ .min(0, "Order cannot be negative.")
43
+ .optional(), { section: "basics", order: 2, row: "pair" }),
44
+ enabled: annotate(z.boolean(), {
45
+ section: "basics", order: 3, row: "quarter",
46
+ }),
47
+ configJson: annotate(z.string().refine(isParsableJson, { message: "Config must be valid JSON." }), {
48
+ section: "config", sectionLabel: "Configuration",
49
+ order: 1, row: "full", kind: "list",
50
+ }),
51
+ });
52
+ /** Hoisted so the `annotate()` call above stays a simple two-argument call. */
53
+ function isParsableJson(value) {
54
+ if (!value.trim())
55
+ return true;
56
+ try {
57
+ JSON.parse(value);
58
+ return true;
59
+ }
60
+ catch (_err) {
61
+ // Normalized rather than suppressed. The parse failure IS the return value
62
+ // here — `false` answers the only question this asks — but the project
63
+ // forbids adding new suppression markers, and this is the same shape
64
+ // AdminSectionsView already uses for the very same JSON parse.
65
+ void normalizeError(_err);
66
+ return false;
67
+ }
68
+ }