@mohasinac/appkit 4.56.0 → 4.58.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 (172) hide show
  1. package/dist/.build-stamp.json +4 -4
  2. package/dist/_internal/server/features/beys/data.d.ts +44 -0
  3. package/dist/_internal/server/features/beys/data.js +107 -0
  4. package/dist/_internal/server/features/beys/og.d.ts +42 -0
  5. package/dist/_internal/server/features/beys/og.js +89 -0
  6. package/dist/_internal/server/features/checkout/actions.d.ts +31 -0
  7. package/dist/_internal/server/features/checkout/actions.js +117 -5
  8. package/dist/_internal/server/features/orders/actions.d.ts +30 -0
  9. package/dist/_internal/server/features/orders/actions.js +103 -0
  10. package/dist/_internal/server/features/orders/adapters.js +7 -0
  11. package/dist/_internal/server/features/parts/data.js +3 -2
  12. package/dist/_internal/shared/actions/action-registry.d.ts +1 -1
  13. package/dist/_internal/shared/actions/action-registry.js +139 -0
  14. package/dist/_internal/shared/shipping/quote.js +5 -6
  15. package/dist/client.d.ts +23 -0
  16. package/dist/client.js +3 -0
  17. package/dist/constants/api-endpoints.d.ts +12 -0
  18. package/dist/constants/api-endpoints.js +10 -0
  19. package/dist/constants/field-names.d.ts +46 -0
  20. package/dist/constants/field-names.js +46 -0
  21. package/dist/features/about/components/PublicProfileView.js +2 -1
  22. package/dist/features/account/components/UserOrdersView.js +25 -3
  23. package/dist/features/admin/components/AdminBeysView.d.ts +27 -0
  24. package/dist/features/admin/components/AdminBeysView.js +178 -0
  25. package/dist/features/admin/components/AdminPartsView.d.ts +27 -0
  26. package/dist/features/admin/components/AdminPartsView.js +160 -0
  27. package/dist/features/admin/components/OwnerQuickActions.d.ts +19 -2
  28. package/dist/features/admin/components/OwnerQuickActions.js +83 -8
  29. package/dist/features/admin/components/RecordOwnerQuickActions.d.ts +31 -0
  30. package/dist/features/admin/components/RecordOwnerQuickActions.js +128 -0
  31. package/dist/features/admin/components/ReferenceRecordEditor.d.ts +45 -0
  32. package/dist/features/admin/components/ReferenceRecordEditor.js +153 -0
  33. package/dist/features/admin/schemas/firestore.d.ts +1 -1
  34. package/dist/features/auctions/components/MarketplaceAuctionCard.js +15 -2
  35. package/dist/features/auth/permissions/constants.d.ts +1 -1
  36. package/dist/features/auth/permissions/constants.js +12 -1
  37. package/dist/features/beys/components/BeyDetailPageView.d.ts +50 -0
  38. package/dist/features/beys/components/BeyDetailPageView.js +98 -0
  39. package/dist/features/beys/schemas/firestore.d.ts +417 -0
  40. package/dist/features/beys/schemas/firestore.js +65 -0
  41. package/dist/features/blog/components/BlogFeaturedCard.js +15 -2
  42. package/dist/features/blog/components/BlogPostView.js +2 -1
  43. package/dist/features/cart/components/CartPriceBreakdown.d.ts +2 -0
  44. package/dist/features/cart/components/CartPriceBreakdown.js +1 -1
  45. package/dist/features/categories/components/BrandDetailPageView.js +4 -2
  46. package/dist/features/categories/components/BundleDetailView.js +2 -2
  47. package/dist/features/categories/components/CategoryDetailPageView.js +36 -3
  48. package/dist/features/categories/components/CategoryGrid.js +24 -2
  49. package/dist/features/categories/components/FranchiseDetailPageView.js +2 -1
  50. package/dist/features/events/components/EventCard.js +15 -2
  51. package/dist/features/faq/components/FAQPageContent.js +17 -4
  52. package/dist/features/faq/constants/help-guides.d.ts +36 -0
  53. package/dist/features/faq/constants/help-guides.js +64 -0
  54. package/dist/features/grouped/components/GroupedListingDetailView.js +2 -3
  55. package/dist/features/homepage/components/CustomCardsSection.js +67 -50
  56. package/dist/features/homepage/components/HeroCarousel.js +3 -1
  57. package/dist/features/homepage/components/ShopByCategorySection.js +23 -10
  58. package/dist/features/homepage/lib/section-renderer.js +2 -1
  59. package/dist/features/homepage/schemas/index.d.ts +10 -10
  60. package/dist/features/orders/components/EmiInstallmentsPanel.d.ts +19 -0
  61. package/dist/features/orders/components/EmiInstallmentsPanel.js +57 -0
  62. package/dist/features/orders/components/index.d.ts +1 -0
  63. package/dist/features/orders/components/index.js +1 -0
  64. package/dist/features/orders/schemas/index.d.ts +2 -2
  65. package/dist/features/orders/types/index.d.ts +15 -0
  66. package/dist/features/parts/components/PartDetailPageView.js +5 -3
  67. package/dist/features/parts/components/PartsSearchBox.js +79 -4
  68. package/dist/features/parts/schemas/admin-edit.d.ts +81 -0
  69. package/dist/features/parts/schemas/admin-edit.js +89 -0
  70. package/dist/features/parts/schemas/firestore.d.ts +2 -1
  71. package/dist/features/points/repository/points.repository.js +5 -5
  72. package/dist/features/points/schemas/firestore.d.ts +16 -0
  73. package/dist/features/points/schemas/firestore.js +17 -0
  74. package/dist/features/pre-orders/components/MarketplacePreorderCard.js +15 -2
  75. package/dist/features/products/components/MarketplaceBundleCard.js +15 -2
  76. package/dist/features/products/components/MarketplacePrizeDrawCard.js +15 -2
  77. package/dist/features/products/components/ProductGrid.js +18 -2
  78. package/dist/features/products/schemas/firestore.d.ts +18 -0
  79. package/dist/features/reviews/components/ReviewDetailPageView.js +3 -2
  80. package/dist/features/seller/components/CategoryInlineSelect.d.ts +10 -1
  81. package/dist/features/seller/components/CategoryInlineSelect.js +53 -5
  82. package/dist/features/seller/components/SellerProductShell.d.ts +39 -0
  83. package/dist/features/seller/components/SellerProductShell.js +31 -3
  84. package/dist/features/stores/components/StoreHeader.js +3 -1
  85. package/dist/index.d.ts +8 -0
  86. package/dist/index.js +13 -0
  87. package/dist/next/routing/route-map.d.ts +17 -1
  88. package/dist/next/routing/route-map.js +39 -0
  89. package/dist/schemas/registry.d.ts +8 -8
  90. package/dist/seed/_helpers/category-models/chunk0.d.ts +2 -0
  91. package/dist/seed/_helpers/category-models/chunk0.js +2648 -0
  92. package/dist/seed/_helpers/category-models/chunk1.d.ts +2 -0
  93. package/dist/seed/_helpers/category-models/chunk1.js +2318 -0
  94. package/dist/seed/_helpers/category-models/chunk2.d.ts +2 -0
  95. package/dist/seed/_helpers/category-models/chunk2.js +2560 -0
  96. package/dist/seed/_helpers/category-models/chunk3.d.ts +2 -0
  97. package/dist/seed/_helpers/category-models/chunk3.js +2196 -0
  98. package/dist/seed/_helpers/category-models/chunk4.d.ts +2 -0
  99. package/dist/seed/_helpers/category-models/chunk4.js +1732 -0
  100. package/dist/seed/_helpers/category-models.d.ts +9 -2
  101. package/dist/seed/_helpers/category-models.js +19 -1368
  102. package/dist/seed/_helpers/category-parts-glossary-map.js +38 -38
  103. package/dist/seed/_helpers/category-parts.js +39 -39
  104. package/dist/seed/bey-products-seed-data.d.ts +18 -0
  105. package/dist/seed/bey-products-seed-data.js +18011 -0
  106. package/dist/seed/beys/chunk0.d.ts +17 -0
  107. package/dist/seed/beys/chunk0.js +36733 -0
  108. package/dist/seed/beys/chunk1.d.ts +17 -0
  109. package/dist/seed/beys/chunk1.js +35728 -0
  110. package/dist/seed/beys/chunk2.d.ts +17 -0
  111. package/dist/seed/beys/chunk2.js +35857 -0
  112. package/dist/seed/beys/chunk3.d.ts +17 -0
  113. package/dist/seed/beys/chunk3.js +34476 -0
  114. package/dist/seed/beys-seed-data.d.ts +18 -0
  115. package/dist/seed/beys-seed-data.js +11 -0
  116. package/dist/seed/homepage-sections-seed-data.js +16 -0
  117. package/dist/seed/index.d.ts +2 -0
  118. package/dist/seed/index.js +3 -0
  119. package/dist/seed/media-assets-seed-data.js +4 -4
  120. package/dist/seed/products-catalogue/chunk0.d.ts +12 -0
  121. package/dist/seed/products-catalogue/chunk0.js +7262 -0
  122. package/dist/seed/products-catalogue/chunk1.d.ts +12 -0
  123. package/dist/seed/products-catalogue/chunk1.js +7290 -0
  124. package/dist/seed/products-catalogue/chunk10.d.ts +12 -0
  125. package/dist/seed/products-catalogue/chunk10.js +7290 -0
  126. package/dist/seed/products-catalogue/chunk11.d.ts +12 -0
  127. package/dist/seed/products-catalogue/chunk11.js +7005 -0
  128. package/dist/seed/products-catalogue/chunk12.d.ts +12 -0
  129. package/dist/seed/products-catalogue/chunk12.js +7002 -0
  130. package/dist/seed/products-catalogue/chunk13.d.ts +12 -0
  131. package/dist/seed/products-catalogue/chunk13.js +7002 -0
  132. package/dist/seed/products-catalogue/chunk14.d.ts +12 -0
  133. package/dist/seed/products-catalogue/chunk14.js +7002 -0
  134. package/dist/seed/products-catalogue/chunk15.d.ts +12 -0
  135. package/dist/seed/products-catalogue/chunk15.js +7002 -0
  136. package/dist/seed/products-catalogue/chunk16.d.ts +12 -0
  137. package/dist/seed/products-catalogue/chunk16.js +7002 -0
  138. package/dist/seed/products-catalogue/chunk17.d.ts +12 -0
  139. package/dist/seed/products-catalogue/chunk17.js +7002 -0
  140. package/dist/seed/products-catalogue/chunk18.d.ts +12 -0
  141. package/dist/seed/products-catalogue/chunk18.js +4398 -0
  142. package/dist/seed/products-catalogue/chunk2.d.ts +12 -0
  143. package/dist/seed/products-catalogue/chunk2.js +7268 -0
  144. package/dist/seed/products-catalogue/chunk3.d.ts +12 -0
  145. package/dist/seed/products-catalogue/chunk3.js +7264 -0
  146. package/dist/seed/products-catalogue/chunk4.d.ts +12 -0
  147. package/dist/seed/products-catalogue/chunk4.js +7268 -0
  148. package/dist/seed/products-catalogue/chunk5.d.ts +12 -0
  149. package/dist/seed/products-catalogue/chunk5.js +7258 -0
  150. package/dist/seed/products-catalogue/chunk6.d.ts +12 -0
  151. package/dist/seed/products-catalogue/chunk6.js +7268 -0
  152. package/dist/seed/products-catalogue/chunk7.d.ts +12 -0
  153. package/dist/seed/products-catalogue/chunk7.js +7311 -0
  154. package/dist/seed/products-catalogue/chunk8.d.ts +12 -0
  155. package/dist/seed/products-catalogue/chunk8.js +7304 -0
  156. package/dist/seed/products-catalogue/chunk9.d.ts +12 -0
  157. package/dist/seed/products-catalogue/chunk9.js +7309 -0
  158. package/dist/seed/products-catalogue-seed-data.d.ts +2 -22
  159. package/dist/seed/products-catalogue-seed-data.js +58 -86382
  160. package/dist/seed/seed-purpose.js +9 -0
  161. package/dist/server.d.ts +5 -1
  162. package/dist/server.js +19 -0
  163. package/dist/styles.css +468 -1
  164. package/dist/tailwind-utilities.css +1 -1
  165. package/dist/ui/components/PosterCard.d.ts +99 -0
  166. package/dist/ui/components/PosterCard.js +109 -0
  167. package/dist/ui/components/PosterCard.style.css +466 -0
  168. package/dist/ui/components/index.style.css +1 -0
  169. package/dist/ui/index.d.ts +2 -0
  170. package/dist/ui/index.js +2 -0
  171. package/package.json +1 -1
  172. package/scripts/seed-cli.mjs +108 -1
