@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.
- package/dist/features/tester/seed-data/bids-tester-seed-data.d.ts +2 -0
- package/dist/features/tester/seed-data/bids-tester-seed-data.js +37 -0
- package/dist/features/tester/seed-data/coupons-tester-seed-data.d.ts +2 -0
- package/dist/features/tester/seed-data/coupons-tester-seed-data.js +76 -0
- package/dist/features/tester/seed-data/events-tester-seed-data.js +50 -2
- package/dist/features/tester/seed-data/index.d.ts +3 -0
- package/dist/features/tester/seed-data/index.js +3 -0
- package/dist/features/tester/seed-data/orders-tester-seed-data.d.ts +2 -0
- package/dist/features/tester/seed-data/orders-tester-seed-data.js +265 -0
- package/dist/features/tester/seed-data/products-tester-seed-data.js +213 -8
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +276 -6
- package/dist/next/api/routeHandler.js +6 -10
- package/dist/seed/index.d.ts +1 -1
- package/dist/seed/index.js +1 -1
- package/dist/seed/manifest.js +4 -4
- package/dist/seed/orders-seed-data.js +4 -0
- package/dist/seed/products-classifieds-seed-data.js +48 -5
- package/dist/seed/products-digital-codes-seed-data.js +48 -5
- package/dist/seed/products-live-items-seed-data.js +6 -1
- package/dist/seed/products-prize-draws-seed-data.js +58 -5
- package/package.json +1 -1
- package/scripts/seed-cli.mjs +10 -4
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* WHY: Shared tester sandbox — one winning bid on the already-ended auction-tester-sandbox-won
|
|
3
|
+
* (kept separate from the still-biddable auction-tester-sandbox-1 so testers can still
|
|
4
|
+
* place a live bid on the latter) so testers (and the paired orders-tester-seed-data.ts
|
|
5
|
+
* auction-win order) can exercise the "winning an auction creates a payable order" flow.
|
|
6
|
+
* Auto-expires in 7 days, cascading with the parent auction product.
|
|
7
|
+
* WHAT: Exports bidsTesterSeedData — 1 Partial<BidDocument> for the seed runner.
|
|
8
|
+
*
|
|
9
|
+
* EXPORTS:
|
|
10
|
+
* bidsTesterSeedData — Array of 1 Partial<BidDocument> for the seed runner
|
|
11
|
+
*
|
|
12
|
+
* @tag domain:auctions,bids,tester
|
|
13
|
+
* @tag layer:seed
|
|
14
|
+
* @tag pattern:none
|
|
15
|
+
* @tag access:server-only
|
|
16
|
+
* @tag consumers:seed/index.ts,seed-cli.mjs
|
|
17
|
+
* @tag sideEffects:none
|
|
18
|
+
*/
|
|
19
|
+
const NOW = new Date();
|
|
20
|
+
const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
|
|
21
|
+
export const bidsTesterSeedData = [
|
|
22
|
+
{
|
|
23
|
+
id: "bid-tester-sandbox-won-tester-qa",
|
|
24
|
+
productId: "auction-tester-sandbox-won",
|
|
25
|
+
productTitle: "Test Auction — Already Won",
|
|
26
|
+
userId: "user-tester-qa",
|
|
27
|
+
userName: "QA Tester",
|
|
28
|
+
userEmail: "tester@letitrip.in",
|
|
29
|
+
bidAmount: 15000,
|
|
30
|
+
currency: "INR",
|
|
31
|
+
status: "won",
|
|
32
|
+
isWinning: true,
|
|
33
|
+
bidDate: daysAgo(1),
|
|
34
|
+
createdAt: daysAgo(1),
|
|
35
|
+
updatedAt: daysAgo(1),
|
|
36
|
+
},
|
|
37
|
+
];
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* WHY: Shared tester sandbox — 3 disposable test coupons so testers can exercise
|
|
3
|
+
* coupon apply/reject edge cases end to end: a perUserLimit:1 admin coupon (to
|
|
4
|
+
* verify the second-use rejection), an already-expired admin coupon (to verify
|
|
5
|
+
* the expiry rejection), and a seller-scope coupon on store-tester-sandbox.
|
|
6
|
+
* NOTE: CouponDocument does not currently carry isTestData/testDataExpiresAt
|
|
7
|
+
* (unlike categories/stores/products/blogPosts/events) — testerSandboxCleanup
|
|
8
|
+
* does not cascade-delete these. They're small, static, and harmless to leave;
|
|
9
|
+
* extending the cleanup script to cover coupons is a follow-up, not blocking.
|
|
10
|
+
* WHAT: Exports couponsTesterSeedData — 3 Partial<CouponDocument> for the seed runner.
|
|
11
|
+
*
|
|
12
|
+
* EXPORTS:
|
|
13
|
+
* couponsTesterSeedData — Array of 3 Partial<CouponDocument> for the seed runner
|
|
14
|
+
*
|
|
15
|
+
* @tag domain:coupons,tester
|
|
16
|
+
* @tag layer:seed
|
|
17
|
+
* @tag pattern:none
|
|
18
|
+
* @tag access:server-only
|
|
19
|
+
* @tag consumers:seed/index.ts,seed-cli.mjs
|
|
20
|
+
* @tag sideEffects:none
|
|
21
|
+
*/
|
|
22
|
+
import { COUPON_FIELDS } from "../../../constants/field-names";
|
|
23
|
+
const NOW = new Date();
|
|
24
|
+
const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
|
|
25
|
+
const daysAhead = (n) => new Date(NOW.getTime() + n * 86400000);
|
|
26
|
+
export const couponsTesterSeedData = [
|
|
27
|
+
{
|
|
28
|
+
id: "coupon-tester-sandbox-limited",
|
|
29
|
+
code: "TESTERLIMITED",
|
|
30
|
+
name: "Tester Sandbox — One Use Per Tester",
|
|
31
|
+
description: "Disposable test coupon: 10% off, capped at one use per tester. Use it twice to verify the second attempt is rejected.",
|
|
32
|
+
type: COUPON_FIELDS.TYPE_VALUES.PERCENTAGE,
|
|
33
|
+
scope: COUPON_FIELDS.SCOPE_VALUES.ADMIN,
|
|
34
|
+
discount: { value: 10, maxDiscount: 100, minPurchase: 100 },
|
|
35
|
+
usage: { totalLimit: undefined, perUserLimit: 1, currentUsage: 0 },
|
|
36
|
+
validity: { startDate: daysAgo(1), endDate: daysAhead(7), isActive: true },
|
|
37
|
+
restrictions: { firstTimeUserOnly: false, combineWithSellerCoupons: true },
|
|
38
|
+
createdBy: "user-admin-letitrip",
|
|
39
|
+
createdAt: daysAgo(1),
|
|
40
|
+
updatedAt: daysAgo(1),
|
|
41
|
+
stats: { totalUses: 0, totalRevenue: 0, totalDiscount: 0 },
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "coupon-tester-sandbox-expired",
|
|
45
|
+
code: "TESTEREXPIRED",
|
|
46
|
+
name: "Tester Sandbox — Already Expired",
|
|
47
|
+
description: "Disposable test coupon that already expired — applying it at checkout should show a specific expiry rejection.",
|
|
48
|
+
type: COUPON_FIELDS.TYPE_VALUES.FIXED,
|
|
49
|
+
scope: COUPON_FIELDS.SCOPE_VALUES.ADMIN,
|
|
50
|
+
discount: { value: 50, maxDiscount: 50, minPurchase: 100 },
|
|
51
|
+
usage: { totalLimit: undefined, perUserLimit: 5, currentUsage: 0 },
|
|
52
|
+
validity: { startDate: daysAgo(30), endDate: daysAgo(1), isActive: true },
|
|
53
|
+
restrictions: { firstTimeUserOnly: false, combineWithSellerCoupons: true },
|
|
54
|
+
createdBy: "user-admin-letitrip",
|
|
55
|
+
createdAt: daysAgo(30),
|
|
56
|
+
updatedAt: daysAgo(30),
|
|
57
|
+
stats: { totalUses: 0, totalRevenue: 0, totalDiscount: 0 },
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "coupon-tester-sandbox-seller",
|
|
61
|
+
code: "TESTERSTORE",
|
|
62
|
+
name: "Tester Sandbox Store — 5% Off",
|
|
63
|
+
description: "Disposable seller-scope test coupon on the tester sandbox store.",
|
|
64
|
+
type: COUPON_FIELDS.TYPE_VALUES.PERCENTAGE,
|
|
65
|
+
scope: COUPON_FIELDS.SCOPE_VALUES.SELLER,
|
|
66
|
+
storeId: "store-tester-sandbox",
|
|
67
|
+
discount: { value: 5, maxDiscount: 50, minPurchase: 0 },
|
|
68
|
+
usage: { totalLimit: undefined, perUserLimit: 3, currentUsage: 0 },
|
|
69
|
+
validity: { startDate: daysAgo(1), endDate: daysAhead(7), isActive: true },
|
|
70
|
+
restrictions: { firstTimeUserOnly: false, combineWithSellerCoupons: true },
|
|
71
|
+
createdBy: "user-admin-letitrip",
|
|
72
|
+
createdAt: daysAgo(1),
|
|
73
|
+
updatedAt: daysAgo(1),
|
|
74
|
+
stats: { totalUses: 0, totalRevenue: 0, totalDiscount: 0 },
|
|
75
|
+
},
|
|
76
|
+
];
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
import { EVENT_FIELDS } from "../../../constants/field-names";
|
|
18
18
|
import { seedExtMedia } from "../../../seed/_helpers/media";
|
|
19
19
|
import { testDataExpiresAt } from "./tester-ttl";
|
|
20
|
+
const TEST_EVENT_COVER_ALT = "Test event cover";
|
|
21
|
+
const TEST_RAFFLE_PRIZE = "Test prize — not a real reward";
|
|
20
22
|
export const eventsTesterSeedData = [
|
|
21
23
|
{
|
|
22
24
|
id: "event-tester-sandbox-spin",
|
|
@@ -27,11 +29,11 @@ export const eventsTesterSeedData = [
|
|
|
27
29
|
status: EVENT_FIELDS.STATUS_VALUES.ACTIVE,
|
|
28
30
|
startsAt: new Date(),
|
|
29
31
|
endsAt: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000),
|
|
30
|
-
coverImage: { type: "image", url: seedExtMedia("https://picsum.photos/seed/event-cover-tester-sandbox-spin-20260101/1200/600"), alt:
|
|
32
|
+
coverImage: { type: "image", url: seedExtMedia("https://picsum.photos/seed/event-cover-tester-sandbox-spin-20260101/1200/600"), alt: TEST_EVENT_COVER_ALT },
|
|
31
33
|
tags: ["test"],
|
|
32
34
|
hasRaffle: true,
|
|
33
35
|
raffleType: "open_raffle",
|
|
34
|
-
rafflePrize:
|
|
36
|
+
rafflePrize: TEST_RAFFLE_PRIZE,
|
|
35
37
|
raffleEntryCount: 0,
|
|
36
38
|
spinPrizes: [
|
|
37
39
|
{ id: "spin-tester-win", label: "You Win!", weight: 50, isActive: true },
|
|
@@ -47,4 +49,50 @@ export const eventsTesterSeedData = [
|
|
|
47
49
|
createdAt: new Date(),
|
|
48
50
|
updatedAt: new Date(),
|
|
49
51
|
},
|
|
52
|
+
{
|
|
53
|
+
id: "event-tester-sandbox-top-scorers",
|
|
54
|
+
slug: "tester-sandbox-top-scorers",
|
|
55
|
+
type: EVENT_FIELDS.TYPE_VALUES.RAFFLE,
|
|
56
|
+
title: "Tester Sandbox — Top Scorers Raffle",
|
|
57
|
+
description: "Disposable test event for the tester QA program. Verify top_n_scorers raffle entry and the leaderboard.",
|
|
58
|
+
status: EVENT_FIELDS.STATUS_VALUES.ACTIVE,
|
|
59
|
+
startsAt: new Date(),
|
|
60
|
+
endsAt: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000),
|
|
61
|
+
coverImage: { type: "image", url: seedExtMedia("https://picsum.photos/seed/event-cover-tester-sandbox-top-scorers-20260101/1200/600"), alt: TEST_EVENT_COVER_ALT },
|
|
62
|
+
tags: ["test"],
|
|
63
|
+
hasRaffle: true,
|
|
64
|
+
raffleType: "top_n_scorers",
|
|
65
|
+
raffleTopN: 3,
|
|
66
|
+
rafflePrize: TEST_RAFFLE_PRIZE,
|
|
67
|
+
raffleEntryCount: 0,
|
|
68
|
+
stats: { totalEntries: 0, approvedEntries: 0, flaggedEntries: 0 },
|
|
69
|
+
createdBy: "user-admin-letitrip",
|
|
70
|
+
isTestData: true,
|
|
71
|
+
testDataExpiresAt: testDataExpiresAt(),
|
|
72
|
+
createdAt: new Date(),
|
|
73
|
+
updatedAt: new Date(),
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: "event-tester-sandbox-top-participants",
|
|
77
|
+
slug: "tester-sandbox-top-participants",
|
|
78
|
+
type: EVENT_FIELDS.TYPE_VALUES.RAFFLE,
|
|
79
|
+
title: "Tester Sandbox — Top Participants Raffle",
|
|
80
|
+
description: "Disposable test event for the tester QA program. Verify top_n_participants raffle entry.",
|
|
81
|
+
status: EVENT_FIELDS.STATUS_VALUES.ACTIVE,
|
|
82
|
+
startsAt: new Date(),
|
|
83
|
+
endsAt: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000),
|
|
84
|
+
coverImage: { type: "image", url: seedExtMedia("https://picsum.photos/seed/event-cover-tester-sandbox-top-participants-20260101/1200/600"), alt: TEST_EVENT_COVER_ALT },
|
|
85
|
+
tags: ["test"],
|
|
86
|
+
hasRaffle: true,
|
|
87
|
+
raffleType: "top_n_participants",
|
|
88
|
+
raffleTopN: 5,
|
|
89
|
+
rafflePrize: TEST_RAFFLE_PRIZE,
|
|
90
|
+
raffleEntryCount: 0,
|
|
91
|
+
stats: { totalEntries: 0, approvedEntries: 0, flaggedEntries: 0 },
|
|
92
|
+
createdBy: "user-admin-letitrip",
|
|
93
|
+
isTestData: true,
|
|
94
|
+
testDataExpiresAt: testDataExpiresAt(),
|
|
95
|
+
createdAt: new Date(),
|
|
96
|
+
updatedAt: new Date(),
|
|
97
|
+
},
|
|
50
98
|
];
|
|
@@ -4,3 +4,6 @@ export { categoriesTesterSeedData } from "./categories-tester-seed-data";
|
|
|
4
4
|
export { productsTesterSeedData } from "./products-tester-seed-data";
|
|
5
5
|
export { blogTesterSeedData } from "./blog-tester-seed-data";
|
|
6
6
|
export { eventsTesterSeedData } from "./events-tester-seed-data";
|
|
7
|
+
export { couponsTesterSeedData } from "./coupons-tester-seed-data";
|
|
8
|
+
export { bidsTesterSeedData } from "./bids-tester-seed-data";
|
|
9
|
+
export { ordersTesterSeedData } from "./orders-tester-seed-data";
|
|
@@ -4,3 +4,6 @@ export { categoriesTesterSeedData } from "./categories-tester-seed-data";
|
|
|
4
4
|
export { productsTesterSeedData } from "./products-tester-seed-data";
|
|
5
5
|
export { blogTesterSeedData } from "./blog-tester-seed-data";
|
|
6
6
|
export { eventsTesterSeedData } from "./events-tester-seed-data";
|
|
7
|
+
export { couponsTesterSeedData } from "./coupons-tester-seed-data";
|
|
8
|
+
export { bidsTesterSeedData } from "./bids-tester-seed-data";
|
|
9
|
+
export { ordersTesterSeedData } from "./orders-tester-seed-data";
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* WHY: Shared tester sandbox — one order per OrderStatus value (9 statuses) plus one
|
|
3
|
+
* each for the non-standard order types (auction win, bundle, prize-draw win,
|
|
4
|
+
* prize-draw loss/auto-refund) so testers can see every order-management state
|
|
5
|
+
* without manually driving each one through the full checkout/shipping/return
|
|
6
|
+
* flow first. Buyer is the dedicated user-tester-qa persona. Auto-expires in 7
|
|
7
|
+
* days via testerSandboxCleanup (orders aren't cascade-deleted — see note below).
|
|
8
|
+
* WHAT: Exports ordersTesterSeedData — 13 Partial<OrderDocument> for the seed runner.
|
|
9
|
+
*
|
|
10
|
+
* NOTE: OrderDocument does not currently carry isTestData/testDataExpiresAt (unlike
|
|
11
|
+
* categories/stores/products/blogPosts/events) — testerSandboxCleanup does not
|
|
12
|
+
* cascade-delete these order documents when the parent product/store expires.
|
|
13
|
+
* They're small and harmless to leave; extending the cleanup script to cover
|
|
14
|
+
* orders is a follow-up, not blocking.
|
|
15
|
+
*
|
|
16
|
+
* EXPORTS:
|
|
17
|
+
* ordersTesterSeedData — Array of 13 Partial<OrderDocument> for the seed runner
|
|
18
|
+
*
|
|
19
|
+
* @tag domain:orders,tester
|
|
20
|
+
* @tag layer:seed
|
|
21
|
+
* @tag pattern:none
|
|
22
|
+
* @tag access:server-only
|
|
23
|
+
* @tag consumers:seed/index.ts,seed-cli.mjs
|
|
24
|
+
* @tag sideEffects:none
|
|
25
|
+
*/
|
|
26
|
+
const NOW = new Date();
|
|
27
|
+
const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
|
|
28
|
+
const BUYER_ID = "user-tester-qa";
|
|
29
|
+
const BUYER_NAME = "QA Tester";
|
|
30
|
+
const BUYER_EMAIL = "tester@letitrip.in";
|
|
31
|
+
const STORE_ID = "store-tester-sandbox";
|
|
32
|
+
const STORE_NAME = "Tester Sandbox Store";
|
|
33
|
+
const STANDARD_PRODUCT_ID = "product-tester-standard-1";
|
|
34
|
+
const STANDARD_PRODUCT_TITLE = "Test Gadget — Standard Listing #1";
|
|
35
|
+
const PRIZEDRAW_PRODUCT_ID = "prizedraw-tester-sandbox-1";
|
|
36
|
+
const PRIZEDRAW_PRODUCT_TITLE = "Test Prize Draw — Reveal Me!";
|
|
37
|
+
function standardOrder({ key, status, paymentStatus, extra }) {
|
|
38
|
+
return {
|
|
39
|
+
id: `order-tester-sandbox-standard-${key}`,
|
|
40
|
+
productId: STANDARD_PRODUCT_ID,
|
|
41
|
+
productTitle: STANDARD_PRODUCT_TITLE,
|
|
42
|
+
userId: BUYER_ID,
|
|
43
|
+
userName: BUYER_NAME,
|
|
44
|
+
userEmail: BUYER_EMAIL,
|
|
45
|
+
storeId: STORE_ID,
|
|
46
|
+
storeName: STORE_NAME,
|
|
47
|
+
items: [
|
|
48
|
+
{ productId: STANDARD_PRODUCT_ID, productTitle: STANDARD_PRODUCT_TITLE, listingType: "standard", quantity: 1, unitPrice: 199, totalPrice: 199 },
|
|
49
|
+
],
|
|
50
|
+
orderType: "standard",
|
|
51
|
+
quantity: 1,
|
|
52
|
+
unitPrice: 199,
|
|
53
|
+
totalPrice: 199,
|
|
54
|
+
currency: "INR",
|
|
55
|
+
status,
|
|
56
|
+
paymentStatus,
|
|
57
|
+
paymentMethod: "upi_manual",
|
|
58
|
+
shippingAddress: "addr-tester-qa-home",
|
|
59
|
+
orderDate: daysAgo(3),
|
|
60
|
+
createdAt: daysAgo(3),
|
|
61
|
+
updatedAt: daysAgo(1),
|
|
62
|
+
...extra,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
export const ordersTesterSeedData = [
|
|
66
|
+
// ── One order per OrderStatus value (9) ──────────────────────────────────────
|
|
67
|
+
standardOrder({ key: "pending", status: "pending", paymentStatus: "pending" }),
|
|
68
|
+
standardOrder({ key: "confirmed", status: "confirmed", paymentStatus: "paid" }),
|
|
69
|
+
standardOrder({ key: "processing", status: "processing", paymentStatus: "paid" }),
|
|
70
|
+
standardOrder({
|
|
71
|
+
key: "shipped",
|
|
72
|
+
status: "shipped",
|
|
73
|
+
paymentStatus: "paid",
|
|
74
|
+
extra: { trackingNumber: "TEST-TRACK-001", shippingCarrier: "Test Carrier", shippingDate: daysAgo(1) },
|
|
75
|
+
}),
|
|
76
|
+
standardOrder({
|
|
77
|
+
key: "delivered",
|
|
78
|
+
status: "delivered",
|
|
79
|
+
paymentStatus: "paid",
|
|
80
|
+
extra: { trackingNumber: "TEST-TRACK-002", shippingCarrier: "Test Carrier", shippingDate: daysAgo(2), deliveryDate: daysAgo(1) },
|
|
81
|
+
}),
|
|
82
|
+
standardOrder({
|
|
83
|
+
key: "cancelled",
|
|
84
|
+
status: "cancelled",
|
|
85
|
+
paymentStatus: "refunded",
|
|
86
|
+
extra: { cancellationDate: daysAgo(1), cancellationReason: "Disposable test cancellation — buyer changed their mind." },
|
|
87
|
+
}),
|
|
88
|
+
standardOrder({
|
|
89
|
+
key: "refunded",
|
|
90
|
+
status: "refunded",
|
|
91
|
+
paymentStatus: "refunded",
|
|
92
|
+
extra: { refundAmount: 199, refundStatus: "completed", refundNote: "Disposable test refund." },
|
|
93
|
+
}),
|
|
94
|
+
standardOrder({
|
|
95
|
+
key: "return-requested",
|
|
96
|
+
status: "return_requested",
|
|
97
|
+
paymentStatus: "paid",
|
|
98
|
+
extra: { trackingNumber: "TEST-TRACK-003", shippingDate: daysAgo(3), deliveryDate: daysAgo(2) },
|
|
99
|
+
}),
|
|
100
|
+
standardOrder({
|
|
101
|
+
key: "returned",
|
|
102
|
+
status: "returned",
|
|
103
|
+
paymentStatus: "refunded",
|
|
104
|
+
extra: {
|
|
105
|
+
trackingNumber: "TEST-TRACK-004",
|
|
106
|
+
shippingDate: daysAgo(5),
|
|
107
|
+
deliveryDate: daysAgo(4),
|
|
108
|
+
refundAmount: 199,
|
|
109
|
+
refundStatus: "completed",
|
|
110
|
+
},
|
|
111
|
+
}),
|
|
112
|
+
// ── Auction win — order created from the already-ended auction-tester-sandbox-won ──
|
|
113
|
+
{
|
|
114
|
+
id: "order-tester-sandbox-auction-win",
|
|
115
|
+
productId: "auction-tester-sandbox-won",
|
|
116
|
+
productTitle: "Test Auction — Already Won",
|
|
117
|
+
userId: BUYER_ID,
|
|
118
|
+
userName: BUYER_NAME,
|
|
119
|
+
userEmail: BUYER_EMAIL,
|
|
120
|
+
storeId: STORE_ID,
|
|
121
|
+
storeName: STORE_NAME,
|
|
122
|
+
items: [
|
|
123
|
+
{ productId: "auction-tester-sandbox-won", productTitle: "Test Auction — Already Won", listingType: "auction", quantity: 1, unitPrice: 15000, totalPrice: 15000 },
|
|
124
|
+
],
|
|
125
|
+
orderType: "auction",
|
|
126
|
+
quantity: 1,
|
|
127
|
+
unitPrice: 15000,
|
|
128
|
+
totalPrice: 15000,
|
|
129
|
+
currency: "INR",
|
|
130
|
+
status: "delivered",
|
|
131
|
+
paymentStatus: "paid",
|
|
132
|
+
paymentMethod: "upi_manual",
|
|
133
|
+
shippingAddress: "addr-tester-qa-home",
|
|
134
|
+
trackingNumber: "TEST-TRACK-AUCTION-001",
|
|
135
|
+
shippingCarrier: "Test Carrier",
|
|
136
|
+
shippingDate: daysAgo(1),
|
|
137
|
+
deliveryDate: NOW,
|
|
138
|
+
orderDate: daysAgo(1),
|
|
139
|
+
createdAt: daysAgo(1),
|
|
140
|
+
updatedAt: NOW,
|
|
141
|
+
},
|
|
142
|
+
// ── Bundle purchase — group-tester-sandbox-bundle expands into its two children ──
|
|
143
|
+
{
|
|
144
|
+
id: "order-tester-sandbox-bundle",
|
|
145
|
+
productId: "group-tester-sandbox-bundle",
|
|
146
|
+
productTitle: "Test Bundle — Standard #1 + Standard #2",
|
|
147
|
+
userId: BUYER_ID,
|
|
148
|
+
userName: BUYER_NAME,
|
|
149
|
+
userEmail: BUYER_EMAIL,
|
|
150
|
+
storeId: STORE_ID,
|
|
151
|
+
storeName: STORE_NAME,
|
|
152
|
+
items: [
|
|
153
|
+
{
|
|
154
|
+
productId: "product-tester-standard-1",
|
|
155
|
+
productTitle: "Test Gadget — Standard Listing #1",
|
|
156
|
+
listingType: "standard",
|
|
157
|
+
quantity: 1,
|
|
158
|
+
unitPrice: 199,
|
|
159
|
+
totalPrice: 199,
|
|
160
|
+
bundleCategorySlug: "group-tester-sandbox-bundle",
|
|
161
|
+
bundleProductIds: ["product-tester-standard-1", "product-tester-standard-2"],
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
productId: "product-tester-standard-2",
|
|
165
|
+
productTitle: "Test Collectible — Standard Listing #2",
|
|
166
|
+
listingType: "standard",
|
|
167
|
+
quantity: 1,
|
|
168
|
+
unitPrice: 149,
|
|
169
|
+
totalPrice: 149,
|
|
170
|
+
bundleCategorySlug: "group-tester-sandbox-bundle",
|
|
171
|
+
bundleProductIds: ["product-tester-standard-1", "product-tester-standard-2"],
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
orderType: "standard",
|
|
175
|
+
bundleId: "group-tester-sandbox-bundle",
|
|
176
|
+
isNonRefundable: true,
|
|
177
|
+
quantity: 2,
|
|
178
|
+
unitPrice: 164,
|
|
179
|
+
totalPrice: 329,
|
|
180
|
+
currency: "INR",
|
|
181
|
+
status: "processing",
|
|
182
|
+
paymentStatus: "paid",
|
|
183
|
+
paymentMethod: "upi_manual",
|
|
184
|
+
shippingAddress: "addr-tester-qa-home",
|
|
185
|
+
orderDate: daysAgo(1),
|
|
186
|
+
createdAt: daysAgo(1),
|
|
187
|
+
updatedAt: daysAgo(1),
|
|
188
|
+
},
|
|
189
|
+
// ── Prize draw — winning entry (auto reveal isn't required for this seed to be
|
|
190
|
+
// useful; it just represents the post-reveal state a real reveal would produce) ──
|
|
191
|
+
{
|
|
192
|
+
id: "order-tester-sandbox-prizedraw-win",
|
|
193
|
+
productId: PRIZEDRAW_PRODUCT_ID,
|
|
194
|
+
productTitle: PRIZEDRAW_PRODUCT_TITLE,
|
|
195
|
+
userId: BUYER_ID,
|
|
196
|
+
userName: BUYER_NAME,
|
|
197
|
+
userEmail: BUYER_EMAIL,
|
|
198
|
+
storeId: STORE_ID,
|
|
199
|
+
storeName: STORE_NAME,
|
|
200
|
+
items: [
|
|
201
|
+
{
|
|
202
|
+
productId: PRIZEDRAW_PRODUCT_ID,
|
|
203
|
+
productTitle: PRIZEDRAW_PRODUCT_TITLE,
|
|
204
|
+
listingType: "prize-draw",
|
|
205
|
+
quantity: 1,
|
|
206
|
+
unitPrice: 50,
|
|
207
|
+
totalPrice: 50,
|
|
208
|
+
prizeRevealStatus: "revealed",
|
|
209
|
+
revealedItemNumber: 1,
|
|
210
|
+
},
|
|
211
|
+
],
|
|
212
|
+
orderType: "prize-draw",
|
|
213
|
+
prizeDrawProductId: PRIZEDRAW_PRODUCT_ID,
|
|
214
|
+
prizeWon: { itemNumber: 1, title: "Test Prize — Grand", images: [], wonAt: daysAgo(1) },
|
|
215
|
+
prizeRevealDeadline: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000),
|
|
216
|
+
isNonRefundable: true,
|
|
217
|
+
quantity: 1,
|
|
218
|
+
unitPrice: 50,
|
|
219
|
+
totalPrice: 50,
|
|
220
|
+
currency: "INR",
|
|
221
|
+
status: "delivered",
|
|
222
|
+
paymentStatus: "paid",
|
|
223
|
+
paymentMethod: "upi_manual",
|
|
224
|
+
orderDate: daysAgo(1),
|
|
225
|
+
createdAt: daysAgo(1),
|
|
226
|
+
updatedAt: daysAgo(1),
|
|
227
|
+
},
|
|
228
|
+
// ── Prize draw — non-winning entry, auto-refunded ────────────────────────────
|
|
229
|
+
{
|
|
230
|
+
id: "order-tester-sandbox-prizedraw-lose",
|
|
231
|
+
productId: PRIZEDRAW_PRODUCT_ID,
|
|
232
|
+
productTitle: PRIZEDRAW_PRODUCT_TITLE,
|
|
233
|
+
userId: "user-admin-letitrip",
|
|
234
|
+
userName: "LetItRip Admin",
|
|
235
|
+
userEmail: "admin@letitrip.in",
|
|
236
|
+
storeId: STORE_ID,
|
|
237
|
+
storeName: STORE_NAME,
|
|
238
|
+
items: [
|
|
239
|
+
{
|
|
240
|
+
productId: PRIZEDRAW_PRODUCT_ID,
|
|
241
|
+
productTitle: PRIZEDRAW_PRODUCT_TITLE,
|
|
242
|
+
listingType: "prize-draw",
|
|
243
|
+
quantity: 1,
|
|
244
|
+
unitPrice: 50,
|
|
245
|
+
totalPrice: 50,
|
|
246
|
+
prizeRevealStatus: "closed",
|
|
247
|
+
},
|
|
248
|
+
],
|
|
249
|
+
orderType: "prize-draw",
|
|
250
|
+
prizeDrawProductId: PRIZEDRAW_PRODUCT_ID,
|
|
251
|
+
quantity: 1,
|
|
252
|
+
unitPrice: 50,
|
|
253
|
+
totalPrice: 50,
|
|
254
|
+
currency: "INR",
|
|
255
|
+
status: "refunded",
|
|
256
|
+
paymentStatus: "refunded",
|
|
257
|
+
paymentMethod: "upi_manual",
|
|
258
|
+
refundAmount: 50,
|
|
259
|
+
refundStatus: "completed",
|
|
260
|
+
refundNote: "Disposable test — non-winning prize-draw entry auto-refunded after reveal.",
|
|
261
|
+
orderDate: daysAgo(1),
|
|
262
|
+
createdAt: daysAgo(1),
|
|
263
|
+
updatedAt: NOW,
|
|
264
|
+
},
|
|
265
|
+
];
|