@mohasinac/appkit 2.7.52 → 2.7.54

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 (123) 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/client.d.ts +2 -0
  9. package/dist/client.js +1 -0
  10. package/dist/constants/field-names.d.ts +4 -3
  11. package/dist/constants/field-names.js +8 -8
  12. package/dist/errors/error-codes.d.ts +3 -0
  13. package/dist/errors/error-codes.js +3 -0
  14. package/dist/errors/messages.d.ts +3 -0
  15. package/dist/errors/messages.js +3 -0
  16. package/dist/features/admin/types/product.types.d.ts +1 -1
  17. package/dist/features/admin/types/product.types.js +2 -3
  18. package/dist/features/auctions/actions/bid-actions.d.ts +9 -0
  19. package/dist/features/auctions/actions/bid-actions.js +61 -0
  20. package/dist/features/auctions/components/AuctionDetailPageView.d.ts +2 -1
  21. package/dist/features/auctions/components/AuctionDetailPageView.js +5 -4
  22. package/dist/features/auctions/components/PlaceBidFormClient.d.ts +3 -1
  23. package/dist/features/auctions/components/PlaceBidFormClient.js +32 -2
  24. package/dist/features/auctions/types/index.d.ts +1 -1
  25. package/dist/features/layout/AppLayoutShell.js +1 -1
  26. package/dist/features/pre-orders/components/PreOrdersIndexListing.js +2 -11
  27. package/dist/features/products/api/[id]/route.js +4 -8
  28. package/dist/features/products/api/route.js +1 -3
  29. package/dist/features/products/components/AuctionsIndexListing.js +3 -11
  30. package/dist/features/products/components/PrizeDrawsIndexListing.js +2 -10
  31. package/dist/features/products/components/ProductFilters.d.ts +33 -9
  32. package/dist/features/products/components/ProductFilters.js +6 -29
  33. package/dist/features/products/components/ProductForm.js +2 -3
  34. package/dist/features/products/constants/sieve.d.ts +162 -0
  35. package/dist/features/products/constants/sieve.js +95 -0
  36. package/dist/features/products/repository/products.repository.d.ts +5 -0
  37. package/dist/features/products/repository/products.repository.js +23 -3
  38. package/dist/features/products/schemas/firestore.d.ts +4 -4
  39. package/dist/features/products/schemas/firestore.js +2 -3
  40. package/dist/features/products/schemas/index.d.ts +6 -6
  41. package/dist/features/products/schemas/index.js +2 -6
  42. package/dist/features/products/types/index.d.ts +1 -1
  43. package/dist/features/seller/actions/offer-actions.js +2 -2
  44. package/dist/features/wishlist/types/index.d.ts +1 -1
  45. package/dist/index.d.ts +6 -3
  46. package/dist/index.js +6 -4
  47. package/dist/seed/addresses-seed-data.d.ts +2 -18
  48. package/dist/seed/addresses-seed-data.js +137 -203
  49. package/dist/seed/bids-seed-data.d.ts +2 -8
  50. package/dist/seed/bids-seed-data.js +172 -648
  51. package/dist/seed/blog-posts-seed-data.d.ts +0 -5
  52. package/dist/seed/blog-posts-seed-data.js +341 -596
  53. package/dist/seed/carousel-slides-seed-data.d.ts +0 -5
  54. package/dist/seed/carousel-slides-seed-data.js +61 -192
  55. package/dist/seed/carousels-seed-data.js +18 -1
  56. package/dist/seed/cart-seed-data.d.ts +1 -18
  57. package/dist/seed/cart-seed-data.js +116 -293
  58. package/dist/seed/categories-seed-data.d.ts +0 -6
  59. package/dist/seed/categories-seed-data.js +1409 -1537
  60. package/dist/seed/claimed-coupons-seed-data.d.ts +0 -11
  61. package/dist/seed/claimed-coupons-seed-data.js +32 -29
  62. package/dist/seed/conversations-seed-data.d.ts +0 -6
  63. package/dist/seed/conversations-seed-data.js +132 -280
  64. package/dist/seed/coupon-usage-seed-data.d.ts +0 -16
  65. package/dist/seed/coupon-usage-seed-data.js +30 -44
  66. package/dist/seed/coupons-seed-data.d.ts +0 -6
  67. package/dist/seed/coupons-seed-data.js +141 -489
  68. package/dist/seed/events-seed-data.d.ts +0 -6
  69. package/dist/seed/events-seed-data.js +201 -379
  70. package/dist/seed/faq-seed-data.d.ts +0 -14
  71. package/dist/seed/faq-seed-data.js +609 -1184
  72. package/dist/seed/grouped-listings-seed-data.d.ts +119 -8
  73. package/dist/seed/grouped-listings-seed-data.js +148 -233
  74. package/dist/seed/history-seed-data.d.ts +0 -7
  75. package/dist/seed/history-seed-data.js +50 -54
  76. package/dist/seed/homepage-sections-seed-data.d.ts +0 -5
  77. package/dist/seed/homepage-sections-seed-data.js +83 -175
  78. package/dist/seed/index.d.ts +1 -1
  79. package/dist/seed/index.js +1 -1
  80. package/dist/seed/manifest.js +2 -2
  81. package/dist/seed/notifications-seed-data.d.ts +0 -6
  82. package/dist/seed/notifications-seed-data.js +309 -196
  83. package/dist/seed/offers-seed-data.d.ts +0 -8
  84. package/dist/seed/offers-seed-data.js +118 -197
  85. package/dist/seed/orders-seed-data.d.ts +2 -8
  86. package/dist/seed/orders-seed-data.js +248 -1510
  87. package/dist/seed/payouts-seed-data.d.ts +0 -6
  88. package/dist/seed/payouts-seed-data.js +102 -441
  89. package/dist/seed/products-auctions-seed-data.d.ts +1 -14
  90. package/dist/seed/products-auctions-seed-data.js +612 -1084
  91. package/dist/seed/products-preorders-seed-data.d.ts +119 -14
  92. package/dist/seed/products-preorders-seed-data.js +154 -455
  93. package/dist/seed/products-standard-seed-data.d.ts +1 -15
  94. package/dist/seed/products-standard-seed-data.js +1355 -4128
  95. package/dist/seed/reviews-seed-data.d.ts +2 -8
  96. package/dist/seed/reviews-seed-data.js +99 -1182
  97. package/dist/seed/scammers-seed-data.d.ts +0 -15
  98. package/dist/seed/scammers-seed-data.js +36 -37
  99. package/dist/seed/sessions-seed-data.d.ts +0 -13
  100. package/dist/seed/sessions-seed-data.js +58 -335
  101. package/dist/seed/site-settings-seed-data.d.ts +0 -4
  102. package/dist/seed/site-settings-seed-data.js +61 -52
  103. package/dist/seed/store-addresses-seed-data.js +27 -151
  104. package/dist/seed/store-extensions-seed-data.d.ts +0 -7
  105. package/dist/seed/store-extensions-seed-data.js +147 -261
  106. package/dist/seed/stores-seed-data.d.ts +0 -5
  107. package/dist/seed/stores-seed-data.js +222 -184
  108. package/dist/seed/sub-listings-seed-data.d.ts +119 -0
  109. package/dist/seed/sub-listings-seed-data.js +447 -0
  110. package/dist/seed/support-tickets-seed-data.d.ts +0 -7
  111. package/dist/seed/support-tickets-seed-data.js +82 -75
  112. package/dist/seed/users-seed-data.d.ts +0 -5
  113. package/dist/seed/users-seed-data.js +279 -634
  114. package/dist/seed/wishlists-seed-data.d.ts +0 -9
  115. package/dist/seed/wishlists-seed-data.js +36 -52
  116. package/dist/seo/json-ld.js +6 -4
  117. package/dist/styles.css +8052 -3
  118. package/dist/utils/index.d.ts +1 -0
  119. package/dist/utils/index.js +1 -0
  120. package/dist/utils/search-tokens.d.ts +2 -0
  121. package/dist/utils/search-tokens.js +21 -0
  122. package/package.json +2 -2
  123. package/scripts/seed-cli.mjs +2 -2
