@mohasinac/appkit 4.1.1 → 4.2.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 (225) hide show
  1. package/dist/_internal/client/features/maintenance/index.d.ts +2 -0
  2. package/dist/_internal/client/features/maintenance/index.js +1 -0
  3. package/dist/_internal/client/features/maintenance/views/CloudLogsListView.d.ts +9 -0
  4. package/dist/_internal/client/features/maintenance/views/CloudLogsListView.js +55 -0
  5. package/dist/_internal/server/features/auctions/index.d.ts +1 -1
  6. package/dist/_internal/server/features/auctions/index.js +1 -1
  7. package/dist/_internal/server/features/auctions/service.js +2 -2
  8. package/dist/_internal/server/features/checkout/actions.d.ts +15 -0
  9. package/dist/_internal/server/features/checkout/actions.js +245 -182
  10. package/dist/_internal/server/features/maintenance/cloud-logs-data.d.ts +50 -0
  11. package/dist/_internal/server/features/maintenance/cloud-logs-data.js +152 -0
  12. package/dist/_internal/server/functions/scheduled.d.ts +2 -1
  13. package/dist/_internal/server/functions/scheduled.js +9 -1
  14. package/dist/_internal/server/jobs/core/jobRunners.js +10 -0
  15. package/dist/_internal/server/jobs/core/newsletterExport.d.ts +15 -0
  16. package/dist/_internal/server/jobs/core/newsletterExport.js +43 -0
  17. package/dist/_internal/server/jobs/core/onOrderCreate.d.ts +4 -12
  18. package/dist/_internal/server/jobs/core/onOrderCreate.js +3 -3
  19. package/dist/_internal/server/jobs/core/onOrderStatusChange.d.ts +2 -0
  20. package/dist/_internal/server/jobs/core/onOrderStatusChange.js +1 -0
  21. package/dist/_internal/server/jobs/core/onProductWrite.js +14 -2
  22. package/dist/_internal/server/jobs/core/paymentWindowTimeout.js +1 -0
  23. package/dist/_internal/server/jobs/core/pendingOrderTimeout.js +1 -0
  24. package/dist/_internal/server/jobs/core/revenueRollup.d.ts +13 -0
  25. package/dist/_internal/server/jobs/core/revenueRollup.js +22 -0
  26. package/dist/_internal/server/jobs/core/whatsappNotify.d.ts +35 -0
  27. package/dist/_internal/server/jobs/core/whatsappNotify.js +82 -0
  28. package/dist/_internal/server/jobs/handlers/index.d.ts +1 -0
  29. package/dist/_internal/server/jobs/handlers/index.js +1 -0
  30. package/dist/_internal/server/jobs/handlers/revenueRollup.d.ts +2 -0
  31. package/dist/_internal/server/jobs/handlers/revenueRollup.js +2 -0
  32. package/dist/_internal/shared/features/auctions/config.d.ts +1 -1
  33. package/dist/_internal/shared/features/auctions/config.js +1 -1
  34. package/dist/_internal/shared/features/auctions/schema.js +1 -1
  35. package/dist/_internal/shared/features/cart/schema.js +2 -2
  36. package/dist/_internal/shared/features/checkout/config.d.ts +7 -0
  37. package/dist/_internal/shared/features/checkout/config.js +7 -0
  38. package/dist/_internal/shared/features/events/schema.js +1 -1
  39. package/dist/_internal/shared/features/orders/schema.js +1 -1
  40. package/dist/_internal/shared/features/products/schema.js +3 -3
  41. package/dist/_internal/shared/features/promotions/schema.js +3 -3
  42. package/dist/_internal/shared/fees/calculator.d.ts +32 -7
  43. package/dist/_internal/shared/fees/calculator.js +25 -0
  44. package/dist/client.d.ts +4 -4
  45. package/dist/client.js +4 -2
  46. package/dist/constants/api-endpoints.d.ts +9 -6
  47. package/dist/constants/api-endpoints.js +3 -2
  48. package/dist/contracts/client-payment-gateway.d.ts +1 -2
  49. package/dist/features/about/components/AboutView.d.ts +6 -16
  50. package/dist/features/about/components/AboutView.js +3 -3
  51. package/dist/features/about/components/FeesView.js +18 -0
  52. package/dist/features/about/index.d.ts +2 -1
  53. package/dist/features/about/schemas/firestore.d.ts +47 -0
  54. package/dist/features/about/schemas/firestore.js +6 -0
  55. package/dist/features/about/schemas/index.d.ts +210 -0
  56. package/dist/features/about/schemas/index.js +45 -0
  57. package/dist/features/account/hooks/useProfile.js +3 -0
  58. package/dist/features/admin/actions/notification-actions.d.ts +4 -1
  59. package/dist/features/admin/actions/notification-actions.js +56 -10
  60. package/dist/features/admin/components/AdminAdsView.js +1 -1
  61. package/dist/features/admin/components/AdminCarouselGroupEditorView.d.ts +6 -0
  62. package/dist/features/admin/components/AdminCarouselGroupEditorView.js +50 -0
  63. package/dist/features/admin/components/AdminCartsView.js +16 -3
  64. package/dist/features/admin/components/AdminCouponEditorView.js +2 -2
  65. package/dist/features/admin/components/AdminCouponsView.js +14 -4
  66. package/dist/features/admin/components/AdminEmployeeEditorView.js +1 -42
  67. package/dist/features/admin/components/AdminMediaView.js +1 -1
  68. package/dist/features/admin/components/AdminNewsletterView.js +42 -11
  69. package/dist/features/admin/components/AdminNotificationsView.js +31 -19
  70. package/dist/features/admin/components/AdminOrdersView.js +7 -0
  71. package/dist/features/admin/components/AdminPayoutsView.js +18 -3
  72. package/dist/features/admin/components/AdminProductsView.js +17 -2
  73. package/dist/features/admin/components/AdminReviewsView.js +16 -2
  74. package/dist/features/admin/components/AdminScammersView.js +7 -0
  75. package/dist/features/admin/components/AdminSectionsView.js +4 -0
  76. package/dist/features/admin/components/AdminSiteConfigGuideView.js +1 -1
  77. package/dist/features/admin/components/AdminSiteSettingsView.js +127 -8
  78. package/dist/features/admin/components/AdminStoreEditorView.d.ts +2 -1
  79. package/dist/features/admin/components/AdminStoreEditorView.js +4 -4
  80. package/dist/features/admin/components/AdminStoresView.js +1 -1
  81. package/dist/features/admin/components/AdminSupportTicketDetailView.js +23 -5
  82. package/dist/features/admin/components/AdminSupportTicketsView.js +20 -2
  83. package/dist/features/admin/components/AdminTesterChecklistItemEditorView.js +4 -1
  84. package/dist/features/admin/components/AdminTesterChecklistView.js +8 -0
  85. package/dist/features/admin/components/index.d.ts +2 -0
  86. package/dist/features/admin/components/index.js +1 -0
  87. package/dist/features/admin/constants/filter-tabs.d.ts +55 -41
  88. package/dist/features/admin/constants/filter-tabs.js +55 -27
  89. package/dist/features/admin/repository/analytics-rollup.repository.d.ts +25 -0
  90. package/dist/features/admin/repository/analytics-rollup.repository.js +31 -0
  91. package/dist/features/admin/repository/site-settings.repository.js +8 -1
  92. package/dist/features/admin/schemas/firestore.d.ts +46 -0
  93. package/dist/features/admin/schemas/firestore.js +62 -24
  94. package/dist/features/auctions/actions/bid-actions.js +1 -1
  95. package/dist/features/auctions/components/AuctionDetailPageView.js +2 -2
  96. package/dist/features/auctions/components/AuctionsListView.js +8 -1
  97. package/dist/features/auth/components/LoginForm.js +2 -2
  98. package/dist/features/auth/components/RegisterForm.js +2 -2
  99. package/dist/features/auth/permissions/constants.d.ts +16 -0
  100. package/dist/features/auth/permissions/constants.js +53 -0
  101. package/dist/features/auth/schemas/firestore.js +1 -0
  102. package/dist/features/blog/components/BlogFilters.js +1 -1
  103. package/dist/features/cart/schemas/firestore.d.ts +1 -1
  104. package/dist/features/categories/schemas/firestore.d.ts +1 -1
  105. package/dist/features/consultation/components/ConsultationForm.js +1 -1
  106. package/dist/features/events/components/EventFilters.js +2 -0
  107. package/dist/features/homepage/components/WelcomeSection.js +2 -2
  108. package/dist/features/layout/BackToTop.d.ts +9 -5
  109. package/dist/features/layout/BackToTop.js +17 -21
  110. package/dist/features/layout/TitleBarLayout.d.ts +2 -2
  111. package/dist/features/layout/TitleBarLayout.js +4 -4
  112. package/dist/features/media/AvatarUpload.js +7 -3
  113. package/dist/features/media/MediaVideo.js +1 -1
  114. package/dist/features/media/finalize.d.ts +9 -13
  115. package/dist/features/media/finalize.js +23 -74
  116. package/dist/features/media/server.d.ts +1 -1
  117. package/dist/features/media/server.js +1 -1
  118. package/dist/features/orders/actions/refund-actions.js +1 -0
  119. package/dist/features/orders/hooks/useOrders.js +16 -4
  120. package/dist/features/orders/schemas/firestore.d.ts +19 -5
  121. package/dist/features/payments/schemas/firestore.d.ts +2 -2
  122. package/dist/features/pre-orders/components/PreOrdersListView.js +7 -0
  123. package/dist/features/products/components/ArtStickersListView.js +5 -0
  124. package/dist/features/products/components/ProductDetailPageView.d.ts +7 -1
  125. package/dist/features/products/components/ProductForm.js +14 -1
  126. package/dist/features/products/components/ProductsIndexPageView.js +7 -0
  127. package/dist/features/products/constants/action-defs.d.ts +29 -3
  128. package/dist/features/products/constants/action-defs.js +77 -1
  129. package/dist/features/products/schemas/firestore.d.ts +1 -1
  130. package/dist/features/products/schemas/product-templates.d.ts +1 -1
  131. package/dist/features/products/types/index.d.ts +4 -0
  132. package/dist/features/scams/schemas/index.js +2 -2
  133. package/dist/features/search/components/Search.js +3 -3
  134. package/dist/features/seller/components/SellerAuctionsView.js +27 -2
  135. package/dist/features/seller/components/SellerOrdersView.js +2 -2
  136. package/dist/features/seller/components/SellerPayoutsView.js +24 -10
  137. package/dist/features/seller/components/SellerPreOrdersView.js +12 -4
  138. package/dist/features/seller/components/SellerPrizeDrawsView.js +23 -5
  139. package/dist/features/seller/components/SellerProductShell.d.ts +2 -0
  140. package/dist/features/seller/components/SellerProductShell.js +1 -1
  141. package/dist/features/seller/components/SellerProductsView.js +8 -6
  142. package/dist/features/seller/components/SellerReviewsView.js +27 -6
  143. package/dist/features/seller/components/index.d.ts +0 -2
  144. package/dist/features/seller/components/index.js +0 -1
  145. package/dist/features/stores/components/StoreListingsGuideView.js +2 -1
  146. package/dist/features/stores/components/StoreProductsView.js +1 -1
  147. package/dist/features/stores/schemas/firestore.d.ts +11 -0
  148. package/dist/features/stores/schemas/firestore.js +5 -0
  149. package/dist/features/stores/schemas/index.d.ts +2 -2
  150. package/dist/features/tester/actions/checklist-item-actions.d.ts +6 -0
  151. package/dist/features/tester/actions/checklist-item-actions.js +2 -0
  152. package/dist/features/tester/components/AdminTesterFeedbackIssuesView.js +13 -2
  153. package/dist/features/tester/components/AdminTesterFeedbackListView.js +2 -1
  154. package/dist/features/tester/components/AdminTesterFeedbackReportView.js +9 -5
  155. package/dist/features/tester/components/TesterHubView.js +34 -21
  156. package/dist/features/tester/repository/tester-checklist-item.repository.js +1 -0
  157. package/dist/features/tester/repository/tester-checklist-response.repository.d.ts +18 -4
  158. package/dist/features/tester/repository/tester-checklist-response.repository.js +43 -8
  159. package/dist/features/tester/schemas/firestore.d.ts +8 -3
  160. package/dist/features/tester/schemas/firestore.js +6 -0
  161. package/dist/features/tester/seed-data/tester-checklist-seed-data.js +21 -9
  162. package/dist/features/tester/utils/phases.d.ts +31 -0
  163. package/dist/features/tester/utils/phases.js +46 -0
  164. package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +1 -1
  165. package/dist/features/whatsapp-bot/helpers/whatsapp.d.ts +10 -1
  166. package/dist/features/whatsapp-bot/helpers/whatsapp.js +47 -0
  167. package/dist/features/whatsapp-bot/types/index.d.ts +20 -1
  168. package/dist/features/wishlist/types/index.d.ts +3 -0
  169. package/dist/index.d.ts +15 -6
  170. package/dist/index.js +19 -9
  171. package/dist/next/components/NotFoundView.js +2 -1
  172. package/dist/next/routing/route-map.d.ts +6 -12
  173. package/dist/next/routing/route-map.js +3 -4
  174. package/dist/providers/db-firebase/admin.d.ts +1 -0
  175. package/dist/providers/db-firebase/admin.js +1 -1
  176. package/dist/repositories/index.d.ts +2 -0
  177. package/dist/repositories/index.js +1 -0
  178. package/dist/schemas/registry.d.ts +2 -2
  179. package/dist/seed/addresses-seed-data.js +18 -18
  180. package/dist/seed/bids-seed-data.js +4 -4
  181. package/dist/seed/blog-posts-seed-data.js +82 -82
  182. package/dist/seed/carousel-slides-seed-data.js +14 -10
  183. package/dist/seed/carousels-seed-data.js +3 -3
  184. package/dist/seed/cart-seed-data.js +92 -92
  185. package/dist/seed/claimed-coupons-seed-data.js +10 -10
  186. package/dist/seed/conversations-seed-data.js +75 -75
  187. package/dist/seed/coupon-usage-seed-data.js +12 -12
  188. package/dist/seed/coupons-seed-data.js +41 -41
  189. package/dist/seed/events-seed-data.js +105 -105
  190. package/dist/seed/grouped-listings-seed-data.d.ts +2 -137
  191. package/dist/seed/grouped-listings-seed-data.js +79 -143
  192. package/dist/seed/history-seed-data.js +38 -38
  193. package/dist/seed/homepage-sections-seed-data.js +9 -9
  194. package/dist/seed/notifications-seed-data.js +56 -56
  195. package/dist/seed/offers-seed-data.js +91 -91
  196. package/dist/seed/orders-seed-data.js +121 -106
  197. package/dist/seed/payouts-seed-data.js +42 -42
  198. package/dist/seed/products-auctions-seed-data.js +10 -2
  199. package/dist/seed/products-standard-seed-data.js +40 -8
  200. package/dist/seed/reviews-seed-data.js +42 -23
  201. package/dist/seed/scammers-seed-data.js +22 -22
  202. package/dist/seed/sessions-seed-data.js +7 -7
  203. package/dist/seed/shipments-seed-data.js +10 -10
  204. package/dist/seed/site-settings-seed-data.js +89 -0
  205. package/dist/seed/store-addresses-seed-data.js +2 -2
  206. package/dist/seed/store-extensions-seed-data.js +93 -93
  207. package/dist/seed/stores-seed-data.js +2 -0
  208. package/dist/seed/support-tickets-seed-data.js +47 -47
  209. package/dist/seed/users-seed-data.js +55 -89
  210. package/dist/seed/wishlists-seed-data.js +22 -22
  211. package/dist/server.d.ts +4 -3
  212. package/dist/server.js +7 -7
  213. package/dist/styles.css +1 -1
  214. package/dist/tailwind-utilities.css +1 -1
  215. package/dist/ui/components/PageLoader.js +8 -3
  216. package/dist/ui/components/Select.d.ts +8 -1
  217. package/dist/ui/components/Select.js +2 -2
  218. package/dist/ui/components/SiteMark.d.ts +23 -0
  219. package/dist/ui/components/SiteMark.js +76 -0
  220. package/dist/ui/index.d.ts +2 -0
  221. package/dist/ui/index.js +1 -0
  222. package/dist/validation/schemas.d.ts +0 -2
  223. package/dist/validation/schemas.js +0 -2
  224. package/package.json +1 -1
  225. package/scripts/seed-cli.mjs +17 -15
