@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
@@ -22,6 +22,13 @@ export interface MarketplaceAuctionCardData {
22
22
  status?: string;
23
23
  slug?: string;
24
24
  buyNowPrice?: number;
25
+ /**
26
+ * Feeds `isBuyNowAvailable` alongside `currentBid`/`auctionEndDate`. Every
27
+ * doc→card mapper must copy it: dropping one field a shared predicate reads
28
+ * is exactly how a card ends up advertising a buyout the detail page refuses
29
+ * (Root Cause #48).
30
+ */
31
+ isSold?: boolean;
25
32
  /** Display name of the auction winner — shown masked when the auction has ended */
26
33
  winnerDisplayName?: string;
27
34
  }
@@ -12,6 +12,7 @@ import { ROUTES } from "../../../next";
12
12
  import { formatCurrency } from "../../../utils";
13
13
  import { getDefaultCurrency } from "../../../core/baseline-resolver";
14
14
  import { BaseListingCard, Button, Caption, Div, Row, Span, Stack, Text, TextLink } from "../../../ui";
15
+ import { isBuyNowAvailable } from "../../../_internal/shared/features/auctions/config";
15
16
  const CLS_STAR_ICON = "h-5 w-5 fill-warning text-warning";
16
17
  const CLS_LIVE_BADGE = "rounded-full bg-error-solid px-[var(--appkit-space-2)] py-[var(--appkit-space-0-5)] text-error-on-solid";
17
18
  const CLS_ENDING_BADGE = "rounded-full bg-warning-solid px-[var(--appkit-space-2)] py-[var(--appkit-space-0-5)] text-warning-on-solid";
@@ -28,7 +29,11 @@ function renderAuctionCardInfoList(props) {
28
29
  }
29
30
  function renderAuctionCardInfoGrid(props) {
30
31
  const { product, auctionHref, displayBid, bidCount, hasCurrentBid, isEnded, remaining, resolvedBuyoutPrice, inWishlist, wishlistLoading, wishlistActions, countdownClass, mergedLabels, handleWishlist, handleNavigate } = props;
31
- return (_jsxs(_Fragment, { children: [_jsxs(Row, { align: "start", gap: "sm", children: [_jsx(TextLink, { href: auctionHref ?? "#", className: "min-w-0 flex-1 leading-snug transition-colors hover:text-primary", color: "primary", size: "sm", weight: "medium", children: product.title }), wishlistActions ? (_jsx(Button, { rounded: "full", type: "button", variant: "ghost", onClick: handleWishlist, disabled: wishlistLoading, "aria-label": inWishlist ? mergedLabels.removeFromWishlist : mergedLabels.addToWishlist, className: "-mt-0.5 p-[0.25rem]", children: _jsx(Heart, { className: `h-4 w-4 ${inWishlist ? CLS_HEART_ON : CLS_HEART_OFF}` }) })) : null] }), _jsxs(Div, { children: [_jsx(Caption, { children: isEnded && hasCurrentBid ? mergedLabels.winningBid : hasCurrentBid ? mergedLabels.currentBid : mergedLabels.startingBid }), _jsx(Text, { className: "leading-none text-primary", size: "base", weight: "bold", children: formatCurrency(displayBid, getDefaultCurrency()) }), isEnded && product.winnerDisplayName && (_jsxs(Caption, { className: "mt-0.5", color: "muted", children: [mergedLabels.wonBy, ": ", maskDisplayName(product.winnerDisplayName)] }))] }), _jsxs(Row, { wrap: true, justify: "between", gap: "sm", className: "gap-x-2 gap-y-1", children: [_jsxs(Div, { layout: "inline-flex", gap: "1", textWeight: "semibold", textSize: "xs", className: `items-[center] ${countdownClass}`, paddingY: "y-2xs", paddingX: "x-xs", rounded: "full", children: [_jsx(Clock, { className: "h-3 w-3" }), _jsx(Span, { children: formatCountdownLabel(remaining, mergedLabels.ended) })] }), _jsx(Caption, { children: mergedLabels.totalBids(bidCount) })] }), _jsx(Row, { wrap: true, gap: "xs", className: "mt-auto", children: isEnded ? (_jsx(Button, { gap: "xs", type: "button", variant: "ghost", size: "sm", textSize: "xs", paddingX: "xs", className: "flex-1 cursor-not-allowed opacity-60", disabled: true, children: _jsx(Span, { children: mergedLabels.ended }) })) : (_jsxs(_Fragment, { children: [_jsxs(Button, { gap: "xs", type: "button", variant: "warning", size: "sm", textSize: "xs", paddingX: "xs", className: "flex-1", onClick: handleNavigate, children: [_jsx(Gavel, { className: "h-3 w-3" }), _jsx(Span, { children: mergedLabels.placeBid })] }), resolvedBuyoutPrice ? (_jsxs(Button, { gap: "xs", type: "button", variant: "danger", size: "sm", textSize: "xs", paddingX: "xs", className: "flex-1", onClick: handleNavigate, children: [_jsx(ShoppingBag, { className: "h-3 w-3" }), _jsx(Span, { children: mergedLabels.buyout })] })) : null] })) })] }));
32
+ return (_jsxs(_Fragment, { children: [_jsxs(Row, { align: "start", gap: "sm", children: [_jsx(TextLink, { href: auctionHref ?? "#", className: "min-w-0 flex-1 leading-snug transition-colors hover:text-primary", color: "primary", size: "sm", weight: "medium", children: product.title }), wishlistActions ? (_jsx(Button, { rounded: "full", type: "button", variant: "ghost", onClick: handleWishlist, disabled: wishlistLoading, "aria-label": inWishlist ? mergedLabels.removeFromWishlist : mergedLabels.addToWishlist, className: "-mt-0.5 p-[0.25rem]", children: _jsx(Heart, { className: `h-4 w-4 ${inWishlist ? CLS_HEART_ON : CLS_HEART_OFF}` }) })) : null] }), _jsxs(Div, { children: [_jsx(Caption, { children: isEnded && hasCurrentBid ? mergedLabels.winningBid : hasCurrentBid ? mergedLabels.currentBid : mergedLabels.startingBid }), _jsx(Text, { className: "leading-none text-primary", size: "base", weight: "bold", children: formatCurrency(displayBid, getDefaultCurrency()) }), isEnded && product.winnerDisplayName && (_jsxs(Caption, { className: "mt-0.5", color: "muted", children: [mergedLabels.wonBy, ": ", maskDisplayName(product.winnerDisplayName)] }))] }), _jsxs(Row, { wrap: true, justify: "between", gap: "sm", className: "gap-x-2 gap-y-1", children: [_jsxs(Div, { layout: "inline-flex", gap: "1", textWeight: "semibold", textSize: "xs", className: `items-[center] ${countdownClass}`, paddingY: "y-2xs", paddingX: "x-xs", rounded: "full", children: [_jsx(Clock, { className: "h-3 w-3" }), _jsx(Span, { children: formatCountdownLabel(remaining, mergedLabels.ended) })] }), _jsx(Caption, { children: mergedLabels.totalBids(bidCount) })] }), _jsx(Row, { wrap: true, gap: "xs", className: "mt-auto", children: isEnded ? (_jsx(Button, { gap: "xs", type: "button", variant: "ghost", size: "sm", textSize: "xs", paddingX: "xs", className: "flex-1 cursor-not-allowed opacity-60", disabled: true, children: _jsx(Span, { children: mergedLabels.ended }) })) : (_jsxs(_Fragment, { children: [_jsxs(Button, { gap: "xs", type: "button", variant: "warning", size: "sm", textSize: "xs", paddingX: "xs", className: "flex-1", onClick: handleNavigate, children: [_jsx(Gavel, { className: "h-3 w-3" }), _jsx(Span, { children: mergedLabels.placeBid })] }), resolvedBuyoutPrice ? (
33
+ /* `secondary`, not `danger` — this button only navigates to the
34
+ PDP, and `danger` is reserved for destructive actions (Rule #7
35
+ kinds). ACTIONS.AUCTION["buy-it-now"] is itself `secondary`. */
36
+ _jsxs(Button, { gap: "xs", type: "button", variant: "secondary", size: "sm", textSize: "xs", paddingX: "xs", className: "flex-1", onClick: handleNavigate, children: [_jsx(ShoppingBag, { className: "h-3 w-3" }), _jsx(Span, { children: mergedLabels.buyout })] })) : null] })) })] }));
32
37
  }
