@mohasinac/appkit 4.62.0 → 4.63.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 (391) hide show
  1. package/dist/.build-stamp.json +3 -3
  2. package/dist/_internal/client/features/layout/DashboardLayoutClient.js +8 -29
  3. package/dist/_internal/client/features/layout/filterNavItems.d.ts +28 -0
  4. package/dist/_internal/client/features/layout/filterNavItems.js +35 -0
  5. package/dist/_internal/server/features/ads/booking.d.ts +118 -0
  6. package/dist/_internal/server/features/ads/booking.js +326 -0
  7. package/dist/_internal/server/features/checkout/actions.d.ts +129 -9
  8. package/dist/_internal/server/features/checkout/actions.js +850 -79
  9. package/dist/_internal/server/features/checkout/expand-order-items.d.ts +1 -2
  10. package/dist/_internal/server/features/checkout/expand-order-items.js +32 -0
  11. package/dist/_internal/server/features/checkout/freeze-parts.d.ts +50 -0
  12. package/dist/_internal/server/features/checkout/freeze-parts.js +94 -0
  13. package/dist/_internal/server/features/checkout/value-otp-gate.d.ts +55 -0
  14. package/dist/_internal/server/features/checkout/value-otp-gate.js +60 -0
  15. package/dist/_internal/server/features/dashboard/attention.d.ts +128 -0
  16. package/dist/_internal/server/features/dashboard/attention.js +183 -0
  17. package/dist/_internal/server/features/dashboard/data.d.ts +47 -0
  18. package/dist/_internal/server/features/dashboard/data.js +82 -0
  19. package/dist/_internal/server/features/inventory/reservations.d.ts +99 -0
  20. package/dist/_internal/server/features/inventory/reservations.js +273 -0
  21. package/dist/_internal/server/features/invoicing/allocate.d.ts +63 -0
  22. package/dist/_internal/server/features/invoicing/allocate.js +162 -0
  23. package/dist/_internal/server/features/invoicing/credit-note.d.ts +57 -0
  24. package/dist/_internal/server/features/invoicing/credit-note.js +126 -0
  25. package/dist/_internal/server/features/invoicing/gstr1.d.ts +74 -0
  26. package/dist/_internal/server/features/invoicing/gstr1.js +251 -0
  27. package/dist/_internal/server/features/invoicing/issue.d.ts +96 -0
  28. package/dist/_internal/server/features/invoicing/issue.js +202 -0
  29. package/dist/_internal/server/features/offers/destinations.d.ts +40 -0
  30. package/dist/_internal/server/features/offers/destinations.js +65 -0
  31. package/dist/_internal/server/features/orders/actions.d.ts +8 -1
  32. package/dist/_internal/server/features/orders/actions.js +81 -8
  33. package/dist/_internal/server/features/orders/adapters.js +54 -0
  34. package/dist/_internal/server/features/orders/amend-delivery.d.ts +56 -0
  35. package/dist/_internal/server/features/orders/amend-delivery.js +124 -0
  36. package/dist/_internal/server/features/orders/balance.d.ts +89 -0
  37. package/dist/_internal/server/features/orders/balance.js +256 -0
  38. package/dist/_internal/server/features/orders/cancellation-refund.d.ts +15 -9
  39. package/dist/_internal/server/features/orders/cancellation-refund.js +15 -9
  40. package/dist/_internal/server/features/points/award.js +46 -4
  41. package/dist/_internal/server/features/pricing/actions.d.ts +58 -0
  42. package/dist/_internal/server/features/pricing/actions.js +144 -0
  43. package/dist/_internal/server/features/refunds/actions.js +26 -0
  44. package/dist/_internal/server/features/shipping/book-split.d.ts +86 -0
  45. package/dist/_internal/server/features/shipping/book-split.js +130 -0
  46. package/dist/_internal/server/features/shipping/book.d.ts +61 -0
  47. package/dist/_internal/server/features/shipping/book.js +176 -0
  48. package/dist/_internal/server/features/shipping/courier-block.d.ts +69 -0
  49. package/dist/_internal/server/features/shipping/courier-block.js +264 -0
  50. package/dist/_internal/server/features/site-settings/adapters.d.ts +2 -2
  51. package/dist/_internal/server/features/site-settings/adapters.js +29 -0
  52. package/dist/_internal/server/features/stores/adapters.d.ts +2 -2
  53. package/dist/_internal/server/features/stores/adapters.js +65 -0
  54. package/dist/_internal/server/functions/scheduled.d.ts +2 -1
  55. package/dist/_internal/server/functions/scheduled.js +95 -2
  56. package/dist/_internal/server/jobs/core/autoPayoutEligibility.js +11 -2
  57. package/dist/_internal/server/jobs/core/dailyStatusDigest.d.ts +4 -0
  58. package/dist/_internal/server/jobs/core/dailyStatusDigest.js +19 -2
  59. package/dist/_internal/server/jobs/core/index.d.ts +2 -1
  60. package/dist/_internal/server/jobs/core/index.js +2 -1
  61. package/dist/_internal/server/jobs/core/jobRunners.js +45 -0
  62. package/dist/_internal/server/jobs/core/onJobCreated.d.ts +30 -7
  63. package/dist/_internal/server/jobs/core/onJobCreated.js +78 -45
  64. package/dist/_internal/server/jobs/core/onOrderStatusChange.d.ts +7 -0
  65. package/dist/_internal/server/jobs/core/onOrderStatusChange.js +65 -0
  66. package/dist/_internal/server/jobs/core/paymentWindowTimeout.js +33 -0
  67. package/dist/_internal/server/jobs/core/reservationExpiry.d.ts +17 -0
  68. package/dist/_internal/server/jobs/core/reservationExpiry.js +40 -0
  69. package/dist/_internal/server/jobs/core/runJobOnce.d.ts +48 -0
  70. package/dist/_internal/server/jobs/core/runJobOnce.js +195 -0
  71. package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.js +25 -2
  72. package/dist/_internal/server/jobs/handlers/index.d.ts +1 -0
  73. package/dist/_internal/server/jobs/handlers/index.js +1 -0
  74. package/dist/_internal/server/jobs/handlers/onOrderStatusChange.js +17 -0
  75. package/dist/_internal/server/jobs/handlers/reservationExpiry.d.ts +2 -0
  76. package/dist/_internal/server/jobs/handlers/reservationExpiry.js +2 -0
  77. package/dist/_internal/server/notifications/channel-health.d.ts +26 -3
  78. package/dist/_internal/shared/actions/action-registry.d.ts +1 -1
  79. package/dist/_internal/shared/actions/action-registry.js +296 -0
  80. package/dist/_internal/shared/checkout/coupon-discount.d.ts +43 -1
  81. package/dist/_internal/shared/checkout/coupon-discount.js +26 -1
  82. package/dist/_internal/shared/checkout/order-math.d.ts +174 -0
  83. package/dist/_internal/shared/checkout/order-math.js +159 -0
  84. package/dist/_internal/shared/checkout/refundable-base.d.ts +25 -0
  85. package/dist/_internal/shared/checkout/refundable-base.js +13 -1
  86. package/dist/_internal/shared/checkout/rules/index.d.ts +1 -1
  87. package/dist/_internal/shared/checkout/rules/index.js +1 -1
  88. package/dist/_internal/shared/checkout/rules/payment-gate.d.ts +18 -0
  89. package/dist/_internal/shared/checkout/rules/payment-gate.js +25 -0
  90. package/dist/_internal/shared/checkout/split.d.ts +75 -0
  91. package/dist/_internal/shared/checkout/split.js +120 -0
  92. package/dist/_internal/shared/content/disclaimers.d.ts +88 -0
  93. package/dist/_internal/shared/content/disclaimers.js +217 -0
  94. package/dist/_internal/shared/content/published-values.d.ts +93 -0
  95. package/dist/_internal/shared/content/published-values.js +206 -0
  96. package/dist/_internal/shared/features/admin/integrations.d.ts +139 -0
  97. package/dist/_internal/shared/features/admin/integrations.js +263 -0
  98. package/dist/_internal/shared/features/dashboard/hub-sections.d.ts +72 -0
  99. package/dist/_internal/shared/features/dashboard/hub-sections.js +75 -0
  100. package/dist/_internal/shared/features/emi/choice.d.ts +98 -0
  101. package/dist/_internal/shared/features/emi/choice.js +69 -0
  102. package/dist/_internal/shared/features/emi/group.d.ts +84 -0
  103. package/dist/_internal/shared/features/emi/group.js +126 -0
  104. package/dist/_internal/shared/features/ledger/posting.d.ts +107 -0
  105. package/dist/_internal/shared/features/ledger/posting.js +165 -0
  106. package/dist/_internal/shared/features/ledger/reports.d.ts +76 -0
  107. package/dist/_internal/shared/features/ledger/reports.js +127 -0
  108. package/dist/_internal/shared/features/ledger/rules.d.ts +170 -0
  109. package/dist/_internal/shared/features/ledger/rules.js +221 -0
  110. package/dist/_internal/shared/features/offers/coordination.d.ts +122 -0
  111. package/dist/_internal/shared/features/offers/coordination.js +80 -0
  112. package/dist/_internal/shared/features/orders/delivery-snapshot.d.ts +114 -0
  113. package/dist/_internal/shared/features/orders/delivery-snapshot.js +116 -0
  114. package/dist/_internal/shared/features/orders/dispute-reasons.d.ts +113 -0
  115. package/dist/_internal/shared/features/orders/dispute-reasons.js +181 -0
  116. package/dist/_internal/shared/features/orders/refund-copy.d.ts +1 -1
  117. package/dist/_internal/shared/features/orders/refund-copy.js +18 -1
  118. package/dist/_internal/shared/features/payouts/pay-period.d.ts +91 -0
  119. package/dist/_internal/shared/features/payouts/pay-period.js +104 -0
  120. package/dist/_internal/shared/features/points/accepts.d.ts +29 -0
  121. package/dist/_internal/shared/features/points/accepts.js +49 -0
  122. package/dist/_internal/shared/features/pricing/rate-registry.d.ts +150 -0
  123. package/dist/_internal/shared/features/pricing/rate-registry.js +246 -0
  124. package/dist/_internal/shared/features/shipping/parcel.d.ts +123 -0
  125. package/dist/_internal/shared/features/shipping/parcel.js +139 -0
  126. package/dist/_internal/shared/features/shipping/shared-purchase.d.ts +91 -0
  127. package/dist/_internal/shared/features/shipping/shared-purchase.js +108 -0
  128. package/dist/_internal/shared/features/site-settings/fees.d.ts +16 -8
  129. package/dist/_internal/shared/features/site-settings/fees.js +12 -8
  130. package/dist/_internal/shared/features/site-settings/types.d.ts +11 -0
  131. package/dist/_internal/shared/fees/calculator.d.ts +33 -1
  132. package/dist/_internal/shared/fees/calculator.js +32 -2
  133. package/dist/_internal/shared/fees/explain.d.ts +81 -0
  134. package/dist/_internal/shared/fees/explain.js +101 -0
  135. package/dist/_internal/shared/history/index.d.ts +1 -1
  136. package/dist/_internal/shared/history/index.js +1 -1
  137. package/dist/_internal/shared/history/types.d.ts +7 -1
  138. package/dist/_internal/shared/history/types.js +25 -0
  139. package/dist/client.d.ts +21 -0
  140. package/dist/client.js +43 -0
  141. package/dist/constants/api-endpoints.d.ts +114 -0
  142. package/dist/constants/api-endpoints.js +55 -0
  143. package/dist/constants/field-names.d.ts +42 -0
  144. package/dist/constants/field-names.js +52 -0
  145. package/dist/contracts/index.d.ts +1 -1
  146. package/dist/contracts/shipping.d.ts +45 -0
  147. package/dist/contracts/shipping.js +15 -0
  148. package/dist/features/about/components/AboutView.js +1 -1
  149. package/dist/features/account/components/BuyerAuctionsGuideView.js +4 -1
  150. package/dist/features/account/components/UserOrdersView.js +47 -35
  151. package/dist/features/admin/components/AdminCouponEditorView.js +17 -0
  152. package/dist/features/admin/components/AdminIntegrationsView.d.ts +55 -0
  153. package/dist/features/admin/components/AdminIntegrationsView.js +74 -0
  154. package/dist/features/admin/components/AdminInvoicingView.d.ts +2 -0
  155. package/dist/features/admin/components/AdminInvoicingView.js +65 -0
  156. package/dist/features/admin/components/AdminOrderEditorView.d.ts +33 -1
  157. package/dist/features/admin/components/AdminOrderEditorView.js +81 -3
  158. package/dist/features/admin/components/AdminOrdersGuideView.js +23 -2
  159. package/dist/features/admin/components/AdminOrdersView.js +86 -5
  160. package/dist/features/admin/components/OwnerQuickActions.js +24 -2
  161. package/dist/features/admin/constants/filter-tabs.d.ts +6 -0
  162. package/dist/features/admin/constants/filter-tabs.js +6 -0
  163. package/dist/features/admin/constants/site-settings-tabs.d.ts +1 -1
  164. package/dist/features/admin/hooks/useAdminListingData.js +16 -0
  165. package/dist/features/admin/schemas/admin-user-form.d.ts +2 -2
  166. package/dist/features/admin/schemas/firestore.d.ts +62 -0
  167. package/dist/features/admin/schemas/firestore.js +5 -0
  168. package/dist/features/ads/schemas/booking-write.d.ts +120 -0
  169. package/dist/features/ads/schemas/booking-write.js +75 -0
  170. package/dist/features/ads/schemas/creative-form.d.ts +18 -0
  171. package/dist/features/ads/schemas/creative-form.js +51 -0
  172. package/dist/features/ads/schemas/firestore.d.ts +140 -0
  173. package/dist/features/ads/schemas/firestore.js +109 -0
  174. package/dist/features/auctions/repository/bid.repository.js +3 -1
  175. package/dist/features/audit-log/schemas/firestore.d.ts +140 -0
  176. package/dist/features/audit-log/schemas/firestore.js +89 -0
  177. package/dist/features/auth/actions/profile-actions.d.ts +69 -1
  178. package/dist/features/auth/actions/profile-actions.js +62 -1
  179. package/dist/features/auth/permissions/constants.js +13 -0
  180. package/dist/features/auth/schemas/firestore.d.ts +16 -2
  181. package/dist/features/auth/schemas/firestore.js +2 -1
  182. package/dist/features/blog/actions/blog-actions.d.ts +6 -0
  183. package/dist/features/blog/actions/blog-actions.js +17 -2
  184. package/dist/features/blog/api/route.js +4 -1
  185. package/dist/features/blog/columns/index.js +5 -0
  186. package/dist/features/blog/components/BlogIndexPageView.js +2 -1
  187. package/dist/features/blog/repository/blog.repository.d.ts +4 -0
  188. package/dist/features/blog/repository/blog.repository.js +5 -0
  189. package/dist/features/blog/schemas/blog-form.d.ts +3 -0
  190. package/dist/features/blog/schemas/blog-form.js +1 -0
  191. package/dist/features/blog/schemas/firestore.d.ts +38 -1
  192. package/dist/features/blog/schemas/firestore.js +23 -0
  193. package/dist/features/blog/schemas/index.d.ts +6 -0
  194. package/dist/features/blog/schemas/index.js +2 -0
  195. package/dist/features/blog/types/index.d.ts +2 -0
  196. package/dist/features/cart/components/CartPriceBreakdown.d.ts +25 -1
  197. package/dist/features/cart/components/CartPriceBreakdown.js +29 -6
  198. package/dist/features/cart/components/PointsTenderPicker.d.ts +61 -0
  199. package/dist/features/cart/components/PointsTenderPicker.js +15 -0
  200. package/dist/features/cart/components/StoreAddonsPicker.js +2 -1
  201. package/dist/features/cart/components/index.d.ts +2 -0
  202. package/dist/features/cart/components/index.js +1 -0
  203. package/dist/features/cart/repository/cart.repository.d.ts +33 -0
  204. package/dist/features/cart/repository/cart.repository.js +47 -0
  205. package/dist/features/cart/schemas/firestore.d.ts +116 -0
  206. package/dist/features/contact/email.d.ts +27 -10
  207. package/dist/features/contact/email.js +20 -3
  208. package/dist/features/dashboard/components/DashboardHubView.d.ts +83 -0
  209. package/dist/features/dashboard/components/DashboardHubView.js +56 -0
  210. package/dist/features/dashboard/components/DashboardSectionsClient.d.ts +23 -0
  211. package/dist/features/dashboard/components/DashboardSectionsClient.js +66 -0
  212. package/dist/features/dispute-reasons/components/AdminDisputeReasonsView.d.ts +55 -0
  213. package/dist/features/dispute-reasons/components/AdminDisputeReasonsView.js +175 -0
  214. package/dist/features/dispute-reasons/repository/dispute-reasons.repository.d.ts +62 -0
  215. package/dist/features/dispute-reasons/repository/dispute-reasons.repository.js +108 -0
  216. package/dist/features/dispute-reasons/schemas/firestore.d.ts +62 -0
  217. package/dist/features/dispute-reasons/schemas/firestore.js +40 -0
  218. package/dist/features/events/components/EventSaleBanner.js +1 -1
  219. package/dist/features/faq/components/FAQAccordion.d.ts +13 -1
  220. package/dist/features/faq/components/FAQAccordion.js +29 -4
  221. package/dist/features/faq/components/FAQPageContent.js +2 -2
  222. package/dist/features/gateway-events/schemas/index.d.ts +2 -2
  223. package/dist/features/homepage/schemas/index.d.ts +8 -8
  224. package/dist/features/inventory/schemas/stock-reservation.d.ts +114 -0
  225. package/dist/features/inventory/schemas/stock-reservation.js +103 -0
  226. package/dist/features/invoicing/schemas/firestore.d.ts +112 -0
  227. package/dist/features/invoicing/schemas/firestore.js +45 -0
  228. package/dist/features/invoicing/utils/financial-year.d.ts +43 -0
  229. package/dist/features/invoicing/utils/financial-year.js +53 -0
  230. package/dist/features/jobs/actions/enqueue-job.js +18 -1
  231. package/dist/features/jobs/repository/jobs.repository.d.ts +62 -1
  232. package/dist/features/jobs/repository/jobs.repository.js +84 -1
  233. package/dist/features/jobs/schemas/firestore.d.ts +80 -0
  234. package/dist/features/jobs/schemas/firestore.js +37 -0
  235. package/dist/features/layout/AppLayoutShell.d.ts +9 -1
  236. package/dist/features/layout/AppLayoutShell.js +12 -4
  237. package/dist/features/layout/BottomActions.js +2 -1
  238. package/dist/features/layout/BottomNavbar.d.ts +10 -2
  239. package/dist/features/layout/SideActionDock.js +52 -2
  240. package/dist/features/layout/TitleBarLayout.js +13 -4
  241. package/dist/features/layout/TitleBarLayout.style.css +59 -0
  242. package/dist/features/layout/useCtaReveal.d.ts +16 -1
  243. package/dist/features/layout/useCtaReveal.js +17 -26
  244. package/dist/features/ledger/repository/journal.repository.d.ts +110 -0
  245. package/dist/features/ledger/repository/journal.repository.js +312 -0
  246. package/dist/features/ledger/schemas/expenses.d.ts +87 -0
  247. package/dist/features/ledger/schemas/expenses.js +27 -0
  248. package/dist/features/ledger/schemas/firestore.d.ts +183 -0
  249. package/dist/features/ledger/schemas/firestore.js +69 -0
  250. package/dist/features/lottery/schemas/zod.d.ts +6 -6
  251. package/dist/features/media/MediaImage.js +22 -1
  252. package/dist/features/media/upload/ImageUpload.js +1 -1
  253. package/dist/features/obligations/constants/policies.js +24 -1
  254. package/dist/features/orders/components/BalancePaymentPanel.d.ts +12 -0
  255. package/dist/features/orders/components/BalancePaymentPanel.js +94 -0
  256. package/dist/features/orders/components/OrderPaymentSummary.js +10 -1
  257. package/dist/features/orders/components/OrderProvenanceCard.d.ts +8 -0
  258. package/dist/features/orders/components/OrderProvenanceCard.js +185 -0
  259. package/dist/features/orders/components/RaiseDisputeForm.d.ts +14 -0
  260. package/dist/features/orders/components/RaiseDisputeForm.js +119 -0
  261. package/dist/features/orders/components/RefundRequestView.js +19 -1
  262. package/dist/features/orders/components/index.d.ts +4 -0
  263. package/dist/features/orders/components/index.js +2 -0
  264. package/dist/features/orders/constants/order-lane-tabs.d.ts +69 -0
  265. package/dist/features/orders/constants/order-lane-tabs.js +88 -0
  266. package/dist/features/orders/repository/orders.repository.d.ts +85 -1
  267. package/dist/features/orders/repository/orders.repository.js +205 -6
  268. package/dist/features/orders/schemas/balance.d.ts +40 -0
  269. package/dist/features/orders/schemas/balance.js +47 -0
  270. package/dist/features/orders/schemas/firestore.d.ts +398 -1
  271. package/dist/features/orders/schemas/firestore.js +43 -0
  272. package/dist/features/orders/schemas/index.d.ts +56 -8
  273. package/dist/features/orders/schemas/index.js +12 -0
  274. package/dist/features/orders/types/index.d.ts +47 -0
  275. package/dist/features/orders/utils/courier-block.d.ts +25 -0
  276. package/dist/features/orders/utils/courier-block.js +23 -0
  277. package/dist/features/payment-cases/schemas/firestore.d.ts +26 -1
  278. package/dist/features/payment-cases/schemas/firestore.js +1 -0
  279. package/dist/features/payments/repository/payout.repository.js +3 -2
  280. package/dist/features/payments/schemas/firestore.d.ts +92 -1
  281. package/dist/features/payments/schemas/firestore.js +23 -0
  282. package/dist/features/pricing/components/AdminPricingView.d.ts +13 -0
  283. package/dist/features/pricing/components/AdminPricingView.js +157 -0
  284. package/dist/features/products/components/PrizeDrawDetailPageView.js +2 -2
  285. package/dist/features/products/components/ProductDetailPageView.d.ts +17 -1
  286. package/dist/features/products/components/ProductDetailPageView.js +2 -2
  287. package/dist/features/products/schemas/firestore.d.ts +26 -1
  288. package/dist/features/products/schemas/firestore.js +2 -0
  289. package/dist/features/products/schemas/index.d.ts +2 -2
  290. package/dist/features/products/schemas/product-features.validators.d.ts +10 -10
  291. package/dist/features/promotions/actions/coupon-stacking.d.ts +30 -3
  292. package/dist/features/promotions/actions/coupon-stacking.js +21 -2
  293. package/dist/features/promotions/components/CouponCard.js +13 -0
  294. package/dist/features/promotions/constants/coupon-help.d.ts +2 -2
  295. package/dist/features/promotions/constants/coupon-help.js +9 -1
  296. package/dist/features/promotions/schemas/firestore.d.ts +24 -0
  297. package/dist/features/promotions/schemas/firestore.js +4 -0
  298. package/dist/features/promotions/types/index.d.ts +19 -1
  299. package/dist/features/reviews/repository/reviews.repository.d.ts +14 -0
  300. package/dist/features/reviews/repository/reviews.repository.js +16 -0
  301. package/dist/features/scams/components/ScamProfileView.js +2 -2
  302. package/dist/features/scams/components/ScamRegistryView.js +2 -2
  303. package/dist/features/scams/repository/scammer.repository.js +2 -1
  304. package/dist/features/scams/schemas/firestore.d.ts +2 -1
  305. package/dist/features/scams/schemas/firestore.js +2 -1
  306. package/dist/features/search/action-index/tab-entries.js +1 -1
  307. package/dist/features/seller/actions/offer-actions.js +56 -0
  308. package/dist/features/seller/actions/seller-actions.d.ts +1 -1
  309. package/dist/features/seller/actions/seller-actions.js +37 -3
  310. package/dist/features/seller/components/DispatchForm.d.ts +11 -0
  311. package/dist/features/seller/components/DispatchForm.js +190 -0
  312. package/dist/features/seller/components/SellerOrdersView.js +221 -27
  313. package/dist/features/seller/components/index.d.ts +1 -0
  314. package/dist/features/seller/components/index.js +1 -0
  315. package/dist/features/seller/hooks/useSellerListingData.js +25 -0
  316. package/dist/features/seller/repository/offer.repository.js +4 -3
  317. package/dist/features/seller/schemas/firestore.d.ts +23 -2
  318. package/dist/features/seller/schemas/firestore.js +3 -2
  319. package/dist/features/seller/schemas/index.d.ts +4 -4
  320. package/dist/features/seller/schemas/order-forms.d.ts +61 -4
  321. package/dist/features/seller/schemas/order-forms.js +41 -8
  322. package/dist/features/shipments/schemas/firestore.d.ts +25 -0
  323. package/dist/features/shipments/schemas/validation.d.ts +4 -4
  324. package/dist/features/shipping-boxes/repository/shipping-boxes.repository.d.ts +82 -0
  325. package/dist/features/shipping-boxes/repository/shipping-boxes.repository.js +145 -0
  326. package/dist/features/shipping-boxes/schemas/firestore.d.ts +80 -0
  327. package/dist/features/shipping-boxes/schemas/firestore.js +53 -0
  328. package/dist/features/store-extensions/schemas/report-create-form.d.ts +2 -2
  329. package/dist/features/store-extensions/schemas/shipping-config-form.d.ts +2 -2
  330. package/dist/features/stores/components/StoreOrdersGuideView.js +6 -1
  331. package/dist/features/stores/repository/store.repository.d.ts +18 -0
  332. package/dist/features/stores/repository/store.repository.js +27 -1
  333. package/dist/features/stores/schemas/firestore.d.ts +112 -0
  334. package/dist/features/stores/schemas/firestore.js +20 -0
  335. package/dist/features/stores/schemas/index.d.ts +6 -6
  336. package/dist/features/stores/types/index.d.ts +19 -0
  337. package/dist/features/support/repository/support.repository.js +72 -6
  338. package/dist/features/support/schemas/firestore.d.ts +17 -0
  339. package/dist/features/support/schemas/index.d.ts +8 -8
  340. package/dist/features/wishlist/hooks/useWishlistWithGuest.d.ts +1 -1
  341. package/dist/index.d.ts +11 -1
  342. package/dist/index.js +33 -1
  343. package/dist/next/routing/route-map.d.ts +112 -0
  344. package/dist/next/routing/route-map.js +63 -0
  345. package/dist/providers/shipping-shiprocket/index.d.ts +27 -1
  346. package/dist/providers/shipping-shiprocket/index.js +84 -1
  347. package/dist/react/contexts/SessionContext.d.ts +17 -1
  348. package/dist/schemas/registry.d.ts +69 -34
  349. package/dist/schemas/sieve.d.ts +2 -2
  350. package/dist/security/pii-schemas.d.ts +1 -1
  351. package/dist/security/pii-schemas.js +45 -0
  352. package/dist/server-entry.d.ts +2 -2
  353. package/dist/server-entry.js +8 -1
  354. package/dist/server.d.ts +36 -1
  355. package/dist/server.js +183 -1
  356. package/dist/styles.css +412 -80
  357. package/dist/tailwind-utilities.css +1 -1
  358. package/dist/tokens/themes/default-dark.js +1 -0
  359. package/dist/tokens/themes/default-light.js +1 -0
  360. package/dist/tokens/themes/required.d.ts +1 -1
  361. package/dist/tokens/themes/required.js +1 -0
  362. package/dist/tokens/tokens.css +15 -0
  363. package/dist/ui/components/Button.d.ts +10 -1
  364. package/dist/ui/components/Button.js +25 -3
  365. package/dist/ui/components/Chart.d.ts +63 -0
  366. package/dist/ui/components/Chart.js +169 -0
  367. package/dist/ui/components/Chart.style.css +214 -0
  368. package/dist/ui/components/Disclaimer.d.ts +19 -0
  369. package/dist/ui/components/Disclaimer.js +83 -0
  370. package/dist/ui/components/OverflowRow.js +54 -2
  371. package/dist/ui/components/OverflowRow.style.css +38 -0
  372. package/dist/ui/components/RichTextEditor.js +99 -8
  373. package/dist/ui/components/chart-spec.d.ts +68 -0
  374. package/dist/ui/components/chart-spec.js +140 -0
  375. package/dist/ui/components/index.style.css +1 -0
  376. package/dist/ui/components/surface-tokens.d.ts +1 -1
  377. package/dist/ui/components/surface-tokens.js +9 -0
  378. package/dist/ui/components/tabs-overflow.js +64 -11
  379. package/dist/ui/components/toolbar-collapse.d.ts +13 -0
  380. package/dist/ui/components/toolbar-collapse.js +10 -1
  381. package/dist/ui/index.d.ts +8 -0
  382. package/dist/ui/index.js +9 -0
  383. package/dist/ui/rich-text/RichText.d.ts +10 -1
  384. package/dist/ui/rich-text/RichText.js +33 -2
  385. package/dist/ui/rich-text/RichText.style.css +83 -79
  386. package/dist/ui/rich-text/RichTextRenderer.d.ts +30 -1
  387. package/dist/ui/rich-text/RichTextRenderer.js +34 -2
  388. package/dist/ui/rich-text/chart-blocks.d.ts +62 -0
  389. package/dist/ui/rich-text/chart-blocks.js +87 -0
  390. package/package.json +1 -1
  391. package/scripts/seed-cli.mjs +1834 -1822
