@mohasinac/appkit 3.0.4 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/client/features/lottery/LotteryAdminEditView.d.ts +42 -0
- package/dist/_internal/client/features/lottery/LotteryAdminEditView.js +86 -0
- package/dist/_internal/client/features/lottery/LotteryAdminSlotView.d.ts +14 -0
- package/dist/_internal/client/features/lottery/LotteryAdminSlotView.js +46 -0
- package/dist/_internal/client/features/lottery/LotteryDetailView.d.ts +28 -0
- package/dist/_internal/client/features/lottery/LotteryDetailView.js +17 -0
- package/dist/_internal/client/features/lottery/LotteryEntriesView.d.ts +23 -0
- package/dist/_internal/client/features/lottery/LotteryEntriesView.js +58 -0
- package/dist/_internal/client/features/lottery/LotteryListView.d.ts +21 -0
- package/dist/_internal/client/features/lottery/LotteryListView.js +25 -0
- package/dist/_internal/client/features/lottery/LotteryPullForm.d.ts +19 -0
- package/dist/_internal/client/features/lottery/LotteryPullForm.js +65 -0
- package/dist/_internal/client/features/lottery/LotterySlotGrid.d.ts +13 -0
- package/dist/_internal/client/features/lottery/LotterySlotGrid.js +21 -0
- package/dist/_internal/client/features/lottery/PrizeDrawLotteryDetailView.d.ts +28 -0
- package/dist/_internal/client/features/lottery/PrizeDrawLotteryDetailView.js +18 -0
- package/dist/_internal/server/features/auctions/__tests__/service.test.d.ts +1 -0
- package/dist/_internal/server/features/auctions/__tests__/service.test.js +140 -0
- package/dist/_internal/server/features/auctions/data.d.ts +2 -4
- package/dist/_internal/server/features/auctions/data.js +3 -9
- package/dist/_internal/server/features/checkout/__tests__/actions.test.d.ts +1 -0
- package/dist/_internal/server/features/checkout/__tests__/actions.test.js +600 -0
- package/dist/_internal/server/features/classified/adapters.d.ts +2 -15
- package/dist/_internal/server/features/classified/adapters.js +2 -17
- package/dist/_internal/server/features/classified/data.d.ts +1 -6
- package/dist/_internal/server/features/classified/data.js +2 -10
- package/dist/_internal/server/features/digital-code/adapters.d.ts +2 -15
- package/dist/_internal/server/features/digital-code/adapters.js +2 -17
- package/dist/_internal/server/features/digital-code/data.d.ts +1 -6
- package/dist/_internal/server/features/digital-code/data.js +2 -10
- package/dist/_internal/server/features/live/adapters.d.ts +2 -15
- package/dist/_internal/server/features/live/adapters.js +2 -17
- package/dist/_internal/server/features/live/data.d.ts +1 -6
- package/dist/_internal/server/features/live/data.js +2 -10
- package/dist/_internal/server/features/lottery/actions.d.ts +43 -0
- package/dist/_internal/server/features/lottery/actions.js +243 -0
- package/dist/_internal/server/features/lottery/adapters.d.ts +9 -0
- package/dist/_internal/server/features/lottery/adapters.js +21 -0
- package/dist/_internal/server/features/lottery/data.d.ts +20 -0
- package/dist/_internal/server/features/lottery/data.js +41 -0
- package/dist/_internal/server/features/lottery/metadata.d.ts +6 -0
- package/dist/_internal/server/features/lottery/metadata.js +31 -0
- package/dist/_internal/server/features/pre-orders/data.d.ts +2 -4
- package/dist/_internal/server/features/pre-orders/data.js +3 -9
- package/dist/_internal/server/features/prize-draws/actions.d.ts +2 -0
- package/dist/_internal/server/features/prize-draws/actions.js +22 -0
- package/dist/_internal/server/features/prize-draws/data.d.ts +1 -17
- package/dist/_internal/server/features/prize-draws/data.js +2 -20
- package/dist/_internal/server/features/prize-draws/index.d.ts +3 -1
- package/dist/_internal/server/features/prize-draws/index.js +2 -0
- package/dist/_internal/server/features/prize-draws/service.d.ts +3 -0
- package/dist/_internal/server/features/prize-draws/service.js +19 -0
- package/dist/_internal/server/features/refunds/__tests__/actions.test.d.ts +1 -0
- package/dist/_internal/server/features/refunds/__tests__/actions.test.js +263 -0
- package/dist/_internal/server/features/shared/listing-adapters.d.ts +19 -0
- package/dist/_internal/server/features/shared/listing-adapters.js +20 -0
- package/dist/_internal/server/features/shared/listing-data-factory.d.ts +9 -0
- package/dist/_internal/server/features/shared/listing-data-factory.js +33 -0
- package/dist/_internal/server/features/stores/data.d.ts +3 -14
- package/dist/_internal/server/features/stores/data.js +6 -44
- package/dist/_internal/server/jobs/core/__tests__/auctionSettlement.test.d.ts +1 -0
- package/dist/_internal/server/jobs/core/__tests__/auctionSettlement.test.js +249 -0
- package/dist/_internal/server/jobs/core/__tests__/onBidPlaced.test.d.ts +1 -0
- package/dist/_internal/server/jobs/core/__tests__/onBidPlaced.test.js +201 -0
- package/dist/_internal/server/jobs/core/__tests__/onOrderCreate.test.d.ts +1 -0
- package/dist/_internal/server/jobs/core/__tests__/onOrderCreate.test.js +169 -0
- package/dist/_internal/server/jobs/core/__tests__/onOrderStatusChange.test.d.ts +1 -0
- package/dist/_internal/server/jobs/core/__tests__/onOrderStatusChange.test.js +148 -0
- package/dist/_internal/server/jobs/core/__tests__/onProductStockChange.test.d.ts +1 -0
- package/dist/_internal/server/jobs/core/__tests__/onProductStockChange.test.js +210 -0
- package/dist/_internal/server/jobs/core/__tests__/onReviewWrite.test.d.ts +1 -0
- package/dist/_internal/server/jobs/core/__tests__/onReviewWrite.test.js +190 -0
- package/dist/_internal/server/jobs/core/__tests__/onUserBanChange.test.d.ts +1 -0
- package/dist/_internal/server/jobs/core/__tests__/onUserBanChange.test.js +161 -0
- package/dist/_internal/server/jobs/core/__tests__/payoutBatch.test.d.ts +1 -0
- package/dist/_internal/server/jobs/core/__tests__/payoutBatch.test.js +302 -0
- package/dist/_internal/server/jobs/core/__tests__/triggerEventRaffle.test.d.ts +1 -0
- package/dist/_internal/server/jobs/core/__tests__/triggerEventRaffle.test.js +252 -0
- package/dist/_internal/server/jobs/core/__tests__/wrapJobHandler.test.d.ts +1 -0
- package/dist/_internal/server/jobs/core/__tests__/wrapJobHandler.test.js +129 -0
- package/dist/_internal/shared/actions/action-registry.d.ts +1 -1
- package/dist/_internal/shared/actions/action-registry.js +46 -0
- package/dist/_internal/shared/features/cart/schema.d.ts +8 -8
- package/dist/_internal/shared/features/cart/schema.js +3 -0
- package/dist/_internal/shared/features/products/schema.d.ts +8 -8
- package/dist/_internal/shared/listing-types/_registry.js +2 -0
- package/dist/_internal/shared/listing-types/auction/schema.d.ts +3 -1
- package/dist/_internal/shared/listing-types/auction/schema.js +7 -1
- package/dist/_internal/shared/listing-types/classified/schema.d.ts +2 -1
- package/dist/_internal/shared/listing-types/classified/schema.js +3 -1
- package/dist/_internal/shared/listing-types/digital-code/schema.d.ts +3 -1
- package/dist/_internal/shared/listing-types/digital-code/schema.js +7 -1
- package/dist/_internal/shared/listing-types/live/schema.d.ts +2 -1
- package/dist/_internal/shared/listing-types/live/schema.js +3 -1
- package/dist/_internal/shared/listing-types/pre-order/schema.d.ts +3 -1
- package/dist/_internal/shared/listing-types/pre-order/schema.js +7 -1
- package/dist/_internal/shared/listing-types/prize-draw/schema.d.ts +3 -1
- package/dist/_internal/shared/listing-types/prize-draw/schema.js +13 -1
- package/dist/_internal/shared/listing-types/standard/schema.d.ts +2 -1
- package/dist/_internal/shared/listing-types/standard/schema.js +4 -1
- package/dist/_internal/shared/types/base-document.d.ts +15 -0
- package/dist/_internal/shared/types/base-document.js +1 -0
- package/dist/_internal/shared/types/index.d.ts +2 -0
- package/dist/_internal/shared/types/index.js +1 -0
- package/dist/client.d.ts +13 -4
- package/dist/client.js +11 -2
- package/dist/constants/api-endpoints.d.ts +12 -0
- package/dist/constants/api-endpoints.js +4 -0
- package/dist/constants/field-names.d.ts +5 -1
- package/dist/constants/field-names.js +5 -1
- package/dist/features/addresses/repository/__tests__/addresses.repository.test.d.ts +1 -0
- package/dist/features/addresses/repository/__tests__/addresses.repository.test.js +386 -0
- package/dist/features/addresses/schemas/firestore.d.ts +2 -4
- package/dist/features/admin/api/bids/route.d.ts +2 -2
- package/dist/features/admin/api/coupons/route.d.ts +2 -2
- package/dist/features/admin/api/products/route.d.ts +2 -2
- package/dist/features/admin/api/reviews/route.d.ts +2 -2
- package/dist/features/admin/components/AdminFulfillmentView.d.ts +6 -0
- package/dist/features/admin/components/AdminFulfillmentView.js +107 -0
- package/dist/features/admin/components/AdminProductEditorView.js +21 -9
- package/dist/features/admin/components/AdminProductsView.js +3 -0
- package/dist/features/admin/components/DataListingView.d.ts +1 -0
- package/dist/features/admin/components/index.d.ts +2 -0
- package/dist/features/admin/components/index.js +1 -0
- package/dist/features/admin/repository/__tests__/notification.repository.test.d.ts +1 -0
- package/dist/features/admin/repository/__tests__/notification.repository.test.js +356 -0
- package/dist/features/admin/repository/__tests__/site-settings.repository.test.d.ts +1 -0
- package/dist/features/admin/repository/__tests__/site-settings.repository.test.js +298 -0
- package/dist/features/admin/schemas/firestore.d.ts +3 -8
- package/dist/features/auctions/repository/__tests__/bid.repository.test.d.ts +1 -0
- package/dist/features/auctions/repository/__tests__/bid.repository.test.js +290 -0
- package/dist/features/auctions/schemas/firestore.d.ts +2 -4
- package/dist/features/auctions/schemas/index.d.ts +2 -2
- package/dist/features/auth/api/route.d.ts +2 -2
- package/dist/features/auth/repository/__tests__/session.repository.test.d.ts +1 -0
- package/dist/features/auth/repository/__tests__/session.repository.test.js +310 -0
- package/dist/features/auth/repository/__tests__/session.test.d.ts +1 -0
- package/dist/features/auth/repository/__tests__/session.test.js +146 -0
- package/dist/features/auth/repository/__tests__/sms-counter.repository.test.d.ts +1 -0
- package/dist/features/auth/repository/__tests__/sms-counter.repository.test.js +171 -0
- package/dist/features/auth/repository/__tests__/sms-counter.test.d.ts +1 -0
- package/dist/features/auth/repository/__tests__/sms-counter.test.js +88 -0
- package/dist/features/auth/repository/__tests__/token.repository.test.d.ts +1 -0
- package/dist/features/auth/repository/__tests__/token.repository.test.js +260 -0
- package/dist/features/auth/repository/__tests__/token.test.d.ts +1 -0
- package/dist/features/auth/repository/__tests__/token.test.js +140 -0
- package/dist/features/auth/repository/__tests__/user.repository.test.d.ts +1 -0
- package/dist/features/auth/repository/__tests__/user.repository.test.js +352 -0
- package/dist/features/auth/repository/__tests__/user.test.d.ts +1 -0
- package/dist/features/auth/repository/__tests__/user.test.js +226 -0
- package/dist/features/auth/repository/session.repository.js +10 -1
- package/dist/features/before-after/schemas/index.d.ts +2 -2
- package/dist/features/blog/schemas/firestore.d.ts +2 -4
- package/dist/features/blog/schemas/index.d.ts +4 -4
- package/dist/features/cart/repository/__tests__/cart.repository.test.d.ts +1 -0
- package/dist/features/cart/repository/__tests__/cart.repository.test.js +371 -0
- package/dist/features/cart/repository/cart.repository.js +2 -2
- package/dist/features/cart/schemas/firestore.d.ts +2 -4
- package/dist/features/categories/api/[id]/route.d.ts +4 -4
- package/dist/features/categories/api/route.d.ts +2 -2
- package/dist/features/categories/repository/__tests__/categories.repository.test.d.ts +1 -0
- package/dist/features/categories/repository/__tests__/categories.repository.test.js +813 -0
- package/dist/features/categories/schemas/firestore.d.ts +2 -4
- package/dist/features/categories/schemas/index.d.ts +4 -4
- package/dist/features/events/components/EventCard.js +1 -0
- package/dist/features/events/repository/__tests__/event.repository.test.d.ts +1 -0
- package/dist/features/events/repository/__tests__/event.repository.test.js +299 -0
- package/dist/features/events/schemas/firestore.d.ts +5 -4
- package/dist/features/events/schemas/index.d.ts +836 -16
- package/dist/features/events/schemas/index.js +80 -1
- package/dist/features/events/types/index.d.ts +4 -1
- package/dist/features/faq/repository/__tests__/faqs.repository.test.d.ts +1 -0
- package/dist/features/faq/repository/__tests__/faqs.repository.test.js +311 -0
- package/dist/features/faq/schemas/firestore.d.ts +2 -4
- package/dist/features/faq/schemas/index.d.ts +2 -2
- package/dist/features/grouped/schemas/index.d.ts +2 -2
- package/dist/features/history/repository/__tests__/user-history.repository.test.d.ts +1 -0
- package/dist/features/history/repository/__tests__/user-history.repository.test.js +180 -0
- package/dist/features/homepage/api/[id]/route.d.ts +4 -4
- package/dist/features/homepage/api/carousel/[id]/route.d.ts +4 -4
- package/dist/features/homepage/api/carousel/route.d.ts +2 -2
- package/dist/features/homepage/api/route.d.ts +2 -2
- package/dist/features/homepage/repository/__tests__/carousel.repository.test.d.ts +1 -0
- package/dist/features/homepage/repository/__tests__/carousel.repository.test.js +182 -0
- package/dist/features/homepage/repository/__tests__/homepage-sections.repository.test.d.ts +1 -0
- package/dist/features/homepage/repository/__tests__/homepage-sections.repository.test.js +185 -0
- package/dist/features/homepage/schemas/firestore.d.ts +4 -12
- package/dist/features/homepage/schemas/index.d.ts +2 -2
- package/dist/features/lottery/repository/lottery-entry.repository.d.ts +33 -0
- package/dist/features/lottery/repository/lottery-entry.repository.js +130 -0
- package/dist/features/lottery/schemas/firestore.d.ts +49 -0
- package/dist/features/lottery/schemas/firestore.js +25 -0
- package/dist/features/lottery/schemas/zod.d.ts +113 -0
- package/dist/features/lottery/schemas/zod.js +39 -0
- package/dist/features/lottery/types/index.d.ts +67 -0
- package/dist/features/lottery/types/index.js +55 -0
- package/dist/features/messages/repository/__tests__/conversations.repository.test.d.ts +1 -0
- package/dist/features/messages/repository/__tests__/conversations.repository.test.js +257 -0
- package/dist/features/messages/schemas/firestore.d.ts +2 -4
- package/dist/features/messages/schemas/index.d.ts +2 -2
- package/dist/features/orders/repository/__tests__/orders.repository.test.d.ts +1 -0
- package/dist/features/orders/repository/__tests__/orders.repository.test.js +211 -0
- package/dist/features/orders/repository/orders.repository.d.ts +5 -0
- package/dist/features/orders/repository/orders.repository.js +26 -0
- package/dist/features/orders/schemas/firestore.d.ts +9 -5
- package/dist/features/orders/schemas/firestore.js +3 -0
- package/dist/features/payments/repository/__tests__/payout.repository.test.d.ts +1 -0
- package/dist/features/payments/repository/__tests__/payout.repository.test.js +292 -0
- package/dist/features/payments/schemas/firestore.d.ts +2 -4
- package/dist/features/pre-orders/schemas/index.d.ts +2 -2
- package/dist/features/products/api/[id]/route.d.ts +4 -4
- package/dist/features/products/api/route.d.ts +2 -2
- package/dist/features/products/constants/action-defs.d.ts +16 -0
- package/dist/features/products/constants/action-defs.js +16 -0
- package/dist/features/products/constants/listing-tabs.d.ts +48 -0
- package/dist/features/products/constants/listing-tabs.js +12 -0
- package/dist/features/products/repository/__tests__/product-features.repository.test.d.ts +1 -0
- package/dist/features/products/repository/__tests__/product-features.repository.test.js +329 -0
- package/dist/features/products/repository/__tests__/products.repository.test.d.ts +1 -0
- package/dist/features/products/repository/__tests__/products.repository.test.js +607 -0
- package/dist/features/products/repository/products.repository.d.ts +37 -0
- package/dist/features/products/repository/products.repository.js +28 -1
- package/dist/features/products/schemas/firestore.d.ts +23 -7
- package/dist/features/products/schemas/firestore.js +2 -0
- package/dist/features/products/schemas/index.d.ts +18 -18
- package/dist/features/products/schemas/index.js +4 -2
- package/dist/features/products/types/index.d.ts +3 -1
- package/dist/features/promotions/repository/__tests__/claimed-coupons.repository.test.d.ts +1 -0
- package/dist/features/promotions/repository/__tests__/claimed-coupons.repository.test.js +219 -0
- package/dist/features/promotions/repository/__tests__/coupons.repository.test.d.ts +1 -0
- package/dist/features/promotions/repository/__tests__/coupons.repository.test.js +480 -0
- package/dist/features/promotions/schemas/firestore.d.ts +2 -4
- package/dist/features/promotions/schemas/index.d.ts +4 -4
- package/dist/features/reviews/api/[id]/route.d.ts +4 -4
- package/dist/features/reviews/api/route.d.ts +2 -2
- package/dist/features/reviews/repository/__tests__/reviews.repository.test.d.ts +1 -0
- package/dist/features/reviews/repository/__tests__/reviews.repository.test.js +327 -0
- package/dist/features/reviews/schemas/firestore.d.ts +2 -4
- package/dist/features/reviews/schemas/index.d.ts +2 -2
- package/dist/features/scams/repository/__tests__/scammer.repository.test.d.ts +1 -0
- package/dist/features/scams/repository/__tests__/scammer.repository.test.js +385 -0
- package/dist/features/scams/schemas/firestore.d.ts +2 -4
- package/dist/features/scams/schemas/index.d.ts +4 -4
- package/dist/features/search/repository/__tests__/search.repository.test.d.ts +1 -0
- package/dist/features/search/repository/__tests__/search.repository.test.js +369 -0
- package/dist/features/search/schemas/index.d.ts +2 -2
- package/dist/features/seller/api/coupons/route.d.ts +2 -2
- package/dist/features/seller/api/offers/route.d.ts +2 -2
- package/dist/features/seller/api/products/route.d.ts +2 -2
- package/dist/features/seller/api/store/route.d.ts +2 -2
- package/dist/features/seller/components/BarcodeField.d.ts +17 -0
- package/dist/features/seller/components/BarcodeField.js +30 -0
- package/dist/features/seller/components/FulfillmentView.d.ts +5 -0
- package/dist/features/seller/components/FulfillmentView.js +120 -0
- package/dist/features/seller/components/PrintCenterView.d.ts +3 -1
- package/dist/features/seller/components/PrintCenterView.js +52 -4
- package/dist/features/seller/components/SellerProductShell.d.ts +2 -0
- package/dist/features/seller/components/SellerProductShell.js +2 -1
- package/dist/features/seller/components/index.d.ts +4 -0
- package/dist/features/seller/components/index.js +2 -0
- package/dist/features/seller/repository/__tests__/offer.repository.test.d.ts +1 -0
- package/dist/features/seller/repository/__tests__/offer.repository.test.js +458 -0
- package/dist/features/seller/schemas/index.d.ts +2 -2
- package/dist/features/store-extensions/schemas/firestore.d.ts +12 -44
- package/dist/features/stores/components/StoreClassifiedsListing.d.ts +5 -0
- package/dist/features/stores/components/StoreClassifiedsListing.js +48 -0
- package/dist/features/stores/components/StoreClassifiedsPageView.d.ts +4 -0
- package/dist/features/stores/components/StoreClassifiedsPageView.js +20 -0
- package/dist/features/stores/components/StoreDetailLayoutView.js +23 -2
- package/dist/features/stores/components/StoreDigitalCodesListing.d.ts +5 -0
- package/dist/features/stores/components/StoreDigitalCodesListing.js +48 -0
- package/dist/features/stores/components/StoreDigitalCodesPageView.d.ts +4 -0
- package/dist/features/stores/components/StoreDigitalCodesPageView.js +20 -0
- package/dist/features/stores/components/StoreLiveItemsListing.d.ts +5 -0
- package/dist/features/stores/components/StoreLiveItemsListing.js +48 -0
- package/dist/features/stores/components/StoreLiveItemsPageView.d.ts +4 -0
- package/dist/features/stores/components/StoreLiveItemsPageView.js +20 -0
- package/dist/features/stores/components/index.d.ts +9 -0
- package/dist/features/stores/components/index.js +3 -0
- package/dist/features/stores/repository/__tests__/store.repository.test.d.ts +1 -0
- package/dist/features/stores/repository/__tests__/store.repository.test.js +261 -0
- package/dist/features/stores/schemas/firestore.d.ts +2 -4
- package/dist/features/stores/schemas/index.d.ts +4 -4
- package/dist/features/support/repository/__tests__/support.repository.test.d.ts +1 -0
- package/dist/features/support/repository/__tests__/support.repository.test.js +312 -0
- package/dist/features/support/schemas/firestore.d.ts +2 -4
- package/dist/features/support/schemas/index.d.ts +2 -2
- package/dist/features/wishlist/repository/__tests__/user-wishlist.repository.test.d.ts +1 -0
- package/dist/features/wishlist/repository/__tests__/user-wishlist.repository.test.js +139 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +17 -0
- package/dist/next/api/routeHandler.d.ts +1 -1
- package/dist/next/routing/route-map.d.ts +24 -0
- package/dist/next/routing/route-map.js +11 -0
- package/dist/repositories/index.d.ts +1 -0
- package/dist/repositories/index.js +2 -0
- package/dist/schemas/registry.d.ts +24 -24
- package/dist/security/index.d.ts +1 -1
- package/dist/security/index.js +1 -1
- package/dist/security/pii-schemas.d.ts +2 -0
- package/dist/security/pii-schemas.js +6 -0
- package/dist/seed/actions/demo-seed-actions.d.ts +1 -1
- package/dist/seed/events-seed-data.js +85 -2
- package/dist/seed/grouped-listings-seed-data.d.ts +5 -2
- package/dist/seed/index.d.ts +1 -0
- package/dist/seed/index.js +1 -0
- package/dist/seed/lottery-entries-seed-data.d.ts +2 -0
- package/dist/seed/lottery-entries-seed-data.js +108 -0
- package/dist/seed/manifest.js +1 -0
- package/dist/seed/products-preorders-seed-data.d.ts +5 -2
- package/dist/seed/products-standard-seed-data.js +8 -0
- package/dist/server-entry.d.ts +3 -0
- package/dist/server-entry.js +3 -0
- package/dist/server.d.ts +10 -4
- package/dist/server.js +6 -0
- package/dist/styles.css +1 -1
- package/dist/tailwind-utilities.css +1 -1
- package/dist/utils/id-generators.d.ts +8 -0
- package/dist/utils/id-generators.js +14 -0
- package/package.json +2 -1
|
@@ -154,8 +154,8 @@ export declare const supportTicketFirestoreSchema: z.ZodObject<{
|
|
|
154
154
|
createdAt: string | Date | z.objectOutputType<{
|
|
155
155
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
156
156
|
}, z.ZodTypeAny, "passthrough">;
|
|
157
|
-
id: string;
|
|
158
157
|
description: string;
|
|
158
|
+
id: string;
|
|
159
159
|
updatedAt: string | Date | z.objectOutputType<{
|
|
160
160
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
161
161
|
}, z.ZodTypeAny, "passthrough">;
|
|
@@ -197,8 +197,8 @@ export declare const supportTicketFirestoreSchema: z.ZodObject<{
|
|
|
197
197
|
createdAt: string | Date | z.objectInputType<{
|
|
198
198
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
199
199
|
}, z.ZodTypeAny, "passthrough">;
|
|
200
|
-
id: string;
|
|
201
200
|
description: string;
|
|
201
|
+
id: string;
|
|
202
202
|
updatedAt: string | Date | z.objectInputType<{
|
|
203
203
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
204
204
|
}, z.ZodTypeAny, "passthrough">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { describe, it, expect, vi, beforeEach } from "vitest";
|
|
2
|
+
import { makeMockDb, makeSnap } from "../../../../../tests/helpers/mock-firestore";
|
|
3
|
+
const { db, mockDocRef, mockCollection, mockTxn } = makeMockDb();
|
|
4
|
+
vi.mock("../../../../providers/db-firebase", () => ({
|
|
5
|
+
getAdminDb: () => db,
|
|
6
|
+
}));
|
|
7
|
+
vi.mock("../../../../monitoring", () => ({
|
|
8
|
+
serverLogger: { info: vi.fn(), warn: vi.fn(), error: vi.fn() },
|
|
9
|
+
}));
|
|
10
|
+
import { UserWishlistRepository, WishlistFullError } from "../user-wishlist.repository";
|
|
11
|
+
import { WISHLIST_MAX } from "../../../../constants/limits";
|
|
12
|
+
const repo = new UserWishlistRepository();
|
|
13
|
+
function makeItems(count) {
|
|
14
|
+
return Array.from({ length: count }, (_, i) => ({
|
|
15
|
+
productId: `product-${i}`,
|
|
16
|
+
addedAt: new Date(),
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
beforeEach(() => {
|
|
20
|
+
vi.clearAllMocks();
|
|
21
|
+
// Reset collection chain so tests that override db.collection don't leak
|
|
22
|
+
db.collection.mockReturnValue(mockCollection);
|
|
23
|
+
mockCollection.doc.mockReturnValue(mockDocRef);
|
|
24
|
+
// Default: runTransaction calls through
|
|
25
|
+
db.runTransaction.mockImplementation(async (fn) => fn(mockTxn));
|
|
26
|
+
// Default: doc.get returns non-existent snap
|
|
27
|
+
mockDocRef.get.mockResolvedValue(makeSnap(null));
|
|
28
|
+
mockDocRef.set.mockResolvedValue(undefined);
|
|
29
|
+
mockTxn.get.mockResolvedValue(makeSnap(null));
|
|
30
|
+
mockTxn.set.mockResolvedValue(undefined);
|
|
31
|
+
});
|
|
32
|
+
describe("UserWishlistRepository.addItem", () => {
|
|
33
|
+
it("adds first item: count = 1, no error", async () => {
|
|
34
|
+
mockTxn.get.mockResolvedValue(makeSnap({ userId: "user-1", items: [], updatedAt: new Date() }));
|
|
35
|
+
const count = await repo.addItem("user-1", "product-new");
|
|
36
|
+
expect(count).toBe(1);
|
|
37
|
+
expect(mockTxn.set).toHaveBeenCalledOnce();
|
|
38
|
+
});
|
|
39
|
+
it("19 items → adds item, count = 20, no error", async () => {
|
|
40
|
+
const items = makeItems(19);
|
|
41
|
+
mockTxn.get.mockResolvedValue(makeSnap({ userId: "u", items, updatedAt: new Date() }));
|
|
42
|
+
const count = await repo.addItem("u", "product-20");
|
|
43
|
+
expect(count).toBe(20);
|
|
44
|
+
});
|
|
45
|
+
it("20 items + new productId → throws WishlistFullError with current=20, limit=20", async () => {
|
|
46
|
+
const items = makeItems(WISHLIST_MAX);
|
|
47
|
+
mockTxn.get.mockResolvedValue(makeSnap({ userId: "u", items, updatedAt: new Date() }));
|
|
48
|
+
await expect(repo.addItem("u", "product-new")).rejects.toBeInstanceOf(WishlistFullError);
|
|
49
|
+
const err = await repo.addItem("u", "product-new").catch((e) => e);
|
|
50
|
+
if (err instanceof WishlistFullError) {
|
|
51
|
+
expect(err.current).toBe(WISHLIST_MAX);
|
|
52
|
+
expect(err.limit).toBe(WISHLIST_MAX);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
it("20 items + same productId (existing) → idempotent no-op, returns existing count", async () => {
|
|
56
|
+
const items = makeItems(WISHLIST_MAX);
|
|
57
|
+
mockTxn.get.mockResolvedValue(makeSnap({ userId: "u", items, updatedAt: new Date() }));
|
|
58
|
+
const count = await repo.addItem("u", "product-0"); // already in list
|
|
59
|
+
expect(count).toBe(WISHLIST_MAX);
|
|
60
|
+
expect(mockTxn.set).not.toHaveBeenCalled();
|
|
61
|
+
});
|
|
62
|
+
it("5 items + existing productId → idempotent no-op, count remains 5", async () => {
|
|
63
|
+
const items = makeItems(5);
|
|
64
|
+
mockTxn.get.mockResolvedValue(makeSnap({ userId: "u", items, updatedAt: new Date() }));
|
|
65
|
+
const count = await repo.addItem("u", "product-3"); // already in list
|
|
66
|
+
expect(count).toBe(5);
|
|
67
|
+
expect(mockTxn.set).not.toHaveBeenCalled();
|
|
68
|
+
});
|
|
69
|
+
it("uses db.runTransaction for every add", async () => {
|
|
70
|
+
mockTxn.get.mockResolvedValue(makeSnap({ userId: "u", items: [], updatedAt: new Date() }));
|
|
71
|
+
await repo.addItem("u", "product-x");
|
|
72
|
+
expect(db.runTransaction).toHaveBeenCalledOnce();
|
|
73
|
+
});
|
|
74
|
+
it("stores productType in the item", async () => {
|
|
75
|
+
mockTxn.get.mockResolvedValue(makeSnap({ userId: "u", items: [], updatedAt: new Date() }));
|
|
76
|
+
await repo.addItem("u", "product-x", { productType: "auction" });
|
|
77
|
+
const setCall = mockTxn.set.mock.calls[0][1];
|
|
78
|
+
expect(setCall.items[0].productType).toBe("auction");
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
describe("UserWishlistRepository.removeItem", () => {
|
|
82
|
+
it("removes existing productId, count decrements", async () => {
|
|
83
|
+
const items = [
|
|
84
|
+
{ productId: "product-0", addedAt: new Date() },
|
|
85
|
+
{ productId: "product-1", addedAt: new Date() },
|
|
86
|
+
];
|
|
87
|
+
mockTxn.get.mockResolvedValue(makeSnap({ userId: "u", items, updatedAt: new Date() }));
|
|
88
|
+
await repo.removeItem("u", "product-0");
|
|
89
|
+
const setCall = mockTxn.set.mock.calls[0][1];
|
|
90
|
+
expect(setCall.items).toHaveLength(1);
|
|
91
|
+
expect(setCall.items[0].productId).toBe("product-1");
|
|
92
|
+
});
|
|
93
|
+
it("non-existent productId → no-op, set not called", async () => {
|
|
94
|
+
const items = [{ productId: "product-0", addedAt: new Date() }];
|
|
95
|
+
mockTxn.get.mockResolvedValue(makeSnap({ userId: "u", items, updatedAt: new Date() }));
|
|
96
|
+
await repo.removeItem("u", "product-xxx");
|
|
97
|
+
expect(mockTxn.set).not.toHaveBeenCalled();
|
|
98
|
+
});
|
|
99
|
+
it("uses db.runTransaction", async () => {
|
|
100
|
+
mockTxn.get.mockResolvedValue(makeSnap({ userId: "u", items: [], updatedAt: new Date() }));
|
|
101
|
+
await repo.removeItem("u", "product-x");
|
|
102
|
+
expect(db.runTransaction).toHaveBeenCalledOnce();
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
describe("UserWishlistRepository.isInWishlist", () => {
|
|
106
|
+
it("productId in items array → returns true", async () => {
|
|
107
|
+
const items = [{ productId: "product-0", addedAt: new Date() }];
|
|
108
|
+
// First get: wishlist doc; second get: product exists check in filterExistingProducts
|
|
109
|
+
mockDocRef.get
|
|
110
|
+
.mockResolvedValueOnce(makeSnap({ userId: "u", items, updatedAt: new Date() }))
|
|
111
|
+
.mockResolvedValue(makeSnap({ id: "product-0" }, "product-0"));
|
|
112
|
+
const result = await repo.isInWishlist("u", "product-0");
|
|
113
|
+
expect(result).toBe(true);
|
|
114
|
+
});
|
|
115
|
+
it("productId not in items array → returns false", async () => {
|
|
116
|
+
mockDocRef.get.mockResolvedValue(makeSnap({ userId: "u", items: [], updatedAt: new Date() }));
|
|
117
|
+
const result = await repo.isInWishlist("u", "product-xxx");
|
|
118
|
+
expect(result).toBe(false);
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
describe("UserWishlistRepository.countByUser", () => {
|
|
122
|
+
it("returns items.length from stored document", async () => {
|
|
123
|
+
const items = makeItems(7);
|
|
124
|
+
mockDocRef.get.mockResolvedValue(makeSnap({ userId: "u", items, updatedAt: new Date() }));
|
|
125
|
+
const count = await repo.countByUser("u");
|
|
126
|
+
expect(count).toBe(7);
|
|
127
|
+
});
|
|
128
|
+
it("returns 0 for user with no document", async () => {
|
|
129
|
+
mockDocRef.get.mockResolvedValue(makeSnap(null));
|
|
130
|
+
const count = await repo.countByUser("u");
|
|
131
|
+
expect(count).toBe(0);
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
describe("UserWishlistRepository.clearWishlist", () => {
|
|
135
|
+
it("sets items: [] without deleting the document", async () => {
|
|
136
|
+
await repo.clearWishlist("u");
|
|
137
|
+
expect(mockDocRef.set).toHaveBeenCalledWith(expect.objectContaining({ items: [] }));
|
|
138
|
+
});
|
|
139
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -444,6 +444,7 @@ export { Can } from "./security/index";
|
|
|
444
444
|
export { DEFAULT_ROLES } from "./security/index";
|
|
445
445
|
export { ENC_PREFIX } from "./security/index";
|
|
446
446
|
export { EVENT_ENTRY_PII_FIELDS } from "./security/index";
|
|
447
|
+
export { LOTTERY_ENTRY_PII_FIELDS } from "./security/index";
|
|
447
448
|
export { HMAC_PREFIX } from "./security/index";
|
|
448
449
|
export { NEWSLETTER_PII_FIELDS } from "./security/index";
|
|
449
450
|
export { NEWSLETTER_PII_INDEX_MAP } from "./security/index";
|
|
@@ -1775,6 +1776,8 @@ export type { AdminEventEditorViewProps } from "./features/events/index";
|
|
|
1775
1776
|
export { EVENTS_COLLECTION } from "./features/events/index";
|
|
1776
1777
|
export { EVENT_ADMIN_SORT_OPTIONS } from "./features/events/index";
|
|
1777
1778
|
export { EVENT_ENTRIES_COLLECTION } from "./features/events/index";
|
|
1779
|
+
export { LOTTERY_ENTRIES_COLLECTION } from "./features/lottery/schemas/firestore";
|
|
1780
|
+
export { lotteryEntriesSeedData } from "./seed/index";
|
|
1778
1781
|
export { EVENT_ENTRY_FIELDS } from "./features/events/index";
|
|
1779
1782
|
export { EVENT_ENTRY_INDEXED_FIELDS } from "./features/events/index";
|
|
1780
1783
|
export { EVENT_FIELDS } from "./features/events/index";
|
|
@@ -1796,6 +1799,17 @@ export { EventRaffleWinnerView } from "./features/events/index";
|
|
|
1796
1799
|
export type { EventRaffleWinnerViewProps } from "./features/events/index";
|
|
1797
1800
|
export { SpinWheelView } from "./features/events/index";
|
|
1798
1801
|
export type { SpinWheelViewProps } from "./features/events/index";
|
|
1802
|
+
export { LotterySlotGrid } from "./_internal/client/features/lottery/LotterySlotGrid";
|
|
1803
|
+
export { LotteryPullForm } from "./_internal/client/features/lottery/LotteryPullForm";
|
|
1804
|
+
export { LotteryListView } from "./_internal/client/features/lottery/LotteryListView";
|
|
1805
|
+
export { LotteryDetailView } from "./_internal/client/features/lottery/LotteryDetailView";
|
|
1806
|
+
export { LotteryEntriesView } from "./_internal/client/features/lottery/LotteryEntriesView";
|
|
1807
|
+
export { LotteryAdminSlotView } from "./_internal/client/features/lottery/LotteryAdminSlotView";
|
|
1808
|
+
export { LotteryAdminEditView } from "./_internal/client/features/lottery/LotteryAdminEditView";
|
|
1809
|
+
export { PrizeDrawLotteryDetailView } from "./_internal/client/features/lottery/PrizeDrawLotteryDetailView";
|
|
1810
|
+
export type { LotteryConfig, LotterySlot, ClientLotterySlot, ClientLotteryConfig, LotteryPricingMode, LotteryEntryStatus } from "./features/lottery/types";
|
|
1811
|
+
export { LotteryError, computeWeight, pickWeightedSlot, assignSlotWeights } from "./features/lottery/types";
|
|
1812
|
+
export type { LotteryEntryDocument } from "./features/lottery/schemas/firestore";
|
|
1799
1813
|
export type { SpinPrize } from "./features/events/index";
|
|
1800
1814
|
export { EventsListView } from "./features/events/index";
|
|
1801
1815
|
export { EventsIndexListing } from "./features/events/index";
|
package/dist/index.js
CHANGED
|
@@ -784,6 +784,8 @@ export { ENC_PREFIX } from "./security/index";
|
|
|
784
784
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
785
785
|
// EVENT_ENTRY_PII_FIELDS - Constant used across modules.
|
|
786
786
|
export { EVENT_ENTRY_PII_FIELDS } from "./security/index";
|
|
787
|
+
// LOTTERY_ENTRY_PII_FIELDS - PII fields for lottery entries.
|
|
788
|
+
export { LOTTERY_ENTRY_PII_FIELDS } from "./security/index";
|
|
787
789
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
788
790
|
// HMAC_PREFIX - Constant used across modules.
|
|
789
791
|
export { HMAC_PREFIX } from "./security/index";
|
|
@@ -1247,6 +1249,7 @@ export { claimedCouponsSeedData } from "./seed/index";
|
|
|
1247
1249
|
// [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
1248
1250
|
// eventEntriesSeedData - Model for event entries seed data.
|
|
1249
1251
|
export { eventEntriesSeedData } from "./seed/index";
|
|
1252
|
+
// lotteryEntriesSeedData already exported above via LOTTERY_ENTRIES_COLLECTION block.
|
|
1250
1253
|
// [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
1251
1254
|
// eventsSeedData - Model for events seed data.
|
|
1252
1255
|
export { eventsSeedData } from "./seed/index";
|
|
@@ -3382,6 +3385,10 @@ export { EVENT_ADMIN_SORT_OPTIONS } from "./features/events/index";
|
|
|
3382
3385
|
// [SCHEMA]-Schema / data-shape constant â€" Zod validator, default-value object, or Firestore collection/field name constant.
|
|
3383
3386
|
// EVENT_ENTRIES_COLLECTION - Constant used across modules.
|
|
3384
3387
|
export { EVENT_ENTRIES_COLLECTION } from "./features/events/index";
|
|
3388
|
+
// LOTTERY_ENTRIES_COLLECTION - New lotteryEntries collection constant.
|
|
3389
|
+
export { LOTTERY_ENTRIES_COLLECTION } from "./features/lottery/schemas/firestore";
|
|
3390
|
+
// lotteryEntriesSeedData - Seed data for the lotteryEntries collection.
|
|
3391
|
+
export { lotteryEntriesSeedData } from "./seed/index";
|
|
3385
3392
|
// [SCHEMA]-Schema / data-shape constant â€" Zod validator, default-value object, or Firestore collection/field name constant.
|
|
3386
3393
|
// EVENT_ENTRY_FIELDS - Constant used across modules.
|
|
3387
3394
|
export { EVENT_ENTRY_FIELDS } from "./features/events/index";
|
|
@@ -3436,6 +3443,16 @@ export { EventStatusBadge } from "./features/events/index";
|
|
|
3436
3443
|
export { EventRaffleWinnerView } from "./features/events/index";
|
|
3437
3444
|
// SpinWheelView - Spin-the-wheel client component for spin-wheel events.
|
|
3438
3445
|
export { SpinWheelView } from "./features/events/index";
|
|
3446
|
+
// Lottery feature — client components
|
|
3447
|
+
export { LotterySlotGrid } from "./_internal/client/features/lottery/LotterySlotGrid";
|
|
3448
|
+
export { LotteryPullForm } from "./_internal/client/features/lottery/LotteryPullForm";
|
|
3449
|
+
export { LotteryListView } from "./_internal/client/features/lottery/LotteryListView";
|
|
3450
|
+
export { LotteryDetailView } from "./_internal/client/features/lottery/LotteryDetailView";
|
|
3451
|
+
export { LotteryEntriesView } from "./_internal/client/features/lottery/LotteryEntriesView";
|
|
3452
|
+
export { LotteryAdminSlotView } from "./_internal/client/features/lottery/LotteryAdminSlotView";
|
|
3453
|
+
export { LotteryAdminEditView } from "./_internal/client/features/lottery/LotteryAdminEditView";
|
|
3454
|
+
export { PrizeDrawLotteryDetailView } from "./_internal/client/features/lottery/PrizeDrawLotteryDetailView";
|
|
3455
|
+
export { LotteryError, computeWeight, pickWeightedSlot, assignSlotWeights } from "./features/lottery/types";
|
|
3439
3456
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
3440
3457
|
// EventsListView - Component for events list view.
|
|
3441
3458
|
export { EventsListView } from "./features/events/index";
|
|
@@ -61,7 +61,7 @@ interface RouteHandlerOptions<TInput = unknown, TParams = Record<string, string>
|
|
|
61
61
|
requestId: string;
|
|
62
62
|
}) => Promise<Response>;
|
|
63
63
|
}
|
|
64
|
-
export declare function createRouteHandler<TInput = unknown, TParams = Record<string, string>>(options: RouteHandlerOptions<TInput, TParams>): (request: Request, context
|
|
64
|
+
export declare function createRouteHandler<TInput = unknown, TParams = Record<string, string>>(options: RouteHandlerOptions<TInput, TParams>): (request: Request, context?: {
|
|
65
65
|
params: Promise<TParams>;
|
|
66
66
|
}) => Promise<Response>;
|
|
67
67
|
export {};
|
|
@@ -41,6 +41,9 @@ export declare const DEFAULT_ROUTE_MAP: {
|
|
|
41
41
|
readonly STORE_REVIEWS: (storeSlug: string) => string;
|
|
42
42
|
readonly STORE_ABOUT: (storeSlug: string) => string;
|
|
43
43
|
readonly STORE_COUPONS: (storeSlug: string) => string;
|
|
44
|
+
readonly STORE_CLASSIFIEDS: (storeSlug: string) => string;
|
|
45
|
+
readonly STORE_DIGITAL_CODES: (storeSlug: string) => string;
|
|
46
|
+
readonly STORE_LIVE: (storeSlug: string) => string;
|
|
44
47
|
readonly CATEGORIES: "/categories";
|
|
45
48
|
readonly CATEGORY_DETAIL: (slug: string) => string;
|
|
46
49
|
readonly BRANDS: "/brands";
|
|
@@ -78,6 +81,8 @@ export declare const DEFAULT_ROUTE_MAP: {
|
|
|
78
81
|
readonly EVENT_PARTICIPATE: (id: string) => string;
|
|
79
82
|
readonly EVENT_LEADERBOARD: (id: string) => string;
|
|
80
83
|
readonly EVENT_WINNER: (id: string) => string;
|
|
84
|
+
readonly LOTTERIES: "/lottery";
|
|
85
|
+
readonly LOTTERY_DETAIL: (id: string) => string;
|
|
81
86
|
readonly SUBLISTING_CATEGORIES: "/sublisting-categories";
|
|
82
87
|
readonly SUBLISTING_CATEGORY: (slug: string) => string;
|
|
83
88
|
readonly SUPPORT: "/support";
|
|
@@ -184,6 +189,7 @@ export declare const DEFAULT_ROUTE_MAP: {
|
|
|
184
189
|
readonly PRIZE_DRAWS: "/store/prize-draws";
|
|
185
190
|
readonly PRIZE_DRAWS_NEW: "/store/prize-draws/new";
|
|
186
191
|
readonly PRIZE_DRAWS_EDIT: (id: string) => string;
|
|
192
|
+
readonly PRIZE_DRAW_ENTRIES: (id: string) => string;
|
|
187
193
|
readonly PRODUCT_CODES: (id: string) => string;
|
|
188
194
|
readonly CLASSIFIED: "/store/classified";
|
|
189
195
|
readonly CLASSIFIED_NEW: "/store/classified/new";
|
|
@@ -196,6 +202,7 @@ export declare const DEFAULT_ROUTE_MAP: {
|
|
|
196
202
|
readonly LIVE_ITEMS_EDIT: (id: string) => string;
|
|
197
203
|
readonly PRINT_CENTER: "/store/print-center";
|
|
198
204
|
readonly INVENTORY_PRINT: "/store/inventory/print";
|
|
205
|
+
readonly FULFILLMENT: "/store/fulfillment";
|
|
199
206
|
readonly PAYOUT_METHODS: "/store/payout-methods";
|
|
200
207
|
readonly PAYOUT_METHODS_NEW: "/store/payout-methods/new";
|
|
201
208
|
readonly PAYOUT_METHODS_EDIT: (id: string) => string;
|
|
@@ -297,6 +304,9 @@ export declare const DEFAULT_ROUTE_MAP: {
|
|
|
297
304
|
readonly BUNDLES_EDIT: (id: string) => string;
|
|
298
305
|
readonly PRIZE_DRAWS: "/admin/prize-draws";
|
|
299
306
|
readonly PRIZE_DRAWS_EDIT: (id: string) => string;
|
|
307
|
+
readonly PRIZE_DRAWS_ENTRIES: (id: string) => string;
|
|
308
|
+
readonly LOTTERIES: "/admin/lotteries";
|
|
309
|
+
readonly LOTTERY_ENTRIES: (id: string) => string;
|
|
300
310
|
readonly TEAM: "/admin/team";
|
|
301
311
|
readonly SUPPORT_TICKETS: "/admin/support-tickets";
|
|
302
312
|
readonly SUPPORT_TICKET_BY_ID: (id: string) => string;
|
|
@@ -305,6 +315,7 @@ export declare const DEFAULT_ROUTE_MAP: {
|
|
|
305
315
|
readonly SETTINGS_ACTIONS: "/admin/settings/actions";
|
|
306
316
|
readonly SETTINGS_NAVIGATION: "/admin/settings/navigation";
|
|
307
317
|
readonly PRINT_CENTER: "/admin/print-center";
|
|
318
|
+
readonly FULFILLMENT: "/admin/fulfillment";
|
|
308
319
|
readonly MODERATION: "/admin/moderation";
|
|
309
320
|
readonly MODERATION_DETAIL: (id: string) => string;
|
|
310
321
|
readonly REPORTS: "/admin/reports";
|
|
@@ -366,6 +377,9 @@ export declare const ROUTES: {
|
|
|
366
377
|
readonly STORE_REVIEWS: (storeSlug: string) => string;
|
|
367
378
|
readonly STORE_ABOUT: (storeSlug: string) => string;
|
|
368
379
|
readonly STORE_COUPONS: (storeSlug: string) => string;
|
|
380
|
+
readonly STORE_CLASSIFIEDS: (storeSlug: string) => string;
|
|
381
|
+
readonly STORE_DIGITAL_CODES: (storeSlug: string) => string;
|
|
382
|
+
readonly STORE_LIVE: (storeSlug: string) => string;
|
|
369
383
|
readonly CATEGORIES: "/categories";
|
|
370
384
|
readonly CATEGORY_DETAIL: (slug: string) => string;
|
|
371
385
|
readonly BRANDS: "/brands";
|
|
@@ -403,6 +417,8 @@ export declare const ROUTES: {
|
|
|
403
417
|
readonly EVENT_PARTICIPATE: (id: string) => string;
|
|
404
418
|
readonly EVENT_LEADERBOARD: (id: string) => string;
|
|
405
419
|
readonly EVENT_WINNER: (id: string) => string;
|
|
420
|
+
readonly LOTTERIES: "/lottery";
|
|
421
|
+
readonly LOTTERY_DETAIL: (id: string) => string;
|
|
406
422
|
readonly SUBLISTING_CATEGORIES: "/sublisting-categories";
|
|
407
423
|
readonly SUBLISTING_CATEGORY: (slug: string) => string;
|
|
408
424
|
readonly SUPPORT: "/support";
|
|
@@ -509,6 +525,7 @@ export declare const ROUTES: {
|
|
|
509
525
|
readonly PRIZE_DRAWS: "/store/prize-draws";
|
|
510
526
|
readonly PRIZE_DRAWS_NEW: "/store/prize-draws/new";
|
|
511
527
|
readonly PRIZE_DRAWS_EDIT: (id: string) => string;
|
|
528
|
+
readonly PRIZE_DRAW_ENTRIES: (id: string) => string;
|
|
512
529
|
readonly PRODUCT_CODES: (id: string) => string;
|
|
513
530
|
readonly CLASSIFIED: "/store/classified";
|
|
514
531
|
readonly CLASSIFIED_NEW: "/store/classified/new";
|
|
@@ -521,6 +538,7 @@ export declare const ROUTES: {
|
|
|
521
538
|
readonly LIVE_ITEMS_EDIT: (id: string) => string;
|
|
522
539
|
readonly PRINT_CENTER: "/store/print-center";
|
|
523
540
|
readonly INVENTORY_PRINT: "/store/inventory/print";
|
|
541
|
+
readonly FULFILLMENT: "/store/fulfillment";
|
|
524
542
|
readonly PAYOUT_METHODS: "/store/payout-methods";
|
|
525
543
|
readonly PAYOUT_METHODS_NEW: "/store/payout-methods/new";
|
|
526
544
|
readonly PAYOUT_METHODS_EDIT: (id: string) => string;
|
|
@@ -622,6 +640,9 @@ export declare const ROUTES: {
|
|
|
622
640
|
readonly BUNDLES_EDIT: (id: string) => string;
|
|
623
641
|
readonly PRIZE_DRAWS: "/admin/prize-draws";
|
|
624
642
|
readonly PRIZE_DRAWS_EDIT: (id: string) => string;
|
|
643
|
+
readonly PRIZE_DRAWS_ENTRIES: (id: string) => string;
|
|
644
|
+
readonly LOTTERIES: "/admin/lotteries";
|
|
645
|
+
readonly LOTTERY_ENTRIES: (id: string) => string;
|
|
625
646
|
readonly TEAM: "/admin/team";
|
|
626
647
|
readonly SUPPORT_TICKETS: "/admin/support-tickets";
|
|
627
648
|
readonly SUPPORT_TICKET_BY_ID: (id: string) => string;
|
|
@@ -630,6 +651,7 @@ export declare const ROUTES: {
|
|
|
630
651
|
readonly SETTINGS_ACTIONS: "/admin/settings/actions";
|
|
631
652
|
readonly SETTINGS_NAVIGATION: "/admin/settings/navigation";
|
|
632
653
|
readonly PRINT_CENTER: "/admin/print-center";
|
|
654
|
+
readonly FULFILLMENT: "/admin/fulfillment";
|
|
633
655
|
readonly MODERATION: "/admin/moderation";
|
|
634
656
|
readonly MODERATION_DETAIL: (id: string) => string;
|
|
635
657
|
readonly REPORTS: "/admin/reports";
|
|
@@ -703,6 +725,7 @@ export declare const SELLER_ROUTES: {
|
|
|
703
725
|
readonly PRIZE_DRAWS: "/store/prize-draws";
|
|
704
726
|
readonly PRIZE_DRAWS_NEW: "/store/prize-draws/new";
|
|
705
727
|
readonly PRIZE_DRAWS_EDIT: (id: string) => string;
|
|
728
|
+
readonly PRIZE_DRAW_ENTRIES: (id: string) => string;
|
|
706
729
|
readonly PRODUCT_CODES: (id: string) => string;
|
|
707
730
|
readonly CLASSIFIED: "/store/classified";
|
|
708
731
|
readonly CLASSIFIED_NEW: "/store/classified/new";
|
|
@@ -715,6 +738,7 @@ export declare const SELLER_ROUTES: {
|
|
|
715
738
|
readonly LIVE_ITEMS_EDIT: (id: string) => string;
|
|
716
739
|
readonly PRINT_CENTER: "/store/print-center";
|
|
717
740
|
readonly INVENTORY_PRINT: "/store/inventory/print";
|
|
741
|
+
readonly FULFILLMENT: "/store/fulfillment";
|
|
718
742
|
readonly PAYOUT_METHODS: "/store/payout-methods";
|
|
719
743
|
readonly PAYOUT_METHODS_NEW: "/store/payout-methods/new";
|
|
720
744
|
readonly PAYOUT_METHODS_EDIT: (id: string) => string;
|
|
@@ -29,6 +29,9 @@ export const DEFAULT_ROUTE_MAP = {
|
|
|
29
29
|
STORE_REVIEWS: (storeSlug) => `/stores/${storeSlug}/reviews`,
|
|
30
30
|
STORE_ABOUT: (storeSlug) => `/stores/${storeSlug}/about`,
|
|
31
31
|
STORE_COUPONS: (storeSlug) => `/stores/${storeSlug}/coupons`,
|
|
32
|
+
STORE_CLASSIFIEDS: (storeSlug) => `/stores/${storeSlug}/classified`,
|
|
33
|
+
STORE_DIGITAL_CODES: (storeSlug) => `/stores/${storeSlug}/digital-codes`,
|
|
34
|
+
STORE_LIVE: (storeSlug) => `/stores/${storeSlug}/live`,
|
|
32
35
|
CATEGORIES: "/categories",
|
|
33
36
|
CATEGORY_DETAIL: (slug) => `/categories/${slug}`,
|
|
34
37
|
BRANDS: "/brands",
|
|
@@ -66,6 +69,8 @@ export const DEFAULT_ROUTE_MAP = {
|
|
|
66
69
|
EVENT_PARTICIPATE: (id) => `/events/${id}/participate`,
|
|
67
70
|
EVENT_LEADERBOARD: (id) => `/events/${id}/leaderboard`,
|
|
68
71
|
EVENT_WINNER: (id) => `/events/${id}/winner`,
|
|
72
|
+
LOTTERIES: "/lottery",
|
|
73
|
+
LOTTERY_DETAIL: (id) => `/lottery/${id}`,
|
|
69
74
|
SUBLISTING_CATEGORIES: "/sublisting-categories",
|
|
70
75
|
SUBLISTING_CATEGORY: (slug) => `/sublisting-categories/${slug}`,
|
|
71
76
|
SUPPORT: "/support",
|
|
@@ -173,6 +178,7 @@ export const DEFAULT_ROUTE_MAP = {
|
|
|
173
178
|
PRIZE_DRAWS: "/store/prize-draws",
|
|
174
179
|
PRIZE_DRAWS_NEW: "/store/prize-draws/new",
|
|
175
180
|
PRIZE_DRAWS_EDIT: (id) => `/store/prize-draws/${id}/edit`,
|
|
181
|
+
PRIZE_DRAW_ENTRIES: (id) => `/store/prize-draws/${id}/entries`,
|
|
176
182
|
PRODUCT_CODES: (id) => `/store/products/${id}/codes`,
|
|
177
183
|
// SB-UNI-R — classified / digital-code / live
|
|
178
184
|
CLASSIFIED: "/store/classified",
|
|
@@ -186,6 +192,7 @@ export const DEFAULT_ROUTE_MAP = {
|
|
|
186
192
|
LIVE_ITEMS_EDIT: (id) => `/store/live/${id}/edit`,
|
|
187
193
|
PRINT_CENTER: "/store/print-center",
|
|
188
194
|
INVENTORY_PRINT: "/store/inventory/print",
|
|
195
|
+
FULFILLMENT: "/store/fulfillment",
|
|
189
196
|
// S-STORE Tier — new extension routes
|
|
190
197
|
PAYOUT_METHODS: "/store/payout-methods",
|
|
191
198
|
PAYOUT_METHODS_NEW: "/store/payout-methods/new",
|
|
@@ -291,6 +298,9 @@ export const DEFAULT_ROUTE_MAP = {
|
|
|
291
298
|
BUNDLES_EDIT: (id) => `/admin/bundles/${id}/edit`,
|
|
292
299
|
PRIZE_DRAWS: "/admin/prize-draws",
|
|
293
300
|
PRIZE_DRAWS_EDIT: (id) => `/admin/prize-draws/${id}/edit`,
|
|
301
|
+
PRIZE_DRAWS_ENTRIES: (id) => `/admin/prize-draws/${id}/entries`,
|
|
302
|
+
LOTTERIES: "/admin/lotteries",
|
|
303
|
+
LOTTERY_ENTRIES: (id) => `/admin/lotteries/${id}/entries`,
|
|
294
304
|
TEAM: "/admin/team",
|
|
295
305
|
SUPPORT_TICKETS: "/admin/support-tickets",
|
|
296
306
|
SUPPORT_TICKET_BY_ID: (id) => `/admin/support-tickets/${id}`,
|
|
@@ -299,6 +309,7 @@ export const DEFAULT_ROUTE_MAP = {
|
|
|
299
309
|
SETTINGS_ACTIONS: "/admin/settings/actions",
|
|
300
310
|
SETTINGS_NAVIGATION: "/admin/settings/navigation",
|
|
301
311
|
PRINT_CENTER: "/admin/print-center",
|
|
312
|
+
FULFILLMENT: "/admin/fulfillment",
|
|
302
313
|
// S-STORE Tier — admin moderation + reports + item requests
|
|
303
314
|
MODERATION: "/admin/moderation",
|
|
304
315
|
MODERATION_DETAIL: (id) => `/admin/moderation/${id}`,
|
|
@@ -49,3 +49,4 @@ export type { ProductTemplateDocument, ProductTemplateCreateInput, ProductTempla
|
|
|
49
49
|
export { ProductFeaturesRepository, productFeaturesRepository, } from "../features/products/repository/product-features.repository";
|
|
50
50
|
export type { ProductFeatureListFilter } from "../features/products/repository/product-features.repository";
|
|
51
51
|
export { loadProductFeaturesForStore } from "../features/products/repository/loadProductFeatures";
|
|
52
|
+
export { LotteryEntryRepository, lotteryEntryRepository, } from "../features/lottery/repository/lottery-entry.repository";
|
|
@@ -59,3 +59,5 @@ export { loadProductFeaturesForStore } from "../features/products/repository/loa
|
|
|
59
59
|
// SB-UNI-V — BundlesRepository deleted; bundles live on categoriesRepository
|
|
60
60
|
// with categoryType:"bundle". See features/categories/repository for the
|
|
61
61
|
// listByType / findBySlugAndType helpers.
|
|
62
|
+
// Lottery entries repository
|
|
63
|
+
export { LotteryEntryRepository, lotteryEntryRepository, } from "../features/lottery/repository/lottery-entry.repository";
|