@mohasinac/appkit 2.7.53 → 2.7.55

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 (197) hide show
  1. package/dist/_internal/client/features/layout/DashboardLayoutClient.js +1 -1
  2. package/dist/_internal/server/jobs/core/auctionSettlement.js +6 -3
  3. package/dist/_internal/server/jobs/core/bundleStockSync.js +9 -7
  4. package/dist/_internal/server/jobs/core/onProductStockChange.d.ts +12 -3
  5. package/dist/_internal/server/jobs/core/onProductStockChange.js +12 -13
  6. package/dist/_internal/server/jobs/core/onProductWrite.js +1 -3
  7. package/dist/_internal/server/jobs/handlers/onProductStockChange.js +11 -2
  8. package/dist/_internal/server/jobs/runtime/adapters/firebase.js +5 -14
  9. package/dist/_internal/shared/actions/action-registry.js +827 -4
  10. package/dist/_internal/shared/features/events/schema.d.ts +4 -4
  11. package/dist/client.d.ts +2 -0
  12. package/dist/client.js +1 -0
  13. package/dist/constants/api-endpoints.d.ts +3 -0
  14. package/dist/constants/api-endpoints.js +1 -0
  15. package/dist/constants/field-names.d.ts +4 -3
  16. package/dist/constants/field-names.js +8 -8
  17. package/dist/errors/error-codes.d.ts +3 -0
  18. package/dist/errors/error-codes.js +3 -0
  19. package/dist/errors/messages.d.ts +3 -0
  20. package/dist/errors/messages.js +3 -0
  21. package/dist/features/account/components/UserOffersPanel.js +2 -1
  22. package/dist/features/admin/components/AdminAllEventEntriesView.js +4 -3
  23. package/dist/features/admin/components/AdminBidsView.js +5 -3
  24. package/dist/features/admin/components/AdminBlogView.js +3 -2
  25. package/dist/features/admin/components/AdminBrandsView.js +2 -1
  26. package/dist/features/admin/components/AdminBundleEditorView.js +4 -5
  27. package/dist/features/admin/components/AdminBundlesView.js +3 -3
  28. package/dist/features/admin/components/AdminCarouselView.d.ts +2 -1
  29. package/dist/features/admin/components/AdminCarouselView.js +14 -5
  30. package/dist/features/admin/components/AdminCategoriesView.js +2 -1
  31. package/dist/features/admin/components/AdminContactView.d.ts +4 -1
  32. package/dist/features/admin/components/AdminContactView.js +27 -7
  33. package/dist/features/admin/components/AdminCouponsView.d.ts +3 -1
  34. package/dist/features/admin/components/AdminCouponsView.js +17 -3
  35. package/dist/features/admin/components/AdminFaqsView.d.ts +3 -1
  36. package/dist/features/admin/components/AdminFaqsView.js +18 -4
  37. package/dist/features/admin/components/AdminFeaturesView.js +2 -1
  38. package/dist/features/admin/components/AdminMediaView.js +3 -2
  39. package/dist/features/admin/components/AdminNavigationView.js +3 -2
  40. package/dist/features/admin/components/AdminNewsletterView.d.ts +2 -1
  41. package/dist/features/admin/components/AdminNewsletterView.js +13 -4
  42. package/dist/features/admin/components/AdminNotificationsView.js +6 -4
  43. package/dist/features/admin/components/AdminOrdersView.js +4 -3
  44. package/dist/features/admin/components/AdminPayoutsView.js +2 -2
  45. package/dist/features/admin/components/AdminPrizeDrawsView.js +2 -1
  46. package/dist/features/admin/components/AdminProductsView.js +3 -3
  47. package/dist/features/admin/components/AdminReviewsView.js +4 -3
  48. package/dist/features/admin/components/AdminScammersView.js +2 -1
  49. package/dist/features/admin/components/AdminSessionsView.js +5 -3
  50. package/dist/features/admin/components/AdminStoresView.js +2 -2
  51. package/dist/features/admin/components/AdminSublistingCategoriesView.d.ts +5 -1
  52. package/dist/features/admin/components/AdminSublistingCategoriesView.js +12 -3
  53. package/dist/features/admin/components/AdminSupportTicketsView.js +2 -1
  54. package/dist/features/admin/components/AdminTeamView.d.ts +2 -1
  55. package/dist/features/admin/components/AdminTeamView.js +13 -4
  56. package/dist/features/admin/components/AdminUsersView.js +2 -2
  57. package/dist/features/admin/types/product.types.d.ts +1 -1
  58. package/dist/features/admin/types/product.types.js +2 -3
  59. package/dist/features/auctions/actions/bid-actions.d.ts +9 -0
  60. package/dist/features/auctions/actions/bid-actions.js +61 -0
  61. package/dist/features/auctions/components/AuctionDetailPageView.d.ts +2 -1
  62. package/dist/features/auctions/components/AuctionDetailPageView.js +5 -4
  63. package/dist/features/auctions/components/PlaceBidFormClient.d.ts +3 -1
  64. package/dist/features/auctions/components/PlaceBidFormClient.js +32 -2
  65. package/dist/features/auctions/types/index.d.ts +1 -1
  66. package/dist/features/layout/AppLayoutShell.js +1 -1
  67. package/dist/features/pre-orders/components/PreOrdersIndexListing.js +2 -11
  68. package/dist/features/products/api/[id]/route.js +4 -8
  69. package/dist/features/products/api/route.js +1 -3
  70. package/dist/features/products/components/AuctionsIndexListing.js +3 -11
  71. package/dist/features/products/components/PrizeDrawsIndexListing.js +2 -10
  72. package/dist/features/products/components/ProductFilters.d.ts +33 -9
  73. package/dist/features/products/components/ProductFilters.js +6 -29
  74. package/dist/features/products/components/ProductForm.js +2 -3
  75. package/dist/features/products/constants/action-defs.d.ts +86 -7
  76. package/dist/features/products/constants/action-defs.js +99 -7
  77. package/dist/features/products/constants/sieve.d.ts +162 -0
  78. package/dist/features/products/constants/sieve.js +95 -0
  79. package/dist/features/products/repository/products.repository.d.ts +5 -0
  80. package/dist/features/products/repository/products.repository.js +23 -3
  81. package/dist/features/products/schemas/firestore.d.ts +4 -4
  82. package/dist/features/products/schemas/firestore.js +2 -3
  83. package/dist/features/products/schemas/index.d.ts +6 -6
  84. package/dist/features/products/schemas/index.js +2 -6
  85. package/dist/features/products/types/index.d.ts +1 -1
  86. package/dist/features/seller/actions/offer-actions.js +2 -2
  87. package/dist/features/seller/components/QuickProductForm.d.ts +13 -0
  88. package/dist/features/seller/components/QuickProductForm.js +50 -0
  89. package/dist/features/seller/components/SellerAuctionsView.d.ts +4 -1
  90. package/dist/features/seller/components/SellerAuctionsView.js +37 -3
  91. package/dist/features/seller/components/SellerBidsView.js +2 -1
  92. package/dist/features/seller/components/SellerBundlesView.d.ts +3 -1
  93. package/dist/features/seller/components/SellerBundlesView.js +38 -5
  94. package/dist/features/seller/components/SellerClassifiedView.d.ts +3 -1
  95. package/dist/features/seller/components/SellerClassifiedView.js +37 -4
  96. package/dist/features/seller/components/SellerDigitalCodesView.d.ts +3 -1
  97. package/dist/features/seller/components/SellerDigitalCodesView.js +37 -4
  98. package/dist/features/seller/components/SellerGoogleReviewsView.js +2 -1
  99. package/dist/features/seller/components/SellerGroupedListingsView.js +3 -2
  100. package/dist/features/seller/components/SellerLiveView.d.ts +3 -1
  101. package/dist/features/seller/components/SellerLiveView.js +37 -4
  102. package/dist/features/seller/components/SellerOffersPanel.js +2 -1
  103. package/dist/features/seller/components/SellerOffersView.d.ts +4 -1
  104. package/dist/features/seller/components/SellerOffersView.js +8 -3
  105. package/dist/features/seller/components/SellerPayoutsView.d.ts +3 -1
  106. package/dist/features/seller/components/SellerPayoutsView.js +7 -3
  107. package/dist/features/seller/components/SellerPreOrdersView.d.ts +2 -1
  108. package/dist/features/seller/components/SellerPreOrdersView.js +30 -7
  109. package/dist/features/seller/components/SellerPrizeDrawsView.d.ts +2 -1
  110. package/dist/features/seller/components/SellerPrizeDrawsView.js +30 -7
  111. package/dist/features/seller/components/SellerProductShell.js +12 -0
  112. package/dist/features/seller/components/SellerReviewsView.js +2 -1
  113. package/dist/features/seller/components/SellerShippingConfigsView.js +3 -2
  114. package/dist/features/seller/components/SellerStoreCategoriesView.js +6 -5
  115. package/dist/features/seller/components/SellerTemplatesView.js +4 -3
  116. package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +30 -16
  117. package/dist/features/wishlist/types/index.d.ts +1 -1
  118. package/dist/index.d.ts +6 -3
  119. package/dist/index.js +6 -4
  120. package/dist/seed/addresses-seed-data.d.ts +2 -18
  121. package/dist/seed/addresses-seed-data.js +137 -203
  122. package/dist/seed/bids-seed-data.d.ts +2 -8
  123. package/dist/seed/bids-seed-data.js +172 -648
  124. package/dist/seed/blog-posts-seed-data.d.ts +0 -5
  125. package/dist/seed/blog-posts-seed-data.js +341 -596
  126. package/dist/seed/carousel-slides-seed-data.d.ts +0 -5
  127. package/dist/seed/carousel-slides-seed-data.js +61 -192
  128. package/dist/seed/carousels-seed-data.js +18 -1
  129. package/dist/seed/cart-seed-data.d.ts +1 -18
  130. package/dist/seed/cart-seed-data.js +116 -293
  131. package/dist/seed/categories-seed-data.d.ts +0 -6
  132. package/dist/seed/categories-seed-data.js +1409 -1537
  133. package/dist/seed/claimed-coupons-seed-data.d.ts +0 -11
  134. package/dist/seed/claimed-coupons-seed-data.js +32 -29
  135. package/dist/seed/conversations-seed-data.d.ts +0 -6
  136. package/dist/seed/conversations-seed-data.js +132 -280
  137. package/dist/seed/coupon-usage-seed-data.d.ts +0 -16
  138. package/dist/seed/coupon-usage-seed-data.js +30 -44
  139. package/dist/seed/coupons-seed-data.d.ts +0 -6
  140. package/dist/seed/coupons-seed-data.js +141 -489
  141. package/dist/seed/events-seed-data.d.ts +0 -6
  142. package/dist/seed/events-seed-data.js +201 -379
  143. package/dist/seed/faq-seed-data.d.ts +0 -14
  144. package/dist/seed/faq-seed-data.js +609 -1184
  145. package/dist/seed/grouped-listings-seed-data.d.ts +119 -8
  146. package/dist/seed/grouped-listings-seed-data.js +148 -233
  147. package/dist/seed/history-seed-data.d.ts +0 -7
  148. package/dist/seed/history-seed-data.js +50 -54
  149. package/dist/seed/homepage-sections-seed-data.d.ts +0 -5
  150. package/dist/seed/homepage-sections-seed-data.js +83 -175
  151. package/dist/seed/index.d.ts +1 -1
  152. package/dist/seed/index.js +1 -1
  153. package/dist/seed/manifest.js +2 -2
  154. package/dist/seed/notifications-seed-data.d.ts +0 -6
  155. package/dist/seed/notifications-seed-data.js +309 -196
  156. package/dist/seed/offers-seed-data.d.ts +0 -8
  157. package/dist/seed/offers-seed-data.js +118 -197
  158. package/dist/seed/orders-seed-data.d.ts +2 -8
  159. package/dist/seed/orders-seed-data.js +248 -1510
  160. package/dist/seed/payouts-seed-data.d.ts +0 -6
  161. package/dist/seed/payouts-seed-data.js +102 -441
  162. package/dist/seed/products-auctions-seed-data.d.ts +1 -14
  163. package/dist/seed/products-auctions-seed-data.js +612 -1084
  164. package/dist/seed/products-preorders-seed-data.d.ts +119 -14
  165. package/dist/seed/products-preorders-seed-data.js +154 -455
  166. package/dist/seed/products-standard-seed-data.d.ts +1 -15
  167. package/dist/seed/products-standard-seed-data.js +1355 -4128
  168. package/dist/seed/reviews-seed-data.d.ts +2 -8
  169. package/dist/seed/reviews-seed-data.js +99 -1182
  170. package/dist/seed/scammers-seed-data.d.ts +0 -15
  171. package/dist/seed/scammers-seed-data.js +36 -37
  172. package/dist/seed/sessions-seed-data.d.ts +0 -13
  173. package/dist/seed/sessions-seed-data.js +58 -335
  174. package/dist/seed/site-settings-seed-data.d.ts +0 -4
  175. package/dist/seed/site-settings-seed-data.js +61 -52
  176. package/dist/seed/store-addresses-seed-data.js +27 -151
  177. package/dist/seed/store-extensions-seed-data.d.ts +0 -7
  178. package/dist/seed/store-extensions-seed-data.js +147 -261
  179. package/dist/seed/stores-seed-data.d.ts +0 -5
  180. package/dist/seed/stores-seed-data.js +222 -184
  181. package/dist/seed/sub-listings-seed-data.d.ts +119 -0
  182. package/dist/seed/sub-listings-seed-data.js +447 -0
  183. package/dist/seed/support-tickets-seed-data.d.ts +0 -7
  184. package/dist/seed/support-tickets-seed-data.js +82 -75
  185. package/dist/seed/users-seed-data.d.ts +0 -5
  186. package/dist/seed/users-seed-data.js +279 -634
  187. package/dist/seed/wishlists-seed-data.d.ts +0 -9
  188. package/dist/seed/wishlists-seed-data.js +36 -52
  189. package/dist/seo/json-ld.js +6 -4
  190. package/dist/styles.css +8052 -3
  191. package/dist/tailwind-utilities.css +1 -1
  192. package/dist/utils/index.d.ts +1 -0
  193. package/dist/utils/index.js +1 -0
  194. package/dist/utils/search-tokens.d.ts +2 -0
  195. package/dist/utils/search-tokens.js +21 -0
  196. package/package.json +2 -2
  197. package/scripts/seed-cli.mjs +2 -2
