@mohasinac/appkit 4.52.4 → 4.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.build-stamp.json +4 -4
- package/dist/_internal/client/features/sticker-trace/canvas-codec.d.ts +2 -0
- package/dist/_internal/client/features/sticker-trace/canvas-codec.js +148 -0
- package/dist/_internal/server/features/auctions/actions.js +1 -1
- package/dist/_internal/server/features/categories/data.js +23 -7
- package/dist/_internal/server/features/checkout/actions.js +10 -3
- package/dist/_internal/server/features/checkout/data.d.ts +15 -0
- package/dist/_internal/server/features/checkout/data.js +20 -3
- package/dist/_internal/server/features/lottery/actions.js +9 -1
- package/dist/_internal/server/features/lottery/og.d.ts +40 -0
- package/dist/_internal/server/features/lottery/og.js +79 -0
- package/dist/_internal/server/features/messages/actions.js +4 -0
- package/dist/_internal/server/features/offers/adapters.js +17 -3
- package/dist/_internal/server/features/orders/actions.js +7 -2
- package/dist/_internal/server/features/raffle/actions.d.ts +19 -0
- package/dist/_internal/server/features/raffle/actions.js +25 -0
- package/dist/_internal/server/features/reviews/actions.js +1 -1
- package/dist/_internal/server/features/reviews/data.d.ts +1 -1
- package/dist/_internal/server/features/search/index-build/artifact-store.d.ts +89 -0
- package/dist/_internal/server/features/search/index-build/artifact-store.js +208 -0
- package/dist/_internal/server/features/search/index-build/build.d.ts +57 -0
- package/dist/_internal/server/features/search/index-build/build.js +285 -0
- package/dist/_internal/server/features/search/index-build/sources.d.ts +53 -0
- package/dist/_internal/server/features/search/index-build/sources.js +385 -0
- package/dist/_internal/server/features/search/search-sources.d.ts +0 -15
- package/dist/_internal/server/features/search/search-sources.js +142 -7
- package/dist/_internal/server/features/seo/robots.js +21 -1
- package/dist/_internal/server/features/seo/sitemap.js +1 -1
- package/dist/_internal/server/features/shared/listing-data-factory.js +16 -4
- package/dist/_internal/server/features/site-settings/adapters.d.ts +1 -1
- package/dist/_internal/server/features/site-settings/adapters.js +26 -0
- package/dist/_internal/server/features/sticker-trace/actions.d.ts +109 -0
- package/dist/_internal/server/features/sticker-trace/actions.js +172 -0
- package/dist/_internal/server/features/sticker-trace/adapters.d.ts +80 -0
- package/dist/_internal/server/features/sticker-trace/adapters.js +174 -0
- package/dist/_internal/server/features/sticker-trace/build-cut-file.d.ts +26 -0
- package/dist/_internal/server/features/sticker-trace/build-cut-file.js +127 -0
- package/dist/_internal/server/features/sticker-trace/coordinator.d.ts +27 -0
- package/dist/_internal/server/features/sticker-trace/coordinator.js +169 -0
- package/dist/_internal/server/features/sticker-trace/fanout.d.ts +43 -0
- package/dist/_internal/server/features/sticker-trace/fanout.js +180 -0
- package/dist/_internal/server/features/sticker-trace/finalizer.d.ts +25 -0
- package/dist/_internal/server/features/sticker-trace/finalizer.js +123 -0
- package/dist/_internal/server/features/sticker-trace/mosaic-inputs.d.ts +30 -0
- package/dist/_internal/server/features/sticker-trace/mosaic-inputs.js +112 -0
- package/dist/_internal/server/features/sticker-trace/progress.d.ts +81 -0
- package/dist/_internal/server/features/sticker-trace/progress.js +198 -0
- package/dist/_internal/server/features/sticker-trace/promote.d.ts +23 -0
- package/dist/_internal/server/features/sticker-trace/promote.js +193 -0
- package/dist/_internal/server/features/sticker-trace/shard.d.ts +50 -0
- package/dist/_internal/server/features/sticker-trace/shard.js +174 -0
- package/dist/_internal/server/features/sticker-trace/sheet-actions.d.ts +141 -0
- package/dist/_internal/server/features/sticker-trace/sheet-actions.js +279 -0
- package/dist/_internal/server/features/sticker-trace/storage.d.ts +135 -0
- package/dist/_internal/server/features/sticker-trace/storage.js +282 -0
- package/dist/_internal/server/functions/scheduled.d.ts +2 -1
- package/dist/_internal/server/functions/scheduled.js +25 -1
- package/dist/_internal/server/jobs/core/_event-ref.d.ts +51 -0
- package/dist/_internal/server/jobs/core/_event-ref.js +63 -0
- package/dist/_internal/server/jobs/core/assignSpinPrize.d.ts +18 -0
- package/dist/_internal/server/jobs/core/assignSpinPrize.js +77 -16
- package/dist/_internal/server/jobs/core/auctionSettlement.js +13 -4
- package/dist/_internal/server/jobs/core/autoPayoutEligibility.js +44 -15
- package/dist/_internal/server/jobs/core/bundleStockSync.js +3 -4
- package/dist/_internal/server/jobs/core/cleanupRtdbEvents.js +44 -0
- package/dist/_internal/server/jobs/core/event-draw-reasons.d.ts +78 -0
- package/dist/_internal/server/jobs/core/event-draw-reasons.js +133 -0
- package/dist/_internal/server/jobs/core/listingProcessor.js +28 -8
- package/dist/_internal/server/jobs/core/onOrderCreate.js +12 -1
- package/dist/_internal/server/jobs/core/onScamReportCreate.js +13 -2
- package/dist/_internal/server/jobs/core/onScamReportRejected.js +8 -2
- package/dist/_internal/server/jobs/core/onScamReportVerified.js +8 -2
- package/dist/_internal/server/jobs/core/onStoreWrite.js +11 -4
- package/dist/_internal/server/jobs/core/prizeDrawAssignWinner.js +5 -4
- package/dist/_internal/server/jobs/core/prizeDrawExpiryReveal.js +1 -4
- package/dist/_internal/server/jobs/core/prizeDrawSoldOutReveal.js +1 -2
- package/dist/_internal/server/jobs/core/promotions.js +7 -4
- package/dist/_internal/server/jobs/core/searchIndexBuild.d.ts +7 -0
- package/dist/_internal/server/jobs/core/searchIndexBuild.js +211 -0
- package/dist/_internal/server/jobs/core/triggerEventRaffle.d.ts +35 -0
- package/dist/_internal/server/jobs/core/triggerEventRaffle.js +213 -31
- package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.js +20 -14
- package/dist/_internal/server/jobs/handlers/assignSpinPrize.d.ts +8 -0
- package/dist/_internal/server/jobs/handlers/assignSpinPrize.js +15 -15
- package/dist/_internal/server/jobs/handlers/index.d.ts +1 -0
- package/dist/_internal/server/jobs/handlers/index.js +1 -0
- package/dist/_internal/server/jobs/handlers/onCategoryWrite.js +18 -0
- package/dist/_internal/server/jobs/handlers/onProductWrite.js +18 -0
- package/dist/_internal/server/jobs/handlers/onReviewWrite.js +18 -0
- package/dist/_internal/server/jobs/handlers/onScamReportUpdate.js +18 -0
- package/dist/_internal/server/jobs/handlers/onStoreWrite.js +18 -0
- package/dist/_internal/server/jobs/handlers/searchIndexBuild.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/searchIndexBuild.js +2 -0
- package/dist/_internal/server/jobs/handlers/triggerEventRaffle.d.ts +8 -0
- package/dist/_internal/server/jobs/handlers/triggerEventRaffle.js +15 -6
- package/dist/_internal/shared/actions/action-registry.js +29 -0
- package/dist/_internal/shared/cache/revalidate-targets.d.ts +0 -1
- package/dist/_internal/shared/cache/revalidate-targets.js +10 -8
- package/dist/_internal/shared/features/events/config.d.ts +14 -0
- package/dist/_internal/shared/features/events/config.js +14 -0
- package/dist/_internal/shared/features/notifications/action-url.js +8 -0
- package/dist/_internal/shared/features/site-settings/types.d.ts +11 -0
- package/dist/_internal/shared/features/sticker-trace/codec.d.ts +81 -0
- package/dist/_internal/shared/features/sticker-trace/codec.js +30 -0
- package/dist/_internal/shared/features/sticker-trace/config.d.ts +81 -0
- package/dist/_internal/shared/features/sticker-trace/config.js +177 -0
- package/dist/_internal/shared/features/sticker-trace/cut-contour.d.ts +20 -0
- package/dist/_internal/shared/features/sticker-trace/cut-contour.js +60 -0
- package/dist/_internal/shared/features/sticker-trace/export/build-export-set.d.ts +65 -0
- package/dist/_internal/shared/features/sticker-trace/export/build-export-set.js +176 -0
- package/dist/_internal/shared/features/sticker-trace/export/cut-svg.d.ts +56 -0
- package/dist/_internal/shared/features/sticker-trace/export/cut-svg.js +120 -0
- package/dist/_internal/shared/features/sticker-trace/export/machine-profiles.d.ts +92 -0
- package/dist/_internal/shared/features/sticker-trace/export/machine-profiles.js +153 -0
- package/dist/_internal/shared/features/sticker-trace/export/nesting.d.ts +51 -0
- package/dist/_internal/shared/features/sticker-trace/export/nesting.js +110 -0
- package/dist/_internal/shared/features/sticker-trace/export/page-sizes.d.ts +68 -0
- package/dist/_internal/shared/features/sticker-trace/export/page-sizes.js +223 -0
- package/dist/_internal/shared/features/sticker-trace/export/part-tiling.d.ts +51 -0
- package/dist/_internal/shared/features/sticker-trace/export/part-tiling.js +178 -0
- package/dist/_internal/shared/features/sticker-trace/export/simplify-budget.d.ts +26 -0
- package/dist/_internal/shared/features/sticker-trace/export/simplify-budget.js +134 -0
- package/dist/_internal/shared/features/sticker-trace/export/vectorise-art.d.ts +40 -0
- package/dist/_internal/shared/features/sticker-trace/export/vectorise-art.js +195 -0
- package/dist/_internal/shared/features/sticker-trace/index.d.ts +2 -0
- package/dist/_internal/shared/features/sticker-trace/index.js +59 -0
- package/dist/_internal/shared/features/sticker-trace/math/catmull-rom.d.ts +11 -0
- package/dist/_internal/shared/features/sticker-trace/math/catmull-rom.js +66 -0
- package/dist/_internal/shared/features/sticker-trace/math/edt.d.ts +27 -0
- package/dist/_internal/shared/features/sticker-trace/math/edt.js +165 -0
- package/dist/_internal/shared/features/sticker-trace/math/label.d.ts +15 -0
- package/dist/_internal/shared/features/sticker-trace/math/label.js +156 -0
- package/dist/_internal/shared/features/sticker-trace/math/marching-squares.d.ts +16 -0
- package/dist/_internal/shared/features/sticker-trace/math/marching-squares.js +242 -0
- package/dist/_internal/shared/features/sticker-trace/math/morphology.d.ts +46 -0
- package/dist/_internal/shared/features/sticker-trace/math/morphology.js +168 -0
- package/dist/_internal/shared/features/sticker-trace/math/rasterize-path.d.ts +88 -0
- package/dist/_internal/shared/features/sticker-trace/math/rasterize-path.js +286 -0
- package/dist/_internal/shared/features/sticker-trace/math/rdp.d.ts +10 -0
- package/dist/_internal/shared/features/sticker-trace/math/rdp.js +74 -0
- package/dist/_internal/shared/features/sticker-trace/resume.d.ts +50 -0
- package/dist/_internal/shared/features/sticker-trace/resume.js +160 -0
- package/dist/_internal/shared/features/sticker-trace/trace/cluster.d.ts +20 -0
- package/dist/_internal/shared/features/sticker-trace/trace/cluster.js +132 -0
- package/dist/_internal/shared/features/sticker-trace/trace/cross-profile.d.ts +28 -0
- package/dist/_internal/shared/features/sticker-trace/trace/cross-profile.js +120 -0
- package/dist/_internal/shared/features/sticker-trace/trace/flood.d.ts +21 -0
- package/dist/_internal/shared/features/sticker-trace/trace/flood.js +104 -0
- package/dist/_internal/shared/features/sticker-trace/trace/geometry.d.ts +3 -0
- package/dist/_internal/shared/features/sticker-trace/trace/geometry.js +140 -0
- package/dist/_internal/shared/features/sticker-trace/trace/line-filter.d.ts +15 -0
- package/dist/_internal/shared/features/sticker-trace/trace/line-filter.js +138 -0
- package/dist/_internal/shared/features/sticker-trace/trace/merge.d.ts +27 -0
- package/dist/_internal/shared/features/sticker-trace/trace/merge.js +187 -0
- package/dist/_internal/shared/features/sticker-trace/trace/paper.d.ts +32 -0
- package/dist/_internal/shared/features/sticker-trace/trace/paper.js +147 -0
- package/dist/_internal/shared/features/sticker-trace/trace/prefilter.d.ts +30 -0
- package/dist/_internal/shared/features/sticker-trace/trace/prefilter.js +125 -0
- package/dist/_internal/shared/features/sticker-trace/trace/quantise.d.ts +10 -0
- package/dist/_internal/shared/features/sticker-trace/trace/quantise.js +153 -0
- package/dist/_internal/shared/features/sticker-trace/trace/ridge.d.ts +88 -0
- package/dist/_internal/shared/features/sticker-trace/trace/ridge.js +344 -0
- package/dist/_internal/shared/features/sticker-trace/trace/segment.d.ts +10 -0
- package/dist/_internal/shared/features/sticker-trace/trace/segment.js +251 -0
- package/dist/_internal/shared/features/sticker-trace/types.d.ts +197 -0
- package/dist/_internal/shared/features/sticker-trace/types.js +49 -0
- package/dist/_internal/shared/listing-types/_registry.d.ts +11 -0
- package/dist/_internal/shared/listing-types/art/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/art/config.js +1 -0
- package/dist/_internal/shared/listing-types/auction/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/auction/config.js +1 -0
- package/dist/_internal/shared/listing-types/classified/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/classified/config.js +1 -0
- package/dist/_internal/shared/listing-types/digital-code/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/digital-code/config.js +1 -0
- package/dist/_internal/shared/listing-types/feature-flags.d.ts +7 -0
- package/dist/_internal/shared/listing-types/feature-flags.js +9 -0
- package/dist/_internal/shared/listing-types/live/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/live/config.js +1 -0
- package/dist/_internal/shared/listing-types/pre-order/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/pre-order/config.js +1 -0
- package/dist/_internal/shared/listing-types/prize-draw/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/prize-draw/config.js +1 -0
- package/dist/_internal/shared/listing-types/standard/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/standard/config.js +1 -0
- package/dist/_internal/shared/listing-types/stickers/config.d.ts +1 -0
- package/dist/_internal/shared/listing-types/stickers/config.js +1 -0
- package/dist/_internal/shared/media/limits.d.ts +12 -2
- package/dist/_internal/shared/media/limits.js +12 -2
- package/dist/_internal/shared/search/artifact-url.d.ts +35 -0
- package/dist/_internal/shared/search/artifact-url.js +119 -0
- package/dist/_internal/shared/search/index-record.d.ts +68 -0
- package/dist/_internal/shared/search/index-record.js +96 -0
- package/dist/_internal/shared/search/match.d.ts +65 -0
- package/dist/_internal/shared/search/match.js +263 -0
- package/dist/client.d.ts +8 -7
- package/dist/client.js +12 -5
- package/dist/configs/eslint.js +22 -2
- package/dist/constants/api-endpoints.d.ts +68 -0
- package/dist/constants/api-endpoints.js +32 -0
- package/dist/constants/field-names.d.ts +7 -1
- package/dist/constants/field-names.js +36 -1
- package/dist/contracts/repository.d.ts +8 -7
- package/dist/contracts/search.d.ts +2 -2
- package/dist/contracts/table.d.ts +3 -3
- package/dist/contracts/table.js +3 -3
- package/dist/core/contact-submissions.repository.js +2 -2
- package/dist/core/integration-keys.js +7 -1
- package/dist/core/newsletter.repository.js +2 -2
- package/dist/core/site-config.js +1 -1
- package/dist/errors/error-codes.d.ts +30 -0
- package/dist/errors/error-codes.js +30 -0
- package/dist/errors/error-display-map.js +40 -1
- package/dist/features/account/api/[userId]/addresses/route.js +1 -1
- package/dist/features/account/components/UserBidsView.js +1 -1
- package/dist/features/account/components/index.d.ts +0 -8
- package/dist/features/account/components/index.js +0 -4
- package/dist/features/addresses/repository/addresses.repository.d.ts +17 -6
- package/dist/features/addresses/repository/addresses.repository.js +65 -9
- package/dist/features/addresses/schemas/firestore.d.ts +17 -6
- package/dist/features/admin/actions/notification-actions.js +15 -6
- package/dist/features/admin/api/bids/route.js +1 -1
- package/dist/features/admin/api/coupons/route.js +1 -1
- package/dist/features/admin/api/products/route.js +1 -1
- package/dist/features/admin/api/reviews/route.js +1 -1
- package/dist/features/admin/components/AdminAdEditorView.js +19 -5
- package/dist/features/admin/components/AdminAuditLogView.js +1 -1
- package/dist/features/admin/components/AdminBlogEditorView.js +0 -1
- package/dist/features/admin/components/AdminBlogView.js +1 -1
- package/dist/features/admin/components/AdminBrandsView.js +17 -1
- package/dist/features/admin/components/AdminCategoryEditorView.js +0 -1
- package/dist/features/admin/components/AdminContactView.js +1 -1
- package/dist/features/admin/components/AdminEmployeeEditorView.js +1 -3
- package/dist/features/admin/components/AdminNewsletterView.js +1 -1
- package/dist/features/admin/components/AdminOrdersView.js +9 -2
- package/dist/features/admin/components/AdminPayoutsView.js +1 -1
- package/dist/features/admin/components/AdminPrizeDrawsView.js +11 -0
- package/dist/features/admin/components/AdminProductEditorView.d.ts +10 -1
- package/dist/features/admin/components/AdminProductEditorView.js +24 -37
- package/dist/features/admin/components/AdminProductsView.js +10 -3
- package/dist/features/admin/components/AdminScammersView.js +1 -1
- package/dist/features/admin/components/AdminSectionsView.js +21 -5
- package/dist/features/admin/components/AdminSessionsView.js +1 -1
- package/dist/features/admin/components/AdminSublistingCategoriesView.js +22 -1
- package/dist/features/admin/components/AdminTeamView.js +1 -1
- package/dist/features/admin/components/AdminTesterChecklistItemEditorView.js +0 -1
- package/dist/features/admin/components/AdminUsersView.js +1 -1
- package/dist/features/admin/components/DataListingView.d.ts +2 -1
- package/dist/features/admin/components/DataListingView.js +9 -4
- package/dist/features/admin/components/analytics/AdminPageViewsReportView.js +0 -2
- package/dist/features/admin/hooks/useAdminListing.d.ts +1 -1
- package/dist/features/admin/repository/site-settings.repository.js +8 -3
- package/dist/features/admin/schemas/firestore.d.ts +62 -1
- package/dist/features/admin/schemas/firestore.js +32 -0
- package/dist/features/admin/types/index.d.ts +1 -1
- package/dist/features/auctions/actions/bid-actions.d.ts +2 -2
- package/dist/features/auctions/actions/bid-actions.js +16 -4
- package/dist/features/auctions/api/route.js +1 -1
- package/dist/features/auctions/components/AuctionBottomActions.js +4 -0
- package/dist/features/auctions/repository/bid.repository.d.ts +46 -4
- package/dist/features/auctions/repository/bid.repository.js +114 -13
- package/dist/features/auctions/schemas/firestore.d.ts +24 -4
- package/dist/features/auctions/schemas/firestore.js +1 -0
- package/dist/features/auth/actions/profile-actions.js +30 -4
- package/dist/features/auth/components/index.d.ts +0 -1
- package/dist/features/auth/components/index.js +0 -1
- package/dist/features/auth/repository/session.repository.d.ts +17 -3
- package/dist/features/auth/repository/session.repository.js +46 -5
- package/dist/features/auth/repository/token.repository.d.ts +27 -4
- package/dist/features/auth/repository/token.repository.js +65 -11
- package/dist/features/auth/repository/user.repository.d.ts +33 -7
- package/dist/features/auth/repository/user.repository.js +100 -15
- package/dist/features/auth/schemas/firestore.d.ts +63 -12
- package/dist/features/auth/schemas/firestore.js +11 -0
- package/dist/features/before-after/api/route.js +1 -1
- package/dist/features/blog/components/BlogListView.js +16 -3
- package/dist/features/blog/components/BlogPostView.js +1 -1
- package/dist/features/blog/schemas/index.d.ts +2 -2
- package/dist/features/cart/api/route.js +1 -1
- package/dist/features/catalogue/repository/catalogue.repository.d.ts +7 -7
- package/dist/features/catalogue/repository/catalogue.repository.js +28 -10
- package/dist/features/catalogue/schemas/firestore.d.ts +11 -0
- package/dist/features/categories/api/route.js +10 -10
- package/dist/features/categories/components/CategoryDetailPageView.js +35 -5
- package/dist/features/categories/components/CategorySelectorCreate.js +0 -1
- package/dist/features/categories/components/index.d.ts +0 -2
- package/dist/features/categories/components/index.js +0 -1
- package/dist/features/categories/repository/categories.repository.d.ts +1 -0
- package/dist/features/categories/repository/categories.repository.js +31 -1
- package/dist/features/categories/schemas/index.d.ts +2 -2
- package/dist/features/categories/utils/taxonomy-visual.d.ts +21 -0
- package/dist/features/categories/utils/taxonomy-visual.js +58 -0
- package/dist/features/checkout/actions/checkout-value-otp-actions.js +8 -1
- package/dist/features/collections/api/[slug]/route.js +3 -3
- package/dist/features/collections/api/route.js +1 -1
- package/dist/features/consultation/api/route.js +1 -1
- package/dist/features/consultation/repository/consultations.repository.js +1 -1
- package/dist/features/consultation/types/index.d.ts +1 -1
- package/dist/features/contact/components/ContactForm.js +1 -3
- package/dist/features/corporate/api/route.js +1 -1
- package/dist/features/corporate/repository/corporate.repository.js +1 -1
- package/dist/features/corporate/types/index.d.ts +1 -1
- package/dist/features/cron/jobs/auction-expiry.job.js +1 -1
- package/dist/features/cron/jobs/preorder-reminder.job.js +1 -1
- package/dist/features/events/actions/event-actions.d.ts +14 -0
- package/dist/features/events/actions/event-actions.js +82 -3
- package/dist/features/events/api/[id]/route.js +2 -2
- package/dist/features/events/components/AdminEventEditorView.js +22 -3
- package/dist/features/events/components/AdminEventsView.js +32 -8
- package/dist/features/events/components/EventRafflesSection.d.ts +34 -1
- package/dist/features/events/components/EventRafflesSection.js +52 -3
- package/dist/features/events/components/SpinWheelView.d.ts +2 -2
- package/dist/features/events/components/SpinWheelView.js +41 -4
- package/dist/features/events/repository/event-entry.repository.d.ts +14 -2
- package/dist/features/events/repository/event-entry.repository.js +41 -7
- package/dist/features/events/schemas/firestore.d.ts +17 -4
- package/dist/features/events/types/index.d.ts +37 -0
- package/dist/features/faq/repository/faqs.repository.js +1 -1
- package/dist/features/faq/schemas/index.d.ts +5 -2
- package/dist/features/faq/schemas/index.js +6 -0
- package/dist/features/faq/types/index.d.ts +0 -1
- package/dist/features/grouped/components/GroupedListingEditorView.js +17 -2
- package/dist/features/homepage/api/carousel/[id]/route.js +1 -1
- package/dist/features/homepage/api/carousel/route.js +4 -4
- package/dist/features/homepage/api/route.js +2 -2
- package/dist/features/homepage/api/sections/route.js +1 -1
- package/dist/features/homepage/components/AnnouncementBar.d.ts +1 -9
- package/dist/features/homepage/components/AnnouncementBar.js +13 -19
- package/dist/features/homepage/components/MarketplaceHomepageView.js +6 -1
- package/dist/features/homepage/components/index.d.ts +0 -2
- package/dist/features/homepage/components/index.js +0 -1
- package/dist/features/homepage/repository/homepage.repository.js +1 -1
- package/dist/features/homepage/schemas/firestore.d.ts +6 -0
- package/dist/features/homepage/schemas/index.d.ts +10 -10
- package/dist/features/layout/AppLayoutShell.d.ts +12 -3
- package/dist/features/layout/AppLayoutShell.js +65 -13
- package/dist/features/layout/BottomActionsContext.d.ts +16 -0
- package/dist/features/layout/BottomActionsContext.js +5 -0
- package/dist/features/layout/BottomChrome.js +48 -9
- package/dist/features/layout/BottomNavbar.d.ts +14 -0
- package/dist/features/layout/BottomNavbar.js +43 -3
- package/dist/features/layout/MainNavbar.d.ts +11 -0
- package/dist/features/layout/NavbarLayout.d.ts +3 -0
- package/dist/features/layout/NavbarLayout.js +88 -11
- package/dist/features/layout/SideActionDock.d.ts +1 -0
- package/dist/features/layout/SideActionDock.js +219 -0
- package/dist/features/layout/TitleBarLayout.d.ts +1 -3
- package/dist/features/layout/TitleBarLayout.js +3 -4
- package/dist/features/layout/cta-anchor.d.ts +31 -0
- package/dist/features/layout/cta-anchor.js +31 -0
- package/dist/features/layout/hooks/useBottomActions.d.ts +7 -0
- package/dist/features/layout/hooks/useBottomActions.js +6 -1
- package/dist/features/layout/index.d.ts +9 -1
- package/dist/features/layout/index.js +9 -1
- package/dist/features/layout/useCtaReveal.d.ts +24 -0
- package/dist/features/layout/useCtaReveal.js +82 -0
- package/dist/features/layout/useHoldToOpen.d.ts +41 -0
- package/dist/features/layout/useHoldToOpen.js +84 -0
- package/dist/features/lottery/repository/lottery-entry.repository.d.ts +18 -3
- package/dist/features/lottery/repository/lottery-entry.repository.js +48 -6
- package/dist/features/lottery/schemas/firestore.d.ts +33 -5
- package/dist/features/loyalty/api/balance/route.js +1 -1
- package/dist/features/loyalty/api/history/route.js +1 -1
- package/dist/features/media/MediaImage.js +0 -1
- package/dist/features/media/MediaPickerModal.js +7 -1
- package/dist/features/media/modals/ImageEditor.js +5 -1
- package/dist/features/media/modals/VideoThumbnailSelector.js +17 -1
- package/dist/features/media/repository/media-assets.repository.d.ts +19 -0
- package/dist/features/media/upload/CameraCapture.js +16 -1
- package/dist/features/media/upload/ImageUpload.js +42 -4
- package/dist/features/media/upload/MediaUploadField.js +69 -13
- package/dist/features/media/upload/downscale-image.d.ts +56 -0
- package/dist/features/media/upload/downscale-image.js +150 -0
- package/dist/features/messages/components/ConversationThreadView.js +45 -2
- package/dist/features/messages/components/MessageSellerButton.d.ts +15 -1
- package/dist/features/messages/components/MessageSellerButton.js +10 -2
- package/dist/features/messages/schemas/firestore.d.ts +15 -0
- package/dist/features/orders/hooks/useOrders.js +4 -2
- package/dist/features/orders/repository/orders.repository.d.ts +15 -4
- package/dist/features/orders/repository/orders.repository.js +52 -20
- package/dist/features/orders/schemas/firestore.d.ts +15 -4
- package/dist/features/orders/schemas/index.d.ts +8 -8
- package/dist/features/orders/types/index.d.ts +2 -2
- package/dist/features/payments/repository/payments.repository.js +2 -2
- package/dist/features/payments/repository/payout.repository.d.ts +23 -6
- package/dist/features/payments/repository/payout.repository.js +63 -23
- package/dist/features/payments/repository/saved-payment-methods.repository.d.ts +17 -6
- package/dist/features/payments/repository/saved-payment-methods.repository.js +59 -11
- package/dist/features/payments/schemas/firestore.d.ts +14 -3
- package/dist/features/payments/schemas/saved-methods-firestore.d.ts +12 -1
- package/dist/features/pre-orders/api/[slug]/route.js +1 -1
- package/dist/features/pre-orders/api/admin/route.js +1 -1
- package/dist/features/pre-orders/api/route.js +1 -1
- package/dist/features/pre-orders/repository/pre-orders.repository.d.ts +3 -3
- package/dist/features/pre-orders/repository/pre-orders.repository.js +6 -6
- package/dist/features/products/api/[id]/route.js +1 -1
- package/dist/features/products/components/ListingBottomActions.js +4 -0
- package/dist/features/products/components/ProductDetailPageView.js +2 -1
- package/dist/features/products/components/ProductGalleryClient.js +2 -2
- package/dist/features/products/components/ProductGrid.js +12 -1
- package/dist/features/products/components/index.d.ts +0 -2
- package/dist/features/products/components/index.js +0 -1
- package/dist/features/products/config/listing-type-listing-config.d.ts +0 -3
- package/dist/features/products/config/listing-type-listing-config.js +27 -2
- package/dist/features/products/constants/listing-tabs.d.ts +9 -0
- package/dist/features/products/constants/listing-tabs.js +3 -2
- package/dist/features/products/hooks/useProducts.js +2 -2
- package/dist/features/products/repository/products.repository.js +13 -1
- package/dist/features/products/schemas/index.d.ts +2 -2
- package/dist/features/products/types/index.d.ts +1 -1
- package/dist/features/promotions/api/route.js +1 -1
- package/dist/features/reviews/actions/review-actions.d.ts +6 -6
- package/dist/features/reviews/actions/review-actions.js +22 -8
- package/dist/features/reviews/components/ReviewDetailPageView.js +13 -1
- package/dist/features/reviews/components/ReviewsIndexPageView.js +21 -4
- package/dist/features/reviews/repository/reviews.repository.d.ts +19 -7
- package/dist/features/reviews/repository/reviews.repository.js +63 -12
- package/dist/features/reviews/schemas/firestore.d.ts +13 -2
- package/dist/features/reviews/schemas/index.d.ts +2 -2
- package/dist/features/scams/actions/scam-actions.js +16 -4
- package/dist/features/search/components/SearchResultsPageView.js +2 -1
- package/dist/features/search/hooks/useSearchIndex.d.ts +34 -0
- package/dist/features/search/hooks/useSearchIndex.js +172 -0
- package/dist/features/search/repository/search.repository.js +2 -2
- package/dist/features/seller/actions/offer-actions.d.ts +5 -5
- package/dist/features/seller/actions/offer-actions.js +38 -8
- package/dist/features/seller/actions/seller-actions.js +34 -7
- package/dist/features/seller/api/coupons/route.js +1 -1
- package/dist/features/seller/api/products/route.js +1 -1
- package/dist/features/seller/api/store/route.js +1 -1
- package/dist/features/seller/components/SellerBidsView.js +1 -1
- package/dist/features/seller/components/SellerCouponsView.js +1 -1
- package/dist/features/seller/components/SellerListingTypeView.js +9 -1
- package/dist/features/seller/components/SellerOrdersView.js +1 -1
- package/dist/features/seller/components/SellerPayoutSettingsView.js +0 -1
- package/dist/features/seller/components/SellerPayoutsView.js +1 -1
- package/dist/features/seller/components/SellerProductShell.js +0 -1
- package/dist/features/seller/components/SellerProductsView.js +1 -1
- package/dist/features/seller/components/SellerShippingView.js +0 -1
- package/dist/features/seller/components/SellerStorefrontView.js +0 -1
- package/dist/features/seller/components/index.d.ts +0 -4
- package/dist/features/seller/components/index.js +0 -2
- package/dist/features/seller/repository/offer.repository.d.ts +15 -3
- package/dist/features/seller/repository/offer.repository.js +43 -7
- package/dist/features/seller/schemas/firestore.d.ts +14 -3
- package/dist/features/seller/schemas/index.d.ts +4 -4
- package/dist/features/seller/schemas/order-forms.d.ts +39 -0
- package/dist/features/seller/schemas/order-forms.js +37 -0
- package/dist/features/shell/FormShell.js +6 -2
- package/dist/features/shell/QuickFormDrawer.js +15 -1
- package/dist/features/shipments/components/AdminShipmentEditorView.js +0 -1
- package/dist/features/shipments/components/AdminShipmentsView.js +1 -1
- package/dist/features/sticker-trace/components/StickerCommitPanel.d.ts +30 -0
- package/dist/features/sticker-trace/components/StickerCommitPanel.js +93 -0
- package/dist/features/sticker-trace/components/StickerPrintPanel.d.ts +33 -0
- package/dist/features/sticker-trace/components/StickerPrintPanel.js +104 -0
- package/dist/features/sticker-trace/components/StickerRetryPanel.d.ts +20 -0
- package/dist/features/sticker-trace/components/StickerRetryPanel.js +128 -0
- package/dist/features/sticker-trace/components/StickerRunHistoryPanel.d.ts +45 -0
- package/dist/features/sticker-trace/components/StickerRunHistoryPanel.js +84 -0
- package/dist/features/sticker-trace/components/StickerTraceStudio.d.ts +27 -0
- package/dist/features/sticker-trace/components/StickerTraceStudio.js +171 -0
- package/dist/features/sticker-trace/constants/help-content.d.ts +23 -0
- package/dist/features/sticker-trace/constants/help-content.js +172 -0
- package/dist/features/sticker-trace/hooks/useLiveTrace.d.ts +27 -0
- package/dist/features/sticker-trace/hooks/useLiveTrace.js +160 -0
- package/dist/features/sticker-trace/hooks/useStickerTraceProgress.d.ts +22 -0
- package/dist/features/sticker-trace/hooks/useStickerTraceProgress.js +106 -0
- package/dist/features/sticker-trace/repository/sticker-sheets.repository.d.ts +113 -0
- package/dist/features/sticker-trace/repository/sticker-sheets.repository.js +146 -0
- package/dist/features/sticker-trace/repository/sticker-trace-runs.repository.d.ts +132 -0
- package/dist/features/sticker-trace/repository/sticker-trace-runs.repository.js +174 -0
- package/dist/features/sticker-trace/schemas/firestore.d.ts +248 -0
- package/dist/features/sticker-trace/schemas/firestore.js +79 -0
- package/dist/features/sticker-trace/server.d.ts +8 -0
- package/dist/features/sticker-trace/server.js +51 -0
- package/dist/features/stores/actions/store-query-actions.d.ts +2 -2
- package/dist/features/stores/actions/store-query-actions.js +7 -2
- package/dist/features/stores/api/[storeSlug]/auctions/route.js +3 -3
- package/dist/features/stores/api/[storeSlug]/products/route.js +3 -3
- package/dist/features/stores/api/[storeSlug]/reviews/route.js +1 -1
- package/dist/features/stores/api/[storeSlug]/route.js +1 -1
- package/dist/features/stores/components/StoreNavTabs.js +17 -2
- package/dist/features/stores/manifest.js +8 -4
- package/dist/features/support/repository/support.repository.d.ts +14 -3
- package/dist/features/support/repository/support.repository.js +93 -13
- package/dist/features/support/schemas/firestore.d.ts +16 -5
- package/dist/features/tester/seed-data/authored/admin__events-raffles-spin.js +61 -19
- package/dist/features/tester/seed-data/authored/buying__browsing-search.js +19 -3
- package/dist/features/tester/seed-data/authored/content-discovery__authenticity-checker.d.ts +2 -0
- package/dist/features/tester/seed-data/authored/content-discovery__authenticity-checker.js +243 -0
- package/dist/features/tester/seed-data/authored/content-discovery__events.js +36 -10
- package/dist/features/tester/seed-data/authored/content-discovery__overflowing-pill-rows.d.ts +2 -0
- package/dist/features/tester/seed-data/authored/content-discovery__overflowing-pill-rows.js +209 -0
- package/dist/features/tester/seed-data/authored/design-ux__header-brand-mark-centring.d.ts +2 -0
- package/dist/features/tester/seed-data/authored/design-ux__header-brand-mark-centring.js +90 -0
- package/dist/features/tester/seed-data/authored/design-ux__header-controls-and-messages.d.ts +2 -0
- package/dist/features/tester/seed-data/authored/design-ux__header-controls-and-messages.js +85 -0
- package/dist/features/tester/seed-data/authored/index.js +10 -0
- package/dist/features/tester/seed-data/authored/selling__media-limits.js +19 -17
- package/dist/features/tester/seed-data/authored/selling__product-upload-details.js +10 -5
- package/dist/features/tester/seed-data/authored/tools__sticker-tracer.d.ts +2 -0
- package/dist/features/tester/seed-data/authored/tools__sticker-tracer.js +283 -0
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +235 -22
- package/dist/index.d.ts +10 -23
- package/dist/index.js +27 -19
- package/dist/next/api/routeHandler.js +9 -0
- package/dist/next/routing/require-record.d.ts +13 -0
- package/dist/next/routing/require-record.js +62 -0
- package/dist/next/routing/route-map.d.ts +4 -4
- package/dist/next/routing/route-map.js +25 -3
- package/dist/providers/db-firebase/base.d.ts +4 -2
- package/dist/providers/db-firebase/base.js +21 -5
- package/dist/providers/db-firebase/base.repository.d.ts +11 -9
- package/dist/providers/db-firebase/base.repository.js +19 -0
- package/dist/providers/db-firebase/rtdb-paths.d.ts +12 -0
- package/dist/providers/db-firebase/rtdb-paths.js +12 -0
- package/dist/react/ErrorBoundary.js +6 -1
- package/dist/react/hooks/realtime-event-constants.d.ts +1 -0
- package/dist/react/hooks/realtime-event-constants.js +8 -0
- package/dist/react/hooks/useEntityDelete.js +5 -1
- package/dist/react/hooks/useMessage.js +5 -1
- package/dist/repositories/index.d.ts +2 -2
- package/dist/repositories/index.js +6 -1
- package/dist/schemas/registry.d.ts +13 -20
- package/dist/schemas/registry.js +31 -14
- package/dist/schemas/webhooks/google-oauth.d.ts +2 -2
- package/dist/security/encrypted.d.ts +117 -0
- package/dist/security/encrypted.js +100 -0
- package/dist/security/index.d.ts +5 -2
- package/dist/security/index.js +16 -2
- package/dist/security/pii-accessors.d.ts +71 -0
- package/dist/security/pii-accessors.js +150 -0
- package/dist/security/pii-encrypt.d.ts +0 -8
- package/dist/security/pii-encrypt.js +22 -15
- package/dist/security/pii-mask.d.ts +18 -0
- package/dist/security/pii-mask.js +27 -0
- package/dist/seed/_helpers/search-txt-wrappers.d.ts +6 -6
- package/dist/seed/_helpers/search-txt-wrappers.js +22 -0
- package/dist/seed/addresses-seed-data.d.ts +2 -2
- package/dist/seed/authenticity-knowledge-seed-data.d.ts +34 -0
- package/dist/seed/authenticity-knowledge-seed-data.js +1277 -0
- package/dist/seed/bids-seed-data.d.ts +2 -2
- package/dist/seed/bids-seed-data.js +23 -2
- package/dist/seed/events-seed-data.d.ts +2 -2
- package/dist/seed/events-seed-data.js +5 -0
- package/dist/seed/faq-seed-data.js +175 -5
- package/dist/seed/homepage-sections-seed-data.js +39 -23
- 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 -2
- package/dist/seed/offers-seed-data.d.ts +2 -2
- package/dist/seed/offers-seed-data.js +1 -1
- package/dist/seed/orders-seed-data.d.ts +2 -2
- package/dist/seed/payouts-seed-data.d.ts +2 -2
- package/dist/seed/payouts-seed-data.js +1 -1
- package/dist/seed/reviews-seed-data.d.ts +1 -2
- package/dist/seed/seed-purpose.js +7 -0
- package/dist/seed/sessions-seed-data.d.ts +2 -2
- package/dist/seed/sessions-seed-data.js +5 -0
- package/dist/seed/site-settings-seed-data.js +1 -1
- package/dist/seed/support-tickets-seed-data.d.ts +2 -2
- package/dist/seed/support-tickets-seed-data.js +1 -1
- package/dist/seed/users-seed-data.d.ts +2 -2
- package/dist/seed/users-seed-data.js +1 -1
- package/dist/seo/json-ld.js +5 -1
- package/dist/server.d.ts +18 -3
- package/dist/server.js +59 -3
- package/dist/styles.css +237 -1
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/components/Button.js +7 -1
- package/dist/ui/components/FilterChipGroup.d.ts +11 -0
- package/dist/ui/components/FilterChipGroup.js +1 -1
- package/dist/ui/components/ImageGallery.js +6 -1
- package/dist/ui/components/ListingLayout.js +14 -8
- package/dist/ui/components/OverflowRow.d.ts +92 -0
- package/dist/ui/components/OverflowRow.js +203 -0
- package/dist/ui/components/OverflowRow.style.css +235 -0
- package/dist/ui/components/RecordDetailModal.js +14 -1
- package/dist/ui/components/RowActionMenu.js +5 -1
- package/dist/ui/components/SideDrawer.js +5 -1
- package/dist/ui/components/SideModal.js +9 -1
- package/dist/ui/components/TabBarShell.d.ts +12 -1
- package/dist/ui/components/TabBarShell.js +3 -2
- package/dist/ui/components/Tabs.js +36 -24
- package/dist/ui/components/Toast.d.ts +3 -24
- package/dist/ui/components/Toast.js +2 -19
- package/dist/ui/components/TopBannerPortal.d.ts +15 -0
- package/dist/ui/components/TopBannerPortal.js +19 -0
- package/dist/ui/components/UnsavedChangesModal.js +5 -1
- package/dist/ui/components/index.style.css +1 -0
- package/dist/ui/components/row-collapse.d.ts +15 -0
- package/dist/ui/components/row-collapse.js +127 -0
- package/dist/ui/components/toast-context.d.ts +63 -0
- package/dist/ui/components/toast-context.js +48 -0
- package/dist/ui/components/top-banner-slot.d.ts +37 -0
- package/dist/ui/components/top-banner-slot.js +45 -0
- package/dist/ui/icons/icon-registry.d.ts +6 -0
- package/dist/ui/icons/icon-registry.js +17 -1
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +1 -0
- package/dist/utils/array.helper.d.ts +2 -2
- package/dist/utils/array.helper.js +5 -5
- package/dist/utils/id-generators.d.ts +6 -0
- package/dist/utils/id-generators.js +10 -0
- package/dist/utils/media-url.js +0 -2
- package/dist/utils/search-txt-builders.d.ts +28 -4
- package/dist/utils/search-txt-builders.js +41 -1
- package/dist/validation/schemas.d.ts +8 -8
- package/package.json +6 -2
- package/scripts/seed-cli.mjs +3 -0
- package/dist/features/account/components/UserAddressesView.d.ts +0 -13
- package/dist/features/account/components/UserAddressesView.js +0 -5
- package/dist/features/account/components/UserNotificationsView.d.ts +0 -15
- package/dist/features/account/components/UserNotificationsView.js +0 -12
- package/dist/features/account/components/UserSettingsView.d.ts +0 -16
- package/dist/features/account/components/UserSettingsView.js +0 -13
- package/dist/features/account/components/UserSupportView.d.ts +0 -3
- package/dist/features/account/components/UserSupportView.js +0 -166
- package/dist/features/admin/components/DemoSeedView.d.ts +0 -11
- package/dist/features/admin/components/DemoSeedView.js +0 -5
- package/dist/features/auth/components/AuthStatusPanel.d.ts +0 -10
- package/dist/features/auth/components/AuthStatusPanel.js +0 -22
- package/dist/features/categories/components/CategoryProductsView.d.ts +0 -45
- package/dist/features/categories/components/CategoryProductsView.js +0 -21
- package/dist/features/homepage/components/HowItWorksInfoView.d.ts +0 -36
- package/dist/features/homepage/components/HowItWorksInfoView.js +0 -10
- package/dist/features/layout/BottomActions.d.ts +0 -1
- package/dist/features/layout/BottomActions.js +0 -311
- package/dist/features/products/components/ProductsView.d.ts +0 -6
- package/dist/features/products/components/ProductsView.js +0 -5
- package/dist/features/seller/components/SellerStoreView.d.ts +0 -8
- package/dist/features/seller/components/SellerStoreView.js +0 -8
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import type { BaseDocument } from "../../../_internal/shared/types/base-document";
|
|
2
|
+
import type { PrecisionTier, Rect, ScanType, TraceParams, TraceStage } from "../../../_internal/shared/features/sticker-trace/types";
|
|
3
|
+
export declare const STICKER_SHEETS_COLLECTION = "stickerSheets";
|
|
4
|
+
export declare const STICKER_TRACE_RUNS_COLLECTION = "stickerTraceRuns";
|
|
5
|
+
export declare const STICKER_TRACE_TASKS_COLLECTION = "stickerTraceTasks";
|
|
6
|
+
export declare const TraceRunStatusValues: {
|
|
7
|
+
readonly QUEUED: "queued";
|
|
8
|
+
readonly RUNNING: "running";
|
|
9
|
+
readonly SUCCEEDED: "succeeded";
|
|
10
|
+
readonly FAILED: "failed";
|
|
11
|
+
readonly CANCELLED: "cancelled";
|
|
12
|
+
};
|
|
13
|
+
export type TraceRunStatus = (typeof TraceRunStatusValues)[keyof typeof TraceRunStatusValues];
|
|
14
|
+
/**
|
|
15
|
+
* Where the scan's resolution came from.
|
|
16
|
+
*
|
|
17
|
+
* 🛑 `embedded` is NOT a measurement. Five of the nine reference scans declare
|
|
18
|
+
* 72 or 96 dpi, which is a number the encoder wrote rather than anything about
|
|
19
|
+
* the scanner — so the value is always shown and always confirmable, and a
|
|
20
|
+
* sheet with no trustworthy dpi carries `bboxMm: null` rather than a plausible
|
|
21
|
+
* figure. A fabricated millimetre on a cut file is a physical production error,
|
|
22
|
+
* which is a different class of wrong from a missing one.
|
|
23
|
+
*/
|
|
24
|
+
export declare const DpiSourceValues: {
|
|
25
|
+
readonly EMBEDDED: "embedded";
|
|
26
|
+
readonly MANUAL: "manual";
|
|
27
|
+
readonly CALIBRATED: "calibrated";
|
|
28
|
+
};
|
|
29
|
+
export type DpiSource = (typeof DpiSourceValues)[keyof typeof DpiSourceValues];
|
|
30
|
+
/** One object in Storage. `assetPath` is private and never leaves the server. */
|
|
31
|
+
export interface StoredAsset {
|
|
32
|
+
assetPath: string;
|
|
33
|
+
contentType: string;
|
|
34
|
+
bytes: number;
|
|
35
|
+
/**
|
|
36
|
+
* Lets a re-upload of identical bytes be recognised rather than re-traced.
|
|
37
|
+
*
|
|
38
|
+
* 🛑 OPTIONAL, and CLIENT-SUPPLIED, and therefore a DEDUPE HINT rather than
|
|
39
|
+
* an integrity check — all three of those are the same fact stated three
|
|
40
|
+
* ways, and conflating them is how a hash field starts being trusted.
|
|
41
|
+
*
|
|
42
|
+
* The server cannot compute it. Hashing the object means downloading all of
|
|
43
|
+
* it into a Vercel function, and `@ShayBlader Scan 18` is 79 MB — that is
|
|
44
|
+
* precisely the egress mistake the whole storage module is built to avoid
|
|
45
|
+
* (Root Cause #104, which paused this project at 52.52 GB against a 10 GB
|
|
46
|
+
* allowance). GCS does return a server-computed digest in object metadata,
|
|
47
|
+
* but it is md5/crc32c; putting one of those in a field named `sha256` would
|
|
48
|
+
* be a worse lie than leaving the field empty.
|
|
49
|
+
*
|
|
50
|
+
* The browser already holds the bytes — it decoded them for live tuning — so
|
|
51
|
+
* it can hash them with SubtleCrypto for free. It was REQUIRED until
|
|
52
|
+
* 2026-10-19, with no producer and no reader anywhere, which is the shape
|
|
53
|
+
* that gets a field filled with a fabricated value by the first caller that
|
|
54
|
+
* has to satisfy the compiler.
|
|
55
|
+
*/
|
|
56
|
+
sha256?: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* What a RUN produces — about 2.5 MB, every time, for every attempt.
|
|
60
|
+
*
|
|
61
|
+
* 🛑 `thumbAtlasPath` is ONE sprite sheet, not N thumbnails, and that is a
|
|
62
|
+
* storage decision rather than a UI one: object COUNT is metered separately
|
|
63
|
+
* from bytes, so 60 thumbnails per run would spend Class A writes sixty times
|
|
64
|
+
* faster for the same pixels. The part bounding boxes already live in
|
|
65
|
+
* `geometry.json`, so one atlas plus those boxes is sufficient to render the
|
|
66
|
+
* list — and it loads in one request instead of sixty.
|
|
67
|
+
*/
|
|
68
|
+
export interface RunArtifacts {
|
|
69
|
+
previewPath?: string;
|
|
70
|
+
overlayPath?: string;
|
|
71
|
+
geometryPath?: string;
|
|
72
|
+
cutSvgPath?: string;
|
|
73
|
+
thumbAtlasPath?: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* What PROMOTING a run produces — full-resolution parts and the print exports.
|
|
77
|
+
*
|
|
78
|
+
* 🛑 Deliberately separate from `RunArtifacts`, because this is the single
|
|
79
|
+
* decision that keeps the feature inside the Storage allowance. Rendering
|
|
80
|
+
* full-res parts on every run costs ~600 MB per sheet across a tuning session;
|
|
81
|
+
* rendering them only for the run actually chosen costs ~95 MB. That is the
|
|
82
|
+
* difference between roughly 8 sheets and roughly 52 inside 5 GB, which is why
|
|
83
|
+
* it is a schema boundary and not a flag.
|
|
84
|
+
*/
|
|
85
|
+
export interface PromotedArtifacts {
|
|
86
|
+
at: Date;
|
|
87
|
+
by: string;
|
|
88
|
+
partAssetPaths: string[];
|
|
89
|
+
cricutSvgPath?: string;
|
|
90
|
+
printThenCutSvgPath?: string;
|
|
91
|
+
pdfMosaicPath?: string;
|
|
92
|
+
}
|
|
93
|
+
/** What the SHEET carries once a run has been promoted onto it. */
|
|
94
|
+
export interface SheetArtifacts extends RunArtifacts {
|
|
95
|
+
cricutSvgPath?: string;
|
|
96
|
+
printThenCutSvgPath?: string;
|
|
97
|
+
pdfMosaicPath?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface SheetPart {
|
|
100
|
+
/** 1-based, stable within the run that produced it. */
|
|
101
|
+
ordinal: number;
|
|
102
|
+
/** Auto-assigned as the ordinal, renameable by the admin. */
|
|
103
|
+
name: string;
|
|
104
|
+
/** Which physical sheet, when one scan holds several. */
|
|
105
|
+
groupIndex: number;
|
|
106
|
+
bboxPx: Rect;
|
|
107
|
+
/** Null whenever dpi is untrustworthy — never a guess. */
|
|
108
|
+
bboxMm: Rect | null;
|
|
109
|
+
areaMm2: number | null;
|
|
110
|
+
/** Full-resolution PNG. Absent until the producing run is promoted. */
|
|
111
|
+
assetPath?: string;
|
|
112
|
+
/**
|
|
113
|
+
* "#7 is a copy of #3". Proposed by bbox + perceptual hash, CONFIRMED by a
|
|
114
|
+
* human — a duplicate marked automatically is one the admin never gets asked
|
|
115
|
+
* about, and two stickers that merely look alike at thumbnail size are common
|
|
116
|
+
* on these sheets.
|
|
117
|
+
*/
|
|
118
|
+
duplicateOf?: number;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* One progress transition, mirrored from RTDB so history survives the prune.
|
|
122
|
+
*
|
|
123
|
+
* 🛑 Capped at RUN_EVENTS_MAX with `eventsTruncated` recording the overflow —
|
|
124
|
+
* the same discipline as `statusHistory`. An unbounded append on a `max`-tier
|
|
125
|
+
* run with 60 shards approaches the 1 MiB document limit, and a truncation
|
|
126
|
+
* nobody counted reads as "nothing else happened".
|
|
127
|
+
*/
|
|
128
|
+
export interface TraceRunEvent {
|
|
129
|
+
at: Date;
|
|
130
|
+
stage: TraceStage | "queued" | "done";
|
|
131
|
+
pct: number;
|
|
132
|
+
message?: string;
|
|
133
|
+
level?: "info" | "warn" | "error";
|
|
134
|
+
}
|
|
135
|
+
export declare const RUN_EVENTS_MAX = 100;
|
|
136
|
+
/**
|
|
137
|
+
* Why a run failed, in terms a retry panel can act on.
|
|
138
|
+
*
|
|
139
|
+
* `message` is user-safe — resolved through `toUserMessage`, never raw server
|
|
140
|
+
* text. A Node `MODULE_NOT_FOUND` with a require stack rendered inside a
|
|
141
|
+
* progress panel is Root Cause #86, and it reached a buyer's bid modal once
|
|
142
|
+
* already.
|
|
143
|
+
*/
|
|
144
|
+
export interface TraceRunError {
|
|
145
|
+
stage: TraceStage | "queued";
|
|
146
|
+
code: string;
|
|
147
|
+
message: string;
|
|
148
|
+
/** Present when a SHARD failed, so the panel can name the part. */
|
|
149
|
+
partOrdinal?: number;
|
|
150
|
+
}
|
|
151
|
+
export interface StickerSheetDocument extends BaseDocument {
|
|
152
|
+
/**
|
|
153
|
+
* 🛑 MANDATORY. Nothing processes without one.
|
|
154
|
+
*
|
|
155
|
+
* The whole point of keeping every attempt is being able to tell them apart
|
|
156
|
+
* later, and "Untitled (3)" defeats that at the moment it matters most.
|
|
157
|
+
*/
|
|
158
|
+
title: string;
|
|
159
|
+
scanType: ScanType;
|
|
160
|
+
dpi?: number;
|
|
161
|
+
dpiSource?: DpiSource;
|
|
162
|
+
widthPx: number;
|
|
163
|
+
heightPx: number;
|
|
164
|
+
sourceScan: StoredAsset;
|
|
165
|
+
/** The run whose result this sheet currently shows. */
|
|
166
|
+
activeRunId?: string;
|
|
167
|
+
traceStatus: TraceRunStatus;
|
|
168
|
+
partCount: number;
|
|
169
|
+
groupCount: number;
|
|
170
|
+
artifacts: SheetArtifacts;
|
|
171
|
+
parts: SheetPart[];
|
|
172
|
+
}
|
|
173
|
+
export interface StickerTraceRunDocument extends BaseDocument {
|
|
174
|
+
sheetId: string;
|
|
175
|
+
/** 🛑 MANDATORY — "Run 3 — precise, tighter hysteresis". See the sheet's title. */
|
|
176
|
+
name: string;
|
|
177
|
+
tier: PrecisionTier;
|
|
178
|
+
/**
|
|
179
|
+
* The parameters this run ACTUALLY used, recorded rather than recomputed.
|
|
180
|
+
*
|
|
181
|
+
* Grouped by stage in `TraceParams` itself, which is what makes resume safe:
|
|
182
|
+
* `resumeStage = max(requested, earliestChangedParamStage)`. Without that
|
|
183
|
+
* clamp a run resumed from `parts` with a different ridge threshold produces
|
|
184
|
+
* artifacts generated under different parameters than the run records, and
|
|
185
|
+
* nothing anywhere contradicts it (Root Cause #42's shape).
|
|
186
|
+
*/
|
|
187
|
+
params: TraceParams;
|
|
188
|
+
requestedBy: string;
|
|
189
|
+
startedAt?: Date;
|
|
190
|
+
finishedAt?: Date;
|
|
191
|
+
durationMs?: number;
|
|
192
|
+
status: TraceRunStatus;
|
|
193
|
+
/** The stage it is in — or the stage it DIED in. */
|
|
194
|
+
stage?: TraceStage | "queued" | "done";
|
|
195
|
+
events: TraceRunEvent[];
|
|
196
|
+
eventsTruncated?: number;
|
|
197
|
+
partCount: number;
|
|
198
|
+
groupCount: number;
|
|
199
|
+
shardCount?: number;
|
|
200
|
+
error?: TraceRunError;
|
|
201
|
+
artifacts: RunArtifacts;
|
|
202
|
+
promoted?: PromotedArtifacts | null;
|
|
203
|
+
/** Set when retention strips the light artifacts; the row outlives its images. */
|
|
204
|
+
artifactsPruned?: boolean;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* A unit of fan-out work. Doc-id-keyed, and that is what makes redelivery safe.
|
|
208
|
+
*
|
|
209
|
+
* 🛑 Cloud Functions guarantee AT-LEAST-ONCE delivery. The finalize task is
|
|
210
|
+
* written with `create()` at `{runId}__finalize`, so a redelivered shard that
|
|
211
|
+
* increments the counter again fails that create harmlessly instead of
|
|
212
|
+
* spawning a second finalizer that double-renders every part.
|
|
213
|
+
*
|
|
214
|
+
* 🛑 Its trigger is `documentCreated`, never `documentWritten`. A write trigger
|
|
215
|
+
* on a collection its own shards write back into is Root Cause #92 — one
|
|
216
|
+
* million invocations a day against a two-million-a-month free quota, with a
|
|
217
|
+
* billing page as the only symptom.
|
|
218
|
+
*/
|
|
219
|
+
export interface StickerTraceTaskDocument extends BaseDocument {
|
|
220
|
+
runId: string;
|
|
221
|
+
sheetId: string;
|
|
222
|
+
kind: "part" | "finalize";
|
|
223
|
+
/** `trace` renders review thumbnails; `full` renders promoted parts + exports. */
|
|
224
|
+
mode: "thumb" | "full";
|
|
225
|
+
shardIndex?: number;
|
|
226
|
+
/** Ordinals this shard owns. Empty on a finalize task. */
|
|
227
|
+
partOrdinals: number[];
|
|
228
|
+
}
|
|
229
|
+
export declare const STICKER_SHEET_FIELDS: {
|
|
230
|
+
readonly TITLE: "title";
|
|
231
|
+
readonly SCAN_TYPE: "scanType";
|
|
232
|
+
readonly TRACE_STATUS: "traceStatus";
|
|
233
|
+
readonly ACTIVE_RUN_ID: "activeRunId";
|
|
234
|
+
readonly PART_COUNT: "partCount";
|
|
235
|
+
readonly CREATED_AT: "createdAt";
|
|
236
|
+
readonly UPDATED_AT: "updatedAt";
|
|
237
|
+
};
|
|
238
|
+
export declare const STICKER_TRACE_RUN_FIELDS: {
|
|
239
|
+
readonly SHEET_ID: "sheetId";
|
|
240
|
+
readonly NAME: "name";
|
|
241
|
+
readonly TIER: "tier";
|
|
242
|
+
readonly STATUS: "status";
|
|
243
|
+
readonly STAGE: "stage";
|
|
244
|
+
readonly REQUESTED_BY: "requestedBy";
|
|
245
|
+
readonly STARTED_AT: "startedAt";
|
|
246
|
+
readonly FINISHED_AT: "finishedAt";
|
|
247
|
+
readonly CREATED_AT: "createdAt";
|
|
248
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* WHY: A scanned sticker sheet becomes cut-ready geometry through a pipeline
|
|
3
|
+
* that can fail in nine different stages, is retried with different
|
|
4
|
+
* parameters until it is right, and must still be able to answer "what
|
|
5
|
+
* did run 2 do differently last Tuesday" weeks later. One mutable
|
|
6
|
+
* document cannot hold that; an attempt is a record, not an overwrite.
|
|
7
|
+
* WHAT: The two collections, and the task record that fans the work out.
|
|
8
|
+
*
|
|
9
|
+
* Collections:
|
|
10
|
+
* stickerSheets/{stickersheet-slug} the sheet, and its CURRENT accepted result
|
|
11
|
+
* stickerTraceRuns/{runId} every attempt, immutable once finished
|
|
12
|
+
* stickerTraceTasks/{taskId} transient shard fan-out, deleted on finalize
|
|
13
|
+
*
|
|
14
|
+
* 🛑 Every `*Path` on these documents is a RAW STORAGE PATH under
|
|
15
|
+
* `private/sticker-sheets/…` and must never reach a client. The bytes are
|
|
16
|
+
* fetched through a short-lived signed URL minted by an authenticated route —
|
|
17
|
+
* see § "Digital Content Delivery" for the precedent and why a guessable
|
|
18
|
+
* public path is the one property a private asset must not have.
|
|
19
|
+
*
|
|
20
|
+
* EXPORTS: STICKER_SHEETS_COLLECTION, STICKER_TRACE_RUNS_COLLECTION,
|
|
21
|
+
* STICKER_TRACE_TASKS_COLLECTION, TraceRunStatusValues, TraceRunStatus,
|
|
22
|
+
* DpiSourceValues, DpiSource, StoredAsset, SheetArtifacts, RunArtifacts,
|
|
23
|
+
* PromotedArtifacts, SheetPart, TraceRunEvent, TraceRunError,
|
|
24
|
+
* StickerSheetDocument, StickerTraceRunDocument, StickerTraceTaskDocument,
|
|
25
|
+
* STICKER_SHEET_FIELDS, STICKER_TRACE_RUN_FIELDS, RUN_EVENTS_MAX
|
|
26
|
+
*
|
|
27
|
+
* @tag domain:sticker-trace
|
|
28
|
+
* @tag layer:feature
|
|
29
|
+
* @tag pattern:firestore-schema
|
|
30
|
+
* @tag access:server
|
|
31
|
+
* @tag consumers:sticker-sheets.repository,sticker-trace-runs.repository
|
|
32
|
+
* @tag sideEffects:none
|
|
33
|
+
*/
|
|
34
|
+
export const STICKER_SHEETS_COLLECTION = "stickerSheets";
|
|
35
|
+
export const STICKER_TRACE_RUNS_COLLECTION = "stickerTraceRuns";
|
|
36
|
+
export const STICKER_TRACE_TASKS_COLLECTION = "stickerTraceTasks";
|
|
37
|
+
export const TraceRunStatusValues = {
|
|
38
|
+
QUEUED: "queued",
|
|
39
|
+
RUNNING: "running",
|
|
40
|
+
SUCCEEDED: "succeeded",
|
|
41
|
+
FAILED: "failed",
|
|
42
|
+
CANCELLED: "cancelled",
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Where the scan's resolution came from.
|
|
46
|
+
*
|
|
47
|
+
* 🛑 `embedded` is NOT a measurement. Five of the nine reference scans declare
|
|
48
|
+
* 72 or 96 dpi, which is a number the encoder wrote rather than anything about
|
|
49
|
+
* the scanner — so the value is always shown and always confirmable, and a
|
|
50
|
+
* sheet with no trustworthy dpi carries `bboxMm: null` rather than a plausible
|
|
51
|
+
* figure. A fabricated millimetre on a cut file is a physical production error,
|
|
52
|
+
* which is a different class of wrong from a missing one.
|
|
53
|
+
*/
|
|
54
|
+
export const DpiSourceValues = {
|
|
55
|
+
EMBEDDED: "embedded",
|
|
56
|
+
MANUAL: "manual",
|
|
57
|
+
CALIBRATED: "calibrated",
|
|
58
|
+
};
|
|
59
|
+
export const RUN_EVENTS_MAX = 100;
|
|
60
|
+
export const STICKER_SHEET_FIELDS = {
|
|
61
|
+
TITLE: "title",
|
|
62
|
+
SCAN_TYPE: "scanType",
|
|
63
|
+
TRACE_STATUS: "traceStatus",
|
|
64
|
+
ACTIVE_RUN_ID: "activeRunId",
|
|
65
|
+
PART_COUNT: "partCount",
|
|
66
|
+
CREATED_AT: "createdAt",
|
|
67
|
+
UPDATED_AT: "updatedAt",
|
|
68
|
+
};
|
|
69
|
+
export const STICKER_TRACE_RUN_FIELDS = {
|
|
70
|
+
SHEET_ID: "sheetId",
|
|
71
|
+
NAME: "name",
|
|
72
|
+
TIER: "tier",
|
|
73
|
+
STATUS: "status",
|
|
74
|
+
STAGE: "stage",
|
|
75
|
+
REQUESTED_BY: "requestedBy",
|
|
76
|
+
STARTED_AT: "startedAt",
|
|
77
|
+
FINISHED_AT: "finishedAt",
|
|
78
|
+
CREATED_AT: "createdAt",
|
|
79
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { runCoordinator, type CoordinatorDeps } from "../../_internal/server/features/sticker-trace/coordinator";
|
|
2
|
+
export { runShard, type ShardDeps } from "../../_internal/server/features/sticker-trace/shard";
|
|
3
|
+
export { runFinalizer, type FinalizerDeps } from "../../_internal/server/features/sticker-trace/finalizer";
|
|
4
|
+
export { readScanBytes, readRunGeometry, writeRunArtifact, type RunGeometry, } from "../../_internal/server/features/sticker-trace/storage";
|
|
5
|
+
export { rasterisePartToBox } from "../../_internal/shared/features/sticker-trace/math/rasterize-path";
|
|
6
|
+
export { buildCutFileBytes, buildCutFileForRun } from "../../_internal/server/features/sticker-trace/build-cut-file";
|
|
7
|
+
export { collectMosaicInputs, type MosaicInputs, type MosaicPartInput, } from "../../_internal/server/features/sticker-trace/mosaic-inputs";
|
|
8
|
+
export type { PrintPageSizeId } from "../../_internal/shared/features/sticker-trace/export/page-sizes";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* WHY: A Cloud Function must not inhale the Next.js server barrel. Importing
|
|
3
|
+
* `@mohasinac/appkit/server` from functions/ dragged in
|
|
4
|
+
* react-server-dom-webpack and @vercel/og's wasm and FAILED the tsup
|
|
5
|
+
* build — Root Cause #18, caught by the bundler rather than by review.
|
|
6
|
+
* WHAT: A narrow server entry for the sticker tracer, re-exporting only what a
|
|
7
|
+
* Function binding injects, each from its DEFINING module.
|
|
8
|
+
*
|
|
9
|
+
* 🛑 This is one of the carve-outs Root Cause #18 permits: a package's public
|
|
10
|
+
* API contract. `_internal/*` is deliberately not an exported subpath, so a
|
|
11
|
+
* consumer implementing the codec seam or binding the handlers has no other way
|
|
12
|
+
* in. Modelled on the existing `./features/whatsapp-bot/server` key.
|
|
13
|
+
*
|
|
14
|
+
* 🛑 Keep it NARROW. Every symbol added here widens what a Functions bundle
|
|
15
|
+
* must resolve, and the whole reason this file exists is that the wide barrel
|
|
16
|
+
* could not be bundled at all.
|
|
17
|
+
*
|
|
18
|
+
* EXPORTS: runCoordinator, runShard, runFinalizer, readScanBytes,
|
|
19
|
+
* readRunGeometry, writeRunArtifact, rasterisePartToBox, + their types
|
|
20
|
+
*
|
|
21
|
+
* @tag domain:sticker-trace
|
|
22
|
+
* @tag layer:feature
|
|
23
|
+
* @tag pattern:none
|
|
24
|
+
* @tag access:server
|
|
25
|
+
* @tag consumers:functions/sticker-trace
|
|
26
|
+
* @tag sideEffects:none
|
|
27
|
+
*/
|
|
28
|
+
export { runCoordinator } from "../../_internal/server/features/sticker-trace/coordinator.js";
|
|
29
|
+
export { runShard } from "../../_internal/server/features/sticker-trace/shard.js";
|
|
30
|
+
export { runFinalizer } from "../../_internal/server/features/sticker-trace/finalizer.js";
|
|
31
|
+
export { readScanBytes, readRunGeometry, writeRunArtifact, } from "../../_internal/server/features/sticker-trace/storage.js";
|
|
32
|
+
export { rasterisePartToBox } from "../../_internal/shared/features/sticker-trace/math/rasterize-path.js";
|
|
33
|
+
/*
|
|
34
|
+
* The cut-file exporter, for the finalizer binding.
|
|
35
|
+
*
|
|
36
|
+
* 🛑 `buildCutFileBytes` and not `buildExportSet`: the Function has a runId and
|
|
37
|
+
* a sheetId, not geometry and a pixels-per-mm figure. Exporting the pure
|
|
38
|
+
* function here would make every binding re-implement the artifact read and the
|
|
39
|
+
* working-raster-to-original dpi bridge — and that bridge is exactly where a
|
|
40
|
+
* silent factor-of-N millimetre error lives.
|
|
41
|
+
*/
|
|
42
|
+
export { buildCutFileBytes, buildCutFileForRun } from "../../_internal/server/features/sticker-trace/build-cut-file.js";
|
|
43
|
+
/*
|
|
44
|
+
* Everything the PDF mosaic needs, assembled server-side.
|
|
45
|
+
*
|
|
46
|
+
* 🛑 `pdfkit` is Node-only and stays in functions/, but the DATA — the sheet,
|
|
47
|
+
* the promoted PNGs and the layout — comes from here. Letting the Function
|
|
48
|
+
* gather it would mean re-deriving the nest, and a preview that disagrees with
|
|
49
|
+
* the printed sheet about where a sticker sits is worse than no preview.
|
|
50
|
+
*/
|
|
51
|
+
export { collectMosaicInputs, } from "../../_internal/server/features/sticker-trace/mosaic-inputs.js";
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { type ViewerLike } from "../../../_internal/server/features/tester/visibility";
|
|
8
8
|
import type { StoreDocument } from "../schemas";
|
|
9
9
|
import type { ProductDocument } from "../../products/schemas";
|
|
10
|
-
import type {
|
|
10
|
+
import type { ReviewPlain } from "../../reviews/schemas";
|
|
11
11
|
import type { FirebaseSieveResult } from "../../../providers/db-firebase";
|
|
12
12
|
export interface StoreQueryListParams {
|
|
13
13
|
filters?: string;
|
|
@@ -23,7 +23,7 @@ export interface StoreContentParams {
|
|
|
23
23
|
filters?: string;
|
|
24
24
|
}
|
|
25
25
|
export interface StoreReviewsResult {
|
|
26
|
-
reviews:
|
|
26
|
+
reviews: ReviewPlain[];
|
|
27
27
|
averageRating: number;
|
|
28
28
|
totalReviews: number;
|
|
29
29
|
ratingDistribution: Record<number, number>;
|
|
@@ -9,7 +9,6 @@ import { sieveFilter, SIEVE_OP } from "@mohasinac/appkit";
|
|
|
9
9
|
import { NotFoundError } from "../../../errors/index.js";
|
|
10
10
|
import { filterTestDataForViewer, filterSingleTestData } from "../../../_internal/server/features/tester/visibility.js";
|
|
11
11
|
const ERR_STORE_NOT_FOUND = "Store not found";
|
|
12
|
-
import { maskPublicReview } from "../../../security/index.js";
|
|
13
12
|
import { storeRepository } from "../repository/store.repository.js";
|
|
14
13
|
import { STORE_FIELDS } from "../schemas/index.js";
|
|
15
14
|
import { productRepository } from "../../products/repository/products.repository.js";
|
|
@@ -137,7 +136,13 @@ export async function getStoreReviews(storeSlug) {
|
|
|
137
136
|
const totalReviews = reviewArrays.flat().length;
|
|
138
137
|
const averageRating = totalReviews > 0 ? ratingSum / totalReviews : 0;
|
|
139
138
|
return {
|
|
140
|
-
|
|
139
|
+
/*
|
|
140
|
+
* `maskedReview`, not `maskPublicReview`. The latter calls `maskName`,
|
|
141
|
+
* which refuses ciphertext by design and answers "Anonymous" — and these
|
|
142
|
+
* come from `find*` reads, which do not mask. A public store page was
|
|
143
|
+
* showing every reviewer as Anonymous.
|
|
144
|
+
*/
|
|
145
|
+
reviews: allReviews.map((r) => reviewRepository.maskedReview(r)),
|
|
141
146
|
averageRating,
|
|
142
147
|
totalReviews,
|
|
143
148
|
ratingDistribution,
|
|
@@ -46,7 +46,7 @@ export async function GET(request, context) {
|
|
|
46
46
|
const storesRepo = db.getRepository("stores");
|
|
47
47
|
const storeResult = await storesRepo.findAll({
|
|
48
48
|
filters: `storeSlug==${storeSlug},status==active,isPublic==true`,
|
|
49
|
-
|
|
49
|
+
pageSize: 1,
|
|
50
50
|
});
|
|
51
51
|
const store = storeResult.data[0];
|
|
52
52
|
if (!store) {
|
|
@@ -72,13 +72,13 @@ export async function GET(request, context) {
|
|
|
72
72
|
sort,
|
|
73
73
|
order: sort.startsWith("-") ? "desc" : "asc",
|
|
74
74
|
page,
|
|
75
|
-
|
|
75
|
+
pageSize: pageSize,
|
|
76
76
|
});
|
|
77
77
|
const body = {
|
|
78
78
|
items: result.data,
|
|
79
79
|
total: result.total,
|
|
80
80
|
page: result.page,
|
|
81
|
-
pageSize: result.
|
|
81
|
+
pageSize: result.pageSize,
|
|
82
82
|
totalPages: result.totalPages,
|
|
83
83
|
hasMore: result.page < result.totalPages,
|
|
84
84
|
};
|
|
@@ -51,7 +51,7 @@ export async function GET(request, context) {
|
|
|
51
51
|
const storesRepo = db.getRepository("stores");
|
|
52
52
|
const storeResult = await storesRepo.findAll({
|
|
53
53
|
filters: `storeSlug==${storeSlug},status==active,isPublic==true`,
|
|
54
|
-
|
|
54
|
+
pageSize: 1,
|
|
55
55
|
});
|
|
56
56
|
const store = storeResult.data[0];
|
|
57
57
|
if (!store) {
|
|
@@ -77,13 +77,13 @@ export async function GET(request, context) {
|
|
|
77
77
|
sort,
|
|
78
78
|
order: sort.startsWith("-") ? "desc" : "asc",
|
|
79
79
|
page,
|
|
80
|
-
|
|
80
|
+
pageSize: pageSize,
|
|
81
81
|
});
|
|
82
82
|
const body = {
|
|
83
83
|
items: result.data,
|
|
84
84
|
total: result.total,
|
|
85
85
|
page: result.page,
|
|
86
|
-
pageSize: result.
|
|
86
|
+
pageSize: result.pageSize,
|
|
87
87
|
totalPages: result.totalPages,
|
|
88
88
|
hasMore: result.page < result.totalPages,
|
|
89
89
|
};
|
|
@@ -52,7 +52,7 @@ export async function GET(request, context) {
|
|
|
52
52
|
const storesRepo = db.getRepository("stores");
|
|
53
53
|
const storeResult = await storesRepo.findAll({
|
|
54
54
|
filters: `storeSlug==${storeSlug},status==active,isPublic==true`,
|
|
55
|
-
|
|
55
|
+
pageSize: 1,
|
|
56
56
|
});
|
|
57
57
|
const store = storeResult.data[0];
|
|
58
58
|
if (!store) {
|
|
@@ -27,7 +27,7 @@ export async function GET(_request, context) {
|
|
|
27
27
|
const repo = db.getRepository("stores");
|
|
28
28
|
const result = await repo.findAll({
|
|
29
29
|
filters: `storeSlug==${storeSlug},status==active,isPublic==true`,
|
|
30
|
-
|
|
30
|
+
pageSize: 1,
|
|
31
31
|
});
|
|
32
32
|
const raw = result.data[0];
|
|
33
33
|
if (!raw) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useRouter } from "next/navigation.js";
|
|
4
|
-
import { TabBarButton, TabBarShell,
|
|
4
|
+
import { OverflowRow, TabBarButton, TabBarShell, TextLink } from "../../../ui/index.js";
|
|
5
5
|
export function StoreNavTabs({ tabs, dropdownTabs = [], dropdownPlaceholder = "Browse listings", activeValue, onTabChange, renderTabBar, className = "", }) {
|
|
6
6
|
const router = useRouter();
|
|
7
7
|
const handleChange = (v) => onTabChange?.(v);
|
|
@@ -25,7 +25,22 @@ export function StoreNavTabs({ tabs, dropdownTabs = [], dropdownPlaceholder = "B
|
|
|
25
25
|
* the wrong element for sizing utilities (Root Cause #29); those now live
|
|
26
26
|
* on `.appkit-tabs-dropdown` in Tabs.style.css.
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
/*
|
|
29
|
+
* `alwaysCollapsed` — this one is a dropdown BY DESIGN, not by measurement.
|
|
30
|
+
* It is the listing-type picker, deliberately collapsed however much room
|
|
31
|
+
* the bar has, so adding a tenth listing type can never push the store's
|
|
32
|
+
* Reviews and About tabs off the edge. That is a product decision about what
|
|
33
|
+
* belongs in a row, which no width measurement can make.
|
|
34
|
+
*
|
|
35
|
+
* It replaced a native `<select>`, so it is now searchable and keyboard
|
|
36
|
+
* navigable — which matters here because the option set grows with every
|
|
37
|
+
* listing type the platform adds.
|
|
38
|
+
*/
|
|
39
|
+
const leading = dropdownTabs.length > 0 ? (_jsx(OverflowRow, { items: dropdownTabs.map((tab) => ({
|
|
40
|
+
id: tab.value,
|
|
41
|
+
label: tab.label,
|
|
42
|
+
onSelect: () => handleDropdownChange(tab.value),
|
|
43
|
+
})), ariaLabel: dropdownPlaceholder, activeId: activeDropdownTab?.value, placeholder: dropdownPlaceholder, searchPlaceholder: "Search listing types\u2026", alwaysCollapsed: true })) : undefined;
|
|
29
44
|
/*
|
|
30
45
|
* Triggers carry `.appkit-tabs-trigger` and NOTHING else — no padding /
|
|
31
46
|
* size / weight props, no conditional colour classes. `important: true` is
|
|
@@ -4,10 +4,14 @@ export const manifest = {
|
|
|
4
4
|
envKeys: [],
|
|
5
5
|
routes: [
|
|
6
6
|
{ segment: "[locale]/stores", exports: { default: "StoresIndexPageView" } },
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
/*
|
|
8
|
+
* `[locale]/stores/[storeSlug]` is deliberately ABSENT. It is a bare
|
|
9
|
+
* `redirect()` to the products tab and renders no view at all, so there is
|
|
10
|
+
* no appkit export to name — and naming one is exactly how
|
|
11
|
+
* `StoreStorefrontView` (an alias of the orphaned `SellerStoreView` slot
|
|
12
|
+
* shell) kept reading as wired for as long as it did. The storefront chrome
|
|
13
|
+
* lives in the segment's own layout; the tabs below are the real views.
|
|
14
|
+
*/
|
|
11
15
|
{
|
|
12
16
|
segment: "[locale]/stores/[storeSlug]/products",
|
|
13
17
|
exports: { default: "StoreProductsView" },
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { BaseRepository } from "../../../providers/db-firebase";
|
|
2
2
|
import type { FirebaseSieveFields, FirebaseSieveResult, SieveModel } from "../../../providers/db-firebase";
|
|
3
3
|
import type { JsonValue } from "../../../schemas/types";
|
|
4
|
-
import type
|
|
5
|
-
import { type SupportTicketDocument, type SupportTicketCreateInput, type SupportTicketUpdateInput, type TicketMessage, type TicketStatus } from "../schemas/firestore";
|
|
4
|
+
import { type SupportTicketDocument, type SupportTicketPlain, type SupportTicketCreateInput, type SupportTicketUpdateInput, type TicketMessage, type TicketStatus } from "../schemas/firestore";
|
|
6
5
|
import { type HistoryActor } from "../../../_internal/shared/history/index";
|
|
7
6
|
/** Who/why for a write that lands in `statusHistory`. */
|
|
8
7
|
export interface TicketWriteContext {
|
|
@@ -33,7 +32,19 @@ export declare class SupportRepository extends BaseRepository<SupportTicketDocum
|
|
|
33
32
|
*/
|
|
34
33
|
protected buildSearchTxtFor(data: Record<string, JsonValue>): string[] | null;
|
|
35
34
|
/** Decrypt on read so callers see the shape they wrote. */
|
|
36
|
-
|
|
35
|
+
/** Plaintext PII. **Opt-in and named** — shows up in review and in a grep. */
|
|
36
|
+
revealTicket(doc: SupportTicketDocument): SupportTicketPlain;
|
|
37
|
+
/** As `revealTicket`, for a list read. */
|
|
38
|
+
revealTickets(docs: readonly SupportTicketDocument[]): SupportTicketPlain[];
|
|
39
|
+
/**
|
|
40
|
+
* Masked PII — **the default for any surface that only needs to identify a
|
|
41
|
+
* row to a human.** Decrypts first, then masks: the mask helpers refuse
|
|
42
|
+
* ciphertext by design, so passing a stored field straight in would return
|
|
43
|
+
* "Anonymous" for every row.
|
|
44
|
+
*/
|
|
45
|
+
maskedTicket(doc: SupportTicketDocument): SupportTicketPlain;
|
|
46
|
+
/** As `maskedTicket`, for a list read. */
|
|
47
|
+
maskedTickets(docs: readonly SupportTicketDocument[]): SupportTicketPlain[];
|
|
37
48
|
createTicket(input: SupportTicketCreateInput): Promise<SupportTicketDocument>;
|
|
38
49
|
getUserTickets(userId: string, page?: number, pageSize?: number): Promise<FirebaseSieveResult<SupportTicketDocument>>;
|
|
39
50
|
/**
|