@mohasinac/appkit 4.0.3 → 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/_internal/client/features/layout/useSidebarSearch.d.ts +19 -0
- package/dist/_internal/client/features/layout/useSidebarSearch.js +21 -0
- package/dist/_internal/server/features/auth/permissions.d.ts +2 -0
- package/dist/_internal/server/features/auth/permissions.js +4 -2
- package/dist/_internal/server/features/seo/sitemap.js +3 -2
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/features/about/components/FAQPageView.d.ts +4 -1
- package/dist/features/about/components/FAQPageView.js +17 -7
- package/dist/features/account/components/UserSidebar.js +15 -9
- package/dist/features/admin/components/AdminSidebar.js +15 -9
- package/dist/features/admin/components/AdminTesterChecklistItemEditorView.js +4 -1
- package/dist/features/admin/components/AdminUserEditorView.d.ts +3 -1
- package/dist/features/admin/components/AdminUserEditorView.js +10 -2
- package/dist/features/admin/components/AdminUsersView.js +1 -1
- package/dist/features/auth/role-predicates.d.ts +14 -0
- package/dist/features/auth/role-predicates.js +1 -0
- package/dist/features/auth/schemas/firestore.d.ts +2 -0
- package/dist/features/auth/schemas/firestore.js +1 -0
- package/dist/features/events/actions/event-actions.js +15 -8
- package/dist/features/events/repository/events.repository.d.ts +2 -0
- package/dist/features/events/repository/events.repository.js +9 -0
- package/dist/features/events/schemas/firestore.d.ts +1 -0
- package/dist/features/events/schemas/firestore.js +1 -0
- package/dist/features/faq/components/FAQSearchableList.d.ts +11 -0
- package/dist/features/faq/components/FAQSearchableList.js +21 -0
- package/dist/features/homepage/components/BeforeAfterCard.js +2 -1
- package/dist/features/homepage/components/BrandsSection.js +2 -1
- package/dist/features/homepage/components/CharacterHotspot.js +2 -1
- package/dist/features/homepage/components/CharacterHotspotForm.js +4 -3
- package/dist/features/homepage/components/HeroBanner.js +2 -1
- package/dist/features/homepage/components/PromoGrid.js +2 -1
- package/dist/features/homepage/components/ShopByCategorySection.js +2 -1
- package/dist/features/seller/components/SellerSidebar.js +15 -9
- package/dist/features/tester/actions/checklist-item-actions.d.ts +6 -0
- package/dist/features/tester/actions/checklist-item-actions.js +2 -0
- package/dist/features/tester/components/TesterHubView.js +5 -4
- package/dist/features/tester/schemas/firestore.d.ts +3 -1
- package/dist/features/tester/schemas/firestore.js +2 -0
- 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 +421 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/next/api/routeHandler.js +22 -4
- package/dist/react/contexts/SessionContext.d.ts +2 -0
- package/dist/react/contexts/SessionContext.js +2 -0
- 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/dist/styles.css +1 -1
- package/dist/tailwind-utilities.css +1 -1
- package/package.json +1 -1
- package/scripts/seed-cli.mjs +10 -4
|
@@ -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
|
+
];
|
|
@@ -21,6 +21,10 @@ import { seedExtMedia } from "../../../seed/_helpers/media";
|
|
|
21
21
|
import { testDataExpiresAt } from "./tester-ttl";
|
|
22
22
|
const TESTER_STORE_ID = "store-tester-sandbox";
|
|
23
23
|
const TESTER_STORE_NAME = "Tester Sandbox Store";
|
|
24
|
+
const GADGETS_CATEGORY_SLUGS = ["category-tester-gadgets", "category-tester-sandbox"];
|
|
25
|
+
const GADGETS_CATEGORY_NAMES = ["Test Gadgets", "Tester Sandbox"];
|
|
26
|
+
const COLLECTIBLES_CATEGORY_SLUGS = ["category-tester-collectibles", "category-tester-sandbox"];
|
|
27
|
+
const COLLECTIBLES_CATEGORY_NAMES = ["Test Collectibles", "Tester Sandbox"];
|
|
24
28
|
function withTokens(p) {
|
|
25
29
|
return {
|
|
26
30
|
tags: [],
|
|
@@ -39,8 +43,8 @@ export const productsTesterSeedData = [
|
|
|
39
43
|
slug: "product-tester-standard-1",
|
|
40
44
|
title: "Test Gadget — Standard Listing #1",
|
|
41
45
|
description: "Disposable test product for the tester QA program. Buy it, review it, wishlist it — it auto-expires in 7 days.",
|
|
42
|
-
categorySlugs:
|
|
43
|
-
categoryNames:
|
|
46
|
+
categorySlugs: GADGETS_CATEGORY_SLUGS,
|
|
47
|
+
categoryNames: GADGETS_CATEGORY_NAMES,
|
|
44
48
|
brandSlug: "brand-tester-sandbox",
|
|
45
49
|
brand: "TestBrand",
|
|
46
50
|
price: 199,
|
|
@@ -65,8 +69,8 @@ export const productsTesterSeedData = [
|
|
|
65
69
|
slug: "product-tester-standard-2",
|
|
66
70
|
title: "Test Collectible — Standard Listing #2",
|
|
67
71
|
description: "Second disposable test product, referenced by the test bundle. Auto-expires in 7 days.",
|
|
68
|
-
categorySlugs:
|
|
69
|
-
categoryNames:
|
|
72
|
+
categorySlugs: COLLECTIBLES_CATEGORY_SLUGS,
|
|
73
|
+
categoryNames: COLLECTIBLES_CATEGORY_NAMES,
|
|
70
74
|
brandSlug: "brand-tester-sandbox",
|
|
71
75
|
brand: "TestBrand",
|
|
72
76
|
price: 149,
|
|
@@ -91,8 +95,8 @@ export const productsTesterSeedData = [
|
|
|
91
95
|
slug: "auction-tester-sandbox-1",
|
|
92
96
|
title: "Test Auction — Bid Me!",
|
|
93
97
|
description: "Disposable test auction for the tester QA program. Place a bid — it auto-expires in 7 days, cascading to any bids.",
|
|
94
|
-
categorySlugs:
|
|
95
|
-
categoryNames:
|
|
98
|
+
categorySlugs: COLLECTIBLES_CATEGORY_SLUGS,
|
|
99
|
+
categoryNames: COLLECTIBLES_CATEGORY_NAMES,
|
|
96
100
|
brandSlug: "brand-tester-sandbox",
|
|
97
101
|
brand: "TestBrand",
|
|
98
102
|
startingBid: 15000,
|
|
@@ -117,13 +121,45 @@ export const productsTesterSeedData = [
|
|
|
117
121
|
createdAt: new Date(),
|
|
118
122
|
updatedAt: new Date(),
|
|
119
123
|
}),
|
|
124
|
+
withTokens({
|
|
125
|
+
id: "auction-tester-sandbox-won",
|
|
126
|
+
slug: "auction-tester-sandbox-won",
|
|
127
|
+
title: "Test Auction — Already Won",
|
|
128
|
+
description: "Disposable test auction, already ended and won, paired with a \"won auction\" test order. Auto-expires in 7 days, cascading to its bid.",
|
|
129
|
+
categorySlugs: COLLECTIBLES_CATEGORY_SLUGS,
|
|
130
|
+
categoryNames: COLLECTIBLES_CATEGORY_NAMES,
|
|
131
|
+
brandSlug: "brand-tester-sandbox",
|
|
132
|
+
brand: "TestBrand",
|
|
133
|
+
startingBid: 8000,
|
|
134
|
+
currentBid: 15000,
|
|
135
|
+
currency: "INR",
|
|
136
|
+
price: 150,
|
|
137
|
+
stockQuantity: 1,
|
|
138
|
+
availableQuantity: 0,
|
|
139
|
+
auctionEndDate: new Date(Date.now() - 1 * 24 * 60 * 60 * 1000),
|
|
140
|
+
bidCount: 1,
|
|
141
|
+
bidsHaveStarted: true,
|
|
142
|
+
leadingBidderId: "user-tester-qa",
|
|
143
|
+
isSold: true,
|
|
144
|
+
mainImage: seedExtMedia("https://picsum.photos/seed/auction-image-tester-sandbox-won-20260101/900/900"),
|
|
145
|
+
images: [seedExtMedia("https://picsum.photos/seed/auction-image-tester-sandbox-won-20260101/900/900")],
|
|
146
|
+
status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
|
|
147
|
+
condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
|
|
148
|
+
listingType: "auction",
|
|
149
|
+
customFields: [],
|
|
150
|
+
customSections: [],
|
|
151
|
+
isPromoted: false,
|
|
152
|
+
isOnSale: false,
|
|
153
|
+
createdAt: new Date(),
|
|
154
|
+
updatedAt: new Date(),
|
|
155
|
+
}),
|
|
120
156
|
withTokens({
|
|
121
157
|
id: "preorder-tester-sandbox-1",
|
|
122
158
|
slug: "preorder-tester-sandbox-1",
|
|
123
159
|
title: "Test Pre-order — Reserve Me!",
|
|
124
160
|
description: "Disposable test pre-order for the tester QA program. Auto-expires in 7 days.",
|
|
125
|
-
categorySlugs:
|
|
126
|
-
categoryNames:
|
|
161
|
+
categorySlugs: GADGETS_CATEGORY_SLUGS,
|
|
162
|
+
categoryNames: GADGETS_CATEGORY_NAMES,
|
|
127
163
|
brandSlug: "brand-tester-sandbox",
|
|
128
164
|
brand: "TestBrand",
|
|
129
165
|
price: 299,
|
|
@@ -148,4 +184,173 @@ export const productsTesterSeedData = [
|
|
|
148
184
|
createdAt: new Date(),
|
|
149
185
|
updatedAt: new Date(),
|
|
150
186
|
}),
|
|
187
|
+
withTokens({
|
|
188
|
+
id: "prizedraw-tester-sandbox-1",
|
|
189
|
+
slug: "prizedraw-tester-sandbox-1",
|
|
190
|
+
title: "Test Prize Draw — Reveal Me!",
|
|
191
|
+
description: "Disposable test prize-draw for the tester QA program. Buy an entry, then reveal — auto-expires in 7 days.",
|
|
192
|
+
categorySlugs: COLLECTIBLES_CATEGORY_SLUGS,
|
|
193
|
+
categoryNames: COLLECTIBLES_CATEGORY_NAMES,
|
|
194
|
+
brandSlug: "brand-tester-sandbox",
|
|
195
|
+
brand: "TestBrand",
|
|
196
|
+
price: 50,
|
|
197
|
+
currency: "INR",
|
|
198
|
+
condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
|
|
199
|
+
status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
|
|
200
|
+
listingType: "prize-draw",
|
|
201
|
+
images: [seedExtMedia("https://picsum.photos/seed/prizedraw-image-tester-sandbox-1-20260101/900/900")],
|
|
202
|
+
mainImage: seedExtMedia("https://picsum.photos/seed/prizedraw-image-tester-sandbox-1-20260101/900/900"),
|
|
203
|
+
isSold: false,
|
|
204
|
+
stockQuantity: 3,
|
|
205
|
+
availableQuantity: 3,
|
|
206
|
+
customFields: [],
|
|
207
|
+
customSections: [],
|
|
208
|
+
isPromoted: false,
|
|
209
|
+
isOnSale: false,
|
|
210
|
+
prizeDrawMode: "reveal",
|
|
211
|
+
pricePerEntry: 50,
|
|
212
|
+
prizeMaxEntries: 3,
|
|
213
|
+
prizeCurrentEntries: 0,
|
|
214
|
+
prizeRevealWindowStart: new Date(),
|
|
215
|
+
prizeRevealWindowEnd: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000),
|
|
216
|
+
prizeRevealStatus: "open",
|
|
217
|
+
prizeRevealDeadlineDays: 7,
|
|
218
|
+
prizeDrawItems: [
|
|
219
|
+
{ itemNumber: 1, title: "Test Prize — Grand", description: "Disposable test grand prize.", images: [seedExtMedia("https://picsum.photos/seed/prizedraw-item-1-20260101/600/600")], condition: "new", estimatedValue: 500, isWon: false },
|
|
220
|
+
{ itemNumber: 2, title: "Test Prize — Runner-up", description: "Disposable test runner-up prize.", images: [seedExtMedia("https://picsum.photos/seed/prizedraw-item-2-20260101/600/600")], condition: "new", estimatedValue: 150, isWon: false },
|
|
221
|
+
{ itemNumber: 3, title: "Test Prize — Consolation", description: "Disposable test consolation prize.", images: [seedExtMedia("https://picsum.photos/seed/prizedraw-item-3-20260101/600/600")], condition: "new", estimatedValue: 20, isWon: false },
|
|
222
|
+
],
|
|
223
|
+
createdAt: new Date(),
|
|
224
|
+
updatedAt: new Date(),
|
|
225
|
+
}),
|
|
226
|
+
withTokens({
|
|
227
|
+
id: "classified-tester-sandbox-1",
|
|
228
|
+
slug: "classified-tester-sandbox-1",
|
|
229
|
+
title: "Test Classified — Contact Me!",
|
|
230
|
+
description: "Disposable test classified listing for the tester QA program. No checkout — contact the seller. Auto-expires in 7 days.",
|
|
231
|
+
categorySlugs: COLLECTIBLES_CATEGORY_SLUGS,
|
|
232
|
+
categoryNames: COLLECTIBLES_CATEGORY_NAMES,
|
|
233
|
+
brandSlug: "brand-tester-sandbox",
|
|
234
|
+
brand: "TestBrand",
|
|
235
|
+
price: 250,
|
|
236
|
+
currency: "INR",
|
|
237
|
+
condition: PRODUCT_FIELDS.CONDITION_VALUES.GOOD,
|
|
238
|
+
status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
|
|
239
|
+
listingType: "classified",
|
|
240
|
+
images: [seedExtMedia("https://picsum.photos/seed/classified-image-tester-sandbox-1-20260101/900/900")],
|
|
241
|
+
mainImage: seedExtMedia("https://picsum.photos/seed/classified-image-tester-sandbox-1-20260101/900/900"),
|
|
242
|
+
isSold: false,
|
|
243
|
+
stockQuantity: 1,
|
|
244
|
+
availableQuantity: 1,
|
|
245
|
+
customFields: [],
|
|
246
|
+
customSections: [],
|
|
247
|
+
isPromoted: false,
|
|
248
|
+
isOnSale: false,
|
|
249
|
+
classified: {
|
|
250
|
+
meetupArea: { city: "Bengaluru", locality: "Test Locality", pincode: "560001" },
|
|
251
|
+
contactMethod: "both",
|
|
252
|
+
acceptsShipping: false,
|
|
253
|
+
negotiable: true,
|
|
254
|
+
},
|
|
255
|
+
createdAt: new Date(),
|
|
256
|
+
updatedAt: new Date(),
|
|
257
|
+
}),
|
|
258
|
+
withTokens({
|
|
259
|
+
id: "digitalcode-tester-sandbox-1",
|
|
260
|
+
slug: "digitalcode-tester-sandbox-1",
|
|
261
|
+
title: "Test Digital Code — Auto-Claim!",
|
|
262
|
+
description: "Disposable test digital-code listing for the tester QA program. Auto-expires in 7 days.",
|
|
263
|
+
categorySlugs: GADGETS_CATEGORY_SLUGS,
|
|
264
|
+
categoryNames: GADGETS_CATEGORY_NAMES,
|
|
265
|
+
brandSlug: "brand-tester-sandbox",
|
|
266
|
+
brand: "TestBrand",
|
|
267
|
+
price: 99,
|
|
268
|
+
currency: "INR",
|
|
269
|
+
condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
|
|
270
|
+
status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
|
|
271
|
+
listingType: "digital-code",
|
|
272
|
+
images: [seedExtMedia("https://picsum.photos/seed/digitalcode-image-tester-sandbox-1-20260101/900/900")],
|
|
273
|
+
mainImage: seedExtMedia("https://picsum.photos/seed/digitalcode-image-tester-sandbox-1-20260101/900/900"),
|
|
274
|
+
isSold: false,
|
|
275
|
+
stockQuantity: 10,
|
|
276
|
+
availableQuantity: 10,
|
|
277
|
+
customFields: [],
|
|
278
|
+
customSections: [],
|
|
279
|
+
isPromoted: false,
|
|
280
|
+
isOnSale: false,
|
|
281
|
+
digitalCode: {
|
|
282
|
+
codeDeliveryMethod: "auto-claim",
|
|
283
|
+
codePoolSize: 10,
|
|
284
|
+
codesAvailable: 10,
|
|
285
|
+
redemptionInstructions: "Disposable test code — redeem at test-redeem.example for tester QA purposes only.",
|
|
286
|
+
},
|
|
287
|
+
createdAt: new Date(),
|
|
288
|
+
updatedAt: new Date(),
|
|
289
|
+
}),
|
|
290
|
+
withTokens({
|
|
291
|
+
id: "live-tester-sandbox-1",
|
|
292
|
+
slug: "live-tester-sandbox-1",
|
|
293
|
+
title: "Test Live Item — Watch Me!",
|
|
294
|
+
description: "Disposable test live-item listing for the tester QA program. Auto-expires in 7 days.",
|
|
295
|
+
categorySlugs: COLLECTIBLES_CATEGORY_SLUGS,
|
|
296
|
+
categoryNames: COLLECTIBLES_CATEGORY_NAMES,
|
|
297
|
+
brandSlug: "brand-tester-sandbox",
|
|
298
|
+
brand: "TestBrand",
|
|
299
|
+
price: 1500,
|
|
300
|
+
currency: "INR",
|
|
301
|
+
condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
|
|
302
|
+
status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
|
|
303
|
+
listingType: "live",
|
|
304
|
+
images: [seedExtMedia("https://picsum.photos/seed/live-image-tester-sandbox-1-20260101/900/900")],
|
|
305
|
+
mainImage: seedExtMedia("https://picsum.photos/seed/live-image-tester-sandbox-1-20260101/900/900"),
|
|
306
|
+
video: { url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" },
|
|
307
|
+
isSold: false,
|
|
308
|
+
stockQuantity: 1,
|
|
309
|
+
availableQuantity: 1,
|
|
310
|
+
customFields: [],
|
|
311
|
+
customSections: [],
|
|
312
|
+
isPromoted: false,
|
|
313
|
+
isOnSale: false,
|
|
314
|
+
liveItem: {
|
|
315
|
+
species: "Test Species",
|
|
316
|
+
ageMonths: 6,
|
|
317
|
+
sex: "n/a",
|
|
318
|
+
careInfo: "Disposable test care info for the tester QA program.",
|
|
319
|
+
transport: { method: "courier", handlingFee: 100, insuranceIncluded: true },
|
|
320
|
+
jurisdictionAllowed: ["IN-KA", "IN-MH"],
|
|
321
|
+
vendorVerified: true,
|
|
322
|
+
},
|
|
323
|
+
createdAt: new Date(),
|
|
324
|
+
updatedAt: new Date(),
|
|
325
|
+
}),
|
|
326
|
+
withTokens({
|
|
327
|
+
id: "group-tester-sandbox-bundle",
|
|
328
|
+
slug: "group-tester-sandbox-bundle",
|
|
329
|
+
title: "Test Bundle — Standard #1 + Standard #2",
|
|
330
|
+
description: "Disposable test bundle bundling the two tester-sandbox standard products. Auto-expires in 7 days.",
|
|
331
|
+
categorySlugs: GADGETS_CATEGORY_SLUGS,
|
|
332
|
+
categoryNames: GADGETS_CATEGORY_NAMES,
|
|
333
|
+
brandSlug: "brand-tester-sandbox",
|
|
334
|
+
brand: "TestBrand",
|
|
335
|
+
price: 329,
|
|
336
|
+
currency: "INR",
|
|
337
|
+
condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
|
|
338
|
+
status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
|
|
339
|
+
listingType: "standard",
|
|
340
|
+
images: [seedExtMedia("https://picsum.photos/seed/product-image-tester-standard-1-20260101/900/900")],
|
|
341
|
+
mainImage: seedExtMedia("https://picsum.photos/seed/product-image-tester-standard-1-20260101/900/900"),
|
|
342
|
+
isSold: false,
|
|
343
|
+
stockQuantity: 5,
|
|
344
|
+
availableQuantity: 5,
|
|
345
|
+
customFields: [],
|
|
346
|
+
customSections: [],
|
|
347
|
+
isPromoted: false,
|
|
348
|
+
isOnSale: false,
|
|
349
|
+
isGroupParent: true,
|
|
350
|
+
groupId: "group-tester-sandbox-bundle",
|
|
351
|
+
groupTitle: "Tester Sandbox Bundle",
|
|
352
|
+
groupChildSlugs: ["product-tester-standard-1", "product-tester-standard-2"],
|
|
353
|
+
createdAt: new Date(),
|
|
354
|
+
updatedAt: new Date(),
|
|
355
|
+
}),
|
|
151
356
|
];
|