@mohasinac/appkit 4.11.0 → 4.11.2
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/server/features/checkout/actions.js +27 -23
- package/dist/_internal/server/features/checkout/locked-lines.d.ts +30 -0
- package/dist/_internal/server/features/checkout/locked-lines.js +116 -0
- package/dist/_internal/server/features/products/data.d.ts +2 -2
- package/dist/_internal/server/features/products/data.js +5 -23
- package/dist/_internal/server/features/products/index.d.ts +1 -0
- package/dist/_internal/server/features/products/index.js +1 -0
- package/dist/_internal/server/features/products/list-public.d.ts +111 -0
- package/dist/_internal/server/features/products/list-public.js +342 -0
- package/dist/_internal/server/jobs/core/auctionSettlement.js +89 -16
- package/dist/_internal/server/jobs/core/offerExpiry.js +116 -4
- package/dist/_internal/server/jobs/handlers/messages.d.ts +5 -0
- package/dist/_internal/server/jobs/handlers/messages.js +5 -0
- package/dist/_internal/shared/checkout/lanes.d.ts +41 -0
- package/dist/_internal/shared/checkout/lanes.js +106 -0
- package/dist/_internal/shared/checkout/order-math.d.ts +19 -0
- package/dist/_internal/shared/checkout/order-math.js +30 -6
- package/dist/_internal/shared/features/products/to-product-item.d.ts +25 -0
- package/dist/_internal/shared/features/products/to-product-item.js +45 -0
- package/dist/_internal/shared/listing-types/feature-flags.d.ts +1 -0
- package/dist/_internal/shared/listing-types/feature-flags.js +24 -10
- package/dist/client.d.ts +2 -1
- package/dist/client.js +4 -1
- package/dist/features/account/components/NotificationBell.js +1 -0
- package/dist/features/account/components/UserOffersPanel.js +8 -1
- package/dist/features/admin/actions/notification-actions.js +1 -1
- package/dist/features/admin/schemas/firestore.d.ts +2 -1
- package/dist/features/admin/schemas/firestore.js +1 -0
- package/dist/features/auctions/actions/bid-actions.d.ts +11 -1
- package/dist/features/auctions/actions/bid-actions.js +29 -15
- package/dist/features/auctions/components/AuctionBidsTable.js +6 -2
- package/dist/features/auctions/components/AuctionsListView.js +12 -53
- package/dist/features/auctions/components/PlaceBidFormClient.js +10 -1
- package/dist/features/auctions/repository/bid.repository.d.ts +15 -0
- package/dist/features/auctions/repository/bid.repository.js +19 -0
- package/dist/features/auctions/schemas/firestore.d.ts +11 -1
- package/dist/features/auctions/schemas/firestore.js +1 -0
- package/dist/features/cart/actions/cart-actions.d.ts +11 -0
- package/dist/features/cart/actions/cart-actions.js +24 -0
- package/dist/features/cart/repository/cart.repository.d.ts +24 -1
- package/dist/features/cart/repository/cart.repository.js +71 -6
- package/dist/features/cart/schemas/firestore.d.ts +23 -2
- package/dist/features/contact/email.js +52 -1
- package/dist/features/grouped/components/GroupedListingsCarousel.js +4 -1
- package/dist/features/orders/repository/orders.repository.d.ts +0 -15
- package/dist/features/orders/repository/orders.repository.js +0 -27
- package/dist/features/orders/utils/order-splitter.js +14 -2
- package/dist/features/pre-orders/components/PreOrdersListView.js +11 -39
- package/dist/features/products/components/ArtStickersListView.js +10 -49
- package/dist/features/products/components/ProductsIndexPageView.js +9 -62
- package/dist/features/products/repository/products.repository.js +41 -5
- package/dist/features/seller/actions/offer-actions.d.ts +6 -0
- package/dist/features/seller/actions/offer-actions.js +8 -9
- package/dist/features/seller/components/SellerOffersView.d.ts +6 -1
- package/dist/features/seller/components/SellerOffersView.js +59 -8
- package/dist/features/seller/repository/offer.repository.d.ts +18 -2
- package/dist/features/seller/repository/offer.repository.js +38 -2
- package/dist/features/seller/schemas/firestore.d.ts +7 -2
- package/dist/features/seller/schemas/firestore.js +3 -0
- package/dist/features/seller/schemas/offer-forms.d.ts +12 -0
- package/dist/features/seller/schemas/offer-forms.js +28 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -1
- package/dist/server-entry.d.ts +1 -0
- package/dist/server-entry.js +1 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.js +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const counterOfferFormSchema: z.ZodObject<{
|
|
3
|
+
counterAmount: z.ZodNumber;
|
|
4
|
+
sellerNote: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
counterAmount: number;
|
|
7
|
+
sellerNote?: string | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
counterAmount: number;
|
|
10
|
+
sellerNote?: string | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export type CounterOfferFormValues = z.infer<typeof counterOfferFormSchema>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* WHY: Rule #9 — every appkit form is schema-driven. The seller's counter-offer
|
|
3
|
+
* drawer had no form at all before 2026-08-21 (the view took an
|
|
4
|
+
* `(id) => void` callback and left each consumer to invent an input), so
|
|
5
|
+
* `respondToOffer`'s counter branch had zero real callers.
|
|
6
|
+
* WHAT: Zod schema for the counter-offer QuickFormDrawer. Deliberately only the
|
|
7
|
+
* field-shape rules that can be checked without loading the offer — the
|
|
8
|
+
* relational rules (below listed price, different from the buyer's offer)
|
|
9
|
+
* stay server-side in `respondToOffer`, which is the only place that can
|
|
10
|
+
* be trusted with them.
|
|
11
|
+
*
|
|
12
|
+
* EXPORTS:
|
|
13
|
+
* counterOfferFormSchema, type CounterOfferFormValues
|
|
14
|
+
*
|
|
15
|
+
* @tag domain:seller,offers
|
|
16
|
+
* @tag layer:schema
|
|
17
|
+
* @tag pattern:none
|
|
18
|
+
* @tag access:isomorphic
|
|
19
|
+
* @tag consumers:SellerOffersView
|
|
20
|
+
* @tag sideEffects:none
|
|
21
|
+
*/
|
|
22
|
+
import { z } from "zod";
|
|
23
|
+
export const counterOfferFormSchema = z.object({
|
|
24
|
+
counterAmount: z.coerce
|
|
25
|
+
.number({ invalid_type_error: "Enter a counter amount." })
|
|
26
|
+
.positive("Counter amount must be greater than zero."),
|
|
27
|
+
sellerNote: z.string().max(500, "Keep your note under 500 characters.").optional(),
|
|
28
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -2457,7 +2457,7 @@ export { getProductFilterKeys } from "./features/products/index";
|
|
|
2457
2457
|
export { getProductSortOptions } from "./features/products/index";
|
|
2458
2458
|
export { getProductTableColumns } from "./features/products/index";
|
|
2459
2459
|
export { normalizeListingType, isAuctionListing, isPreOrderListing, isStandardListing, isPrizeDrawListing, isClassifiedListing, isDigitalCodeListing, isLiveListing, isArtListing, isStickersListing, } from "./features/products/index";
|
|
2460
|
-
export { isListingTypeEnabled, isCategoryTypeEnabled, enabledListingTypes, enabledCategoryTypes, } from "./_internal/shared/listing-types/feature-flags";
|
|
2460
|
+
export { isListingTypeEnabled, isCategoryTypeEnabled, enabledListingTypes, enabledCategoryTypes, ALL_LISTING_TYPES, } from "./_internal/shared/listing-types/feature-flags";
|
|
2461
2461
|
export { actionTracker, setActionTrackerSink, resetActionTrackerSink, type ActionEvent, type ActionTrackerSink, } from "./_internal/shared/listing-types/action-tracker";
|
|
2462
2462
|
export { cartRequiresShipping, cartIsDigitalOnly, cartIsChatOnly, } from "./_internal/shared/listing-types/cart-shipping";
|
|
2463
2463
|
export { ACTIONS, action, act, canPerformAction, actionsForListingType, actionLabel, type ActionDef, type ActionKind, type ActionResource, type ActionTree, type ActionConfirmation, } from "./_internal/shared/actions/action-registry";
|
|
@@ -3264,3 +3264,4 @@ export { safeFireAndForget } from "./utils/safe-fire-forget";
|
|
|
3264
3264
|
export { withRetry } from "./http/retry";
|
|
3265
3265
|
export { normalizeError, getErrorMessage, isApiNormalized, isAppNormalized, isFirebaseAuthNormalized, isFirebaseFirestoreNormalized, isFirebaseStorageNormalized, isNativeNormalized, isNetworkNormalized, isUnknownNormalized, isZodNormalized, } from "./errors/normalize";
|
|
3266
3266
|
export type { NormalizedError, NormalizedApiError, NormalizedAppError, NormalizedFirebaseAuthError, NormalizedFirebaseFirestoreError, NormalizedFirebaseStorageError, NormalizedNativeError, NormalizedNetworkError, NormalizedUnknownThrownValue, NormalizedZodError, } from "./errors/normalize";
|
|
3267
|
+
export { CART_LANE, CART_LANE_PRIORITY, CART_LANE_LABELS, laneOf, activeLane, laneItems, laneCounts, isLaneCheckoutable, laneBlockReason, isLockedLane, canAddNewItems, type CartLane, type LaneAssignable, } from "./_internal/shared/checkout/lanes";
|
package/dist/index.js
CHANGED
|
@@ -4463,7 +4463,7 @@ export { getProductTableColumns } from "./features/products/index";
|
|
|
4463
4463
|
// SB-UNI-F 2026-05-13 â€" Phase 2 predicates added (classified/digital-code/live).
|
|
4464
4464
|
export { normalizeListingType, isAuctionListing, isPreOrderListing, isStandardListing, isPrizeDrawListing, isClassifiedListing, isDigitalCodeListing, isLiveListing, isArtListing, isStickersListing, } from "./features/products/index";
|
|
4465
4465
|
// SB-UNI-X4 2026-05-13 â€" per-type feature-flag helpers.
|
|
4466
|
-
export { isListingTypeEnabled, isCategoryTypeEnabled, enabledListingTypes, enabledCategoryTypes, } from "./_internal/shared/listing-types/feature-flags";
|
|
4466
|
+
export { isListingTypeEnabled, isCategoryTypeEnabled, enabledListingTypes, enabledCategoryTypes, ALL_LISTING_TYPES, } from "./_internal/shared/listing-types/feature-flags";
|
|
4467
4467
|
// SB-UNI-X5 2026-05-13 â€" action telemetry sink.
|
|
4468
4468
|
export { actionTracker, setActionTrackerSink, resetActionTrackerSink, } from "./_internal/shared/listing-types/action-tracker";
|
|
4469
4469
|
// SB-UNI-S 2026-05-13 â€" cart-level shipping-requirement helpers.
|
|
@@ -5666,3 +5666,6 @@ export { withRetry } from "./http/retry";
|
|
|
5666
5666
|
// Every catch (e: unknown) funnels through normalizeError(e) which returns
|
|
5667
5667
|
// a NormalizedError discriminated union. Audit-catch-normalize enforces this.
|
|
5668
5668
|
export { normalizeError, getErrorMessage, isApiNormalized, isAppNormalized, isFirebaseAuthNormalized, isFirebaseFirestoreNormalized, isFirebaseStorageNormalized, isNativeNormalized, isNetworkNormalized, isUnknownNormalized, isZodNormalized, } from "./errors/normalize";
|
|
5669
|
+
// Checkout lanes — the derived auction > offer > standard partition of the
|
|
5670
|
+
// cart, and the priority rule that decides which one may be checked out.
|
|
5671
|
+
export { CART_LANE, CART_LANE_PRIORITY, CART_LANE_LABELS, laneOf, activeLane, laneItems, laneCounts, isLaneCheckoutable, laneBlockReason, isLockedLane, canAddNewItems, } from "./_internal/shared/checkout/lanes";
|
package/dist/server-entry.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ export { StoreClassifiedsPageView } from "./features/stores/components/StoreClas
|
|
|
45
45
|
export { StoreDigitalCodesPageView } from "./features/stores/components/StoreDigitalCodesPageView";
|
|
46
46
|
export { StoreLiveItemsPageView } from "./features/stores/components/StoreLiveItemsPageView";
|
|
47
47
|
export { getProductForDetail, listSitemapProducts, type SitemapProduct, } from "./_internal/server/features/products/index";
|
|
48
|
+
export { listPublicProducts, parsePublicProductParams, PUBLIC_PRODUCT_MAX_PAGE_SIZE, type PublicProductListInput, type PublicProductListResult, type PublicProductListOptions, type PublicProductExecutor, type PublicProductQuery, } from "./_internal/server/features/products/index";
|
|
48
49
|
export { getAuctionForDetail, getProductFeaturesForAuction, } from "./_internal/server/features/auctions/index";
|
|
49
50
|
export { getPreOrderForDetail, getProductFeaturesForPreOrder, } from "./_internal/server/features/pre-orders/index";
|
|
50
51
|
export { getBrandForDetail, getBrandCategoryForDetail, createBrandAction, updateBrandAction, deleteBrandAction, toggleBrandActiveAction, } from "./_internal/server/features/brands/index";
|
package/dist/server-entry.js
CHANGED
|
@@ -51,6 +51,7 @@ export { StoreDigitalCodesPageView } from "./features/stores/components/StoreDig
|
|
|
51
51
|
export { StoreLiveItemsPageView } from "./features/stores/components/StoreLiveItemsPageView";
|
|
52
52
|
// S2: products data layer — deduped via React.cache()
|
|
53
53
|
export { getProductForDetail, listSitemapProducts, } from "./_internal/server/features/products/index";
|
|
54
|
+
export { listPublicProducts, parsePublicProductParams, PUBLIC_PRODUCT_MAX_PAGE_SIZE, } from "./_internal/server/features/products/index";
|
|
54
55
|
// S3: auctions data layer — deduped via React.cache()
|
|
55
56
|
export { getAuctionForDetail, getProductFeaturesForAuction, } from "./_internal/server/features/auctions/index";
|
|
56
57
|
// S3: pre-orders data layer — deduped via React.cache()
|
package/dist/server.d.ts
CHANGED
|
@@ -501,6 +501,7 @@ export type { GoogleReview, GoogleReviewsResult } from "./features/homepage/lib/
|
|
|
501
501
|
export { GoogleReviewsSection } from "./features/homepage/components/GoogleReviewsSection";
|
|
502
502
|
export type { GoogleReviewsSectionProps } from "./features/homepage/components/GoogleReviewsSection";
|
|
503
503
|
export { getProductForDetail, listSitemapProducts, computeRelatedItems, toProductItem, type SitemapProduct, type RelatedItemsResult, } from "./_internal/server/features/products/index";
|
|
504
|
+
export { listPublicProducts, parsePublicProductParams, PUBLIC_PRODUCT_MAX_PAGE_SIZE, type PublicProductListInput, type PublicProductListResult, type PublicProductListOptions, type PublicProductExecutor, type PublicProductQuery, } from "./_internal/server/features/products/index";
|
|
504
505
|
export { getBundleForDetail, listBundleMembers, listFeaturedBundles, getRelatedBundles, resolveBundleMemberIds, resolveBundleOriginalTotal, buildBundleMetadata, renderBundleOg, renderBundleOgImage, addBundleToCartAction, type BundleDataOptions, type BundleMetadataOptions, type BundleOgData, } from "./_internal/server/features/bundles/index";
|
|
505
506
|
export { getGroupsForProduct, getGroupsWithItemsForProduct, getGroupsForCategory, getGroupsForBrand } from "./_internal/server/features/grouped/index";
|
|
506
507
|
export { getAuctionForDetail, getProductFeaturesForAuction } from "./_internal/server/features/auctions/index";
|
package/dist/server.js
CHANGED
|
@@ -1353,6 +1353,9 @@ export { GoogleReviewsSection } from "./features/homepage/components/GoogleRevie
|
|
|
1353
1353
|
// ---------------------------------------------------------------------------
|
|
1354
1354
|
// Data layers — each wrapped in React.cache for request-scoped dedup
|
|
1355
1355
|
export { getProductForDetail, listSitemapProducts, computeRelatedItems, toProductItem, } from "./_internal/server/features/products/index";
|
|
1356
|
+
// The single public-listing query — every SSR listing view and /api/products
|
|
1357
|
+
// share it so their filter semantics cannot drift (Root Cause #30).
|
|
1358
|
+
export { listPublicProducts, parsePublicProductParams, PUBLIC_PRODUCT_MAX_PAGE_SIZE, } from "./_internal/server/features/products/index";
|
|
1356
1359
|
// S-SBUNI-3/4 2026-05-13 — bundle data/metadata/og layer.
|
|
1357
1360
|
export { getBundleForDetail, listBundleMembers, listFeaturedBundles, getRelatedBundles, resolveBundleMemberIds, resolveBundleOriginalTotal, buildBundleMetadata, renderBundleOg, renderBundleOgImage, addBundleToCartAction, } from "./_internal/server/features/bundles/index";
|
|
1358
1361
|
export { getGroupsForProduct, getGroupsWithItemsForProduct, getGroupsForCategory, getGroupsForBrand } from "./_internal/server/features/grouped/index";
|