package/dist/server.js CHANGED
@@ -861,7 +861,7 @@ export { reasonToHttp, EVENT_DRAW_REASON, } from "./_internal/server/jobs/core/e
861
861
  // [SERVER-ONLY] S-SBUNI-RULES — refund action (Razorpay + manual paths)
862
862
  export { processRefundAction, } from "./_internal/server/features/refunds/actions.js";
863
863
  // [SERVER-ONLY] Shared fee calculator — platform/gateway/GST/COD handling/addon fee math.
864
- export { computeCheckoutFees, computePayoutDeduction, computeCodHandlingFee, computeGiftWrapFee, computeShipmentProtectionFee, computeSaleProtectionFee, } from "./_internal/shared/fees/calculator.js";
864
+ export { computeCheckoutFees, allocateCheckoutFees, computePayoutDeduction, computeCodHandlingFee, computeGiftWrapFee, computeShipmentProtectionFee, computeSaleProtectionFee, } from "./_internal/shared/fees/calculator.js";
865
865
  // C5e buyer protections — the pure three-tier gate plus the one fee pair
866
866
  // every money path must agree on. Public API because the capture route
867
867
  // (/api/payment/create-order) is one of the three sites that must agree.
@@ -1327,6 +1327,7 @@ export { piiBlindIndex } from "./security/index.js";
1327
1327
  export { piiIndicesFor } from "./security/index.js";