@@ -1,359 +1,182 @@
1
+ /*
2
+ * WHY: Seeds shopping carts for YGO marketplace — tests cart flows (multi-item, single, auction, guest, empty).
3
+ * WHAT: 4 carts: Yugi (3 items from Kaiba store), Kaiba (2 items from Admin store), Admin (2 items from Kaiba store), guest (2 items). All YGO-themed with YGOPRODECK images.
4
+ *
5
+ * EXPORTS:
6
+ * cartsSeedData — Array of CartDocument for seed runner
7
+ *
8
+ * @tag domain:cart
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
14
+ */
1
15
  import { getDefaultCurrency } from "./seed-market-config";
2
16
  const _CURRENCY = getDefaultCurrency();
3
- // Dynamic date helpers
4
17
  const NOW = new Date();
5
18
  const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
6
19
  export const cartsSeedData = [
7
- // -- Rahul Sharma: multi-item, cross-store cart ----------------------------
8
- // Tests: list cart items, remove single item, update quantity, checkout
20
+ // Yugi's cart: 3 items from Kaiba Corp Card Vault
9
21
  {
10
- id: "user-rahul-sharma",
11
- userId: "user-rahul-sharma",
22
+ id: "user-yugi-muto",
23
+ userId: "user-yugi-muto",
12
24
  items: [
13
25
  {
14
- itemId: "cartitem-rahul-pokemon-etb-001",
15
- productId: "product-pokemon-sv-etb",
16
- productTitle: "Pokémon Scarlet & Violet Elite Trainer Box",
17
- productImage: "/media/product-image-pokemon-sv-etb-1-20260101.jpg",
18
- price: 349900,
26
+ itemId: "cartitem-yugi-dark-magician-lob-1st",
27
+ productId: "product-dark-magician-lob-1st",
28
+ productTitle: "Dark Magician LOB 1st Edition",
29
+ productImage: "https://images.ygoprodeck.com/images/cards/small/46986414.jpg",
30
+ price: 499900,
19
31
  currency: _CURRENCY,
20
32
  quantity: 1,
21
- storeId: "store-pokemon-palace",
22
- storeName: "Pokémon Palace",
33
+ storeId: "store-kaiba-corp-cards",
34
+ storeName: "Kaiba Corp Card Vault",
23
35
  listingType: "standard",
24
- addedAt: daysAgo(9),
25
- updatedAt: daysAgo(9),
36
+ addedAt: daysAgo(3),
37
+ updatedAt: daysAgo(3),
26
38
  },
27
39
  {
28
- itemId: "cartitem-rahul-hotwheels-001",
29
- productId: "product-hot-wheels-redline-1969-camaro",
30
- productTitle: "Hot Wheels Redline 1969 Camaro (Original)",
31
- productImage: "/media/product-image-hot-wheels-redline-1969-camaro-1-20260101.jpg",
32
- price: 189900,
40
+ itemId: "cartitem-yugi-lob-booster-pack",
41
+ productId: "product-lob-booster-pack",
42
+ productTitle: "Legend of Blue Eyes Booster Pack",
43
+ productImage: "https://images.ygoprodeck.com/images/cards/small/89631139.jpg",
44
+ price: 149900,
33
45
  currency: _CURRENCY,
34
- quantity: 1,
35
- storeId: "store-diecast-depot",
36
- storeName: "Diecast Depot",
46
+ quantity: 2,
47
+ storeId: "store-kaiba-corp-cards",
48
+ storeName: "Kaiba Corp Card Vault",
37
49
  listingType: "standard",
38
- addedAt: daysAgo(9),
39
- updatedAt: daysAgo(9),
50
+ addedAt: daysAgo(2),
51
+ updatedAt: daysAgo(2),
40
52
  },
41
53
  {
42
- itemId: "cartitem-rahul-beyblade-001",
43
- productId: "product-beyblade-x-bx01-dran-sword",
44
- productTitle: "Beyblade X BX-01 Dran Sword 3-60F Starter",
45
- productImage: "/media/product-image-beyblade-x-bx01-dran-sword-1-20260101.jpg",
46
- price: 179900,
54
+ itemId: "cartitem-yugi-kuriboh-mrd",
55
+ productId: "product-kuriboh-mrd",
56
+ productTitle: "Kuriboh MRD",
57
+ productImage: "https://images.ygoprodeck.com/images/cards/small/40640057.jpg",
58
+ price: 29900,
47
59
  currency: _CURRENCY,
48
- quantity: 2,
49
- storeId: "store-beyblade-arena",
50
- storeName: "Beyblade Arena",
60
+ quantity: 1,
61
+ storeId: "store-kaiba-corp-cards",
62
+ storeName: "Kaiba Corp Card Vault",
51
63
  listingType: "standard",
52
- addedAt: daysAgo(9),
53
- updatedAt: daysAgo(9),
64
+ addedAt: daysAgo(1),
65
+ updatedAt: daysAgo(1),
54
66
  },
55
67
  ],
56
- createdAt: daysAgo(9),
57
- updatedAt: daysAgo(9),
68
+ createdAt: daysAgo(3),
69
+ updatedAt: daysAgo(1),
58
70
  },
59
- // -- Priya Patel: single-item cart -----------------------------------------
60
- // Tests: add item, checkout with single item, clear cart after order
71
+ // Kaiba's cart: 2 items from LetItRip Official (Kaiba as buyer)
61
72
  {
62
- id: "user-priya-patel",
63
- userId: "user-priya-patel",
73
+ id: "user-seto-kaiba",
74
+ userId: "user-seto-kaiba",
64
75
  items: [
65
76
  {
66
- itemId: "cartitem-priya-goku-001",
67
- productId: "product-shf-goku-ultra-instinct",
68
- productTitle: "S.H.Figuarts Goku Ultra Instinct (Dragon Ball Super)",
69
- productImage: "/media/product-image-shf-goku-ultra-instinct-1-20260101.jpg",
70
- price: 449900,
77
+ itemId: "cartitem-kaiba-duelist-kingdom-playmat",
78
+ productId: "product-duelist-kingdom-playmat",
79
+ productTitle: "Duelist Kingdom Playmat",
80
+ productImage: "https://images.ygoprodeck.com/images/cards/small/10000015.jpg",
81
+ price: 129900,
71
82
  currency: _CURRENCY,
72
83
  quantity: 1,
73
84
  storeId: "store-letitrip-official",
74
85
  storeName: "LetItRip Official",
75
86
  listingType: "standard",
76
- addedAt: daysAgo(10),
77
- updatedAt: daysAgo(10),
78
- },
79
- ],
80
- createdAt: daysAgo(10),
81
- updatedAt: daysAgo(10),
82
- },
83
- // -- Arjun Singh: cart with auction item ------------------------------------
84
- // Tests: auction item add-to-cart display, checkout CTA blocked (must bid)
85
- {
86
- id: "user-arjun-singh",
87
- userId: "user-arjun-singh",
88
- items: [
89
- {
90
- itemId: "cartitem-arjun-pokemon-base-auction-001",
91
- productId: "auction-pokemon-base-set-booster-box",
92
- productTitle: "Pokémon Base Set 1st Edition Booster Box (SEALED AUCTION)",
93
- productImage: "/media/auction-image-pokemon-base-set-booster-box-1-20260101.jpg",
94
- price: 45000000,
95
- currency: _CURRENCY,
96
- quantity: 1,
97
- storeId: "store-pokemon-palace",
98
- storeName: "Pokémon Palace",
99
- listingType: "auction",
100
- addedAt: daysAgo(17),
101
- updatedAt: daysAgo(17),
87
+ addedAt: daysAgo(5),
88
+ updatedAt: daysAgo(5),
102
89
  },
103
90
  {
104
- itemId: "cartitem-arjun-yugioh-tin-001",
105
- productId: "product-yugioh-25th-tin",
106
- productTitle: "Yu-Gi-Oh! 25th Anniversary Tin: Dueling Heroes",
107
- productImage: "/media/product-image-yugioh-25th-tin-1-20260101.jpg",
108
- price: 299900,
91
+ itemId: "cartitem-kaiba-exodia-art-print",
92
+ productId: "product-exodia-art-print",
93
+ productTitle: "Exodia Art Print A3",
94
+ productImage: "https://images.ygoprodeck.com/images/cards/small/33396948.jpg",
95
+ price: 79900,
109
96
  currency: _CURRENCY,
110
97
  quantity: 1,
111
- storeId: "store-cardgame-hub",
112
- storeName: "CardGame Hub",
98
+ storeId: "store-letitrip-official",
99
+ storeName: "LetItRip Official",
113
100
  listingType: "standard",
114
- addedAt: daysAgo(12),
115
- updatedAt: daysAgo(12),
101
+ addedAt: daysAgo(4),
102
+ updatedAt: daysAgo(4),
116
103
  },
117
104
  ],
118
- createdAt: daysAgo(17),
119
- updatedAt: daysAgo(12),
105
+ createdAt: daysAgo(5),
106
+ updatedAt: daysAgo(4),
120
107
  },
121
- // -- Meera Nair: cart with quantity > 1 items ------------------------------
122
- // Tests: increment/decrement quantity controls, cart total calculation
108
+ // Admin's cart: 2 items from Kaiba Corp (Admin as buyer)
123
109
  {
124
- id: "user-meera-nair",
125
- userId: "user-meera-nair",
110
+ id: "user-admin-letitrip",
111
+ userId: "user-admin-letitrip",
126
112
  items: [
127
113
  {
128
- itemId: "cartitem-meera-pokemon151-001",
129
- productId: "product-pokemon-151-booster-box",
130
- productTitle: "Pokémon 151 Booster Box (Japanese)",
131
- productImage: "/media/product-image-pokemon-151-booster-box-1-20260101.jpg",
132
- price: 699900,
114
+ itemId: "cartitem-admin-chaos-emperor",
115
+ productId: "product-chaos-emperor-dragon",
116
+ productTitle: "Chaos Emperor Dragon Envoy of the End",
117
+ productImage: "https://images.ygoprodeck.com/images/cards/small/82301904.jpg",
118
+ price: 1299900,
133
119
  currency: _CURRENCY,
134
- quantity: 3,
135
- storeId: "store-pokemon-palace",
136
- storeName: "Pokémon Palace",
120
+ quantity: 1,
121
+ storeId: "store-kaiba-corp-cards",
122
+ storeName: "Kaiba Corp Card Vault",
137
123
  listingType: "standard",
138
- addedAt: daysAgo(11),
139
- updatedAt: daysAgo(11),
124
+ addedAt: daysAgo(2),
125
+ updatedAt: daysAgo(2),
140
126
  },
141
127
  {
142
- itemId: "cartitem-meera-hotwheels5pack-001",
143
- productId: "product-hot-wheels-premium-5pack",
144
- productTitle: "Hot Wheels Premium Car Culture 5-Pack",
145
- productImage: "/media/product-image-hot-wheels-premium-5pack-1-20260101.jpg",
146
- price: 149900,
128
+ itemId: "cartitem-admin-potd-box",
129
+ productId: "product-potd-booster-box",
130
+ productTitle: "Power of the Duelist Booster Box 24pk",
131
+ productImage: "https://images.ygoprodeck.com/images/cards/small/89943723.jpg",
132
+ price: 2299900,
147
133
  currency: _CURRENCY,
148
134
  quantity: 1,
149
- storeId: "store-diecast-depot",
150
- storeName: "Diecast Depot",
135
+ storeId: "store-kaiba-corp-cards",
136
+ storeName: "Kaiba Corp Card Vault",
151
137
  listingType: "standard",
152
- addedAt: daysAgo(11),
153
- updatedAt: daysAgo(11),
138
+ addedAt: daysAgo(1),
139
+ updatedAt: daysAgo(1),
154
140
  },
155
141
  ],
156
- createdAt: daysAgo(11),
157
- updatedAt: daysAgo(11),
158
- },
159
- // -- Amit Sharma: empty cart (all items removed) ----------------------------
160
- // Tests: empty cart UI state, "Your cart is empty" message,
161
- // add-to-cart starting from empty state
162
- {
163
- id: "user-amit-sharma",
164
- userId: "user-amit-sharma",
165
- items: [],
166
- createdAt: daysAgo(27),
167
- updatedAt: daysAgo(9),
142
+ createdAt: daysAgo(2),
143
+ updatedAt: daysAgo(1),
168
144
  },
169
- // â"€â"€ P29 expansion (S17 2026-05-12) â€" 15 more carts via helper â"€â"€â"€â"€â"€â"€â"€â"€â"€â"€â"€
170
- ...mkCart("user-kavya-iyer", 6, [
171
- {
172
- productId: "product-pokemon-151-booster-box",
173
- title: "Pokémon 151 Booster Box (36-pack)",
174
- price: 1799900,
175
- store: ["store-pokemon-palace", "Pokémon Palace"],
176
- qty: 1,
177
- },
178
- ]),
179
- ...mkCart("user-sneha-kumar", 12, [
180
- {
181
- productId: "product-hot-wheels-treasure-hunt-2024",
182
- title: "Hot Wheels 2024 Treasure Hunt (Single)",
183
- price: 49900,
184
- store: ["store-diecast-depot", "Diecast Depot"],
185
- qty: 2,
186
- },
187
- {
188
- productId: "product-funko-pop-naruto-sage-mode",
189
- title: "Funko Pop Naruto Sage Mode",
190
- price: 129900,
191
- store: ["store-tokyo-toys-india", "Tokyo Toys India"],
192
- qty: 1,
193
- },
194
- ]),
195
- ...mkCart("user-kartik-nair", 3, [
196
- {
197
- productId: "product-beyblade-x-bx18-leon-crest",
198
- title: "Beyblade X BX-18 Leon Crest Booster",
199
- price: 199900,
200
- store: ["store-beyblade-arena", "Beyblade Arena"],
201
- qty: 1,
202
- },
203
- ]),
204
- ...mkCart("user-divya-menon", 8, [
205
- {
206
- productId: "preorder-pokemon-stellar-crown-etb",
207
- title: "PRE-ORDER: Pokémon Stellar Crown ETB",
208
- price: 599900,
209
- store: ["store-pokemon-palace", "Pokémon Palace"],
210
- qty: 1,
211
- listingType: "pre-order",
212
- },
213
- ]),
214
- ...mkCart("user-ankit-gupta", 14, [
215
- {
216
- productId: "product-gundam-rg-nu-gundam",
217
- title: "Bandai RG 1/144 Nu Gundam",
218
- price: 449900,
219
- store: ["store-gundam-galaxy", "Gundam Galaxy"],
220
- qty: 1,
221
- },
222
- {
223
- productId: "product-gunpla-action-base-clear",
224
- title: "Gunpla Action Base Clear (Display Stand)",
225
- price: 59900,
226
- store: ["store-gundam-galaxy", "Gundam Galaxy"],
227
- qty: 2,
228
- },
229
- ]),
230
- ...mkCart("user-siddharth-rao", 5, [
231
- {
232
- productId: "product-shf-luffy-gear-5",
233
- title: "S.H.Figuarts Luffy Gear 5",
234
- price: 1199900,
235
- store: ["store-tokyo-toys-india", "Tokyo Toys India"],
236
- qty: 1,
237
- },
238
- ]),
239
- ...mkCart("user-tanvi-desai", 2, [
240
- {
241
- productId: "product-yugioh-25th-quarter-century-tin",
242
- title: "Yu-Gi-Oh! 25th Quarter Century Stampede Tin",
243
- price: 599900,
244
- store: ["store-cardgame-hub", "CardGame Hub"],
245
- qty: 1,
246
- },
247
- {
248
- productId: "product-yugioh-rarity-collection-pack",
249
- title: "Yu-Gi-Oh! Rarity Collection Pack",
250
- price: 119900,
251
- store: ["store-cardgame-hub", "CardGame Hub"],
252
- qty: 3,
253
- },
254
- ]),
255
- ...mkCart("user-anjali-verma", 1, [
256
- {
257
- productId: "product-pokemon-charizard-ex-obsidian",
258
- title: "Pokémon Charizard ex Obsidian Flames Hyper Rare",
259
- price: 1499900,
260
- store: ["store-cardgame-hub", "CardGame Hub"],
261
- qty: 1,
262
- },
263
- ]),
264
- ...mkCart("user-rohit-verma", 7, [
265
- {
266
- productId: "product-tomica-limited-vintage-skyline",
267
- title: "Tomica Limited Vintage Nissan Skyline GT-R",
268
- price: 349900,
269
- store: ["store-vintage-vault", "Vintage Vault"],
270
- qty: 1,
271
- },
272
- ]),
273
- ...mkCart("user-pooja-sharma", 4, [
274
- {
275
- productId: "auction-pokemon-lugia-neo-genesis-psa9",
276
- title: "Pokémon Neo Genesis Lugia #9 PSA 9 (AUCTION)",
277
- price: 6999900,
278
- store: ["store-pokemon-palace", "Pokémon Palace"],
279
- qty: 1,
280
- listingType: "auction",
281
- },
282
- ]),
283
- // Guest carts skipped — sessionId is a runtime-only optional field on the
284
- // Zod input but not on the `CartDocument` interface used by the seed array.
285
- // Guest cart behavior is exercised at runtime via localStorage merge tests.
286
- // -- Admin: personal collector cart (buying rare items from other stores) ---
145
+ // Guest cart: 2 items, no userId
287
146
  {
288
- id: "user-admin-letitrip",
289
- userId: "user-admin-letitrip",
147
+ id: "guest-session-001",
148
+ userId: "",
290
149
  items: [
291
150
  {
292
- itemId: "cartitem-admin-nendoroid-miku-001",
293
- productId: "product-nendoroid-hatsune-miku-v4x",
294
- productTitle: "Nendoroid: Hatsune Miku V4X — Good Smile Company",
295
- productImage: "/media/product-image-nendoroid-hatsune-miku-v4x-1-20260101.jpg",
296
- price: 499900,
151
+ itemId: "cartitem-guest-mirror-force",
152
+ productId: "product-mirror-force-mrd",
153
+ productTitle: "Mirror Force MRD Ultra Rare",
154
+ productImage: "https://images.ygoprodeck.com/images/cards/small/44095762.jpg",
155
+ price: 999900,
297
156
  currency: _CURRENCY,
298
157
  quantity: 1,
299
- storeId: "store-letitrip-official",
300
- storeName: "LetItRip Official",
158
+ storeId: "store-kaiba-corp-cards",
159
+ storeName: "Kaiba Corp Card Vault",
301
160
  listingType: "standard",
302
- addedAt: daysAgo(3),
303
- updatedAt: daysAgo(3),
161
+ addedAt: daysAgo(1),
162
+ updatedAt: daysAgo(1),
304
163
  },
305
164
  {
306
- itemId: "cartitem-admin-alter-rem-001",
307
- productId: "product-alter-rem-wedding-scale",
308
- productTitle: "ALTER: Re:Zero — Rem Wedding Ver. 1/7 Scale",
309
- productImage: "/media/product-image-alter-rem-wedding-scale-1-20260101.jpg",
310
- price: 1899900,
165
+ itemId: "cartitem-guest-yugi-starter",
166
+ productId: "product-yugi-starter-deck",
167
+ productTitle: "Starter Deck: Yugi",
168
+ productImage: "https://images.ygoprodeck.com/images/cards/small/46986414.jpg",
169
+ price: 199900,
311
170
  currency: _CURRENCY,
312
171
  quantity: 1,
313
- storeId: "store-tokyo-toys-india",
314
- storeName: "Tokyo Toys India",
172
+ storeId: "store-kaiba-corp-cards",
173
+ storeName: "Kaiba Corp Card Vault",
315
174
  listingType: "standard",
316
- addedAt: daysAgo(2),
317
- updatedAt: daysAgo(2),
175
+ addedAt: daysAgo(1),
176
+ updatedAt: daysAgo(1),
318
177
  },
319
178
  ],
320
- createdAt: daysAgo(3),
321
- updatedAt: daysAgo(2),
179
+ createdAt: daysAgo(1),
180
+ updatedAt: daysAgo(1),
322
181
  },
323
182
  ];
