@mohasinac/appkit 3.6.5 → 3.8.0
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/DashboardLayoutClient.d.ts +17 -3
- package/dist/_internal/client/features/layout/DashboardLayoutClient.js +7 -2
- package/dist/_internal/client/features/tour/TourProvider.d.ts +5 -2
- package/dist/_internal/client/features/tour/TourProvider.js +125 -12
- package/dist/_internal/client/theme/ThemeProvider.js +1 -1
- package/dist/_internal/server/features/categories/data.js +2 -2
- package/dist/_internal/server/features/faqs/og.js +5 -1
- package/dist/_internal/server/features/reviews/og.js +5 -1
- package/dist/_internal/server/features/seo/manifest.js +2 -1
- package/dist/_internal/server/features/seo/og.js +7 -1
- package/dist/_internal/server/features/tester/visibility.d.ts +13 -0
- package/dist/_internal/server/features/tester/visibility.js +28 -0
- package/dist/_internal/server/functions/scheduled.d.ts +2 -1
- package/dist/_internal/server/functions/scheduled.js +9 -1
- package/dist/_internal/server/jobs/core/jobRunners.js +5 -0
- package/dist/_internal/server/jobs/core/resetOtpVerification.d.ts +17 -0
- package/dist/_internal/server/jobs/core/resetOtpVerification.js +88 -0
- package/dist/_internal/server/jobs/core/testerSandboxCleanup.d.ts +6 -0
- package/dist/_internal/server/jobs/core/testerSandboxCleanup.js +35 -0
- package/dist/_internal/server/jobs/handlers/_helpers.d.ts +6 -0
- package/dist/_internal/server/jobs/handlers/_helpers.js +12 -0
- package/dist/_internal/server/jobs/handlers/index.d.ts +1 -0
- package/dist/_internal/server/jobs/handlers/index.js +2 -0
- package/dist/_internal/server/jobs/handlers/messages.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/messages.js +2 -0
- package/dist/_internal/server/jobs/handlers/testerSandboxCleanup.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/testerSandboxCleanup.js +2 -0
- package/dist/_internal/shared/actions/action-registry.d.ts +1 -1
- package/dist/_internal/shared/actions/action-registry.js +56 -0
- package/dist/_internal/shared/tokens/index.d.ts +12 -12
- package/dist/client.d.ts +15 -3
- package/dist/client.js +10 -2
- package/dist/constants/api-endpoints.d.ts +39 -12
- package/dist/constants/api-endpoints.js +17 -8
- package/dist/constants/field-names.d.ts +9 -0
- package/dist/constants/field-names.js +12 -0
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/features/account/components/LinkedAccountsSection.d.ts +11 -0
- package/dist/features/account/components/LinkedAccountsSection.js +11 -0
- package/dist/features/account/components/UserSidebar.d.ts +3 -1
- package/dist/features/account/components/UserSidebar.js +9 -13
- package/dist/features/account/hooks/useCollapsedSections.d.ts +20 -0
- package/dist/features/account/hooks/useCollapsedSections.js +63 -0
- package/dist/features/account/hooks/useProfile.d.ts +8 -0
- package/dist/features/account/index.d.ts +1 -0
- package/dist/features/account/index.js +1 -0
- package/dist/features/admin/components/AdminAddressEditorView.js +2 -2
- package/dist/features/admin/components/AdminBidsView.js +6 -6
- package/dist/features/admin/components/AdminBrandsView.js +2 -2
- package/dist/features/admin/components/AdminCarouselView.js +2 -2
- package/dist/features/admin/components/AdminCategoryEditorView.js +2 -2
- package/dist/features/admin/components/AdminPrizeDrawsView.js +3 -3
- package/dist/features/admin/components/AdminProductEditorView.js +5 -2
- package/dist/features/admin/components/AdminReviewsView.js +5 -5
- package/dist/features/admin/components/AdminSectionsView.js +3 -18
- package/dist/features/admin/components/AdminSidebar.js +8 -6
- package/dist/features/admin/components/AdminSiteSettingsView.js +133 -127
- package/dist/features/admin/components/AdminSublistingCategoriesView.js +1 -1
- package/dist/features/admin/components/AdminTesterChecklistItemEditorView.d.ts +9 -0
- package/dist/features/admin/components/AdminTesterChecklistItemEditorView.js +129 -0
- package/dist/features/admin/components/AdminTesterChecklistView.d.ts +6 -0
- package/dist/features/admin/components/AdminTesterChecklistView.js +93 -0
- package/dist/features/admin/components/AdminUserEditorView.d.ts +3 -1
- package/dist/features/admin/components/AdminUserEditorView.js +7 -1
- package/dist/features/admin/components/AdminUsersView.js +1 -1
- package/dist/features/admin/components/DataListingView.js +2 -2
- package/dist/features/admin/components/analytics/AdminPageViewsReportView.d.ts +8 -0
- package/dist/features/admin/components/analytics/AdminPageViewsReportView.js +41 -0
- package/dist/features/admin/components/index.d.ts +6 -0
- package/dist/features/admin/components/index.js +3 -0
- package/dist/features/admin/schemas/firestore.d.ts +0 -7
- package/dist/features/admin/schemas/firestore.js +6 -6
- package/dist/features/analytics/components/PageViewTracker.d.ts +12 -0
- package/dist/features/analytics/components/PageViewTracker.js +22 -0
- package/dist/features/analytics/repository/page-views.repository.d.ts +32 -0
- package/dist/features/analytics/repository/page-views.repository.js +43 -0
- package/dist/features/analytics/types.d.ts +6 -0
- package/dist/features/analytics/types.js +13 -0
- package/dist/features/auth/components/SocialAuthButtons.js +1 -1
- package/dist/features/auth/hooks/useAuth.d.ts +12 -0
- package/dist/features/auth/hooks/useAuth.js +109 -0
- package/dist/features/auth/permissions/constants.d.ts +1 -1
- package/dist/features/auth/repository/session.repository.d.ts +2 -0
- package/dist/features/auth/repository/session.repository.js +4 -1
- package/dist/features/auth/schemas/firestore.d.ts +17 -1
- package/dist/features/auth/schemas/firestore.js +2 -0
- package/dist/features/blog/components/BlogIndexListing.js +2 -2
- package/dist/features/blog/schemas/firestore.d.ts +4 -0
- package/dist/features/cart/actions/cart-actions.js +20 -2
- package/dist/features/categories/api/route.js +2 -2
- package/dist/features/categories/components/CategoriesIndexListing.js +3 -3
- package/dist/features/categories/components/CategoryBundlesListing.js +2 -2
- package/dist/features/categories/components/CategoryDetailPageView.js +3 -1
- package/dist/features/categories/components/CategoryProductsListing.js +2 -2
- package/dist/features/categories/schemas/firestore.d.ts +4 -0
- package/dist/features/classified/components/ClassifiedIndexListing.js +2 -2
- package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +2 -2
- package/dist/features/email/primitives.d.ts +2 -2
- package/dist/features/email/primitives.js +2 -2
- package/dist/features/events/components/EventsIndexListing.js +2 -2
- package/dist/features/events/repository/event-entry.repository.js +1 -0
- package/dist/features/events/schemas/firestore.d.ts +7 -1
- package/dist/features/events/schemas/firestore.js +1 -0
- package/dist/features/layout/BackToTop.d.ts +6 -1
- package/dist/features/layout/BackToTop.js +31 -6
- package/dist/features/layout/BottomNavbar.js +1 -1
- package/dist/features/layout/NavItem.js +1 -1
- package/dist/features/layout/NavbarLayout.js +2 -2
- package/dist/features/live/components/LiveItemsIndexListing.js +2 -2
- package/dist/features/media/MediaVideo.js +5 -1
- package/dist/features/pre-orders/components/PreOrdersIndexListing.js +2 -2
- package/dist/features/products/components/AuctionsIndexListing.js +2 -2
- package/dist/features/products/components/PrizeDrawsIndexListing.js +2 -2
- package/dist/features/products/components/ProductsIndexListing.js +2 -2
- package/dist/features/products/constants/action-defs.d.ts +2 -0
- package/dist/features/products/constants/action-defs.js +2 -0
- package/dist/features/products/constants/sieve.d.ts +0 -6
- package/dist/features/products/constants/sieve.js +4 -2
- package/dist/features/products/repository/products.repository.d.ts +20 -0
- package/dist/features/products/repository/products.repository.js +5 -0
- package/dist/features/products/schemas/firestore.d.ts +4 -0
- package/dist/features/promotions/components/CouponsIndexListing.js +18 -5
- package/dist/features/reviews/components/ReviewsIndexListing.js +2 -2
- package/dist/features/search/hooks/useNavSuggestions.js +20 -1
- package/dist/features/seller/actions/seller-actions.js +11 -6
- package/dist/features/seller/components/SellerAddressesView.js +2 -2
- package/dist/features/seller/components/SellerBidsView.js +2 -2
- package/dist/features/seller/components/SellerCouponsView.js +1 -1
- package/dist/features/seller/components/SellerOrdersView.js +2 -2
- package/dist/features/seller/components/SellerProductsView.js +2 -2
- package/dist/features/seller/components/SellerSidebar.d.ts +3 -1
- package/dist/features/seller/components/SellerSidebar.js +9 -8
- package/dist/features/seller/components/SellerStoreCategoriesView.js +2 -2
- package/dist/features/seller/components/SellerTemplatesView.js +2 -2
- package/dist/features/shell/StepForm.js +4 -4
- package/dist/features/stores/actions/store-query-actions.d.ts +5 -4
- package/dist/features/stores/actions/store-query-actions.js +11 -8
- package/dist/features/stores/components/StoreAuctionsListing.js +2 -2
- package/dist/features/stores/components/StoreClassifiedsListing.js +2 -2
- package/dist/features/stores/components/StoreDetailLayoutView.js +1 -1
- package/dist/features/stores/components/StoreDigitalCodesListing.js +2 -2
- package/dist/features/stores/components/StoreLiveItemsListing.js +2 -2
- package/dist/features/stores/components/StorePreOrdersListing.js +2 -2
- package/dist/features/stores/components/StoreProductsListing.js +2 -2
- package/dist/features/stores/components/StoreReviewsListing.js +2 -2
- package/dist/features/stores/components/StoresIndexListing.js +2 -2
- package/dist/features/stores/repository/store.repository.js +3 -0
- package/dist/features/stores/schemas/firestore.d.ts +4 -0
- package/dist/features/tester/actions/checklist-item-actions.d.ts +69 -0
- package/dist/features/tester/actions/checklist-item-actions.js +42 -0
- package/dist/features/tester/actions/index.d.ts +1 -0
- package/dist/features/tester/actions/index.js +1 -0
- package/dist/features/tester/components/AdminTesterFeedbackIssuesView.d.ts +2 -0
- package/dist/features/tester/components/AdminTesterFeedbackIssuesView.js +22 -0
- package/dist/features/tester/components/AdminTesterFeedbackListView.d.ts +3 -0
- package/dist/features/tester/components/AdminTesterFeedbackListView.js +100 -0
- package/dist/features/tester/components/AdminTesterFeedbackReportView.d.ts +2 -0
- package/dist/features/tester/components/AdminTesterFeedbackReportView.js +30 -0
- package/dist/features/tester/components/AdminTesterFeedbackView.d.ts +2 -0
- package/dist/features/tester/components/AdminTesterFeedbackView.js +29 -0
- package/dist/features/tester/components/TesterChecklistStepRow.d.ts +18 -0
- package/dist/features/tester/components/TesterChecklistStepRow.js +29 -0
- package/dist/features/tester/components/TesterFeedbackChart.d.ts +14 -0
- package/dist/features/tester/components/TesterFeedbackChart.js +18 -0
- package/dist/features/tester/components/TesterHubView.d.ts +5 -0
- package/dist/features/tester/components/TesterHubView.js +71 -0
- package/dist/features/tester/components/index.d.ts +11 -0
- package/dist/features/tester/components/index.js +7 -0
- package/dist/features/tester/index.d.ts +2 -0
- package/dist/features/tester/index.js +2 -0
- package/dist/features/tester/repository/index.d.ts +2 -0
- package/dist/features/tester/repository/index.js +2 -0
- package/dist/features/tester/repository/tester-checklist-item.repository.d.ts +13 -0
- package/dist/features/tester/repository/tester-checklist-item.repository.js +55 -0
- package/dist/features/tester/repository/tester-checklist-response.repository.d.ts +50 -0
- package/dist/features/tester/repository/tester-checklist-response.repository.js +196 -0
- package/dist/features/tester/schemas/firestore.d.ts +85 -0
- package/dist/features/tester/schemas/firestore.js +93 -0
- package/dist/features/tester/schemas/index.d.ts +1 -0
- package/dist/features/tester/schemas/index.js +1 -0
- package/dist/features/tester/seed-data/blog-tester-seed-data.d.ts +2 -0
- package/dist/features/tester/seed-data/blog-tester-seed-data.js +40 -0
- package/dist/features/tester/seed-data/categories-tester-seed-data.d.ts +2 -0
- package/dist/features/tester/seed-data/categories-tester-seed-data.js +177 -0
- package/dist/features/tester/seed-data/events-tester-seed-data.d.ts +2 -0
- package/dist/features/tester/seed-data/events-tester-seed-data.js +50 -0
- package/dist/features/tester/seed-data/index.d.ts +6 -0
- package/dist/features/tester/seed-data/index.js +6 -0
- package/dist/features/tester/seed-data/products-tester-seed-data.d.ts +2 -0
- package/dist/features/tester/seed-data/products-tester-seed-data.js +151 -0
- package/dist/features/tester/seed-data/stores-tester-seed-data.d.ts +2 -0
- package/dist/features/tester/seed-data/stores-tester-seed-data.js +40 -0
- package/dist/features/tester/seed-data/tester-checklist-seed-data.d.ts +2 -0
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +248 -0
- package/dist/features/tester/seed-data/tester-ttl.d.ts +4 -0
- package/dist/features/tester/seed-data/tester-ttl.js +6 -0
- package/dist/features/tester/server.d.ts +9 -0
- package/dist/features/tester/server.js +8 -0
- package/dist/index.d.ts +28 -2
- package/dist/index.js +51 -1
- package/dist/next/api/api-response.js +5 -1
- package/dist/next/api/routeHandler.js +10 -1
- package/dist/next/middleware/chain.js +1 -1
- package/dist/next/routing/route-map.d.ts +6 -7
- package/dist/next/routing/route-map.js +3 -7
- package/dist/providers/payment-manual/index.d.ts +2 -2
- package/dist/providers/payment-manual/index.js +2 -2
- package/dist/react/contexts/SessionContext.d.ts +4 -0
- package/dist/react/contexts/SessionContext.js +4 -0
- package/dist/repositories/index.d.ts +4 -0
- package/dist/repositories/index.js +3 -0
- package/dist/security/pii-encrypt.js +12 -2
- package/dist/seed/addresses-seed-data.js +1 -1
- package/dist/seed/bids-seed-data.js +64 -185
- package/dist/seed/blog-posts-seed-data.js +1 -1
- package/dist/seed/carousel-slides-seed-data.js +22 -16
- package/dist/seed/carousels-seed-data.js +1 -1
- package/dist/seed/cart-seed-data.js +1 -1
- package/dist/seed/categories-seed-data.js +1 -1
- package/dist/seed/claimed-coupons-seed-data.js +1 -1
- package/dist/seed/conversations-seed-data.js +1 -1
- package/dist/seed/coupon-usage-seed-data.js +1 -1
- package/dist/seed/coupons-seed-data.js +1 -1
- package/dist/seed/events-seed-data.js +1 -1
- package/dist/seed/faq-seed-data.js +119 -3
- package/dist/seed/grouped-listings-seed-data.d.ts +2 -0
- package/dist/seed/grouped-listings-seed-data.js +1 -1
- package/dist/seed/history-seed-data.js +1 -1
- package/dist/seed/homepage-sections-seed-data.js +1 -1
- package/dist/seed/index.d.ts +2 -2
- package/dist/seed/index.js +7 -3
- package/dist/seed/lottery-entries-seed-data.js +1 -1
- package/dist/seed/manifest.d.ts +4 -3
- package/dist/seed/manifest.js +13 -6
- package/dist/seed/notifications-seed-data.js +1 -1
- package/dist/seed/offers-seed-data.js +1 -1
- package/dist/seed/orders-seed-data.js +1 -1
- package/dist/seed/payouts-seed-data.js +1 -1
- package/dist/seed/products-art-seed-data.js +1 -1
- package/dist/seed/products-auctions-seed-data.js +1 -1
- package/dist/seed/products-classifieds-seed-data.js +1 -1
- package/dist/seed/products-digital-codes-seed-data.js +1 -1
- package/dist/seed/products-live-items-seed-data.js +1 -1
- package/dist/seed/products-preorders-seed-data.d.ts +2 -0
- package/dist/seed/products-preorders-seed-data.js +1 -1
- package/dist/seed/products-prize-draws-seed-data.js +1 -1
- package/dist/seed/products-standard-seed-data.js +1 -1
- package/dist/seed/products-stickers-seed-data.js +1 -1
- package/dist/seed/reviews-seed-data.js +1 -1
- package/dist/seed/scammers-seed-data.js +1 -1
- package/dist/seed/sessions-seed-data.js +1 -1
- package/dist/seed/site-settings-seed-data.js +22 -16
- package/dist/seed/store-addresses-seed-data.js +1 -1
- package/dist/seed/store-extensions-seed-data.js +1 -1
- package/dist/seed/stores-seed-data.js +1 -1
- package/dist/seed/support-tickets-seed-data.js +1 -1
- package/dist/seed/tester-checklist-seed-data.d.ts +2 -0
- package/dist/seed/tester-checklist-seed-data.js +248 -0
- package/dist/seed/users-seed-data.js +1 -1
- package/dist/seed/wishlists-seed-data.js +1 -1
- package/dist/server.d.ts +7 -2
- package/dist/server.js +19 -12
- package/dist/styles.css +181 -165
- package/dist/tailwind-utilities.css +1 -1
- package/dist/tokens/color-pairs.d.ts +46 -0
- package/dist/tokens/color-pairs.js +93 -0
- package/dist/tokens/index.d.ts +60 -60
- package/dist/tokens/index.js +30 -30
- package/dist/tokens/themes/cobalt-night.d.ts +3 -2
- package/dist/tokens/themes/cobalt-night.js +3 -2
- package/dist/tokens/themes/default-dark.d.ts +4 -1
- package/dist/tokens/themes/default-dark.js +53 -50
- package/dist/tokens/themes/default-light.d.ts +5 -1
- package/dist/tokens/themes/default-light.js +48 -44
- package/dist/tokens/themes/sunset.js +4 -4
- package/dist/tokens/tokens.css +128 -122
- package/dist/ui/components/CollapsibleSection.d.ts +15 -0
- package/dist/ui/components/CollapsibleSection.js +13 -0
- package/dist/ui/components/ListingToolbar.js +3 -2
- package/dist/ui/components/Semantic.style.css +3 -3
- package/dist/ui/components/SideDrawer.style.css +19 -19
- package/dist/ui/components/Slider.js +1 -1
- package/dist/ui/components/StickyToolbar.d.ts +36 -7
- package/dist/ui/components/StickyToolbar.js +63 -5
- package/dist/ui/components/Tabs.js +17 -1
- package/dist/ui/components/Tabs.style.css +10 -0
- package/dist/ui/components/Typography.js +7 -0
- package/dist/ui/components/surface-tokens.d.ts +0 -7
- package/dist/ui/components/surface-tokens.js +7 -0
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.js +3 -0
- package/dist/ui/rich-text/RichText.style.css +20 -20
- package/dist/utils/id-generators.d.ts +13 -0
- package/dist/utils/id-generators.js +17 -0
- package/package.json +1 -1
- package/scripts/seed-cli-loader.mjs +15 -0
- package/scripts/seed-cli.mjs +71 -17
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* WHY: Shared tester sandbox — a small self-contained category tree (root + 2 leaves),
|
|
3
|
+
* 1 brand row, and 1 bundle row so testers can exercise browsing/filtering/bundle
|
|
4
|
+
* flows without touching real catalog data. Auto-expires after 7 days.
|
|
5
|
+
* WHAT: Exports categoriesTesterSeedData — 3 plain categories + 1 categoryType:"brand" +
|
|
6
|
+
* 1 categoryType:"bundle" (bundleProductIds references products-tester-seed-data.ts).
|
|
7
|
+
*
|
|
8
|
+
* EXPORTS:
|
|
9
|
+
* categoriesTesterSeedData — Array of Partial<CategoryDocument> for the seed runner
|
|
10
|
+
*
|
|
11
|
+
* @tag domain:categories,tester
|
|
12
|
+
* @tag layer:seed
|
|
13
|
+
* @tag pattern:none
|
|
14
|
+
* @tag access:server-only
|
|
15
|
+
* @tag consumers:seed/index.ts,seed-cli.mjs
|
|
16
|
+
* @tag sideEffects:none
|
|
17
|
+
*/
|
|
18
|
+
import { CATEGORY_FIELDS } from "../../../constants/field-names";
|
|
19
|
+
import { seedExtMedia } from "../../../seed/_helpers/media";
|
|
20
|
+
import { testDataExpiresAt } from "./tester-ttl";
|
|
21
|
+
const emptyMetrics = {
|
|
22
|
+
productCount: 0,
|
|
23
|
+
productIds: [],
|
|
24
|
+
auctionCount: 0,
|
|
25
|
+
auctionIds: [],
|
|
26
|
+
totalProductCount: 0,
|
|
27
|
+
totalAuctionCount: 0,
|
|
28
|
+
totalItemCount: 0,
|
|
29
|
+
lastUpdated: new Date(),
|
|
30
|
+
};
|
|
31
|
+
export const categoriesTesterSeedData = [
|
|
32
|
+
// ── ROOT: Tester Sandbox ─────────────────────────────────────────────────
|
|
33
|
+
{
|
|
34
|
+
id: "category-tester-sandbox",
|
|
35
|
+
slug: "category-tester-sandbox",
|
|
36
|
+
name: "Tester Sandbox",
|
|
37
|
+
description: "Disposable test category tree for the tester QA program.",
|
|
38
|
+
rootId: "category-tester-sandbox",
|
|
39
|
+
parentIds: [],
|
|
40
|
+
childrenIds: ["category-tester-gadgets", "category-tester-collectibles"],
|
|
41
|
+
tier: 0,
|
|
42
|
+
path: "tester-sandbox",
|
|
43
|
+
order: 999,
|
|
44
|
+
isLeaf: false,
|
|
45
|
+
position: 0,
|
|
46
|
+
subtreeSize: 2,
|
|
47
|
+
metrics: emptyMetrics,
|
|
48
|
+
isFeatured: false,
|
|
49
|
+
isBrand: false,
|
|
50
|
+
seo: { title: "Tester Sandbox", description: "Disposable test category.", keywords: ["test"] },
|
|
51
|
+
display: { icon: "🧪", coverImage: seedExtMedia("https://picsum.photos/seed/category-image-tester-sandbox-20260101/1200/600"), color: "#64748b", showInMenu: false, showInFooter: false },
|
|
52
|
+
isActive: true,
|
|
53
|
+
isSearchable: true,
|
|
54
|
+
showOnHomepage: false,
|
|
55
|
+
createdBy: "user-admin-letitrip",
|
|
56
|
+
isTestData: true,
|
|
57
|
+
testDataExpiresAt: testDataExpiresAt(),
|
|
58
|
+
createdAt: new Date(),
|
|
59
|
+
updatedAt: new Date(),
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: "category-tester-gadgets",
|
|
63
|
+
slug: "category-tester-gadgets",
|
|
64
|
+
name: "Test Gadgets",
|
|
65
|
+
description: "Disposable test gadgets category.",
|
|
66
|
+
rootId: "category-tester-sandbox",
|
|
67
|
+
parentIds: ["category-tester-sandbox"],
|
|
68
|
+
childrenIds: [],
|
|
69
|
+
tier: 1,
|
|
70
|
+
path: "tester-sandbox/gadgets",
|
|
71
|
+
order: 1,
|
|
72
|
+
isLeaf: true,
|
|
73
|
+
position: 0,
|
|
74
|
+
subtreeSize: 0,
|
|
75
|
+
metrics: emptyMetrics,
|
|
76
|
+
isFeatured: false,
|
|
77
|
+
isBrand: false,
|
|
78
|
+
isActive: true,
|
|
79
|
+
isSearchable: true,
|
|
80
|
+
showOnHomepage: false,
|
|
81
|
+
createdBy: "user-admin-letitrip",
|
|
82
|
+
isTestData: true,
|
|
83
|
+
testDataExpiresAt: testDataExpiresAt(),
|
|
84
|
+
createdAt: new Date(),
|
|
85
|
+
updatedAt: new Date(),
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "category-tester-collectibles",
|
|
89
|
+
slug: "category-tester-collectibles",
|
|
90
|
+
name: "Test Collectibles",
|
|
91
|
+
description: "Disposable test collectibles category.",
|
|
92
|
+
rootId: "category-tester-sandbox",
|
|
93
|
+
parentIds: ["category-tester-sandbox"],
|
|
94
|
+
childrenIds: [],
|
|
95
|
+
tier: 1,
|
|
96
|
+
path: "tester-sandbox/collectibles",
|
|
97
|
+
order: 2,
|
|
98
|
+
isLeaf: true,
|
|
99
|
+
position: 1,
|
|
100
|
+
subtreeSize: 0,
|
|
101
|
+
metrics: emptyMetrics,
|
|
102
|
+
isFeatured: false,
|
|
103
|
+
isBrand: false,
|
|
104
|
+
isActive: true,
|
|
105
|
+
isSearchable: true,
|
|
106
|
+
showOnHomepage: false,
|
|
107
|
+
createdBy: "user-admin-letitrip",
|
|
108
|
+
isTestData: true,
|
|
109
|
+
testDataExpiresAt: testDataExpiresAt(),
|
|
110
|
+
createdAt: new Date(),
|
|
111
|
+
updatedAt: new Date(),
|
|
112
|
+
},
|
|
113
|
+
// ── BRAND ────────────────────────────────────────────────────────────────
|
|
114
|
+
{
|
|
115
|
+
id: "brand-tester-sandbox",
|
|
116
|
+
slug: "brand-tester-sandbox",
|
|
117
|
+
name: "TestBrand",
|
|
118
|
+
categoryType: CATEGORY_FIELDS.CATEGORY_TYPE_VALUES.BRAND,
|
|
119
|
+
description: "Disposable test brand for the tester QA program.",
|
|
120
|
+
brandWebsite: "https://example.com",
|
|
121
|
+
brandCountry: "India",
|
|
122
|
+
rootId: "brand-tester-sandbox",
|
|
123
|
+
parentIds: [],
|
|
124
|
+
childrenIds: [],
|
|
125
|
+
tier: 0,
|
|
126
|
+
path: "brand-tester-sandbox",
|
|
127
|
+
order: 999,
|
|
128
|
+
isLeaf: true,
|
|
129
|
+
position: 0,
|
|
130
|
+
subtreeSize: 0,
|
|
131
|
+
metrics: emptyMetrics,
|
|
132
|
+
isFeatured: false,
|
|
133
|
+
isBrand: true,
|
|
134
|
+
isActive: true,
|
|
135
|
+
isSearchable: true,
|
|
136
|
+
showOnHomepage: false,
|
|
137
|
+
createdBy: "user-admin-letitrip",
|
|
138
|
+
isTestData: true,
|
|
139
|
+
testDataExpiresAt: testDataExpiresAt(),
|
|
140
|
+
createdAt: new Date(),
|
|
141
|
+
updatedAt: new Date(),
|
|
142
|
+
},
|
|
143
|
+
// ── BUNDLE ───────────────────────────────────────────────────────────────
|
|
144
|
+
{
|
|
145
|
+
id: "bundle-tester-sandbox",
|
|
146
|
+
slug: "bundle-tester-sandbox",
|
|
147
|
+
name: "Test Bundle",
|
|
148
|
+
description: "Two disposable test products bundled at a discount — for testing the bundle flow.",
|
|
149
|
+
categoryType: "bundle",
|
|
150
|
+
bundleKind: "special",
|
|
151
|
+
bundlePriceInPaise: 19900,
|
|
152
|
+
bundleQueryRule: {
|
|
153
|
+
type: "static",
|
|
154
|
+
productIds: ["product-tester-standard-1", "product-tester-standard-2"],
|
|
155
|
+
},
|
|
156
|
+
rootId: "bundle-tester-sandbox",
|
|
157
|
+
parentIds: [],
|
|
158
|
+
childrenIds: [],
|
|
159
|
+
tier: 0,
|
|
160
|
+
path: "bundle-tester-sandbox",
|
|
161
|
+
order: 999,
|
|
162
|
+
isLeaf: true,
|
|
163
|
+
position: 0,
|
|
164
|
+
subtreeSize: 0,
|
|
165
|
+
metrics: emptyMetrics,
|
|
166
|
+
isFeatured: false,
|
|
167
|
+
isBrand: false,
|
|
168
|
+
isActive: true,
|
|
169
|
+
isSearchable: true,
|
|
170
|
+
showOnHomepage: false,
|
|
171
|
+
createdBy: "user-admin-letitrip",
|
|
172
|
+
isTestData: true,
|
|
173
|
+
testDataExpiresAt: testDataExpiresAt(),
|
|
174
|
+
createdAt: new Date(),
|
|
175
|
+
updatedAt: new Date(),
|
|
176
|
+
},
|
|
177
|
+
];
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* WHY: Shared tester sandbox — 1 disposable test event with both raffle and spin-wheel
|
|
3
|
+
* fields populated, so testers can exercise the events/raffle/spin flow end to end.
|
|
4
|
+
* Auto-expires after 7 days (testerSandboxCleanup).
|
|
5
|
+
* WHAT: Exports eventsTesterSeedData — 1 Partial<EventDocument> tagged isTestData:true.
|
|
6
|
+
*
|
|
7
|
+
* EXPORTS:
|
|
8
|
+
* eventsTesterSeedData — Array of 1 Partial<EventDocument> for the seed runner
|
|
9
|
+
*
|
|
10
|
+
* @tag domain:events,tester
|
|
11
|
+
* @tag layer:seed
|
|
12
|
+
* @tag pattern:none
|
|
13
|
+
* @tag access:server-only
|
|
14
|
+
* @tag consumers:seed/index.ts,seed-cli.mjs
|
|
15
|
+
* @tag sideEffects:none
|
|
16
|
+
*/
|
|
17
|
+
import { EVENT_FIELDS } from "../../../constants/field-names";
|
|
18
|
+
import { seedExtMedia } from "../../../seed/_helpers/media";
|
|
19
|
+
import { testDataExpiresAt } from "./tester-ttl";
|
|
20
|
+
export const eventsTesterSeedData = [
|
|
21
|
+
{
|
|
22
|
+
id: "event-tester-sandbox-spin",
|
|
23
|
+
slug: "tester-sandbox-spin",
|
|
24
|
+
type: EVENT_FIELDS.TYPE_VALUES.SPIN_WHEEL,
|
|
25
|
+
title: "Tester Sandbox — Spin the Wheel",
|
|
26
|
+
description: "Disposable test event for the tester QA program. Spin the wheel and confirm a prize is assigned.",
|
|
27
|
+
status: EVENT_FIELDS.STATUS_VALUES.ACTIVE,
|
|
28
|
+
startsAt: new Date(),
|
|
29
|
+
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: "Test event cover" },
|
|
31
|
+
tags: ["test"],
|
|
32
|
+
hasRaffle: true,
|
|
33
|
+
raffleType: "open_raffle",
|
|
34
|
+
rafflePrize: "Test prize — not a real reward",
|
|
35
|
+
raffleEntryCount: 0,
|
|
36
|
+
spinPrizes: [
|
|
37
|
+
{ id: "spin-tester-win", label: "You Win!", weight: 50, isActive: true },
|
|
38
|
+
{ id: "spin-tester-try-again", label: "Try Again", weight: 50, isActive: true },
|
|
39
|
+
],
|
|
40
|
+
spinMaxPerUser: 1,
|
|
41
|
+
spinWindowStart: new Date(),
|
|
42
|
+
spinWindowEnd: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000),
|
|
43
|
+
stats: { totalEntries: 0, approvedEntries: 0, flaggedEntries: 0 },
|
|
44
|
+
createdBy: "user-admin-letitrip",
|
|
45
|
+
isTestData: true,
|
|
46
|
+
testDataExpiresAt: testDataExpiresAt(),
|
|
47
|
+
createdAt: new Date(),
|
|
48
|
+
updatedAt: new Date(),
|
|
49
|
+
},
|
|
50
|
+
];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { testerChecklistSeedData } from "./tester-checklist-seed-data";
|
|
2
|
+
export { storesTesterSeedData } from "./stores-tester-seed-data";
|
|
3
|
+
export { categoriesTesterSeedData } from "./categories-tester-seed-data";
|
|
4
|
+
export { productsTesterSeedData } from "./products-tester-seed-data";
|
|
5
|
+
export { blogTesterSeedData } from "./blog-tester-seed-data";
|
|
6
|
+
export { eventsTesterSeedData } from "./events-tester-seed-data";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { testerChecklistSeedData } from "./tester-checklist-seed-data";
|
|
2
|
+
export { storesTesterSeedData } from "./stores-tester-seed-data";
|
|
3
|
+
export { categoriesTesterSeedData } from "./categories-tester-seed-data";
|
|
4
|
+
export { productsTesterSeedData } from "./products-tester-seed-data";
|
|
5
|
+
export { blogTesterSeedData } from "./blog-tester-seed-data";
|
|
6
|
+
export { eventsTesterSeedData } from "./events-tester-seed-data";
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* WHY: Shared tester sandbox — a handful of disposable test products spanning standard,
|
|
3
|
+
* auction, and pre-order listing types, all owned by store-tester-sandbox, so testers
|
|
4
|
+
* can exercise buying/bidding/pre-ordering against real code paths. Auto-expires after
|
|
5
|
+
* 7 days (testerSandboxCleanup cascades into any bids on the auction).
|
|
6
|
+
* WHAT: Exports productsTesterSeedData — 2 standard + 1 auction + 1 pre-order product.
|
|
7
|
+
*
|
|
8
|
+
* EXPORTS:
|
|
9
|
+
* productsTesterSeedData — Array of Partial<ProductDocument> for the seed runner
|
|
10
|
+
*
|
|
11
|
+
* @tag domain:products,tester
|
|
12
|
+
* @tag layer:seed
|
|
13
|
+
* @tag pattern:none
|
|
14
|
+
* @tag access:server-only
|
|
15
|
+
* @tag consumers:seed/index.ts,seed-cli.mjs
|
|
16
|
+
* @tag sideEffects:none
|
|
17
|
+
*/
|
|
18
|
+
import { PRODUCT_FIELDS } from "../../../constants/field-names";
|
|
19
|
+
import { buildSearchTokens } from "../../../utils/search-tokens";
|
|
20
|
+
import { seedExtMedia } from "../../../seed/_helpers/media";
|
|
21
|
+
import { testDataExpiresAt } from "./tester-ttl";
|
|
22
|
+
const TESTER_STORE_ID = "store-tester-sandbox";
|
|
23
|
+
const TESTER_STORE_NAME = "Tester Sandbox Store";
|
|
24
|
+
function withTokens(p) {
|
|
25
|
+
return {
|
|
26
|
+
tags: [],
|
|
27
|
+
featured: false,
|
|
28
|
+
isTestData: true,
|
|
29
|
+
testDataExpiresAt: testDataExpiresAt(),
|
|
30
|
+
storeId: TESTER_STORE_ID,
|
|
31
|
+
storeName: TESTER_STORE_NAME,
|
|
32
|
+
...p,
|
|
33
|
+
searchTokens: buildSearchTokens(p.title, p.description, p.brand, p.brandSlug, p.categoryNames, p.tags),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export const productsTesterSeedData = [
|
|
37
|
+
withTokens({
|
|
38
|
+
id: "product-tester-standard-1",
|
|
39
|
+
slug: "product-tester-standard-1",
|
|
40
|
+
title: "Test Gadget — Standard Listing #1",
|
|
41
|
+
description: "Disposable test product for the tester QA program. Buy it, review it, wishlist it — it auto-expires in 7 days.",
|
|
42
|
+
categorySlugs: ["category-tester-gadgets", "category-tester-sandbox"],
|
|
43
|
+
categoryNames: ["Test Gadgets", "Tester Sandbox"],
|
|
44
|
+
brandSlug: "brand-tester-sandbox",
|
|
45
|
+
brand: "TestBrand",
|
|
46
|
+
price: 19900,
|
|
47
|
+
currency: "INR",
|
|
48
|
+
stockQuantity: 10,
|
|
49
|
+
availableQuantity: 10,
|
|
50
|
+
isSold: false,
|
|
51
|
+
mainImage: seedExtMedia("https://picsum.photos/seed/product-image-tester-standard-1-20260101/900/900"),
|
|
52
|
+
images: [seedExtMedia("https://picsum.photos/seed/product-image-tester-standard-1-20260101/900/900")],
|
|
53
|
+
status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
|
|
54
|
+
condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
|
|
55
|
+
listingType: "standard",
|
|
56
|
+
customFields: [],
|
|
57
|
+
customSections: [],
|
|
58
|
+
isPromoted: false,
|
|
59
|
+
isOnSale: false,
|
|
60
|
+
createdAt: new Date(),
|
|
61
|
+
updatedAt: new Date(),
|
|
62
|
+
}),
|
|
63
|
+
withTokens({
|
|
64
|
+
id: "product-tester-standard-2",
|
|
65
|
+
slug: "product-tester-standard-2",
|
|
66
|
+
title: "Test Collectible — Standard Listing #2",
|
|
67
|
+
description: "Second disposable test product, referenced by the test bundle. Auto-expires in 7 days.",
|
|
68
|
+
categorySlugs: ["category-tester-collectibles", "category-tester-sandbox"],
|
|
69
|
+
categoryNames: ["Test Collectibles", "Tester Sandbox"],
|
|
70
|
+
brandSlug: "brand-tester-sandbox",
|
|
71
|
+
brand: "TestBrand",
|
|
72
|
+
price: 14900,
|
|
73
|
+
currency: "INR",
|
|
74
|
+
stockQuantity: 10,
|
|
75
|
+
availableQuantity: 10,
|
|
76
|
+
isSold: false,
|
|
77
|
+
mainImage: seedExtMedia("https://picsum.photos/seed/product-image-tester-standard-2-20260101/900/900"),
|
|
78
|
+
images: [seedExtMedia("https://picsum.photos/seed/product-image-tester-standard-2-20260101/900/900")],
|
|
79
|
+
status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
|
|
80
|
+
condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
|
|
81
|
+
listingType: "standard",
|
|
82
|
+
customFields: [],
|
|
83
|
+
customSections: [],
|
|
84
|
+
isPromoted: false,
|
|
85
|
+
isOnSale: false,
|
|
86
|
+
createdAt: new Date(),
|
|
87
|
+
updatedAt: new Date(),
|
|
88
|
+
}),
|
|
89
|
+
withTokens({
|
|
90
|
+
id: "auction-tester-sandbox-1",
|
|
91
|
+
slug: "auction-tester-sandbox-1",
|
|
92
|
+
title: "Test Auction — Bid Me!",
|
|
93
|
+
description: "Disposable test auction for the tester QA program. Place a bid — it auto-expires in 7 days, cascading to any bids.",
|
|
94
|
+
categorySlugs: ["category-tester-collectibles", "category-tester-sandbox"],
|
|
95
|
+
categoryNames: ["Test Collectibles", "Tester Sandbox"],
|
|
96
|
+
brandSlug: "brand-tester-sandbox",
|
|
97
|
+
brand: "TestBrand",
|
|
98
|
+
startingBid: 9900,
|
|
99
|
+
currentBid: 9900,
|
|
100
|
+
currency: "INR",
|
|
101
|
+
price: 9900,
|
|
102
|
+
stockQuantity: 1,
|
|
103
|
+
availableQuantity: 1,
|
|
104
|
+
auctionEndDate: new Date(Date.now() + 5 * 24 * 60 * 60 * 1000),
|
|
105
|
+
bidCount: 0,
|
|
106
|
+
bidsHaveStarted: false,
|
|
107
|
+
isSold: false,
|
|
108
|
+
mainImage: seedExtMedia("https://picsum.photos/seed/auction-image-tester-sandbox-1-20260101/900/900"),
|
|
109
|
+
images: [seedExtMedia("https://picsum.photos/seed/auction-image-tester-sandbox-1-20260101/900/900")],
|
|
110
|
+
status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
|
|
111
|
+
condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
|
|
112
|
+
listingType: "auction",
|
|
113
|
+
customFields: [],
|
|
114
|
+
customSections: [],
|
|
115
|
+
isPromoted: false,
|
|
116
|
+
isOnSale: false,
|
|
117
|
+
createdAt: new Date(),
|
|
118
|
+
updatedAt: new Date(),
|
|
119
|
+
}),
|
|
120
|
+
withTokens({
|
|
121
|
+
id: "preorder-tester-sandbox-1",
|
|
122
|
+
slug: "preorder-tester-sandbox-1",
|
|
123
|
+
title: "Test Pre-order — Reserve Me!",
|
|
124
|
+
description: "Disposable test pre-order for the tester QA program. Auto-expires in 7 days.",
|
|
125
|
+
categorySlugs: ["category-tester-gadgets", "category-tester-sandbox"],
|
|
126
|
+
categoryNames: ["Test Gadgets", "Tester Sandbox"],
|
|
127
|
+
brandSlug: "brand-tester-sandbox",
|
|
128
|
+
brand: "TestBrand",
|
|
129
|
+
price: 29900,
|
|
130
|
+
currency: "INR",
|
|
131
|
+
condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
|
|
132
|
+
status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
|
|
133
|
+
listingType: "pre-order",
|
|
134
|
+
images: [seedExtMedia("https://picsum.photos/seed/preorder-image-tester-sandbox-1-20260101/900/900")],
|
|
135
|
+
mainImage: seedExtMedia("https://picsum.photos/seed/preorder-image-tester-sandbox-1-20260101/900/900"),
|
|
136
|
+
isSold: false,
|
|
137
|
+
availableQuantity: 5,
|
|
138
|
+
customFields: [],
|
|
139
|
+
customSections: [],
|
|
140
|
+
isPromoted: false,
|
|
141
|
+
isOnSale: false,
|
|
142
|
+
preOrderDeliveryDate: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000),
|
|
143
|
+
preOrderProductionStatus: "in_production",
|
|
144
|
+
preOrderDepositPercent: 25,
|
|
145
|
+
preOrderMaxQuantity: 50,
|
|
146
|
+
preOrderCurrentCount: 0,
|
|
147
|
+
preOrderCancellable: true,
|
|
148
|
+
createdAt: new Date(),
|
|
149
|
+
updatedAt: new Date(),
|
|
150
|
+
}),
|
|
151
|
+
];
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* WHY: Shared tester sandbox — one auto-approved test store testers browse/buy from and
|
|
3
|
+
* use as a reference when creating their own listings. Auto-expires after 7 days
|
|
4
|
+
* (testerSandboxCleanup) and is invisible to non-testers (application-layer filter).
|
|
5
|
+
* WHAT: Exports 1 StoreDocument partial tagged isTestData:true.
|
|
6
|
+
*
|
|
7
|
+
* EXPORTS:
|
|
8
|
+
* storesTesterSeedData — Array of 1 Partial<StoreDocument> for the seed runner
|
|
9
|
+
*
|
|
10
|
+
* @tag domain:stores,tester
|
|
11
|
+
* @tag layer:seed
|
|
12
|
+
* @tag pattern:none
|
|
13
|
+
* @tag access:server-only
|
|
14
|
+
* @tag consumers:seed/index.ts,seed-cli.mjs
|
|
15
|
+
* @tag sideEffects:none
|
|
16
|
+
*/
|
|
17
|
+
import { STORE_FIELDS } from "../../../constants/field-names";
|
|
18
|
+
import { seedExtMedia } from "../../../seed/_helpers/media";
|
|
19
|
+
import { testDataExpiresAt } from "./tester-ttl";
|
|
20
|
+
export const storesTesterSeedData = [
|
|
21
|
+
{
|
|
22
|
+
id: "store-tester-sandbox",
|
|
23
|
+
storeSlug: "store-tester-sandbox",
|
|
24
|
+
ownerId: "user-admin-letitrip",
|
|
25
|
+
storeName: "Tester Sandbox Store",
|
|
26
|
+
storeDescription: "Shared test store for the tester QA program. Products here are disposable and auto-expire — buy, bid, and review freely.",
|
|
27
|
+
storeCategory: "category-tester-sandbox",
|
|
28
|
+
storeLogoURL: seedExtMedia("https://picsum.photos/seed/store-logo-tester-sandbox-20260101/400/400"),
|
|
29
|
+
storeBannerURL: seedExtMedia("https://picsum.photos/seed/store-banner-tester-sandbox-20260101/1600/400"),
|
|
30
|
+
status: STORE_FIELDS.STATUS_VALUES.ACTIVE,
|
|
31
|
+
isPublic: true,
|
|
32
|
+
bio: "This store exists only for tester QA. Everything in it is disposable test data.",
|
|
33
|
+
returnPolicy: "N/A — test data.",
|
|
34
|
+
shippingPolicy: "N/A — test data.",
|
|
35
|
+
isTestData: true,
|
|
36
|
+
testDataExpiresAt: testDataExpiresAt(),
|
|
37
|
+
createdAt: new Date(),
|
|
38
|
+
updatedAt: new Date(),
|
|
39
|
+
},
|
|
40
|
+
];
|