1328
1328
  export { reserveUserSlug, userSlugBase, USER_SLUGS_COLLECTION } from "./features/auth/actions/user-slug.js";
1329
1329
  export { resolveProfileUser } from "./features/auth/actions/profile-actions.js";
1330
+ export { getBuyerActivityStats, getProfileStats, } from "./features/auth/actions/profile-actions.js";
1330
1331
  export { getPiiConfigError } from "./security/index.js";
1331
1332
  export { encryptPayoutDetails } from "./security/index.js";
1332
1333
  export { decryptPayoutDetails } from "./security/index.js";
@@ -1539,6 +1540,17 @@ export { REFUND_COPY } from "./_internal/shared/features/orders/refund-copy.js";
1539
1540
  // See the module docstring for why the exempt set is "seller or carrier fault"
1540
1541
  // rather than "serious reasons".
1541
1542
  export { RETURN_REASON, FINAL_SALE_EXEMPT_REASONS, RETURN_REASON_LABEL, RETURN_REASON_GROUP_LABEL, isFinalSaleExempt, isReturnReason, selectableReturnReasons, } from "./_internal/shared/features/orders/return-reasons.js";
1543
+ /*
1544
+ * The integration switches, SERVER side — this is the half the route guards
1545
+ * use. `readIntegrationStates` is the one expression that answers "is this
1546
+ * integration on", and both the admin page (via `client.ts`) and every guard
1547
+ * resolve through it so they cannot disagree.
1548
+ *
1549
+ * `IntegrationDescriptor.failClosed` is what a guard reads to decide which way
1550
+ * to fail when the settings read itself throws. It differs per integration on
1551
+ * purpose: closed for money, open for support.
1552
+ */
1553
+ export { INTEGRATIONS, INTEGRATION_ORDER, readIntegrationStates, integrationPatch, allIntegrationsPatch, } from "./_internal/shared/features/admin/integrations.js";
1542
1554
  // Seller listing form draft <-> product write payload. The flat form keys and