@@ -185,6 +185,15 @@ export const SEED_COLLECTION_PURPOSE = {
185
185
  * the extractor is possible but needs a corpus a clone will not have.
186
186
  */
187
187
  partGlossary: "permanent",
188
+ /*
189
+ * PERMANENT, for the reason `partGlossary` is: these are extracted from a
190
+ * crawled corpus by committed scripts, not fixtures. Clearing them means
191
+ * re-running an extraction over a local crawl a clone will not have, which
192
+ * is the test § G1c sets — "if clearing it means somebody has to WRITE it
193
+ * again rather than re-run a loader".
194
+ */
195
+ beys: "permanent",
196
+ beyProducts: "permanent",
188
197
  modelComposition: "permanent",
189
198
  testerChecklistResponses: "test",
190
199
  /*
package/dist/server.d.ts CHANGED
@@ -7,6 +7,8 @@ export { buildTokensIndex, tokensIndexQueryValue, BLIND_INDEX_KEY_VERSION_FIELD,
7
7
  export { scopedSourcesFor, scopedScanTotal, assertWithinScopedBudget, } from "./_internal/server/features/search/scoped-sources";
8
8
  export type { SearchViewer } from "./_internal/server/features/search/scoped-sources";
9
9
  export { getPartByKey, getModelsUsingPart, getCompositionById, getPartsForComposition, getCompositionsForCategory, listPartsBySlot, } from "./_internal/server/features/parts/data";
10
+ export { getBeyBySlug, getBeysForCategory, getProductsContainingBey, } from "./_internal/server/features/beys/data";
11
+ export { renderBeyOg } from "./_internal/server/features/beys/og";
10
12
  export { renderCityOg, type CityOgData } from "./_internal/server/features/products/og";
11
13
  export { listBuildableModels, BUILDABLE_HOLDINGS_LIMIT, BUILDABLE_CANDIDATE_LIMIT, type BuildableModel, type BuildableResult, type BuildableSlot, } from "./_internal/server/features/parts/buildable";
12
14
  export { renderPartOg, renderPartClassificationOg, } from "./_internal/server/features/parts/og";
@@ -21,7 +23,7 @@ export { wrapAction, isOk, unwrap, } from "./_internal/shared/types/action-resul
21
23
  export type { ActionResult } from "./_internal/shared/types/action-result";
22
24
  export { setActionErrorReporter, hasActionErrorReporter, } from "./_internal/shared/types/action-error-reporter";
23
25
  export type { ActionErrorReport, ActionErrorReporter, } from "./_internal/shared/types/action-error-reporter";
24
- export { attachPaymentProofAction, adminVerifyPaymentAction, adminRequestProofReuploadAction, adminRejectPaymentAsFraudAction, raiseOrderDisputeAction, requestReturnAction, } from "./_internal/server/features/orders/actions";
26
+ export { attachPaymentProofAction, adminVerifyPaymentAction, adminRequestProofReuploadAction, adminRejectPaymentAsFraudAction, raiseOrderDisputeAction, submitEmiInstallmentPaymentAction, requestReturnAction, } from "./_internal/server/features/orders/actions";
25
27
  export { wrapJobHandler, wrapScheduleHandler, wrapTriggerHandler, wrapCallableHandler, } from "./_internal/server/jobs/core/wrapJobHandler";
26
28
  export { analyzeLogs } from "./_internal/server/features/maintenance/analyze";
27
29
  export type { AnalyzeOptions, AnalyzeReport, } from "./_internal/server/features/maintenance/analyze";
@@ -258,6 +260,8 @@ export { listTopLevelCategories } from "./features/categories/server";
258
260
  export { updateCategory } from "./features/categories/server";
259
261
  export { sendCheckoutValueOtp, verifyCheckoutValueOtp, isCheckoutValueOtpVerified, } from "./features/checkout/server";
260
262
  export { FailedCheckoutRepository, failedCheckoutRepository } from "./features/checkout/server";
263
+ export { reconcileOrderShipping } from "./_internal/server/features/shipping/reconcile";
264
+ export { pointsRepository, PointsRepository } from "./features/points/repository/points.repository";
261
265
  export type { FailedCheckoutMeta, FailedPaymentMeta } from "./features/checkout/server";
262
266
  export { EmailButton, EmailColumn, EmailContainer, EmailDivider, EmailDoc, EmailFooter, EmailHeader, EmailImage, EmailLink, EmailRow, } from "./features/email";
263
267
  export type { EmailButtonProps, EmailColumnProps, EmailContainerProps, EmailDividerProps, EmailDocProps, EmailFooterProps, EmailHeaderProps, EmailImageProps, EmailLinkProps, EmailRowProps, EmailTone, } from "./features/email";
package/dist/server.js CHANGED
@@ -25,6 +25,14 @@ export { scopedSourcesFor, scopedScanTotal, assertWithinScopedBudget, } from "./
25
25
  // D12 — part + composition reads. Every one is by document id or ONE
26
26
  // indexed equality; none needs a composite index.
27
27
  export { getPartByKey, getModelsUsingPart, getCompositionById, getPartsForComposition, getCompositionsForCategory, listPartsBySlot, } from "./_internal/server/features/parts/data.js";
28
+ /*
29
+ * The BEY reads. `getBeyBySlug` is a direct doc read (`id === slug`);
30
+ * `getProductsContainingBey` is ONE `array-contains` over the denormalised
31
+ * `assortmentBeyIds`, because Firestore cannot `array-contains` a field nested
32
+ * inside objects in an array.
33
+ */
34
+ export { getBeyBySlug, getBeysForCategory, getProductsContainingBey, } from "./_internal/server/features/beys/data.js";
35
+ export { renderBeyOg } from "./_internal/server/features/beys/og.js";
28
36
  /*
29
37
  * D13's last item — "which models can I build from the parts I hold".
30
38
  * Exported because its only caller is a consumer route; the matcher it is built
@@ -53,6 +61,9 @@ export { wrapAction, isOk, unwrap, } from "./_internal/shared/types/action-resul
53
61
  export { setActionErrorReporter, hasActionErrorReporter, } from "./_internal/shared/types/action-error-reporter.js";
54
62
  // [SERVER-ONLY] P-1 manual payment proof server actions.
55
63
  export { attachPaymentProofAction, adminVerifyPaymentAction, adminRequestProofReuploadAction, adminRejectPaymentAsFraudAction, raiseOrderDisputeAction,
64
+ // Buyer pays one of their own EMI instalments — the counterpart to the
65
+ // seller's markEmiInstallmentPaid, which was the only writer before.
66
+ submitEmiInstallmentPaymentAction,
56
67
  // Buyer return request. Was reachable only through `server-entry.ts`, which
57
68
  // is the bare `@mohasinac/appkit` specifier — not `/server`, where every
58
69
  // other order action lives and where a consumer would look for it.
@@ -738,6 +749,14 @@ export { updateCategory } from "./features/categories/server.js";
738
749
  // [SERVER-ONLY] Tier PP — high-value checkout OTP gate.
739
750
  export { sendCheckoutValueOtp, verifyCheckoutValueOtp, isCheckoutValueOtpVerified, } from "./features/checkout/server.js";
740
751
  export { FailedCheckoutRepository, failedCheckoutRepository } from "./features/checkout/server.js";
752
+ /*
753
+ * Shipping reconciliation. Public on the SERVER entry only: it writes a points
754
+ * ledger entry and an order, so it must never be reachable from a client
755
+ * bundle. The consumer owns the seller's dispatch route, which is the second
756
+ * place a parcel is marked shipped.
757
+ */
758
+ export { reconcileOrderShipping } from "./_internal/server/features/shipping/reconcile.js";
759
+ export { pointsRepository, PointsRepository } from "./features/points/repository/points.repository.js";
741
760
  // [SERVER-ONLY] Email primitives — table-based, inline-styled components
742
761
  // that render email-client-compatible HTML via renderToStaticMarkup. Use
743
762
  // these instead of authoring raw <table>/<tr>/<td> in email templates.