@mohasinac/appkit 4.57.0 → 4.59.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/.build-stamp.json +4 -4
- package/dist/_internal/server/features/beys/data.d.ts +44 -0
- package/dist/_internal/server/features/beys/data.js +107 -0
- package/dist/_internal/server/features/beys/og.d.ts +42 -0
- package/dist/_internal/server/features/beys/og.js +89 -0
- package/dist/_internal/server/features/parts/data.js +3 -2
- package/dist/_internal/server/jobs/handlers/messages.d.ts +1 -1
- package/dist/_internal/server/jobs/handlers/messages.js +1 -1
- package/dist/_internal/shared/actions/action-registry.d.ts +1 -1
- package/dist/_internal/shared/actions/action-registry.js +86 -0
- package/dist/_internal/shared/types/base-document.d.ts +1 -1
- package/dist/client.d.ts +2 -0
- package/dist/client.js +1 -0
- package/dist/constants/api-endpoints.d.ts +12 -0
- package/dist/constants/api-endpoints.js +10 -0
- package/dist/constants/field-names.d.ts +46 -0
- package/dist/constants/field-names.js +46 -0
- package/dist/constants/seed-meta.d.ts +113 -0
- package/dist/constants/seed-meta.js +91 -0
- package/dist/features/admin/components/AdminBeysView.d.ts +27 -0
- package/dist/features/admin/components/AdminBeysView.js +178 -0
- package/dist/features/admin/components/AdminPartsView.d.ts +27 -0
- package/dist/features/admin/components/AdminPartsView.js +160 -0
- package/dist/features/admin/components/OwnerQuickActions.d.ts +19 -2
- package/dist/features/admin/components/OwnerQuickActions.js +31 -3
- package/dist/features/admin/components/RecordOwnerQuickActions.d.ts +31 -0
- package/dist/features/admin/components/RecordOwnerQuickActions.js +128 -0
- package/dist/features/admin/components/ReferenceRecordEditor.d.ts +45 -0
- package/dist/features/admin/components/ReferenceRecordEditor.js +153 -0
- package/dist/features/admin/schemas/firestore.d.ts +1 -1
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +15 -2
- package/dist/features/auth/permissions/constants.d.ts +1 -1
- package/dist/features/auth/permissions/constants.js +12 -1
- package/dist/features/beys/components/BeyDetailPageView.d.ts +50 -0
- package/dist/features/beys/components/BeyDetailPageView.js +98 -0
- package/dist/features/beys/schemas/firestore.d.ts +417 -0
- package/dist/features/beys/schemas/firestore.js +65 -0
- package/dist/features/blog/components/BlogFeaturedCard.js +15 -2
- package/dist/features/blog/components/BlogPostView.js +2 -2
- package/dist/features/categories/components/BrandDetailPageView.js +4 -2
- package/dist/features/categories/components/BundleDetailView.js +2 -2
- package/dist/features/categories/components/CategoryDetailPageView.js +36 -3
- package/dist/features/categories/components/CategoryGrid.js +24 -2
- package/dist/features/categories/components/FranchiseDetailPageView.js +2 -3
- package/dist/features/events/components/EventCard.js +15 -2
- package/dist/features/grouped/components/GroupedListingDetailView.js +2 -3
- package/dist/features/homepage/components/CustomCardsSection.js +67 -50
- package/dist/features/homepage/components/ShopByCategorySection.js +23 -10
- package/dist/features/homepage/schemas/index.d.ts +10 -10
- package/dist/features/parts/components/PartDetailPageView.js +5 -3
- package/dist/features/parts/components/PartsSearchBox.js +79 -4
- package/dist/features/parts/schemas/admin-edit.d.ts +81 -0
- package/dist/features/parts/schemas/admin-edit.js +89 -0
- package/dist/features/parts/schemas/firestore.d.ts +2 -1
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +15 -2
- package/dist/features/products/components/MarketplaceBundleCard.js +15 -2
- package/dist/features/products/components/MarketplacePrizeDrawCard.js +15 -2
- package/dist/features/products/components/ProductGrid.js +18 -2
- package/dist/features/products/schemas/firestore.d.ts +18 -0
- package/dist/features/seller/components/CategoryInlineSelect.d.ts +10 -1
- package/dist/features/seller/components/CategoryInlineSelect.js +53 -5
- package/dist/features/seller/components/SellerProductShell.d.ts +39 -0
- package/dist/features/seller/components/SellerProductShell.js +31 -3
- package/dist/index.d.ts +6 -129
- package/dist/index.js +61 -292
- package/dist/next/routing/route-map.d.ts +13 -1
- package/dist/next/routing/route-map.js +37 -0
- package/dist/schemas/registry.d.ts +6 -6
- package/dist/server.d.ts +2 -69
- package/dist/server.js +8 -69
- package/dist/styles.css +468 -1
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/components/PosterCard.d.ts +99 -0
- package/dist/ui/components/PosterCard.js +109 -0
- package/dist/ui/components/PosterCard.style.css +466 -0
- package/dist/ui/components/index.style.css +1 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +2 -0
- package/package.json +4 -2
- package/scripts/seed-cli.mjs +177 -2
- package/dist/features/tester/seed-data/_happy-path.d.ts +0 -23
- package/dist/features/tester/seed-data/_happy-path.js +0 -710
- package/dist/features/tester/seed-data/_money-flows.d.ts +0 -23
- package/dist/features/tester/seed-data/_money-flows.js +0 -610
- package/dist/features/tester/seed-data/authored/_types.d.ts +0 -57
- package/dist/features/tester/seed-data/authored/_types.js +0 -35
- package/dist/features/tester/seed-data/authored/account-auth__profile-settings.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/account-auth__profile-settings.js +0 -226
- package/dist/features/tester/seed-data/authored/account-auth__signup-login.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/account-auth__signup-login.js +0 -329
- package/dist/features/tester/seed-data/authored/addresses__address-filters.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/addresses__address-filters.js +0 -41
- package/dist/features/tester/seed-data/authored/addresses__postal-lookup.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/addresses__postal-lookup.js +0 -76
- package/dist/features/tester/seed-data/authored/addresses__postal-validation.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/addresses__postal-validation.js +0 -78
- package/dist/features/tester/seed-data/authored/addresses__state-picker.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/addresses__state-picker.js +0 -59
- package/dist/features/tester/seed-data/authored/addresses__unban-request.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/addresses__unban-request.js +0 -77
- package/dist/features/tester/seed-data/authored/admin__admin-detail-round-trips.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__admin-detail-round-trips.js +0 -151
- package/dist/features/tester/seed-data/authored/admin__bans-and-trust.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__bans-and-trust.js +0 -265
- package/dist/features/tester/seed-data/authored/admin__blog-faqs.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__blog-faqs.js +0 -131
- package/dist/features/tester/seed-data/authored/admin__bug-hunter-rewards.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__bug-hunter-rewards.js +0 -143
- package/dist/features/tester/seed-data/authored/admin__bulk-actions.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__bulk-actions.js +0 -207
- package/dist/features/tester/seed-data/authored/admin__bundles.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__bundles.js +0 -144
- package/dist/features/tester/seed-data/authored/admin__buyer-data-admin.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__buyer-data-admin.js +0 -265
- package/dist/features/tester/seed-data/authored/admin__catalog-listings.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__catalog-listings.js +0 -318
- package/dist/features/tester/seed-data/authored/admin__category-brand-authoring.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__category-brand-authoring.js +0 -177
- package/dist/features/tester/seed-data/authored/admin__classifieds-digitalcodes-live.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__classifieds-digitalcodes-live.js +0 -165
- package/dist/features/tester/seed-data/authored/admin__content-deletes.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__content-deletes.js +0 -267
- package/dist/features/tester/seed-data/authored/admin__content-marketing.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__content-marketing.js +0 -188
- package/dist/features/tester/seed-data/authored/admin__coupons.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__coupons.js +0 -215
- package/dist/features/tester/seed-data/authored/admin__events-raffles-spin.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__events-raffles-spin.js +0 -202
- package/dist/features/tester/seed-data/authored/admin__firebase-function-effects.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__firebase-function-effects.js +0 -249
- package/dist/features/tester/seed-data/authored/admin__media-watermark.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__media-watermark.js +0 -148
- package/dist/features/tester/seed-data/authored/admin__orders-fulfillment.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__orders-fulfillment.js +0 -350
- package/dist/features/tester/seed-data/authored/admin__prize-draws-lotteries.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__prize-draws-lotteries.js +0 -129
- package/dist/features/tester/seed-data/authored/admin__site-system.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__site-system.js +0 -586
- package/dist/features/tester/seed-data/authored/admin__uncovered-admin-pages.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__uncovered-admin-pages.js +0 -260
- package/dist/features/tester/seed-data/authored/admin__users-trust.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/admin__users-trust.js +0 -569
- package/dist/features/tester/seed-data/authored/buying__bidding.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__bidding.js +0 -449
- package/dist/features/tester/seed-data/authored/buying__browsing-search.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__browsing-search.js +0 -684
- package/dist/features/tester/seed-data/authored/buying__buying-checkout.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__buying-checkout.js +0 -546
- package/dist/features/tester/seed-data/authored/buying__buying-coupons.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__buying-coupons.js +0 -379
- package/dist/features/tester/seed-data/authored/buying__cart.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__cart.js +0 -1264
- package/dist/features/tester/seed-data/authored/buying__image-tile-layout.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__image-tile-layout.js +0 -122
- package/dist/features/tester/seed-data/authored/buying__my-orders.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__my-orders.js +0 -279
- package/dist/features/tester/seed-data/authored/buying__offers.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__offers.js +0 -1127
- package/dist/features/tester/seed-data/authored/buying__order-detail-actions.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__order-detail-actions.js +0 -153
- package/dist/features/tester/seed-data/authored/buying__order-status-lifecycle.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__order-status-lifecycle.js +0 -252
- package/dist/features/tester/seed-data/authored/buying__product-detail.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__product-detail.js +0 -474
- package/dist/features/tester/seed-data/authored/buying__return-request.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__return-request.js +0 -165
- package/dist/features/tester/seed-data/authored/buying__reviews-pagination.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__reviews-pagination.js +0 -260
- package/dist/features/tester/seed-data/authored/buying__reviews.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__reviews.js +0 -128
- package/dist/features/tester/seed-data/authored/buying__spares-and-groups.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__spares-and-groups.js +0 -96
- package/dist/features/tester/seed-data/authored/buying__user-dashboard-extras.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__user-dashboard-extras.js +0 -283
- package/dist/features/tester/seed-data/authored/buying__user-dashboard-navigation.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__user-dashboard-navigation.js +0 -169
- package/dist/features/tester/seed-data/authored/buying__user-uncovered-pages.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__user-uncovered-pages.js +0 -105
- package/dist/features/tester/seed-data/authored/buying__wishlist-history.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/buying__wishlist-history.js +0 -374
- package/dist/features/tester/seed-data/authored/community-support__messages.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/community-support__messages.js +0 -200
- package/dist/features/tester/seed-data/authored/community-support__public-profile.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/community-support__public-profile.js +0 -54
- package/dist/features/tester/seed-data/authored/community-support__support-tickets.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/community-support__support-tickets.js +0 -76
- package/dist/features/tester/seed-data/authored/content-discovery__authenticity-checker.d.ts +0 -4
- package/dist/features/tester/seed-data/authored/content-discovery__authenticity-checker.js +0 -590
- package/dist/features/tester/seed-data/authored/content-discovery__blog.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/content-discovery__blog.js +0 -110
- package/dist/features/tester/seed-data/authored/content-discovery__category-brand-relations.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/content-discovery__category-brand-relations.js +0 -149
- package/dist/features/tester/seed-data/authored/content-discovery__category-counts-and-rollup.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/content-discovery__category-counts-and-rollup.js +0 -145
- package/dist/features/tester/seed-data/authored/content-discovery__category-tabs-franchise-bundles.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/content-discovery__category-tabs-franchise-bundles.js +0 -174
- package/dist/features/tester/seed-data/authored/content-discovery__coupons.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/content-discovery__coupons.js +0 -169
- package/dist/features/tester/seed-data/authored/content-discovery__event-detail-subroutes.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/content-discovery__event-detail-subroutes.js +0 -209
- package/dist/features/tester/seed-data/authored/content-discovery__event-participation.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/content-discovery__event-participation.js +0 -207
- package/dist/features/tester/seed-data/authored/content-discovery__events.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/content-discovery__events.js +0 -377
- package/dist/features/tester/seed-data/authored/content-discovery__faq-help.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/content-discovery__faq-help.js +0 -87
- package/dist/features/tester/seed-data/authored/content-discovery__notifications.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/content-discovery__notifications.js +0 -147
- package/dist/features/tester/seed-data/authored/content-discovery__overflowing-pill-rows.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/content-discovery__overflowing-pill-rows.js +0 -209
- package/dist/features/tester/seed-data/authored/content-discovery__parts-database.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/content-discovery__parts-database.js +0 -167
- package/dist/features/tester/seed-data/authored/content-discovery__price-index-and-compare.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/content-discovery__price-index-and-compare.js +0 -73
- package/dist/features/tester/seed-data/authored/content-discovery__search.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/content-discovery__search.js +0 -363
- package/dist/features/tester/seed-data/authored/content-discovery__site-wide-index.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/content-discovery__site-wide-index.js +0 -340
- package/dist/features/tester/seed-data/authored/content-discovery__store-reviews-aggregate.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/content-discovery__store-reviews-aggregate.js +0 -88
- package/dist/features/tester/seed-data/authored/cta-layout__checkout-bottom-bar.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/cta-layout__checkout-bottom-bar.js +0 -78
- package/dist/features/tester/seed-data/authored/cta-layout__dialog-footers.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/cta-layout__dialog-footers.js +0 -76
- package/dist/features/tester/seed-data/authored/cta-layout__editor-action-bar.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/cta-layout__editor-action-bar.js +0 -62
- package/dist/features/tester/seed-data/authored/cta-layout__navbar-ctas.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/cta-layout__navbar-ctas.js +0 -163
- package/dist/features/tester/seed-data/authored/cta-layout__product-bottom-bar.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/cta-layout__product-bottom-bar.js +0 -61
- package/dist/features/tester/seed-data/authored/design-ux__action-bar-placement.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/design-ux__action-bar-placement.js +0 -89
- package/dist/features/tester/seed-data/authored/design-ux__back-to-top-button.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/design-ux__back-to-top-button.js +0 -95
- package/dist/features/tester/seed-data/authored/design-ux__carousel-arrow-bounds.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/design-ux__carousel-arrow-bounds.js +0 -191
- package/dist/features/tester/seed-data/authored/design-ux__dashboard-layout.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/design-ux__dashboard-layout.js +0 -158
- package/dist/features/tester/seed-data/authored/design-ux__feature-badge-picker.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/design-ux__feature-badge-picker.js +0 -82
- package/dist/features/tester/seed-data/authored/design-ux__footer-theme.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/design-ux__footer-theme.js +0 -106
- package/dist/features/tester/seed-data/authored/design-ux__form-validation-errors.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/design-ux__form-validation-errors.js +0 -88
- package/dist/features/tester/seed-data/authored/design-ux__general-design.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/design-ux__general-design.js +0 -204
- package/dist/features/tester/seed-data/authored/design-ux__hand-mode-layout.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/design-ux__hand-mode-layout.js +0 -301
- package/dist/features/tester/seed-data/authored/design-ux__header-brand-mark-centring.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/design-ux__header-brand-mark-centring.js +0 -90
- package/dist/features/tester/seed-data/authored/design-ux__header-controls-and-messages.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/design-ux__header-controls-and-messages.js +0 -85
- package/dist/features/tester/seed-data/authored/design-ux__homepage-carousels.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/design-ux__homepage-carousels.js +0 -407
- package/dist/features/tester/seed-data/authored/design-ux__nav-reachability.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/design-ux__nav-reachability.js +0 -88
- package/dist/features/tester/seed-data/authored/design-ux__rich-text-readability.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/design-ux__rich-text-readability.js +0 -84
- package/dist/features/tester/seed-data/authored/design-ux__status-badge-legibility.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/design-ux__status-badge-legibility.js +0 -214
- package/dist/features/tester/seed-data/authored/design-ux__sticky-cta-bar.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/design-ux__sticky-cta-bar.js +0 -275
- package/dist/features/tester/seed-data/authored/index.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/index.js +0 -301
- package/dist/features/tester/seed-data/authored/page-wiring__data-loss.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/page-wiring__data-loss.js +0 -125
- package/dist/features/tester/seed-data/authored/page-wiring__detail-pages.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/page-wiring__detail-pages.js +0 -85
- package/dist/features/tester/seed-data/authored/page-wiring__drawer-pages.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/page-wiring__drawer-pages.js +0 -92
- package/dist/features/tester/seed-data/authored/page-wiring__reachability.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/page-wiring__reachability.js +0 -115
- package/dist/features/tester/seed-data/authored/public-pages__auth-error-pages.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/public-pages__auth-error-pages.js +0 -137
- package/dist/features/tester/seed-data/authored/public-pages__core-listing-pages.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/public-pages__core-listing-pages.js +0 -263
- package/dist/features/tester/seed-data/authored/public-pages__help-how-it-works.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/public-pages__help-how-it-works.js +0 -229
- package/dist/features/tester/seed-data/authored/public-pages__help-scams-guides-subpages.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/public-pages__help-scams-guides-subpages.js +0 -325
- package/dist/features/tester/seed-data/authored/public-pages__legal-policy-pages.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/public-pages__legal-policy-pages.js +0 -126
- package/dist/features/tester/seed-data/authored/public-pages__newly-wired-browse-indexes.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/public-pages__newly-wired-browse-indexes.js +0 -141
- package/dist/features/tester/seed-data/authored/public-pages__store-tabs.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/public-pages__store-tabs.js +0 -115
- package/dist/features/tester/seed-data/authored/public-pages__stores-sellers-directories.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/public-pages__stores-sellers-directories.js +0 -253
- package/dist/features/tester/seed-data/authored/search-and-nav__employee-permissions.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/search-and-nav__employee-permissions.js +0 -93
- package/dist/features/tester/seed-data/authored/search-and-nav__header-search.d.ts +0 -3
- package/dist/features/tester/seed-data/authored/search-and-nav__header-search.js +0 -185
- package/dist/features/tester/seed-data/authored/search-and-nav__settings-deep-links.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/search-and-nav__settings-deep-links.js +0 -82
- package/dist/features/tester/seed-data/authored/search-and-nav__sidebar-search.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/search-and-nav__sidebar-search.js +0 -60
- package/dist/features/tester/seed-data/authored/selling__become-seller.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__become-seller.js +0 -117
- package/dist/features/tester/seed-data/authored/selling__digital-content-delivery.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__digital-content-delivery.js +0 -148
- package/dist/features/tester/seed-data/authored/selling__final-sale-authoring.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__final-sale-authoring.js +0 -108
- package/dist/features/tester/seed-data/authored/selling__listing-a-product.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__listing-a-product.js +0 -274
- package/dist/features/tester/seed-data/authored/selling__listing-edit-roundtrip.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__listing-edit-roundtrip.js +0 -145
- package/dist/features/tester/seed-data/authored/selling__listing-lifecycle.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__listing-lifecycle.js +0 -336
- package/dist/features/tester/seed-data/authored/selling__listing-type-fields-roundtrip.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__listing-type-fields-roundtrip.js +0 -136
- package/dist/features/tester/seed-data/authored/selling__media-limits.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__media-limits.js +0 -135
- package/dist/features/tester/seed-data/authored/selling__product-upload-details.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__product-upload-details.js +0 -155
- package/dist/features/tester/seed-data/authored/selling__quick-add-minimum-details.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__quick-add-minimum-details.js +0 -138
- package/dist/features/tester/seed-data/authored/selling__sectionised-forms.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__sectionised-forms.js +0 -191
- package/dist/features/tester/seed-data/authored/selling__seller-analytics-payouts.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__seller-analytics-payouts.js +0 -138
- package/dist/features/tester/seed-data/authored/selling__seller-bids-bundles-filters.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__seller-bids-bundles-filters.js +0 -106
- package/dist/features/tester/seed-data/authored/selling__seller-catalog-org.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__seller-catalog-org.js +0 -192
- package/dist/features/tester/seed-data/authored/selling__seller-custom-brands.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__seller-custom-brands.js +0 -109
- package/dist/features/tester/seed-data/authored/selling__seller-guide.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__seller-guide.js +0 -34
- package/dist/features/tester/seed-data/authored/selling__seller-listing-types.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__seller-listing-types.js +0 -348
- package/dist/features/tester/seed-data/authored/selling__seller-marketing-extras.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__seller-marketing-extras.js +0 -87
- package/dist/features/tester/seed-data/authored/selling__seller-ops-comms.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__seller-ops-comms.js +0 -90
- package/dist/features/tester/seed-data/authored/selling__seller-orders-at-scale.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__seller-orders-at-scale.js +0 -85
- package/dist/features/tester/seed-data/authored/selling__seller-orders.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__seller-orders.js +0 -213
- package/dist/features/tester/seed-data/authored/selling__seller-shipping-payouts-setup.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__seller-shipping-payouts-setup.js +0 -192
- package/dist/features/tester/seed-data/authored/selling__spares-and-group-editing.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__spares-and-group-editing.js +0 -77
- package/dist/features/tester/seed-data/authored/selling__store-dashboard-navigation.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__store-dashboard-navigation.js +0 -165
- package/dist/features/tester/seed-data/authored/selling__store-uncovered-pages.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/selling__store-uncovered-pages.js +0 -116
- package/dist/features/tester/seed-data/authored/seo__canonical-and-host.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/seo__canonical-and-host.js +0 -127
- package/dist/features/tester/seed-data/authored/seo__og-images.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/seo__og-images.js +0 -107
- package/dist/features/tester/seed-data/authored/seo__page-metadata.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/seo__page-metadata.js +0 -120
- package/dist/features/tester/seed-data/authored/seo__sitemap-and-robots.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/seo__sitemap-and-robots.js +0 -105
- package/dist/features/tester/seed-data/authored/tools__sticker-promote-to-listings.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/tools__sticker-promote-to-listings.js +0 -58
- package/dist/features/tester/seed-data/authored/tools__sticker-tracer.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/tools__sticker-tracer.js +0 -284
- package/dist/features/tester/seed-data/index.d.ts +0 -2
- package/dist/features/tester/seed-data/index.js +0 -2
- package/dist/features/tester/seed-data/tester-checklist-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +0 -7601
- package/dist/features/tester/seed-data/tester-responses-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/tester-responses-seed-data.js +0 -95
- package/dist/features/tester/seed-data/tester-window.d.ts +0 -25
- package/dist/features/tester/seed-data/tester-window.js +0 -66
- package/dist/seed/_helpers/brand-rows.d.ts +0 -35
- package/dist/seed/_helpers/brand-rows.js +0 -600
- package/dist/seed/_helpers/category-content-generated.d.ts +0 -24
- package/dist/seed/_helpers/category-content-generated.js +0 -1853
- package/dist/seed/_helpers/category-content.d.ts +0 -68
- package/dist/seed/_helpers/category-content.js +0 -731
- package/dist/seed/_helpers/category-forest.d.ts +0 -4
- package/dist/seed/_helpers/category-forest.js +0 -824
- package/dist/seed/_helpers/category-images-generated.d.ts +0 -57
- package/dist/seed/_helpers/category-images-generated.js +0 -618
- package/dist/seed/_helpers/category-models/chunk0.d.ts +0 -2
- package/dist/seed/_helpers/category-models/chunk0.js +0 -2648
- package/dist/seed/_helpers/category-models/chunk1.d.ts +0 -2
- package/dist/seed/_helpers/category-models/chunk1.js +0 -2318
- package/dist/seed/_helpers/category-models/chunk2.d.ts +0 -2
- package/dist/seed/_helpers/category-models/chunk2.js +0 -2560
- package/dist/seed/_helpers/category-models/chunk3.d.ts +0 -2
- package/dist/seed/_helpers/category-models/chunk3.js +0 -2196
- package/dist/seed/_helpers/category-models/chunk4.d.ts +0 -2
- package/dist/seed/_helpers/category-models/chunk4.js +0 -1732
- package/dist/seed/_helpers/category-models.d.ts +0 -12
- package/dist/seed/_helpers/category-models.js +0 -45
- package/dist/seed/_helpers/category-names.d.ts +0 -54
- package/dist/seed/_helpers/category-names.js +0 -118
- package/dist/seed/_helpers/category-parts-glossary-map.d.ts +0 -1
- package/dist/seed/_helpers/category-parts-glossary-map.js +0 -2499
- package/dist/seed/_helpers/category-parts.d.ts +0 -9
- package/dist/seed/_helpers/category-parts.js +0 -15022
- package/dist/seed/_helpers/category-tree.d.ts +0 -27
- package/dist/seed/_helpers/category-tree.js +0 -119
- package/dist/seed/_helpers/character-features.d.ts +0 -10
- package/dist/seed/_helpers/character-features.js +0 -120
- package/dist/seed/_helpers/final-sale-fixtures.d.ts +0 -35
- package/dist/seed/_helpers/final-sale-fixtures.js +0 -61
- package/dist/seed/_helpers/franchise-rows.d.ts +0 -43
- package/dist/seed/_helpers/franchise-rows.js +0 -189
- package/dist/seed/_helpers/media.d.ts +0 -67
- package/dist/seed/_helpers/media.js +0 -172
- package/dist/seed/_helpers/part-colours-generated.d.ts +0 -18
- package/dist/seed/_helpers/part-colours-generated.js +0 -273
- package/dist/seed/_helpers/product-search-txt.d.ts +0 -18
- package/dist/seed/_helpers/product-search-txt.js +0 -23
- package/dist/seed/_helpers/search-txt-wrappers.d.ts +0 -26
- package/dist/seed/_helpers/search-txt-wrappers.js +0 -58
- package/dist/seed/addresses-seed-data.d.ts +0 -2
- package/dist/seed/addresses-seed-data.js +0 -78
- package/dist/seed/authenticity-knowledge-seed-data.d.ts +0 -78
- package/dist/seed/authenticity-knowledge-seed-data.js +0 -10729
- package/dist/seed/bids-seed-data.d.ts +0 -2
- package/dist/seed/bids-seed-data.js +0 -206
- package/dist/seed/blog-posts-seed-data.d.ts +0 -6
- package/dist/seed/blog-posts-seed-data.js +0 -442
- package/dist/seed/carousel-slides-seed-data.d.ts +0 -2
- package/dist/seed/carousel-slides-seed-data.js +0 -411
- package/dist/seed/carousels-seed-data.d.ts +0 -2
- package/dist/seed/carousels-seed-data.js +0 -36
- package/dist/seed/cart-seed-data.d.ts +0 -2
- package/dist/seed/cart-seed-data.js +0 -241
- package/dist/seed/catalogue-seed-data.d.ts +0 -2
- package/dist/seed/catalogue-seed-data.js +0 -112
- package/dist/seed/categories-seed-data.d.ts +0 -3
- package/dist/seed/categories-seed-data.js +0 -816
- package/dist/seed/claimed-coupons-seed-data.d.ts +0 -2
- package/dist/seed/claimed-coupons-seed-data.js +0 -85
- package/dist/seed/coupon-usage-seed-data.d.ts +0 -9
- package/dist/seed/coupon-usage-seed-data.js +0 -55
- package/dist/seed/coupons-seed-data.d.ts +0 -2
- package/dist/seed/coupons-seed-data.js +0 -226
- package/dist/seed/defaults/categories.d.ts +0 -2
- package/dist/seed/defaults/categories.js +0 -12
- package/dist/seed/defaults/faqs.d.ts +0 -2
- package/dist/seed/defaults/faqs.js +0 -40
- package/dist/seed/events-seed-data.d.ts +0 -7
- package/dist/seed/events-seed-data.js +0 -482
- package/dist/seed/factories/address.factory.d.ts +0 -21
- package/dist/seed/factories/address.factory.js +0 -44
- package/dist/seed/factories/bid.factory.d.ts +0 -15
- package/dist/seed/factories/bid.factory.js +0 -33
- package/dist/seed/factories/blog-post.factory.d.ts +0 -15
- package/dist/seed/factories/blog-post.factory.js +0 -22
- package/dist/seed/factories/carousel.factory.d.ts +0 -11
- package/dist/seed/factories/carousel.factory.js +0 -17
- package/dist/seed/factories/cart.factory.d.ts +0 -25
- package/dist/seed/factories/cart.factory.js +0 -35
- package/dist/seed/factories/category.factory.d.ts +0 -11
- package/dist/seed/factories/category.factory.js +0 -16
- package/dist/seed/factories/coupon.factory.d.ts +0 -21
- package/dist/seed/factories/coupon.factory.js +0 -43
- package/dist/seed/factories/faq.factory.d.ts +0 -10
- package/dist/seed/factories/faq.factory.js +0 -15
- package/dist/seed/factories/notification.factory.d.ts +0 -18
- package/dist/seed/factories/notification.factory.js +0 -39
- package/dist/seed/factories/order.factory.d.ts +0 -20
- package/dist/seed/factories/order.factory.js +0 -20
- package/dist/seed/factories/payout.factory.d.ts +0 -21
- package/dist/seed/factories/payout.factory.js +0 -38
- package/dist/seed/factories/product.factory.d.ts +0 -27
- package/dist/seed/factories/product.factory.js +0 -80
- package/dist/seed/factories/review.factory.d.ts +0 -14
- package/dist/seed/factories/review.factory.js +0 -52
- package/dist/seed/factories/session.factory.d.ts +0 -15
- package/dist/seed/factories/session.factory.js +0 -31
- package/dist/seed/factories/store.factory.d.ts +0 -23
- package/dist/seed/factories/store.factory.js +0 -47
- package/dist/seed/factories/user.factory.d.ts +0 -19
- package/dist/seed/factories/user.factory.js +0 -56
- package/dist/seed/faq-seed-data.d.ts +0 -18
- package/dist/seed/faq-seed-data.js +0 -1956
- package/dist/seed/firestore-indexes.d.ts +0 -12
- package/dist/seed/firestore-indexes.js +0 -31
- package/dist/seed/grouped-listings-seed-data.d.ts +0 -2
- package/dist/seed/grouped-listings-seed-data.js +0 -283
- package/dist/seed/history-seed-data.d.ts +0 -12
- package/dist/seed/history-seed-data.js +0 -70
- package/dist/seed/homepage-sections-seed-data.d.ts +0 -2
- package/dist/seed/homepage-sections-seed-data.js +0 -1018
- package/dist/seed/index.d.ts +0 -98
- package/dist/seed/index.js +0 -112
- package/dist/seed/lottery-entries-seed-data.d.ts +0 -2
- package/dist/seed/lottery-entries-seed-data.js +0 -108
- package/dist/seed/manifest.d.ts +0 -16
- package/dist/seed/manifest.js +0 -235
- package/dist/seed/media-assets-seed-data.d.ts +0 -22
- package/dist/seed/media-assets-seed-data.js +0 -5593
- package/dist/seed/model-composition-seed-data.d.ts +0 -15
- package/dist/seed/model-composition-seed-data.js +0 -9032
- package/dist/seed/notifications-seed-data.d.ts +0 -2
- package/dist/seed/notifications-seed-data.js +0 -606
- package/dist/seed/offers-seed-data.d.ts +0 -2
- package/dist/seed/offers-seed-data.js +0 -398
- package/dist/seed/orders-seed-data.d.ts +0 -2
- package/dist/seed/orders-seed-data.js +0 -845
- package/dist/seed/part-glossary/chunk0.d.ts +0 -9
- package/dist/seed/part-glossary/chunk0.js +0 -35448
- package/dist/seed/part-glossary/chunk1.d.ts +0 -9
- package/dist/seed/part-glossary/chunk1.js +0 -40494
- package/dist/seed/part-glossary/chunk2.d.ts +0 -9
- package/dist/seed/part-glossary/chunk2.js +0 -51242
- package/dist/seed/part-glossary/chunk3.d.ts +0 -9
- package/dist/seed/part-glossary/chunk3.js +0 -53337
- package/dist/seed/part-glossary/chunk4.d.ts +0 -9
- package/dist/seed/part-glossary/chunk4.js +0 -51454
- package/dist/seed/part-glossary-seed-data.d.ts +0 -15
- package/dist/seed/part-glossary-seed-data.js +0 -25
- package/dist/seed/payouts-seed-data.d.ts +0 -2
- package/dist/seed/payouts-seed-data.js +0 -302
- package/dist/seed/product-features-seed-data.d.ts +0 -3
- package/dist/seed/product-features-seed-data.js +0 -366
- package/dist/seed/products-art-seed-data.d.ts +0 -2
- package/dist/seed/products-art-seed-data.js +0 -289
- package/dist/seed/products-auctions-seed-data.d.ts +0 -2
- package/dist/seed/products-auctions-seed-data.js +0 -475
- package/dist/seed/products-beyblade-x-seed-data.d.ts +0 -2
- package/dist/seed/products-beyblade-x-seed-data.js +0 -476
- package/dist/seed/products-catalogue-seed-data.d.ts +0 -22
- package/dist/seed/products-catalogue-seed-data.js +0 -86384
- package/dist/seed/products-classifieds-seed-data.d.ts +0 -7
- package/dist/seed/products-classifieds-seed-data.js +0 -435
- package/dist/seed/products-digital-codes-seed-data.d.ts +0 -7
- package/dist/seed/products-digital-codes-seed-data.js +0 -395
- package/dist/seed/products-live-items-seed-data.d.ts +0 -7
- package/dist/seed/products-live-items-seed-data.js +0 -269
- package/dist/seed/products-preorders-seed-data.d.ts +0 -2
- package/dist/seed/products-preorders-seed-data.js +0 -360
- package/dist/seed/products-prize-draws-seed-data.d.ts +0 -7
- package/dist/seed/products-prize-draws-seed-data.js +0 -427
- package/dist/seed/products-spares-seed-data.d.ts +0 -2
- package/dist/seed/products-spares-seed-data.js +0 -368
- package/dist/seed/products-standard-seed-data.d.ts +0 -2
- package/dist/seed/products-standard-seed-data.js +0 -632
- package/dist/seed/products-stickers-seed-data.d.ts +0 -2
- package/dist/seed/products-stickers-seed-data.js +0 -319
- package/dist/seed/reviews-seed-data.d.ts +0 -1
- package/dist/seed/reviews-seed-data.js +0 -185
- package/dist/seed/runner.d.ts +0 -2
- package/dist/seed/runner.js +0 -125
- package/dist/seed/scammers-seed-data.d.ts +0 -2
- package/dist/seed/scammers-seed-data.js +0 -235
- package/dist/seed/seed-market-config.d.ts +0 -48
- package/dist/seed/seed-market-config.js +0 -199
- package/dist/seed/seed-purpose.d.ts +0 -299
- package/dist/seed/seed-purpose.js +0 -431
- package/dist/seed/sessions-seed-data.d.ts +0 -3
- package/dist/seed/sessions-seed-data.js +0 -116
- package/dist/seed/shipments-seed-data.d.ts +0 -5
- package/dist/seed/shipments-seed-data.js +0 -185
- package/dist/seed/site-settings-seed-data.d.ts +0 -2
- package/dist/seed/site-settings-seed-data.js +0 -1069
- package/dist/seed/store-addresses-seed-data.d.ts +0 -18
- package/dist/seed/store-addresses-seed-data.js +0 -71
- package/dist/seed/store-extensions-seed-data.d.ts +0 -11
- package/dist/seed/store-extensions-seed-data.js +0 -292
- package/dist/seed/stores-seed-data.d.ts +0 -6
- package/dist/seed/stores-seed-data.js +0 -242
- package/dist/seed/support-tickets-seed-data.d.ts +0 -16
- package/dist/seed/support-tickets-seed-data.js +0 -239
- package/dist/seed/tax-codes-seed-data.d.ts +0 -34
- package/dist/seed/tax-codes-seed-data.js +0 -100
- package/dist/seed/test-data-ttl.d.ts +0 -29
- package/dist/seed/test-data-ttl.js +0 -31
- package/dist/seed/test-utils.d.ts +0 -49
- package/dist/seed/test-utils.js +0 -110
- package/dist/seed/types.d.ts +0 -89
- package/dist/seed/types.js +0 -15
- package/dist/seed/users-seed-data.d.ts +0 -2
- package/dist/seed/users-seed-data.js +0 -597
- package/dist/seed/wishlists-seed-data.d.ts +0 -12
- package/dist/seed/wishlists-seed-data.js +0 -54
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { SupportTicketPlain } from "../features/support/schemas/firestore";
|
|
2
|
-
/**
|
|
3
|
-
* Derive `searchTxt` for every record from its own subject.
|
|
4
|
-
*
|
|
5
|
-
* The seed writes documents raw via `batch.set()` — both `seed/runner.ts` and
|
|
6
|
-
* `seed-cli.mjs` — bypassing the repository, which is the only thing that
|
|
7
|
-
* builds tokens. Without this every seeded ticket would have no `searchTxt` at
|
|
8
|
-
* all and `array-contains` would match zero documents, for every query,
|
|
9
|
-
* forever. That is exactly how FAQ search was found broken.
|
|
10
|
-
*
|
|
11
|
-
* Computed with the SAME `buildSearchTxt` over the SAME field the repository
|
|
12
|
-
* uses, so a seeded ticket and a user-created one are byte-identical. Pure
|
|
13
|
-
* function of the record's own content, so it stays deterministic and does not
|
|
14
|
-
* reintroduce the `appkit-seed` idempotency problem of Root Cause #25.
|
|
15
|
-
*/
|
|
16
|
-
export declare const supportTicketsSeedData: Partial<SupportTicketPlain>[];
|
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* WHY: Seeds support tickets for the Beyblade marketplace — 8 tickets across all statuses.
|
|
3
|
-
* WHAT: open (2), in_progress (2), waiting_on_user (1), resolved (2), closed (1).
|
|
4
|
-
*
|
|
5
|
-
* EXPORTS:
|
|
6
|
-
* supportTicketsSeedData — Array of Partial<SupportTicketPlain> for seed runner
|
|
7
|
-
*
|
|
8
|
-
* @tag domain:support
|
|
9
|
-
* @tag layer:seed
|
|
10
|
-
* @tag pattern:none
|
|
11
|
-
* @tag access:server-only
|
|
12
|
-
* @tag consumers:seed/index.ts,seed/runner.ts
|
|
13
|
-
* @tag sideEffects:none
|
|
14
|
-
*/
|
|
15
|
-
import { SUPPORT_TICKET_FIELDS } from "../constants/field-names.js";
|
|
16
|
-
import { buildSearchTxt } from "../utils/search-txt.js";
|
|
17
|
-
function msg(id, authorId, authorRole, body, daysAgo) {
|
|
18
|
-
const createdAt = new Date(Date.now() - daysAgo * 24 * 60 * 60 * 1000);
|
|
19
|
-
return { id, authorId, authorRole, body, createdAt };
|
|
20
|
-
}
|
|
21
|
-
const BASE = Date.now();
|
|
22
|
-
function daysBack(n) {
|
|
23
|
-
return new Date(BASE - n * 24 * 60 * 60 * 1000);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* A timeline entry for the W18 `statusHistory` fixtures.
|
|
27
|
-
*
|
|
28
|
-
* `actorUid` only, never a name — `withHistory` scrubs
|
|
29
|
-
* SUPPORT_TICKET_PII_FIELDS (which includes `assignedToName`) from real
|
|
30
|
-
* writes, so a fixture carrying one would be the single place that is untrue.
|
|
31
|
-
*/
|
|
32
|
-
function entry(at, actorRole, trigger, changes, extra) {
|
|
33
|
-
return { at, actorRole, trigger, changes, ...extra };
|
|
34
|
-
}
|
|
35
|
-
const supportTicketRecords = [
|
|
36
|
-
// ── 1. Order issue — in progress ─────────────────────────────────────────
|
|
37
|
-
{
|
|
38
|
-
id: "ticket-yugi-order-001",
|
|
39
|
-
userId: "user-yugi-muto",
|
|
40
|
-
userEmail: "rehan.sheikh@example.com",
|
|
41
|
-
userDisplayName: "Mock User 3",
|
|
42
|
-
category: "order_issue",
|
|
43
|
-
subject: "Order delivered but item is missing from the box",
|
|
44
|
-
description: "I received order #order-1-20260515-abc123 but the Beyblade Original Dranzer S was not inside — only the outer packaging and bubble wrap were present. Please help.",
|
|
45
|
-
orderId: "order-1-20260515-abc123",
|
|
46
|
-
status: SUPPORT_TICKET_FIELDS.STATUS_VALUES.IN_PROGRESS,
|
|
47
|
-
priority: SUPPORT_TICKET_FIELDS.PRIORITY_VALUES.HIGH,
|
|
48
|
-
assignedTo: "user-admin-letitrip",
|
|
49
|
-
assignedToName: "Mock User 1",
|
|
50
|
-
messages: [
|
|
51
|
-
msg("msg-yugi-001-u1", "user-yugi-muto", "user", "I received my order but the beyblade was missing! The seal was broken on arrival.", 5),
|
|
52
|
-
msg("msg-yugi-001-s1", "user-admin-letitrip", "support", "Hi Rehan, we're sorry to hear this. I've raised a claim with the courier. Could you please share a photo of the packaging?", 4),
|
|
53
|
-
msg("msg-yugi-001-u2", "user-yugi-muto", "user", "Photos attached. The outer tape was clearly cut and resealed.", 3),
|
|
54
|
-
],
|
|
55
|
-
createdAt: daysBack(5),
|
|
56
|
-
updatedAt: daysBack(3),
|
|
57
|
-
},
|
|
58
|
-
// ── 2. Open ticket — refund request ───────────────────────────────────────
|
|
59
|
-
{
|
|
60
|
-
id: "ticket-yugi-refund-001",
|
|
61
|
-
userId: "user-yugi-muto",
|
|
62
|
-
userEmail: "rehan.sheikh@example.com",
|
|
63
|
-
userDisplayName: "Mock User 3",
|
|
64
|
-
category: "refund_request",
|
|
65
|
-
subject: "Requesting refund for cancelled pre-order",
|
|
66
|
-
description: "I placed a pre-order for the Beyblade X BX-08 wave 3 months ago. The store has now closed. I would like a full refund of ₹899.",
|
|
67
|
-
status: SUPPORT_TICKET_FIELDS.STATUS_VALUES.OPEN,
|
|
68
|
-
priority: SUPPORT_TICKET_FIELDS.PRIORITY_VALUES.NORMAL,
|
|
69
|
-
messages: [
|
|
70
|
-
msg("msg-yugi-002-u1", "user-yugi-muto", "user", "The store closed without shipping. I paid via Razorpay. Transaction ID: pay_test_abc123.", 2),
|
|
71
|
-
],
|
|
72
|
-
createdAt: daysBack(2),
|
|
73
|
-
updatedAt: daysBack(2),
|
|
74
|
-
},
|
|
75
|
-
// ── 3. Waiting on user — account recovery ─────────────────────────────────
|
|
76
|
-
{
|
|
77
|
-
id: "ticket-kaiba-account-001",
|
|
78
|
-
userId: "user-seto-kaiba",
|
|
79
|
-
userEmail: "vivaan.kapoor@example.com",
|
|
80
|
-
userDisplayName: "Mock User 2",
|
|
81
|
-
category: "account",
|
|
82
|
-
subject: "Cannot log in — OTP not arriving on new phone number",
|
|
83
|
-
description: "I changed my phone number and now OTP for login is going to the old number. I cannot access my account.",
|
|
84
|
-
status: SUPPORT_TICKET_FIELDS.STATUS_VALUES.WAITING_ON_USER,
|
|
85
|
-
priority: SUPPORT_TICKET_FIELDS.PRIORITY_VALUES.NORMAL,
|
|
86
|
-
assignedTo: "user-admin-letitrip",
|
|
87
|
-
assignedToName: "Mock User 1",
|
|
88
|
-
messages: [
|
|
89
|
-
msg("msg-kaiba-001-u1", "user-seto-kaiba", "user", "I'm locked out. My old number is no longer active.", 7),
|
|
90
|
-
msg("msg-kaiba-001-s1", "user-admin-letitrip", "support", "Hi Vivaan, to verify ownership we need your registered email and last 4 digits of the payment card used on this account. Please reply here.", 6),
|
|
91
|
-
],
|
|
92
|
-
createdAt: daysBack(7),
|
|
93
|
-
updatedAt: daysBack(6),
|
|
94
|
-
},
|
|
95
|
-
// ── 4. Resolved — listing dispute ─────────────────────────────────────────
|
|
96
|
-
{
|
|
97
|
-
id: "ticket-yugi-dispute-001",
|
|
98
|
-
userId: "user-yugi-muto",
|
|
99
|
-
userEmail: "rehan.sheikh@example.com",
|
|
100
|
-
userDisplayName: "Mock User 3",
|
|
101
|
-
category: "listing_dispute",
|
|
102
|
-
subject: "Product description says mint but tip is heavily worn",
|
|
103
|
-
description: "The Beyblade Metal Storm Pegasus I received has a rounded, sanded-down tip and scratches on the layer. The listing said mint condition. I want to return it.",
|
|
104
|
-
status: SUPPORT_TICKET_FIELDS.STATUS_VALUES.RESOLVED,
|
|
105
|
-
priority: SUPPORT_TICKET_FIELDS.PRIORITY_VALUES.NORMAL,
|
|
106
|
-
assignedTo: "user-admin-letitrip",
|
|
107
|
-
assignedToName: "Mock User 1",
|
|
108
|
-
messages: [
|
|
109
|
-
msg("msg-yugi-003-u1", "user-yugi-muto", "user", "The tip is clearly not mint. Here are photos showing the wear and scratches.", 12),
|
|
110
|
-
msg("msg-yugi-003-s1", "user-admin-letitrip", "support", "Thank you for the photos Rehan. We've contacted the seller and initiated a return + full refund.", 11),
|
|
111
|
-
msg("msg-yugi-003-s2", "user-admin-letitrip", "support", "Refund of ₹2,499 has been processed back to your original payment method. This ticket is now resolved.", 8),
|
|
112
|
-
],
|
|
113
|
-
resolvedAt: daysBack(8),
|
|
114
|
-
/*
|
|
115
|
-
* open -> in_progress -> resolved, with the assignment in between.
|
|
116
|
-
*
|
|
117
|
-
* `resolvedAt` above was ALREADY in this fixture, and no code path had
|
|
118
|
-
* ever written it (verified 2026-08-26) — the seed described a shape the
|
|
119
|
-
* application could not produce. The repository stamps it on the
|
|
120
|
-
* transition now, so this fixture and reality finally agree.
|
|
121
|
-
*/
|
|
122
|
-
statusHistory: [
|
|
123
|
-
entry(daysBack(12), "buyer", "createTicket", {
|
|
124
|
-
status: { from: null, to: "open" },
|
|
125
|
-
}, { actorUid: "user-yugi-muto" }),
|
|
126
|
-
entry(daysBack(11), "admin", "assignTicket", {
|
|
127
|
-
assignedTo: { from: null, to: "user-admin-letitrip" },
|
|
128
|
-
status: { from: "open", to: "in_progress" },
|
|
129
|
-
}, { actorUid: "user-admin-letitrip" }),
|
|
130
|
-
entry(daysBack(8), "admin", "adminUpdateTicket", {
|
|
131
|
-
status: { from: "in_progress", to: "resolved" },
|
|
132
|
-
resolvedAt: { from: null, to: "2026-08-18T00:00:00.000Z" },
|
|
133
|
-
}, {
|
|
134
|
-
actorUid: "user-admin-letitrip",
|
|
135
|
-
reason: "Return accepted and refund processed.",
|
|
136
|
-
}),
|
|
137
|
-
],
|
|
138
|
-
createdAt: daysBack(12),
|
|
139
|
-
updatedAt: daysBack(8),
|
|
140
|
-
},
|
|
141
|
-
// ── 5. Closed — auction dispute (terminal) ────────────────────────────────
|
|
142
|
-
{
|
|
143
|
-
id: "ticket-yugi-auction-001",
|
|
144
|
-
userId: "user-yugi-muto",
|
|
145
|
-
userEmail: "rehan.sheikh@example.com",
|
|
146
|
-
userDisplayName: "Mock User 3",
|
|
147
|
-
category: "auction_dispute",
|
|
148
|
-
subject: "Winning bid was removed from Dragoon Storm auction",
|
|
149
|
-
description: "I won the Beyblade Original Dragoon Storm auction but my winning bid was removed without explanation.",
|
|
150
|
-
status: SUPPORT_TICKET_FIELDS.STATUS_VALUES.CLOSED,
|
|
151
|
-
priority: SUPPORT_TICKET_FIELDS.PRIORITY_VALUES.LOW,
|
|
152
|
-
messages: [
|
|
153
|
-
msg("msg-yugi-004-u1", "user-yugi-muto", "user", "My winning bid was cancelled. I have a screenshot.", 20),
|
|
154
|
-
msg("msg-yugi-004-s1", "user-admin-letitrip", "support", "Hi Rehan, after reviewing the auction logs we found a duplicate bid was submitted. The correct winning bid remains active. No action needed.", 18),
|
|
155
|
-
msg("msg-yugi-004-u2", "user-yugi-muto", "user", "Understood, thanks for clarifying.", 17),
|
|
156
|
-
],
|
|
157
|
-
closedAt: daysBack(17),
|
|
158
|
-
createdAt: daysBack(20),
|
|
159
|
-
updatedAt: daysBack(17),
|
|
160
|
-
},
|
|
161
|
-
// ── 6. Open — general inquiry ─────────────────────────────────────────────
|
|
162
|
-
{
|
|
163
|
-
id: "ticket-kaiba-general-001",
|
|
164
|
-
userId: "user-seto-kaiba",
|
|
165
|
-
userEmail: "vivaan.kapoor@example.com",
|
|
166
|
-
userDisplayName: "Mock User 2",
|
|
167
|
-
category: "general",
|
|
168
|
-
subject: "How do I list a sealed limited-edition beyblade?",
|
|
169
|
-
description: "I want to list my sealed limited-edition Metal Lightning L-Drago with the authenticity certificate visible and verified. What are the steps?",
|
|
170
|
-
status: SUPPORT_TICKET_FIELDS.STATUS_VALUES.OPEN,
|
|
171
|
-
priority: SUPPORT_TICKET_FIELDS.PRIORITY_VALUES.LOW,
|
|
172
|
-
messages: [
|
|
173
|
-
msg("msg-kaiba-002-u1", "user-seto-kaiba", "user", "I've read the FAQ but couldn't find the exact authenticity verification requirements for sealed pieces.", 1),
|
|
174
|
-
],
|
|
175
|
-
createdAt: daysBack(1),
|
|
176
|
-
updatedAt: daysBack(1),
|
|
177
|
-
},
|
|
178
|
-
// ── 7. Resolved — escalated fraud report (admin handled) ──────────────────
|
|
179
|
-
{
|
|
180
|
-
id: "ticket-yugi-fraud-001",
|
|
181
|
-
userId: "user-yugi-muto",
|
|
182
|
-
userEmail: "rehan.sheikh@example.com",
|
|
183
|
-
userDisplayName: "Mock User 3",
|
|
184
|
-
category: "scam_report",
|
|
185
|
-
subject: "Seller sent empty box and is now unreachable",
|
|
186
|
-
description: "I paid ₹2,999 for a Beyblade Burst Regalia Genesis via Razorpay. The seller has not responded in 7 days and the tracking shows the box was 40g — way too light for a sealed spinner.",
|
|
187
|
-
status: SUPPORT_TICKET_FIELDS.STATUS_VALUES.RESOLVED,
|
|
188
|
-
priority: SUPPORT_TICKET_FIELDS.PRIORITY_VALUES.HIGH,
|
|
189
|
-
assignedTo: "user-admin-letitrip",
|
|
190
|
-
assignedToName: "Mock User 1",
|
|
191
|
-
messages: [
|
|
192
|
-
msg("msg-yugi-005-u1", "user-yugi-muto", "user", "I have the weight receipt from Delhivery. 40g is impossible for a sealed beyblade. The seller is not replying on messages or phone.", 10),
|
|
193
|
-
msg("msg-yugi-005-s1", "user-admin-letitrip", "support", "Hi Rehan, I have escalated this to our admin team for review as it qualifies as a potential fraud case. You will hear back within 24 hours.", 9),
|
|
194
|
-
msg("msg-yugi-005-a1", "user-admin-letitrip", "support", "Hi Rehan, this is the LetItRip admin. I have reviewed the shipment weight log and the seller communication history. We are initiating a full refund of ₹2,999 under our buyer protection policy. The seller account has been suspended pending investigation.", 8),
|
|
195
|
-
msg("msg-yugi-005-u2", "user-yugi-muto", "user", "Thank you so much. I really appreciate the quick escalation.", 7),
|
|
196
|
-
],
|
|
197
|
-
resolvedAt: daysBack(7),
|
|
198
|
-
createdAt: daysBack(10),
|
|
199
|
-
updatedAt: daysBack(7),
|
|
200
|
-
},
|
|
201
|
-
// ── 8. In-progress — seller store suspension appeal (admin handling) ──────
|
|
202
|
-
{
|
|
203
|
-
id: "ticket-kaiba-ban-appeal-001",
|
|
204
|
-
userId: "user-seto-kaiba",
|
|
205
|
-
userEmail: "vivaan.kapoor@example.com",
|
|
206
|
-
userDisplayName: "Mock User 2",
|
|
207
|
-
category: "account",
|
|
208
|
-
subject: "My account was flagged — I believe it was a mistake",
|
|
209
|
-
description: "My account was flagged 2 days ago. I received no email explanation. I have never violated any policy. Please review.",
|
|
210
|
-
status: SUPPORT_TICKET_FIELDS.STATUS_VALUES.IN_PROGRESS,
|
|
211
|
-
priority: SUPPORT_TICKET_FIELDS.PRIORITY_VALUES.HIGH,
|
|
212
|
-
assignedTo: "user-admin-letitrip",
|
|
213
|
-
assignedToName: "Mock User 1",
|
|
214
|
-
messages: [
|
|
215
|
-
msg("msg-kaiba-003-u1", "user-seto-kaiba", "user", "I'm a legitimate buyer. I have a clean order history and never had a single complaint. Please explain the flag.", 2),
|
|
216
|
-
msg("msg-kaiba-003-a1", "user-admin-letitrip", "support", "Hi Vivaan, your account was flagged as part of an automatic fraud check triggered by an unusual login pattern. I am manually reviewing your account history. Please share the last 4 digits of the card used for your most recent Razorpay payment for verification.", 1),
|
|
217
|
-
],
|
|
218
|
-
createdAt: daysBack(2),
|
|
219
|
-
updatedAt: daysBack(1),
|
|
220
|
-
},
|
|
221
|
-
];
|
|
222
|
-
/**
|
|
223
|
-
* Derive `searchTxt` for every record from its own subject.
|
|
224
|
-
*
|
|
225
|
-
* The seed writes documents raw via `batch.set()` — both `seed/runner.ts` and
|
|
226
|
-
* `seed-cli.mjs` — bypassing the repository, which is the only thing that
|
|
227
|
-
* builds tokens. Without this every seeded ticket would have no `searchTxt` at
|
|
228
|
-
* all and `array-contains` would match zero documents, for every query,
|
|
229
|
-
* forever. That is exactly how FAQ search was found broken.
|
|
230
|
-
*
|
|
231
|
-
* Computed with the SAME `buildSearchTxt` over the SAME field the repository
|
|
232
|
-
* uses, so a seeded ticket and a user-created one are byte-identical. Pure
|
|
233
|
-
* function of the record's own content, so it stays deterministic and does not
|
|
234
|
-
* reintroduce the `appkit-seed` idempotency problem of Root Cause #25.
|
|
235
|
-
*/
|
|
236
|
-
export const supportTicketsSeedData = supportTicketRecords.map((ticket) => ({
|
|
237
|
-
...ticket,
|
|
238
|
-
searchTxt: ticket.subject ? buildSearchTxt([ticket.subject]) : [],
|
|
239
|
-
}));
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tax Codes Seed Data
|
|
3
|
-
*
|
|
4
|
-
* The HSN codes this catalogue actually needs, and nothing speculative.
|
|
5
|
-
*
|
|
6
|
-
* ## 🛑 Only chapter 9503 is VERIFIED
|
|
7
|
-
*
|
|
8
|
-
* The four 9503 rates below were confirmed against the current schedule. The
|
|
9
|
-
* chapters for printed matter (4911) and playing cards (9504) are correct
|
|
10
|
-
* chapters for merchandise we sell, and their RATES ARE NOT CONFIRMED — the
|
|
11
|
-
* toys rates themselves moved in the 2025 revision. They are deliberately NOT
|
|
12
|
-
* seeded: a wrong HSN on a real invoice is worse than an absent one, and an
|
|
13
|
-
* absent code leaves `gstRate` undefined, which every reader already handles.
|
|
14
|
-
*
|
|
15
|
-
* Add them as a one-line seed change once someone has checked the schedule.
|
|
16
|
-
*
|
|
17
|
-
* ## The 18% row is load-bearing
|
|
18
|
-
*
|
|
19
|
-
* `tax-hsn-95030010` exists so the catalogue has at least one rate that is not
|
|
20
|
-
* 5%. Without it a 5%-only dataset cannot distinguish "the rate is being
|
|
21
|
-
* applied" from "the rate is hardcoded", and the B6 gate — the Tax row
|
|
22
|
-
* rendering on a real order for the first time — would pass either way.
|
|
23
|
-
*
|
|
24
|
-
* ## The 0% row is an EXEMPTION, not a missing value
|
|
25
|
-
*
|
|
26
|
-
* `tax-exempt-0` carries no HSN, which is legal only at rate 0 (enforced in
|
|
27
|
-
* both the form schema and the repository). It covers the live
|
|
28
|
-
* plants/animals listings. `gstRate: 0` and `gstRate: undefined` mean
|
|
29
|
-
* different things throughout — see the field's own comment.
|
|
30
|
-
*
|
|
31
|
-
* id === slug, prefix: tax-
|
|
32
|
-
*/
|
|
33
|
-
import type { TaxCodeDocument } from "../features/tax-codes/schemas/firestore";
|
|
34
|
-
export declare const taxCodesSeedData: TaxCodeDocument[];
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tax Codes Seed Data
|
|
3
|
-
*
|
|
4
|
-
* The HSN codes this catalogue actually needs, and nothing speculative.
|
|
5
|
-
*
|
|
6
|
-
* ## 🛑 Only chapter 9503 is VERIFIED
|
|
7
|
-
*
|
|
8
|
-
* The four 9503 rates below were confirmed against the current schedule. The
|
|
9
|
-
* chapters for printed matter (4911) and playing cards (9504) are correct
|
|
10
|
-
* chapters for merchandise we sell, and their RATES ARE NOT CONFIRMED — the
|
|
11
|
-
* toys rates themselves moved in the 2025 revision. They are deliberately NOT
|
|
12
|
-
* seeded: a wrong HSN on a real invoice is worse than an absent one, and an
|
|
13
|
-
* absent code leaves `gstRate` undefined, which every reader already handles.
|
|
14
|
-
*
|
|
15
|
-
* Add them as a one-line seed change once someone has checked the schedule.
|
|
16
|
-
*
|
|
17
|
-
* ## The 18% row is load-bearing
|
|
18
|
-
*
|
|
19
|
-
* `tax-hsn-95030010` exists so the catalogue has at least one rate that is not
|
|
20
|
-
* 5%. Without it a 5%-only dataset cannot distinguish "the rate is being
|
|
21
|
-
* applied" from "the rate is hardcoded", and the B6 gate — the Tax row
|
|
22
|
-
* rendering on a real order for the first time — would pass either way.
|
|
23
|
-
*
|
|
24
|
-
* ## The 0% row is an EXEMPTION, not a missing value
|
|
25
|
-
*
|
|
26
|
-
* `tax-exempt-0` carries no HSN, which is legal only at rate 0 (enforced in
|
|
27
|
-
* both the form schema and the repository). It covers the live
|
|
28
|
-
* plants/animals listings. `gstRate: 0` and `gstRate: undefined` mean
|
|
29
|
-
* different things throughout — see the field's own comment.
|
|
30
|
-
*
|
|
31
|
-
* id === slug, prefix: tax-
|
|
32
|
-
*/
|
|
33
|
-
/*
|
|
34
|
-
* A FIXED date, not `Date.now()`. Seed files are re-imported on every
|
|
35
|
-
* `appkit-seed` invocation, so a moving timestamp makes `load` non-idempotent
|
|
36
|
-
* and `status`/`delete` unable to see what a prior run wrote — Root Cause #25.
|
|
37
|
-
*/
|
|
38
|
-
const SEEDED_AT = new Date("2026-10-10T00:00:00.000Z");
|
|
39
|
-
export const taxCodesSeedData = [
|
|
40
|
-
{
|
|
41
|
-
id: "tax-hsn-95030020",
|
|
42
|
-
hsnCode: "95030020",
|
|
43
|
-
label: "Toys, non-electronic incl. spinning tops (HSN 9503 0020) — 5%",
|
|
44
|
-
description: "The default for this catalogue: every Beyblade, part, launcher and stadium.",
|
|
45
|
-
gstRate: 5,
|
|
46
|
-
chapter: "9503",
|
|
47
|
-
isActive: true,
|
|
48
|
-
notes: "Verified against the current GST schedule. Spinning tops are named explicitly in this sub-heading, which is why it is the default rather than 9503 0099.",
|
|
49
|
-
createdAt: SEEDED_AT,
|
|
50
|
-
updatedAt: SEEDED_AT,
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: "tax-hsn-95030099",
|
|
54
|
-
hsnCode: "95030099",
|
|
55
|
-
label: "Other toys (HSN 9503 0099) — 5%",
|
|
56
|
-
description: "Toys and collectibles that are not spinning tops and not electronic — figures, model kits, diecast.",
|
|
57
|
-
gstRate: 5,
|
|
58
|
-
chapter: "9503",
|
|
59
|
-
isActive: true,
|
|
60
|
-
notes: "Verified. The catch-all within chapter 9503 for non-electronic toys.",
|
|
61
|
-
createdAt: SEEDED_AT,
|
|
62
|
-
updatedAt: SEEDED_AT,
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
id: "tax-hsn-95030010",
|
|
66
|
-
hsnCode: "95030010",
|
|
67
|
-
label: "Electronic toys (HSN 9503 0010) — 18%",
|
|
68
|
-
description: "Toys whose function depends on electronics — anything battery-driven or with a screen.",
|
|
69
|
-
gstRate: 18,
|
|
70
|
-
chapter: "9503",
|
|
71
|
-
isActive: true,
|
|
72
|
-
notes: "Verified. 🛑 Keep at least one product on this code: it is the only row that proves the 18% branch is applied rather than a 5% rate being hardcoded.",
|
|
73
|
-
createdAt: SEEDED_AT,
|
|
74
|
-
updatedAt: SEEDED_AT,
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
id: "tax-hsn-95030091",
|
|
78
|
-
hsnCode: "95030091",
|
|
79
|
-
label: "Parts of electronic toys (HSN 9503 0091) — 18%",
|
|
80
|
-
description: "Components and spares for electronic toys.",
|
|
81
|
-
gstRate: 18,
|
|
82
|
-
chapter: "9503",
|
|
83
|
-
isActive: true,
|
|
84
|
-
notes: "Verified. Follows the parent heading's rate.",
|
|
85
|
-
createdAt: SEEDED_AT,
|
|
86
|
-
updatedAt: SEEDED_AT,
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
id: "tax-exempt-0",
|
|
90
|
-
hsnCode: "",
|
|
91
|
-
label: "Exempt — 0% (no HSN)",
|
|
92
|
-
description: "Live plants and live animals. An exemption, deliberately recorded rather than left unset.",
|
|
93
|
-
gstRate: 0,
|
|
94
|
-
chapter: "exempt",
|
|
95
|
-
isActive: true,
|
|
96
|
-
notes: "🛑 Rate 0 is a DECISION; `gstRate: undefined` is 'nobody has said'. Every reader tests `== null` rather than falsiness precisely so this row survives a default being applied elsewhere.",
|
|
97
|
-
createdAt: SEEDED_AT,
|
|
98
|
-
updatedAt: SEEDED_AT,
|
|
99
|
-
},
|
|
100
|
-
];
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The TTL stamp every disposable test fixture must carry.
|
|
3
|
-
*
|
|
4
|
-
* 🛑 `isTestData: true` WITHOUT `testDataExpiresAt` means PERMANENT — nothing
|
|
5
|
-
* ever reclaims it (see `jobs/handlers/_helpers.ts`, which documents the same
|
|
6
|
-
* rule from the sweep's side). That is not a theoretical hazard: until
|
|
7
|
-
* 2026-10-10 the only two `isTestData` rows in the whole seed,
|
|
8
|
-
* `product-tester-crossstore-a` / `-b`, were in exactly that state — live in
|
|
9
|
-
* the public catalogue of 72 products, never purged, and one of them was
|
|
10
|
-
* `store-letitrip-official`'s ONLY buyable standard product, so it was hidden
|
|
11
|
-
* from every real buyer by `hidePublicTestData` while being the only thing
|
|
12
|
-
* that store had to sell. Both are deleted.
|
|
13
|
-
*
|
|
14
|
-
* And the reason they were permanent is that **this module had zero callers**.
|
|
15
|
-
* The helper that enforces the rule existed, was documented as the rule that
|
|
16
|
-
* matters most, and no fixture used it. So: a fixture's three obligations are
|
|
17
|
-
* an id containing `-test-`, `isTestData: true`, and an expiry FROM HERE.
|
|
18
|
-
*
|
|
19
|
-
* Recomputed fresh on every seed run (seed files are re-imported per
|
|
20
|
-
* invocation), so re-seeding naturally refreshes the expiry rather than
|
|
21
|
-
* leaving a fixture that expired between runs.
|
|
22
|
-
*
|
|
23
|
-
* 🛑 Do NOT re-declare the day count elsewhere. It used to be declared twice —
|
|
24
|
-
* here and in `jobs/handlers/messages.ts` — with a comment as the only thing
|
|
25
|
-
* keeping them equal, which is the drift shape Root Cause #42 describes.
|
|
26
|
-
* `messages.ts` now re-exports this one.
|
|
27
|
-
*/
|
|
28
|
-
export declare const TEST_DATA_TTL_DAYS = 7;
|
|
29
|
-
export declare function testDataExpiresAt(): Date;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The TTL stamp every disposable test fixture must carry.
|
|
3
|
-
*
|
|
4
|
-
* 🛑 `isTestData: true` WITHOUT `testDataExpiresAt` means PERMANENT — nothing
|
|
5
|
-
* ever reclaims it (see `jobs/handlers/_helpers.ts`, which documents the same
|
|
6
|
-
* rule from the sweep's side). That is not a theoretical hazard: until
|
|
7
|
-
* 2026-10-10 the only two `isTestData` rows in the whole seed,
|
|
8
|
-
* `product-tester-crossstore-a` / `-b`, were in exactly that state — live in
|
|
9
|
-
* the public catalogue of 72 products, never purged, and one of them was
|
|
10
|
-
* `store-letitrip-official`'s ONLY buyable standard product, so it was hidden
|
|
11
|
-
* from every real buyer by `hidePublicTestData` while being the only thing
|
|
12
|
-
* that store had to sell. Both are deleted.
|
|
13
|
-
*
|
|
14
|
-
* And the reason they were permanent is that **this module had zero callers**.
|
|
15
|
-
* The helper that enforces the rule existed, was documented as the rule that
|
|
16
|
-
* matters most, and no fixture used it. So: a fixture's three obligations are
|
|
17
|
-
* an id containing `-test-`, `isTestData: true`, and an expiry FROM HERE.
|
|
18
|
-
*
|
|
19
|
-
* Recomputed fresh on every seed run (seed files are re-imported per
|
|
20
|
-
* invocation), so re-seeding naturally refreshes the expiry rather than
|
|
21
|
-
* leaving a fixture that expired between runs.
|
|
22
|
-
*
|
|
23
|
-
* 🛑 Do NOT re-declare the day count elsewhere. It used to be declared twice —
|
|
24
|
-
* here and in `jobs/handlers/messages.ts` — with a comment as the only thing
|
|
25
|
-
* keeping them equal, which is the drift shape Root Cause #42 describes.
|
|
26
|
-
* `messages.ts` now re-exports this one.
|
|
27
|
-
*/
|
|
28
|
-
export const TEST_DATA_TTL_DAYS = 7;
|
|
29
|
-
export function testDataExpiresAt() {
|
|
30
|
-
return new Date(Date.now() + TEST_DATA_TTL_DAYS * 24 * 60 * 60 * 1000);
|
|
31
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { JsonValue } from "@mohasinac/appkit";
|
|
2
|
-
import type { SeedBaseUserDocument } from "./factories/user.factory";
|
|
3
|
-
import type { SeedBaseProductDocument } from "./factories/product.factory";
|
|
4
|
-
import type { SeedBaseStoreDocument } from "./factories/store.factory";
|
|
5
|
-
import type { SeedBaseOrderDocument } from "./factories/order.factory";
|
|
6
|
-
import type { SeedCategoryDocument } from "./factories/category.factory";
|
|
7
|
-
import type { SeedFaqDocument } from "./factories/faq.factory";
|
|
8
|
-
/**
|
|
9
|
-
* Assert that every `piiField` in `doc` is encrypted and can be decrypted
|
|
10
|
-
* back to the original plaintext.
|
|
11
|
-
*
|
|
12
|
-
* Throws a descriptive error on any violation — use in tests.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* const user = makeFullUser({ email: "test@example.com", phone: "+919876543210" });
|
|
17
|
-
* await assertPiiRoundTrip(user, ["email", "phone"]);
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export declare function assertPiiRoundTrip<T extends Record<string, JsonValue>>(doc: T, piiFields: Array<keyof T & string>): Promise<void>;
|
|
21
|
-
export interface TestSeedHandles {
|
|
22
|
-
users: SeedBaseUserDocument[];
|
|
23
|
-
products: SeedBaseProductDocument[];
|
|
24
|
-
stores: SeedBaseStoreDocument[];
|
|
25
|
-
orders: SeedBaseOrderDocument[];
|
|
26
|
-
categories: SeedCategoryDocument[];
|
|
27
|
-
faqs: SeedFaqDocument[];
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Seed the Firestore emulator with a predictable, minimal dataset.
|
|
31
|
-
*
|
|
32
|
-
* Uses the `FIRESTORE_EMULATOR_PROJECT_ID` env var (default: "demo-test").
|
|
33
|
-
* Requires the emulator to be running before calling this.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```ts
|
|
37
|
-
* // jest.setup.ts
|
|
38
|
-
* beforeAll(async () => {
|
|
39
|
-
* const handles = await seedForTest();
|
|
40
|
-
* globalThis.__testUsers = handles.users;
|
|
41
|
-
* });
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
export declare function seedForTest(overrides?: Partial<{
|
|
45
|
-
users: SeedBaseUserDocument[];
|
|
46
|
-
products: SeedBaseProductDocument[];
|
|
47
|
-
stores: SeedBaseStoreDocument[];
|
|
48
|
-
orders: SeedBaseOrderDocument[];
|
|
49
|
-
}>): Promise<TestSeedHandles>;
|
package/dist/seed/test-utils.js
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { runSeed } from "./runner.js";
|
|
2
|
-
import { encryptPiiFields, decryptPiiFields, ENC_PREFIX } from "../security/pii-encrypt.js";
|
|
3
|
-
import { hasEncPrefix } from "../security/pii-mask.js";
|
|
4
|
-
import { DEFAULT_CATEGORIES } from "./defaults/categories.js";
|
|
5
|
-
import { DEFAULT_FAQS } from "./defaults/faqs.js";
|
|
6
|
-
import { makeProduct } from "./factories/product.factory.js";
|
|
7
|
-
import { USER_FIXTURES } from "./factories/user.factory.js";
|
|
8
|
-
import { makeStore } from "./factories/store.factory.js";
|
|
9
|
-
// ---------------------------------------------------------------------------
|
|
10
|
-
// PII round-trip assertion
|
|
11
|
-
// ---------------------------------------------------------------------------
|
|
12
|
-
/**
|
|
13
|
-
* Assert that every `piiField` in `doc` is encrypted and can be decrypted
|
|
14
|
-
* back to the original plaintext.
|
|
15
|
-
*
|
|
16
|
-
* Throws a descriptive error on any violation — use in tests.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```ts
|
|
20
|
-
* const user = makeFullUser({ email: "test@example.com", phone: "+919876543210" });
|
|
21
|
-
* await assertPiiRoundTrip(user, ["email", "phone"]);
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
export async function assertPiiRoundTrip(doc, piiFields) {
|
|
25
|
-
const encrypted = encryptPiiFields(doc, piiFields);
|
|
26
|
-
for (const field of piiFields) {
|
|
27
|
-
const val = encrypted[field];
|
|
28
|
-
// `hasEncPrefix`, not a bare startsWith: the assertion is "this is not
|
|
29
|
-
// cleartext", which both crypto formats satisfy. And the value NEVER goes
|
|
30
|
-
// in the message — this helper runs over real fixture PII.
|
|
31
|
-
if (!hasEncPrefix(val)) {
|
|
32
|
-
throw new Error(`assertPiiRoundTrip: field "${String(field)}" was NOT encrypted (got ${val.length} chars, no ${ENC_PREFIX} prefix).`);
|
|
33
|
-
}
|
|
34
|
-
// Verify blind index was written
|
|
35
|
-
const indexKey = `${String(field)}Index`;
|
|
36
|
-
if (!encrypted[indexKey]) {
|
|
37
|
-
throw new Error(`assertPiiRoundTrip: blind index "${indexKey}" is missing after encryption.`);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
const decrypted = decryptPiiFields(encrypted, piiFields);
|
|
41
|
-
for (const field of piiFields) {
|
|
42
|
-
if (decrypted[field] !== doc[field]) {
|
|
43
|
-
throw new Error(`assertPiiRoundTrip: field "${String(field)}" round-trip mismatch. ` +
|
|
44
|
-
`Expected "${String(doc[field])}", got "${String(decrypted[field])}"`);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Seed the Firestore emulator with a predictable, minimal dataset.
|
|
50
|
-
*
|
|
51
|
-
* Uses the `FIRESTORE_EMULATOR_PROJECT_ID` env var (default: "demo-test").
|
|
52
|
-
* Requires the emulator to be running before calling this.
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```ts
|
|
56
|
-
* // jest.setup.ts
|
|
57
|
-
* beforeAll(async () => {
|
|
58
|
-
* const handles = await seedForTest();
|
|
59
|
-
* globalThis.__testUsers = handles.users;
|
|
60
|
-
* });
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
export async function seedForTest(overrides) {
|
|
64
|
-
const users = overrides?.users ?? Object.values(USER_FIXTURES);
|
|
65
|
-
const products = overrides?.products ??
|
|
66
|
-
Array.from({ length: 5 }, (_, i) => makeProduct({ id: `p-${i + 1}` }));
|
|
67
|
-
const stores = overrides?.stores ?? [makeStore({ id: "store-1" })];
|
|
68
|
-
const orders = overrides?.orders ?? [];
|
|
69
|
-
const seedConfig = {
|
|
70
|
-
projectId: process.env["FIRESTORE_EMULATOR_PROJECT_ID"] ?? "demo-test",
|
|
71
|
-
collections: [
|
|
72
|
-
{
|
|
73
|
-
collection: "users",
|
|
74
|
-
data: users,
|
|
75
|
-
idField: "uid",
|
|
76
|
-
piiFields: ["email"],
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
collection: "products",
|
|
80
|
-
data: products,
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
collection: "stores",
|
|
84
|
-
data: stores,
|
|
85
|
-
piiFields: ["ownerEmail"],
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
collection: "orders",
|
|
89
|
-
data: orders,
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
collection: "categories",
|
|
93
|
-
data: DEFAULT_CATEGORIES,
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
collection: "faqs",
|
|
97
|
-
data: DEFAULT_FAQS,
|
|
98
|
-
},
|
|
99
|
-
],
|
|
100
|
-
};
|
|
101
|
-
await runSeed(seedConfig);
|
|
102
|
-
return {
|
|
103
|
-
users,
|
|
104
|
-
products,
|
|
105
|
-
stores,
|
|
106
|
-
orders,
|
|
107
|
-
categories: DEFAULT_CATEGORIES,
|
|
108
|
-
faqs: DEFAULT_FAQS,
|
|
109
|
-
};
|
|
110
|
-
}
|