33
38
  const DEFAULT_LABELS = {
34
39
  selectItem: "Select item",
@@ -107,7 +112,19 @@ export function MarketplaceAuctionCard({ product, buyoutPrice, className = "", v
107
112
  const bidCount = product.bidCount ?? 0;
108
113
  const hasCurrentBid = (product.currentBid ?? 0) > 0;
109
114
  const hasVideo = Boolean(product.video?.url);
110
- const resolvedBuyoutPrice = buyoutPrice ?? product.buyNowPrice;
115
+ // Availability is folded in HERE rather than at the render site, so the chip
116
+ // can never advertise a buyout the detail page will refuse. It used to gate on
117
+ // the price merely EXISTING, so cards linked through to a PDP with no Buy Now
118
+ // button at all. `isBuyNowAvailable` is the same predicate that page uses.
119
+ const rawBuyoutPrice = buyoutPrice ?? product.buyNowPrice;
120
+ const resolvedBuyoutPrice = isBuyNowAvailable({
121
+ buyNowPrice: rawBuyoutPrice,
122
+ currentBid: product.currentBid,
123
+ isEnded,
124
+ isSold: product.isSold === true,
125
+ })
126
+ ? rawBuyoutPrice
127
+ : undefined;
111
128
  const images = [product.mainImage, ...(product.images ?? [])].filter(Boolean);
112
129
  const currentSrc = images[imageIndex] ?? product.mainImage;
113
130
  useEffect(() => {
@@ -15,13 +15,12 @@ export interface PlaceBidFormClientProps {
15
15
  isEnded: boolean;
16
16
  auctionEndDate: Date | null;
17
17
  buyNowPrice: number | null;
18
- bidsHaveStarted?: boolean;
19
18
  bidCount: number;
20
19
  tags?: string[];
21
20
  onPlaceBid: (input: PlaceBidInput) => Promise<unknown>;
22
21
  onBuyNow?: () => Promise<unknown>;
23
22
  }
24
- export declare function PlaceBidFormClient({ productId, currentBid: ssrCurrentBid, startingBid, tiers, minBidIncrementOverride, currency, isEnded, auctionEndDate, buyNowPrice, bidsHaveStarted, bidCount: ssrBidCount, tags, onPlaceBid, onBuyNow, }: PlaceBidFormClientProps): React.JSX.Element;
23
+ export declare function PlaceBidFormClient({ productId, currentBid: ssrCurrentBid, startingBid, tiers, minBidIncrementOverride, currency, isEnded, auctionEndDate, buyNowPrice, bidCount: ssrBidCount, tags, onPlaceBid, onBuyNow, }: PlaceBidFormClientProps): React.JSX.Element;
25
24
  /**
26
25
  * `PlaceBidModalButton` — opens a modal that hosts the same PlaceBidFormClient.
27
26
  *
@@ -10,7 +10,8 @@ import { FieldInput } from "../../../ui/forms/FieldInput";
10
10
  import { applyZodIssues } from "../../../ui/forms/FormShell";
11
11
  import { placeBidSchema } from "../schemas/bid-input";
12
12
  import { useLiveAuctionBid } from "../hooks/useLiveAuctionBid";
13
- import { BID_PRESET_MULTIPLIERS, resolveMinBid, resolveMinBidIncrement, } from "../../../_internal/shared/features/auctions/config";
13
+ import { AUCTION_BUYOUT_WINDOW_MINUTES } from "../../../_internal/shared/checkout/lanes";
14
+ import { BID_PRESET_MULTIPLIERS, isBuyNowAvailable, resolveMinBid, resolveMinBidIncrement, } from "../../../_internal/shared/features/auctions/config";
14
15
  import { normalizeError } from "../../../errors/normalize";
15
16
  const __P = {
16
17
  p5: "p-[var(--appkit-space-5)]",
@@ -22,7 +23,7 @@ const BID_ERROR_DISPLAY = {
22
23
  BID_SELF_BID: "You cannot bid on your own listing.",
23
24
  BID_USER_BANNED: "Your account is currently restricted from bidding. Contact support.",
24
25
  };
25
- export function PlaceBidFormClient({ productId, currentBid: ssrCurrentBid, startingBid, tiers, minBidIncrementOverride, currency, isEnded, auctionEndDate, buyNowPrice, bidsHaveStarted = false, bidCount: ssrBidCount, tags = [], onPlaceBid, onBuyNow, }) {
26
+ export function PlaceBidFormClient({ productId, currentBid: ssrCurrentBid, startingBid, tiers, minBidIncrementOverride, currency, isEnded, auctionEndDate, buyNowPrice, bidCount: ssrBidCount, tags = [], onPlaceBid, onBuyNow, }) {
26
27
  const router = useRouter();
27
28
  // Live-updates while the bid card is open — reflects other bidders'
28
29
  // activity on this auction, not just the bidder's own submission.
@@ -97,7 +98,10 @@ export function PlaceBidFormClient({ productId, currentBid: ssrCurrentBid, start
97
98
  // presetAmount is derived from currentBid/minBidIncrement, both in deps.
98
99
  // eslint-disable-next-line react-hooks/exhaustive-deps
99
100
  }, [currentBid, minBidIncrement, stepMul]);
100
- const buyNowAvailable = buyNowPrice !== null && !isEnded && !bidsHaveStarted && !!onBuyNow;
101
+ // `currentBid` here is the LIVE SSE price, so the button hides itself the
102
+ // moment another bidder passes the buyout price — without a page reload, and
103
+ // without this component owning a second copy of the rule.
104
+ const buyNowAvailable = isBuyNowAvailable({ buyNowPrice, currentBid, isEnded }) && !!onBuyNow;
101
105
  const schema = placeBidSchema(minBid, formatCurrency(minBid, currency));
102
106
  async function submitBid(amount, setFieldError) {
103
107
  try {
@@ -205,7 +209,7 @@ export function PlaceBidFormClient({ productId, currentBid: ssrCurrentBid, start
205
209
  return applyZodIssues(parsed.error.issues, setFieldError);
206
210
  setSuccess(false);
207
211
  startTransition(() => submitBid(parsed.data.bidAmount, setFieldError));
208
- }, children: isEnded ? "Auction Ended" : "Place Bid" }), buyNowAvailable && (_jsx(Button, { variant: "secondary", size: "md", className: "w-full", type: "button", disabled: isBuyNowPending || isPending, isLoading: isBuyNowPending, onClick: handleBuyNow, children: `Buy Now — ${formatCurrency(buyNowPrice, currency)}` }))] })) }), tags.length > 0 && (_jsx(Div, { border: "default", className: "border-t", padding: "t-md", children: _jsx(Row, { wrap: true, gap: "xs", children: tags.map((tag) => (_jsx(Span, { rounded: "full", padding: "pill-sm-tall", surface: "subtle", color: "muted", size: "xs", children: tag }, tag))) }) }))] }));
212
+ }, children: isEnded ? "Auction Ended" : "Place Bid" }), buyNowAvailable && (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "secondary", size: "md", className: "w-full", type: "button", disabled: isBuyNowPending || isPending, isLoading: isBuyNowPending, onClick: handleBuyNow, children: `Buy Now — ${formatCurrency(buyNowPrice, currency)}` }), _jsxs(Text, { align: "center", size: "xs", color: "muted", children: ["Skips the bidding. The auction stays live until you pay \u2014 complete checkout within ", AUCTION_BUYOUT_WINDOW_MINUTES, " minutes."] })] }))] })) }), tags.length > 0 && (_jsx(Div, { border: "default", className: "border-t", padding: "t-md", children: _jsx(Row, { wrap: true, gap: "xs", children: tags.map((tag) => (_jsx(Span, { rounded: "full", padding: "pill-sm-tall", surface: "subtle", color: "muted", size: "xs", children: tag }, tag))) }) }))] }));
209
213
  }
210
214
  /**
211
215
  * `PlaceBidModalButton` — opens a modal that hosts the same PlaceBidFormClient.
@@ -66,6 +66,19 @@ export declare class BidRepository extends BaseRepository<BidDocument> {
66
66
  */
67
67
  markForfeited(bidId: string): Promise<void>;
68
68
  markLost(batch: WriteBatch, ref: DocumentReference): void;
69
+ /**
70
+ * Batched "everyone else lost", for callers that are not already inside a
71
+ * batch of their own — a Buy Now purchase ends the auction outside the
72
+ * settlement job, and the losing bids can be any number, so this writes them
73
+ * in Firestore-batch chunks rather than one round-trip per bid.
74
+ */
75
+ markManyLost(refs: readonly DocumentReference[]): Promise<void>;
76
+ /**
77
+ * A pending Buy Now claim that never became a sale. Not `forfeited` — that
78
+ * status means "won, then defaulted", and a lapsed claim never won anything;
79
+ * the auction it was placed against carried on untouched.
80
+ */
81
+ markCancelled(bidId: string): Promise<void>;
69
82
  markOutbid(batch: WriteBatch, ref: DocumentReference): void;
70
83
  markWinning(batch: WriteBatch, ref: DocumentReference): void;
71
84
  /**
@@ -148,6 +148,29 @@ export class BidRepository extends BaseRepository {
148
148
  updatedAt: new Date(),
149
149
  });
150
150
  }
151
+ /**
152
+ * Batched "everyone else lost", for callers that are not already inside a
153
+ * batch of their own — a Buy Now purchase ends the auction outside the
154
+ * settlement job, and the losing bids can be any number, so this writes them
155
+ * in Firestore-batch chunks rather than one round-trip per bid.
156
+ */
157
+ async markManyLost(refs) {
158
+ const CHUNK = 400; // under Firestore's 500-write batch limit, with headroom
159
+ for (let i = 0; i < refs.length; i += CHUNK) {
160
+ const batch = this.db.batch();
161
+ for (const ref of refs.slice(i, i + CHUNK))
162
+ this.markLost(batch, ref);
163
+ await batch.commit();
164
+ }
165
+ }
166
+ /**
167
+ * A pending Buy Now claim that never became a sale. Not `forfeited` — that
168
+ * status means "won, then defaulted", and a lapsed claim never won anything;
169
+ * the auction it was placed against carried on untouched.
170
+ */
171
+ async markCancelled(bidId) {
172
+ await this.update(bidId, { status: "cancelled", isWinning: false, updatedAt: new Date() });
173
+ }
151
174
  markOutbid(batch, ref) {
152
175
  batch.update(ref, {
153
176
  status: "outbid",
@@ -35,6 +35,23 @@ export interface BidDocument extends BaseDocument {
35
35
  * a dead status badge.
36
36
  */
37
37
  orderId?: string;
38
+ /**
39
+ * True when this bid was created by Buy Now rather than by a buyer typing an
40
+ * amount. Its `bidAmount` is the listing's `buyNowPrice`.
41
+ *
42
+ * A buyout bid starts `active` like any other, but is NOT an ordinary bid in
43
+ * two respects and both are load-bearing:
44
+ * 1. **Auction settlement must ignore it.** A pending buyout sits at the BIN
45
+ * price, so it would otherwise win by default the moment the auction's
46
+ * clock ran out — awarding the item to someone who explicitly did not
47
+ * complete their purchase in time.
48
+ * 2. **It never moves `product.currentBid`.** A pending claim is not a
49
+ * public price, and inflating the visible bid to the BIN price would make
50
+ * `isBuyNowAvailable` false for everybody else, silently making the
51
+ * buyout single-occupancy. Concurrency is settled by the transaction in
52
+ * `claimAuctionForCheckout`, not by blocking the second buyer up front.
53
+ */
54
+ isBuyout?: boolean;
38
55
  }
39
56
  export declare const BID_COLLECTION: "bids";
40
57
  export declare const BID_INDEXED_FIELDS: readonly ["productId", "userId", "status", "isWinning", "bidDate", "createdAt"];
@@ -67,19 +67,20 @@ export declare const auctionItemSchema: z.ZodObject<{
67
67
  title: string;
68
68
  createdAt: string;
69
69
  updatedAt: string;
70
- featured: boolean;
71
- listingType: "auction";
72
70
  slug: string;
73
71
  price: number;
72
+ sellerId: string;
73
+ featured: boolean;
74
+ listingType: "auction";
74
75
  auctionEndDate: string;
75
76
  startingBid: number;
76
77
  bidCount: number;
77
- sellerId: string;
78
78
  storeId?: string | undefined;
79
79
  description?: string | undefined;
80
80
  mainImage?: string | undefined;
81
81
  images?: string[] | undefined;
82
82
  currentBid?: number | undefined;
83
+ storeSlug?: string | undefined;
83
84
  media?: {
84
85
  type: "video" | "image" | "file";
85
86
  url: string;
@@ -89,7 +90,6 @@ export declare const auctionItemSchema: z.ZodObject<{
89
90
  youtubeId?: string | undefined;
90
91
  duration?: number | undefined;
91
92
  }[] | undefined;
92
- storeSlug?: string | undefined;
93
93
  }, {
94
94
  currency: string;
95
95
  status: "draft" | "published" | "archived" | "sold";
@@ -97,19 +97,20 @@ export declare const auctionItemSchema: z.ZodObject<{
97
97
  title: string;
98
98
  createdAt: string;
99
99
  updatedAt: string;
100
- featured: boolean;
101
- listingType: "auction";
102
100
  slug: string;
103
101
  price: number;
102
+ sellerId: string;
103
+ featured: boolean;
104
+ listingType: "auction";
104
105
  auctionEndDate: string;
105
106
  startingBid: number;
106
107
  bidCount: number;
107
- sellerId: string;
108
108
  storeId?: string | undefined;
109
109
  description?: string | undefined;
110
110
  mainImage?: string | undefined;
111
111
  images?: string[] | undefined;
112
112
  currentBid?: number | undefined;
113
+ storeSlug?: string | undefined;
113
114
  media?: {
114
115
  type: "video" | "image" | "file";
115
116
  url: string;
@@ -119,7 +120,6 @@ export declare const auctionItemSchema: z.ZodObject<{
119
120
  youtubeId?: string | undefined;
120
121
  duration?: number | undefined;
121
122
  }[] | undefined;
122
- storeSlug?: string | undefined;
123
123
  }>;
124
124
  export declare const bidRecordSchema: z.ZodObject<{
125
125
  id: z.ZodString;
@@ -134,18 +134,18 @@ export declare const bidRecordSchema: z.ZodObject<{
134
134
  currency: string;
135
135
  id: string;
136
136
  amount: number;
137
- auctionId: string;
138
137
  bidderId: string;
139
138
  isWinning: boolean;
139
+ auctionId: string;
140
140
  placedAt: string;
141
141
  bidderDisplayName?: string | undefined;
142
142
  }, {
143
143
  currency: string;
144
144
  id: string;
145
145
  amount: number;
146
- auctionId: string;
147
146
  bidderId: string;
148
147
  isWinning: boolean;
148
+ auctionId: string;
149
149
  placedAt: string;
150
150
  bidderDisplayName?: string | undefined;
151
151
  }>;
@@ -159,12 +159,12 @@ export declare const auctionListParamsSchema: z.ZodObject<{
159
159
  sort?: string | undefined;
160
160
  page?: number | undefined;
161
161
  pageSize?: number | undefined;
162
- filters?: string | undefined;
163
162
  storeSlug?: string | undefined;
163
+ filters?: string | undefined;
164
164
  }, {
165
165
  sort?: string | undefined;
166
166
  page?: number | undefined;
167
167
  pageSize?: number | undefined;
168
- filters?: string | undefined;
169
168
  storeSlug?: string | undefined;
169
+ filters?: string | undefined;
170
170
  }>;
@@ -11,7 +11,7 @@
11
11
  * Permission naming: admin:resource:action
12
12
  * Ban action naming: plain verb phrase — write_reviews, place_bids, etc.
13
13
  */
14
- export type Permission = "admin:dashboard:view" | "admin:users:read" | "admin:users:write" | "admin:users:delete" | "admin:user-bans:read" | "admin:user-bans:write" | "admin:products:read" | "admin:products:write" | "admin:products:delete" | "admin:orders:read" | "admin:orders:write" | "admin:returns:read" | "admin:returns:write" | "admin:stores:read" | "admin:stores:write" | "admin:store-addresses:read" | "admin:addresses:read" | "admin:addresses:write" | "admin:analytics:view" | "admin:payouts:read" | "admin:payouts:write" | "admin:audit-log:read" | "admin:categories:read" | "admin:categories:write" | "admin:categories:delete" | "admin:brands:read" | "admin:brands:write" | "admin:brands:delete" | "admin:coupons:read" | "admin:coupons:write" | "admin:coupons:delete" | "admin:deals:read" | "admin:deals:write" | "admin:featured:read" | "admin:featured:write" | "admin:reviews:read" | "admin:reviews:write" | "admin:reviews:delete" | "admin:blog:read" | "admin:blog:write" | "admin:blog:delete" | "admin:blog:publish" | "admin:bids:read" | "admin:bids:write" | "admin:media:read" | "admin:media:write" | "admin:media:delete" | "admin:site:read" | "admin:site:write" | "admin:settings:write" | "admin:navigation:read" | "admin:navigation:write" | "admin:sections:read" | "admin:sections:write" | "admin:carousel:read" | "admin:carousel:write" | "admin:carousel:delete" | "admin:ads:read" | "admin:ads:write" | "admin:ads:delete" | "admin:faqs:read" | "admin:faqs:write" | "admin:faqs:delete" | "admin:tester-checklist:read" | "admin:tester-checklist:write" | "admin:tester-checklist:delete" | "admin:tester-feedback:read" | "admin:tester-feedback:write" | "admin:newsletter:read" | "admin:newsletter:write" | "admin:contact:read" | "admin:events:read" | "admin:events:write" | "admin:events:delete" | "admin:event-entries:read" | "admin:event-entries:write" | "admin:support-tickets:read" | "admin:support-tickets:write" | "admin:shipments:read" | "admin:shipments:write" | "admin:catalogue:read" | "admin:catalogue:write" | "admin:support-tickets:assign" | "admin:support-tickets:close" | "admin:scammers:read" | "admin:scammers:write" | "admin:scammers:verify" | "admin:scammers:delete" | "admin:sessions:read" | "admin:sessions:delete" | "admin:notifications:read" | "admin:notifications:write" | "admin:carts:read" | "admin:wishlists:read" | "admin:feature-flags:read" | "admin:feature-flags:write" | "admin:copilot:view" | "admin:team:read" | "admin:team:write" | "admin:maintenance:view-server-errors" | "admin:maintenance:view-client-errors" | "admin:maintenance:view-function-errors" | "admin:maintenance:view-cloud-logs" | "admin:maintenance:view-payment-rollbacks" | "admin:maintenance:run-analysis" | "admin:maintenance:purge-errors";
14
+ export type Permission = "admin:dashboard:view" | "admin:users:read" | "admin:users:write" | "admin:users:delete" | "admin:user-bans:read" | "admin:user-bans:write" | "admin:products:read" | "admin:products:write" | "admin:products:delete" | "admin:orders:read" | "admin:orders:write" | "admin:returns:read" | "admin:returns:write" | "admin:stores:read" | "admin:stores:write" | "admin:store-addresses:read" | "admin:addresses:read" | "admin:addresses:write" | "admin:analytics:view" | "admin:payouts:read" | "admin:payouts:write" | "admin:audit-log:read" | "admin:categories:read" | "admin:categories:write" | "admin:categories:delete" | "admin:brands:read" | "admin:brands:write" | "admin:brands:delete" | "admin:coupons:read" | "admin:coupons:write" | "admin:coupons:delete" | "admin:deals:read" | "admin:deals:write" | "admin:featured:read" | "admin:featured:write" | "admin:reviews:read" | "admin:reviews:write" | "admin:reviews:delete" | "admin:blog:read" | "admin:blog:write" | "admin:blog:delete" | "admin:blog:publish" | "admin:bids:read" | "admin:bids:write" | "admin:offers:read" | "admin:offers:write" | "admin:media:read" | "admin:media:write" | "admin:media:delete" | "admin:site:read" | "admin:site:write" | "admin:settings:write" | "admin:navigation:read" | "admin:navigation:write" | "admin:sections:read" | "admin:sections:write" | "admin:carousel:read" | "admin:carousel:write" | "admin:carousel:delete" | "admin:ads:read" | "admin:ads:write" | "admin:ads:delete" | "admin:faqs:read" | "admin:faqs:write" | "admin:faqs:delete" | "admin:tester-checklist:read" | "admin:tester-checklist:write" | "admin:tester-checklist:delete" | "admin:tester-feedback:read" | "admin:tester-feedback:write" | "admin:newsletter:read" | "admin:newsletter:write" | "admin:contact:read" | "admin:events:read" | "admin:events:write" | "admin:events:delete" | "admin:event-entries:read" | "admin:event-entries:write" | "admin:support-tickets:read" | "admin:support-tickets:write" | "admin:shipments:read" | "admin:shipments:write" | "admin:catalogue:read" | "admin:catalogue:write" | "admin:support-tickets:assign" | "admin:support-tickets:close" | "admin:scammers:read" | "admin:scammers:write" | "admin:scammers:verify" | "admin:scammers:delete" | "admin:sessions:read" | "admin:sessions:delete" | "admin:notifications:read" | "admin:notifications:write" | "admin:carts:read" | "admin:wishlists:read" | "admin:feature-flags:read" | "admin:feature-flags:write" | "admin:copilot:view" | "admin:team:read" | "admin:team:write" | "admin:maintenance:view-server-errors" | "admin:maintenance:view-client-errors" | "admin:maintenance:view-function-errors" | "admin:maintenance:view-cloud-logs" | "admin:maintenance:view-payment-rollbacks" | "admin:maintenance:run-analysis" | "admin:maintenance:purge-errors";
15
15
  /**
16
16
  * Granular user actions that can be soft-banned individually.
17
17
  * A user may have multiple simultaneous soft bans of different types.
@@ -161,6 +161,7 @@ export const PERMISSION_GROUPS = {
161
161
  "admin:carts:read",
162
162
  "admin:wishlists:read",
163
163
  "admin:bids:read",
164
+ "admin:offers:read",
164
165
  ],
165
166
  customer_support: [
166
167
  "admin:dashboard:view",
@@ -212,6 +213,8 @@ export const PERMISSION_GROUPS = {
212
213
  "admin:reviews:delete",
213
214
  "admin:bids:read",
214
215
  "admin:bids:write",
216
+ "admin:offers:read",
217
+ "admin:offers:write",
215
218
  "admin:sessions:read",
216
219
  "admin:sessions:delete",
217
220
  "admin:carts:read",
@@ -226,6 +229,8 @@ export const PERMISSION_GROUPS = {
226
229
  "admin:dashboard:view",
227
230
  "admin:bids:read",
228
231
  "admin:bids:write",
232
+ "admin:offers:read",
233
+ "admin:offers:write",
229
234
  "admin:products:read",
230
235
  "admin:orders:read",
231
236
  "admin:users:read",
@@ -280,6 +285,7 @@ export const ROUTE_PERMISSION_MAP = {
280
285
  "/admin/reviews": "admin:reviews:read",
281
286
  "/admin/blog": "admin:blog:read",
282
287
  "/admin/bids": "admin:bids:read",
288
+ "/admin/offers": "admin:offers:read",
283
289
  "/admin/media": "admin:media:read",
284
290
  "/admin/site": "admin:site:read",
285
291
  "/admin/settings": "admin:settings:write",
@@ -357,7 +363,10 @@ export const PERMISSION_DOMAINS = [
357
363
  { label: "Dashboard", prefix: "admin:dashboard:" },
358
364
  { label: "Users & Bans", prefix: "admin:users:|admin:user-bans:" },
359
365
  { label: "Products", prefix: "admin:products:" },
360
- { label: "Orders & Returns", prefix: "admin:orders:|admin:returns:" },
366
+ // Offers sit with Orders, not with Content where Bids live: an offer is a
367
+ // commerce-pipeline object that ends in an order, and the permissions
368
+ // catalogue should group it where an operator would look for it.
369
+ { label: "Orders & Returns", prefix: "admin:orders:|admin:returns:|admin:offers:" },
361
370
  { label: "Stores", prefix: "admin:stores:|admin:store-addresses:" },
362
371
  { label: "Finance", prefix: "admin:analytics:|admin:payouts:" },
363
372
  { label: "Catalog", prefix: "admin:categories:|admin:brands:|admin:coupons:|admin:deals:|admin:featured:" },
@@ -72,8 +72,8 @@ export declare const createBlogPostSchema: z.ZodObject<{
72
72
  status: "draft" | "published" | "archived";
73
73
  title: string;
74
74
  content: string;
75
- category: "news" | "tips" | "guides" | "updates" | "community";
76
75
  slug: string;
76
+ category: "news" | "tips" | "guides" | "updates" | "community";
77
77
  tags: string[];
78
78
  isFeatured: boolean;
79
79
  excerpt: string;
@@ -108,13 +108,13 @@ export declare const createBlogPostSchema: z.ZodObject<{
108
108
  }, {
109
109
  title: string;
110
110
  content: string;
111
- category: "news" | "tips" | "guides" | "updates" | "community";
112
111
  slug: string;
112
+ category: "news" | "tips" | "guides" | "updates" | "community";
113
113
  excerpt: string;
114
114
  status?: "draft" | "published" | "archived" | undefined;
115
115
  tags?: string[] | undefined;
116
- isFeatured?: boolean | undefined;
117
116
  publishedAt?: string | undefined;
117
+ isFeatured?: boolean | undefined;
118
118
  coverImage?: string | {
119
119
  type: "video" | "image" | "file";
120
120
  url: string;
@@ -211,11 +211,11 @@ export declare const updateBlogPostSchema: z.ZodObject<{
211
211
  status?: "draft" | "published" | "archived" | undefined;
212
212
  title?: string | undefined;
213
213
  content?: string | undefined;
214
- category?: "news" | "tips" | "guides" | "updates" | "community" | undefined;
215
214
  slug?: string | undefined;
215
+ category?: "news" | "tips" | "guides" | "updates" | "community" | undefined;
216
216
  tags?: string[] | undefined;
217
- isFeatured?: boolean | undefined;
218
217
  publishedAt?: string | undefined;
218
+ isFeatured?: boolean | undefined;
219
219
  excerpt?: string | undefined;
220
220
  coverImage?: {
221
221
  type: "video" | "image" | "file";
@@ -248,11 +248,11 @@ export declare const updateBlogPostSchema: z.ZodObject<{
248
248
  status?: "draft" | "published" | "archived" | undefined;
249
249
  title?: string | undefined;
250
250
  content?: string | undefined;
251
- category?: "news" | "tips" | "guides" | "updates" | "community" | undefined;
252
251
  slug?: string | undefined;
252
+ category?: "news" | "tips" | "guides" | "updates" | "community" | undefined;
253
253
  tags?: string[] | undefined;
254
- isFeatured?: boolean | undefined;
255
254
  publishedAt?: string | undefined;
255
+ isFeatured?: boolean | undefined;
256
256
  excerpt?: string | undefined;
257
257
  coverImage?: string | {
258
258
  type: "video" | "image" | "file";
@@ -125,8 +125,8 @@ export declare const blogPostFirestoreSchema: z.ZodObject<{
125
125
  updatedAt: string | Date | z.objectOutputType<{
126
126
  toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
127
127
  }, z.ZodTypeAny, "passthrough">;
128
- category: string;
129
128
  slug: string;
129
+ category: string;
130
130
  tags: string[];
131
131
  isFeatured: boolean;
132
132
  excerpt: string;
@@ -178,8 +178,8 @@ export declare const blogPostFirestoreSchema: z.ZodObject<{
178
178
  updatedAt: string | Date | z.objectInputType<{
179
179
  toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
180
180
  }, z.ZodTypeAny, "passthrough">;
181
- category: string;
182
181
  slug: string;
182
+ category: string;
183
183
  tags: string[];
184
184
  isFeatured: boolean;
185
185
  excerpt: string;
@@ -358,8 +358,8 @@ export declare const blogPostSchema: z.ZodObject<{
358
358
  status: "draft" | "published" | "archived";
359
359
  id: string;
360
360
  title: string;
361
- category: "news" | "tips" | "guides" | "updates" | "community";
362
361
  slug: string;
362
+ category: "news" | "tips" | "guides" | "updates" | "community";
363
363
  coverImage: {
364
364
  type: "video" | "image" | "file";
365
365
  url: string;
@@ -394,8 +394,8 @@ export declare const blogPostSchema: z.ZodObject<{
394
394
  createdAt?: string | undefined;
395
395
  updatedAt?: string | undefined;
396
396
  tags?: string[] | undefined;
397
- isFeatured?: boolean | undefined;
398
397
  publishedAt?: string | undefined;
398
+ isFeatured?: boolean | undefined;
399
399
  excerpt?: string | undefined;
400
400
  authorId?: string | undefined;
401
401
  authorName?: string | undefined;
@@ -408,14 +408,14 @@ export declare const blogPostSchema: z.ZodObject<{
408
408
  status: "draft" | "published" | "archived";
409
409
  id: string;
410
410
  title: string;
411
- category: "news" | "tips" | "guides" | "updates" | "community";
412
411
  slug: string;
412
+ category: "news" | "tips" | "guides" | "updates" | "community";
413
413
  content?: string | undefined;
414
414
  createdAt?: string | undefined;
415
415
  updatedAt?: string | undefined;
416
416
  tags?: string[] | undefined;
417
- isFeatured?: boolean | undefined;
418
417
  publishedAt?: string | undefined;
418
+ isFeatured?: boolean | undefined;
419
419
  excerpt?: string | undefined;
420
420
  coverImage?: string | {
421
421
  type: "video" | "image" | "file";
@@ -100,6 +100,7 @@ export class CartRepository extends BaseRepository {
100
100
  ...(input.isAuctionWin !== undefined && { isAuctionWin: input.isAuctionWin }),
101
101
  ...(input.auctionId !== undefined && { auctionId: input.auctionId }),
102
102
  ...(input.bidId !== undefined && { bidId: input.bidId }),
103
+ ...(input.isBuyout !== undefined && { isBuyout: input.isBuyout }),
103
104
  ...(input.lockedPrice !== undefined && {
104
105
  lockedPrice: input.lockedPrice,
105
106
  }),
@@ -38,6 +38,19 @@ export interface CartItemDocument {
38
38
  auctionId?: string;
39
39
  /** The winning bid, so the resulting order can be linked back to it. */
40
40
  bidId?: string;
41
+ /**
42
+ * True when this auction line came from Buy Now rather than from settlement.
43
+ *
44
+ * The two are NOT interchangeable even though both sit in the auction lane:
45
+ * - a settlement line is a FINISHED auction — the item is already sold, the
46
+ * buyer owes it, and the 48h window costs nobody anything;
47
+ * - a buyout line is a CLAIM on an auction that is still live and still
48
+ * taking bids. The item is not sold yet; it becomes sold only when
49
+ * `claimAuctionForCheckout` commits at order time. Hence the 1h window,
50
+ * and hence a lapse that cancels the bid rather than forfeiting it —
51
+ * nothing was won, so nothing is forfeited, and the auction is untouched.
52
+ */
53
+ isBuyout?: boolean;
41
54
  /** Locked offer/winning-bid price — overrides normal product price at checkout */
42
55
  lockedPrice?: number;
43
56
  /**
@@ -158,6 +171,8 @@ export type AddToCartInput = {
158
171
  isAuctionWin?: boolean;
159
172
  auctionId?: string;
160
173
  bidId?: string;
174
+ /** See `CartItemDocument.isBuyout` — a claim on a live auction, not a win. */
175
+ isBuyout?: boolean;
161
176
  lockedPrice?: number;
162
177
  checkoutDeadline?: Date;
163
178
  locked?: boolean;
@@ -13,8 +13,8 @@ export declare const createCatalogueItemSchema: z.ZodObject<{
13
13
  }, "strip", z.ZodTypeAny, {
14
14
  title: string;
15
15
  images: string[];
16
- visibility: "public" | "private";
17
16
  quantity: number;
17
+ visibility: "public" | "private";
18
18
  description?: string | undefined;
19
19
  categorySlugs?: string[] | undefined;
20
20
  brandSlug?: string | undefined;
@@ -30,8 +30,8 @@ export declare const createCatalogueItemSchema: z.ZodObject<{
30
30
  mainImage?: string | undefined;
31
31
  images?: string[] | undefined;
32
32
  condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | "graded" | undefined;
33
- visibility?: "public" | "private" | undefined;
34
33
  quantity?: number | undefined;
34
+ visibility?: "public" | "private" | undefined;
35
35
  }>;
36
36
  export declare const updateCatalogueItemSchema: z.ZodObject<{
37
37
  title: z.ZodOptional<z.ZodString>;
@@ -53,8 +53,8 @@ export declare const updateCatalogueItemSchema: z.ZodObject<{
53
53
  mainImage?: string | undefined;
54
54
  images?: string[] | undefined;
55
55
  condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | "graded" | undefined;
56
- visibility?: "public" | "private" | undefined;
57
56
  quantity?: number | undefined;
57
+ visibility?: "public" | "private" | undefined;
58
58
  }, {
59
59
  title?: string | undefined;
60
60
  description?: string | undefined;
@@ -64,8 +64,8 @@ export declare const updateCatalogueItemSchema: z.ZodObject<{
64
64
  mainImage?: string | undefined;
65
65
  images?: string[] | undefined;
66
66
  condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | "graded" | undefined;
67
- visibility?: "public" | "private" | undefined;
68
67
  quantity?: number | undefined;
68
+ visibility?: "public" | "private" | undefined;
69
69
  }>;
70
70
  export type CreateCatalogueItemInput = z.infer<typeof createCatalogueItemSchema>;
71
71
  export type UpdateCatalogueItemInput = z.infer<typeof updateCatalogueItemSchema>;