@@ -1,18 +1,9 @@
1
- /**
2
- * Wishlist Seed Data — one document per user at top-level `wishlists/wishlist-{userSlug}`.
3
- *
4
- * id === slug === `wishlist-{userSlug}`. userSlug === user.uid (per users-seed-data.ts).
5
- * items[] capped at WISHLIST_MAX (20). Stored newest-first (addedAt desc).
6
- * All userId + productId values verified against users-seed-data.ts and
7
- * products-standard-seed-data.ts / products-auctions-seed-data.ts / products-preorders-seed-data.ts.
8
- */
9
1
  export interface WishlistItemSeed {
10
2
  productId: string;
11
3
  productType: "product" | "auction" | "preorder";
12
4
  addedAt: Date;
13
5
  }
14
6
  export interface WishlistSeedDocument {
15
- /** doc id === slug === `wishlist-{userId}` */
16
7
  id: string;
17
8
  userId: string;
18
9
  items: WishlistItemSeed[];
@@ -1,15 +1,20 @@
1
- /**
2
- * Wishlist Seed Data — one document per user at top-level `wishlists/wishlist-{userSlug}`.
1
+ /*
2
+ * WHY: Seeds wishlists for YGO marketplace — one doc per user, max 20 items, newest-first.
3
+ * WHAT: 3 wishlists (Yugi 8 items, Kaiba 5 items, Admin 4 items). All productIds reference YGO seed products.
3
4
  *
4
- * id === slug === `wishlist-{userSlug}`. userSlug === user.uid (per users-seed-data.ts).
5
- * items[] capped at WISHLIST_MAX (20). Stored newest-first (addedAt desc).
6
- * All userId + productId values verified against users-seed-data.ts and
7
- * products-standard-seed-data.ts / products-auctions-seed-data.ts / products-preorders-seed-data.ts.
5
+ * EXPORTS:
6
+ * wishlistsSeedData Array of WishlistSeedDocument for seed runner
7
+ *
8
+ * @tag domain:wishlist
9
+ * @tag layer:seed
10
+ * @tag pattern:none
11
+ * @tag access:server-only
12
+ * @tag consumers:seed/index.ts,seed/runner.ts,SeedPanel
13
+ * @tag sideEffects:none
8
14
  */
9
15
  const NOW = new Date();
10
16
  const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
11
17
  function makeDoc(userId, items) {
12
- // Sort newest-first to match runtime invariant
13
18
  const sorted = [...items].sort((a, b) => b.addedAt.getTime() - a.addedAt.getTime());
14
19
  const latest = sorted[0]?.addedAt ?? NOW;
15
20
  return {
@@ -20,51 +25,30 @@ function makeDoc(userId, items) {
20
25
  };
21
26
  }
22
27
  export const wishlistsSeedData = [
23
- makeDoc("user-rahul-sharma", [
24
- { productId: "product-pokemon-sv-etb", productType: "product", addedAt: daysAgo(10) },
25
- { productId: "product-vintage-pokemon-charizard-base-lp", productType: "product", addedAt: daysAgo(7) },
26
- { productId: "auction-pokemon-charizard-base1-psa9", productType: "auction", addedAt: daysAgo(5) },
27
- ]),
28
- makeDoc("user-priya-patel", [
29
- { productId: "product-hot-wheels-redline-1969-camaro", productType: "product", addedAt: daysAgo(12) },
30
- { productId: "product-hot-wheels-rlc-bone-shaker", productType: "product", addedAt: daysAgo(8) },
31
- { productId: "auction-hot-wheels-redline-camaro-pink", productType: "auction", addedAt: daysAgo(3) },
32
- ]),
33
- makeDoc("user-arjun-singh", [
34
- { productId: "product-beyblade-x-bx01-dran-sword", productType: "product", addedAt: daysAgo(6) },
35
- { productId: "product-beyblade-burst-b200-valkyrie", productType: "product", addedAt: daysAgo(4) },
36
- ]),
37
- makeDoc("user-meera-nair", [
38
- { productId: "product-shf-goku-ultra-instinct", productType: "product", addedAt: daysAgo(9) },
39
- { productId: "product-nendoroid-rem-rezero", productType: "product", addedAt: daysAgo(5) },
40
- { productId: "product-gsc-racing-miku-2023", productType: "product", addedAt: daysAgo(2) },
41
- ]),
42
- makeDoc("user-kavya-iyer", [
43
- { productId: "product-gundam-rx78-mg", productType: "product", addedAt: daysAgo(14) },
44
- { productId: "product-gundam-wing-zero-rg", productType: "product", addedAt: daysAgo(9) },
45
- { productId: "preorder-gundam-pg-unicorn-ver15", productType: "preorder", addedAt: daysAgo(4) },
46
- ]),
47
- makeDoc("user-sneha-kumar", [
48
- { productId: "product-yugioh-25th-tin", productType: "product", addedAt: daysAgo(11) },
49
- { productId: "product-pokemon-151-booster-box", productType: "product", addedAt: daysAgo(6) },
50
- ]),
51
- makeDoc("user-kartik-nair", [
52
- { productId: "product-vintage-hot-wheels-deora-1968", productType: "product", addedAt: daysAgo(13) },
53
- { productId: "product-vintage-motu-he-man-1982", productType: "product", addedAt: daysAgo(7) },
54
- ]),
55
- makeDoc("user-divya-menon", [
56
- { productId: "preorder-beyblade-x-bx10-booster", productType: "preorder", addedAt: daysAgo(3) },
57
- { productId: "preorder-shf-broly-super-hero", productType: "preorder", addedAt: daysAgo(1) },
58
- ]),
59
- // Admin's personal wishlist — mix of listing types to test all flows
28
+ // Yugi: 8 items — mix of standard + auctions from Kaiba's store
29
+ makeDoc("user-yugi-muto", [
30
+ { productId: "product-dark-magician-lob-1st", productType: "product", addedAt: daysAgo(14) },
31
+ { productId: "product-dark-magician-girl-ioc", productType: "product", addedAt: daysAgo(12) },
32
+ { productId: "product-black-luster-soldier", productType: "product", addedAt: daysAgo(10) },
33
+ { productId: "auction-blue-eyes-lob-1st-psa10", productType: "auction", addedAt: daysAgo(8) },
34
+ { productId: "product-monster-reborn-lob", productType: "product", addedAt: daysAgo(6) },
35
+ { productId: "product-pot-of-greed-lob", productType: "product", addedAt: daysAgo(4) },
36
+ { productId: "auction-dark-magician-girl-psa9", productType: "auction", addedAt: daysAgo(3) },
37
+ { productId: "preorder-25th-anniversary-lob", productType: "preorder", addedAt: daysAgo(1) },
38
+ ]),
39
+ // Kaiba: 5 items from LetItRip Official (Kaiba as buyer)
40
+ makeDoc("user-seto-kaiba", [
41
+ { productId: "product-duelist-kingdom-playmat", productType: "product", addedAt: daysAgo(10) },
42
+ { productId: "product-egyptian-gods-playmat", productType: "product", addedAt: daysAgo(7) },
43
+ { productId: "product-duel-disk-replica", productType: "product", addedAt: daysAgo(5) },
44
+ { productId: "product-millennium-puzzle-model", productType: "product", addedAt: daysAgo(3) },
45
+ { productId: "product-kaiba-figure-15cm", productType: "product", addedAt: daysAgo(1) },
46
+ ]),
47
+ // Admin: 4 items — mix from Kaiba's store (Admin as buyer)
60
48
  makeDoc("user-admin-letitrip", [
61
- { productId: "product-mafex-miles-morales-spiderman", productType: "product", addedAt: daysAgo(60) },
62
- { productId: "product-figma-link-totk", productType: "product", addedAt: daysAgo(45) },
63
- { productId: "auction-pokemon-mew-1st-edition-psa10", productType: "auction", addedAt: daysAgo(20) },
64
- { productId: "product-alter-rem-wedding-scale", productType: "product", addedAt: daysAgo(8) },
65
- { productId: "prize-pokemon-mystery-box-june", productType: "product", addedAt: daysAgo(5) },
66
- { productId: "prize-hot-wheels-treasure-hunt", productType: "product", addedAt: daysAgo(4) },
67
- { productId: "preorder-gundam-pg-unicorn-ver15", productType: "preorder", addedAt: daysAgo(3) },
68
- { productId: "auction-pokemon-charizard-base1-psa9", productType: "auction", addedAt: daysAgo(2) },
49
+ { productId: "product-chaos-emperor-dragon", productType: "product", addedAt: daysAgo(20) },
50
+ { productId: "auction-exodia-complete-set-psa9", productType: "auction", addedAt: daysAgo(15) },
51
+ { productId: "product-rainbow-dragon", productType: "product", addedAt: daysAgo(8) },
52
+ { productId: "preorder-gx-tournament-pack", productType: "preorder", addedAt: daysAgo(2) },
69
53
  ]),
70
54
  ];
@@ -35,11 +35,13 @@ export function productJsonLd(product) {
35
35
  "@type": "Offer",
36
36
  price: product.price,
37
37
  priceCurrency: product.currency || getDefaultCurrency(),
38
- availability: product.status === ProductStatusValues.PUBLISHED || !product.status
39
- ? "https://schema.org/InStock"
40
- : product.status === ProductStatusValues.OUT_OF_STOCK
38
+ availability: product.isSold === true
39
+ ? "https://schema.org/SoldOut"
40
+ : product.availableQuantity === 0
41
41
  ? "https://schema.org/OutOfStock"
42
- : "https://schema.org/Discontinued",
42
+ : product.status === ProductStatusValues.PUBLISHED || !product.status
43
+ ? "https://schema.org/InStock"
44
+ : "https://schema.org/Discontinued",
43
45
  url,
44
46
  seller: product.sellerName
45
47
  ? { "@type": "Organization", name: product.sellerName }