@mohasinac/appkit 4.1.0 → 4.1.1

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.
@@ -79,7 +79,7 @@ export { conversationsSeedData } from "./conversations-seed-data";
79
79
  export { groupedListingsSeedData } from "./grouped-listings-seed-data";
80
80
  export { scammersSeedData } from "./scammers-seed-data";
81
81
  export { supportTicketsSeedData } from "./support-tickets-seed-data";
82
- export { testerChecklistSeedData, storesTesterSeedData, categoriesTesterSeedData, productsTesterSeedData, blogTesterSeedData, eventsTesterSeedData, } from "../features/tester/seed-data";
82
+ export { testerChecklistSeedData, storesTesterSeedData, categoriesTesterSeedData, productsTesterSeedData, blogTesterSeedData, eventsTesterSeedData, couponsTesterSeedData, bidsTesterSeedData, ordersTesterSeedData, } from "../features/tester/seed-data";
83
83
  export { productFeaturesSeedData } from "./product-features-seed-data";
84
84
  export { offersSeedData } from "./offers-seed-data";
85
85
  export { payoutMethodsSeedData, shippingConfigsSeedData, analyticsCardsSeedData, analyticsAlertsSeedData, storeCategoriesSeedData, listingTemplatesSeedData, moderationQueueSeedData, reportsSeedData, itemRequestsSeedData, storeWhatsAppConfigSeedData, storeGoogleConfigSeedData, } from "./store-extensions-seed-data";
@@ -70,7 +70,7 @@ export { scammersSeedData } from "./scammers-seed-data";
70
70
  export { supportTicketsSeedData } from "./support-tickets-seed-data";
71
71
  // Tester sandbox seed fixtures live in ../features/tester/seed-data (isolated from this
72
72
  // folder on purpose) — re-exported here so every other seed consumer keeps one import surface.
73
- export { testerChecklistSeedData, storesTesterSeedData, categoriesTesterSeedData, productsTesterSeedData, blogTesterSeedData, eventsTesterSeedData, } from "../features/tester/seed-data";
73
+ export { testerChecklistSeedData, storesTesterSeedData, categoriesTesterSeedData, productsTesterSeedData, blogTesterSeedData, eventsTesterSeedData, couponsTesterSeedData, bidsTesterSeedData, ordersTesterSeedData, } from "../features/tester/seed-data";
74
74
  export { productFeaturesSeedData } from "./product-features-seed-data";
75
75
  export { offersSeedData } from "./offers-seed-data";
76
76
  // S-STORE Extensions (Tier S-STORE) — 11 new collections
@@ -51,7 +51,7 @@ import { offersSeedData } from "./offers-seed-data";
51
51
  import { couponUsageSeedData } from "./coupon-usage-seed-data";
52
52
  import { claimedCouponsSeedData } from "./claimed-coupons-seed-data";
53
53
  // Tester sandbox seed fixtures live in ../features/tester/seed-data (isolated on purpose).
54
- import { testerChecklistSeedData, storesTesterSeedData, categoriesTesterSeedData, productsTesterSeedData, blogTesterSeedData, eventsTesterSeedData, } from "../features/tester/seed-data";
54
+ import { testerChecklistSeedData, storesTesterSeedData, categoriesTesterSeedData, productsTesterSeedData, blogTesterSeedData, eventsTesterSeedData, couponsTesterSeedData, bidsTesterSeedData, ordersTesterSeedData, } from "../features/tester/seed-data";
55
55
  function asArr(items) {
56
56
  return items ?? [];
57
57
  }
@@ -104,10 +104,10 @@ export const SEED_MANIFEST = {
104
104
  ? "bundle"
105
105
  : LISTING_TYPE_TO_MANIFEST_TAG[p.listingType ?? "standard"],
106
106
  })), "title"),
107
- orders: pick(asArr(ordersSeedData)),
107
+ orders: pick([...asArr(ordersSeedData), ...asArr(ordersTesterSeedData)]),
108
108
  reviews: pick(asArr(reviewsSeedData), "title"),
