@mohasinac/appkit 4.13.1 → 4.14.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 (377) 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 +6 -0
  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/checkout/actions.js +6 -0
  17. package/dist/_internal/server/features/checkout/locked-lines.d.ts +38 -0
  18. package/dist/_internal/server/features/checkout/locked-lines.js +171 -0
  19. package/dist/_internal/server/features/homepage/index.d.ts +0 -1
  20. package/dist/_internal/server/features/homepage/index.js +7 -1
  21. package/dist/_internal/server/features/lottery/adapters.js +4 -0
  22. package/dist/_internal/server/features/products/data.js +15 -37
  23. package/dist/_internal/server/features/products/index.d.ts +1 -1
  24. package/dist/_internal/server/features/products/index.js +1 -1
  25. package/dist/_internal/server/features/products/list-public.d.ts +46 -20
  26. package/dist/_internal/server/features/products/list-public.js +266 -90
  27. package/dist/_internal/server/features/products/listing-tab-counts.d.ts +44 -0
  28. package/dist/_internal/server/features/products/listing-tab-counts.js +97 -0
  29. package/dist/_internal/server/features/site-settings/adapters.d.ts +51 -0
  30. package/dist/_internal/server/features/site-settings/adapters.js +75 -0
  31. package/dist/_internal/server/features/site-settings/index.d.ts +1 -0
  32. package/dist/_internal/server/features/site-settings/index.js +1 -0
  33. package/dist/_internal/server/features/stores/adapters.d.ts +56 -0
  34. package/dist/_internal/server/features/stores/adapters.js +91 -0
  35. package/dist/_internal/server/features/stores/index.d.ts +1 -0
  36. package/dist/_internal/server/features/stores/index.js +1 -0
  37. package/dist/_internal/server/jobs/core/auctionSettlement.js +56 -2
  38. package/dist/_internal/server/jobs/core/offerExpiry.js +45 -9
  39. package/dist/_internal/server/jobs/core/paymentReviewAutoApprove.d.ts +5 -0
  40. package/dist/_internal/server/jobs/core/paymentReviewAutoApprove.js +33 -1
  41. package/dist/_internal/server/jobs/handlers/messages.d.ts +7 -0
  42. package/dist/_internal/server/jobs/handlers/messages.js +10 -0
  43. package/dist/_internal/shared/actions/action-registry.js +15 -1
  44. package/dist/_internal/shared/checkout/lanes.d.ts +25 -0
  45. package/dist/_internal/shared/checkout/lanes.js +26 -0
  46. package/dist/_internal/shared/features/auctions/config.d.ts +27 -0
  47. package/dist/_internal/shared/features/auctions/config.js +27 -0
  48. package/dist/_internal/shared/features/blog/schema.d.ts +2 -2
  49. package/dist/_internal/shared/features/cart/schema.d.ts +12 -12
  50. package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +32 -32
  51. package/dist/_internal/shared/features/emi/schedule.d.ts +24 -3
  52. package/dist/_internal/shared/features/emi/schedule.js +20 -5
  53. package/dist/_internal/shared/features/events/schema.d.ts +2 -2
  54. package/dist/_internal/shared/features/homepage/section-gate.d.ts +14 -0
  55. package/dist/_internal/shared/features/homepage/section-gate.js +51 -0
  56. package/dist/_internal/shared/features/offers/config.d.ts +30 -0
  57. package/dist/_internal/shared/features/offers/config.js +59 -0
  58. package/dist/_internal/shared/features/orders/schema.d.ts +8 -8
  59. package/dist/_internal/shared/features/products/schema.d.ts +32 -32
  60. package/dist/_internal/shared/features/products/to-product-item.js +6 -0
  61. package/dist/_internal/shared/features/reviews/schema.d.ts +2 -2
  62. package/dist/_internal/shared/features/site-settings/fees.d.ts +60 -0
  63. package/dist/_internal/shared/features/site-settings/fees.js +39 -0
  64. package/dist/_internal/shared/features/site-settings/types.d.ts +40 -0
  65. package/dist/_internal/shared/features/site-settings/types.js +1 -0
  66. package/dist/_internal/shared/history/history.d.ts +66 -0
  67. package/dist/_internal/shared/history/history.js +158 -0
  68. package/dist/_internal/shared/history/index.d.ts +4 -0
  69. package/dist/_internal/shared/history/index.js +2 -0
  70. package/dist/_internal/shared/history/types.d.ts +61 -0
  71. package/dist/_internal/shared/history/types.js +6 -0
  72. package/dist/_internal/shared/listing-types/_registry.d.ts +54 -1
  73. package/dist/_internal/shared/listing-types/_registry.js +67 -0
  74. package/dist/_internal/shared/listing-types/art/config.d.ts +3 -0
  75. package/dist/_internal/shared/listing-types/art/config.js +5 -0
  76. package/dist/_internal/shared/listing-types/auction/config.d.ts +13 -0
  77. package/dist/_internal/shared/listing-types/auction/config.js +21 -0
  78. package/dist/_internal/shared/listing-types/availability.d.ts +79 -0
  79. package/dist/_internal/shared/listing-types/availability.js +104 -0
  80. package/dist/_internal/shared/listing-types/capabilities.d.ts +15 -0
  81. package/dist/_internal/shared/listing-types/capabilities.js +12 -0
  82. package/dist/_internal/shared/listing-types/classified/config.d.ts +3 -0
  83. package/dist/_internal/shared/listing-types/classified/config.js +5 -0
  84. package/dist/_internal/shared/listing-types/digital-code/config.d.ts +11 -0
  85. package/dist/_internal/shared/listing-types/digital-code/config.js +22 -2
  86. package/dist/_internal/shared/listing-types/live/config.d.ts +3 -0
  87. package/dist/_internal/shared/listing-types/live/config.js +5 -0
  88. package/dist/_internal/shared/listing-types/pre-order/config.d.ts +3 -0
  89. package/dist/_internal/shared/listing-types/pre-order/config.js +19 -0
  90. package/dist/_internal/shared/listing-types/prize-draw/config.d.ts +11 -0
  91. package/dist/_internal/shared/listing-types/prize-draw/config.js +15 -0
  92. package/dist/_internal/shared/listing-types/standard/config.d.ts +3 -0
  93. package/dist/_internal/shared/listing-types/standard/config.js +5 -0
  94. package/dist/_internal/shared/listing-types/stickers/config.d.ts +3 -0
  95. package/dist/_internal/shared/listing-types/stickers/config.js +5 -0
  96. package/dist/client.d.ts +7 -5
  97. package/dist/client.js +2 -2
  98. package/dist/constants/api-endpoints.d.ts +6 -0
  99. package/dist/constants/api-endpoints.js +2 -0
  100. package/dist/constants/field-names.d.ts +49 -2
  101. package/dist/constants/field-names.js +53 -2
  102. package/dist/constants/table-keys.d.ts +17 -0
  103. package/dist/constants/table-keys.js +17 -0
  104. package/dist/errors/error-codes.d.ts +13 -1
  105. package/dist/errors/error-codes.js +13 -1
  106. package/dist/errors/error-display-map.js +12 -3
  107. package/dist/errors/messages.d.ts +10 -2
  108. package/dist/errors/messages.js +10 -2
  109. package/dist/features/about/components/AboutView.d.ts +3 -0
  110. package/dist/features/about/components/AboutView.js +3 -2
  111. package/dist/features/about/components/PolicyPageView.d.ts +2 -1
  112. package/dist/features/about/components/PolicyPageView.js +61 -23
  113. package/dist/features/about/components/PublicProfileView.js +5 -0
  114. package/dist/features/about/schemas/firestore.d.ts +3 -0
  115. package/dist/features/account/components/UserOrdersView.js +7 -0
  116. package/dist/features/account/components/index.d.ts +0 -2
  117. package/dist/features/account/components/index.js +0 -1
  118. package/dist/features/account/schemas/index.d.ts +2 -2
  119. package/dist/features/account/types/index.d.ts +21 -2
  120. package/dist/features/addresses/schemas/index.d.ts +4 -4
  121. package/dist/features/admin/components/AdminArtView.js +8 -3
  122. package/dist/features/admin/components/AdminClassifiedView.js +8 -3
  123. package/dist/features/admin/components/AdminDigitalCodesView.js +8 -3
  124. package/dist/features/admin/components/AdminFeatureFlagsView.js +1 -0
  125. package/dist/features/admin/components/AdminLiveView.js +8 -3
  126. package/dist/features/admin/components/AdminOffersView.d.ts +4 -0
  127. package/dist/features/admin/components/AdminOffersView.js +186 -0
  128. package/dist/features/admin/components/AdminOrdersView.js +10 -1
  129. package/dist/features/admin/components/AdminPrizeDrawsView.js +5 -0
  130. package/dist/features/admin/components/AdminProductsView.js +16 -29
  131. package/dist/features/admin/components/AdminSiteSettingsView.js +31 -13
  132. package/dist/features/admin/components/AdminSiteView.js +6 -2
  133. package/dist/features/admin/components/AdminStickersView.js +8 -3
  134. package/dist/features/admin/components/index.d.ts +2 -0
  135. package/dist/features/admin/components/index.js +1 -0
  136. package/dist/features/admin/constants/filter-tabs.d.ts +86 -0
  137. package/dist/features/admin/constants/filter-tabs.js +55 -0
  138. package/dist/features/admin/schemas/firestore.d.ts +122 -3
  139. package/dist/features/admin/schemas/firestore.js +1 -0
  140. package/dist/features/auctions/actions/bid-actions.d.ts +20 -5
  141. package/dist/features/auctions/actions/bid-actions.js +93 -20
  142. package/dist/features/auctions/components/AuctionDetailPageView.js +11 -6
  143. package/dist/features/auctions/components/AuctionsListView.js +5 -6
  144. package/dist/features/auctions/components/MarketplaceAuctionCard.d.ts +7 -0
  145. package/dist/features/auctions/components/MarketplaceAuctionCard.js +19 -2
  146. package/dist/features/auctions/components/PlaceBidFormClient.d.ts +1 -2
  147. package/dist/features/auctions/components/PlaceBidFormClient.js +8 -4
  148. package/dist/features/auctions/repository/bid.repository.d.ts +13 -0
  149. package/dist/features/auctions/repository/bid.repository.js +23 -0
  150. package/dist/features/auctions/schemas/firestore.d.ts +17 -0
  151. package/dist/features/auctions/schemas/index.d.ts +12 -12
  152. package/dist/features/auth/permissions/constants.d.ts +1 -1
  153. package/dist/features/auth/permissions/constants.js +10 -1
  154. package/dist/features/blog/actions/blog-actions.d.ts +7 -7
  155. package/dist/features/blog/schemas/index.d.ts +6 -6
  156. package/dist/features/cart/repository/cart.repository.js +1 -0
  157. package/dist/features/cart/schemas/firestore.d.ts +15 -0
  158. package/dist/features/catalogue/schemas/validation.d.ts +4 -4
  159. package/dist/features/categories/components/BrandDetailPageView.js +23 -40
  160. package/dist/features/categories/components/BrandDetailTabs.d.ts +7 -7
  161. package/dist/features/categories/components/BrandDetailTabs.js +8 -12
  162. package/dist/features/categories/components/BundleCollage.js +1 -1
  163. package/dist/features/categories/components/CategoryDetailPageView.js +53 -57
  164. package/dist/features/categories/components/CategoryDetailTabs.d.ts +10 -8
  165. package/dist/features/categories/components/CategoryDetailTabs.js +11 -16
  166. package/dist/features/categories/components/CategoryProductsListing.js +11 -1
  167. package/dist/features/categories/components/ConcernCard.js +7 -1
  168. package/dist/features/categories/schemas/firestore.d.ts +13 -0
  169. package/dist/features/categories/schemas/index.d.ts +26 -26
  170. package/dist/features/classified/components/ClassifiedDetailPageView.d.ts +16 -1
  171. package/dist/features/classified/components/ClassifiedDetailPageView.js +23 -3
  172. package/dist/features/events/components/AdminEventsView.js +15 -11
  173. package/dist/features/events/components/EventFilters.d.ts +9 -1
  174. package/dist/features/events/components/EventFilters.js +45 -21
  175. package/dist/features/events/components/EventsIndexListing.d.ts +6 -1
  176. package/dist/features/events/components/EventsIndexListing.js +2 -2
  177. package/dist/features/events/components/EventsListPageView.js +13 -4
  178. package/dist/features/events/repository/events.repository.d.ts +17 -0
  179. package/dist/features/events/repository/events.repository.js +27 -0
  180. package/dist/features/events/schemas/firestore.d.ts +12 -0
  181. package/dist/features/events/schemas/firestore.js +12 -0
  182. package/dist/features/events/schemas/index.d.ts +50 -50
  183. package/dist/features/events/types/index.d.ts +11 -0
  184. package/dist/features/events/types/index.js +57 -1
  185. package/dist/features/faq/actions/faq-actions.d.ts +12 -12
  186. package/dist/features/faq/schemas/index.d.ts +8 -8
  187. package/dist/features/filters/FilterFacetSection.d.ts +7 -1
  188. package/dist/features/filters/FilterFacetSection.js +11 -3
  189. package/dist/features/grouped/schemas/index.d.ts +4 -4
  190. package/dist/features/homepage/components/AnnouncementBar.d.ts +7 -1
  191. package/dist/features/homepage/components/AnnouncementBar.js +3 -3
  192. package/dist/features/homepage/components/MarketplaceHomepageView.js +20 -6
  193. package/dist/features/homepage/hooks/homepage-query.d.ts +16 -0
  194. package/dist/features/homepage/hooks/homepage-query.js +45 -0
  195. package/dist/features/homepage/hooks/useFeaturedAuctions.d.ts +10 -0
  196. package/dist/features/homepage/hooks/useFeaturedAuctions.js +28 -8
  197. package/dist/features/homepage/hooks/useFeaturedPreOrders.js +17 -8
  198. package/dist/features/homepage/hooks/useFeaturedProducts.js +15 -8
  199. package/dist/features/homepage/schemas/index.d.ts +2 -2
  200. package/dist/features/layout/AppLayoutShell.d.ts +11 -1
  201. package/dist/features/layout/AppLayoutShell.js +15 -14
  202. package/dist/features/layout/BackToTop.d.ts +9 -0
  203. package/dist/features/layout/BackToTop.js +10 -1
  204. package/dist/features/layout/BottomActions.js +28 -25
  205. package/dist/features/layout/BottomChrome.d.ts +34 -0
  206. package/dist/features/layout/BottomChrome.js +55 -0
  207. package/dist/features/layout/BottomNavLayout.d.ts +6 -0
  208. package/dist/features/layout/BottomNavLayout.js +7 -1
  209. package/dist/features/layout/BottomNavbar.js +15 -2
  210. package/dist/features/layout/FooterLayout.js +11 -1
  211. package/dist/features/layout/NavbarLayout.js +1 -1
  212. package/dist/features/layout/TitleBarLayout.d.ts +7 -0
  213. package/dist/features/layout/TitleBarLayout.js +28 -5
  214. package/dist/features/layout/index.d.ts +2 -0
  215. package/dist/features/layout/index.js +1 -0
  216. package/dist/features/lottery/types/index.d.ts +3 -0
  217. package/dist/features/media/MediaPickerModal.js +5 -1
  218. package/dist/features/messages/schemas/index.d.ts +2 -2
  219. package/dist/features/orders/components/OrderScopeTabs.d.ts +20 -0
  220. package/dist/features/orders/components/OrderScopeTabs.js +31 -0
  221. package/dist/features/orders/constants/order-scope.d.ts +48 -0
  222. package/dist/features/orders/constants/order-scope.js +111 -0
  223. package/dist/features/orders/repository/orders.repository.d.ts +54 -7
  224. package/dist/features/orders/repository/orders.repository.js +116 -22
  225. package/dist/features/orders/schemas/firestore.d.ts +117 -0
  226. package/dist/features/orders/schemas/firestore.js +30 -0
  227. package/dist/features/orders/schemas/index.d.ts +18 -18
  228. package/dist/features/pre-orders/components/PreOrdersIndexListing.js +14 -9
  229. package/dist/features/pre-orders/components/PreOrdersListView.js +6 -5
  230. package/dist/features/pre-orders/schemas/index.d.ts +1 -1
  231. package/dist/features/products/actions/product-actions.d.ts +14 -0
  232. package/dist/features/products/actions/product-actions.js +49 -11
  233. package/dist/features/products/api/route.d.ts +12 -0
  234. package/dist/features/products/api/route.js +42 -100
  235. package/dist/features/products/components/ArtStickersListView.js +2 -2
  236. package/dist/features/products/components/AuctionsIndexListing.js +13 -11
  237. package/dist/features/products/components/AvailabilityTabs.d.ts +11 -0
  238. package/dist/features/products/components/AvailabilityTabs.js +47 -0
  239. package/dist/features/products/components/MakeOfferButton.js +48 -49
  240. package/dist/features/products/components/PrizeDrawCollage.d.ts +20 -4
  241. package/dist/features/products/components/PrizeDrawCollage.js +9 -1
  242. package/dist/features/products/components/PrizeDrawsIndexListing.js +14 -12
  243. package/dist/features/products/components/PrizeDrawsListingView.js +2 -2
  244. package/dist/features/products/components/PrizeDrawsSection.d.ts +7 -1
  245. package/dist/features/products/components/PrizeDrawsSection.js +23 -18
  246. package/dist/features/products/components/ProductDetailPageView.d.ts +4 -1
  247. package/dist/features/products/components/ProductDetailPageView.js +18 -4
  248. package/dist/features/products/components/ProductForm.js +5 -2
  249. package/dist/features/products/components/ProductGrid.js +6 -1
  250. package/dist/features/products/components/ProductsIndexListing.js +22 -32
  251. package/dist/features/products/components/ProductsIndexPageView.js +6 -9
  252. package/dist/features/products/components/index.d.ts +2 -2
  253. package/dist/features/products/components/index.js +1 -1
  254. package/dist/features/products/config/listing-type-listing-config.d.ts +20 -0
  255. package/dist/features/products/config/listing-type-listing-config.js +22 -10
  256. package/dist/features/products/constants/action-defs.d.ts +2 -0
  257. package/dist/features/products/constants/action-defs.js +6 -0
  258. package/dist/features/products/hooks/useAvailabilityScope.d.ts +13 -0
  259. package/dist/features/products/hooks/useAvailabilityScope.js +19 -0
  260. package/dist/features/products/hooks/useProducts.d.ts +5 -0
  261. package/dist/features/products/hooks/useProducts.js +13 -2
  262. package/dist/features/products/repository/products.repository.d.ts +31 -2
  263. package/dist/features/products/repository/products.repository.js +53 -21
  264. package/dist/features/products/schemas/firestore.d.ts +17 -3
  265. package/dist/features/products/schemas/firestore.js +7 -2
  266. package/dist/features/products/schemas/index.d.ts +66 -66
  267. package/dist/features/products/schemas/product-features.validators.d.ts +6 -6
  268. package/dist/features/products/types/index.d.ts +16 -1
  269. package/dist/features/promotions/schemas/index.d.ts +2 -2
  270. package/dist/features/reviews/schemas/index.d.ts +16 -16
  271. package/dist/features/search/schemas/index.d.ts +4 -4
  272. package/dist/features/seller/actions/offer-actions.js +25 -2
  273. package/dist/features/seller/components/SellerArtView.js +5 -0
  274. package/dist/features/seller/components/SellerAuctionsView.js +13 -15
  275. package/dist/features/seller/components/SellerClassifiedView.js +5 -0
  276. package/dist/features/seller/components/SellerDigitalCodesView.js +5 -0
  277. package/dist/features/seller/components/SellerLiveView.js +5 -0
  278. package/dist/features/seller/components/SellerOrdersView.js +31 -9
  279. package/dist/features/seller/components/SellerPayoutSettingsView.js +19 -18
  280. package/dist/features/seller/components/SellerPreOrdersView.js +5 -0
  281. package/dist/features/seller/components/SellerPrizeDrawsView.js +14 -16
  282. package/dist/features/seller/components/SellerProductShell.js +7 -1
  283. package/dist/features/seller/components/SellerProductsView.js +11 -8
  284. package/dist/features/seller/components/SellerStickersView.js +5 -0
  285. package/dist/features/seller/components/index.d.ts +0 -2
  286. package/dist/features/seller/components/index.js +0 -1
  287. package/dist/features/seller/repository/offer.repository.d.ts +73 -16
  288. package/dist/features/seller/repository/offer.repository.js +38 -3
  289. package/dist/features/seller/schemas/index.d.ts +2 -2
  290. package/dist/features/seller/schemas/offer-forms.d.ts +25 -0
  291. package/dist/features/seller/schemas/offer-forms.js +21 -0
  292. package/dist/features/seller/server.d.ts +0 -1
  293. package/dist/features/seller/server.js +0 -1
  294. package/dist/features/shell/SectionForm.d.ts +99 -0
  295. package/dist/features/shell/SectionForm.js +128 -0
  296. package/dist/features/shell/entity-form.d.ts +109 -0
  297. package/dist/features/shell/entity-form.js +96 -0
  298. package/dist/features/shell/index.d.ts +4 -0
  299. package/dist/features/shell/index.js +2 -0
  300. package/dist/features/stores/api/[storeSlug]/route.js +2 -25
  301. package/dist/features/stores/components/StoreAuctionsListing.js +15 -1
  302. package/dist/features/stores/components/StoreClassifiedsListing.js +12 -2
  303. package/dist/features/stores/components/StoreDetailLayoutView.js +24 -71
  304. package/dist/features/stores/components/StoreDigitalCodesListing.js +12 -2
  305. package/dist/features/stores/components/StoreLiveItemsListing.js +12 -2
  306. package/dist/features/stores/components/StorePreOrdersListing.js +12 -1
  307. package/dist/features/stores/components/StoreProductsListing.js +11 -1
  308. package/dist/features/stores/repository/store.repository.js +6 -0
  309. package/dist/features/stores/schemas/index.d.ts +6 -6
  310. package/dist/features/support/schemas/index.d.ts +4 -4
  311. package/dist/features/tester/actions/checklist-item-actions.d.ts +4 -4
  312. package/dist/features/tester/seed-data/offers-tester-seed-data.js +119 -3
  313. package/dist/features/tester/seed-data/products-tester-seed-data.js +131 -1
  314. package/dist/features/tester/seed-data/tester-checklist-seed-data.js +105 -1
  315. package/dist/features/wishlist/hooks/useWishlistWithGuest.d.ts +1 -1
  316. package/dist/index.d.ts +13 -10
  317. package/dist/index.js +14 -9
  318. package/dist/next/routing/route-map.d.ts +7 -1
  319. package/dist/next/routing/route-map.js +5 -0
  320. package/dist/providers/db-firebase/base.repository.d.ts +30 -0
  321. package/dist/providers/db-firebase/base.repository.js +50 -1
  322. package/dist/providers/db-firebase/index.d.ts +1 -1
  323. package/dist/providers/db-firebase/index.js +1 -1
  324. package/dist/providers/db-firebase/sieve.d.ts +25 -0
  325. package/dist/providers/db-firebase/sieve.js +52 -18
  326. package/dist/react/hooks/useUrlTable.js +10 -1
  327. package/dist/schemas/registry.d.ts +68 -68
  328. package/dist/seed/_helpers/category-forest.d.ts +2 -0
  329. package/dist/seed/_helpers/category-forest.js +309 -0
  330. package/dist/seed/_helpers/category-tree.d.ts +27 -0
  331. package/dist/seed/_helpers/category-tree.js +103 -0
  332. package/dist/seed/catalogue-seed-data.js +12 -12
  333. package/dist/seed/categories-seed-data.js +177 -162
  334. package/dist/seed/events-seed-data.js +61 -10
  335. package/dist/seed/homepage-sections-seed-data.js +5 -1
  336. package/dist/seed/offers-seed-data.js +32 -27
  337. package/dist/seed/products-art-seed-data.js +50 -12
  338. package/dist/seed/products-auctions-seed-data.js +97 -18
  339. package/dist/seed/products-classifieds-seed-data.js +80 -16
  340. package/dist/seed/products-digital-codes-seed-data.js +66 -18
  341. package/dist/seed/products-live-items-seed-data.js +64 -13
  342. package/dist/seed/products-preorders-seed-data.d.ts +0 -1
  343. package/dist/seed/products-preorders-seed-data.js +52 -13
  344. package/dist/seed/products-prize-draws-seed-data.js +63 -14
  345. package/dist/seed/products-standard-seed-data.js +99 -26
  346. package/dist/seed/products-stickers-seed-data.js +47 -12
  347. package/dist/seed/reviews-seed-data.js +6 -1
  348. package/dist/seed/site-settings-seed-data.d.ts +1 -38
  349. package/dist/seed/site-settings-seed-data.js +38 -76
  350. package/dist/seed/stores-seed-data.js +71 -1
  351. package/dist/seed/users-seed-data.js +15 -5
  352. package/dist/server-entry.d.ts +1 -2
  353. package/dist/server-entry.js +4 -3
  354. package/dist/server.d.ts +4 -3
  355. package/dist/server.js +8 -4
  356. package/dist/styles.css +78 -12
  357. package/dist/tailwind-utilities.css +1 -1
  358. package/dist/ui/components/Button.style.css +19 -4
  359. package/dist/ui/components/CollapsibleSection.d.ts +17 -1
  360. package/dist/ui/components/CollapsibleSection.js +6 -2
  361. package/dist/ui/components/FilterChipGroup.d.ts +25 -1
  362. package/dist/ui/components/FilterChipGroup.js +21 -4
  363. package/dist/ui/components/HandMode.style.css +47 -0
  364. package/dist/ui/components/Layout.d.ts +9 -2
  365. package/dist/ui/components/Layout.js +1 -1
  366. package/dist/ui/components/ListingLayout.js +8 -8
  367. package/dist/ui/components/ListingLayout.style.css +8 -7
  368. package/dist/ui/components/StickyToolbar.d.ts +3 -1
  369. package/dist/ui/components/StickyToolbar.js +62 -20
  370. package/dist/ui/components/bottom-chrome-slot.d.ts +21 -0
  371. package/dist/ui/components/bottom-chrome-slot.js +29 -0
  372. package/dist/ui/components/index.style.css +3 -0
  373. package/dist/ui/forms/FormShell.d.ts +43 -13
  374. package/dist/ui/forms/FormShell.js +22 -11
  375. package/dist/ui/forms/index.d.ts +1 -1
  376. package/dist/ui/index.d.ts +1 -1
  377. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