324
- /**
325
- * Compact constructor for authenticated user carts. Each item gets a
326
- * deterministic itemId derived from the cart id + product id so the seed
327
- * is idempotent across re-runs. The id-prefix on `productId` infers a default
328
- * listingType when the spec doesn't pass one (auction-* / preorder-* / *).
329
- */
330
- function mkCart(userId, ageDays, items) {
331
- const created = daysAgo(ageDays);
332
- return [
333
- {
334
- id: userId,
335
- userId,
336
- items: items.map((it) => ({
337
- itemId: `cartitem-${userId.replace("user-", "")}-${it.productId.split("-").slice(-3).join("-")}`,
338
- productId: it.productId,
339
- productTitle: it.title,
340
- productImage: `/media/${it.productId.startsWith("auction-") ? "auction" : it.productId.startsWith("preorder-") ? "preorder" : "product"}-image-${it.productId.replace(/^(auction|preorder|product)-/, "")}-1-20260101.jpg`,
341
- price: it.price,
342
- currency: _CURRENCY,
343
- quantity: it.qty,
344
- storeId: it.store[0],
345
- storeName: it.store[1],
346
- listingType: it.listingType ??
347
- (it.productId.startsWith("auction-")
348
- ? "auction"
349
- : it.productId.startsWith("preorder-")
350
- ? "pre-order"
351
- : "standard"),
352
- addedAt: created,
353
- updatedAt: created,
354
- })),
355
- createdAt: created,
356
- updatedAt: created,
357
- },
358
- ];
359
- }
@@ -1,8 +1,2 @@
1
- /**
2
- * Categories Seed Data — Collectibles Edition
3
- * 22 categories in 3-tier hierarchy covering 5 collectibles verticals.
4
- * Verticals: action figures, trading cards, diecast, spinning tops, model kits + vintage/rare.
5
- * id === slug convention enforced throughout.
6
- */
7
1
  import type { CategoryDocument } from "../features/categories/schemas";
8
2
  export declare const categoriesSeedData: Partial<CategoryDocument>[];