@mohasinac/appkit 4.22.0 → 4.24.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.
Files changed (112) hide show
  1. package/dist/_internal/server/features/bundles/actions.js +7 -0
  2. package/dist/_internal/server/features/checkout/actions.js +24 -16
  3. package/dist/_internal/server/features/checkout/locked-lines.js +12 -2
  4. package/dist/_internal/server/features/stores/adapters.d.ts +1 -1
  5. package/dist/_internal/server/features/stores/adapters.js +5 -0
  6. package/dist/_internal/server/jobs/core/auctionSettlement.js +10 -4
  7. package/dist/_internal/server/jobs/core/offerExpiry.js +10 -2
  8. package/dist/_internal/server/jobs/core/payoutBatch.js +15 -3
  9. package/dist/_internal/shared/actions/action-registry.js +41 -0
  10. package/dist/_internal/shared/checkout/order-math.d.ts +23 -5
  11. package/dist/_internal/shared/checkout/order-math.js +29 -6
  12. package/dist/_internal/shared/checkout/rules/_limits.d.ts +12 -2
  13. package/dist/_internal/shared/checkout/rules/_limits.js +12 -2
  14. package/dist/_internal/shared/features/cart/config.d.ts +2 -1
  15. package/dist/_internal/shared/features/cart/config.js +2 -1
  16. package/dist/_internal/shared/features/cart/schema.d.ts +6 -6
  17. package/dist/_internal/shared/features/notifications/action-url.d.ts +47 -0
  18. package/dist/_internal/shared/features/notifications/action-url.js +111 -0
  19. package/dist/_internal/shared/features/products/schema.d.ts +8 -8
  20. package/dist/_internal/shared/features/promotions/schema.d.ts +4 -4
  21. package/dist/_internal/shared/history/index.d.ts +1 -1
  22. package/dist/_internal/shared/history/types.d.ts +16 -0
  23. package/dist/client.d.ts +2 -0
  24. package/dist/client.js +1 -0
  25. package/dist/constants/field-names.d.ts +12 -0
  26. package/dist/constants/field-names.js +12 -0
  27. package/dist/constants/notification-types.d.ts +38 -10
  28. package/dist/constants/notification-types.js +39 -28
  29. package/dist/features/account/types/index.d.ts +1 -10
  30. package/dist/features/admin/actions/admin-actions.js +13 -3
  31. package/dist/features/admin/actions/notification-actions.d.ts +12 -0
  32. package/dist/features/admin/actions/notification-actions.js +149 -4
  33. package/dist/features/admin/components/AdminBidsView.js +7 -1
  34. package/dist/features/admin/components/AdminScammerEditorView.d.ts +5 -1
  35. package/dist/features/admin/components/AdminScammerEditorView.js +3 -2
  36. package/dist/features/admin/components/AdminSupportTicketDetailView.d.ts +5 -1
  37. package/dist/features/admin/components/AdminSupportTicketDetailView.js +3 -2
  38. package/dist/features/admin/schemas/firestore.d.ts +14 -3
  39. package/dist/features/admin/schemas/firestore.js +79 -0
  40. package/dist/features/auctions/repository/bid.repository.d.ts +21 -8
  41. package/dist/features/auctions/repository/bid.repository.js +57 -33
  42. package/dist/features/auctions/schemas/firestore.d.ts +27 -0
  43. package/dist/features/auctions/schemas/firestore.js +21 -0
  44. package/dist/features/auth/schemas/index.d.ts +2 -2
  45. package/dist/features/cart/actions/cart-actions.d.ts +16 -0
  46. package/dist/features/cart/actions/cart-actions.js +26 -12
  47. package/dist/features/cart/components/CartDrawer.js +2 -1
  48. package/dist/features/cart/schemas/firestore.d.ts +132 -8
  49. package/dist/features/cart/schemas/firestore.js +22 -0
  50. package/dist/features/catalogue/actions/approve-catalogue-listing.js +7 -6
  51. package/dist/features/catalogue/actions/list-from-catalogue.js +2 -2
  52. package/dist/features/catalogue/actions/submit-for-approval.js +1 -4
  53. package/dist/features/catalogue/components/AdminCatalogueApprovalsView.js +5 -1
  54. package/dist/features/catalogue/repository/catalogue.repository.d.ts +23 -0
  55. package/dist/features/catalogue/repository/catalogue.repository.js +28 -1
  56. package/dist/features/catalogue/schemas/firestore.d.ts +19 -0
  57. package/dist/features/catalogue/schemas/firestore.js +12 -0
  58. package/dist/features/categories/schemas/index.d.ts +2 -2
  59. package/dist/features/email/index.d.ts +1 -1
  60. package/dist/features/email/index.js +5 -1
  61. package/dist/features/email/notification-templates.d.ts +35 -0
  62. package/dist/features/email/notification-templates.js +96 -0
  63. package/dist/features/messages/schemas/index.d.ts +6 -6
  64. package/dist/features/orders/schemas/index.d.ts +14 -14
  65. package/dist/features/payments/repository/payout.repository.d.ts +18 -5
  66. package/dist/features/payments/repository/payout.repository.js +45 -19
  67. package/dist/features/payments/schemas/firestore.d.ts +33 -1
  68. package/dist/features/payments/schemas/firestore.js +39 -0
  69. package/dist/features/payments/schemas/index.d.ts +12 -12
  70. package/dist/features/products/schemas/index.d.ts +2 -2
  71. package/dist/features/promotions/schemas/index.d.ts +12 -12
  72. package/dist/features/scams/repository/scammer.repository.d.ts +18 -1
  73. package/dist/features/scams/repository/scammer.repository.js +24 -2
  74. package/dist/features/scams/schemas/firestore.d.ts +24 -0
  75. package/dist/features/scams/schemas/firestore.js +30 -0
  76. package/dist/features/shipments/components/AdminShipmentEditorView.js +2 -1
  77. package/dist/features/shipments/repository/shipments.repository.d.ts +18 -0
  78. package/dist/features/shipments/repository/shipments.repository.js +23 -1
  79. package/dist/features/shipments/schemas/firestore.d.ts +14 -0
  80. package/dist/features/shipments/schemas/firestore.js +19 -0
  81. package/dist/features/status-history/components/RecordStatusTimeline.d.ts +12 -0
  82. package/dist/features/status-history/components/RecordStatusTimeline.js +90 -0
  83. package/dist/features/status-history/index.d.ts +2 -0
  84. package/dist/features/status-history/index.js +1 -0
  85. package/dist/features/stores/repository/store.repository.d.ts +30 -2
  86. package/dist/features/stores/repository/store.repository.js +43 -4
  87. package/dist/features/stores/schemas/firestore.d.ts +29 -0
  88. package/dist/features/stores/schemas/firestore.js +31 -0
  89. package/dist/features/support/repository/support.repository.d.ts +47 -3
  90. package/dist/features/support/repository/support.repository.js +72 -12
  91. package/dist/features/support/schemas/firestore.d.ts +38 -1
  92. package/dist/features/support/schemas/firestore.js +34 -0
  93. package/dist/features/support/schemas/index.d.ts +2 -2
  94. package/dist/features/tester/seed-data/tester-checklist-seed-data.js +84 -0
  95. package/dist/index.d.ts +7 -4
  96. package/dist/index.js +15 -2
  97. package/dist/schemas/registry.d.ts +34 -34
  98. package/dist/seed/bids-seed-data.js +8 -0
  99. package/dist/seed/factories/notification.factory.d.ts +2 -1
  100. package/dist/server-entry.d.ts +1 -0
  101. package/dist/server-entry.js +5 -0
  102. package/dist/server.d.ts +5 -1
  103. package/dist/server.js +10 -1
  104. package/dist/styles.css +58 -1
  105. package/dist/tailwind-utilities.css +1 -1
  106. package/dist/ui/components/QuantityStepper.d.ts +38 -0
  107. package/dist/ui/components/QuantityStepper.js +20 -0
  108. package/dist/ui/components/QuantityStepper.style.css +56 -0
  109. package/dist/ui/components/index.style.css +1 -0
  110. package/dist/ui/index.d.ts +2 -0
  111. package/dist/ui/index.js +1 -0
  112. package/package.json +1 -1
