@mohasinac/appkit 4.40.1 → 4.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/features/categories/repository/categories.repository.js +2 -2
- package/dist/features/shell/SectionForm.js +44 -5
- package/dist/features/tester/seed-data/_money-flows.js +65 -49
- package/dist/features/tester/seed-data/authored/admin__admin-detail-round-trips.js +6 -4
- package/dist/features/tester/seed-data/authored/admin__coupons.js +14 -13
- package/dist/features/tester/seed-data/authored/buying__bidding.js +154 -140
- package/dist/features/tester/seed-data/authored/buying__browsing-search.js +4 -4
- package/dist/features/tester/seed-data/authored/buying__buying-checkout.js +59 -56
- package/dist/features/tester/seed-data/authored/buying__buying-coupons.js +18 -18
- package/dist/features/tester/seed-data/authored/buying__cart.js +105 -79
- package/dist/features/tester/seed-data/authored/buying__image-tile-layout.js +6 -8
- package/dist/features/tester/seed-data/authored/buying__my-orders.js +13 -13
- package/dist/features/tester/seed-data/authored/buying__offers.js +6 -6
- package/dist/features/tester/seed-data/authored/buying__order-detail-actions.js +8 -7
- package/dist/features/tester/seed-data/authored/buying__product-detail.js +62 -56
- package/dist/features/tester/seed-data/authored/buying__return-request.js +6 -6
- package/dist/features/tester/seed-data/authored/buying__reviews-pagination.js +4 -4
- package/dist/features/tester/seed-data/authored/buying__reviews.js +1 -1
- package/dist/features/tester/seed-data/authored/buying__user-dashboard-extras.js +8 -8
- package/dist/features/tester/seed-data/authored/content-discovery__category-counts-and-rollup.js +1 -1
- package/dist/features/tester/seed-data/authored/content-discovery__coupons.js +29 -16
- package/dist/features/tester/seed-data/authored/content-discovery__event-detail-subroutes.js +9 -9
- package/dist/features/tester/seed-data/authored/content-discovery__events.js +69 -36
- package/dist/features/tester/seed-data/authored/content-discovery__notifications.js +1 -1
- package/dist/features/tester/seed-data/authored/cta-layout__checkout-bottom-bar.js +2 -2
- package/dist/features/tester/seed-data/authored/design-ux__back-to-top-button.js +2 -2
- package/dist/features/tester/seed-data/authored/design-ux__general-design.js +1 -1
- package/dist/features/tester/seed-data/authored/design-ux__status-badge-legibility.js +1 -1
- package/dist/features/tester/seed-data/authored/design-ux__sticky-cta-bar.js +3 -3
- package/dist/features/tester/seed-data/authored/index.js +0 -2
- package/dist/features/tester/seed-data/authored/page-wiring__data-loss.js +2 -2
- package/dist/features/tester/seed-data/authored/page-wiring__reachability.js +6 -4
- package/dist/features/tester/seed-data/authored/public-pages__auth-error-pages.js +2 -2
- package/dist/features/tester/seed-data/authored/public-pages__core-listing-pages.js +1 -1
- package/dist/features/tester/seed-data/authored/public-pages__stores-sellers-directories.js +8 -10
- package/dist/features/tester/seed-data/authored/selling__become-seller.js +2 -2
- package/dist/features/tester/seed-data/authored/selling__digital-content-delivery.js +2 -2
- package/dist/features/tester/seed-data/authored/selling__listing-a-product.js +2 -2
- package/dist/features/tester/seed-data/authored/selling__listing-edit-roundtrip.js +2 -2
- package/dist/features/tester/seed-data/authored/selling__listing-lifecycle.js +2 -2
- package/dist/features/tester/seed-data/authored/selling__seller-listing-types.js +2 -2
- package/dist/features/tester/seed-data/authored/seo__og-images.js +3 -4
- package/dist/features/tester/seed-data/authored/seo__page-metadata.js +6 -8
- package/dist/features/tester/seed-data/authored/seo__sitemap-and-robots.js +5 -5
- package/dist/features/tester/seed-data/index.d.ts +0 -10
- package/dist/features/tester/seed-data/index.js +0 -10
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +75 -89
- package/dist/features/tester/seed-data/tester-responses-seed-data.js +5 -5
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -21
- package/dist/seed/addresses-seed-data.js +0 -34
- package/dist/seed/index.d.ts +1 -1
- package/dist/seed/index.js +4 -3
- package/dist/seed/manifest.js +11 -12
- package/dist/seed/notifications-seed-data.js +4 -4
- package/dist/seed/stores-seed-data.js +7 -52
- package/dist/seed/users-seed-data.js +3 -83
- package/package.json +2 -2
- package/scripts/seed-cli.mjs +15 -20
- package/dist/_internal/server/features/classified/actions.d.ts +0 -12
- package/dist/_internal/server/features/classified/actions.js +0 -33
- package/dist/_internal/server/features/digital-code/actions.d.ts +0 -12
- package/dist/_internal/server/features/digital-code/actions.js +0 -33
- package/dist/_internal/server/features/homepage/data.d.ts +0 -18
- package/dist/_internal/server/features/homepage/data.js +0 -70
- package/dist/_internal/server/features/live/actions.d.ts +0 -6
- package/dist/_internal/server/features/live/actions.js +0 -27
- package/dist/_internal/server/features/messages/actions.d.ts +0 -6
- package/dist/_internal/server/features/messages/actions.js +0 -6
- package/dist/_internal/server/features/messages/data.d.ts +0 -10
- package/dist/_internal/server/features/messages/data.js +0 -24
- package/dist/_internal/server/features/messages/index.d.ts +0 -2
- package/dist/_internal/server/features/messages/index.js +0 -2
- package/dist/_internal/server/jobs/core/testerSandboxRefresh.d.ts +0 -12
- package/dist/_internal/server/jobs/core/testerSandboxRefresh.js +0 -112
- package/dist/_internal/server/jobs/handlers/testerSandboxRefresh.d.ts +0 -2
- package/dist/_internal/server/jobs/handlers/testerSandboxRefresh.js +0 -2
- package/dist/_internal/shared/features/homepage/section-gate.d.ts +0 -14
- package/dist/_internal/shared/features/homepage/section-gate.js +0 -51
- package/dist/_internal/shared/features/lottery/config-form.d.ts +0 -58
- package/dist/_internal/shared/features/lottery/config-form.js +0 -71
- package/dist/client/api/useFeatureFlags.d.ts +0 -22
- package/dist/client/api/useFeatureFlags.js +0 -27
- package/dist/features/account/address-validation.d.ts +0 -20
- package/dist/features/account/address-validation.js +0 -35
- package/dist/features/account/components/ChatList.d.ts +0 -14
- package/dist/features/account/components/ChatList.js +0 -9
- package/dist/features/account/components/ChatWindow.d.ts +0 -17
- package/dist/features/account/components/ChatWindow.js +0 -6
- package/dist/features/account/components/MessagesView.d.ts +0 -16
- package/dist/features/account/components/MessagesView.js +0 -5
- package/dist/features/account/components/UserOffersView.d.ts +0 -10
- package/dist/features/account/components/UserOffersView.js +0 -5
- package/dist/features/account/constants/addresses.d.ts +0 -13
- package/dist/features/account/constants/addresses.js +0 -43
- package/dist/features/account/hooks/useAddressForm.d.ts +0 -24
- package/dist/features/account/hooks/useAddressForm.js +0 -58
- package/dist/features/admin/actions/chat-actions.d.ts +0 -29
- package/dist/features/admin/actions/chat-actions.js +0 -101
- package/dist/features/admin/components/AdminFeatureFlagsView.d.ts +0 -9
- package/dist/features/admin/components/AdminFeatureFlagsView.js +0 -109
- package/dist/features/admin/components/AdminSiteView.d.ts +0 -10
- package/dist/features/admin/components/AdminSiteView.js +0 -52
- package/dist/features/admin/hooks/useChat.d.ts +0 -24
- package/dist/features/admin/hooks/useChat.js +0 -100
- package/dist/features/admin/permission-map.d.ts +0 -3
- package/dist/features/admin/permission-map.js +0 -26
- package/dist/features/admin/repository/chat.repository.d.ts +0 -50
- package/dist/features/admin/repository/chat.repository.js +0 -223
- package/dist/features/auth/actions/password-change-otp-actions.d.ts +0 -18
- package/dist/features/auth/actions/password-change-otp-actions.js +0 -88
- package/dist/features/auth/actions/realtime-token-actions.d.ts +0 -11
- package/dist/features/auth/actions/realtime-token-actions.js +0 -38
- package/dist/features/auth/password-change-otp.d.ts +0 -34
- package/dist/features/auth/password-change-otp.js +0 -56
- package/dist/features/classified/components/ClassifiedContactSellerPanel.d.ts +0 -12
- package/dist/features/classified/components/ClassifiedContactSellerPanel.js +0 -49
- package/dist/features/events/api/route.d.ts +0 -12
- package/dist/features/events/api/route.js +0 -90
- package/dist/features/faq/api/route.d.ts +0 -11
- package/dist/features/faq/api/route.js +0 -52
- package/dist/features/faq/hooks/useFAQs.d.ts +0 -22
- package/dist/features/faq/hooks/useFAQs.js +0 -41
- package/dist/features/media/upload/video-poster.test.d.ts +0 -1
- package/dist/features/media/upload/video-poster.test.js +0 -42
- package/dist/features/messages/actions/index.d.ts +0 -2
- package/dist/features/messages/actions/index.js +0 -2
- package/dist/features/messages/actions/messages-actions.d.ts +0 -15
- package/dist/features/messages/actions/messages-actions.js +0 -33
- package/dist/features/messages/actions/ping-rtdb.d.ts +0 -2
- package/dist/features/messages/actions/ping-rtdb.js +0 -26
- package/dist/features/messages/hooks/useConversation.d.ts +0 -22
- package/dist/features/messages/hooks/useConversation.js +0 -155
- package/dist/features/messages/hooks/useConversations.d.ts +0 -15
- package/dist/features/messages/hooks/useConversations.js +0 -104
- package/dist/features/messages/index.d.ts +0 -6
- package/dist/features/messages/index.js +0 -4
- package/dist/features/messages/realtime.d.ts +0 -32
- package/dist/features/messages/realtime.js +0 -39
- package/dist/features/messages/repository/conversations.repository.d.ts +0 -71
- package/dist/features/messages/repository/conversations.repository.js +0 -284
- package/dist/features/messages/schemas/firestore.d.ts +0 -34
- package/dist/features/messages/schemas/firestore.js +0 -16
- package/dist/features/messages/schemas/index.d.ts +0 -177
- package/dist/features/messages/schemas/index.js +0 -35
- package/dist/features/messages/server.d.ts +0 -6
- package/dist/features/messages/server.js +0 -6
- package/dist/features/products/components/MakeOfferForm.d.ts +0 -20
- package/dist/features/products/components/MakeOfferForm.js +0 -9
- package/dist/features/reviews/api/route.d.ts +0 -21
- package/dist/features/reviews/api/route.js +0 -174
- package/dist/features/seller/api/offers/route.d.ts +0 -17
- package/dist/features/seller/api/offers/route.js +0 -63
- package/dist/features/seller/components/SellerAuctionsView.d.ts +0 -9
- package/dist/features/seller/components/SellerAuctionsView.js +0 -113
- package/dist/features/seller/components/SellerOffersPanel.d.ts +0 -21
- package/dist/features/seller/components/SellerOffersPanel.js +0 -160
- package/dist/features/seller/components/SellerPreOrdersView.d.ts +0 -6
- package/dist/features/seller/components/SellerPreOrdersView.js +0 -148
- package/dist/features/seller/components/SellerPrizeDrawsView.d.ts +0 -6
- package/dist/features/seller/components/SellerPrizeDrawsView.js +0 -152
- package/dist/features/seller/permission-map.d.ts +0 -5
- package/dist/features/seller/permission-map.js +0 -17
- package/dist/features/shell/StepForm.d.ts +0 -80
- package/dist/features/shell/StepForm.js +0 -136
- package/dist/features/stores/api/route.d.ts +0 -12
- package/dist/features/stores/api/route.js +0 -110
- package/dist/features/tester/seed-data/authored/account-auth__testing-program--admin.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/account-auth__testing-program--admin.js +0 -33
- package/dist/features/tester/seed-data/authored/account-auth__testing-program.d.ts +0 -2
- package/dist/features/tester/seed-data/authored/account-auth__testing-program.js +0 -138
- package/dist/features/tester/seed-data/bids-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/bids-tester-seed-data.js +0 -37
- package/dist/features/tester/seed-data/blog-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/blog-tester-seed-data.js +0 -40
- package/dist/features/tester/seed-data/carts-tester-seed-data.d.ts +0 -3
- package/dist/features/tester/seed-data/carts-tester-seed-data.js +0 -70
- package/dist/features/tester/seed-data/categories-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/categories-tester-seed-data.js +0 -218
- package/dist/features/tester/seed-data/coupons-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/coupons-tester-seed-data.js +0 -76
- package/dist/features/tester/seed-data/events-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/events-tester-seed-data.js +0 -193
- package/dist/features/tester/seed-data/offers-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/offers-tester-seed-data.js +0 -191
- package/dist/features/tester/seed-data/orders-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/orders-tester-seed-data.js +0 -329
- package/dist/features/tester/seed-data/products-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/products-tester-seed-data.js +0 -815
- package/dist/features/tester/seed-data/stores-tester-seed-data.d.ts +0 -2
- package/dist/features/tester/seed-data/stores-tester-seed-data.js +0 -79
- package/dist/features/wishlist/components/WishlistToggleButton.d.ts +0 -12
- package/dist/features/wishlist/components/WishlistToggleButton.js +0 -36
- package/dist/monitoring/analytics.d.ts +0 -80
- package/dist/monitoring/analytics.js +0 -176
- package/dist/next/middleware/pii-redactor.d.ts +0 -32
- package/dist/next/middleware/pii-redactor.js +0 -84
- package/dist/providers/db-firebase/realtime.d.ts +0 -42
- package/dist/providers/db-firebase/realtime.js +0 -138
- package/dist/security/rbac/Can.d.ts +0 -31
- package/dist/security/rbac/Can.js +0 -22
- package/dist/security/rbac/default-roles.d.ts +0 -2
- package/dist/security/rbac/default-roles.js +0 -83
- package/dist/security/rbac/hook.d.ts +0 -20
- package/dist/security/rbac/hook.js +0 -30
- package/dist/security/rbac/index.d.ts +0 -8
- package/dist/security/rbac/index.js +0 -6
- package/dist/security/rbac/middleware.d.ts +0 -51
- package/dist/security/rbac/middleware.js +0 -51
- package/dist/security/rbac/resolver.d.ts +0 -5
- package/dist/security/rbac/resolver.js +0 -38
- package/dist/security/rbac/server.d.ts +0 -24
- package/dist/security/rbac/server.js +0 -42
- package/dist/security/rbac/types.d.ts +0 -22
- package/dist/security/rbac/types.js +0 -2
- package/dist/seed/conversations-seed-data.d.ts +0 -2
- package/dist/seed/conversations-seed-data.js +0 -292
- package/dist/utils/filter.helper.d.ts +0 -18
- package/dist/utils/filter.helper.js +0 -21
- package/dist/utils/pagination.helper.d.ts +0 -23
- package/dist/utils/pagination.helper.js +0 -24
- package/dist/utils/search-tokens.d.ts +0 -2
- package/dist/utils/search-tokens.js +0 -21
package/dist/index.js
CHANGED
|
@@ -1194,27 +1194,6 @@ export { faqSeedData } from "./seed/index";
|
|
|
1194
1194
|
export { testerChecklistSeedData } from "./seed/index";
|
|
1195
1195
|
// testerResponsesSeedData - Seeded tester submissions behind the bug-hunter demo fixtures.
|
|
1196
1196
|
export { testerResponsesSeedData } from "./seed/index";
|
|
1197
|
-
// [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
1198
|
-
// storesTesterSeedData - Model for the shared tester sandbox store seed data.
|
|
1199
|
-
export { storesTesterSeedData } from "./seed/index";
|
|
1200
|
-
// [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
1201
|
-
// categoriesTesterSeedData - Model for the shared tester sandbox category/brand/bundle seed data.
|
|
1202
|
-
export { categoriesTesterSeedData } from "./seed/index";
|
|
1203
|
-
// [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
1204
|
-
// productsTesterSeedData - Model for the shared tester sandbox product seed data.
|
|
1205
|
-
export { productsTesterSeedData } from "./seed/index";
|
|
1206
|
-
// [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
1207
|
-
// blogTesterSeedData - Model for the shared tester sandbox blog post seed data.
|
|
1208
|
-
export { blogTesterSeedData } from "./seed/index";
|
|
1209
|
-
// [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
1210
|
-
// eventsTesterSeedData - Model for the shared tester sandbox event seed data.
|
|
1211
|
-
export { eventsTesterSeedData } from "./seed/index";
|
|
1212
|
-
// couponsTesterSeedData - Model for the shared tester sandbox coupon seed data.
|
|
1213
|
-
export { couponsTesterSeedData } from "./seed/index";
|
|
1214
|
-
// bidsTesterSeedData - Model for the shared tester sandbox bid seed data.
|
|
1215
|
-
export { bidsTesterSeedData } from "./seed/index";
|
|
1216
|
-
// ordersTesterSeedData - Model for the shared tester sandbox order seed data.
|
|
1217
|
-
export { ordersTesterSeedData } from "./seed/index";
|
|
1218
1197
|
// [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
1219
1198
|
// formatSeedPrice - Helper for format seed price.
|
|
1220
1199
|
export { formatSeedPrice } from "./seed/index";
|
|
@@ -74,39 +74,5 @@ const _rawAddressesSeedData = [
|
|
|
74
74
|
createdAt: daysAgo(365),
|
|
75
75
|
updatedAt: daysAgo(5),
|
|
76
76
|
},
|
|
77
|
-
/*
|
|
78
|
-
* Automated checklist runner — delivery address.
|
|
79
|
-
*
|
|
80
|
-
* 🛑 THIS ROW IS WHY CHECKOUT CAN BE TESTED AT ALL.
|
|
81
|
-
*
|
|
82
|
-
* `user-claude-tester` had no address, so /checkout stopped dead at "Step 1 of 3:
|
|
83
|
-
* Shipping Address — No saved addresses yet." Every order, payment, coupon-at-placement,
|
|
84
|
-
* offer-checkout and forfeited-bid case died there: 117 blocked cases, 27% of everything
|
|
85
|
-
* the run could not test, and the single largest blocker by a wide margin (measured,
|
|
86
|
-
* run 1789300124915).
|
|
87
|
-
*
|
|
88
|
-
* It has to be SEEDED rather than created by the runner mid-run. `addresses` is PRESERVE
|
|
89
|
-
* tier in tester/scripts/lib/collections.mjs — teardown deliberately never touches it,
|
|
90
|
-
* because real people's saved addresses live there — so a row the runner created at
|
|
91
|
-
* runtime would survive every future run with nothing owning its cleanup. Seeded, it is
|
|
92
|
-
* idempotent: `appkit-seed load` upserts this exact id, and re-running changes nothing.
|
|
93
|
-
*/
|
|
94
|
-
{
|
|
95
|
-
id: "addr-claude-tester-home",
|
|
96
|
-
ownerType: "user",
|
|
97
|
-
ownerId: "user-claude-tester",
|
|
98
|
-
label: "Home",
|
|
99
|
-
fullName: "Claude (automated)",
|
|
100
|
-
phone: "+91-99999-00019",
|
|
101
|
-
addressLine1: "1 Automation Street",
|
|
102
|
-
addressLine2: "Koramangala",
|
|
103
|
-
city: "Bengaluru",
|
|
104
|
-
state: "Karnataka",
|
|
105
|
-
postalCode: "560034",
|
|
106
|
-
country: "India",
|
|
107
|
-
isDefault: true,
|
|
108
|
-
createdAt: daysAgo(1),
|
|
109
|
-
updatedAt: daysAgo(1),
|
|
110
|
-
},
|
|
111
77
|
];
|
|
112
78
|
export const addressesSeedData = _rawAddressesSeedData;
|
package/dist/seed/index.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ export { historySeedData } from "./history-seed-data";
|
|
|
78
78
|
export { groupedListingsSeedData } from "./grouped-listings-seed-data";
|
|
79
79
|
export { scammersSeedData } from "./scammers-seed-data";
|
|
80
80
|
export { supportTicketsSeedData } from "./support-tickets-seed-data";
|
|
81
|
-
export { testerChecklistSeedData, testerResponsesSeedData,
|
|
81
|
+
export { testerChecklistSeedData, testerResponsesSeedData, } from "../features/tester/seed-data";
|
|
82
82
|
export { productFeaturesSeedData } from "./product-features-seed-data";
|
|
83
83
|
export { offersSeedData } from "./offers-seed-data";
|
|
84
84
|
export { payoutMethodsSeedData, shippingConfigsSeedData, analyticsCardsSeedData, analyticsAlertsSeedData, storeCategoriesSeedData, listingTemplatesSeedData, moderationQueueSeedData, reportsSeedData, itemRequestsSeedData, storeWhatsAppConfigSeedData, storeGoogleConfigSeedData, } from "./store-extensions-seed-data";
|
package/dist/seed/index.js
CHANGED
|
@@ -67,14 +67,15 @@ export { historySeedData } from "./history-seed-data";
|
|
|
67
67
|
export { groupedListingsSeedData } from "./grouped-listings-seed-data";
|
|
68
68
|
export { scammersSeedData } from "./scammers-seed-data";
|
|
69
69
|
export { supportTicketsSeedData } from "./support-tickets-seed-data";
|
|
70
|
-
// Tester
|
|
71
|
-
// folder on purpose) — re-exported here so every other seed consumer keeps one import
|
|
70
|
+
// Tester checklist/response seed data lives in ../features/tester/seed-data (isolated from
|
|
71
|
+
// this folder on purpose) — re-exported here so every other seed consumer keeps one import
|
|
72
|
+
// surface.
|
|
72
73
|
export { testerChecklistSeedData,
|
|
73
74
|
// 🛑 Adding a tester seed export means FOUR hops, not one: the tester barrel,
|
|
74
75
|
// THIS re-export, appkit/src/index.ts, and seed-cli's own import. Missing the
|
|
75
76
|
// middle two is silent — seed-cli logs "no seed data, skipping" and the run
|
|
76
77
|
// continues, which is exactly what happened on the first attempt here.
|
|
77
|
-
testerResponsesSeedData,
|
|
78
|
+
testerResponsesSeedData, } from "../features/tester/seed-data";
|
|
78
79
|
export { productFeaturesSeedData } from "./product-features-seed-data";
|
|
79
80
|
export { offersSeedData } from "./offers-seed-data";
|
|
80
81
|
// S-STORE Extensions (Tier S-STORE) — 11 new collections
|
package/dist/seed/manifest.js
CHANGED
|
@@ -49,8 +49,8 @@ import { productFeaturesSeedData } from "./product-features-seed-data";
|
|
|
49
49
|
import { offersSeedData } from "./offers-seed-data";
|
|
50
50
|
import { couponUsageSeedData } from "./coupon-usage-seed-data";
|
|
51
51
|
import { claimedCouponsSeedData } from "./claimed-coupons-seed-data";
|
|
52
|
-
// Tester
|
|
53
|
-
import { testerChecklistSeedData
|
|
52
|
+
// Tester checklist seed data lives in ../features/tester/seed-data (isolated on purpose).
|
|
53
|
+
import { testerChecklistSeedData } from "../features/tester/seed-data";
|
|
54
54
|
function asArr(items) {
|
|
55
55
|
return items ?? [];
|
|
56
56
|
}
|
|
@@ -77,12 +77,12 @@ const LISTING_TYPE_TO_MANIFEST_TAG = {
|
|
|
77
77
|
stickers: "stickers",
|
|
78
78
|
};
|
|
79
79
|
export const SEED_MANIFEST = {
|
|
80
|
-
categories: pick(
|
|
80
|
+
categories: pick(asArr(categoriesSeedData)),
|
|
81
81
|
users: pick(asArr(usersSeedData).map((u) => ({
|
|
82
82
|
...u,
|
|
83
83
|
name: u.displayName ?? u.email ?? u.uid,
|
|
84
84
|
}))),
|
|
85
|
-
stores: pick(
|
|
85
|
+
stores: pick(asArr(storesSeedData).map((s) => ({
|
|
86
86
|
...s,
|
|
87
87
|
name: s.storeName ?? s.id,
|
|
88
88
|
}))),
|
|
@@ -96,17 +96,16 @@ export const SEED_MANIFEST = {
|
|
|
96
96
|
...asArr(productsLiveItemsSeedData),
|
|
97
97
|
...asArr(productsArtSeedData),
|
|
98
98
|
...asArr(productsStickersSeedData),
|
|
99
|
-
...asArr(productsTesterSeedData),
|
|
100
99
|
].map((p) => ({
|
|
101
100
|
...p,
|
|
102
101
|
type: p.listingType === "bundle"
|
|
103
102
|
? "bundle"
|
|
104
103
|
: LISTING_TYPE_TO_MANIFEST_TAG[p.listingType ?? "standard"],
|
|
105
104
|
})), "title"),
|
|
106
|
-
orders: pick(
|
|
105
|
+
orders: pick(asArr(ordersSeedData)),
|
|
107
106
|
reviews: pick(asArr(reviewsSeedData), "title"),
|
|
108
|
-
bids: pick(
|
|
109
|
-
coupons: pick(
|
|
107
|
+
bids: pick(asArr(bidsSeedData)),
|
|
108
|
+
coupons: pick(asArr(couponsSeedData).map((c) => ({
|
|
110
109
|
...c,
|
|
111
110
|
name: c.code ?? c.id,
|
|
112
111
|
}))),
|
|
@@ -136,11 +135,11 @@ export const SEED_MANIFEST = {
|
|
|
136
135
|
shipmentLots: pick(asArr(shipmentLotsSeedData), "lotName"),
|
|
137
136
|
shipmentItems: pick(asArr(shipmentItemsSeedData), "title"),
|
|
138
137
|
catalogueItems: pick(asArr(catalogueSeedData), "title"),
|
|
139
|
-
blogPosts: pick(
|
|
138
|
+
blogPosts: pick(asArr(blogPostsSeedData).map((p) => ({
|
|
140
139
|
...p,
|
|
141
140
|
name: p.title ?? p.id,
|
|
142
141
|
}))),
|
|
143
|
-
events: pick(
|
|
142
|
+
events: pick(asArr(eventsSeedData).map((e) => ({
|
|
144
143
|
...e,
|
|
145
144
|
name: e.title ?? e.id,
|
|
146
145
|
}))),
|
|
@@ -166,7 +165,7 @@ export const SEED_MANIFEST = {
|
|
|
166
165
|
name: a.label ?? a.fullName ?? a.id,
|
|
167
166
|
})),
|
|
168
167
|
]),
|
|
169
|
-
carts: pick(
|
|
168
|
+
carts: pick(asArr(cartsSeedData).map((c) => ({
|
|
170
169
|
...c,
|
|
171
170
|
name: c.userId ?? c.id,
|
|
172
171
|
}))),
|
|
@@ -194,7 +193,7 @@ export const SEED_MANIFEST = {
|
|
|
194
193
|
...f,
|
|
195
194
|
name: f.label ?? f.id,
|
|
196
195
|
}))),
|
|
197
|
-
offers: pick(
|
|
196
|
+
offers: pick(asArr(offersSeedData).map((o) => ({
|
|
198
197
|
...o,
|
|
199
198
|
name: o.productTitle ?? o.id,
|
|
200
199
|
}))),
|
|
@@ -555,14 +555,14 @@ const notificationRecords = [
|
|
|
555
555
|
updatedAt: daysAgo(5),
|
|
556
556
|
},
|
|
557
557
|
{
|
|
558
|
-
id: "notif-
|
|
559
|
-
userId: "user-
|
|
558
|
+
id: "notif-rohit-catalogue-stale-001",
|
|
559
|
+
userId: "user-rohit-collector",
|
|
560
560
|
type: NOTIFICATION_FIELDS.TYPE_VALUES.CATALOGUE_IMAGES_STALE,
|
|
561
561
|
priority: "normal",
|
|
562
562
|
title: "Refresh your catalogue photos",
|
|
563
|
-
message: "Photos for your vintage
|
|
563
|
+
message: "Photos for your vintage Hot Wheels are getting old - refresh them within 14 days or you won't be able to list it.",
|
|
564
564
|
isRead: false,
|
|
565
|
-
relatedId: "mycatalog-user-
|
|
565
|
+
relatedId: "mycatalog-user-rohit-collector-vintage-hotwheels-20260801-a1b2c3",
|
|
566
566
|
relatedType: "catalogueItem",
|
|
567
567
|
createdAt: daysAgo(2),
|
|
568
568
|
updatedAt: daysAgo(2),
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* WHY: Provides a minimal set of seed stores for the Beyblade-focused demo catalog.
|
|
3
|
-
* WHAT: Exports
|
|
3
|
+
* WHAT: Exports 4 StoreDocument partials — letitrip-official (platform's first-party store,
|
|
4
4
|
* kept for admin/catalogue flows that assume one exists), beyblade-arena (the
|
|
5
|
-
* Beyblade specialist storefront that owns the seeded product catalog),
|
|
6
|
-
*
|
|
5
|
+
* Beyblade specialist storefront that owns the seeded product catalog), plus two
|
|
6
|
+
* status fixtures: blader-bazaar (pending) and vintage-vault-co (suspended), so the
|
|
7
|
+
* admin status chips and the seller-approval queue are not empty.
|
|
7
8
|
*
|
|
8
9
|
* EXPORTS:
|
|
9
|
-
* storesSeedData — array of
|
|
10
|
+
* storesSeedData — array of 4 Partial<StoreDocument> for the seed runner
|
|
10
11
|
*
|
|
11
12
|
* @tag domain:stores
|
|
12
13
|
* @tag layer:seed
|
|
@@ -155,53 +156,7 @@ const _rawstoresSeedData = [
|
|
|
155
156
|
createdAt: daysAgo(150),
|
|
156
157
|
updatedAt: daysAgo(4),
|
|
157
158
|
},
|
|
158
|
-
// ── Store 3:
|
|
159
|
-
{
|
|
160
|
-
id: "store-tester-qa-seller",
|
|
161
|
-
storeSlug: "store-tester-qa-seller",
|
|
162
|
-
ownerId: "user-tester-qa",
|
|
163
|
-
storeName: "Tester QA Seller Store",
|
|
164
|
-
storeDescription: "Personal seller store for the dedicated QA tester account — used to exercise seller-side flows (listing, orders, payouts) from the Tester Hub checklist.",
|
|
165
|
-
storeCategory: "category-spinning-tops",
|
|
166
|
-
storeLogoURL: seedPhoto("store-logo-tester-qa-seller-20260101", 400, 400),
|
|
167
|
-
storeBannerURL: seedPhoto("store-banner-tester-qa-seller-20260101", 1600, 400),
|
|
168
|
-
status: STORE_FIELDS.STATUS_VALUES.ACTIVE,
|
|
169
|
-
bio: "QA tester's own seller store — auto-approved via the isTester flag.",
|
|
170
|
-
location: "Bengaluru, Karnataka, India",
|
|
171
|
-
returnPolicy: "N/A — QA test store.",
|
|
172
|
-
shippingPolicy: "N/A — QA test store.",
|
|
173
|
-
shippingConfig: {
|
|
174
|
-
defaultProviderId: "provider-tester-standard",
|
|
175
|
-
providers: [
|
|
176
|
-
{ providerId: "provider-tester-standard", label: "Standard", type: "custom", fee: { flat: 49, freeAbove: 999 }, etaDaysMin: 3, etaDaysMax: 5, requiresAwbUpload: true },
|
|
177
|
-
],
|
|
178
|
-
},
|
|
179
|
-
isPublic: true,
|
|
180
|
-
isVacationMode: false,
|
|
181
|
-
/*
|
|
182
|
-
* Reachable, but never advertised to search engines.
|
|
183
|
-
*
|
|
184
|
-
* This is a QA store — real enough for a tester to exercise seller flows
|
|
185
|
-
* against, and not something that belongs in Google's index. `isTestData`
|
|
186
|
-
* is what the codebase already uses to express that: the sitemap's store
|
|
187
|
-
* fetcher filters it out (it has no viewer), public store listings hide
|
|
188
|
-
* it, and `canViewTestData()` keeps it visible to testers and admins — so
|
|
189
|
-
* the checklist case linking to `/stores/store-tester-qa-seller` still
|
|
190
|
-
* resolves.
|
|
191
|
-
*
|
|
192
|
-
* 🛑 NOTE the deliberate absence of `testDataExpiresAt`. Every sandbox
|
|
193
|
-
* FIXTURE carries one; this store is permanent. `getTestDataRefs` skips
|
|
194
|
-
* docs without an expiry on the force-purge path precisely so
|
|
195
|
-
* `tester:purge-sandbox --force` cannot delete it. Do not add an expiry
|
|
196
|
-
* here — that would put a permanent seed store in range of the sweep.
|
|
197
|
-
*/
|
|
198
|
-
isTestData: true,
|
|
199
|
-
stats: { totalProducts: 0, itemsSold: 0, totalReviews: 0, averageRating: 0 },
|
|
200
|
-
capabilities: ["host_preorders", "verified_seller", "create_coupons"],
|
|
201
|
-
createdAt: daysAgo(1),
|
|
202
|
-
updatedAt: daysAgo(1),
|
|
203
|
-
},
|
|
204
|
-
// ── Store 4: pending seller application ───────────────────────────────────
|
|
159
|
+
// ── Store 3: pending seller application ───────────────────────────────────
|
|
205
160
|
// `StoreStatus` is pending|active|suspended|rejected, but every seeded store
|
|
206
161
|
// was `active` — so three of the four admin status chips could only ever
|
|
207
162
|
// return an empty list, and the seller-approval queue had nothing in it.
|
|
@@ -230,7 +185,7 @@ const _rawstoresSeedData = [
|
|
|
230
185
|
createdAt: daysAgo(4),
|
|
231
186
|
updatedAt: daysAgo(4),
|
|
232
187
|
},
|
|
233
|
-
// ── Store
|
|
188
|
+
// ── Store 4: suspended store ──────────────────────────────────────────────
|
|
234
189
|
// Exercises `suspensionReason`, which no seeded row populated, and gives the
|
|
235
190
|
// admin "Suspended" chip a row.
|
|
236
191
|
{
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* WHY: Provides
|
|
3
|
-
* WHAT: Exports
|
|
4
|
-
*
|
|
5
|
-
* (`user-claude-tester`, isBot), and 2 employees on contrasting permission presets.
|
|
2
|
+
* WHY: Provides 19 seed user accounts covering all marketplace roles and demographics.
|
|
3
|
+
* WHAT: Exports 19 UserDocument partials — 1 admin, 1 seller (store owner), 15 buyers, and
|
|
4
|
+
* 2 employees on contrasting permission presets.
|
|
6
5
|
* All passwords are TempPass123! in the Firebase Auth emulator. UIDs match slugs.
|
|
7
6
|
*
|
|
8
7
|
* 🛑 seed-cli sets that password ONLY when it creates the Auth record. A re-seed
|
|
@@ -492,85 +491,6 @@ export const usersSeedData = [
|
|
|
492
491
|
createdAt: daysAgo(110),
|
|
493
492
|
updatedAt: daysAgo(3),
|
|
494
493
|
},
|
|
495
|
-
// ── Tester QA account (role stays "seller" — isTester unlocks Tester Hub + auto-approved store) ──
|
|
496
|
-
{
|
|
497
|
-
uid: "user-tester-qa",
|
|
498
|
-
email: "tester@letitrip.in",
|
|
499
|
-
phoneNumber: `${_ph}9999900018`,
|
|
500
|
-
phoneVerified: true,
|
|
501
|
-
displayName: "Mock User 18",
|
|
502
|
-
photoURL: seedPhoto("user-avatar-qa-tester-20260101", 400, 400),
|
|
503
|
-
role: USER_FIELDS.ROLE_VALUES.SELLER,
|
|
504
|
-
isTester: true,
|
|
505
|
-
emailVerified: true,
|
|
506
|
-
disabled: false,
|
|
507
|
-
storeId: "store-tester-qa-seller",
|
|
508
|
-
storeSlug: "store-tester-qa-seller",
|
|
509
|
-
storeStatus: "approved",
|
|
510
|
-
payoutDetails: {
|
|
511
|
-
method: "upi",
|
|
512
|
-
upiId: "tester-qa@upi",
|
|
513
|
-
isConfigured: true,
|
|
514
|
-
},
|
|
515
|
-
publicProfile: {
|
|
516
|
-
isPublic: true,
|
|
517
|
-
showEmail: false,
|
|
518
|
-
showPhone: false,
|
|
519
|
-
showOrders: false,
|
|
520
|
-
showWishlist: false,
|
|
521
|
-
bio: "Dedicated QA tester account for the Tester QA Program — runs through the checklist against the shared test sandbox.",
|
|
522
|
-
location: "Bengaluru, Karnataka",
|
|
523
|
-
storeName: "Tester QA Seller Store",
|
|
524
|
-
storeCategory: "category-spinning-tops",
|
|
525
|
-
},
|
|
526
|
-
stats: { totalOrders: 0, auctionsWon: 0, itemsSold: 0, reviewsCount: 0 },
|
|
527
|
-
metadata: { lastSignInTime: daysAgo(1), creationTime: daysAgo(1).toISOString(), loginCount: 5 },
|
|
528
|
-
createdAt: daysAgo(1),
|
|
529
|
-
updatedAt: daysAgo(1),
|
|
530
|
-
},
|
|
531
|
-
// ── Automated tester (the Claude-driven checklist runner answers as this account) ──
|
|
532
|
-
// `canTestAdmin` is REQUIRED, not decorative: 116 checklist cases are adminOnly and
|
|
533
|
-
// GET/PUT /api/user/tester-checklist 404s them for a caller without it, so the runner
|
|
534
|
-
// would silently see a shorter catalog than a human tester does.
|
|
535
|
-
// `isBot` keeps it off the public Bug Hunters leaderboard — see getBugHunterLeaderboard().
|
|
536
|
-
{
|
|
537
|
-
uid: "user-claude-tester",
|
|
538
|
-
email: "claude-tester@letitrip.in",
|
|
539
|
-
phoneNumber: `${_ph}9999900019`,
|
|
540
|
-
phoneVerified: true,
|
|
541
|
-
displayName: "Claude (automated)",
|
|
542
|
-
photoURL: seedPhoto("user-avatar-claude-tester-20260101", 400, 400),
|
|
543
|
-
role: USER_FIELDS.ROLE_VALUES.SELLER,
|
|
544
|
-
isTester: true,
|
|
545
|
-
canTestAdmin: true,
|
|
546
|
-
isBot: true,
|
|
547
|
-
emailVerified: true,
|
|
548
|
-
disabled: false,
|
|
549
|
-
// 🛑 This MUST name a store whose own `ownerId` is this uid. It used to say
|
|
550
|
-
// "store-tester-qa-seller", which is owned by `user-tester-qa` — so the app, which
|
|
551
|
-
// resolves sellers by `ownerId`, answered every /api/store/* call with 403
|
|
552
|
-
// "No store found for this account" while the client, reading `role` and `storeId`
|
|
553
|
-
// off this document, rendered the entire Store Panel over it. 36 checklist cases were
|
|
554
|
-
// blocked by that one-way pointer (measured, run 1789300124915).
|
|
555
|
-
// See stores-tester-seed-data.ts for why the shared sandbox could not simply be
|
|
556
|
-
// repointed at this account instead.
|
|
557
|
-
storeId: "store-claude-tester",
|
|
558
|
-
storeSlug: "store-claude-tester",
|
|
559
|
-
storeStatus: "approved",
|
|
560
|
-
publicProfile: {
|
|
561
|
-
isPublic: false,
|
|
562
|
-
showEmail: false,
|
|
563
|
-
showPhone: false,
|
|
564
|
-
showOrders: false,
|
|
565
|
-
showWishlist: false,
|
|
566
|
-
bio: "Automated tester. Works the tester checklist against a freshly seeded catalog and records a verdict per case.",
|
|
567
|
-
location: "Bengaluru, Karnataka",
|
|
568
|
-
},
|
|
569
|
-
stats: { totalOrders: 0, auctionsWon: 0, itemsSold: 0, reviewsCount: 0 },
|
|
570
|
-
metadata: { lastSignInTime: daysAgo(1), creationTime: daysAgo(1).toISOString(), loginCount: 1 },
|
|
571
|
-
createdAt: daysAgo(1),
|
|
572
|
-
updatedAt: daysAgo(1),
|
|
573
|
-
},
|
|
574
494
|
// ── Employees: two contrasting permission presets ───────────────────────────
|
|
575
495
|
// These exist so the sidebar-scoping checklist cases can be tested AT ALL. Before
|
|
576
496
|
// this the seed had no `role: "employee"` account anywhere, so the case the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mohasinac/appkit",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.41.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
},
|
|
152
152
|
"scripts": {
|
|
153
153
|
"postinstall": "node scripts/dedupe-peer-deps.mjs",
|
|
154
|
-
"build": "node scripts/dedupe-peer-deps.mjs && node -e \"const fs=require('fs');
|
|
154
|
+
"build": "node scripts/dedupe-peer-deps.mjs && node -e \"const fs=require('fs');for(const t of ['tsconfig.build.tsbuildinfo','dist']){try{fs.rmSync(t,{recursive:true})}catch(e){}}\" && tsc -p tsconfig.build.json && node scripts/copy-assets.mjs && tailwindcss -i src/tailwind-input.css -o dist/tailwind-utilities.css --minify && node scripts/bundle-css.mjs && node scripts/verify-css-build.mjs",
|
|
155
155
|
"prepublishOnly": "npm run build",
|
|
156
156
|
"watch": "concurrently --kill-others --restart-tries 0 --names \"ts,css\" \"tsc -p tsconfig.build.json --watch\" \"npm run watch:css\"",
|
|
157
157
|
"watch:css": "tailwindcss -i src/tailwind-input.css -o dist/tailwind-utilities.css --watch",
|
package/scripts/seed-cli.mjs
CHANGED
|
@@ -192,12 +192,9 @@ const {
|
|
|
192
192
|
wishlistsSeedData, historySeedData,
|
|
193
193
|
groupedListingsSeedData,
|
|
194
194
|
scammersSeedData, productFeaturesSeedData,
|
|
195
|
-
testerChecklistSeedData, testerResponsesSeedData,
|
|
195
|
+
testerChecklistSeedData, testerResponsesSeedData,
|
|
196
196
|
supportTicketsSeedData, catalogueSeedData,
|
|
197
197
|
shipmentsSeedData, shipmentLotsSeedData, shipmentItemsSeedData,
|
|
198
|
-
storesTesterSeedData, categoriesTesterSeedData, productsTesterSeedData,
|
|
199
|
-
blogTesterSeedData, eventsTesterSeedData,
|
|
200
|
-
couponsTesterSeedData, bidsTesterSeedData, ordersTesterSeedData,
|
|
201
198
|
// collection constants
|
|
202
199
|
USER_COLLECTION,
|
|
203
200
|
CATEGORIES_COLLECTION, STORE_COLLECTION,
|
|
@@ -286,8 +283,8 @@ const SEED_DATA_MAP = {
|
|
|
286
283
|
storeAddresses: storeAddressesSeedData,
|
|
287
284
|
// SB-UNI-C: brands were merged into categories (categoryType:"brand") — no
|
|
288
285
|
// standalone brands collection/seed exists anymore.
|
|
289
|
-
categories:
|
|
290
|
-
stores:
|
|
286
|
+
categories: categoriesSeedData,
|
|
287
|
+
stores: storesSeedData,
|
|
291
288
|
products: [
|
|
292
289
|
...(productsStandardSeedData || []), ...(productsAuctionsSeedData || []), ...(productsPreordersSeedData || []),
|
|
293
290
|
...(productsPrizeDrawsSeedData || []), ...(productsClassifiedsSeedData || []), ...(productsDigitalCodesSeedData || []), ...(productsLiveItemsSeedData || []),
|
|
@@ -296,12 +293,11 @@ const SEED_DATA_MAP = {
|
|
|
296
293
|
// /stickers were permanently empty, and listingType=art|stickers returned 0.
|
|
297
294
|
// Root Cause #58's family one layer down: added everywhere except the runner.
|
|
298
295
|
...(productsArtSeedData || []), ...(productsStickersSeedData || []),
|
|
299
|
-
...(productsTesterSeedData || []),
|
|
300
296
|
],
|
|
301
|
-
orders:
|
|
297
|
+
orders: ordersSeedData,
|
|
302
298
|
reviews: reviewsSeedData,
|
|
303
|
-
bids:
|
|
304
|
-
coupons:
|
|
299
|
+
bids: bidsSeedData,
|
|
300
|
+
coupons: couponsSeedData,
|
|
305
301
|
couponUsage: couponUsageSeedData,
|
|
306
302
|
carousels: carouselsSeedData,
|
|
307
303
|
carouselSlides: carouselSlidesSeedData,
|
|
@@ -310,13 +306,12 @@ const SEED_DATA_MAP = {
|
|
|
310
306
|
faqs: faqSeedData,
|
|
311
307
|
notifications: notificationsSeedData,
|
|
312
308
|
payouts: payoutsSeedData,
|
|
313
|
-
//
|
|
314
|
-
//
|
|
315
|
-
//
|
|
316
|
-
//
|
|
317
|
-
//
|
|
318
|
-
|
|
319
|
-
offers: [...(offersSeedData ?? []), ...(offersTesterSeedData ?? [])],
|
|
309
|
+
// The LOADER was missing for a long time, so `offers` never appeared in
|
|
310
|
+
// `appkit-seed status` and no run had an offer in Firestore. OFFER_PII_FIELDS
|
|
311
|
+
// was already imported and mapped below -- the PII half was wired and the
|
|
312
|
+
// loading half never was, which is why the gap looked like support rather
|
|
313
|
+
// than an omission.
|
|
314
|
+
offers: offersSeedData,
|
|
320
315
|
// All four were unregistered like offers, all measured at 0 documents live.
|
|
321
316
|
// They are UNLISTED in the tester's tier map, which means PRESERVE -- so
|
|
322
317
|
// seeding them once persists across every future run rather than being
|
|
@@ -326,11 +321,11 @@ const SEED_DATA_MAP = {
|
|
|
326
321
|
procurementShipments: shipmentsSeedData,
|
|
327
322
|
shipmentLots: shipmentLotsSeedData,
|
|
328
323
|
shipmentItems: shipmentItemsSeedData,
|
|
329
|
-
blogPosts:
|
|
330
|
-
events:
|
|
324
|
+
blogPosts: blogPostsSeedData,
|
|
325
|
+
events: eventsSeedData,
|
|
331
326
|
eventEntries: eventEntriesSeedData,
|
|
332
327
|
sessions: sessionsSeedData,
|
|
333
|
-
carts:
|
|
328
|
+
carts: cartsSeedData,
|
|
334
329
|
wishlists: wishlistsSeedData,
|
|
335
330
|
history: historySeedData,
|
|
336
331
|
groupedListings: groupedListingsSeedData,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type ActionResult } from "@mohasinac/appkit/server";
|
|
2
|
-
import type { ConversationDocument } from "../../../../features/messages/schemas/firestore";
|
|
3
|
-
export interface StartConversationInput {
|
|
4
|
-
productId: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Open (or resume) a buyer↔seller conversation for a classified listing.
|
|
8
|
-
* Called when the buyer clicks "Contact Seller" on the classified PDP.
|
|
9
|
-
* Idempotent — returns the existing conversation if one already exists for
|
|
10
|
-
* this buyer × store × product tuple.
|
|
11
|
-
*/
|
|
12
|
-
export declare function startClassifiedConversationAction(input: StartConversationInput): Promise<ActionResult<ConversationDocument>>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use server";
|
|
2
|
-
import { wrapAction } from "@mohasinac/appkit/server";
|
|
3
|
-
import { conversationsRepository } from "../../../../features/messages/repository/conversations.repository";
|
|
4
|
-
import { requireRoleUser } from "../../../../providers/auth-firebase/helpers";
|
|
5
|
-
import { storeRepository, productRepository } from "../../../../repositories";
|
|
6
|
-
/**
|
|
7
|
-
* Open (or resume) a buyer↔seller conversation for a classified listing.
|
|
8
|
-
* Called when the buyer clicks "Contact Seller" on the classified PDP.
|
|
9
|
-
* Idempotent — returns the existing conversation if one already exists for
|
|
10
|
-
* this buyer × store × product tuple.
|
|
11
|
-
*/
|
|
12
|
-
export async function startClassifiedConversationAction(input) {
|
|
13
|
-
return wrapAction(async () => {
|
|
14
|
-
const user = await requireRoleUser(["user", "buyer", "seller", "admin"]);
|
|
15
|
-
const product = await productRepository.findByIdOrSlug(input.productId);
|
|
16
|
-
if (!product || product.listingType !== "classified") {
|
|
17
|
-
throw new Error("Product not found or not a classified listing");
|
|
18
|
-
}
|
|
19
|
-
const store = await storeRepository.findById(product.storeId);
|
|
20
|
-
if (!store) {
|
|
21
|
-
throw new Error("Store not found");
|
|
22
|
-
}
|
|
23
|
-
return conversationsRepository.findOrCreateByContext({
|
|
24
|
-
buyerId: user.uid,
|
|
25
|
-
buyerDisplayName: user.name ?? user.email ?? user.uid,
|
|
26
|
-
storeId: product.storeId,
|
|
27
|
-
storeName: store.storeName,
|
|
28
|
-
sellerDisplayName: store.storeName,
|
|
29
|
-
productId: product.id,
|
|
30
|
-
productTitle: product.title,
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type ActionResult } from "@mohasinac/appkit/server";
|
|
2
|
-
import type { ConversationDocument } from "../../../../features/messages/schemas/firestore";
|
|
3
|
-
export interface StartDigitalCodeConversationInput {
|
|
4
|
-
productId: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Open a buyer↔seller conversation for a digital-code listing (questions
|
|
8
|
-
* about platform/region/edition before purchase). Post-purchase code reveal
|
|
9
|
-
* is handled by the existing `/api/orders/[id]/code` endpoint, not a server
|
|
10
|
-
* action — the code reveal panel lives in the order detail view.
|
|
11
|
-
*/
|
|
12
|
-
export declare function startDigitalCodeConversationAction(input: StartDigitalCodeConversationInput): Promise<ActionResult<ConversationDocument>>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use server";
|
|
2
|
-
import { wrapAction } from "@mohasinac/appkit/server";
|
|
3
|
-
import { conversationsRepository } from "../../../../features/messages/repository/conversations.repository";
|
|
4
|
-
import { requireRoleUser } from "../../../../providers/auth-firebase/helpers";
|
|
5
|
-
import { storeRepository, productRepository } from "../../../../repositories";
|
|
6
|
-
/**
|
|
7
|
-
* Open a buyer↔seller conversation for a digital-code listing (questions
|
|
8
|
-
* about platform/region/edition before purchase). Post-purchase code reveal
|
|
9
|
-
* is handled by the existing `/api/orders/[id]/code` endpoint, not a server
|
|
10
|
-
* action — the code reveal panel lives in the order detail view.
|
|
11
|
-
*/
|
|
12
|
-
export async function startDigitalCodeConversationAction(input) {
|
|
13
|
-
return wrapAction(async () => {
|
|
14
|
-
const user = await requireRoleUser(["user", "buyer", "seller", "admin"]);
|
|
15
|
-
const product = await productRepository.findByIdOrSlug(input.productId);
|
|
16
|
-
if (!product || product.listingType !== "digital-code") {
|
|
17
|
-
throw new Error("Product not found or not a digital-code listing");
|
|
18
|
-
}
|
|
19
|
-
const store = await storeRepository.findById(product.storeId);
|
|
20
|
-
if (!store) {
|
|
21
|
-
throw new Error("Store not found");
|
|
22
|
-
}
|
|
23
|
-
return conversationsRepository.findOrCreateByContext({
|
|
24
|
-
buyerId: user.uid,
|
|
25
|
-
buyerDisplayName: user.name ?? user.email ?? user.uid,
|
|
26
|
-
storeId: product.storeId,
|
|
27
|
-
storeName: store.storeName,
|
|
28
|
-
sellerDisplayName: store.storeName,
|
|
29
|
-
productId: product.id,
|
|
30
|
-
productTitle: product.title,
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare const getHomepageSections: () => Promise<import("../../../..").HomepageSectionDocument[]>;
|
|
2
|
-
export declare const getHeroCarouselSlides: () => Promise<never[] | import("../../../..").CarouselSlideDocument[]>;
|
|
3
|
-
/**
|
|
4
|
-
* One parallel fetch returning every piece of data the homepage sections need.
|
|
5
|
-
* Page components call this once; React.cache() deduplicates per request.
|
|
6
|
-
*/
|
|
7
|
-
export declare const getHomepageInitial: () => Promise<{
|
|
8
|
-
sections: import("../../../..").HomepageSectionDocument[];
|
|
9
|
-
carouselSlides: never[] | import("../../../..").CarouselSlideDocument[];
|
|
10
|
-
featuredProducts: never[] | import("../../../..").ProductDocument[];
|
|
11
|
-
activeAuctions: never[] | import("../../../..").ProductDocument[];
|
|
12
|
-
activePreOrders: never[] | import("../../../..").ProductDocument[];
|
|
13
|
-
activeBrands: never[] | import("../../../..").CategoryDocument[];
|
|
14
|
-
featuredReviews: never[] | import("../../../..").ReviewDocument[];
|
|
15
|
-
recentBlogPosts: never[] | import("../../../..").BlogPostDocument[];
|
|
16
|
-
activeEvents: never[] | import("../../../..").EventDocument[];
|
|
17
|
-
featuredCategories: never[] | import("../../../..").CategoryDocument[];
|
|
18
|
-
}>;
|