1
  import { LISTING_TYPE_CAPABILITIES } from "../capabilities";
2
+ import { alwaysAvailable, STOCK_ONLY_UNAVAILABLE_CLAUSES, } from "../availability";
2
3
  import { ROUTES } from "../../../../next/routing/route-map";
3
4
  import { TABLE_KEYS } from "../../../../constants/table-keys";
4
5
  import { STANDARD_SORT_OPTIONS, STANDARD_PUBLIC_SORT_OPTIONS, } from "../../../../features/products/constants/sieve";
@@ -18,6 +19,10 @@ export const config = {
18
19
  chipLabel: "Live Items",
19
20
  browseRoute: String(ROUTES.PUBLIC.LIVE),
20
21
  hideDefault: "sold",
22
+ // Runs out rather than ending — no time dimension, so the shared
23
+ // stock-only rules are the whole story for this type.
24
+ isAvailable: alwaysAvailable,
25
+ unavailableClauses: STOCK_ONLY_UNAVAILABLE_CLAUSES,
21
26
  sortOptions: STANDARD_SORT_OPTIONS,
22
27
  publicSortOptions: STANDARD_PUBLIC_SORT_OPTIONS,
23
28
  extraFacetKeys: [
@@ -1,3 +1,4 @@
1
+ import { type AvailabilityRow } from "../availability";
1
2
  export declare const LISTING_TYPE: "pre-order";
2
3
  export declare const capability: import("../capabilities").ListingTypeCapability;
3
4
  export declare const config: {
@@ -17,6 +18,8 @@ export declare const config: {
17
18
  chipLabel: string;
18
19
  browseRoute: string;
19
20
  hideDefault: "closed";
21
+ isAvailable: (row: AvailabilityRow) => boolean;
22
+ unavailableClauses: readonly import("../availability").UnavailableClause[];
20
23
  sortOptions: readonly [{
21
24
  readonly value: string;
22
25
  readonly label: "Earliest Delivery";
@@ -1,6 +1,8 @@
1
1
  import { LISTING_TYPE_CAPABILITIES } from "../capabilities";
2
+ import { num, STOCK_ONLY_UNAVAILABLE_CLAUSES, } from "../availability";
2
3
  import { ROUTES } from "../../../../next/routing/route-map";
3
4
  import { TABLE_KEYS } from "../../../../constants/table-keys";
5
+ import { PRODUCT_FIELDS } from "../../../../constants/field-names";
4
6
  import { PREORDER_SORT_OPTIONS, PREORDER_PUBLIC_SORT_OPTIONS, } from "../../../../features/products/constants/sieve";
5
7
  export const LISTING_TYPE = "pre-order";
6
8
  export const capability = LISTING_TYPE_CAPABILITIES["pre-order"];
@@ -18,6 +20,23 @@ export const config = {
18
20
  chipLabel: "Pre-Orders",
19
21
  browseRoute: String(ROUTES.PUBLIC.PRE_ORDERS),
20
22
  hideDefault: "closed",
23
+ // A pre-order closes when its allocation fills, NOT when its delivery date
24
+ // passes — a shipped-soon pre-order is still orderable. `preOrderClosed`
25
+ // exists on the schema but no write path has ever set it, so the count pair
26
+ // is the only real signal; it is checked defensively anyway in case one
27
+ // starts.
28
+ isAvailable: (row) => {
29
+ if (row[PRODUCT_FIELDS.PRE_ORDER_CLOSED] === true)
30
+ return false;
31
+ const current = num(row[PRODUCT_FIELDS.PRE_ORDER_CURRENT_COUNT]);
32
+ const max = num(row[PRODUCT_FIELDS.PRE_ORDER_MAX_QUANTITY]);
33
+ if (current !== null && max !== null && max > 0 && current >= max)
34
+ return false;
35
+ return true;
36
+ },
37
+ // A filled allocation always zeroes `availableQuantity`, so the shared
38
+ // stock clauses select exactly the closed set — no extra query needed.
39
+ unavailableClauses: STOCK_ONLY_UNAVAILABLE_CLAUSES,
21
40
  sortOptions: PREORDER_SORT_OPTIONS,
22
41
  publicSortOptions: PREORDER_PUBLIC_SORT_OPTIONS,
23
42
  extraFacetKeys: [
@@ -1,3 +1,4 @@
1
+ import type { AvailabilityRow } from "../availability";
1
2
  export declare const LISTING_TYPE: "prize-draw";
2
3
  export declare const capability: import("../capabilities").ListingTypeCapability;
3
4
  export declare const config: {
@@ -17,6 +18,16 @@ export declare const config: {
17
18
  chipLabel: string;
18
19
  browseRoute: string;
19
20
  hideDefault: "closed";
21
+ isAvailable: (row: AvailabilityRow) => boolean;
22
+ unavailableClauses: ({
23
+ field: "prizeRevealStatus";
24
+ op: "eq";
25
+ value: "closed";
26
+ } | {
27
+ field: "availableQuantity";
28
+ op: "eq";
29
+ value: number;
30
+ })[];
20
31
  sortOptions: readonly [{
21
32
  readonly value: string;
22
33
  readonly label: "Newest First";
@@ -1,6 +1,7 @@
1
1
  import { LISTING_TYPE_CAPABILITIES } from "../capabilities";
2
2
  import { ROUTES } from "../../../../next/routing/route-map";
3
3
  import { TABLE_KEYS } from "../../../../constants/table-keys";
4
+ import { PRODUCT_FIELDS } from "../../../../constants/field-names";
4
5
  import { PRIZE_DRAW_SORT_OPTIONS, PRIZE_DRAW_PUBLIC_SORT_OPTIONS, } from "../../../../features/products/constants/sieve";
5
6
  export const LISTING_TYPE = "prize-draw";
6
7
  export const capability = LISTING_TYPE_CAPABILITIES["prize-draw"];
@@ -18,6 +19,20 @@ export const config = {
18
19
  chipLabel: "Prize Draws",
19
20
  browseRoute: String(ROUTES.PUBLIC.PRIZE_DRAWS),
20
21
  hideDefault: "closed",
22
+ // `prizeRevealStatus`, NOT remaining entries: a draw can close with slots
23
+ // unsold (the seller ends it early, or the reveal window lapses), and it can
24
+ // sell every slot while still open pending the reveal. Only the status field
25
+ // answers "can someone still enter this".
26
+ isAvailable: (row) => row[PRODUCT_FIELDS.PRIZE_REVEAL_STATUS] !==
27
+ PRODUCT_FIELDS.PRIZE_REVEAL_STATUS_VALUES.CLOSED,
28
+ unavailableClauses: [
29
+ {
30
+ field: PRODUCT_FIELDS.PRIZE_REVEAL_STATUS,
31
+ op: "eq",
32
+ value: PRODUCT_FIELDS.PRIZE_REVEAL_STATUS_VALUES.CLOSED,
33
+ },
34
+ { field: PRODUCT_FIELDS.AVAILABLE_QUANTITY, op: "eq", value: 0 },
35
+ ],
21
36
  sortOptions: PRIZE_DRAW_SORT_OPTIONS,
22
37
  publicSortOptions: PRIZE_DRAW_PUBLIC_SORT_OPTIONS,
23
38
  extraFacetKeys: [TABLE_KEYS.PRIZE_REVEAL_STATUS],
@@ -1,3 +1,4 @@
1
+ import { alwaysAvailable } from "../availability";
1
2
  export declare const LISTING_TYPE: "standard";
2
3
  export declare const capability: import("../capabilities").ListingTypeCapability;
3
4
  export declare const config: {
@@ -17,6 +18,8 @@ export declare const config: {
17
18
  chipLabel: string;
18
19
  browseRoute: string;
19
20
  hideDefault: "sold";
21
+ isAvailable: typeof alwaysAvailable;
22
+ unavailableClauses: readonly import("../availability").UnavailableClause[];
20
23
  sortOptions: readonly [{
21
24
  readonly value: string;
22
25
  readonly label: "Newest First";
@@ -1,4 +1,5 @@
1
1
  import { LISTING_TYPE_CAPABILITIES } from "../capabilities";
2
+ import { alwaysAvailable, STOCK_ONLY_UNAVAILABLE_CLAUSES, } from "../availability";
2
3
  import { ROUTES } from "../../../../next/routing/route-map";
3
4
  import { STANDARD_SORT_OPTIONS, STANDARD_PUBLIC_SORT_OPTIONS, } from "../../../../features/products/constants/sieve";
4
5
  export const LISTING_TYPE = "standard";
@@ -17,6 +18,10 @@ export const config = {
17
18
  chipLabel: "Standard",
18
19
  browseRoute: String(ROUTES.PUBLIC.PRODUCTS),
19
20
  hideDefault: "sold",
21
+ // Runs out rather than ending — no time dimension, so the shared
22
+ // stock-only rules are the whole story for this type.
23
+ isAvailable: alwaysAvailable,
24
+ unavailableClauses: STOCK_ONLY_UNAVAILABLE_CLAUSES,
20
25
  sortOptions: STANDARD_SORT_OPTIONS,
21
26
  publicSortOptions: STANDARD_PUBLIC_SORT_OPTIONS,
22
27
  extraFacetKeys: [],
@@ -1,3 +1,4 @@
1
+ import { alwaysAvailable } from "../availability";
1
2
  export declare const LISTING_TYPE: "stickers";
2
3
  export declare const capability: import("../capabilities").ListingTypeCapability;
3
4
  export declare const config: {
@@ -17,6 +18,8 @@ export declare const config: {
17
18
  chipLabel: string;
18
19
  browseRoute: string;
19
20
  hideDefault: "sold";
21
+ isAvailable: typeof alwaysAvailable;
22
+ unavailableClauses: readonly import("../availability").UnavailableClause[];
20
23
  sortOptions: readonly [{
21
24
  readonly value: string;
22
25
  readonly label: "Newest First";
@@ -1,4 +1,5 @@
1
1
  import { LISTING_TYPE_CAPABILITIES } from "../capabilities";
2
+ import { alwaysAvailable, STOCK_ONLY_UNAVAILABLE_CLAUSES, } from "../availability";
2
3
  import { ROUTES } from "../../../../next/routing/route-map";
3
4
  import { STANDARD_SORT_OPTIONS, STANDARD_PUBLIC_SORT_OPTIONS, } from "../../../../features/products/constants/sieve";
4
5
  export const LISTING_TYPE = "stickers";
@@ -20,6 +21,10 @@ export const config = {
20
21
  // a `/stickers` route that does not exist.
21
22
  browseRoute: String(ROUTES.PUBLIC.ART),
22
23
  hideDefault: "sold",
24
+ // Runs out rather than ending — no time dimension, so the shared
25
+ // stock-only rules are the whole story for this type.
26
+ isAvailable: alwaysAvailable,
27
+ unavailableClauses: STOCK_ONLY_UNAVAILABLE_CLAUSES,
23
28
  sortOptions: STANDARD_SORT_OPTIONS,
24
29
  publicSortOptions: STANDARD_PUBLIC_SORT_OPTIONS,
25
30
  extraFacetKeys: [],
package/dist/client.d.ts CHANGED
@@ -139,7 +139,7 @@ export { OtpInput } from "./ui/components/OtpInput";
139
139
  export type { OtpInputProps } from "./ui/components/OtpInput";
140
140
  export { DateInput, DateRangeInput } from "./ui/components/DateInput";
141
141
  export type { DateInputProps, DateRangeInputProps } from "./ui/components/DateInput";
142
- export type { FormShellProviderProps, FormShellStep, FormShellContextValue, UseFormShellStateResult } from "./ui/forms";
142
+ export type { FormShellProviderProps, FormShellStep, FormShellNav, FormShellContextValue, UseFormShellStateResult } from "./ui/forms";
143
143
  export { FormShellProvider, FormShellContext, useFormShell, useFormShellState, applyZodIssues } from "./ui/forms";
144
144
  export type { FieldInputProps } from "./ui/forms";
145
145
  export { FieldInput } from "./ui/forms";
@@ -288,8 +288,6 @@ export { ProductFeaturesProvider, useProductFeatures, } from "./features/product
288
288
  export type { ProductFeaturesProviderProps } from "./features/products/components/ProductFeaturesContext";
289
289
  export { FeatureBadge, FeatureBadgeList } from "./features/products/components/FeatureBadge";
290
290
  export type { FeatureBadgeProps, FeatureBadgeListProps, } from "./features/products/components/FeatureBadge";
291
- export { SellerOffersPanel } from "./features/seller/components/SellerOffersPanel";
292
- export type { SellerOffersPanelProps, SellerOfferAction } from "./features/seller/components/SellerOffersPanel";
293
291
  export { UserOffersPanel } from "./features/account/components/UserOffersPanel";
294
292
  export type { UserOffersPanelProps } from "./features/account/components/UserOffersPanel";
295
293
  export { SellerDashboardView as StoreDashboardView, SellerDashboardView, useSellerDashboard as useStoreDashboard, useSellerDashboard } from "./features/seller/index";
@@ -308,6 +306,8 @@ export { OrderAddonBadges } from "./features/orders/components/OrderAddonBadges"
308
306
  export type { OrderAddonBadgesOrder, OrderAddonBadgesProps } from "./features/orders/components/OrderAddonBadges";
309
307
  export { MANUAL_PAYMENT_METHODS, isManualPaymentMethod, PAYMENT_REVIEW_QUEUE_MODES, isPaymentReviewQueueMode, PAYMENT_WINDOW_MINUTES, } from "./features/orders/constants/payment-window";
310
308
  export type { PaymentReviewQueueMode } from "./features/orders/constants/payment-window";
309
+ export { ORDER_SCOPE_VALUES, ORDER_SCOPE_TABS, isOrderScope, statusesForScope, mergeOrderScopeFilter, } from "./features/orders/constants/order-scope";
310
+ export type { OrderScope } from "./features/orders/constants/order-scope";
311
311
  export { UserOrderTrackView } from "./features/account/components/UserOrderTrackView";
312
312
  export type { UserOrderTrackViewProps, UserOrderTrackViewLabels } from "./features/account/components/UserOrderTrackView";
313
313
  export { useCouponValidate } from "./features/promotions/hooks/useCouponValidate";
@@ -408,8 +408,10 @@ export { useProduct } from "./features/products/index";
408
408
  export type { ProductDocument } from "./features/products/index";
409
409
  export { BUNDLE_COPY } from "./_internal/shared/features/categories/bundle-copy";
410
410
  export { useSiteSettings } from "./core/index";
411
- export { checkEmiEligibility, computeEmiSchedule, } from "./_internal/shared/features/emi/schedule";
412
- export type { EmiSettings } from "./_internal/shared/features/emi/schedule";
411
+ export { checkEmiEligibility, computeEmiSchedule, computeBuyerEmiQuote, } from "./_internal/shared/features/emi/schedule";
412
+ export type { EmiSettings, BuyerEmiQuote } from "./_internal/shared/features/emi/schedule";
413
+ export type { BuyerFacingFees, BuyerEmiSettings, } from "./_internal/shared/features/site-settings/fees";
414
+ export type { PublicSiteSettings } from "./_internal/shared/features/site-settings/types";
413
415
  export { computeCodHandlingFee } from "./_internal/shared/fees/calculator";
414
416
  export type { CodHandlingFeeRates, WhatsAppNotifyFeeRates, GiftWrapFeeRates, ShipmentProtectionFeeRates, } from "./_internal/shared/fees/calculator";
415
417
  export { FAQPageContent } from "./features/faq/index";
package/dist/client.js CHANGED
@@ -295,7 +295,6 @@ export { ProductDetailActions } from "./features/products/components/ProductDeta
295
295
  // productFeatures (FI6) — client-safe components + context
296
296
  export { ProductFeaturesProvider, useProductFeatures, } from "./features/products/components/ProductFeaturesContext";
297
297
  export { FeatureBadge, FeatureBadgeList } from "./features/products/components/FeatureBadge";
298
- export { SellerOffersPanel } from "./features/seller/components/SellerOffersPanel";
299
298
  export { UserOffersPanel } from "./features/account/components/UserOffersPanel";
300
299
  export { SellerDashboardView as StoreDashboardView, SellerDashboardView, useSellerDashboard as useStoreDashboard, useSellerDashboard } from "./features/seller/index";
301
300
  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";
@@ -307,6 +306,7 @@ export { OrderAddonBadges } from "./features/orders/components/OrderAddonBadges"
307
306
  // Manual-payment (cash / UPI / EMI) shared constants — pure data + predicates,
308
307
  // no server deps. Used by the buyer proof-upload page and order-detail CTAs.
309
308
  export { MANUAL_PAYMENT_METHODS, isManualPaymentMethod, PAYMENT_REVIEW_QUEUE_MODES, isPaymentReviewQueueMode, PAYMENT_WINDOW_MINUTES, } from "./features/orders/constants/payment-window";
309
+ export { ORDER_SCOPE_VALUES, ORDER_SCOPE_TABS, isOrderScope, statusesForScope, mergeOrderScopeFilter, } from "./features/orders/constants/order-scope";
310
310
  export { UserOrderTrackView } from "./features/account/components/UserOrderTrackView";
311
311
  export { useCouponValidate } from "./features/promotions/hooks/useCouponValidate";
312
312
  export { BlogPostView } from "./features/blog/components/BlogPostView";
@@ -388,7 +388,7 @@ export { PrizeRevealModal } from "./features/products/components/PrizeRevealModa
388
388
  export { useProduct } from "./features/products/index";
389
389
  export { BUNDLE_COPY } from "./_internal/shared/features/categories/bundle-copy";
390
390
  export { useSiteSettings } from "./core/index";
391
- export { checkEmiEligibility, computeEmiSchedule, } from "./_internal/shared/features/emi/schedule";
391
+ export { checkEmiEligibility, computeEmiSchedule, computeBuyerEmiQuote, } from "./_internal/shared/features/emi/schedule";
392
392
  export { computeCodHandlingFee } from "./_internal/shared/fees/calculator"; // reexport-from-internal-ok: pure fee-calc utility consumed directly by public checkout UI (CheckoutRouteClient.tsx), same category as the sibling computeEmiSchedule/checkEmiEligibility re-export two lines above
393
393
  export { FAQPageContent } from "./features/faq/index";
394
394
  export { CategoryInlineSelect } from "./features/seller/components/CategoryInlineSelect";
@@ -106,6 +106,8 @@ export declare const ADMIN_ENDPOINTS: {
106
106
  readonly REVIEW_BY_ID: (id: string) => string;
107
107
  readonly BIDS: "/api/admin/bids";
108
108
  readonly BID_BY_ID: (id: string) => string;
109
+ readonly OFFERS: "/api/admin/offers";
110
+ readonly OFFER_BY_ID: (id: string) => string;
109
111
  readonly BLOG: "/api/admin/blog";
110
112
  readonly BLOG_BY_ID: (id: string) => string;
111
113
  readonly BUNDLES: "/api/admin/bundles";
@@ -560,6 +562,8 @@ export declare const API_ENDPOINTS: {
560
562
  readonly REVIEW_BY_ID: (id: string) => string;
561
563
  readonly BIDS: "/api/admin/bids";
562
564
  readonly BID_BY_ID: (id: string) => string;
565
+ readonly OFFERS: "/api/admin/offers";
566
+ readonly OFFER_BY_ID: (id: string) => string;
563
567
  readonly BLOG: "/api/admin/blog";
564
568
  readonly BLOG_BY_ID: (id: string) => string;
565
569
  readonly BUNDLES: "/api/admin/bundles";
@@ -1016,6 +1020,8 @@ export declare const API_ROUTES: {
1016
1020
  readonly REVIEW_BY_ID: (id: string) => string;
1017
1021
  readonly BIDS: "/api/admin/bids";
1018
1022
  readonly BID_BY_ID: (id: string) => string;
1023
+ readonly OFFERS: "/api/admin/offers";
1024
+ readonly OFFER_BY_ID: (id: string) => string;
1019
1025
  readonly BLOG: "/api/admin/blog";
1020
1026
  readonly BLOG_BY_ID: (id: string) => string;
1021
1027
  readonly BUNDLES: "/api/admin/bundles";
@@ -133,6 +133,8 @@ export const ADMIN_ENDPOINTS = {
133
133
  REVIEW_BY_ID: (id) => `/api/admin/reviews/${id}`,
134
134
  BIDS: "/api/admin/bids",
135
135
  BID_BY_ID: (id) => `/api/admin/bids/${id}`,
136
+ OFFERS: "/api/admin/offers",
137
+ OFFER_BY_ID: (id) => `/api/admin/offers/${id}`,
136
138
  BLOG: "/api/admin/blog",
137
139
  BLOG_BY_ID: (id) => `/api/admin/blog/${id}`,
138
140
  BUNDLES: "/api/admin/bundles",
@@ -7,6 +7,30 @@
7
7
  *
8
8
  * Consumer app re-exports from "@mohasinac/appkit" — never edit src/constants/field-names.ts directly.
9
9
  */
10
+ /**
11
+ * The three-state scope every listing surface (public browse, store tabs,
12
+ * category/brand panels, admin/seller dashboards) offers as a tab bar.
13
+ *
14
+ * DELIBERATELY NOT a Firestore field. "Unavailable" means different things to
15
+ * different listing types — an auction ENDS, a product SELLS OUT, a prize draw
16
+ * CLOSES, a code pool DEPLETES — so there is no single column to filter on.
17
+ * The per-type meaning lives on each listing-type plugin
18
+ * (`isAvailable` / `unavailableClauses` in `_internal/shared/listing-types/`),
19
+ * and `availabilityTabsFor()` derives the middle tab's label from the plugin's
20
+ * `hideDefault`. Do not add a mirror field to ProductDocument to "simplify"
21
+ * this — a denormalised mirror drifts the first time a write path forgets it
22
+ * (Recurrent Root Cause #42).
23
+ */
24
+ export declare const AVAILABILITY_VALUES: {
25
+ /** Still buyable / biddable / enterable. The default when the param is absent. */
26
+ readonly AVAILABLE: "available";
27
+ /** Sold out, ended, closed, or depleted — the archive. */
28
+ readonly UNAVAILABLE: "unavailable";
29
+ /** No availability predicate at all. The only scope with an exact total. */
30
+ readonly ALL: "all";
31
+ };
32
+ export type AvailabilityFilter = (typeof AVAILABILITY_VALUES)[keyof typeof AVAILABILITY_VALUES];
33
+ export declare function isAvailabilityFilter(value: string): value is AvailabilityFilter;
10
34
  export declare const PRODUCT_FIELDS: {
11
35
  readonly ID: "id";
12
36
  readonly TITLE: "title";
@@ -81,6 +105,16 @@ export declare const PRODUCT_FIELDS: {
81
105
  readonly IS_TEST_DATA: "isTestData";
82
106
  readonly BIDS_HAVE_STARTED: "bidsHaveStarted";
83
107
  readonly PRE_ORDER_CLOSED: "preOrderClosed";
108
+ /**
109
+ * Digital-code pool counters. NESTED under `digitalCode.*` on the document —
110
+ * reading `row.codesAvailable` at the top level silently returns `undefined`
111
+ * for every row, which is exactly the bug the old `isValidRelatedItem`
112
+ * carried. Both paths are allowlisted in the products repository's
113
+ * SIEVE_FIELDS.
114
+ */
115
+ readonly DIGITAL_CODES_AVAILABLE: "digitalCode.codesAvailable";
116
+ readonly DIGITAL_CODE_POOL_SIZE: "digitalCode.codePoolSize";
117
+ readonly DIGITAL_CODE_DELIVERY_METHOD: "digitalCode.codeDeliveryMethod";
84
118
  /**
85
119
  * The Firestore field. NOTE the `Id` suffix: the URL/table key is
86
120
  * `sublistingCategory` (TABLE_KEYS.SUBLISTING_CATEGORY) but the stored field
@@ -333,14 +367,25 @@ export declare const EVENT_FIELDS: {
333
367
  readonly ALLOW_GUEST_PARTICIPATION: "allowGuestParticipation";
334
368
  readonly CREATED_AT: "createdAt";
335
369
  readonly UPDATED_AT: "updatedAt";
370
+ /**
371
+ * Mirrors the `EventStatus` union in `features/events/types/index.ts`, which
372
+ * is the source of truth. A `PUBLISHED: "published"` entry lived here until
373
+ * 2026-08-24 — `EventStatus` never had that value, so any filter built from
374
+ * it matched zero rows forever. It had no consumers and was removed; verified
375
+ * by grep before deleting (Root Cause #34).
376
+ */
336
377
  readonly STATUS_VALUES: {
337
378
  readonly DRAFT: "draft";
338
- readonly PUBLISHED: "published";
339
379
  readonly ACTIVE: "active";
380
+ readonly PAUSED: "paused";
340
381
  readonly ENDED: "ended";
341
382
  readonly CANCELLED: "cancelled";
342
- readonly PAUSED: "paused";
343
383
  };
384
+ /**
385
+ * Mirrors the `EventType` union. `LOTTERY` was missing until 2026-08-24,
386
+ * which is why `events-seed-data.ts` had to write `type: "lottery"` as a raw
387
+ * string literal while every other row used this map.
388
+ */
344
389
  readonly TYPE_VALUES: {
345
390
  readonly SALE: "sale";
346
391
  readonly OFFER: "offer";
@@ -349,6 +394,7 @@ export declare const EVENT_FIELDS: {
349
394
  readonly FEEDBACK: "feedback";
350
395
  readonly RAFFLE: "raffle";
351
396
  readonly SPIN_WHEEL: "spin_wheel";
397
+ readonly LOTTERY: "lottery";
352
398
  };
353
399
  readonly RAFFLE_TYPE_VALUES: {
354
400
  readonly OPEN_RAFFLE: "open_raffle";
@@ -857,6 +903,7 @@ export declare const SITE_SETTINGS_FIELDS: {
857
903
  readonly NOTIFICATIONS: "featureFlags.notifications";
858
904
  readonly SELLER_REGISTRATION: "featureFlags.sellerRegistration";
859
905
  readonly PRE_ORDERS: "featureFlags.preOrders";
906
+ readonly OFFERS: "featureFlags.offers";
860
907
  };
861
908
  readonly LEGAL_PAGES: "legalPages";
862
909
  readonly SHIPPING: "shipping";
@@ -8,6 +8,34 @@
8
8
  * Consumer app re-exports from "@mohasinac/appkit" — never edit src/constants/field-names.ts directly.
9
9
  */
10
10
  // ============================================================================
11
+ // AVAILABILITY SCOPE (not a stored field — a derived listing-surface scope)
12
+ // ============================================================================
13
+ /**
14
+ * The three-state scope every listing surface (public browse, store tabs,
15
+ * category/brand panels, admin/seller dashboards) offers as a tab bar.
16
+ *
17
+ * DELIBERATELY NOT a Firestore field. "Unavailable" means different things to
18
+ * different listing types — an auction ENDS, a product SELLS OUT, a prize draw
19
+ * CLOSES, a code pool DEPLETES — so there is no single column to filter on.
20
+ * The per-type meaning lives on each listing-type plugin
21
+ * (`isAvailable` / `unavailableClauses` in `_internal/shared/listing-types/`),
22
+ * and `availabilityTabsFor()` derives the middle tab's label from the plugin's
23
+ * `hideDefault`. Do not add a mirror field to ProductDocument to "simplify"
24
+ * this — a denormalised mirror drifts the first time a write path forgets it
25
+ * (Recurrent Root Cause #42).
26
+ */
27
+ export const AVAILABILITY_VALUES = {
28
+ /** Still buyable / biddable / enterable. The default when the param is absent. */
29
+ AVAILABLE: "available",
30
+ /** Sold out, ended, closed, or depleted — the archive. */
31
+ UNAVAILABLE: "unavailable",
32
+ /** No availability predicate at all. The only scope with an exact total. */
33
+ ALL: "all",
34
+ };
35
+ export function isAvailabilityFilter(value) {
36
+ return Object.values(AVAILABILITY_VALUES).includes(value);
37
+ }
38
+ // ============================================================================
11
39
  // PRODUCT FIELDS
12
40
  // ============================================================================
13
41
  export const PRODUCT_FIELDS = {
@@ -86,6 +114,16 @@ export const PRODUCT_FIELDS = {
86
114
  IS_TEST_DATA: "isTestData",
87
115
  BIDS_HAVE_STARTED: "bidsHaveStarted",
88
116
  PRE_ORDER_CLOSED: "preOrderClosed",
117
+ /**
118
+ * Digital-code pool counters. NESTED under `digitalCode.*` on the document —
119
+ * reading `row.codesAvailable` at the top level silently returns `undefined`
120
+ * for every row, which is exactly the bug the old `isValidRelatedItem`
121
+ * carried. Both paths are allowlisted in the products repository's
122
+ * SIEVE_FIELDS.
123
+ */
124
+ DIGITAL_CODES_AVAILABLE: "digitalCode.codesAvailable",
125
+ DIGITAL_CODE_POOL_SIZE: "digitalCode.codePoolSize",
126
+ DIGITAL_CODE_DELIVERY_METHOD: "digitalCode.codeDeliveryMethod",
89
127
  /**
90
128
  * The Firestore field. NOTE the `Id` suffix: the URL/table key is
91
129
  * `sublistingCategory` (TABLE_KEYS.SUBLISTING_CATEGORY) but the stored field
@@ -361,14 +399,25 @@ export const EVENT_FIELDS = {
361
399
  ALLOW_GUEST_PARTICIPATION: "allowGuestParticipation",
362
400
  CREATED_AT: "createdAt",
363
401
  UPDATED_AT: "updatedAt",
402
+ /**
403
+ * Mirrors the `EventStatus` union in `features/events/types/index.ts`, which
404
+ * is the source of truth. A `PUBLISHED: "published"` entry lived here until
405
+ * 2026-08-24 — `EventStatus` never had that value, so any filter built from
406
+ * it matched zero rows forever. It had no consumers and was removed; verified
407
+ * by grep before deleting (Root Cause #34).
408
+ */
364
409
  STATUS_VALUES: {
365
410
  DRAFT: "draft",
366
- PUBLISHED: "published",
367
411
  ACTIVE: "active",
412
+ PAUSED: "paused",
368
413
  ENDED: "ended",
369
414
  CANCELLED: "cancelled",
370
- PAUSED: "paused",
371
415
  },
416
+ /**
417
+ * Mirrors the `EventType` union. `LOTTERY` was missing until 2026-08-24,
418
+ * which is why `events-seed-data.ts` had to write `type: "lottery"` as a raw
419
+ * string literal while every other row used this map.
420
+ */
372
421
  TYPE_VALUES: {
373
422
  SALE: "sale",
374
423
  OFFER: "offer",
@@ -377,6 +426,7 @@ export const EVENT_FIELDS = {
377
426
  FEEDBACK: "feedback",
378
427
  RAFFLE: "raffle",
379
428
  SPIN_WHEEL: "spin_wheel",
429
+ LOTTERY: "lottery",
380
430
  },
381
431
  RAFFLE_TYPE_VALUES: {
382
432
  OPEN_RAFFLE: "open_raffle",
@@ -956,6 +1006,7 @@ export const SITE_SETTINGS_FIELDS = {
956
1006
  NOTIFICATIONS: "featureFlags.notifications",
957
1007
  SELLER_REGISTRATION: "featureFlags.sellerRegistration",
958
1008
  PRE_ORDERS: "featureFlags.preOrders",
1009
+ OFFERS: "featureFlags.offers",
959
1010
  },
960
1011
  LEGAL_PAGES: "legalPages",
961
1012
  SHIPPING: "shipping",
@@ -5,6 +5,8 @@ export declare const TABLE_KEYS: {
5
5
  readonly PAGE: "page";
6
6
  readonly PAGE_SIZE: "pageSize";
7
7
  readonly TAB: "tab";
8
+ /** Open section(s) of a `<SectionForm>`. Non-resetting — see NON_RESETTING_KEYS. */
9
+ readonly SECTION: "section";
8
10
  readonly QUERY: "q";
9
11
  readonly STATUS: "status";
10
12
  readonly CATEGORY: "category";
@@ -17,6 +19,21 @@ export declare const TABLE_KEYS: {
17
19
  readonly TAGS: "tags";
18
20
  readonly DATE_FROM: "dateFrom";
19
21
  readonly DATE_TO: "dateTo";
22
+ /**
23
+ * Three-state availability tab on every listing surface, public and
24
+ * dashboard: "available" (default) | "unavailable" | "all". Replaces the
25
+ * SHOW_SOLD/SHOW_ENDED/SHOW_CLOSED toggle trio below, which widened the
26
+ * list instead of scoping it and had three spellings of one intent.
27
+ */
28
+ readonly AVAILABILITY: "availability";
29
+ /** Order lifecycle scope tab: "active" | "closed" | "all". */
30
+ readonly ORDER_SCOPE: "orderScope";
31
+ /**
32
+ * Superseded by AVAILABILITY. Retained ONLY so `readAvailability()` can map
33
+ * bookmarked `?showSold=true` URLs onto `availability=all`, and because the
34
+ * seller auction/prize-draw dashboards still read them during migration.
35
+ * Never write these from new code.
36
+ */
20
37
  readonly SHOW_SOLD: "showSold";
21
38
  readonly SHOW_ENDED: "showEnded";
22
39
  readonly SHOW_CLOSED: "showClosed";
@@ -5,6 +5,8 @@ export const TABLE_KEYS = {
5
5
  PAGE: "page",
6
6
  PAGE_SIZE: "pageSize",
7
7
  TAB: "tab",
8
+ /** Open section(s) of a `<SectionForm>`. Non-resetting — see NON_RESETTING_KEYS. */
9
+ SECTION: "section",
8
10
  QUERY: "q",
9
11
  STATUS: "status",
10
12
  CATEGORY: "category",
@@ -17,6 +19,21 @@ export const TABLE_KEYS = {
17
19
  TAGS: "tags",
18
20
  DATE_FROM: "dateFrom",
19
21
  DATE_TO: "dateTo",
22
+ /**
23
+ * Three-state availability tab on every listing surface, public and
24
+ * dashboard: "available" (default) | "unavailable" | "all". Replaces the
25
+ * SHOW_SOLD/SHOW_ENDED/SHOW_CLOSED toggle trio below, which widened the
26
+ * list instead of scoping it and had three spellings of one intent.
27
+ */
28
+ AVAILABILITY: "availability",
29
+ /** Order lifecycle scope tab: "active" | "closed" | "all". */
30
+ ORDER_SCOPE: "orderScope",
31
+ /**
32
+ * Superseded by AVAILABILITY. Retained ONLY so `readAvailability()` can map
33
+ * bookmarked `?showSold=true` URLs onto `availability=all`, and because the
34
+ * seller auction/prize-draw dashboards still read them during migration.
35
+ * Never write these from new code.
36
+ */
20
37
  SHOW_SOLD: "showSold",
21
38
  SHOW_ENDED: "showEnded",
22
39
  SHOW_CLOSED: "showClosed",
@@ -6,9 +6,21 @@ export declare const BID_ERROR_CODES: {
6
6
  readonly INCREMENT_VIOLATED: "BID_INCREMENT_TOO_LOW";
7
7
  readonly SELF_BID: "BID_SELF_BID";
8
8
  readonly USER_BANNED: "BID_USER_BANNED";
9
+ /**
10
+ * The buyout price is no longer better than the standing bid. Replaced
11
+ * `BUY_NOW_BIDS_STARTED` (deleted 2026-08-24), which fired the instant anyone
12
+ * bid at all — that eBay rule hid Buy Now on nearly every live auction.
13
+ */
9
14
  readonly BUY_NOW_UNAVAILABLE: "BID_BUY_NOW_UNAVAILABLE";
10
- readonly BUY_NOW_BIDS_STARTED: "BID_BUY_NOW_BIDS_STARTED";
11
15
  readonly BUY_NOW_NO_PRICE: "BID_BUY_NOW_NO_PRICE";
16
+ /** The buyout hold expired (or was cancelled) before checkout completed. */
17
+ readonly BUYOUT_LAPSED: "BID_BUYOUT_LAPSED";
18
+ /** Bidding passed the buyout price while the buyer was in checkout. */
19
+ readonly BUYOUT_OUTBID: "BID_BUYOUT_OUTBID";
20
+ /** Another buyer's buyout claimed the auction first. */
21
+ readonly AUCTION_ALREADY_SOLD: "BID_AUCTION_ALREADY_SOLD";
22
+ /** The auction's clock ran out mid-checkout, so it settled to a real bidder. */
23
+ readonly AUCTION_ENDED_BEFORE_CHECKOUT: "BID_AUCTION_ENDED_BEFORE_CHECKOUT";
12
24
  };
13
25
  export declare const OFFER_ERROR_CODES: {
14
26
  readonly DISABLED: "OFFER_DISABLED";
@@ -6,9 +6,21 @@ export const BID_ERROR_CODES = {
6
6
  INCREMENT_VIOLATED: "BID_INCREMENT_TOO_LOW",
7
7
  SELF_BID: "BID_SELF_BID",
8
8
  USER_BANNED: "BID_USER_BANNED",
9
+ /**
10
+ * The buyout price is no longer better than the standing bid. Replaced
11
+ * `BUY_NOW_BIDS_STARTED` (deleted 2026-08-24), which fired the instant anyone
12
+ * bid at all — that eBay rule hid Buy Now on nearly every live auction.
13
+ */
9
14
  BUY_NOW_UNAVAILABLE: "BID_BUY_NOW_UNAVAILABLE",
10
- BUY_NOW_BIDS_STARTED: "BID_BUY_NOW_BIDS_STARTED",
11
15
  BUY_NOW_NO_PRICE: "BID_BUY_NOW_NO_PRICE",
16
+ /** The buyout hold expired (or was cancelled) before checkout completed. */
17
+ BUYOUT_LAPSED: "BID_BUYOUT_LAPSED",
18
+ /** Bidding passed the buyout price while the buyer was in checkout. */
19
+ BUYOUT_OUTBID: "BID_BUYOUT_OUTBID",
20
+ /** Another buyer's buyout claimed the auction first. */
21
+ AUCTION_ALREADY_SOLD: "BID_AUCTION_ALREADY_SOLD",
22
+ /** The auction's clock ran out mid-checkout, so it settled to a real bidder. */
23
+ AUCTION_ENDED_BEFORE_CHECKOUT: "BID_AUCTION_ENDED_BEFORE_CHECKOUT",
12
24
  };
13
25
  export const OFFER_ERROR_CODES = {
14
26
  DISABLED: "OFFER_DISABLED",
@@ -137,12 +137,21 @@ export const ERROR_DISPLAY_MAP = {
137
137
  [BID_ERROR_CODES.BUY_NOW_UNAVAILABLE]: {
138
138
  messageKey: k(BID_ERROR_CODES.BUY_NOW_UNAVAILABLE),
139
139
  },
140
- [BID_ERROR_CODES.BUY_NOW_BIDS_STARTED]: {
141
- messageKey: k(BID_ERROR_CODES.BUY_NOW_BIDS_STARTED),
142
- },
143
140
  [BID_ERROR_CODES.BUY_NOW_NO_PRICE]: {
144
141
  messageKey: k(BID_ERROR_CODES.BUY_NOW_NO_PRICE),
145
142
  },
143
+ [BID_ERROR_CODES.BUYOUT_LAPSED]: {
144
+ messageKey: k(BID_ERROR_CODES.BUYOUT_LAPSED),
145
+ },
146
+ [BID_ERROR_CODES.BUYOUT_OUTBID]: {
147
+ messageKey: k(BID_ERROR_CODES.BUYOUT_OUTBID),
148
+ },
149
+ [BID_ERROR_CODES.AUCTION_ALREADY_SOLD]: {
150
+ messageKey: k(BID_ERROR_CODES.AUCTION_ALREADY_SOLD),
151
+ },
152
+ [BID_ERROR_CODES.AUCTION_ENDED_BEFORE_CHECKOUT]: {
153
+ messageKey: k(BID_ERROR_CODES.AUCTION_ENDED_BEFORE_CHECKOUT),
154
+ },
146
155
  // ---------- Offers ----------
147
156
  [OFFER_ERROR_CODES.DISABLED]: { messageKey: k(OFFER_ERROR_CODES.DISABLED) },
148
157
  [OFFER_ERROR_CODES.PRICE_TOO_LOW]: {
@@ -347,9 +347,12 @@ export declare const ERROR_MESSAGES: {
347
347
  readonly BID_TOO_LOW: "Your bid must be higher than the current bid";
348
348
  readonly INCREMENT_TOO_LOW: "Your bid does not meet the minimum increment requirement";
349
349
  readonly OWN_AUCTION: "You cannot bid on your own auction";
350
- readonly BUY_NOW_UNAVAILABLE: "Buy Now is not available for this auction";
351
- readonly BUY_NOW_BIDS_STARTED: "Buy Now is no longer available — bids have already been placed";
350
+ readonly BUY_NOW_UNAVAILABLE: "Buy Now is unavailable — bidding has already passed the Buy Now price";
352
351
  readonly BUY_NOW_NO_PRICE: "This auction does not have a Buy Now price";
352
+ readonly BUYOUT_LAPSED: "Your Buy Now claim expired. Head back to the auction to bid or try again.";
353
+ readonly BUYOUT_OUTBID: "Bidding passed the Buy Now price while you were checking out, so this purchase can no longer go through.";
354
+ readonly AUCTION_ALREADY_SOLD: "Another buyer completed their purchase first, so this auction is already sold.";
355
+ readonly AUCTION_ENDED_BEFORE_CHECKOUT: "The auction ended before you completed payment, so it went to the winning bidder.";
353
356
  };
354
357
  readonly CONTACT: {
355
358
  readonly SEND_FAILED: "Failed to send your message. Please try again.";
@@ -424,6 +427,11 @@ export declare const ERROR_MESSAGES: {
424
427
  readonly INVALID_STATUS_TRANSITION: "This status transition is not allowed";
425
428
  };
426
429
  readonly OFFER: {
430
+ /**
431
+ * The site-wide `featureFlags.offers` kill switch is off. Existing offers
432
+ * can still be responded to and paid for — only new ones are refused.
433
+ */
434
+ readonly DISABLED: "Offers are currently turned off across the site.";
427
435
  readonly LIMIT_REACHED: "You have reached the maximum of 3 offers for this product. Wait for the seller to update the listing.";
428
436
  readonly COUNTER_RANGE: "Your counter must be within 20% of the seller's counter price.";
429
437
  readonly NOT_COUNTERED: "There is no seller counter to respond to.";