1543
1555
  // the nested document blocks are different shapes, and nothing translated
1544
1556
  // between them — see the module docstring.
@@ -1638,3 +1650,173 @@ export { GRIEVANCE_PERIODS } from "./features/support/schemas/firestore.js";
1638
1650
  * obligation early opens the payout gate early as a consequence.
1639
1651
  */
1640
1652
  export { getRateableItemsAction, rateOrderItemAction, markOrderCompleteAction, } from "./_internal/server/features/order-completion/index.js";
1653
+ /*
1654
+ * [SERVER-ONLY] Phase 7 invoicing (D12) — the two gapless FY series.
1655
+ *
1656
+ * Exported here because `_internal/*` is NOT a published subpath (appkit has 46
1657
+ * export keys and none of them is `./_internal/*`), so a consumer route cannot
1658
+ * deep-import these. That is the same wall `cancelOrderWithRefund` and
1659
+ * `adjustUserPoints` hit; `server.ts` is the sanctioned door.
1660
+ *
1661
+ * 🛑 `allocateSeriesNumber` is exported deliberately and should be reached for
1662
+ * rarely: it CONSUMES a number from a gapless series, and a number cannot be
1663
+ * withdrawn without leaving a gap an auditor will ask about. The two callers
1664
+ * that should exist are the paid-transition trigger and the refund settle path,
1665
+ * both already wired. A backfill is the only other legitimate use.
1666
+ */
1667
+ export { allocateSeriesNumber, } from "./_internal/server/features/invoicing/allocate.js";
1668
+ export { issueInvoiceForOrder, readStoredInvoice, storeRenderedInvoice, INVOICE_PREFIX_PATH, } from "./_internal/server/features/invoicing/issue.js";
1669
+ export { issueCreditNoteForRefund, CREDIT_NOTE_PREFIX_PATH, } from "./_internal/server/features/invoicing/credit-note.js";
1670
+ export { financialYearLabel, formatSeriesNumber, INVOICE_PREFIX, CREDIT_NOTE_PREFIX, } from "./features/invoicing/utils/financial-year.js";
1671
+ export { buildGstr1Export, gstr1ToCsv, } from "./_internal/server/features/invoicing/gstr1.js";
1672
+ /*
1673
+ * [SERVER-ONLY] S5a shared purchase — one payer, N destinations.
1674
+ *
1675
+ * Exported for the capture route, which is the FOURTH money path and the one
1676
+ * D37 proves gets left behind. Pure arithmetic with no Firestore and no
1677
+ * settings read; the rates are passed in snapshotted.
1678
+ */
1679
+ export { quoteSharedPurchase, countDestinations, } from "./_internal/shared/features/shipping/shared-purchase.js";
1680
+ /*
1681
+ * [SERVER-ONLY] The pricing registry and its one write path.
1682
+ *
1683
+ * 🛑 The REGISTRY is pure data with no Firestore and no `node:` import, so it
1684
+ * could sit in the main barrel — and deliberately does not. Its only consumer
1685
+ * outside appkit is `/api/admin/pricing`, and putting it in `index.ts` would
1686
+ * add sixteen descriptors and four symbols to every client bundle that imports
1687
+ * anything at all, to serve one route (Root Cause #18 — a re-export is a
1688
+ * public API contract, not a convenience).
1689
+ *
1690
+ * `applyRateChange` belongs here regardless: it reaches firebase-admin.
1691
+ */
1692
+ export { RATE_REGISTRY, RATE_TIER_ORDER, rateByPath, canEditRate, rejectRateChange, } from "./_internal/shared/features/pricing/rate-registry.js";
1693
+ export { applyRateChange, RATE_CHANGE_LOG_MAX, } from "./_internal/server/features/pricing/actions.js";
1694
+ /*
1695
+ * [SERVER-ONLY] Coordinated purchase — a SPECIALISED OFFER, not a new flow.
1696
+ *
1697
+ * `assertOwnedAddresses` is the one piece that must run server-side: a
1698
+ * destination is a REFERENCE, and an id is guessable in a way an address is
1699
+ * not, so an unverified one ships a parcel to a stranger's house with nothing
1700
+ * erroring. The shared half (the member shape, the member-count rule) is pure
1701
+ * and could sit in the main barrel — it stays here beside its checker so a
1702
+ * caller cannot reach for one without meeting the other.
1703
+ */
1704
+ export { SHARED_PURCHASE_MAX_MEMBERS, rejectCoordination, destinationIds, } from "./_internal/shared/features/offers/coordination.js";
1705
+ export { assertOwnedAddresses } from "./_internal/server/features/offers/destinations.js";
1706
+ /*
1707
+ * S5a — N destinations is N parcels, so N carrier quotes.
1708
+ *
1709
+ * 🛑 `checkDestinations` + `assertAllServiceable` are a PRE-FLIGHT and are
1710
+ * exported as a pair for that reason: booking as you go and failing on the
1711
+ * fourth leaves three parcels the carrier has already accepted and the
1712
+ * coordinator cannot undo. It is not a transaction — a booking has no
1713
+ * rollback — it just moves the common failure to the point where rolling
1714
+ * back is still free.
1715
+ */
1716
+ export { checkDestinations, assertAllServiceable, planParcels, } from "./_internal/server/features/shipping/book-split.js";
1717
+ /*
1718
+ * [SERVER-ONLY] Part 14 — the delivery snapshot and its corrections.
1719
+ *
1720
+ * `amendDeliveryAddress` is server-only (Firestore + the addresses
1721
+ * repository). The pure readers ship with it rather than from the main
1722
+ * barrel so a caller cannot reach `deliveryPartyFor` without the module that
1723
+ * explains why it reads the amendment while `placeOfSupplyFrom` reads the
1724
+ * snapshot — getting those two the wrong way round sends a parcel to the old
1725
+ * address, or restates tax on a filed invoice.
1726
+ */
1727
+ export { snapshotDeliveryAddress, deliveryPartyFor, placeOfSupplyFrom, } from "./_internal/shared/features/orders/delivery-snapshot.js";
1728
+ export { amendDeliveryAddress, revealAmendments, DELIVERY_AMENDMENT_MAX, } from "./_internal/server/features/orders/amend-delivery.js";
1729
+ /*
1730
+ * [SERVER-ONLY] Part 1′ — parcel booking.
1731
+ *
1732
+ * 🛑 Exported for the ENQUEUE route only. The booking itself runs in the
1733
+ * `bookShipment` job runner, because a carrier call on a 10s sync ceiling
1734
+ * times out in the one way that cannot be retried safely: the carrier may
1735
+ * have accepted, so a retry double-books and a non-retry leaves a parcel
1736
+ * nobody collects.
1737
+ */
1738
+ export { bookShipment, } from "./_internal/server/features/shipping/book.js";
1739
+ /*
1740
+ * [SERVER-ONLY] Part 4 — the double-entry books.
1741
+ *
1742
+ * 🛑 The repository is server-only (Firestore), and the posting rules ship
1743
+ * beside it rather than from the main barrel even though they are pure: a
1744
+ * caller who can reach `assertBalanced` without reaching `journalRepository`
1745
+ * can compute a balanced entry and write it some other way, which is exactly
1746
+ * the "every entry is machine-generated through one path" constraint the
1747
+ * whole design rests on. Same stance `assertOwnedAddresses` takes.
1748
+ *
1749
+ * 🛑 The LEDGER IS A PROJECTION. Orders, payouts and expenses are truth —
1750
+ * never read a balance to make an operational decision.
1751
+ */
1752
+ export { journalRepository, JournalRepository, JOURNAL_PERIOD_SCAN_LIMIT } from "./features/ledger/repository/journal.repository.js";
1753
+ export { assertBalanced, buildReversal, resolvePostingPeriod, periodOf, UnbalancedEntryError, BALANCE_TOLERANCE, } from "./_internal/shared/features/ledger/posting.js";
1754
+ export { trialBalance, profitAndLoss, signedBalance, } from "./_internal/shared/features/ledger/reports.js";
1755
+ /*
1756
+ * The per-event posting rules. These are WHERE the "every entry is
1757
+ * machine-generated" constraint lives — a caller posts an order by handing
1758
+ * `orderPlacedPosting(order)` to `journalRepository.post`, never by writing
1759
+ * legs. A backwards entry balances, so nothing downstream would object;
1760
+ * `verify-posting-rules` R7 checks the SIDES, with controls proving it
1761
+ * catches a credited bank, an un-reclaimed refund GST and an inverted
1762
+ * output-GST liability.
1763
+ */
1764
+ export { ACCOUNT, orderPlacedPosting, settlementPosting, payoutPosting, refundPosting, expensePosting, } from "./_internal/shared/features/ledger/rules.js";
1765
+ /*
1766
+ * Vendors and expenses. `ShipmentDocument.supplierId` joins to a vendor row;
1767
+ * `supplierName` stays as typed, because deriving the name on read would let
1768
+ * a vendor rename rewrite what every past shipment says it was bought from.
1769
+ */
1770
+ export { VENDORS_COLLECTION, EXPENSES_COLLECTION, EXPENSE_FIELDS, } from "./features/ledger/schemas/expenses.js";
1771
+ /*
1772
+ * [SERVER-ONLY] D55 — the pre-order balance collector.
1773
+ *
1774
+ * `balanceDue` has been computed and rendered since Part 2 with nothing to
1775
+ * collect it. These three are the whole collection path: the seller opens it
1776
+ * when stock lands, the buyer submits a proof, staff review it. Manual only —
1777
+ * the auto path is blocked on RBI mandate requirements, not on effort.
1778
+ */
1779
+ export { BALANCE_WINDOW_DAYS, balanceDueOn, openBalanceCollection, submitBalanceProof, reviewBalanceProof, } from "./_internal/server/features/orders/balance.js";
1780
+ /*
1781
+ * [SERVER-ONLY] Stock reservation with a TTL.
1782
+ *
1783
+ * A hold on units that is NOT an order. The only mechanism before this was
1784
+ * `onOrderCreate`'s decrement plus `pendingOrderTimeout`'s 15-minute restore,
1785
+ * both keyed to an order — which cannot serve a multi-day shared purchase
1786
+ * without either starting a payment clock on day one or letting an ordinary
1787
+ * buyer take the item out from under the arrangement.
1788
+ *
1789
+ * 🛑 Every one of these moves the reservation row and `availableQuantity`
1790
+ * inside ONE transaction. A caller that writes either half itself has
1791
+ * reintroduced exactly the drift this primitive exists to remove.
1792
+ */
1793
+ export { reserveStock, releaseReservation, releaseReservationsForHolder, consumeReservation, expireDueReservations, activeReservationsForProduct, } from "./_internal/server/features/inventory/reservations.js";
1794
+ export { RESERVATION_DEFAULT_TTL_HOURS, RESERVATION_MAX_TTL_HOURS, RESERVATION_HOLDER_KINDS, RESERVATION_STATUSES, STOCK_RESERVATION_COLLECTION, isReservationActive, } from "./features/inventory/schemas/stock-reservation.js";
1795
+ /*
1796
+ * [SERVER-ONLY] The high-value checkout OTP gate.
1797
+ *
1798
+ * 🛑 It takes the AMOUNT it judges. There were two hand-rolled copies of
1799
+ * this rule — `createOrderForGroup` summing the cart, the gateway route
1800
+ * using its own `subtotalRs` — which is Root Cause #75's shape, and they
1801
+ * had already drifted on what they measured.
1802
+ *
1803
+ * Taking the amount is also Part 6's prerequisite: `otpCheckoutThreshold`
1804
+ * is per CHECKOUT, so an N-party arrangement clears ₹12,000 in three
1805
+ * ₹4,000 pieces with no OTP unless it can present its own total.
1806
+ */
1807
+ export { assertCheckoutValueOtp } from "./_internal/server/features/checkout/value-otp-gate.js";
1808
+ /*
1809
+ * [SERVER-ONLY] D56 — self-serve ad bookings.
1810
+ *
1811
+ * 🛑 Availability is a DOCUMENT COLLISION, never a query. The booking id
1812
+ * is `${placementId}__${period}` and creation uses `tx.create`, so a second
1813
+ * booking of the same slot fails on an existing document inside its own
1814
+ * transaction. Query-then-write would let two concurrent requests both read
1815
+ * "free" and sell the slot twice, with nothing erroring.
1816
+ *
1817
+ * 🛑 Flat fee per period, explicitly NOT CPM — impression counting is a
1818
+ * write per page view, which is the cost pattern that suspended this
1819
+ * project (Root Cause #104).
1820
+ */
1821
+ export { bookAdSlot, moderateAdCreative, resubmitAdCreative, cancelAdBooking, releaseAdSlot, liveBookingForPlacement, pendingAdBookings, adBookingsForAdvertiser, adSlotOffers, } from "./_internal/server/features/ads/booking.js";
1822
+ export { AD_BOOKING_COLLECTION, AD_BOOKING_PAYMENT_STATES, AD_MODERATION_STATES, adBookingId, adPeriodOf, adPeriodStart, adPeriodEnd, isAdPeriod, isAdBookingLive, } from "./features/ads/schemas/firestore.js";