@@ -1156,6 +1156,90 @@ const rawTesterChecklistItems = [
1156
1156
  description: "The fix had to cover the update path as well as create — a create-only fix would mean the listing saved correctly and then lost its per-type block the first time anyone edited anything else (Root Cause #39).",
1157
1157
  href: "/store/classified",
1158
1158
  },
1159
+ {
1160
+ key: "notification-email-is-a-real-email",
1161
+ label: "A notification email has a heading, a lead line and a button — not one bare paragraph",
1162
+ description: "`emailHtml` existed on the input since the channel was built and 0 of 40 call sites passed it, so all 28 notification types shipped `<p>{message}</p>`. Trigger any notification that emails (place an order as a buyer). The mail must carry the site header, a bold title, a one-line lead saying what kind of mail it is, the message, and a CTA button.",
1163
+ href: "/user/notifications",
1164
+ },
1165
+ {
1166
+ key: "notification-click-lands-on-the-right-page",
1167
+ label: "Clicking a notification opens the record it is about, in YOUR portal",
1168
+ description: "actionUrl was set by 5 of 40 writers, so 35 notifications had nothing to click. It is now resolved centrally from relatedType + relatedId + audience. Check that an order notification opens /user/orders/view/... for the buyer and /store/orders/.../view for the seller — the SAME event, two destinations. A bid or offer lands on the list, deliberately: no per-record page exists in any role yet.",
1169
+ href: "/user/notifications",
1170
+ },
1171
+ {
1172
+ key: "admin-can-filter-every-notification-type",
1173
+ label: "The admin notifications filter offers all 28 types, and no imaginary ones",
1174
+ description: "The chips came from a hand-written 9-value list while the document held 27 — so 18 real types were unfilterable and two chips (`review_posted`, `payout_processed`) matched zero rows because no notification has ever had those values. The list is derived now. Confirm `offer_received` and `payment_review` are both present.",
1175
+ href: "/admin/notifications",
1176
+ },
1177
+ {
1178
+ key: "admin-can-allowlist-every-type-per-channel",
1179
+ label: "Site Settings can allow-list offer and payment-review notifications for email",
1180
+ description: "Same 9-value list fed the per-channel allow-list, so an admin literally could not allow-list `offer_received` or `payment_review` — the toggle did not exist. Open Site Settings → Notifications and confirm every type appears in the per-channel type picker.",
1181
+ href: "/admin/site",
1182
+ },
1183
+ {
1184
+ key: "notification-optout-is-honoured-for-emi-and-payment",
1185
+ label: "Turning off order updates actually stops EMI and payment-review emails",
1186
+ description: "`typeToPrefsKey` was a Partial map missing `emi_installment_due_soon`, `emi_installment_overdue` and `payment_review` — and a missing key meant the opt-out check never ran, so the user's setting was silently ignored while reading as honoured. Turn off Order updates in /user/settings, then trigger a payment-review notification and confirm no email arrives.",
1187
+ href: "/user/settings",
1188
+ },
1189
+ {
1190
+ key: "ticket-resolution-timestamp-stamped",
1191
+ label: "Resolving a support ticket records WHEN it was resolved",
1192
+ description: "`resolvedAt` and `closedAt` were declared on the document, had field-name constants, were listed in the update input — and nothing had ever written either (verified 2026-08-26), so no resolved ticket carried a resolution time. Move a ticket to Resolved, reopen it, and confirm the timeline shows a real date on that step. Re-save an unrelated field afterwards: the resolution time must NOT move forward.",
1193
+ href: "/admin/support-tickets",
1194
+ },
1195
+ {
1196
+ key: "payout-utr-actually-saves",
1197
+ label: "The UTR entered when marking a payout paid is still there on reload",
1198
+ description: "The mark-paid modal REQUIRES a transaction reference, the route declared it, its own test asserted it reached the action — and the action picked only status/adminNote/processedAt, so the UTR was dropped while the 200 echoed it back as if stored. Mark a payout paid with a reference, reload the payout, and confirm 'Transaction ref' shows it.",
1199
+ href: "/admin/payouts",
1200
+ },
1201
+ {
1202
+ key: "store-approval-makes-it-public",
1203
+ label: "Approving a pending store actually makes it visible on /stores",
1204
+ description: "`status` and `isPublic` are two distinct fields and public visibility gates on `isPublic`. The admin PATCH wrote `status` directly and never touched `isPublic`, so an approved store was active AND invisible with no error anywhere. Approve `store-blader-bazaar`, then open /stores and confirm it appears.",
1205
+ href: "/admin/stores",
1206
+ },
1207
+ {
1208
+ key: "store-timeline-shows-who-suspended",
1209
+ label: "A suspended store's page shows who suspended it, when, and why",
1210
+ description: "Previously recoverable only from /admin/audit-log, which a store owner can never see. Suspend a store with a reason, open its admin detail page, and confirm the History block names the admin, the time, and the reason.",
1211
+ href: "/admin/stores",
1212
+ },
1213
+ {
1214
+ key: "payout-failure-reasons-survive-retries",
1215
+ label: "A payout that failed twice shows BOTH reasons, not just the last",
1216
+ description: "`lastFailureReason` is overwritten by every retry, so the timeline is the only place earlier attempts survive. Also confirm the four dispatch fields (razorpayPayoutId, razorpayStatus, failureCount, lastFailureReason) render — they were written by the batch and UNDECLARED on the document until 2026-08-26, so nothing could safely surface them.",
1217
+ href: "/admin/payouts",
1218
+ },
1219
+ {
1220
+ key: "bid-timeline-explains-forfeited",
1221
+ label: "A forfeited bid says why it was forfeited",
1222
+ description: "Open a forfeited bid from /admin/bids. The History block must read 'Forfeited' with the system actor and the reason 'The 48-hour checkout window closed without payment.' A bid moves through more states than any record a buyer owns and every one of them happened inside a settlement batch with nothing recording it.",
1223
+ href: "/admin/bids",
1224
+ },
1225
+ {
1226
+ key: "catalogue-rejection-reason-survives",
1227
+ label: "A catalogue item rejected twice keeps both reasons",
1228
+ description: "`rejectionReason` holds only the last decision. Reject a submission, have the owner resubmit, reject again with a different reason — the approval modal's History block must show both, each with its own date.",
1229
+ href: "/admin/catalogue-approvals",
1230
+ },
1231
+ {
1232
+ key: "history-absent-renders-empty-not-invented",
1233
+ label: "A record created BEFORE history existed shows 'no recorded history', not a made-up date",
1234
+ description: "Never fabricate a timestamp. Open any store, payout or ticket that predates this feature: the History block must say there is none, NOT derive a step from `updatedAt` — 'last write of any kind' is not an event, and a made-up date makes the record lie.",
1235
+ href: "/admin/stores",
1236
+ },
1237
+ {
1238
+ key: "history-carries-no-pii",
1239
+ label: "No name or email appears anywhere in a record's History block",
1240
+ description: "`encryptPiiFields` is a flat top-level loop that never descends into arrays, so a PII value inside statusHistory would be stored in PLAINTEXT. Every entry shows a ROLE (Admin/System/Buyer/Store) and never a name. Check a payout (sellerEmail/upiId), a bid (userName/userEmail) and a scammer profile (built entirely of identifying details).",
1241
+ href: "/admin/payouts",
1242
+ },
1159
1243
  {
1160
1244
  key: "form-errors-wait-for-first-submit",
1161
1245
  label: "Opening the address form shows NO errors until you press Save",
package/dist/index.d.ts CHANGED
@@ -678,7 +678,8 @@ export { groupedListingsSeedData } from "./seed/index";
678
678
  export type { CouponDiscountType } from "./seed/index";
679
679
  export type { FirestoreIndexConfig } from "./seed/index";
680
680
  export type { HomepageSectionType } from "./seed/index";
681
- export type { NotificationType } from "./seed/index";
681
+ export type { NotificationType } from "./features/admin/schemas/firestore";
682
+ export { NOTIFICATION_TYPE_VALUES } from "./features/admin/schemas/firestore";
682
683
  export type { PayoutStatus } from "./seed/index";
683
684
  export type { SeedAddressDocument } from "./seed/index";
684
685
  export type { SeedBaseOrderDocument } from "./seed/index";
@@ -1047,7 +1048,6 @@ export type { UserAccountHubViewProps } from "./features/account/index";
1047
1048
  export type { UserAddress } from "./features/account/index";
1048
1049
  export type { UserAddressesViewLabels } from "./features/account/index";
1049
1050
  export type { UserAddressesViewProps } from "./features/account/index";
1050
- export type { UserNotification } from "./features/account/index";
1051
1051
  export type { UserNotificationsViewLabels } from "./features/account/index";
1052
1052
  export type { UserNotificationsViewProps } from "./features/account/index";
1053
1053
  export type { UserOffer } from "./features/account/index";
@@ -1551,7 +1551,7 @@ export { updateBlogPostSchema } from "./features/blog/server";
1551
1551
  export type { BlogPostDetailResponse } from "./features/blog/server";
1552
1552
  export type { CreateBlogPostInput } from "./features/blog/server";
1553
1553
  export type { UpdateBlogPostInput } from "./features/blog/server";
1554
- export { addItemToCart } from "./features/cart/server";
1554
+ export { addItemToCart, assertCanAddNewItems } from "./features/cart/server";
1555
1555
  export { clearCart } from "./features/cart/server";
1556
1556
  export { getCart } from "./features/cart/server";
1557
1557
  export { mergeGuestCart } from "./features/cart/server";
@@ -2120,6 +2120,7 @@ export { SidebarLayout } from "./features/layout/index";
2120
2120
  export { TitleBar } from "./features/layout/index";
2121
2121
  export { TitleBarLayout } from "./features/layout/index";
2122
2122
  export { useBottomActions } from "./features/layout/index";
2123
+ export { RecordStatusTimeline } from "./features/status-history/index";
2123
2124
  export { useFormBottomActions } from "./features/layout/index";
2124
2125
  export { FormErrorList } from "./ui/forms";
2125
2126
  export { OverlayContext, useIsInsideOverlay } from "./ui/components/overlay-context";
@@ -3236,7 +3237,7 @@ export { getListingRule, getCategoryRule, pickOrderType, getSplitKey, runSyncPre
3236
3237
  export type { ListingCheckoutRule, CategoryCheckoutRule, CartItemProductPair, OrderItemInput, RefundPolicy, } from "./_internal/shared/checkout/rules";
3237
3238
  export { MEGABYTE, MAX_IMAGE_BYTES, MAX_PDF_BYTES, MAX_VIDEO_BYTES, MAX_LABEL, MAX_BYTES, ALLOWED_IMAGE_MIMES, ALLOWED_VIDEO_MIMES, ALLOWED_DOC_MIMES, ALLOWED_MIMES, ALLOWED_TYPES_LABEL, MIME_TO_EXT, PDF_MAGIC, VIDEO_CONVERSION_HINTS, classifyMime, isAllowedMime, maxBytesFor, getConversionHint, } from "./_internal/shared/media/limits";
3238
3239
  export type { MediaKind, AllowedImageMime, AllowedVideoMime, AllowedDocMime, AllowedMime, } from "./_internal/shared/media/limits";
3239
- export { PRODUCT_FIELDS, PRODUCT_STATUS_TRANSITIONS, ORDER_FIELDS, REVIEW_FIELDS, BID_FIELDS, AD_FIELDS, BLOG_FIELDS, BRAND_FIELDS, WISHLIST_FIELDS, HISTORY_FIELDS, COUPON_USAGE_FIELDS, CONVERSATION_FIELDS, CAROUSEL_FIELDS, FAQ_FIELDS, HOMEPAGE_SECTION_FIELDS, SITE_SETTINGS_FIELDS, COMMON_FIELDS, OAUTH_STATE_VALUES, SCHEMA_DEFAULTS, } from "./constants/field-names";
3240
+ export { PRODUCT_FIELDS, PRODUCT_STATUS_TRANSITIONS, ORDER_FIELDS, REVIEW_FIELDS, BID_FIELDS, AD_FIELDS, AD_TRACKED_FIELDS, BLOG_FIELDS, BRAND_FIELDS, WISHLIST_FIELDS, HISTORY_FIELDS, COUPON_USAGE_FIELDS, CONVERSATION_FIELDS, CAROUSEL_FIELDS, FAQ_FIELDS, HOMEPAGE_SECTION_FIELDS, SITE_SETTINGS_FIELDS, COMMON_FIELDS, OAUTH_STATE_VALUES, SCHEMA_DEFAULTS, } from "./constants/field-names";
3240
3241
  export { SORT_DIR, sortBy } from "./constants/sort";
3241
3242
  export type { SortDirection } from "./constants/sort";
3242
3243
  export { TABLE_KEYS, VIEW_MODE } from "./constants/table-keys";
@@ -3297,3 +3298,5 @@ export { adminUserUpdateSchema, whatsappSettingsSchema, lotteryPullSchema, } fro
3297
3298
  export { siteSettingsFormSchema } from "./features/admin/schemas/site-settings-form";
3298
3299
  export { createReviewSchema as reviewSubmitSchema } from "./_internal/shared/features/reviews/schema";
3299
3300
  export { wishlistAddSchema } from "./schemas/api-routes";
3301
+ export { withHistory, buildHistoryEntry, appendHistoryEntry, diffTrackedFields, STATUS_HISTORY_MAX, } from "./_internal/shared/history/index";
3302
+ export type { StatusChangeEntry, SerialisedStatusChangeEntry, HistoryActor, HistoryActorRole, FieldChange, } from "./_internal/shared/history/index";
package/dist/index.js CHANGED
@@ -1395,6 +1395,7 @@ export { conversationsSeedData } from "./seed/index";
1395
1395
  // SB-UNI-B â€" sublistingCategoriesSeedData merged into categoriesSeedData with categoryType:"sublisting".
1396
1396
  // groupedListingsSeedData - Model for grouped listings seed data.
1397
1397
  export { groupedListingsSeedData } from "./seed/index";
1398
+ export { NOTIFICATION_TYPE_VALUES } from "./features/admin/schemas/firestore";
1398
1399
  // ./monitoring/index
1399
1400
  // [UTIL]-Pure utility â€" no framework or runtime dependency; safe to import from any environment.
1400
1401
  // ANALYTICS_EVENTS - Constant used across modules.
@@ -2910,7 +2911,8 @@ export { updateBlogPostSchema } from "./features/blog/server";
2910
2911
  // ./features/cart/server
2911
2912
  // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
2912
2913
  // addItemToCart - Helper for add item to cart.
2913
- export { addItemToCart } from "./features/cart/server";
2914
+ // assertCanAddNewItems - the lane gate every add-to-cart entry point must run.
2915
+ export { addItemToCart, assertCanAddNewItems } from "./features/cart/server";
2914
2916
  // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
2915
2917
  // clearCart - Shared export for clear cart.
2916
2918
  export { clearCart } from "./features/cart/server";
@@ -3934,6 +3936,7 @@ export { TitleBarLayout } from "./features/layout/index";
3934
3936
  // [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
3935
3937
  // useBottomActions - React hook for use bottom actions.
3936
3938
  export { useBottomActions } from "./features/layout/index";
3939
+ export { RecordStatusTimeline } from "./features/status-history/index";
3937
3940
  // useFormBottomActions - pins a form's Save/Cancel row + error sheet to the mobile bottom-chrome tier.
3938
3941
  export { useFormBottomActions } from "./features/layout/index";
3939
3942
  export { FormErrorList } from "./ui/forms";
@@ -5641,7 +5644,7 @@ export { MEGABYTE, MAX_IMAGE_BYTES, MAX_PDF_BYTES, MAX_VIDEO_BYTES, MAX_LABEL, M
5641
5644
  // NOTE: STORE_FIELDS, CATEGORY_FIELDS, EVENT_FIELDS, EVENT_ENTRY_FIELDS, PAYOUT_FIELDS,
5642
5645
  // COUPON_FIELDS, CART_FIELDS, USER_FIELDS, ADDRESS_FIELDS, NOTIFICATION_FIELDS,
5643
5646
  // SESSION_FIELDS, SCAMMER_FIELDS are already exported from feature barrels above.
5644
- export { PRODUCT_FIELDS, PRODUCT_STATUS_TRANSITIONS, ORDER_FIELDS, REVIEW_FIELDS, BID_FIELDS, AD_FIELDS, BLOG_FIELDS, BRAND_FIELDS, WISHLIST_FIELDS, HISTORY_FIELDS, COUPON_USAGE_FIELDS, CONVERSATION_FIELDS, CAROUSEL_FIELDS, FAQ_FIELDS, HOMEPAGE_SECTION_FIELDS, SITE_SETTINGS_FIELDS, COMMON_FIELDS, OAUTH_STATE_VALUES, SCHEMA_DEFAULTS, } from "./constants/field-names";
5647
+ export { PRODUCT_FIELDS, PRODUCT_STATUS_TRANSITIONS, ORDER_FIELDS, REVIEW_FIELDS, BID_FIELDS, AD_FIELDS, AD_TRACKED_FIELDS, BLOG_FIELDS, BRAND_FIELDS, WISHLIST_FIELDS, HISTORY_FIELDS, COUPON_USAGE_FIELDS, CONVERSATION_FIELDS, CAROUSEL_FIELDS, FAQ_FIELDS, HOMEPAGE_SECTION_FIELDS, SITE_SETTINGS_FIELDS, COMMON_FIELDS, OAUTH_STATE_VALUES, SCHEMA_DEFAULTS, } from "./constants/field-names";
5645
5648
  // ── Sort helpers ──────────────────────────────────────────────────────────────
5646
5649
  export { SORT_DIR, sortBy } from "./constants/sort";
5647
5650
  // ── URL table keys + view mode ────────────────────────────────────────────────
@@ -5715,3 +5718,13 @@ export { siteSettingsFormSchema } from "./features/admin/schemas/site-settings-f
5715
5718
  */
5716
5719
  export { createReviewSchema as reviewSubmitSchema } from "./_internal/shared/features/reviews/schema";
5717
5720
  export { wishlistAddSchema } from "./schemas/api-routes";
5721
+ /*
5722
+ * Status history — the generic primitive behind every entity timeline.
5723
+ *
5724
+ * `withHistory` is exported because ads have no repository of their own: they
5725
+ * live inside the `siteSettings` singleton, so their route calls it directly.
5726
+ * Every other adopter funnels through its repository's write primitives and
5727
+ * should keep doing so — a call site reaching for this outside a repository
5728
+ * is usually a missing funnel, not a reason to export more of it.
5729
+ */
5730
+ export { withHistory, buildHistoryEntry, appendHistoryEntry, diffTrackedFields, STATUS_HISTORY_MAX, } from "./_internal/shared/history/index";
@@ -1234,7 +1234,7 @@ export declare const SCHEMAS: {
1234
1234
  }, import("zod").ZodTypeAny, "passthrough"> | undefined;
1235
1235
  featuredPriority?: number | undefined;
1236
1236
  isBrand?: boolean | undefined;
1237
- createdByType?: "store" | "admin" | undefined;
1237
+ createdByType?: "admin" | "store" | undefined;
1238
1238
  createdByStoreId?: string | undefined;
1239
1239
  itemCode?: string | undefined;
1240
1240
  brandWebsite?: string | undefined;
@@ -1333,7 +1333,7 @@ export declare const SCHEMAS: {
1333
1333
  }, import("zod").ZodTypeAny, "passthrough"> | undefined;
1334
1334
  featuredPriority?: number | undefined;
1335
1335
  isBrand?: boolean | undefined;
1336
- createdByType?: "store" | "admin" | undefined;
1336
+ createdByType?: "admin" | "store" | undefined;
1337
1337
  createdByStoreId?: string | undefined;
1338
1338
  itemCode?: string | undefined;
1339
1339
  brandWebsite?: string | undefined;
@@ -1406,7 +1406,7 @@ export declare const SCHEMAS: {
1406
1406
  }>;
1407
1407
  }, "strip", import("zod").ZodTypeAny, {
1408
1408
  type: "fixed" | "percentage" | "free_shipping" | "buy_x_get_y";
1409
- scope: "admin" | "seller";
1409
+ scope: "seller" | "admin";
1410
1410
  name: string;
1411
1411
  discount: {
1412
1412
  value: number;
@@ -1425,7 +1425,7 @@ export declare const SCHEMAS: {
1425
1425
  description?: string | undefined;
1426
1426
  }, {
1427
1427
  type: "fixed" | "percentage" | "free_shipping" | "buy_x_get_y";
1428
- scope: "admin" | "seller";
1428
+ scope: "seller" | "admin";
1429
1429
  name: string;
1430
1430
  discount: {
1431
1431
  value: number;
@@ -1485,7 +1485,7 @@ export declare const SCHEMAS: {
1485
1485
  couponId: string;
1486
1486
  couponSnapshot: {
1487
1487
  type: "fixed" | "percentage" | "free_shipping" | "buy_x_get_y";
1488
- scope: "admin" | "seller";
1488
+ scope: "seller" | "admin";
1489
1489
  name: string;
1490
1490
  discount: {
1491
1491
  value: number;
@@ -1525,7 +1525,7 @@ export declare const SCHEMAS: {
1525
1525
  couponId: string;
1526
1526
  couponSnapshot: {
1527
1527
  type: "fixed" | "percentage" | "free_shipping" | "buy_x_get_y";
1528
- scope: "admin" | "seller";
1528
+ scope: "seller" | "admin";
1529
1529
  name: string;
1530
1530
  discount: {
1531
1531
  value: number;
@@ -1596,7 +1596,7 @@ export declare const SCHEMAS: {
1596
1596
  body: string;
1597
1597
  isRead: boolean;
1598
1598
  senderId: string;
1599
- senderRole: "seller" | "buyer";
1599
+ senderRole: "buyer" | "seller";
1600
1600
  sentAt: string | Date | import("zod").objectOutputType<{
1601
1601
  toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
1602
1602
  }, import("zod").ZodTypeAny, "passthrough">;
@@ -1606,7 +1606,7 @@ export declare const SCHEMAS: {
1606
1606
  body: string;
1607
1607
  isRead: boolean;
1608
1608
  senderId: string;
1609
- senderRole: "seller" | "buyer";
1609
+ senderRole: "buyer" | "seller";
1610
1610
  sentAt: string | Date | import("zod").objectInputType<{
1611
1611
  toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
1612
1612
  }, import("zod").ZodTypeAny, "passthrough">;
@@ -1644,7 +1644,7 @@ export declare const SCHEMAS: {
1644
1644
  body: string;
1645
1645
  isRead: boolean;
1646
1646
  senderId: string;
1647
- senderRole: "seller" | "buyer";
1647
+ senderRole: "buyer" | "seller";
1648
1648
  sentAt: string | Date | import("zod").objectOutputType<{
1649
1649
  toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
1650
1650
  }, import("zod").ZodTypeAny, "passthrough">;
@@ -1677,7 +1677,7 @@ export declare const SCHEMAS: {
1677
1677
  body: string;
1678
1678
  isRead: boolean;
1679
1679
  senderId: string;
1680
- senderRole: "seller" | "buyer";
1680
+ senderRole: "buyer" | "seller";
1681
1681
  sentAt: string | Date | import("zod").objectInputType<{
1682
1682
  toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
1683
1683
  }, import("zod").ZodTypeAny, "passthrough">;
@@ -1838,7 +1838,7 @@ export declare const SCHEMAS: {
1838
1838
  code: string;
1839
1839
  type: "fixed" | "percentage" | "free_shipping" | "buy_x_get_y";
1840
1840
  id: string;
1841
- scope: "admin" | "seller";
1841
+ scope: "seller" | "admin";
1842
1842
  name: string;
1843
1843
  createdAt: string | Date | import("zod").objectOutputType<{
1844
1844
  toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
@@ -1896,7 +1896,7 @@ export declare const SCHEMAS: {
1896
1896
  code: string;
1897
1897
  type: "fixed" | "percentage" | "free_shipping" | "buy_x_get_y";
1898
1898
  id: string;
1899
- scope: "admin" | "seller";
1899
+ scope: "seller" | "admin";
1900
1900
  name: string;
1901
1901
  createdAt: string | Date | import("zod").objectInputType<{
1902
1902
  toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
@@ -2372,14 +2372,14 @@ export declare const SCHEMAS: {
2372
2372
  code: string;
2373
2373
  type: "auto" | "coupon" | "deal";
2374
2374
  discountAmount: number;
2375
- scope?: "admin" | "seller" | undefined;
2375
+ scope?: "seller" | "admin" | undefined;
2376
2376
  storeId?: string | undefined;
2377
2377
  couponId?: string | undefined;
2378
2378
  }, {
2379
2379
  code: string;
2380
2380
  type: "auto" | "coupon" | "deal";
2381
2381
  discountAmount: number;
2382
- scope?: "admin" | "seller" | undefined;
2382
+ scope?: "seller" | "admin" | undefined;
2383
2383
  storeId?: string | undefined;
2384
2384
  couponId?: string | undefined;
2385
2385
  }>, "many">>;
@@ -2510,9 +2510,9 @@ export declare const SCHEMAS: {
2510
2510
  overrideReason: import("zod").ZodOptional<import("zod").ZodString>;
2511
2511
  }, "strip", import("zod").ZodTypeAny, {
2512
2512
  type: "full" | "partial";
2513
+ reason: string;
2513
2514
  amount: number;
2514
2515
  refundId: string;
2515
- reason: string;
2516
2516
  refundedAt: string | Date | import("zod").objectOutputType<{
2517
2517
  toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
2518
2518
  }, import("zod").ZodTypeAny, "passthrough">;
@@ -2525,9 +2525,9 @@ export declare const SCHEMAS: {
2525
2525
  overrideReason?: string | undefined;
2526
2526
  }, {
2527
2527
  type: "full" | "partial";
2528
+ reason: string;
2528
2529
  amount: number;
2529
2530
  refundId: string;
2530
- reason: string;
2531
2531
  refundedAt: string | Date | import("zod").objectInputType<{
2532
2532
  toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
2533
2533
  }, import("zod").ZodTypeAny, "passthrough">;
@@ -2658,6 +2658,7 @@ export declare const SCHEMAS: {
2658
2658
  shelf: string;
2659
2659
  bin: string;
2660
2660
  } | undefined;
2661
+ offerId?: string | undefined;
2661
2662
  orderType?: string | undefined;
2662
2663
  imageUrls?: string[] | undefined;
2663
2664
  refundFeeDeducted?: number | undefined;
@@ -2668,7 +2669,7 @@ export declare const SCHEMAS: {
2668
2669
  code: string;
2669
2670
  type: "auto" | "coupon" | "deal";
2670
2671
  discountAmount: number;
2671
- scope?: "admin" | "seller" | undefined;
2672
+ scope?: "seller" | "admin" | undefined;
2672
2673
  storeId?: string | undefined;
2673
2674
  couponId?: string | undefined;
2674
2675
  }[] | undefined;
@@ -2695,14 +2696,13 @@ export declare const SCHEMAS: {
2695
2696
  }[] | undefined;
2696
2697
  emiRemainingBalance?: number | undefined;
2697
2698
  emiComplete?: boolean | undefined;
2698
- offerId?: string | undefined;
2699
2699
  isNonRefundable?: boolean | undefined;
2700
2700
  paymentBatchId?: string | undefined;
2701
2701
  refunds?: {
2702
2702
  type: "full" | "partial";
2703
+ reason: string;
2703
2704
  amount: number;
2704
2705
  refundId: string;
2705
- reason: string;
2706
2706
  refundedAt: string | Date | import("zod").objectOutputType<{
2707
2707
  toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
2708
2708
  }, import("zod").ZodTypeAny, "passthrough">;
@@ -2806,6 +2806,7 @@ export declare const SCHEMAS: {
2806
2806
  shelf: string;
2807
2807
  bin: string;
2808
2808
  } | undefined;
2809
+ offerId?: string | undefined;
2809
2810
  orderType?: string | undefined;
2810
2811
  imageUrls?: string[] | undefined;
2811
2812
  refundFeeDeducted?: number | undefined;
@@ -2816,7 +2817,7 @@ export declare const SCHEMAS: {
2816
2817
  code: string;
2817
2818
  type: "auto" | "coupon" | "deal";
2818
2819
  discountAmount: number;
2819
- scope?: "admin" | "seller" | undefined;
2820
+ scope?: "seller" | "admin" | undefined;
2820
2821
  storeId?: string | undefined;
2821
2822
  couponId?: string | undefined;
2822
2823
  }[] | undefined;
@@ -2843,14 +2844,13 @@ export declare const SCHEMAS: {
2843
2844
  }[] | undefined;
2844
2845
  emiRemainingBalance?: number | undefined;
2845
2846
  emiComplete?: boolean | undefined;
2846
- offerId?: string | undefined;
2847
2847
  isNonRefundable?: boolean | undefined;
2848
2848
  paymentBatchId?: string | undefined;
2849
2849
  refunds?: {
2850
2850
  type: "full" | "partial";
2851
+ reason: string;
2851
2852
  amount: number;
2852
2853
  refundId: string;
2853
- reason: string;
2854
2854
  refundedAt: string | Date | import("zod").objectInputType<{
2855
2855
  toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
2856
2856
  }, import("zod").ZodTypeAny, "passthrough">;
@@ -2944,20 +2944,20 @@ export declare const SCHEMAS: {
2944
2944
  toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
2945
2945
  }, import("zod").ZodTypeAny, "passthrough">>]>;
2946
2946
  }, "strip", import("zod").ZodTypeAny, {
2947
+ reason: string;
2947
2948
  orderId: string;
2948
2949
  refundId: string;
2949
2950
  refundedAmount: number;
2950
2951
  deductedAmount: number;
2951
- reason: string;
2952
2952
  appliedAt: string | Date | import("zod").objectOutputType<{
2953
2953
  toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
2954
2954
  }, import("zod").ZodTypeAny, "passthrough">;
2955
2955
  }, {
2956
+ reason: string;
2956
2957
  orderId: string;
2957
2958
  refundId: string;
2958
2959
  refundedAmount: number;
2959
2960
  deductedAmount: number;
2960
- reason: string;
2961
2961
  appliedAt: string | Date | import("zod").objectInputType<{
2962
2962
  toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
2963
2963
  }, import("zod").ZodTypeAny, "passthrough">;
@@ -2999,6 +2999,9 @@ export declare const SCHEMAS: {
2999
2999
  platformFeeRate: number;
3000
3000
  paymentMethod: "bank_transfer" | "upi";
3001
3001
  orderIds: string[];
3002
+ processedAt?: string | Date | import("zod").objectOutputType<{
3003
+ toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
3004
+ }, import("zod").ZodTypeAny, "passthrough"> | undefined;
3002
3005
  bankAccount?: {
3003
3006
  accountHolderName: string;
3004
3007
  accountNumberMasked: string;
@@ -3014,19 +3017,16 @@ export declare const SCHEMAS: {
3014
3017
  gstRate?: number | undefined;
3015
3018
  isAutomatic?: boolean | undefined;
3016
3019
  refundDeductions?: {
3020
+ reason: string;
3017
3021
  orderId: string;
3018
3022
  refundId: string;
3019
3023
  refundedAmount: number;
3020
3024
  deductedAmount: number;
3021
- reason: string;
3022
3025
  appliedAt: string | Date | import("zod").objectOutputType<{
3023
3026
  toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
3024
3027
  }, import("zod").ZodTypeAny, "passthrough">;
3025
3028
  }[] | undefined;
3026
3029
  netAmount?: number | undefined;
3027
- processedAt?: string | Date | import("zod").objectOutputType<{
3028
- toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
3029
- }, import("zod").ZodTypeAny, "passthrough"> | undefined;
3030
3030
  }, {
3031
3031
  currency: string;
3032
3032
  status: "paid" | "failed" | "pending" | "processing";
@@ -3049,6 +3049,9 @@ export declare const SCHEMAS: {
3049
3049
  platformFeeRate: number;
3050
3050
  paymentMethod: "bank_transfer" | "upi";
3051
3051
  orderIds: string[];
3052
+ processedAt?: string | Date | import("zod").objectInputType<{
3053
+ toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
3054
+ }, import("zod").ZodTypeAny, "passthrough"> | undefined;
3052
3055
  bankAccount?: {
3053
3056
  accountHolderName: string;
3054
3057
  accountNumberMasked: string;
@@ -3064,19 +3067,16 @@ export declare const SCHEMAS: {
3064
3067
  gstRate?: number | undefined;
3065
3068
  isAutomatic?: boolean | undefined;
3066
3069
  refundDeductions?: {
3070
+ reason: string;
3067
3071
  orderId: string;
3068
3072
  refundId: string;
3069
3073
  refundedAmount: number;
3070
3074
  deductedAmount: number;
3071
- reason: string;
3072
3075
  appliedAt: string | Date | import("zod").objectInputType<{
3073
3076
  toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
3074
3077
  }, import("zod").ZodTypeAny, "passthrough">;
3075
3078
  }[] | undefined;
3076
3079
  netAmount?: number | undefined;
3077
- processedAt?: string | Date | import("zod").objectInputType<{
3078
- toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
3079
- }, import("zod").ZodTypeAny, "passthrough"> | undefined;
3080
3080
  }>;
3081
3081
  readonly reviews: import("zod").ZodObject<{
3082
3082
  createdAt: import("zod").ZodUnion<[import("zod").ZodDate, import("zod").ZodString, import("zod").ZodObject<{
@@ -4192,6 +4192,7 @@ export declare const SCHEMAS: {
4192
4192
  closedAt?: string | Date | import("zod").objectOutputType<{
4193
4193
  toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
4194
4194
  }, import("zod").ZodTypeAny, "passthrough"> | undefined;
4195
+ assignedToName?: string | undefined;
4195
4196
  relatedParties?: {
4196
4197
  storeId?: string | undefined;
4197
4198
  userId?: string | undefined;
@@ -4199,7 +4200,6 @@ export declare const SCHEMAS: {
4199
4200
  productId?: string | undefined;
4200
4201
  bidId?: string | undefined;
4201
4202
  } | undefined;
4202
- assignedToName?: string | undefined;
4203
4203
  internalNotes?: string | undefined;
4204
4204
  }, {
4205
4205
  status: "closed" | "open" | "resolved" | "in_progress" | "waiting_on_user";
@@ -4235,6 +4235,7 @@ export declare const SCHEMAS: {
4235
4235
  closedAt?: string | Date | import("zod").objectInputType<{
4236
4236
  toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
4237
4237
  }, import("zod").ZodTypeAny, "passthrough"> | undefined;
4238
+ assignedToName?: string | undefined;
4238
4239
  relatedParties?: {
4239
4240
  storeId?: string | undefined;
4240
4241
  userId?: string | undefined;
@@ -4242,7 +4243,6 @@ export declare const SCHEMAS: {
4242
4243
  productId?: string | undefined;
4243
4244
  bidId?: string | undefined;
4244
4245
  } | undefined;
4245
- assignedToName?: string | undefined;
4246
4246
  internalNotes?: string | undefined;
4247
4247
  }>;
4248
4248
  };
@@ -35,6 +35,14 @@ const BIDDER_NAMES = {
35
35
  "user-rohit-collector": "Mock User 14",
36
36
  "user-ananya-collector": "Mock User 9",
37
37
  };
38
+ /*
39
+ * Typed on the document, not `FirestoreDocument`. Once `BidDocument` gained
40
+ * `statusHistory?: StatusChangeEntry[]`, `Partial<BidDocument>` stopped being
41
+ * assignable to `FirestoreDocument` — an array of objects does not satisfy
42
+ * that index signature. The right fix is to narrow the parameter to what the
43
+ * caller actually passes rather than widen the document to keep a helper
44
+ * happy.
45
+ */
38
46
  function withBidDefaults(b) {
39
47
  return {
40
48
  ...b,
@@ -1,4 +1,5 @@
1
- export type NotificationType = "order_placed" | "order_shipped" | "order_delivered" | "order_cancelled" | "bid_outbid" | "bid_won" | "review_received" | "payout_completed" | "system";
1
+ import type { NotificationType } from "../../features/admin/schemas/firestore";
2
+ export type { NotificationType };
2
3
  export interface SeedNotificationDocument {
3
4
  id: string;
4
5
  userId: string;
@@ -67,6 +67,7 @@ export { getSearchResults, searchAction, type SearchQuery, } from "./_internal/s
67
67
  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";
68
68
  export { getGroupedListingForDetail, getGroupedListingWithItems, listGroupedListings, listFeaturedGroupedListings, listSitemapGroupedListings, getGroupsForProduct, getGroupsWithItemsForProduct, GROUPED_LISTINGS_PAGE_SIZE, GROUPED_LISTINGS_FEATURED_LIMIT, GROUPED_LISTINGS_SITEMAP_LIMIT, type GroupedListingWithItems, type ListGroupedListingsParams, type SitemapGroupedListing, } from "./_internal/server/features/grouped/index";
69
69
  export { createCheckoutOrderAction, attachPaymentAction, verifyAndPlaceRazorpayOrderAction, previewCheckoutPricing, resolveShippingCost, formatShippingAddress, CHECKOUT_DEFAULT_COMMISSIONS, CHECKOUT_PAYMENT_METHODS, type CreateCheckoutOrderInput, type VerifyAndPlaceRazorpayOrderInput, type CheckoutOrderResult, type CheckoutPaymentMethod, type CheckoutPricingPreviewInput, type CheckoutPricingPreview, } from "./_internal/server/features/checkout/index";
70
+ export { unitPriceFor, lineTotalFor, computePreOrderDepositAmount, } from "./_internal/shared/checkout/order-math";
70
71
  export { processRefundAction, type ProcessRefundInput, } from "./_internal/server/features/refunds/actions";
71
72
  export { createPaymentIntentAction, verifyPaymentSignatureAction, resolvePaymentFee, PAYMENTS_DEFAULT_PLATFORM_FEE_PERCENT, PAYMENTS_DEFAULT_GST_PERCENT, PAYMENTS_RECEIPT_PREFIX, type CreatePaymentIntentInput, type CreatePaymentIntentResult, type VerifyPaymentSignatureInput, type ResolvedPaymentFee, } from "./_internal/server/features/payments/index";
72
73
  export { getSublistingCategoryForDetail } from "./_internal/server/features/sublisting-categories/index";
@@ -97,6 +97,11 @@ export { getGroupedListingForDetail, getGroupedListingWithItems, listGroupedList
97
97
  // `.listByType("bundle", opts)` / `.findById(id)` directly.
98
98
  // S4: checkout actions
99
99
  export { createCheckoutOrderAction, attachPaymentAction, verifyAndPlaceRazorpayOrderAction, previewCheckoutPricing, resolveShippingCost, formatShippingAddress, CHECKOUT_DEFAULT_COMMISSIONS, CHECKOUT_PAYMENT_METHODS, } from "./_internal/server/features/checkout/index";
100
+ // The one definition of "what does this cart line cost". Exported because the
101
+ // consumer's Razorpay create-order route needs it: that route used to hand-roll
102
+ // the rule and reproduced only the bundle branch, so it captured the LIST price
103
+ // for an accepted offer. Pure math — no Firestore, no server-only imports.
104
+ export { unitPriceFor, lineTotalFor, computePreOrderDepositAmount, } from "./_internal/shared/checkout/order-math";
100
105
  // S-SBUNI-RULES: refund action
101
106
  export { processRefundAction, } from "./_internal/server/features/refunds/actions";
102
107
  // S4: payments actions
package/dist/server.d.ts CHANGED
@@ -231,7 +231,7 @@ export { getLatestBlogPosts } from "./features/blog/server";
231
231
  export { listBlogPosts } from "./features/blog/server";
232
232
  export { updateBlogPost } from "./features/blog/server";
233
233
  export { updateBlogPostSchema } from "./features/blog/server";
234
- export { addItemToCart } from "./features/cart/server";
234
+ export { addItemToCart, assertCanAddNewItems } from "./features/cart/server";
235
235
  export { clearCart } from "./features/cart/server";
236
236
  export { getCart } from "./features/cart/server";
237
237
  export { mergeGuestCart } from "./features/cart/server";
@@ -573,3 +573,7 @@ export { toClientLotterySlot, toClientLotteryConfig } from "./_internal/server/f
573
573
  export { buildLotteryMetadata } from "./_internal/server/features/lottery/metadata";
574
574
  export { submitLotteryPullAction, flagLotteryEntryAction, reopenLotterySlotAction, createLotteryEventAction, updateLotteryEventAction, setProductLotteryModeAction, } from "./_internal/server/features/lottery/actions";
575
575
  export { lotteryEntryRepository } from "./features/lottery/repository/lottery-entry.repository";
576
+ export { renderNotificationEmail, NOTIFICATION_EMAIL_TEMPLATES, } from "./features/email/notification-templates";
577
+ export type { NotificationTemplateDef, NotificationEmailContext, } from "./features/email/notification-templates";
578
+ export { resolveNotificationActionUrl, } from "./_internal/shared/features/notifications/action-url";
579
+ export type { NotificationAudience } from "./_internal/shared/features/notifications/action-url";
package/dist/server.js CHANGED
@@ -658,7 +658,8 @@ export { updateBlogPost } from "./features/blog/server";
658
658
  export { updateBlogPostSchema } from "./features/blog/server";
659
659
  // [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
660
660
  // addItemToCart - Helper for add item to cart.
661
- export { addItemToCart } from "./features/cart/server";
661
+ // assertCanAddNewItems - the lane gate every add-to-cart entry point must run.
662
+ export { addItemToCart, assertCanAddNewItems } from "./features/cart/server";
662
663
  // [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
663
664
  // clearCart - Shared export for clear cart.
664
665
  export { clearCart } from "./features/cart/server";
@@ -1444,3 +1445,11 @@ export { toClientLotterySlot, toClientLotteryConfig } from "./_internal/server/f
1444
1445
  export { buildLotteryMetadata } from "./_internal/server/features/lottery/metadata";
1445
1446
  export { submitLotteryPullAction, flagLotteryEntryAction, reopenLotterySlotAction, createLotteryEventAction, updateLotteryEventAction, setProductLotteryModeAction, } from "./_internal/server/features/lottery/actions";
1446
1447
  export { lotteryEntryRepository } from "./features/lottery/repository/lottery-entry.repository";
1448
+ /*
1449
+ * Notification email templates + the shared actionUrl resolver.
1450
+ *
1451
+ * Server-only: the templates call `renderToStaticMarkup` through a lazy
1452
+ * `require`, which must never end up reachable from a client chunk.
1453
+ */
1454
+ export { renderNotificationEmail, NOTIFICATION_EMAIL_TEMPLATES, } from "./features/email/notification-templates";
1455
+ export { resolveNotificationActionUrl, } from "./_internal/shared/features/notifications/action-url";