109
- bids: pick(asArr(bidsSeedData)),
110
- coupons: pick(asArr(couponsSeedData).map((c) => ({
109
+ bids: pick([...asArr(bidsSeedData), ...asArr(bidsTesterSeedData)]),
110
+ coupons: pick([...asArr(couponsSeedData), ...asArr(couponsTesterSeedData)].map((c) => ({
111
111
  ...c,
112
112
  name: c.code ?? c.id,
113
113
  }))),
@@ -239,21 +239,25 @@ const productPool = [
239
239
  ];
240
240
  const statuses = [
241
241
  "pending",
242
+ "confirmed",
242
243
  "processing",
243
244
  "shipped",
244
245
  "delivered",
245
246
  "cancelled",
246
247
  "refunded",
247
248
  "return_requested",
249
+ "returned",
248
250
  ];
249
251
  const paymentStatuses = {
250
252
  pending: "pending",
253
+ confirmed: "paid",
251
254
  processing: "processing",
252
255
  shipped: "paid",
253
256
  delivered: "paid",
254
257
  cancelled: "refunded",
255
258
  refunded: "refunded",
256
259
  return_requested: "paid",
260
+ returned: "refunded",
257
261
  };
258
262
  const buyerStoreMatrix = [
259
263
  { userId: "user-yugi-muto", storeId: "store-kaiba-corp-cards", addressId: "addr-yugi-home" },
@@ -1,10 +1,12 @@
1
1
  /*
2
- * WHY: Classified listings are out of scope for the minimal Beyblade-focused demo catalog.
3
- * WHAT: Exports an empty array — kept as a stub so seed/index.ts and the seed API route's
4
- * SEED_DATA_MAP.products concatenation keep working without a code change elsewhere.
2
+ * WHY: Real (non-tester-sandbox) classified listing so testers and shoppers can exercise
3
+ * the classified contact-seller flow (no checkout, chat/phone only) against permanent
4
+ * catalog content. Previously an empty stub "out of scope for the minimal
5
+ * Beyblade-focused demo catalog" — now populated with one seller-run local listing.
6
+ * WHAT: Exports 1 classified listing on Beyblade Arena — local meetup, negotiable.
5
7
  *
6
8
  * EXPORTS:
7
- * productsClassifiedsSeedData — empty array
9
+ * productsClassifiedsSeedData — Array of 1 Partial<ProductDocument> with listingType:"classified"
8
10
  *
9
11
  * @tag domain:products,classifieds
10
12
  * @tag layer:seed
@@ -13,4 +15,45 @@
13
15
  * @tag consumers:seed/index.ts,seed/runner.ts
14
16
  * @tag sideEffects:none
15
17
  */
16
- export const productsClassifiedsSeedData = [];
18
+ import { PRODUCT_FIELDS } from "../constants/field-names";
19
+ import { buildSearchTokens } from "../utils/search-tokens";
20
+ import { seedExtMedia } from "./_helpers/media";
21
+ export const productsClassifiedsSeedData = [
22
+ {
23
+ id: "classified-beyblade-stadium-set",
24
+ slug: "classified-beyblade-stadium-set",
25
+ title: "Used Beyblade Stadium Set — Local Pickup Only",
26
+ description: "Well-loved Beyblade stadium with 6 tops and 2 launchers, sold as-is. Meet up locally or arrange your own shipping — price is negotiable.",
27
+ categorySlugs: ["category-spinning-tops"],
28
+ categoryNames: ["Spinning Tops"],
29
+ brandSlug: "brand-beyblade",
30
+ brand: "Beyblade",
31
+ price: 1200,
32
+ currency: "INR",
33
+ stockQuantity: 1,
34
+ availableQuantity: 1,
35
+ isSold: false,
36
+ mainImage: seedExtMedia("https://picsum.photos/seed/classified-image-beyblade-stadium-set-1-20260101/900/900"),
37
+ images: [seedExtMedia("https://picsum.photos/seed/classified-image-beyblade-stadium-set-1-20260101/900/900")],
38
+ status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
39
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.USED,
40
+ listingType: "classified",
41
+ storeId: "store-beyblade-arena",
42
+ storeName: "Beyblade Arena",
43
+ classified: {
44
+ meetupArea: { city: "Mumbai", locality: "Andheri West", pincode: "400058" },
45
+ contactMethod: "both",
46
+ acceptsShipping: false,
47
+ negotiable: true,
48
+ },
49
+ customFields: [],
50
+ customSections: [],
51
+ featured: false,
52
+ isPromoted: false,
53
+ isOnSale: false,
54
+ tags: ["classified", "local-pickup"],
55
+ createdAt: new Date("2026-05-05"),
56
+ updatedAt: new Date("2026-05-05"),
57
+ searchTokens: buildSearchTokens("Used Beyblade Stadium Set — Local Pickup Only", "Well-loved Beyblade stadium with 6 tops and 2 launchers.", "Beyblade", "brand-beyblade", ["Spinning Tops"], ["classified", "local-pickup"]),
58
+ },
59
+ ];
@@ -1,10 +1,12 @@
1
1
  /*
2
- * WHY: Digital-code listings are out of scope for the minimal Beyblade-focused demo catalog.
3
- * WHAT: Exports an empty array kept as a stub so seed/index.ts and the seed API route's
4
- * SEED_DATA_MAP.products concatenation keep working without a code change elsewhere.
2
+ * WHY: Real (non-tester-sandbox) digital-code listing so testers and shoppers can exercise
3
+ * the auto-claim digital delivery flow against permanent catalog content. Previously an
4
+ * empty stub "out of scope for the minimal Beyblade-focused demo catalog" — now
5
+ * populated with one companion-app unlock code, on-theme for the spinning-tops catalog.
6
+ * WHAT: Exports 1 digital-code listing on Beyblade Arena — auto-claim delivery.
5
7
  *
6
8
  * EXPORTS:
7
- * productsDigitalCodesSeedData — empty array
9
+ * productsDigitalCodesSeedData — Array of 1 Partial<ProductDocument> with listingType:"digital-code"
8
10
  *
9
11
  * @tag domain:products,digital-codes
10
12
  * @tag layer:seed
@@ -13,4 +15,45 @@
13
15
  * @tag consumers:seed/index.ts,seed/runner.ts
14
16
  * @tag sideEffects:none
15
17
  */
16
- export const productsDigitalCodesSeedData = [];
18
+ import { PRODUCT_FIELDS } from "../constants/field-names";
19
+ import { buildSearchTokens } from "../utils/search-tokens";
20
+ import { seedExtMedia } from "./_helpers/media";
21
+ export const productsDigitalCodesSeedData = [
22
+ {
23
+ id: "digitalcode-beyblade-x-app-unlock",
24
+ slug: "digitalcode-beyblade-x-app-unlock",
25
+ title: "Beyblade X Companion App — Premium Unlock Code",
26
+ description: "Digital unlock code for the Beyblade X companion app's premium tournament tracker and battle-log features. Delivered instantly after payment.",
27
+ categorySlugs: ["category-spinning-tops"],
28
+ categoryNames: ["Spinning Tops"],
29
+ brandSlug: "brand-takara-tomy",
30
+ brand: "Takara-Tomy",
31
+ price: 199,
32
+ currency: "INR",
33
+ stockQuantity: 25,
34
+ availableQuantity: 25,
35
+ isSold: false,
36
+ mainImage: seedExtMedia("https://picsum.photos/seed/digitalcode-image-beyblade-x-app-unlock-1-20260101/900/900"),
37
+ images: [seedExtMedia("https://picsum.photos/seed/digitalcode-image-beyblade-x-app-unlock-1-20260101/900/900")],
38
+ status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
39
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
40
+ listingType: "digital-code",
41
+ storeId: "store-beyblade-arena",
42
+ storeName: "Beyblade Arena",
43
+ digitalCode: {
44
+ codeDeliveryMethod: "auto-claim",
45
+ codePoolSize: 25,
46
+ codesAvailable: 25,
47
+ redemptionInstructions: "Open the Beyblade X companion app, go to Settings → Redeem Code, and enter your code to unlock premium features.",
48
+ },
49
+ customFields: [],
50
+ customSections: [],
51
+ featured: false,
52
+ isPromoted: false,
53
+ isOnSale: false,
54
+ tags: ["digital-code", "app-unlock"],
55
+ createdAt: new Date("2026-05-05"),
56
+ updatedAt: new Date("2026-05-05"),
57
+ searchTokens: buildSearchTokens("Beyblade X Companion App — Premium Unlock Code", "Digital unlock code for the Beyblade X companion app.", "Takara-Tomy", "brand-takara-tomy", ["Spinning Tops"], ["digital-code", "app-unlock"]),
58
+ },
59
+ ];
@@ -1,5 +1,10 @@
1
1
  /*
2
- * WHY: Live-item listings are out of scope for the minimal Beyblade-focused demo catalog.
2
+ * WHY: `listingType: "live"` is schema-specific to animals/plants (ProductLiveItemMeta:
3
+ * species, ageMonths, sex, jurisdictionAllowed, vendor verification, CITES permit) —
4
+ * genuinely inapplicable to this catalog's spinning-tops/collectibles theme, so left
5
+ * deliberately empty in the real seed rather than forcing a nonsensical example.
6
+ * Testers can still exercise the live-item buyer flow against the disposable
7
+ * tester-sandbox fixture in appkit/src/features/tester/seed-data/products-tester-seed-data.ts.
3
8
  * WHAT: Exports an empty array — kept as a stub so seed/index.ts and the seed API route's
4
9
  * SEED_DATA_MAP.products concatenation keep working without a code change elsewhere.
5
10
  *
@@ -1,10 +1,14 @@
1
1
  /*
2
- * WHY: Prize-draw listings are out of scope for the minimal Beyblade-focused demo catalog.
3
- * WHAT: Exports an empty array kept as a stub so seed/index.ts and the seed API route's
4
- * SEED_DATA_MAP.products concatenation keep working without a code change elsewhere.
2
+ * WHY: Real (non-tester-sandbox) prize-draw listing so testers and shoppers can exercise
3
+ * the prize-draw buy reveal flow against permanent catalog content, not just the
4
+ * disposable 7-day tester sandbox item. Previously an empty stub "out of scope for
5
+ * the minimal Beyblade-focused demo catalog" — now populated with one platform-run
6
+ * mystery-box draw, on-theme for the spinning-tops catalog.
7
+ * WHAT: Exports 1 prize-draw listing (classic reveal mode, 4 prizes) run by the platform's
8
+ * own store, letitrip-official.
5
9
  *
6
10
  * EXPORTS:
7
- * productsPrizeDrawsSeedData — empty array
11
+ * productsPrizeDrawsSeedData — Array of 1 Partial<ProductDocument> with listingType:"prize-draw"
8
12
  *
9
13
  * @tag domain:products,prize-draws
10
14
  * @tag layer:seed
@@ -13,4 +17,53 @@
13
17
  * @tag consumers:seed/index.ts,seed/runner.ts
14
18
  * @tag sideEffects:none
15
19
  */
16
- export const productsPrizeDrawsSeedData = [];
20
+ import { PRODUCT_FIELDS } from "../constants/field-names";
21
+ import { buildSearchTokens } from "../utils/search-tokens";
22
+ import { seedExtMedia } from "./_helpers/media";
23
+ export const productsPrizeDrawsSeedData = [
24
+ {
25
+ id: "prizedraw-beyblade-mystery-box",
26
+ slug: "prizedraw-beyblade-mystery-box",
27
+ title: "Beyblade Mystery Box — Prize Draw",
28
+ description: "Buy an entry for ₹99 and reveal your prize instantly — win anything from a rare limited-edition Beyblade down to a spare launcher grip. 4 prizes available, revealed on a first-come basis.",
29
+ categorySlugs: ["category-spinning-tops"],
30
+ categoryNames: ["Spinning Tops"],
31
+ brandSlug: "brand-beyblade",
32
+ brand: "Beyblade",
33
+ price: 99,
34
+ currency: "INR",
35
+ stockQuantity: 4,
36
+ availableQuantity: 4,
37
+ isSold: false,
38
+ mainImage: seedExtMedia("https://picsum.photos/seed/prizedraw-image-beyblade-mystery-box-1-20260101/900/900"),
39
+ images: [seedExtMedia("https://picsum.photos/seed/prizedraw-image-beyblade-mystery-box-1-20260101/900/900")],
40
+ status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
41
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
42
+ listingType: "prize-draw",
43
+ storeId: "store-letitrip-official",
44
+ storeName: "LetItRip Official",
45
+ prizeDrawMode: "reveal",
46
+ pricePerEntry: 99,
47
+ prizeMaxEntries: 4,
48
+ prizeCurrentEntries: 0,
49
+ prizeRevealWindowStart: new Date("2026-05-01"),
50
+ prizeRevealWindowEnd: new Date("2026-12-31"),
51
+ prizeRevealStatus: "open",
52
+ prizeRevealDeadlineDays: 7,
53
+ prizeDrawItems: [
54
+ { itemNumber: 1, title: "Limited-Edition Gold Dranzer S", description: "Rare gold-finish collector's edition.", images: [seedExtMedia("https://picsum.photos/seed/prizedraw-item-beyblade-1-20260101/600/600")], condition: "new", estimatedValue: 3499, isWon: false },
55
+ { itemNumber: 2, title: "Beyblade X Starter Set", description: "Full starter set with stadium.", images: [seedExtMedia("https://picsum.photos/seed/prizedraw-item-beyblade-2-20260101/600/600")], condition: "new", estimatedValue: 1999, isWon: false },
56
+ { itemNumber: 3, title: "Spare Parts Bundle", description: "Assorted spare tips, rings, and drivers.", images: [seedExtMedia("https://picsum.photos/seed/prizedraw-item-beyblade-3-20260101/600/600")], condition: "new", estimatedValue: 399, isWon: false },
57
+ { itemNumber: 4, title: "Spare Launcher Grip", description: "Standard replacement launcher grip.", images: [seedExtMedia("https://picsum.photos/seed/prizedraw-item-beyblade-4-20260101/600/600")], condition: "new", estimatedValue: 149, isWon: false },
58
+ ],
59
+ customFields: [],
60
+ customSections: [],
61
+ featured: false,
62
+ isPromoted: true,
63
+ isOnSale: false,
64
+ tags: ["prize-draw", "mystery-box"],
65
+ createdAt: new Date("2026-05-01"),
66
+ updatedAt: new Date("2026-05-01"),
67
+ searchTokens: buildSearchTokens("Beyblade Mystery Box — Prize Draw", "Buy an entry and reveal your prize instantly.", "Beyblade", "brand-beyblade", ["Spinning Tops"], ["prize-draw", "mystery-box"]),
68
+ },
69
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mohasinac/appkit",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -173,6 +173,7 @@ const {
173
173
  brandsSeedData, usersSeedData, addressesSeedData, storeAddressesSeedData,
174
174
  categoriesSeedData, storesSeedData, sessionsSeedData,
175
175
  productsStandardSeedData, productsAuctionsSeedData, productsPreordersSeedData,
176
+ productsPrizeDrawsSeedData, productsClassifiedsSeedData, productsDigitalCodesSeedData, productsLiveItemsSeedData,
176
177
  ordersSeedData, reviewsSeedData, cartsSeedData, bidsSeedData,
177
178
  couponsSeedData, couponUsageSeedData,
178
179
  eventsSeedData, eventEntriesSeedData, payoutsSeedData,
@@ -185,6 +186,7 @@ const {
185
186
  testerChecklistSeedData,
186
187
  storesTesterSeedData, categoriesTesterSeedData, productsTesterSeedData,
187
188
  blogTesterSeedData, eventsTesterSeedData,
189
+ couponsTesterSeedData, bidsTesterSeedData, ordersTesterSeedData,
188
190
  // collection constants
189
191
  USER_COLLECTION, ADDRESS_SUBCOLLECTION, STORE_ADDRESS_SUBCOLLECTION,
190
192
  BRANDS_COLLECTION, CATEGORIES_COLLECTION, STORE_COLLECTION,
@@ -250,11 +252,15 @@ const SEED_DATA_MAP = {
250
252
  brands: brandsSeedData,
251
253
  categories: [...(categoriesSeedData || []), ...(categoriesTesterSeedData || [])],
252
254
  stores: [...(storesSeedData || []), ...(storesTesterSeedData || [])],
253
- products: [...(productsStandardSeedData || []), ...(productsAuctionsSeedData || []), ...(productsPreordersSeedData || []), ...(productsTesterSeedData || [])],
254
- orders: ordersSeedData,
255
+ products: [
256
+ ...(productsStandardSeedData || []), ...(productsAuctionsSeedData || []), ...(productsPreordersSeedData || []),
257
+ ...(productsPrizeDrawsSeedData || []), ...(productsClassifiedsSeedData || []), ...(productsDigitalCodesSeedData || []), ...(productsLiveItemsSeedData || []),
258
+ ...(productsTesterSeedData || []),
259
+ ],
260
+ orders: [...(ordersSeedData || []), ...(ordersTesterSeedData || [])],
255
261
  reviews: reviewsSeedData,
256
- bids: bidsSeedData,
257
- coupons: couponsSeedData,
262
+ bids: [...(bidsSeedData || []), ...(bidsTesterSeedData || [])],
263
+ coupons: [...(couponsSeedData || []), ...(couponsTesterSeedData || [])],
258
264
  couponUsage: couponUsageSeedData,
259
265
  carousels: carouselsSeedData,
260
266
  carouselSlides: carouselSlidesSeedData,