@mohasinac/appkit 4.63.0 → 4.63.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/.build-stamp.json +3 -3
- package/dist/features/ads/schemas/booking-write.d.ts +37 -0
- package/dist/features/ads/schemas/booking-write.js +13 -0
- package/dist/features/dispute-reasons/components/AdminDisputeReasonsView.js +9 -5
- package/dist/server-entry.d.ts +1 -1
- package/dist/server-entry.js +10 -1
- package/dist/server.d.ts +2 -0
- package/dist/server.js +14 -0
- package/package.json +1 -1
package/dist/.build-stamp.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"stampVersion": 1,
|
|
3
|
-
"version": "4.63.
|
|
4
|
-
"head": "
|
|
3
|
+
"version": "4.63.2",
|
|
4
|
+
"head": "dd37d5175bd7a2f614092da8fe0cc71892f942a1",
|
|
5
5
|
"branch": "main",
|
|
6
6
|
"dirty": false,
|
|
7
|
-
"builtAt": "2026-10-
|
|
7
|
+
"builtAt": "2026-10-23T08:39:40.479Z"
|
|
8
8
|
}
|
|
@@ -118,3 +118,40 @@ export declare const adModerationSchema: z.ZodEffects<z.ZodObject<{
|
|
|
118
118
|
note?: string | undefined;
|
|
119
119
|
}>;
|
|
120
120
|
export type AdModerationInput = z.infer<typeof adModerationSchema>;
|
|
121
|
+
export declare const adCreativeResubmitSchema: z.ZodObject<{
|
|
122
|
+
creative: z.ZodObject<{
|
|
123
|
+
title: z.ZodString;
|
|
124
|
+
body: z.ZodOptional<z.ZodString>;
|
|
125
|
+
imageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
126
|
+
ctaLabel: z.ZodOptional<z.ZodString>;
|
|
127
|
+
ctaHref: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
128
|
+
}, "strict", z.ZodTypeAny, {
|
|
129
|
+
title: string;
|
|
130
|
+
body?: string | undefined;
|
|
131
|
+
imageUrl?: string | undefined;
|
|
132
|
+
ctaLabel?: string | undefined;
|
|
133
|
+
ctaHref?: string | undefined;
|
|
134
|
+
}, {
|
|
135
|
+
title: string;
|
|
136
|
+
body?: string | undefined;
|
|
137
|
+
imageUrl?: string | undefined;
|
|
138
|
+
ctaLabel?: string | undefined;
|
|
139
|
+
ctaHref?: string | undefined;
|
|
140
|
+
}>;
|
|
141
|
+
}, "strict", z.ZodTypeAny, {
|
|
142
|
+
creative: {
|
|
143
|
+
title: string;
|
|
144
|
+
body?: string | undefined;
|
|
145
|
+
imageUrl?: string | undefined;
|
|
146
|
+
ctaLabel?: string | undefined;
|
|
147
|
+
ctaHref?: string | undefined;
|
|
148
|
+
};
|
|
149
|
+
}, {
|
|
150
|
+
creative: {
|
|
151
|
+
title: string;
|
|
152
|
+
body?: string | undefined;
|
|
153
|
+
imageUrl?: string | undefined;
|
|
154
|
+
ctaLabel?: string | undefined;
|
|
155
|
+
ctaHref?: string | undefined;
|
|
156
|
+
};
|
|
157
|
+
}>;
|
|
@@ -73,3 +73,16 @@ export const adModerationSchema = z
|
|
|
73
73
|
message: "Say why it was rejected — the advertiser sees this and will resubmit without it.",
|
|
74
74
|
path: ["note"],
|
|
75
75
|
});
|
|
76
|
+
/*
|
|
77
|
+
* The resubmit body — the creative alone, under the key the route reads.
|
|
78
|
+
*
|
|
79
|
+
* 🛑 Declared HERE rather than rebuilt at the route, and the reason is a type
|
|
80
|
+
* rather than tidiness: a locally-written `z.object({ creative:
|
|
81
|
+
* adBookingCreativeSchema }).strict()` loses the inner type under this repo's
|
|
82
|
+
* zod, so `body!.creative` arrives as `unknown` and the handler cannot pass it
|
|
83
|
+
* to `resubmitAdCreative`. The sibling POST route works precisely because it
|
|
84
|
+
* uses a published schema's own `_output`; this gives PATCH the same.
|
|
85
|
+
*/
|
|
86
|
+
export const adCreativeResubmitSchema = z
|
|
87
|
+
.object({ creative: adBookingCreativeSchema })
|
|
88
|
+
.strict();
|
|
@@ -10,7 +10,11 @@ import { normalizeError } from "../../../errors/normalize.js";
|
|
|
10
10
|
import { DataListingView } from "../../admin/components/DataListingView.js";
|
|
11
11
|
import { ACTIONS } from "../../../_internal/shared/actions/action-registry.js";
|
|
12
12
|
import { DISPUTE_KIND, } from "../../../_internal/shared/features/orders/dispute-reasons.js";
|
|
13
|
-
import { DISPUTE_REASON_LABEL_MAX, } from "../schemas/firestore.js";
|
|
13
|
+
import { DISPUTE_REASON_FIELDS, DISPUTE_REASON_LABEL_MAX, } from "../schemas/firestore.js";
|
|
14
|
+
/* 🛑 The DEFINING module, never `@mohasinac/appkit/client` — in a view that is
|
|
15
|
+
* fine, but these are the canonical sort helpers and `audit-sieve-constants-views`
|
|
16
|
+
* is what blocks the raw `"label"` / `"-label"` literals below. */
|
|
17
|
+
import { sortBy } from "../../../constants/sort.js";
|
|
14
18
|
/**
|
|
15
19
|
* What each kind MEANS, in one place.
|
|
16
20
|
*
|
|
@@ -104,7 +108,7 @@ export function AdminDisputeReasonsView({ endpoint, onSetActive, onCreate, }) {
|
|
|
104
108
|
subtitle: "What buyers can pick when reporting a problem. A reason's kind decides which gate it inherits — the wording is yours.",
|
|
105
109
|
endpoint: endpoint,
|
|
106
110
|
queryKey: ["admin", "dispute-reasons"],
|
|
107
|
-
defaultSort: "
|
|
111
|
+
defaultSort: sortBy(DISPUTE_REASON_FIELDS.LABEL, "ASC"),
|
|
108
112
|
/*
|
|
109
113
|
* 🛑 REQUIRED on `ListingViewConfig`, and the default must be one of
|
|
110
114
|
* these or the dropdown opens with nothing selected (Root Cause #63).
|
|
@@ -112,9 +116,9 @@ export function AdminDisputeReasonsView({ endpoint, onSetActive, onCreate, }) {
|
|
|
112
116
|
* wording and which kind a reason belongs to.
|
|
113
117
|
*/
|
|
114
118
|
sortOptions: [
|
|
115
|
-
{ value: "
|
|
116
|
-
{ value: "
|
|
117
|
-
{ value: "
|
|
119
|
+
{ value: sortBy(DISPUTE_REASON_FIELDS.LABEL, "ASC"), label: "Wording (A–Z)" },
|
|
120
|
+
{ value: sortBy(DISPUTE_REASON_FIELDS.LABEL, "DESC"), label: "Wording (Z–A)" },
|
|
121
|
+
{ value: sortBy(DISPUTE_REASON_FIELDS.KIND, "ASC"), label: "Kind" },
|
|
118
122
|
],
|
|
119
123
|
filterKeys: ["scope"],
|
|
120
124
|
filterDefaults: { scope: "active" },
|
package/dist/server-entry.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ export { renderScamOg, renderScamOgImage, type ScamOgData, getScammerForDetail,
|
|
|
68
68
|
export { getCategoryForDetail, listRootCategories, listFeaturedCategories, listMenuCategories, getCategoryTree, listSitemapCategories, CATEGORIES_PAGE_SIZE, CATEGORIES_ROOT_TIER, CATEGORIES_MAX_DEPTH, CATEGORIES_SITEMAP_LIMIT, CATEGORIES_FEATURED_LIMIT, CATEGORIES_MENU_LIMIT, } from "./_internal/server/features/categories/index";
|
|
69
69
|
export { getGroupedListingForDetail, getGroupedListingWithItems, listGroupedListings, listFeaturedGroupedListings, listSitemapGroupedListings, getGroupsForProduct, getGroupsWithItemsForProduct, GROUPED_LISTINGS_PAGE_SIZE, GROUPED_LISTINGS_FEATURED_LIMIT, GROUPED_LISTINGS_SITEMAP_LIMIT, buildGroupedListingMetadata, renderGroupedListingOg, type GroupedListingWithItems, type ListGroupedListingsParams, type SitemapGroupedListing, type GroupedListingMetadataOptions, } from "./_internal/server/features/grouped/index";
|
|
70
70
|
export { createCheckoutOrderAction, attachPaymentAction, verifyAndPlaceGatewayOrderAction, previewCheckoutPricing, resolveShippingCost, formatShippingAddress, CHECKOUT_DEFAULT_COMMISSIONS, CHECKOUT_PAYMENT_METHODS, type CreateCheckoutOrderInput, type VerifyAndPlaceGatewayOrderInput, type CheckoutOrderResult, type CheckoutPaymentMethod, type CheckoutPricingPreviewInput, type CheckoutPricingPreview, } from "./_internal/server/features/checkout/index";
|
|
71
|
-
export { unitPriceFor, lineTotalFor, sumGroupGst, computePreOrderDepositAmount, allocatePointsAcrossGroups, resolvePointsTender, type GroupGstSummary, type GstRateSlice, } from "./_internal/shared/checkout/order-math";
|
|
71
|
+
export { unitPriceFor, lineTotalFor, sumGroupGst, computePreOrderDepositAmount, allocatePointsAcrossGroups, pointsBaseForGroup, resolvePointsTender, type GroupGstSummary, type GstRateSlice, } from "./_internal/shared/checkout/order-math";
|
|
72
72
|
export { computeGroupCouponDiscount, computeCartCouponDiscount, type GroupCouponDiscountResult, type CartCouponDiscountResult, } from "./_internal/shared/checkout/coupon-discount";
|
|
73
73
|
export { refundCapacity, refundableBase, committedRefundTotal, platformFeeWithheld, wouldBeFullRefund, MONEY_EPSILON, type RefundCapacity, type RefundableOrderLike, } from "./_internal/shared/checkout/refundable-base";
|
|
74
74
|
export { processRefundAction, type ProcessRefundInput, } from "./_internal/server/features/refunds/actions";
|
package/dist/server-entry.js
CHANGED
|
@@ -113,7 +113,16 @@ export { createCheckoutOrderAction, attachPaymentAction, verifyAndPlaceGatewayOr
|
|
|
113
113
|
// BEFORE the route can get it wrong rather than after — which is the only
|
|
114
114
|
// difference between this entry and the three defects recorded in the comment
|
|
115
115
|
// above (D37, D38, C0c defect 1).
|
|
116
|
-
export { unitPriceFor, lineTotalFor, sumGroupGst, computePreOrderDepositAmount, allocatePointsAcrossGroups,
|
|
116
|
+
export { unitPriceFor, lineTotalFor, sumGroupGst, computePreOrderDepositAmount, allocatePointsAcrossGroups,
|
|
117
|
+
/*
|
|
118
|
+
* The FIFTH, and it is the same story one more time: the route already
|
|
119
|
+
* imported `pointsBaseForGroup` and the import did not resolve, because the
|
|
120
|
+
* symbol was only ever reachable inside appkit. The points tender is
|
|
121
|
+
* computed on a BASE that excludes what points may not be spent on, and a
|
|
122
|
+
* consumer that cannot reach that function has to re-derive it — which is
|
|
123
|
+
* precisely how the four defects named above happened.
|
|
124
|
+
*/
|
|
125
|
+
pointsBaseForGroup, resolvePointsTender, } from "./_internal/shared/checkout/order-math.js";
|
|
117
126
|
/*
|
|
118
127
|
* The coupon discount, exported for the SAME reason `sumGroupGst` above was —
|
|
119
128
|
* and it is the third defect of that exact shape in this one route.
|
package/dist/server.d.ts
CHANGED
|
@@ -639,3 +639,5 @@ export { bookAdSlot, moderateAdCreative, resubmitAdCreative, cancelAdBooking, re
|
|
|
639
639
|
export type { BookAdSlotInput, AdSlotOffer } from "./_internal/server/features/ads/booking";
|
|
640
640
|
export { AD_BOOKING_COLLECTION, AD_BOOKING_PAYMENT_STATES, AD_MODERATION_STATES, adBookingId, adPeriodOf, adPeriodStart, adPeriodEnd, isAdPeriod, isAdBookingLive, } from "./features/ads/schemas/firestore";
|
|
641
641
|
export type { AdBookingDocument, AdBookingCreative, AdBookingPaymentState, AdModerationState, AdPeriod, } from "./features/ads/schemas/firestore";
|
|
642
|
+
export { getDashboardHubData } from "./_internal/server/features/dashboard/data";
|
|
643
|
+
export type { DashboardHubData } from "./_internal/server/features/dashboard/data";
|
package/dist/server.js
CHANGED
|
@@ -1820,3 +1820,17 @@ export { assertCheckoutValueOtp } from "./_internal/server/features/checkout/val
|
|
|
1820
1820
|
*/
|
|
1821
1821
|
export { bookAdSlot, moderateAdCreative, resubmitAdCreative, cancelAdBooking, releaseAdSlot, liveBookingForPlacement, pendingAdBookings, adBookingsForAdvertiser, adSlotOffers, } from "./_internal/server/features/ads/booking.js";
|
|
1822
1822
|
export { AD_BOOKING_COLLECTION, AD_BOOKING_PAYMENT_STATES, AD_MODERATION_STATES, adBookingId, adPeriodOf, adPeriodStart, adPeriodEnd, isAdPeriod, isAdBookingLive, } from "./features/ads/schemas/firestore.js";
|
|
1823
|
+
/*
|
|
1824
|
+
* The dashboard hub's data, for `/admin`, `/store` and `/user` and their
|
|
1825
|
+
* `sections/[section]` pages.
|
|
1826
|
+
*
|
|
1827
|
+
* 🛑 Exported because **there is no `./_internal/*` subpath and there must not
|
|
1828
|
+
* be** — four consumer pages imported
|
|
1829
|
+
* `@mohasinac/appkit/_internal/server/features/dashboard/data` directly and it
|
|
1830
|
+
* resolved to nothing, so `/admin` and all three section indexes were a build
|
|
1831
|
+
* error waiting for the first consumer typecheck that could see it. `_internal`
|
|
1832
|
+
* is unpublished on purpose (audit-violations enforces the boundary); the
|
|
1833
|
+
* server entry is the sanctioned way through, exactly as the checkout maths
|
|
1834
|
+
* above reaches a consumer route.
|
|
1835
|
+
*/
|
|
1836
|
+
export { getDashboardHubData } from "./_internal/server/features/dashboard/data.js";
|