@@ -2,6 +2,13 @@ export const CHECKOUT_DEFAULT_COMMISSIONS = {
2
2
  codDepositPercent: 10,
3
3
  codHandlingFeeMin: 200,
4
4
  codHandlingFeePercent: 10,
5
+ whatsappNotifyFeeEnabled: false,
6
+ whatsappNotifyFee: 10,
7
+ giftWrapFeeEnabled: false,
8
+ giftWrapFee: 49,
9
+ shipmentProtectionFeeEnabled: false,
10
+ shipmentProtectionFeePercent: 2,
11
+ shipmentProtectionFeeMin: 30,
5
12
  sellerShippingFixed: 50,
6
13
  platformShippingPercent: 10,
7
14
  platformShippingFixedMin: 50,
@@ -12,7 +12,7 @@ export const eventInputSchema = z.object({
12
12
  imageUrl: z.string().url().optional(),
13
13
  location: z.string().max(300).optional(),
14
14
  isOnline: z.boolean().default(false),
15
- entryFee: z.number().int().min(0).default(0),
15
+ entryFee: z.number().min(0).default(0),
16
16
  });
17
17
  export const eventUpdateSchema = eventInputSchema.partial().omit({ slug: true });
18
18
  export const registerForEventSchema = z.object({
@@ -14,7 +14,7 @@ export const createOrderSchema = z.object({
14
14
  items: z.array(z.object({
15
15
  productId: z.string().min(1),
16
16
  quantity: z.number().int().min(1),
17
- price: z.number().int().min(0),
17
+ price: z.number().min(0),
18
18
  })).min(1, "Order must have at least one item"),
19
19
  shippingAddress: addressSchema,
20
20
  paymentMethod: z.enum(["razorpay", "cod", "upi"]),
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- const priceSchema = z.number().int().min(0, "Price must be non-negative (paise)");
2
+ const priceSchema = z.number().min(0, "Price must be non-negative");
3
3
  const conditionSchema = z.enum(["new", "like_new", "good", "fair", "poor", "used", "refurbished", "broken"]);
4
4
  export const productInputSchema = z.object({
5
5
  title: z.string().min(3, "Title must be at least 3 characters").max(200),
@@ -21,7 +21,7 @@ export const productInputSchema = z.object({
21
21
  returnPolicy: z.string().max(1000).optional(),
22
22
  shippingPaidBy: z.enum(["seller", "buyer"]).optional(),
23
23
  insurance: z.boolean().optional(),
24
- insuranceCost: z.number().int().min(0).optional(),
24
+ insuranceCost: z.number().min(0).optional(),
25
25
  allowOffers: z.boolean().optional(),
26
26
  minOfferPercent: z.number().min(0).max(100).optional(),
27
27
  features: z.array(z.string()).max(50).optional(),
@@ -33,7 +33,7 @@ export const auctionInputSchema = productInputSchema.extend({
33
33
  startingBid: priceSchema,
34
34
  reservePrice: priceSchema.optional(),
35
35
  buyNowPrice: priceSchema.optional(),
36
- minBidIncrement: z.number().int().min(1).optional(),
36
+ minBidIncrement: z.number().min(1).optional(),
37
37
  auctionEndDate: z.string().datetime({ offset: true }),
38
38
  autoExtendable: z.boolean().default(false),
39
39
  auctionExtensionMinutes: z.number().int().min(1).max(30).optional(),
@@ -2,7 +2,7 @@ import { z } from "zod";
2
2
  import { COUPON_CODE_PATTERN } from "./config";
3
3
  export const applyCouponSchema = z.object({
4
4
  code: z.string().regex(COUPON_CODE_PATTERN, "Invalid coupon code format").toUpperCase(),
5
- cartTotal: z.number().int().min(0),
5
+ cartTotal: z.number().min(0),
6
6
  productIds: z.array(z.string()).optional(),
7
7
  categoryIds: z.array(z.string()).optional(),
8
8
  isFirstTimeUser: z.boolean().default(false),
@@ -15,8 +15,8 @@ export const createCouponSchema = z.object({
15
15
  sellerId: z.string().optional(),
16
16
  discount: z.object({
17
17
  value: z.number().min(0),
18
- maxDiscount: z.number().int().min(0).optional(),
19
- minPurchase: z.number().int().min(0).default(0),
18
+ maxDiscount: z.number().min(0).optional(),
19
+ minPurchase: z.number().min(0).default(0),
20
20
  }),
21
21
  usage: z.object({
22
22
  totalLimit: z.number().int().min(1).optional(),
@@ -17,25 +17,24 @@
17
17
  export interface FeeCommissionRates {
18
18
  platformFeePercent: number;
19
19
  gstPercent: number;
20
- /** Rupee floor (not paise) — matches the existing `minimumTransactionFee` doc convention. */
21
- minimumTransactionFee?: number;
20
+ /** Rupee floor (not paise) — matches the existing `minimumTransactionFee` doc convention. */ minimumTransactionFee?: number;
22
21
  gatewayFeePercent?: number;
23
22
  }
24
23
  export interface CheckoutFees {
25
- /** Platform commission in paise. */
24
+ /** Platform commission in decimal rupees. */
26
25
  platformFee: number;
27
- /** GST on the platform fee, in paise. */
26
+ /** GST on the platform fee, in decimal rupees. */
28
27
  gstOnFee: number;
29
28
  /** platformFee + gstOnFee, floored at minimumTransactionFee. */
30
29
  totalFee: number;
31
30
  }
32
31
  export declare function computeCheckoutFees(subtotal: number, commissions: FeeCommissionRates): CheckoutFees;
33
32
  export interface PayoutDeduction {
34
- /** Platform commission in paise. */
33
+ /** Platform commission in decimal rupees. */
35
34
  platformFee: number;
36
- /** Payment gateway cost, absorbed by the platform from the seller's share, in paise. */
35
+ /** Payment gateway cost, absorbed by the platform from the seller's share, in decimal rupees. */
37
36
  gatewayFee: number;
38
- /** GST on the platform fee, in paise. */
37
+ /** GST on the platform fee, in decimal rupees. */
39
38
  gstOnFee: number;
40
39
  /** platformFee + gatewayFee + gstOnFee. */
41
40
  totalDeduction: number;
@@ -51,6 +50,32 @@ export interface CodHandlingFeeRates {
51
50
  }
52
51
  /** COD handling fee charged to the buyer: max(fixed floor, subtotal × percent). */
53
52
  export declare function computeCodHandlingFee(subtotal: number, rates: CodHandlingFeeRates): number;
53
+ export interface WhatsAppNotifyFeeRates {
54
+ /** Admin master toggle — the addon isn't charged (even if the buyer selected it) unless this is true. */
55
+ whatsappNotifyFeeEnabled?: boolean;
56
+ /** Flat rupee fee charged when the buyer opts in. Falls back to ₹10. */
57
+ whatsappNotifyFee?: number;
58
+ }
59
+ /** Flat WhatsApp order-updates addon fee — charged only when the buyer opted in AND the admin has the addon enabled. */
60
+ export declare function computeWhatsAppNotifyFee(addonSelected: boolean, rates: WhatsAppNotifyFeeRates): number;
61
+ export interface GiftWrapFeeRates {
62
+ /** Admin master toggle — the addon isn't charged (even if the buyer selected it) unless this is true. */
63
+ giftWrapFeeEnabled?: boolean;
64
+ /** Flat rupee fee charged when the buyer opts in. Falls back to ₹49. */
65
+ giftWrapFee?: number;
66
+ }
67
+ /** Flat gift-wrap addon fee — charged only when the buyer opted in AND the admin has the addon enabled. */
68
+ export declare function computeGiftWrapFee(addonSelected: boolean, rates: GiftWrapFeeRates): number;
69
+ export interface ShipmentProtectionFeeRates {
70
+ /** Admin master toggle — the addon isn't charged (even if the buyer selected it) unless this is true. */
71
+ shipmentProtectionFeeEnabled?: boolean;
72
+ /** Percent of subtotal. Falls back to 2%. */
73
+ shipmentProtectionFeePercent?: number;
74
+ /** Rupee floor. Falls back to ₹30. */
75
+ shipmentProtectionFeeMin?: number;
76
+ }
77
+ /** Shipment-protection addon fee: max(fixed floor, subtotal × percent) — charged only when the buyer opted in AND the admin has the addon enabled. */
78
+ export declare function computeShipmentProtectionFee(subtotal: number, addonSelected: boolean, rates: ShipmentProtectionFeeRates): number;
54
79
  /**
55
80
  * P-8 GST — buyer-facing product tax, distinct from the platform-commission
56
81
  * GST above. Intra-state orders split the rate evenly between CGST + SGST;
@@ -38,6 +38,31 @@ export function computeCodHandlingFee(subtotal, rates) {
38
38
  const percentFee = roundRupees(subtotal * (percent / 100));
39
39
  return Math.max(min, percentFee);
40
40
  }
41
+ const DEFAULT_WHATSAPP_NOTIFY_FEE = 10;
42
+ /** Flat WhatsApp order-updates addon fee — charged only when the buyer opted in AND the admin has the addon enabled. */
43
+ export function computeWhatsAppNotifyFee(addonSelected, rates) {
44
+ if (!addonSelected || !rates.whatsappNotifyFeeEnabled)
45
+ return 0;
46
+ return rates.whatsappNotifyFee ?? DEFAULT_WHATSAPP_NOTIFY_FEE;
47
+ }
48
+ const DEFAULT_GIFT_WRAP_FEE = 49;
49
+ /** Flat gift-wrap addon fee — charged only when the buyer opted in AND the admin has the addon enabled. */
50
+ export function computeGiftWrapFee(addonSelected, rates) {
51
+ if (!addonSelected || !rates.giftWrapFeeEnabled)
52
+ return 0;
53
+ return rates.giftWrapFee ?? DEFAULT_GIFT_WRAP_FEE;
54
+ }
55
+ const DEFAULT_SHIPMENT_PROTECTION_FEE_PERCENT = 2;
56
+ const DEFAULT_SHIPMENT_PROTECTION_FEE_MIN = 30;
57
+ /** Shipment-protection addon fee: max(fixed floor, subtotal × percent) — charged only when the buyer opted in AND the admin has the addon enabled. */
58
+ export function computeShipmentProtectionFee(subtotal, addonSelected, rates) {
59
+ if (!addonSelected || !rates.shipmentProtectionFeeEnabled)
60
+ return 0;
61
+ const percent = rates.shipmentProtectionFeePercent ?? DEFAULT_SHIPMENT_PROTECTION_FEE_PERCENT;
62
+ const min = rates.shipmentProtectionFeeMin ?? DEFAULT_SHIPMENT_PROTECTION_FEE_MIN;
63
+ const percentFee = roundRupees(subtotal * (percent / 100));
64
+ return Math.max(min, percentFee);
65
+ }
41
66
  export function calculateGst(rate, intraState, taxableAmount) {
42
67
  const gstAmount = roundRupees(taxableAmount * (rate / 100));
43
68
  if (intraState) {
package/dist/client.d.ts CHANGED
@@ -17,8 +17,8 @@ export { useApiQuery } from "./client/api/useApiQuery";
17
17
  export type { UseApiQueryOptions } from "./client/api/useApiQuery";
18
18
  export { useFeatureFlags } from "./client/api/useFeatureFlags";
19
19
  export type { FeatureFlagState } from "./client/api/useFeatureFlags";
20
- export { ServerErrorsListView, ServerErrorDetailView, MaintenanceDashboardView, AnalysisRunnerView, } from "./_internal/client/features/maintenance";
21
- export type { ServerErrorsListViewProps, ServerErrorDetailViewProps, MaintenanceDashboardViewProps, } from "./_internal/client/features/maintenance";
20
+ export { ServerErrorsListView, ServerErrorDetailView, MaintenanceDashboardView, AnalysisRunnerView, CloudLogsListView, } from "./_internal/client/features/maintenance";
21
+ export type { ServerErrorsListViewProps, ServerErrorDetailViewProps, MaintenanceDashboardViewProps, CloudLogsListViewProps, } from "./_internal/client/features/maintenance";
22
22
  export { registerClientAuthProvider, getClientAuthProvider, type IClientAuthProvider, } from "./contracts/client-auth";
23
23
  export { registerClientRealtimeProvider, getClientRealtimeProvider, type IClientRealtimeProvider, type RealtimeSnapshot, type Unsubscribe, } from "./contracts/client-realtime";
24
24
  export { registerClientSessionAdapter, getClientSessionAdapter, type IClientSessionAdapter, type AdapterAuthUser, type AuthUnsubscribe, } from "./contracts/client-session";
@@ -109,6 +109,7 @@ export type { UseEntityDeleteOptions, UseEntityDeleteReturn } from "./react/hook
109
109
  export { ROUTES, PUBLIC_ROUTES, PROTECTED_ROUTES, AUTH_ROUTES } from "./constants/index";
110
110
  export { SORT_DIR, sortBy } from "./constants/sort";
111
111
  export { SIEVE_OP, sieveFilter, sieveAnd, sieveMultiEq } from "./utils/sieve-builder";
112
+ export { formatCurrency } from "./utils/number.formatter";
112
113
  export { Container, Grid, Row, Stack } from "./ui/components/Layout";
113
114
  export { Div } from "./ui/components/Div";
114
115
  export { DynamicBgDiv } from "./ui/components/DynamicBgDiv";
@@ -163,6 +164,7 @@ export type { AdminSidebarProps, AdminNavItem, AdminNavGroup } from "./features/
163
164
  export { AdminDashboardView, AdminAnalyticsView, AdminPageViewsReportView, AdminPrizeDrawsView, AdminCarouselView, AdminSublistingCategoriesView, AdminFulfillmentView, DataTable, DataListingView, useAdminListingData, toRecordArray, toStringValue, toRelativeDate } from "./features/admin/index";
164
165
  export type { AdminDashboardViewProps, AdminAnalyticsViewProps, AdminAnalyticsViewLabels, AdminPageViewsReportViewProps, AdminPrizeDrawsViewProps, AdminCarouselViewProps, AdminFulfillmentViewProps, AdminListingScaffoldRow, ListingViewConfig } from "./features/admin/index";
165
166
  export type { BulkActionItem } from "./ui/components/BulkActionBar";
167
+ export { PERMISSION_GROUPS, PERMISSION_DOMAINS, getPermissionsForDomain, formatPermLabel } from "./features/auth/permissions/constants";
166
168
  export { ADMIN_ENDPOINTS } from "./constants/index";
167
169
  export { SELLER_ENDPOINTS } from "./constants/index";
168
170
  export { TourProvider, useTour } from "./_internal/client/features/tour/TourProvider";
@@ -334,8 +336,6 @@ export { Toggle } from "./ui/components/Toggle";
334
336
  export type { ToggleProps } from "./ui/components/Toggle";
335
337
  export { SellerStoreCategoriesView } from "./features/seller/components/SellerStoreCategoriesView";
336
338
  export type { SellerStoreCategoriesViewProps } from "./features/seller/components/SellerStoreCategoriesView";
337
- export { SellerTemplatesView } from "./features/seller/components/SellerTemplatesView";
338
- export type { SellerTemplatesViewProps } from "./features/seller/components/SellerTemplatesView";
339
339
  export { SellerPayoutMethodsView } from "./features/seller/components/SellerPayoutMethodsView";
340
340
  export type { SellerPayoutMethodsViewProps } from "./features/seller/components/SellerPayoutMethodsView";
341
341
  export { SellerShippingConfigsView } from "./features/seller/components/SellerShippingConfigsView";
package/dist/client.js CHANGED
@@ -19,7 +19,7 @@ export { useApiQuery } from "./client/api/useApiQuery";
19
19
  export { useFeatureFlags } from "./client/api/useFeatureFlags";
20
20
  // [CLIENT-ONLY] Maintenance UI — listing + detail + dashboard + analysis runner.
21
21
  // Consumed by the /admin/maintenance/* page shims.
22
- export { ServerErrorsListView, ServerErrorDetailView, MaintenanceDashboardView, AnalysisRunnerView, } from "./_internal/client/features/maintenance";
22
+ export { ServerErrorsListView, ServerErrorDetailView, MaintenanceDashboardView, AnalysisRunnerView, CloudLogsListView, } from "./_internal/client/features/maintenance";
23
23
  // Provider registration — pure contract modules with zero server dependencies.
24
24
  // Exported here so consumers can import registration functions from
25
25
  // @mohasinac/appkit/client without pulling in firebase-admin or other server code.
@@ -170,6 +170,7 @@ export { useEntityDelete } from "./react/hooks/useEntityDelete";
170
170
  export { ROUTES, PUBLIC_ROUTES, PROTECTED_ROUTES, AUTH_ROUTES } from "./constants/index";
171
171
  export { SORT_DIR, sortBy } from "./constants/sort";
172
172
  export { SIEVE_OP, sieveFilter, sieveAnd, sieveMultiEq } from "./utils/sieve-builder";
173
+ export { formatCurrency } from "./utils/number.formatter";
173
174
  export { Container, Grid, Row, Stack } from "./ui/components/Layout";
174
175
  export { Div } from "./ui/components/Div";
175
176
  export { DynamicBgDiv } from "./ui/components/DynamicBgDiv";
@@ -202,6 +203,8 @@ export { ToastProvider, SkipToMain, NavigationLoader } from "./ui/index";
202
203
  export { ZodSetup } from "./validation/ZodSetup";
203
204
  export { AdminSidebar } from "./features/admin/components/AdminSidebar";
204
205
  export { AdminDashboardView, AdminAnalyticsView, AdminPageViewsReportView, AdminPrizeDrawsView, AdminCarouselView, AdminSublistingCategoriesView, AdminFulfillmentView, DataTable, DataListingView, useAdminListingData, toRecordArray, toStringValue, toRelativeDate } from "./features/admin/index";
206
+ // S-ADMIN-7 — permission catalog data, shared by AdminEmployeeEditorView and the read-only /admin/permissions page.
207
+ export { PERMISSION_GROUPS, PERMISSION_DOMAINS, getPermissionsForDomain, formatPermLabel } from "./features/auth/permissions/constants";
205
208
  export { ADMIN_ENDPOINTS } from "./constants/index";
206
209
  export { SELLER_ENDPOINTS } from "./constants/index";
207
210
  // P-16 — Tour system (driver.js-backed onboarding walkthrough).
@@ -327,7 +330,6 @@ export { PhysicalLocationModal } from "./features/seller/components/PhysicalLoca
327
330
  export { Toggle } from "./ui/components/Toggle";
328
331
  // [CLIENT] Wave 4 seller management views.
329
332
  export { SellerStoreCategoriesView } from "./features/seller/components/SellerStoreCategoriesView";
330
- export { SellerTemplatesView } from "./features/seller/components/SellerTemplatesView";
331
333
  export { SellerPayoutMethodsView } from "./features/seller/components/SellerPayoutMethodsView";
332
334
  export { SellerShippingConfigsView } from "./features/seller/components/SellerShippingConfigsView";
333
335
  export { SellerGoogleReviewsView } from "./features/seller/components/SellerGoogleReviewsView";
@@ -173,6 +173,8 @@ export declare const ADMIN_ENDPOINTS: {
173
173
  readonly CAROUSEL: "/api/admin/carousel";
174
174
  readonly CAROUSEL_BY_ID: (id: string) => string;
175
175
  readonly CAROUSEL_REORDER: "/api/admin/carousel/reorder";
176
+ readonly CAROUSELS: "/api/admin/carousels";
177
+ readonly CAROUSELS_BY_ID: (id: string) => string;
176
178
  readonly NAVIGATION: "/api/admin/navigation";
177
179
  readonly NAVIGATION_BY_ID: (id: string) => string;
178
180
  readonly ADMIN_SITE: "/api/admin/site";
@@ -201,6 +203,7 @@ export declare const ADMIN_ENDPOINTS: {
201
203
  readonly ADMIN_FULFILLMENT: (storeId: string) => string;
202
204
  readonly CHECKOUT_BYPASS: "/api/admin/checkout-bypass";
203
205
  readonly MAINTENANCE_ANALYSIS: "/api/admin/maintenance/analysis";
206
+ readonly MAINTENANCE_CLOUD_LOGS: "/api/admin/maintenance/cloud-logs";
204
207
  readonly MEDIA_LIST: "/api/admin/media";
205
208
  };
206
209
  export declare const CHAT_ENDPOINTS: {
@@ -383,8 +386,6 @@ export declare const SELLER_ENDPOINTS: {
383
386
  readonly ANALYTICS_ALERT_BY_ID: (id: string) => string;
384
387
  readonly STORE_CATEGORIES: "/api/store/categories";
385
388
  readonly STORE_CATEGORY_BY_ID: (id: string) => string;
386
- readonly TEMPLATES: "/api/store/templates";
387
- readonly TEMPLATE_BY_ID: (id: string) => string;
388
389
  readonly PAYOUT_METHODS: "/api/store/payout-methods";
389
390
  readonly PAYOUT_METHOD_BY_ID: (id: string) => string;
390
391
  readonly SHIPPING_CONFIGS: "/api/store/shipping-configs";
@@ -620,6 +621,8 @@ export declare const API_ENDPOINTS: {
620
621
  readonly CAROUSEL: "/api/admin/carousel";
621
622
  readonly CAROUSEL_BY_ID: (id: string) => string;
622
623
  readonly CAROUSEL_REORDER: "/api/admin/carousel/reorder";
624
+ readonly CAROUSELS: "/api/admin/carousels";
625
+ readonly CAROUSELS_BY_ID: (id: string) => string;
623
626
  readonly NAVIGATION: "/api/admin/navigation";
624
627
  readonly NAVIGATION_BY_ID: (id: string) => string;
625
628
  readonly ADMIN_SITE: "/api/admin/site";
@@ -648,6 +651,7 @@ export declare const API_ENDPOINTS: {
648
651
  readonly ADMIN_FULFILLMENT: (storeId: string) => string;
649
652
  readonly CHECKOUT_BYPASS: "/api/admin/checkout-bypass";
650
653
  readonly MAINTENANCE_ANALYSIS: "/api/admin/maintenance/analysis";
654
+ readonly MAINTENANCE_CLOUD_LOGS: "/api/admin/maintenance/cloud-logs";
651
655
  readonly MEDIA_LIST: "/api/admin/media";
652
656
  };
653
657
  readonly CHAT: {
@@ -830,8 +834,6 @@ export declare const API_ENDPOINTS: {
830
834
  readonly ANALYTICS_ALERT_BY_ID: (id: string) => string;
831
835
  readonly STORE_CATEGORIES: "/api/store/categories";
832
836
  readonly STORE_CATEGORY_BY_ID: (id: string) => string;
833
- readonly TEMPLATES: "/api/store/templates";
834
- readonly TEMPLATE_BY_ID: (id: string) => string;
835
837
  readonly PAYOUT_METHODS: "/api/store/payout-methods";
836
838
  readonly PAYOUT_METHOD_BY_ID: (id: string) => string;
837
839
  readonly SHIPPING_CONFIGS: "/api/store/shipping-configs";
@@ -1069,6 +1071,8 @@ export declare const API_ROUTES: {
1069
1071
  readonly CAROUSEL: "/api/admin/carousel";
1070
1072
  readonly CAROUSEL_BY_ID: (id: string) => string;
1071
1073
  readonly CAROUSEL_REORDER: "/api/admin/carousel/reorder";
1074
+ readonly CAROUSELS: "/api/admin/carousels";
1075
+ readonly CAROUSELS_BY_ID: (id: string) => string;
1072
1076
  readonly NAVIGATION: "/api/admin/navigation";
1073
1077
  readonly NAVIGATION_BY_ID: (id: string) => string;
1074
1078
  readonly ADMIN_SITE: "/api/admin/site";
@@ -1097,6 +1101,7 @@ export declare const API_ROUTES: {
1097
1101
  readonly ADMIN_FULFILLMENT: (storeId: string) => string;
1098
1102
  readonly CHECKOUT_BYPASS: "/api/admin/checkout-bypass";
1099
1103
  readonly MAINTENANCE_ANALYSIS: "/api/admin/maintenance/analysis";
1104
+ readonly MAINTENANCE_CLOUD_LOGS: "/api/admin/maintenance/cloud-logs";
1100
1105
  readonly MEDIA_LIST: "/api/admin/media";
1101
1106
  };
1102
1107
  readonly CHAT: {
@@ -1279,8 +1284,6 @@ export declare const API_ROUTES: {
1279
1284
  readonly ANALYTICS_ALERT_BY_ID: (id: string) => string;
1280
1285
  readonly STORE_CATEGORIES: "/api/store/categories";
1281
1286
  readonly STORE_CATEGORY_BY_ID: (id: string) => string;
1282
- readonly TEMPLATES: "/api/store/templates";
1283
- readonly TEMPLATE_BY_ID: (id: string) => string;
1284
1287
  readonly PAYOUT_METHODS: "/api/store/payout-methods";
1285
1288
  readonly PAYOUT_METHOD_BY_ID: (id: string) => string;
1286
1289
  readonly SHIPPING_CONFIGS: "/api/store/shipping-configs";
@@ -201,6 +201,8 @@ export const ADMIN_ENDPOINTS = {
201
201
  CAROUSEL: "/api/admin/carousel",
202
202
  CAROUSEL_BY_ID: (id) => `/api/admin/carousel/${id}`,
203
203
  CAROUSEL_REORDER: "/api/admin/carousel/reorder",
204
+ CAROUSELS: "/api/admin/carousels",
205
+ CAROUSELS_BY_ID: (id) => `/api/admin/carousels/${id}`,
204
206
  NAVIGATION: "/api/admin/navigation",
205
207
  NAVIGATION_BY_ID: (id) => `/api/admin/navigation/${id}`,
206
208
  ADMIN_SITE: "/api/admin/site",
@@ -229,6 +231,7 @@ export const ADMIN_ENDPOINTS = {
229
231
  ADMIN_FULFILLMENT: (storeId) => `/api/store/fulfillment?storeId=${encodeURIComponent(storeId)}`,
230
232
  CHECKOUT_BYPASS: "/api/admin/checkout-bypass",
231
233
  MAINTENANCE_ANALYSIS: "/api/admin/maintenance/analysis",
234
+ MAINTENANCE_CLOUD_LOGS: "/api/admin/maintenance/cloud-logs",
232
235
  MEDIA_LIST: "/api/admin/media",
233
236
  };
234
237
  // ---------------------------------------------------------------------------
@@ -501,8 +504,6 @@ export const SELLER_ENDPOINTS = {
501
504
  ANALYTICS_ALERT_BY_ID: (id) => `/api/store/analytics/alerts/${id}`,
502
505
  STORE_CATEGORIES: "/api/store/categories",
503
506
  STORE_CATEGORY_BY_ID: (id) => `/api/store/categories/${id}`,
504
- TEMPLATES: "/api/store/templates",
505
- TEMPLATE_BY_ID: (id) => `/api/store/templates/${id}`,
506
507
  PAYOUT_METHODS: "/api/store/payout-methods",
507
508
  PAYOUT_METHOD_BY_ID: (id) => `/api/store/payout-methods/${id}`,
508
509
  SHIPPING_CONFIGS: "/api/store/shipping-configs",
@@ -23,8 +23,7 @@ export interface OpenGatewayOptions {
23
23
  gatewayOrderId: string;
24
24
  /** Public key / publishable key for the gateway SDK. */
25
25
  publicKey: string;
26
- /** Amount in the gateway's smallest currency unit (e.g. paise, cents). */
27
- amount: number;
26
+ /** Amount in the gateway's smallest currency unit (e.g. paise, cents). */ amount: number;
28
27
  /** ISO 4217 currency code. */
29
28
  currency: string;
30
29
  /** Display name shown in the payment modal. */
@@ -1,19 +1,6 @@
1
1
  import React from "react";
2
- export interface AboutHowItem {
3
- title: string;
4
- text: string;
5
- icon: string;
6
- tone?: "indigo" | "teal" | "amber" | "rose";
7
- }
8
- export interface AboutValueItem {
9
- title: string;
10
- text: string;
11
- icon: string;
12
- }
13
- export interface AboutMilestone {
14
- year: string;
15
- text: string;
16
- }
2
+ import type { AboutHowItem, AboutValueItem, AboutMilestone, AboutTeamMember } from "../schemas/firestore";
3
+ export type { AboutHowItem, AboutValueItem, AboutMilestone, AboutTeamMember } from "../schemas/firestore";
17
4
  export interface AboutViewProps {
18
5
  labels?: {
19
6
  title?: string;
@@ -23,6 +10,8 @@ export interface AboutViewProps {
23
10
  howItWorksTitle?: string;
24
11
  valuesTitle?: string;
25
12
  milestonesTitle?: string;
13
+ teamTitle?: string;
14
+ teamSubtitle?: string;
26
15
  ctaTitle?: string;
27
16
  ctaSell?: string;
28
17
  ctaShop?: string;
@@ -30,8 +19,9 @@ export interface AboutViewProps {
30
19
  howItems?: AboutHowItem[];
31
20
  valueItems?: AboutValueItem[];
32
21
  milestones?: AboutMilestone[];
22
+ teamMembers?: AboutTeamMember[];
33
23
  ctaBannerClass?: string;
34
24
  /** Render the CTA action buttons */
35
25
  renderCtaButtons?: () => React.ReactNode;
36
26
  }
37
- export declare function AboutView({ labels, howItems, valueItems, milestones, ctaBannerClass, renderCtaButtons, }: AboutViewProps): React.JSX.Element;
27
+ export declare function AboutView({ labels, howItems, valueItems, milestones, teamMembers, ctaBannerClass, renderCtaButtons, }: AboutViewProps): React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Card, Div, Heading, Row, Section, Span, Stack, Text } from "../../../ui";
3
- export function AboutView({ labels = {}, howItems = [], valueItems = [], milestones = [], ctaBannerClass = "", renderCtaButtons, }) {
4
- return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "y-4xl", children: _jsxs(Div, { paddingX: "x-page", className: "max-w-4xl mx-auto text-center", children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-6", mdSize: "5xl", size: "4xl", weight: "bold", children: labels.title }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-2xl mx-auto", size: "xl", children: labels.subtitle })] }) }), _jsxs(Div, { paddingX: "x-page", className: "max-w-5xl mx-auto", padding: "y-4xl", children: [_jsxs(Section, { className: "text-center max-w-3xl mx-auto", children: [_jsx(Heading, { level: 2, className: "mb-4", children: labels.missionTitle }), _jsx(Text, { size: "lg", variant: "secondary", className: "leading-relaxed", children: labels.missionText })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.howItWorksTitle }), _jsx(Div, { className: "grid md:grid-cols-3", gap: "6", children: howItems.map(({ title, text, icon, tone }) => (_jsxs(Card, { variant: `gradient-${tone ?? "indigo"}`, padding: "md", spacing: "sm", children: [_jsx(Div, { children: _jsx(Span, { size: "4xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.valuesTitle }), _jsx(Div, { className: "grid md:grid-cols-3", gap: "5", children: valueItems.map(({ title, text, icon }) => (_jsxs(Stack, { gap: "3", surface: "default", padding: "lg", rounded: "xl", border: "default", children: [_jsx(Div, { children: _jsx(Span, { size: "3xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-10", align: "center", children: labels.milestonesTitle }), _jsx(Stack, { className: "relative border-l-2 border-primary/30 max-w-2xl mx-auto pl-[2rem]", gap: "xl", children: milestones.map(({ year, text }) => (_jsxs(Div, { className: "relative", children: [_jsx(Div, { className: "absolute -left-10 top-1 w-4 h-4 bg-primary border-2 border-white", rounded: "full" }), _jsx(Span, { size: "xs", weight: "bold", className: "text-primary tracking-wide", transform: "uppercase", children: year }), _jsx(Text, { className: "mt-1", children: text })] }, year))) })] }), _jsxs(Section, { color: "inverse", tone: "accent-banner", className: `text-center ${ctaBannerClass}`, padding: "xl", rounded: "2xl", children: [_jsx(Heading, { color: "inverse", level: 2, variant: "none", className: "mb-8", size: "3xl", weight: "bold", children: labels.ctaTitle }), renderCtaButtons ? (renderCtaButtons()) : (_jsx(Row, { justify: "center", gap: "3", wrap: true, children: _jsxs(Span, { color: "inverse", size: "sm", className: "/70", children: [labels.ctaSell, " \u00B7 ", labels.ctaShop] }) }))] })] })] }));
2
+ import { Avatar, Badge, Card, Div, Heading, Row, Section, Span, Stack, Text } from "../../../ui";
3
+ export function AboutView({ labels = {}, howItems = [], valueItems = [], milestones = [], teamMembers = [], ctaBannerClass = "", renderCtaButtons, }) {
4
+ return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "y-4xl", children: _jsxs(Div, { paddingX: "x-page", className: "max-w-4xl mx-auto text-center", children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-6", mdSize: "5xl", size: "4xl", weight: "bold", children: labels.title }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-2xl mx-auto", size: "xl", children: labels.subtitle })] }) }), _jsxs(Div, { paddingX: "x-page", className: "max-w-5xl mx-auto", padding: "y-4xl", children: [_jsxs(Section, { className: "text-center max-w-3xl mx-auto", children: [_jsx(Heading, { level: 2, className: "mb-4", children: labels.missionTitle }), _jsx(Text, { size: "lg", variant: "secondary", className: "leading-relaxed", children: labels.missionText })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.howItWorksTitle }), _jsx(Div, { className: "grid md:grid-cols-3", gap: "6", children: howItems.map(({ title, text, icon, tone }) => (_jsxs(Card, { variant: `gradient-${tone ?? "indigo"}`, padding: "md", spacing: "sm", children: [_jsx(Div, { children: _jsx(Span, { size: "4xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.valuesTitle }), _jsx(Div, { className: "grid md:grid-cols-3", gap: "5", children: valueItems.map(({ title, text, icon }) => (_jsxs(Stack, { gap: "3", surface: "default", padding: "lg", rounded: "xl", border: "default", children: [_jsx(Div, { children: _jsx(Span, { size: "3xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-10", align: "center", children: labels.milestonesTitle }), _jsx(Stack, { className: "relative border-l-2 border-primary/30 max-w-2xl mx-auto pl-[2rem]", gap: "xl", children: milestones.map(({ year, text }) => (_jsxs(Div, { className: "relative", children: [_jsx(Div, { className: "absolute -left-10 top-1 w-4 h-4 bg-primary border-2 border-white", rounded: "full" }), _jsx(Span, { size: "xs", weight: "bold", className: "text-primary tracking-wide", transform: "uppercase", children: year }), _jsx(Text, { className: "mt-1", children: text })] }, year))) })] }), teamMembers.length > 0 && (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-2", align: "center", children: labels.teamTitle }), labels.teamSubtitle && (_jsx(Text, { size: "lg", variant: "secondary", align: "center", className: "mb-12 max-w-2xl mx-auto", children: labels.teamSubtitle })), _jsx(Div, { className: "grid md:grid-cols-3", gap: "6", children: teamMembers.map((member) => (_jsxs(Stack, { gap: "3", surface: "default", padding: "lg", rounded: "xl", border: "default", align: "center", className: "text-center", children: [_jsx(Avatar, { src: member.photoUrl, name: member.name, alt: member.name, size: "lg" }), _jsx(Heading, { level: 3, children: member.name }), _jsxs(Row, { gap: "xs", wrap: true, justify: "center", children: [_jsx(Span, { size: "xs", weight: "bold", className: "text-primary tracking-wide", transform: "uppercase", children: member.role }), member.isFounder && _jsx(Badge, { variant: "primary", size: "xs", children: "Founder" }), member.isDeveloper && _jsx(Badge, { variant: "secondary", size: "xs", children: "Developer" })] }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: member.bio })] }, member.name))) })] })), _jsxs(Section, { color: "inverse", tone: "accent-banner", className: `text-center ${ctaBannerClass}`, padding: "xl", rounded: "2xl", children: [_jsx(Heading, { color: "inverse", level: 2, variant: "none", className: "mb-8", size: "3xl", weight: "bold", children: labels.ctaTitle }), renderCtaButtons ? (renderCtaButtons()) : (_jsx(Row, { justify: "center", gap: "3", wrap: true, children: _jsxs(Span, { color: "inverse", size: "sm", className: "/70", children: [labels.ctaSell, " \u00B7 ", labels.ctaShop] }) }))] })] })] }));
5
5
  }
@@ -65,6 +65,24 @@ export async function FeesView({} = {}) {
65
65
  who: t("paidByBuyer"),
66
66
  note: t("codHandlingFeeNote"),
67
67
  },
68
+ {
69
+ category: t("whatsappNotifyFeeTitle"),
70
+ rate: t("whatsappNotifyFeeRate"),
71
+ who: t("paidByBuyer"),
72
+ note: t("whatsappNotifyFeeNote"),
73
+ },
74
+ {
75
+ category: t("giftWrapFeeTitle"),
76
+ rate: t("giftWrapFeeRate"),
77
+ who: t("paidByBuyer"),
78
+ note: t("giftWrapFeeNote"),
79
+ },
80
+ {
81
+ category: t("shipmentProtectionFeeTitle"),
82
+ rate: t("shipmentProtectionFeeRate"),
83
+ who: t("paidByBuyer"),
84
+ note: t("shipmentProtectionFeeNote"),
85
+ },
68
86
  ];
69
87
  const OFFER_PAYOUT_ROWS = [
70
88
  { label: t("grossSale"), example: "₹1,000" },
@@ -1,5 +1,6 @@
1
1
  export { AboutView } from "./components/AboutView";
2
- export type { AboutViewProps, AboutHowItem, AboutValueItem, AboutMilestone, } from "./components/AboutView";
2
+ export type { AboutViewProps, AboutHowItem, AboutValueItem, AboutMilestone, AboutTeamMember, } from "./components/AboutView";
3
+ export type { AboutContentDocument } from "./schemas/firestore";
3
4
  export { TrackOrderView } from "./components/TrackOrderView";
4
5
  export type { TrackOrderViewProps } from "./components/TrackOrderView";
5
6
  export { FeesView } from "./components/FeesView";
@@ -0,0 +1,47 @@
1
+ /**
2
+ * About Us page content — stored at `siteSettings.aboutContent`
3
+ * (singleton doc, not its own collection). Replaces the previous untyped
4
+ * `Record<string, string>` shape that only covered 5 loose fields.
5
+ */
6
+ export interface AboutHowItem {
7
+ title: string;
8
+ text: string;
9
+ icon: string;
10
+ tone?: "indigo" | "teal" | "amber" | "rose";
11
+ }
12
+ export interface AboutValueItem {
13
+ title: string;
14
+ text: string;
15
+ icon: string;
16
+ }
17
+ export interface AboutMilestone {
18
+ year: string;
19
+ text: string;
20
+ }
21
+ export interface AboutTeamMember {
22
+ name: string;
23
+ role: string;
24
+ bio: string;
25
+ /** `/media/<slug>` proxy URL — never a raw Storage URL. */
26
+ photoUrl?: string;
27
+ isFounder?: boolean;
28
+ isDeveloper?: boolean;
29
+ }
30
+ export interface AboutContentDocument {
31
+ title: string;
32
+ subtitle: string;
33
+ missionTitle: string;
34
+ missionText: string;
35
+ howItWorksTitle: string;
36
+ howItems: AboutHowItem[];
37
+ valuesTitle: string;
38
+ valueItems: AboutValueItem[];
39
+ milestonesTitle: string;
40
+ milestones: AboutMilestone[];
41
+ teamTitle: string;
42
+ teamSubtitle: string;
43
+ teamMembers: AboutTeamMember[];
44
+ ctaTitle: string;
45
+ ctaSell: string;
46
+ ctaShop: string;
47
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * About Us page content — stored at `siteSettings.aboutContent`
3
+ * (singleton doc, not its own collection). Replaces the previous untyped
4
+ * `Record<string, string>` shape that only covered 5 loose fields.
5
+ */
6
+ export {};