@mohasinac/appkit 4.61.0 → 4.62.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.build-stamp.json +3 -3
- package/dist/_internal/client/features/lottery/LotteryAdminEditView.js +19 -3
- package/dist/_internal/client/features/maintenance/views/AnalysisRunnerView.js +1 -1
- package/dist/_internal/client/features/maintenance/views/CloudLogsListView.js +1 -1
- package/dist/_internal/server/features/checkout/actions.d.ts +80 -0
- package/dist/_internal/server/features/checkout/actions.js +542 -26
- package/dist/_internal/server/features/invoicing/allocate.d.ts +63 -0
- package/dist/_internal/server/features/invoicing/allocate.js +162 -0
- package/dist/_internal/server/features/invoicing/credit-note.d.ts +57 -0
- package/dist/_internal/server/features/invoicing/credit-note.js +126 -0
- package/dist/_internal/server/features/invoicing/gstr1.d.ts +74 -0
- package/dist/_internal/server/features/invoicing/gstr1.js +251 -0
- package/dist/_internal/server/features/invoicing/issue.d.ts +96 -0
- package/dist/_internal/server/features/invoicing/issue.js +202 -0
- package/dist/_internal/server/features/orders/actions.d.ts +8 -1
- package/dist/_internal/server/features/orders/actions.js +81 -8
- package/dist/_internal/server/features/orders/adapters.js +33 -0
- package/dist/_internal/server/features/orders/cancellation-refund.d.ts +15 -9
- package/dist/_internal/server/features/orders/cancellation-refund.js +15 -9
- package/dist/_internal/server/features/points/award.js +46 -4
- package/dist/_internal/server/features/refunds/actions.js +26 -0
- package/dist/_internal/server/features/shipping/courier-block.d.ts +69 -0
- package/dist/_internal/server/features/shipping/courier-block.js +239 -0
- package/dist/_internal/server/features/site-settings/adapters.d.ts +1 -1
- package/dist/_internal/server/features/site-settings/adapters.js +15 -0
- package/dist/_internal/server/features/stores/adapters.d.ts +2 -2
- package/dist/_internal/server/features/stores/adapters.js +51 -0
- package/dist/_internal/server/functions/scheduled.js +38 -1
- package/dist/_internal/server/jobs/core/autoPayoutEligibility.js +9 -2
- package/dist/_internal/server/jobs/core/dailyStatusDigest.d.ts +4 -0
- package/dist/_internal/server/jobs/core/dailyStatusDigest.js +19 -2
- package/dist/_internal/server/jobs/core/index.d.ts +2 -1
- package/dist/_internal/server/jobs/core/index.js +2 -1
- package/dist/_internal/server/jobs/core/onJobCreated.d.ts +30 -7
- package/dist/_internal/server/jobs/core/onJobCreated.js +78 -45
- package/dist/_internal/server/jobs/core/onOrderStatusChange.d.ts +7 -0
- package/dist/_internal/server/jobs/core/onOrderStatusChange.js +62 -0
- package/dist/_internal/server/jobs/core/paymentReconcile.js +87 -97
- package/dist/_internal/server/jobs/core/paymentWindowTimeout.js +33 -0
- package/dist/_internal/server/jobs/core/runJobOnce.d.ts +48 -0
- package/dist/_internal/server/jobs/core/runJobOnce.js +195 -0
- package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.js +10 -2
- package/dist/_internal/server/jobs/handlers/onOrderStatusChange.js +17 -0
- package/dist/_internal/server/notifications/channel-health.d.ts +26 -3
- package/dist/_internal/shared/actions/action-registry.js +177 -9
- package/dist/_internal/shared/checkout/coupon-discount.d.ts +43 -1
- package/dist/_internal/shared/checkout/coupon-discount.js +26 -1
- package/dist/_internal/shared/checkout/order-math.d.ts +145 -0
- package/dist/_internal/shared/checkout/order-math.js +173 -0
- package/dist/_internal/shared/checkout/refundable-base.d.ts +25 -0
- package/dist/_internal/shared/checkout/refundable-base.js +13 -1
- package/dist/_internal/shared/checkout/split.d.ts +87 -0
- package/dist/_internal/shared/checkout/split.js +100 -0
- package/dist/_internal/shared/content/disclaimers.d.ts +88 -0
- package/dist/_internal/shared/content/disclaimers.js +217 -0
- package/dist/_internal/shared/content/published-values.d.ts +88 -0
- package/dist/_internal/shared/content/published-values.js +198 -0
- package/dist/_internal/shared/features/admin/integrations.d.ts +109 -0
- package/dist/_internal/shared/features/admin/integrations.js +253 -0
- package/dist/_internal/shared/features/orders/dispute-reasons.d.ts +113 -0
- package/dist/_internal/shared/features/orders/dispute-reasons.js +181 -0
- package/dist/_internal/shared/features/orders/refund-copy.d.ts +1 -1
- package/dist/_internal/shared/features/orders/refund-copy.js +18 -1
- package/dist/_internal/shared/features/points/accepts.d.ts +36 -0
- package/dist/_internal/shared/features/points/accepts.js +43 -0
- package/dist/_internal/shared/features/shipping/shared-purchase.d.ts +91 -0
- package/dist/_internal/shared/features/shipping/shared-purchase.js +108 -0
- package/dist/_internal/shared/features/site-settings/types.d.ts +11 -0
- package/dist/_internal/shared/fees/calculator.d.ts +33 -1
- package/dist/_internal/shared/fees/calculator.js +32 -2
- package/dist/_internal/shared/media/limits.d.ts +10 -0
- package/dist/_internal/shared/media/limits.js +10 -0
- package/dist/_internal/shared/types/action-result.js +15 -1
- package/dist/client/api/surface-error.js +16 -2
- package/dist/client/api/useApiMutation.js +17 -1
- package/dist/client.d.ts +12 -1
- package/dist/client.js +31 -1
- package/dist/constants/api-endpoints.d.ts +45 -0
- package/dist/constants/api-endpoints.js +15 -0
- package/dist/constants/field-names.d.ts +18 -0
- package/dist/constants/field-names.js +28 -0
- package/dist/contracts/index.d.ts +1 -1
- package/dist/contracts/shipping.d.ts +45 -0
- package/dist/contracts/shipping.js +15 -0
- package/dist/core/server-action.js +19 -3
- package/dist/errors/error-mapping.js +26 -1
- package/dist/features/about/components/AboutView.js +1 -1
- package/dist/features/account/components/BuyerAuctionsGuideView.js +4 -1
- package/dist/features/account/components/UserOffersPanel.js +5 -3
- package/dist/features/account/components/UserOrdersView.js +19 -33
- package/dist/features/admin/components/AdminActionIndexView.js +100 -5
- package/dist/features/admin/components/AdminAddressClustersView.js +21 -2
- package/dist/features/admin/components/AdminBlogEditorView.js +8 -8
- package/dist/features/admin/components/AdminCarouselEditorView.js +1 -1
- package/dist/features/admin/components/AdminCarouselView.js +96 -4
- package/dist/features/admin/components/AdminCouponEditorView.js +17 -0
- package/dist/features/admin/components/AdminFulfillmentView.js +3 -2
- package/dist/features/admin/components/AdminInvoicingView.d.ts +2 -0
- package/dist/features/admin/components/AdminInvoicingView.js +65 -0
- package/dist/features/admin/components/AdminMediaView.js +36 -3
- package/dist/features/admin/components/AdminNavigationView.js +4 -1
- package/dist/features/admin/components/AdminOffersView.js +2 -1
- package/dist/features/admin/components/AdminOrderEditorView.d.ts +18 -1
- package/dist/features/admin/components/AdminOrderEditorView.js +11 -2
- package/dist/features/admin/components/AdminOrdersGuideView.js +23 -2
- package/dist/features/admin/components/AdminOrdersView.js +67 -5
- package/dist/features/admin/components/AdminPaymentClustersView.js +19 -2
- package/dist/features/admin/components/AdminProductEditorView.js +2 -2
- package/dist/features/admin/components/AdminSectionsView.d.ts +10 -0
- package/dist/features/admin/components/AdminSectionsView.js +486 -224
- package/dist/features/admin/components/OwnerQuickActions.js +24 -2
- package/dist/features/admin/components/ReferenceRecordEditor.js +1 -1
- package/dist/features/admin/constants/filter-tabs.d.ts +6 -0
- package/dist/features/admin/constants/filter-tabs.js +6 -0
- package/dist/features/admin/constants/site-settings-tabs.d.ts +1 -1
- package/dist/features/admin/hooks/useAdminListingData.js +16 -0
- package/dist/features/admin/hooks/useOptimisticRowFlag.d.ts +33 -0
- package/dist/features/admin/hooks/useOptimisticRowFlag.js +87 -0
- package/dist/features/admin/repository/notification.repository.d.ts +15 -0
- package/dist/features/admin/repository/notification.repository.js +32 -0
- package/dist/features/admin/schemas/action-index-form.d.ts +34 -0
- package/dist/features/admin/schemas/action-index-form.js +115 -0
- package/dist/features/admin/schemas/admin-user-form.d.ts +2 -2
- package/dist/features/admin/schemas/firestore.d.ts +30 -0
- package/dist/features/admin/schemas/firestore.js +5 -0
- package/dist/features/audit-log/schemas/firestore.d.ts +30 -0
- package/dist/features/audit-log/schemas/firestore.js +15 -0
- package/dist/features/auth/components/RegisterForm.js +2 -1
- package/dist/features/auth/permissions/constants.js +13 -0
- package/dist/features/cart/components/CartPriceBreakdown.d.ts +13 -0
- package/dist/features/cart/components/CartPriceBreakdown.js +6 -2
- package/dist/features/cart/components/PointsTenderPicker.d.ts +61 -0
- package/dist/features/cart/components/PointsTenderPicker.js +15 -0
- package/dist/features/cart/components/StoreAddonsPicker.js +2 -1
- package/dist/features/cart/components/index.d.ts +2 -0
- package/dist/features/cart/components/index.js +1 -0
- package/dist/features/cart/repository/cart.repository.d.ts +19 -0
- package/dist/features/cart/repository/cart.repository.js +27 -0
- package/dist/features/cart/schemas/firestore.d.ts +92 -0
- package/dist/features/catalogue/components/CatalogueItemEditorView.js +3 -3
- package/dist/features/contact/email.d.ts +27 -10
- package/dist/features/contact/email.js +20 -3
- package/dist/features/dispute-reasons/repository/dispute-reasons.repository.d.ts +38 -0
- package/dist/features/dispute-reasons/repository/dispute-reasons.repository.js +80 -0
- package/dist/features/dispute-reasons/schemas/firestore.d.ts +64 -0
- package/dist/features/dispute-reasons/schemas/firestore.js +40 -0
- package/dist/features/events/components/AdminEventEditorView.js +8 -6
- package/dist/features/faq/components/FAQAccordion.d.ts +13 -1
- package/dist/features/faq/components/FAQAccordion.js +29 -4
- package/dist/features/invoicing/schemas/firestore.d.ts +112 -0
- package/dist/features/invoicing/schemas/firestore.js +45 -0
- package/dist/features/invoicing/utils/financial-year.d.ts +43 -0
- package/dist/features/invoicing/utils/financial-year.js +53 -0
- package/dist/features/jobs/actions/enqueue-job.js +18 -1
- package/dist/features/jobs/repository/jobs.repository.d.ts +62 -1
- package/dist/features/jobs/repository/jobs.repository.js +84 -1
- package/dist/features/jobs/schemas/firestore.d.ts +80 -0
- package/dist/features/jobs/schemas/firestore.js +37 -0
- package/dist/features/layout/hooks/useFormBottomActions.js +20 -1
- package/dist/features/lottery/schemas/zod.d.ts +6 -6
- package/dist/features/media/MediaImage.js +22 -1
- package/dist/features/media/upload/ImageUpload.js +1 -1
- package/dist/features/obligations/constants/policies.js +24 -1
- package/dist/features/orders/components/EmiInstallmentsPanel.js +25 -7
- package/dist/features/orders/components/OrderPaymentSummary.js +10 -1
- package/dist/features/orders/components/OrderProvenanceCard.d.ts +8 -0
- package/dist/features/orders/components/OrderProvenanceCard.js +185 -0
- package/dist/features/orders/components/RaiseDisputeForm.d.ts +14 -0
- package/dist/features/orders/components/RaiseDisputeForm.js +111 -0
- package/dist/features/orders/components/RefundRequestView.js +22 -4
- package/dist/features/orders/components/index.d.ts +4 -0
- package/dist/features/orders/components/index.js +2 -0
- package/dist/features/orders/constants/order-lane-tabs.d.ts +69 -0
- package/dist/features/orders/constants/order-lane-tabs.js +88 -0
- package/dist/features/orders/repository/orders.repository.d.ts +57 -0
- package/dist/features/orders/repository/orders.repository.js +145 -0
- package/dist/features/orders/schemas/firestore.d.ts +196 -1
- package/dist/features/orders/schemas/index.d.ts +60 -12
- package/dist/features/orders/schemas/index.js +12 -0
- package/dist/features/orders/types/index.d.ts +26 -0
- package/dist/features/orders/utils/courier-block.d.ts +25 -0
- package/dist/features/orders/utils/courier-block.js +23 -0
- package/dist/features/payment-cases/schemas/firestore.d.ts +26 -1
- package/dist/features/payment-cases/schemas/firestore.js +1 -0
- package/dist/features/products/components/GroupMemberPicker.js +4 -1
- package/dist/features/products/components/PrizeDrawDetailPageView.js +2 -2
- package/dist/features/products/components/PrizeDrawEntryActions.js +2 -1
- package/dist/features/products/components/ProductDetailActions.js +2 -1
- package/dist/features/products/components/ProductDetailPageView.d.ts +17 -1
- package/dist/features/products/components/ProductDetailPageView.js +2 -2
- package/dist/features/products/schemas/product-features.validators.d.ts +10 -10
- package/dist/features/promotions/actions/coupon-stacking.d.ts +30 -3
- package/dist/features/promotions/actions/coupon-stacking.js +21 -2
- package/dist/features/promotions/components/CouponCard.js +13 -0
- package/dist/features/promotions/constants/coupon-help.d.ts +2 -2
- package/dist/features/promotions/constants/coupon-help.js +9 -1
- package/dist/features/promotions/schemas/firestore.d.ts +24 -0
- package/dist/features/promotions/schemas/firestore.js +4 -0
- package/dist/features/promotions/types/index.d.ts +19 -1
- package/dist/features/scams/components/ScamProfileView.js +2 -2
- package/dist/features/scams/components/ScamRegistryView.js +2 -2
- package/dist/features/search/action-index/tab-entries.js +1 -1
- package/dist/features/seller/actions/seller-actions.js +33 -3
- package/dist/features/seller/components/FulfillmentView.js +3 -2
- package/dist/features/seller/components/SellerAddressesView.js +32 -4
- package/dist/features/seller/components/SellerAnalyticsAlertsView.js +62 -3
- package/dist/features/seller/components/SellerBundlesView.js +53 -14
- package/dist/features/seller/components/SellerGroupedListingsView.js +23 -3
- package/dist/features/seller/components/SellerListingTypeView.js +56 -10
- package/dist/features/seller/components/SellerOrdersView.js +129 -27
- package/dist/features/seller/components/SellerPayoutMethodsView.js +33 -1
- package/dist/features/seller/components/SellerPayoutSettingsView.js +48 -9
- package/dist/features/seller/components/SellerProductsView.js +5 -1
- package/dist/features/seller/components/SellerShippingConfigsView.js +33 -1
- package/dist/features/seller/components/SellerShippingView.js +2 -1
- package/dist/features/seller/components/SellerStoreCategoriesView.js +33 -1
- package/dist/features/seller/components/SellerSupportView.js +69 -2
- package/dist/features/seller/hooks/useSellerListingData.js +25 -0
- package/dist/features/shell/SectionForm.js +20 -16
- package/dist/features/shell/build-sections.js +14 -1
- package/dist/features/shipments/components/AdminShipmentLotItemsView.js +54 -1
- package/dist/features/shipments/components/AdminShipmentProjectionsView.js +3 -2
- package/dist/features/shipments/schemas/validation.d.ts +4 -4
- package/dist/features/shipping-boxes/repository/shipping-boxes.repository.d.ts +43 -0
- package/dist/features/shipping-boxes/repository/shipping-boxes.repository.js +90 -0
- package/dist/features/shipping-boxes/schemas/firestore.d.ts +82 -0
- package/dist/features/shipping-boxes/schemas/firestore.js +53 -0
- package/dist/features/sticker-trace/components/StickerCommitPanel.js +2 -1
- package/dist/features/sticker-trace/components/StickerPrintPanel.js +2 -1
- package/dist/features/sticker-trace/components/StickerRetryPanel.js +24 -4
- package/dist/features/sticker-trace/components/StickerTraceStudio.js +2 -1
- package/dist/features/store-extensions/schemas/report-create-form.d.ts +2 -2
- package/dist/features/store-extensions/schemas/shipping-config-form.d.ts +2 -2
- package/dist/features/stores/components/StoreOrdersGuideView.js +6 -1
- package/dist/features/stores/schemas/firestore.d.ts +71 -0
- package/dist/features/stores/types/index.d.ts +19 -0
- package/dist/features/support/schemas/index.d.ts +6 -6
- package/dist/features/tester/components/AdminTesterFeedbackIssuesView.js +3 -2
- package/dist/features/wishlist/hooks/useWishlistWithGuest.d.ts +1 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.js +17 -2
- package/dist/next/routing/route-map.d.ts +24 -0
- package/dist/next/routing/route-map.js +19 -0
- package/dist/providers/shipping-shiprocket/index.d.ts +27 -1
- package/dist/providers/shipping-shiprocket/index.js +84 -1
- package/dist/schemas/registry.d.ts +51 -22
- package/dist/schemas/sieve.d.ts +5 -5
- package/dist/server-entry.d.ts +2 -2
- package/dist/server-entry.js +8 -1
- package/dist/server.d.ts +11 -2
- package/dist/server.js +40 -2
- package/dist/styles.css +64 -80
- package/dist/tailwind-utilities.css +1 -1
- package/dist/tokens/themes/default-dark.js +1 -0
- package/dist/tokens/themes/default-light.js +1 -0
- package/dist/tokens/themes/required.d.ts +1 -1
- package/dist/tokens/themes/required.js +1 -0
- package/dist/tokens/tokens.css +15 -0
- package/dist/ui/components/Checkbox.js +10 -2
- package/dist/ui/components/DateInput.js +8 -1
- package/dist/ui/components/Disclaimer.d.ts +19 -0
- package/dist/ui/components/Disclaimer.js +74 -0
- package/dist/ui/components/Input.js +22 -2
- package/dist/ui/components/PaginatedSelect.d.ts +8 -19
- package/dist/ui/components/PaginatedSelect.js +43 -9
- package/dist/ui/components/Radio.js +8 -1
- package/dist/ui/components/Select.js +10 -2
- package/dist/ui/components/TagInput.d.ts +8 -1
- package/dist/ui/components/TagInput.js +4 -3
- package/dist/ui/components/Textarea.js +10 -2
- package/dist/ui/components/tabs-overflow.js +64 -11
- package/dist/ui/forms/FieldCheckbox.js +1 -1
- package/dist/ui/forms/FormErrorList.d.ts +0 -16
- package/dist/ui/forms/FormErrorList.js +34 -1
- package/dist/ui/forms/apply-zod-issues.d.ts +19 -1
- package/dist/ui/forms/apply-zod-issues.js +23 -1
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +6 -0
- package/dist/ui/rich-text/RichText.style.css +48 -79
- package/package.json +1 -1
- package/scripts/seed-cli.mjs +1831 -1822
package/dist/.build-stamp.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"stampVersion": 1,
|
|
3
|
-
"version": "4.
|
|
4
|
-
"head": "
|
|
3
|
+
"version": "4.62.1",
|
|
4
|
+
"head": "83adcbe6a2561f3581bbf3bb11091bbe945bf1e6",
|
|
5
5
|
"branch": "main",
|
|
6
6
|
"dirty": false,
|
|
7
|
-
"builtAt": "2026-10-
|
|
7
|
+
"builtAt": "2026-10-23T04:34:28.254Z"
|
|
8
8
|
}
|
|
@@ -96,6 +96,15 @@ export function LotteryAdminEditView({ eventId, initialData, onSubmit, }) {
|
|
|
96
96
|
* `audit-code-quality`'s DEEP_NESTING rule exists to stop.
|
|
97
97
|
*/
|
|
98
98
|
function SlotTable({ slots, showPrice, onSlotsChange, }) {
|
|
99
|
+
/*
|
|
100
|
+
* Read the form context directly. `SlotTable` is its own component, so the
|
|
101
|
+
* `shellCtx` the parent destructures is out of scope here — but the parent
|
|
102
|
+
* mounts `FormShellContext.Provider` above this, so the errors are
|
|
103
|
+
* reachable. `useContext` rather than `useFormShell()`: this table is
|
|
104
|
+
* also usable outside a form and must not require a provider.
|
|
105
|
+
*/
|
|
106
|
+
const formCtx = React.useContext(FormShellContext);
|
|
107
|
+
const slotError = (idx, field) => formCtx?.errors[`slots.${idx}.${field}`];
|
|
99
108
|
/**
|
|
100
109
|
* Next number is max+1, not length+1.
|
|
101
110
|
*
|
|
@@ -146,19 +155,26 @@ function SlotTable({ slots, showPrice, onSlotsChange, }) {
|
|
|
146
155
|
{
|
|
147
156
|
key: "name",
|
|
148
157
|
header: "Prize name",
|
|
149
|
-
|
|
158
|
+
/*
|
|
159
|
+
* These inputs live in DataTable COLUMN renderers, which get no
|
|
160
|
+
* `errors` argument — a section render would. They read the context
|
|
161
|
+
* this component itself mounts, with the dotted INDEXED key
|
|
162
|
+
* `applyZodIssues` produces (`slots.2.price`), so a rejected slot marks
|
|
163
|
+
* its own row rather than the first one.
|
|
164
|
+
*/
|
|
165
|
+
render: (s) => (_jsx(Input, { type: "text", className: "w-full", placeholder: `Prize for slot ${s.slotNumber}`, value: s.name, error: slotError(s._idx, "name"), onChange: (e) => updateSlot(s._idx, "name", e.target.value), "aria-label": `Slot ${s.slotNumber} prize name` })),
|
|
150
166
|
},
|
|
151
167
|
{
|
|
152
168
|
key: "image",
|
|
153
169
|
header: "Image",
|
|
154
|
-
render: (s) => (_jsx(Input, { type: "text", className: "w-full", placeholder: "/media/\u2026 or https://\u2026", value: s.image ?? "", onChange: (e) => updateSlot(s._idx, "image", e.target.value), "aria-label": `Slot ${s.slotNumber} prize image URL` })),
|
|
170
|
+
render: (s) => (_jsx(Input, { type: "text", className: "w-full", placeholder: "/media/\u2026 or https://\u2026", value: s.image ?? "", error: slotError(s._idx, "image"), onChange: (e) => updateSlot(s._idx, "image", e.target.value), "aria-label": `Slot ${s.slotNumber} prize image URL` })),
|
|
155
171
|
},
|
|
156
172
|
...(showPrice
|
|
157
173
|
? [
|
|
158
174
|
{
|
|
159
175
|
key: "price",
|
|
160
176
|
header: "Price (₹)",
|
|
161
|
-
render: (s) => (_jsx(Input, { type: "number", className: "w-24", placeholder: "0", value: s.price, onChange: (e) => updateSlot(s._idx, "price", e.target.value), "aria-label": `Slot ${s.slotNumber} price` })),
|
|
177
|
+
render: (s) => (_jsx(Input, { type: "number", className: "w-24", placeholder: "0", value: s.price, error: slotError(s._idx, "price"), onChange: (e) => updateSlot(s._idx, "price", e.target.value), "aria-label": `Slot ${s.slotNumber} price` })),
|
|
162
178
|
},
|
|
163
179
|
]
|
|
164
180
|
: []),
|
|
@@ -23,7 +23,7 @@ export function AnalysisRunnerView() {
|
|
|
23
23
|
});
|
|
24
24
|
const body = (await res.json());
|
|
25
25
|
if (!res.ok || !body.ok) {
|
|
26
|
-
setError(("
|
|
26
|
+
setError(toUserMessage("code" in body ? String(body.code) : undefined, undefined, { fallback: `The analysis run failed (HTTP ${res.status}).` }));
|
|
27
27
|
setRunning(false);
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
@@ -32,7 +32,7 @@ export function CloudLogsListView({ title, subtitle, initialEntries, initialNext
|
|
|
32
32
|
const res = await fetch(url.toString());
|
|
33
33
|
const body = (await res.json());
|
|
34
34
|
if (!res.ok || !body.ok) {
|
|
35
|
-
setError(("
|
|
35
|
+
setError(toUserMessage("code" in body ? String(body.code) : undefined, undefined, { fallback: `Could not load logs (HTTP ${res.status}).` }));
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
setEntries((prev) => [...prev, ...body.data.entries]);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type SelectedShippingQuote } from "../../../shared/shipping/quote";
|
|
2
2
|
import { type StoreShippingPolicy } from "../../../shared/features/shipping/mode";
|
|
3
|
+
import { type SharedPurchaseRates } from "../../../shared/features/shipping/shared-purchase";
|
|
3
4
|
import { type CartLane } from "../../../shared/checkout/lanes";
|
|
4
5
|
import type { OutOfStockPolicy } from "../../../../features/orders/schemas/index";
|
|
5
6
|
import { type CheckoutPaymentMethod } from "../../../shared/features/checkout/config";
|
|
@@ -132,6 +133,33 @@ opts?: {
|
|
|
132
133
|
shipping: boolean;
|
|
133
134
|
sale: boolean;
|
|
134
135
|
};
|
|
136
|
+
/**
|
|
137
|
+
* Decision 22 — does this seller accept buyer points as part-payment?
|
|
138
|
+
*
|
|
139
|
+
* Here for the same reason as `storeProtections` directly above: the store
|
|
140
|
+
* document is already in hand, and the accepting store ABSORBS the
|
|
141
|
+
* redemption against its own payout, so this is a liability flag and absence
|
|
142
|
+
* resolves to `false` exactly once, here.
|
|
143
|
+
*
|
|
144
|
+
* 🛑 Resolved through `storeAcceptsPoints()`, never a bare field read — the
|
|
145
|
+
* platform's own storefront always accepts and that is decided in code
|
|
146
|
+
* rather than by a seeded flag somebody can switch off.
|
|
147
|
+
*/
|
|
148
|
+
acceptsPoints: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* S5a — the shared-purchase rates, from the store read this function already
|
|
151
|
+
* performs.
|
|
152
|
+
*
|
|
153
|
+
* Returned RAW rather than as a quote, for the same reason
|
|
154
|
+
* `storeTaxIdentity` is: the decision (how many destinations, and therefore
|
|
155
|
+
* what it costs) belongs to the caller that knows the lines. This function
|
|
156
|
+
* resolves per-store facts.
|
|
157
|
+
*
|
|
158
|
+
* 🛑 `undefined` on a fee is preserved and NOT defaulted to 0 — a seller who
|
|
159
|
+
* opted in without pricing it has not agreed to do it free. `quoteSharedPurchase`
|
|
160
|
+
* reports that as `unpriced` and the caller refuses.
|
|
161
|
+
*/
|
|
162
|
+
sharedPurchaseRates: SharedPurchaseRates;
|
|
135
163
|
}>;
|
|
136
164
|
export interface DroppedCoupon {
|
|
137
165
|
code: string;
|
|
@@ -213,6 +241,26 @@ export interface CheckoutPricingPreviewStore {
|
|
|
213
241
|
supportsSaleProtection: boolean;
|
|
214
242
|
/** True when any of this store's priced lines is `finalSale`. */
|
|
215
243
|
hasFinalSaleItem: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* D46/D47 + decision 22 — does this seller accept points?
|
|
246
|
+
*
|
|
247
|
+
* Carried for the same reason as the two protection booleans directly above:
|
|
248
|
+
* the gate and the amount must be provably one decision rather than two that
|
|
249
|
+
* agree by discipline. A seller card can then say "points not accepted here"
|
|
250
|
+
* instead of the buyer wondering why their discount is smaller than their
|
|
251
|
+
* balance.
|
|
252
|
+
*/
|
|
253
|
+
acceptsPoints: boolean;
|
|
254
|
+
/** Points applied to THIS store's order. Zero when it does not accept them. */
|
|
255
|
+
pointsApplied: number;
|
|
256
|
+
/**
|
|
257
|
+
* S5a — the shared-purchase fee for this store's order (handling + extra
|
|
258
|
+
* shipping legs). Zero on an ordinary single-destination order.
|
|
259
|
+
*
|
|
260
|
+
* 🛑 Surfaced because a coordinator commits against the preview, and the
|
|
261
|
+
* plan is explicit that these fees must be shown BEFORE they commit.
|
|
262
|
+
*/
|
|
263
|
+
sharedPurchaseFee: number;
|
|
216
264
|
}
|
|
217
265
|
export interface CheckoutPricingPreview {
|
|
218
266
|
subtotal: number;
|
|
@@ -229,7 +277,39 @@ export interface CheckoutPricingPreview {
|
|
|
229
277
|
platformFee: number;
|
|
230
278
|
/** GST on the (capped) platform commission. */
|
|
231
279
|
gstOnFee: number;
|
|
280
|
+
/**
|
|
281
|
+
* S5a — handling plus extra shipping legs, across every store in the cart.
|
|
282
|
+
*
|
|
283
|
+
* 🛑 A real additive charge, unlike the tax-inclusive `gstAmount`, so it is
|
|
284
|
+
* a term in `total` and belongs in the fee column.
|
|
285
|
+
*/
|
|
286
|
+
sharedPurchaseFee: number;
|
|
232
287
|
total: number;
|
|
288
|
+
/**
|
|
289
|
+
* D46/D47 — points applied across every accepting store in this checkout.
|
|
290
|
+
*
|
|
291
|
+
* 🛑 `total` stays the ORDER VALUE and is not reduced by this. `amountDue`
|
|
292
|
+
* below is what the buyer actually pays, and the two are deliberately both
|
|
293
|
+
* returned: the summary shows the full total, the discount line, and then the
|
|
294
|
+
* amount due, which is how a buyer can see what their points did. Collapsing
|
|
295
|
+
* them into one figure would hide the discount from the person who earned it.
|
|
296
|
+
*/
|
|
297
|
+
pointsApplied: number;
|
|
298
|
+
/**
|
|
299
|
+
* What the gateway will be asked to capture: `total − pointsApplied`.
|
|
300
|
+
*
|
|
301
|
+
* 🛑 THIS is the parity figure. The capture route and the post-capture guard
|
|
302
|
+
* must both use it, or points become a sixth way the captured amount diverges
|
|
303
|
+
* from the recorded order (D37/D38/D40). Equal to `total` whenever no points
|
|
304
|
+
* are applied, so every existing reader of `total` stays correct.
|
|
305
|
+
*/
|
|
306
|
+
amountDue: number;
|
|
307
|
+
/**
|
|
308
|
+
* The buyer's remaining points balance, for the cart's own copy ("you have
|
|
309
|
+
* N points"). Zero when they have not opted in — the preview does not read a
|
|
310
|
+
* balance it is not going to use.
|
|
311
|
+
*/
|
|
312
|
+
pointsBalance: number;
|
|
233
313
|
/**
|
|
234
314
|
* Per-store breakdown, in group order. Every figure here was already being
|
|
235
315
|
* computed inside the per-group loop and then discarded into an aggregate —
|