@mohasinac/appkit 4.63.3 → 4.63.5

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 (179) hide show
  1. package/dist/.build-stamp.json +3 -3
  2. package/dist/_internal/server/features/checkout/actions.d.ts +2 -0
  3. package/dist/_internal/server/features/checkout/actions.js +22 -5
  4. package/dist/_internal/server/features/orders/adapters.js +3 -1
  5. package/dist/_internal/server/features/promotions/adapters.d.ts +25 -0
  6. package/dist/_internal/server/features/promotions/adapters.js +43 -0
  7. package/dist/_internal/server/features/promotions/data.d.ts +26 -0
  8. package/dist/_internal/server/features/promotions/data.js +45 -0
  9. package/dist/_internal/server/features/promotions/index.d.ts +2 -1
  10. package/dist/_internal/server/features/promotions/index.js +2 -1
  11. package/dist/_internal/server/features/site-settings/adapters.js +20 -2
  12. package/dist/_internal/server/features/stores/adapters.d.ts +1 -1
  13. package/dist/_internal/server/features/stores/adapters.js +1 -0
  14. package/dist/_internal/server/jobs/core/analyticsAlertEvaluate.js +5 -2
  15. package/dist/_internal/server/jobs/core/jobRunners.js +5 -0
  16. package/dist/_internal/server/jobs/core/onOrderCreate.js +104 -10
  17. package/dist/_internal/server/jobs/core/onOrderStatusChange.d.ts +2 -0
  18. package/dist/_internal/server/jobs/core/onOrderStatusChange.js +1 -0
  19. package/dist/_internal/server/jobs/core/onScamReportCreate.js +1 -0
  20. package/dist/_internal/server/jobs/core/onScamReportRejected.js +1 -0
  21. package/dist/_internal/server/jobs/core/onScamReportVerified.js +1 -0
  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/triggerEventRaffle.js +45 -14
  25. package/dist/_internal/server/jobs/core/whatsappNotify.d.ts +35 -0
  26. package/dist/_internal/server/jobs/core/whatsappNotify.js +140 -0
  27. package/dist/_internal/server/notifications/channel-health.d.ts +8 -6
  28. package/dist/_internal/server/notifications/channel-health.js +2 -2
  29. package/dist/_internal/server/notifications/send-guard.d.ts +1 -1
  30. package/dist/_internal/server/notifications/send-guard.js +4 -2
  31. package/dist/_internal/shared/actions/action-registry.js +28 -0
  32. package/dist/_internal/shared/checkout/order-math.d.ts +1 -1
  33. package/dist/_internal/shared/checkout/order-math.js +1 -1
  34. package/dist/_internal/shared/features/checkout/config.d.ts +2 -0
  35. package/dist/_internal/shared/features/checkout/config.js +2 -0
  36. package/dist/_internal/shared/features/messaging/config.d.ts +5 -7
  37. package/dist/_internal/shared/features/messaging/config.js +4 -1
  38. package/dist/_internal/shared/features/site-settings/fees.d.ts +2 -0
  39. package/dist/_internal/shared/features/site-settings/fees.js +2 -0
  40. package/dist/_internal/shared/features/site-settings/types.d.ts +27 -2
  41. package/dist/_internal/shared/fees/calculator.d.ts +8 -0
  42. package/dist/_internal/shared/fees/calculator.js +7 -0
  43. package/dist/cli/index.js +2 -0
  44. package/dist/client.d.ts +2 -2
  45. package/dist/client.js +1 -1
  46. package/dist/constants/api-endpoints.d.ts +15 -0
  47. package/dist/constants/api-endpoints.js +8 -0
  48. package/dist/constants/field-names.d.ts +4 -0
  49. package/dist/constants/field-names.js +4 -0
  50. package/dist/constants/notification-types.d.ts +1 -1
  51. package/dist/constants/notification-types.js +1 -1
  52. package/dist/core/integration-keys.d.ts +5 -0
  53. package/dist/core/integration-keys.js +10 -0
  54. package/dist/features/about/components/FeesView.js +6 -0
  55. package/dist/features/account/components/BuyerShoppingGuideView.js +1 -1
  56. package/dist/features/account/components/NotificationPreferencesPanel.js +4 -3
  57. package/dist/features/account/components/UserSidebar.js +1 -1
  58. package/dist/features/account/types/index.d.ts +2 -0
  59. package/dist/features/admin/actions/notification-actions.d.ts +17 -2
  60. package/dist/features/admin/actions/notification-actions.js +154 -9
  61. package/dist/features/admin/components/AdminBlogEditorView.js +10 -2
  62. package/dist/features/admin/components/AdminOrderEditorView.d.ts +1 -1
  63. package/dist/features/admin/components/AdminOrdersView.js +2 -0
  64. package/dist/features/admin/components/AdminSiteSettingsView.js +66 -6
  65. package/dist/features/admin/components/AdminStoreEditorView.js +1 -0
  66. package/dist/features/admin/constants/site-settings-tabs.d.ts +12 -7
  67. package/dist/features/admin/constants/site-settings-tabs.js +12 -6
  68. package/dist/features/admin/repository/site-settings.repository.js +1 -1
  69. package/dist/features/admin/schemas/admin-user-form.d.ts +61 -0
  70. package/dist/features/admin/schemas/admin-user-form.js +44 -3
  71. package/dist/features/admin/schemas/firestore.d.ts +73 -0
  72. package/dist/features/admin/schemas/firestore.js +8 -3
  73. package/dist/features/auth/checkout-value-otp.d.ts +1 -1
  74. package/dist/features/auth/checkout-value-otp.js +1 -1
  75. package/dist/features/auth/permissions/constants.d.ts +2 -2
  76. package/dist/features/auth/permissions/constants.js +2 -1
  77. package/dist/features/blog/schemas/blog-form.d.ts +3 -0
  78. package/dist/features/blog/schemas/blog-form.js +14 -0
  79. package/dist/features/blog/schemas/firestore.d.ts +17 -0
  80. package/dist/features/blog/schemas/firestore.js +1 -0
  81. package/dist/features/blog/schemas/index.d.ts +6 -0
  82. package/dist/features/blog/schemas/index.js +3 -0
  83. package/dist/features/blog/types/index.d.ts +2 -0
  84. package/dist/features/cart/components/CartPriceBreakdown.d.ts +2 -0
  85. package/dist/features/cart/components/CartPriceBreakdown.js +1 -1
  86. package/dist/features/cart/components/StoreAddonsPicker.d.ts +5 -2
  87. package/dist/features/cart/components/StoreAddonsPicker.js +5 -4
  88. package/dist/features/cart/repository/cart.repository.js +2 -1
  89. package/dist/features/cart/schemas/firestore.d.ts +2 -1
  90. package/dist/features/checkout/actions/checkout-value-otp-actions.d.ts +5 -10
  91. package/dist/features/checkout/actions/checkout-value-otp-actions.js +88 -2
  92. package/dist/features/events/components/AdminEventEditorView.js +64 -9
  93. package/dist/features/events/components/EventOfferCard.js +3 -18
  94. package/dist/features/events/components/EventRaffleWinnerView.d.ts +6 -0
  95. package/dist/features/events/components/EventRaffleWinnerView.js +11 -1
  96. package/dist/features/events/schemas/event-form.d.ts +10 -0
  97. package/dist/features/events/schemas/event-form.js +19 -0
  98. package/dist/features/events/schemas/firestore.d.ts +68 -0
  99. package/dist/features/events/schemas/firestore.js +25 -0
  100. package/dist/features/events/schemas/index.d.ts +7 -0
  101. package/dist/features/events/schemas/index.js +5 -0
  102. package/dist/features/events/types/index.d.ts +4 -0
  103. package/dist/features/homepage/lib/section-renderer.js +1 -1
  104. package/dist/features/orders/actions/refund-actions.js +1 -0
  105. package/dist/features/orders/components/OrderAddonBadges.d.ts +3 -1
  106. package/dist/features/orders/components/OrderAddonBadges.js +4 -3
  107. package/dist/features/orders/repository/orders.repository.d.ts +8 -0
  108. package/dist/features/orders/repository/orders.repository.js +2 -0
  109. package/dist/features/orders/schemas/firestore.d.ts +4 -0
  110. package/dist/features/orders/types/index.d.ts +5 -2
  111. package/dist/features/promotions/components/AttachedCouponsSection.d.ts +30 -0
  112. package/dist/features/promotions/components/AttachedCouponsSection.js +99 -0
  113. package/dist/features/promotions/components/CouponCodeCopyRow.d.ts +19 -0
  114. package/dist/features/promotions/components/CouponCodeCopyRow.js +39 -0
  115. package/dist/features/promotions/components/index.d.ts +4 -0
  116. package/dist/features/promotions/components/index.js +2 -0
  117. package/dist/features/promotions/constants/attached-coupons.d.ts +55 -0
  118. package/dist/features/promotions/constants/attached-coupons.js +24 -0
  119. package/dist/features/promotions/repository/coupons.repository.d.ts +20 -0
  120. package/dist/features/promotions/repository/coupons.repository.js +39 -0
  121. package/dist/features/promotions/schemas/attached-coupons.d.ts +39 -0
  122. package/dist/features/promotions/schemas/attached-coupons.js +66 -0
  123. package/dist/features/search/action-index/settings-entries.js +9 -0
  124. package/dist/features/store-extensions/repository/store-extensions.repositories.d.ts +6 -1
  125. package/dist/features/store-extensions/repository/store-extensions.repositories.js +10 -1
  126. package/dist/features/store-extensions/schemas/firestore.d.ts +17 -1
  127. package/dist/features/store-extensions/schemas/firestore.js +10 -0
  128. package/dist/features/stores/components/StoreCapabilitiesGuideView.js +1 -0
  129. package/dist/features/stores/components/StoreGuideHubView.js +1 -1
  130. package/dist/features/stores/components/StoreSettingsGuideView.js +6 -2
  131. package/dist/features/stores/repository/store.repository.d.ts +23 -1
  132. package/dist/features/stores/repository/store.repository.js +29 -1
  133. package/dist/features/stores/schemas/firestore.d.ts +16 -6
  134. package/dist/features/stores/schemas/firestore.js +3 -6
  135. package/dist/features/stores/schemas/index.d.ts +86 -0
  136. package/dist/features/stores/schemas/index.js +14 -0
  137. package/dist/features/whatsapp-bot/api/send-status/route.d.ts +12 -0
  138. package/dist/features/whatsapp-bot/api/send-status/route.js +38 -0
  139. package/dist/features/whatsapp-bot/api/webhook/route.d.ts +12 -0
  140. package/dist/features/whatsapp-bot/api/webhook/route.js +43 -0
  141. package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.d.ts +57 -0
  142. package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +76 -0
  143. package/dist/features/whatsapp-bot/components/WhatsAppChatButton.d.ts +9 -0
  144. package/dist/features/whatsapp-bot/components/WhatsAppChatButton.js +7 -0
  145. package/dist/features/whatsapp-bot/components/index.d.ts +3 -0
  146. package/dist/features/whatsapp-bot/components/index.js +2 -0
  147. package/dist/features/whatsapp-bot/helpers/whatsapp.d.ts +52 -0
  148. package/dist/features/whatsapp-bot/helpers/whatsapp.js +288 -0
  149. package/dist/features/whatsapp-bot/index.d.ts +3 -0
  150. package/dist/features/whatsapp-bot/index.js +3 -0
  151. package/dist/features/whatsapp-bot/manifest.d.ts +2 -0
  152. package/dist/features/whatsapp-bot/manifest.js +13 -0
  153. package/dist/features/whatsapp-bot/messages/en.json +7 -0
  154. package/dist/features/whatsapp-bot/server.d.ts +7 -0
  155. package/dist/features/whatsapp-bot/server.js +7 -0
  156. package/dist/features/whatsapp-bot/types/index.d.ts +126 -0
  157. package/dist/features/whatsapp-bot/types/index.js +1 -0
  158. package/dist/index.d.ts +23 -6
  159. package/dist/index.js +38 -12
  160. package/dist/next/routing/route-map.d.ts +3 -0
  161. package/dist/next/routing/route-map.js +1 -0
  162. package/dist/providers/db-firebase/base.repository.d.ts +1 -1
  163. package/dist/providers/db-firebase/base.repository.js +1 -1
  164. package/dist/repositories/index.d.ts +1 -1
  165. package/dist/repositories/index.js +1 -1
  166. package/dist/schemas/registry.d.ts +121 -0
  167. package/dist/schemas/registry.js +2 -1
  168. package/dist/security/pii-encrypt.js +1 -1
  169. package/dist/server-entry.d.ts +1 -0
  170. package/dist/server-entry.js +2 -0
  171. package/dist/server.d.ts +11 -2
  172. package/dist/server.js +26 -2
  173. package/dist/styles.css +1 -1
  174. package/dist/tailwind-utilities.css +1 -1
  175. package/dist/ui/components/NavigationLoader.d.ts +14 -1
  176. package/dist/ui/components/NavigationLoader.js +79 -30
  177. package/package.json +1 -1
  178. package/dist/features/orders/utils/order-announcement-message.d.ts +0 -18
  179. package/dist/features/orders/utils/order-announcement-message.js +0 -16
@@ -0,0 +1,126 @@
1
+ export interface CheckoutMessageInput {
2
+ waNumber: string;
3
+ cart: Array<{
4
+ name: string;
5
+ qty: number;
6
+ salePrice: number;
7
+ }>;
8
+ total: number;
9
+ address: {
10
+ name: string;
11
+ phone: string;
12
+ line1: string;
13
+ line2?: string;
14
+ city: string;
15
+ pincode: string;
16
+ };
17
+ isPreorder?: boolean;
18
+ }
19
+ export interface StatusNotificationInput {
20
+ userPhone: string;
21
+ template: string;
22
+ vars: Record<string, string>;
23
+ }
24
+ export interface WebhookVerifyInput {
25
+ payload: string;
26
+ signature: string;
27
+ secret: string;
28
+ }
29
+ export interface IncomingWebhookPayload {
30
+ /** Digits-only phone number, e.g. "919876543210" */
31
+ from: string;
32
+ body: string;
33
+ }
34
+ export interface SendWhatsAppInput {
35
+ /** Digits-only phone number, e.g. "919876543210" */
36
+ toPhone: string;
37
+ message: string;
38
+ accountSid: string;
39
+ authToken: string;
40
+ /** Twilio from number, e.g. "whatsapp:+14155238886" */
41
+ fromNumber: string;
42
+ }
43
+ /** Input for sending a message via Meta WhatsApp Business Cloud API. */
44
+ export interface WaBusinessSendInput {
45
+ /** Digits-only phone number with country code, e.g. "919876543210" */
46
+ toPhone: string;
47
+ message: string;
48
+ /** Meta Phone Number ID (from Meta for Developers > App > WhatsApp > API Setup) */
49
+ phoneNumberId: string;
50
+ /** Meta system user access token */
51
+ accessToken: string;
52
+ }
53
+ /**
54
+ * Input for sending a pre-approved Meta message TEMPLATE. Required for any
55
+ * business-initiated WhatsApp send outside the 24h customer-service window —
56
+ * Meta rejects free-form `type: "text"` sends in that case.
57
+ */
58
+ export interface WaBusinessTemplateSendInput {
59
+ /** Digits-only phone number with country code, e.g. "919876543210" */
60
+ toPhone: string;
61
+ /** Meta Phone Number ID (from Meta for Developers > App > WhatsApp > API Setup) */
62
+ phoneNumberId: string;
63
+ /** Meta system user access token */
64
+ accessToken: string;
65
+ /** Exact approved template name from Meta WhatsApp Manager (not the display label). */
66
+ templateName: string;
67
+ /** BCP-47 language code the template was approved in, e.g. "en" or "en_US". */
68
+ languageCode: string;
69
+ /** Positional {{1}}, {{2}}… body parameters, in order. */
70
+ bodyParams?: string[];
71
+ }
72
+ /** A product mapped to the Meta Commerce API catalog item format. */
73
+ export interface CatalogSyncProduct {
74
+ /** Firestore product ID — used as Meta `retailer_id` */
75
+ id: string;
76
+ title: string;
77
+ description: string;
78
+ /** Price in decimal rupees */
79
+ price: number;
80
+ currency: string;
81
+ /** URL of the first product image */
82
+ imageUrl: string;
83
+ availability: "in stock" | "out of stock";
84
+ condition: "new" | "used" | "refurbished";
85
+ /** Canonical product page URL, e.g. /products/{slug} */
86
+ link?: string;
87
+ }
88
+ export interface CatalogSyncInput {
89
+ catalogId: string;
90
+ /** Meta access token with catalog management permission */
91
+ accessToken: string;
92
+ products: CatalogSyncProduct[];
93
+ }
94
+ export interface CatalogSyncResult {
95
+ /** Meta batch request handles */
96
+ handles: string[];
97
+ successCount: number;
98
+ failureCount: number;
99
+ errors: string[];
100
+ }
101
+ /** Input for building a purchase announcement message. */
102
+ export interface PurchaseAnnouncementInput {
103
+ buyerName: string;
104
+ firstItemName: string;
105
+ /** 0 if only one item in the order */
106
+ additionalItemCount: number;
107
+ /** Total order amount in decimal rupees */
108
+ totalAmount: number;
109
+ orderId: string;
110
+ }
111
+ /** Tier PP — input for building the payment-proof fast-review WhatsApp message (admin push + buyer/seller share link). */
112
+ export interface PaymentProofReviewMessageInput {
113
+ orderId: string;
114
+ buyerName: string;
115
+ productTitle: string;
116
+ totalAmount: number;
117
+ reviewUrl: string;
118
+ }
119
+ /** Known order status values — extend as needed per project. */
120
+ export type OrderStatusKey = "pending_payment" | "payment_confirmed" | "processing" | "shipped" | "out_for_delivery" | "delivered" | "cancelled" | "refund_initiated" | string;
121
+ export interface StatusMessageInput {
122
+ orderId: string;
123
+ status: OrderStatusKey;
124
+ trackingNumber?: string;
125
+ courierName?: string;
126
+ }
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.d.ts CHANGED
@@ -479,7 +479,7 @@ export type { RateLimitConfig } from "./security/index";
479
479
  export type { RateLimitResult } from "./security/index";
480
480
  export type { UserRole } from "./security/index";
481
481
  export { AddressesRepository } from "./repositories/index";
482
- export { type PayoutMethodType, type PayoutMethodDocument, PAYOUT_METHODS_COLLECTION, PAYOUT_METHOD_INDEXED_FIELDS, DEFAULT_PAYOUT_METHOD_DATA, type ShippingMethod as ShippingConfigMethod, type ShippingConfigDocument, SHIPPING_CONFIGS_COLLECTION, SHIPPING_CONFIG_INDEXED_FIELDS, DEFAULT_SHIPPING_CONFIG_DATA, type AnalyticsScope, type AnalyticsCardType, type AnalyticsCardDocument, ANALYTICS_CARDS_COLLECTION, ANALYTICS_CARD_INDEXED_FIELDS, DEFAULT_ANALYTICS_CARD_DATA, type AlertOperator, type AnalyticsAlertDocument, ANALYTICS_ALERTS_COLLECTION, ANALYTICS_ALERT_INDEXED_FIELDS, DEFAULT_ANALYTICS_ALERT_DATA, type StoreCategoryDocument, storeCategoryFormSchema, storeCategoryCreateSchema, storeCategoryUpdateSchema, type StoreCategoryFormValues, listingTemplateFormSchema, listingTemplateCreateSchema, listingTemplateUpdateSchema, type ListingTemplateFormValues, LISTING_TEMPLATE_TYPES, LISTING_TEMPLATE_TYPE_OPTIONS, payoutMethodFormSchema, payoutMethodCreateSchema, payoutMethodUpdateSchema, type PayoutMethodFormValues, shippingConfigFormSchema, SHIPPING_METHOD_OPTIONS, shippingConfigCreateSchema, shippingConfigUpdateSchema, type ShippingConfigFormValues, customRoleFormSchema, customRoleCreateSchema, customRoleUpdateSchema, isKnownPermission, type CustomRoleFormValues, moderationReviewFormSchema, moderationReviewUpdateSchema, MODERATION_REVIEWER_STATUSES, type ModerationReviewFormValues, reportReviewFormSchema, reportReviewUpdateSchema, REPORT_REVIEWER_STATUSES, REPORT_TERMINAL_STATUSES, type ReportReviewFormValues, reportCreateSchema, type ReportCreateValues, itemRequestCreateSchema, type ItemRequestCreateValues, REPORT_ENTITY_TYPES, REPORT_REASONS, analyticsAlertCreateSchema, type AnalyticsAlertCreateValues, analyticsCardCreateSchema, type AnalyticsCardCreateValues, ANALYTICS_ALERT_OPERATORS, ANALYTICS_CARD_TYPES, storeGoogleConfigUpdateSchema, type StoreGoogleConfigFormValues, toSellerGoogleConfig, type SellerGoogleConfig, adminNotificationCreateSchema, type AdminNotificationCreateValues, ADMIN_NOTIFICATION_CATEGORIES, ADMIN_NOTIFICATION_SEVERITIES, STORE_CATEGORIES_COLLECTION, STORE_CATEGORY_INDEXED_FIELDS, DEFAULT_STORE_CATEGORY_DATA, type ListingTemplateType, type ListingTemplateDocument, LISTING_TEMPLATES_COLLECTION, LISTING_TEMPLATE_INDEXED_FIELDS, DEFAULT_LISTING_TEMPLATE_DATA, type ModerationStatus, type ModerationMediaType, type ModerationQueueDocument, MODERATION_QUEUE_COLLECTION, MODERATION_QUEUE_INDEXED_FIELDS, DEFAULT_MODERATION_QUEUE_DATA, type ReportEntityType, type ReportStatus, type ReportReason, type ReportDocument, REPORTS_COLLECTION, REPORT_INDEXED_FIELDS, DEFAULT_REPORT_DATA, type AdminNotificationCategory, type AdminNotificationDocument, ADMIN_NOTIFICATIONS_COLLECTION, ADMIN_NOTIFICATION_INDEXED_FIELDS, DEFAULT_ADMIN_NOTIFICATION_DATA, type ItemRequestStatus, type ItemRequestReply, type ItemRequestDocument, ITEM_REQUESTS_COLLECTION, ITEM_REQUEST_INDEXED_FIELDS, DEFAULT_ITEM_REQUEST_DATA, type StoreGoogleConfigDocument, STORE_GOOGLE_CONFIG_COLLECTION, STORE_GOOGLE_CONFIG_INDEXED_FIELDS, DEFAULT_STORE_GOOGLE_CONFIG_DATA, type CustomRoleDocument, CUSTOM_ROLES_COLLECTION, CUSTOM_ROLE_INDEXED_FIELDS, DEFAULT_CUSTOM_ROLE_DATA, type RoleOverrideDocument, ROLE_OVERRIDES_COLLECTION, ROLE_OVERRIDE_INDEXED_FIELDS, DEFAULT_ROLE_OVERRIDE_DATA, PayoutMethodsRepository, ShippingConfigsRepository, AnalyticsCardsRepository, AnalyticsAlertsRepository, StoreCategoriesRepository, ListingTemplatesRepository, ModerationQueueRepository, ReportsRepository, AdminNotificationsRepository, ItemRequestsRepository, StoreGoogleConfigRepository, CustomRolesRepository, RoleOverridesRepository, payoutMethodsRepository, shippingConfigsRepository, analyticsCardsRepository, analyticsAlertsRepository, storeCategoriesRepository, listingTemplatesRepository, moderationQueueRepository, reportsRepository, adminNotificationsRepository, itemRequestsRepository, storeGoogleConfigRepository, customRolesRepository, roleOverridesRepository, } from "./features/store-extensions/index";
482
+ export { type PayoutMethodType, type PayoutMethodDocument, PAYOUT_METHODS_COLLECTION, PAYOUT_METHOD_INDEXED_FIELDS, DEFAULT_PAYOUT_METHOD_DATA, type ShippingMethod as ShippingConfigMethod, type ShippingConfigDocument, SHIPPING_CONFIGS_COLLECTION, SHIPPING_CONFIG_INDEXED_FIELDS, DEFAULT_SHIPPING_CONFIG_DATA, type AnalyticsScope, type AnalyticsCardType, type AnalyticsCardDocument, ANALYTICS_CARDS_COLLECTION, ANALYTICS_CARD_INDEXED_FIELDS, DEFAULT_ANALYTICS_CARD_DATA, type AlertOperator, type AnalyticsAlertDocument, ANALYTICS_ALERTS_COLLECTION, ANALYTICS_ALERT_INDEXED_FIELDS, DEFAULT_ANALYTICS_ALERT_DATA, type StoreCategoryDocument, storeCategoryFormSchema, storeCategoryCreateSchema, storeCategoryUpdateSchema, type StoreCategoryFormValues, listingTemplateFormSchema, listingTemplateCreateSchema, listingTemplateUpdateSchema, type ListingTemplateFormValues, LISTING_TEMPLATE_TYPES, LISTING_TEMPLATE_TYPE_OPTIONS, payoutMethodFormSchema, payoutMethodCreateSchema, payoutMethodUpdateSchema, type PayoutMethodFormValues, shippingConfigFormSchema, SHIPPING_METHOD_OPTIONS, shippingConfigCreateSchema, shippingConfigUpdateSchema, type ShippingConfigFormValues, customRoleFormSchema, customRoleCreateSchema, customRoleUpdateSchema, isKnownPermission, type CustomRoleFormValues, moderationReviewFormSchema, moderationReviewUpdateSchema, MODERATION_REVIEWER_STATUSES, type ModerationReviewFormValues, reportReviewFormSchema, reportReviewUpdateSchema, REPORT_REVIEWER_STATUSES, REPORT_TERMINAL_STATUSES, type ReportReviewFormValues, reportCreateSchema, type ReportCreateValues, itemRequestCreateSchema, type ItemRequestCreateValues, REPORT_ENTITY_TYPES, REPORT_REASONS, analyticsAlertCreateSchema, type AnalyticsAlertCreateValues, analyticsCardCreateSchema, type AnalyticsCardCreateValues, ANALYTICS_ALERT_OPERATORS, ANALYTICS_CARD_TYPES, storeGoogleConfigUpdateSchema, type StoreGoogleConfigFormValues, toSellerGoogleConfig, type SellerGoogleConfig, adminNotificationCreateSchema, type AdminNotificationCreateValues, ADMIN_NOTIFICATION_CATEGORIES, ADMIN_NOTIFICATION_SEVERITIES, STORE_CATEGORIES_COLLECTION, STORE_CATEGORY_INDEXED_FIELDS, DEFAULT_STORE_CATEGORY_DATA, type ListingTemplateType, type ListingTemplateDocument, LISTING_TEMPLATES_COLLECTION, LISTING_TEMPLATE_INDEXED_FIELDS, DEFAULT_LISTING_TEMPLATE_DATA, type ModerationStatus, type ModerationMediaType, type ModerationQueueDocument, MODERATION_QUEUE_COLLECTION, MODERATION_QUEUE_INDEXED_FIELDS, DEFAULT_MODERATION_QUEUE_DATA, type ReportEntityType, type ReportStatus, type ReportReason, type ReportDocument, REPORTS_COLLECTION, REPORT_INDEXED_FIELDS, DEFAULT_REPORT_DATA, type AdminNotificationCategory, type AdminNotificationDocument, ADMIN_NOTIFICATIONS_COLLECTION, ADMIN_NOTIFICATION_INDEXED_FIELDS, DEFAULT_ADMIN_NOTIFICATION_DATA, type ItemRequestStatus, type ItemRequestReply, type ItemRequestDocument, ITEM_REQUESTS_COLLECTION, ITEM_REQUEST_INDEXED_FIELDS, DEFAULT_ITEM_REQUEST_DATA, type StoreGoogleConfigDocument, STORE_GOOGLE_CONFIG_COLLECTION, STORE_GOOGLE_CONFIG_INDEXED_FIELDS, DEFAULT_STORE_GOOGLE_CONFIG_DATA, type StoreWhatsAppConfigDocument, STORE_WHATSAPP_CONFIG_COLLECTION, STORE_WHATSAPP_CONFIG_INDEXED_FIELDS, DEFAULT_STORE_WHATSAPP_CONFIG_DATA, type CustomRoleDocument, CUSTOM_ROLES_COLLECTION, CUSTOM_ROLE_INDEXED_FIELDS, DEFAULT_CUSTOM_ROLE_DATA, type RoleOverrideDocument, ROLE_OVERRIDES_COLLECTION, ROLE_OVERRIDE_INDEXED_FIELDS, DEFAULT_ROLE_OVERRIDE_DATA, PayoutMethodsRepository, ShippingConfigsRepository, AnalyticsCardsRepository, AnalyticsAlertsRepository, StoreCategoriesRepository, ListingTemplatesRepository, ModerationQueueRepository, ReportsRepository, AdminNotificationsRepository, ItemRequestsRepository, StoreGoogleConfigRepository, StoreWhatsAppConfigRepository, CustomRolesRepository, RoleOverridesRepository, payoutMethodsRepository, shippingConfigsRepository, analyticsCardsRepository, analyticsAlertsRepository, storeCategoriesRepository, listingTemplatesRepository, moderationQueueRepository, reportsRepository, adminNotificationsRepository, itemRequestsRepository, storeGoogleConfigRepository, storeWhatsAppConfigRepository, customRolesRepository, roleOverridesRepository, } from "./features/store-extensions/index";
483
483
  export { BaseRepository } from "./repositories/index";
484
484
  export { BlogRepository } from "./repositories/index";
485
485
  export { CartRepository } from "./repositories/index";
@@ -2195,12 +2195,12 @@ export { actionTracker, setActionTrackerSink, resetActionTrackerSink, type Actio
2195
2195
  export { cartRequiresShipping, cartIsDigitalOnly, cartIsChatOnly, } from "./_internal/shared/listing-types/cart-shipping";
2196
2196
  export { ACTIONS, action, act, canPerformAction, actionsForListingType, actionLabel, type ActionDef, type ActionKind, type ActionResource, type ActionTree, type ActionConfirmation, } from "./_internal/shared/actions/action-registry";
2197
2197
  export { buildBulkAction } from "./_internal/shared/actions/bulk-helpers";
2198
- export { computeCheckoutFees, allocateCheckoutFees, computePayoutDeduction, computeCodHandlingFee, computeGiftWrapFee, computeShipmentProtectionFee, computeSaleProtectionFee, calculateGst, } from "./_internal/shared/fees/calculator";
2198
+ export { computeCheckoutFees, allocateCheckoutFees, computePayoutDeduction, computeCodHandlingFee, computeWhatsAppNotifyFee, computeGiftWrapFee, computeShipmentProtectionFee, computeSaleProtectionFee, calculateGst, } from "./_internal/shared/fees/calculator";
2199
2199
  export { searchPriceIndex, PRICE_INDEX_SEARCH_LIMIT, PRICE_INDEX_MIN_QUERY_LENGTH } from "./_internal/server/features/price-index/search";
2200
2200
  export type { PriceIndexSearchResponse, PriceIndexSearchResult, PriceIndexSearchResultBand, } from "./_internal/server/features/price-index/search";
2201
2201
  export { protectionAvailability, computeProtectionFees, adjudicateClaim, badgesFor, showsRiskNotice, showsSafetyBadge, returnDestination, rtoDestination, PROTECTION_KINDS, } from "./_internal/shared/features/shipping/protections";
2202
2202
  export type { ProtectionKind, ProtectionAvailability, ProtectionTierInput, ProtectionUnavailableReason, ClaimFinding, ClaimOutcome, } from "./_internal/shared/features/shipping/protections";
2203
- export type { FeeCommissionRates, CheckoutFees, PayoutDeduction, CodHandlingFeeRates, GiftWrapFeeRates, ShipmentProtectionFeeRates, SaleProtectionFeeRates, GstBreakdown, } from "./_internal/shared/fees/calculator";
2203
+ export type { FeeCommissionRates, CheckoutFees, PayoutDeduction, CodHandlingFeeRates, WhatsAppNotifyFeeRates, GiftWrapFeeRates, ShipmentProtectionFeeRates, SaleProtectionFeeRates, GstBreakdown, } from "./_internal/shared/fees/calculator";
2204
2204
  export { checkEmiEligibility, computeEmiSchedule, computeBuyerEmiQuote } from "./_internal/shared/features/emi/schedule";
2205
2205
  export type { BuyerEmiQuote } from "./_internal/shared/features/emi/schedule";
2206
2206
  export { amountDueNow, groupEmiGate, groupEmiQuote, groupEmiSchedule, emiOrderFields } from "./_internal/shared/features/emi/group";
@@ -2700,8 +2700,25 @@ export { updateStoreAddressForSeller } from "./features/stores/server";
2700
2700
  export type { StoreContentParams } from "./features/stores/server";
2701
2701
  export type { StoreQueryListParams } from "./features/stores/server";
2702
2702
  export type { StoreReviewsResult } from "./features/stores/server";
2703
- export { buildPaymentProofReviewMessage } from "./features/orders/utils/payment-proof-message";
2704
- export type { PaymentProofReviewMessageInput } from "./features/orders/utils/payment-proof-message";
2703
+ export { WhatsAppChatButton } from "./features/whatsapp-bot/index";
2704
+ export { SellerWhatsAppSettingsView } from "./features/whatsapp-bot/index";
2705
+ export type { SellerWhatsAppSettingsViewProps } from "./features/whatsapp-bot/index";
2706
+ export type { CheckoutMessageInput } from "./features/whatsapp-bot/index";
2707
+ export type { IncomingWebhookPayload } from "./features/whatsapp-bot/index";
2708
+ export type { OrderStatusKey } from "./features/whatsapp-bot/index";
2709
+ export type { SendWhatsAppInput } from "./features/whatsapp-bot/index";
2710
+ export type { StatusMessageInput } from "./features/whatsapp-bot/index";
2711
+ export type { StatusNotificationInput } from "./features/whatsapp-bot/index";
2712
+ export type { WebhookVerifyInput } from "./features/whatsapp-bot/index";
2713
+ export { buildCheckoutMessageURL } from "./features/whatsapp-bot/server";
2714
+ export { buildStatusMessage } from "./features/whatsapp-bot/server";
2715
+ export { buildStatusNotificationURL } from "./features/whatsapp-bot/server";
2716
+ export { buildPaymentProofReviewMessage } from "./features/whatsapp-bot/server";
2717
+ export { isAdminNumber } from "./features/whatsapp-bot/server";
2718
+ export { parseIncomingWebhookPayload } from "./features/whatsapp-bot/server";
2719
+ export { sendWhatsAppMessage } from "./features/whatsapp-bot/server";
2720
+ export { sendWhatsAppBusinessMessage, syncProductsToCatalog, buildPurchaseAnnouncementMessage, buildGroupShareLink } from "./features/whatsapp-bot/server";
2721
+ export type { WaBusinessSendInput, CatalogSyncProduct, CatalogSyncInput, CatalogSyncResult, PurchaseAnnouncementInput } from "./features/whatsapp-bot/index";
2705
2722
  export { WishlistCard } from "./features/wishlist/index";
2706
2723
  export { WishlistPage } from "./features/wishlist/index";
2707
2724
  export { WishlistHeartButton } from "./features/wishlist/index";
@@ -3015,7 +3032,7 @@ export { sublistingCategoryFormSchema } from "./features/store-extensions/schema
3015
3032
  export { adminStoreUpdateSchema, announcementBarSchema, } from "./features/admin/schemas/admin-editor-forms";
3016
3033
  export { adminOrderUpdateSchema, employeeInviteSchema, hardBanReasonSchema, featureFlagsUpdateSchema, adminAdFormSchema, } from "./features/admin/schemas/admin-ops-forms";
3017
3034
  export { changeEmailSchema } from "./features/account/schemas/index";
3018
- export { adminUserUpdateSchema, lotteryPullSchema, } from "./features/admin/schemas/admin-user-form";
3035
+ export { adminUserUpdateSchema, whatsappSettingsSchema, lotteryPullSchema, } from "./features/admin/schemas/admin-user-form";
3019
3036
  export { siteSettingsFormSchema } from "./features/admin/schemas/site-settings-form";
3020
3037
  export { createReviewSchema as reviewSubmitSchema } from "./_internal/shared/features/reviews/schema";
3021
3038
  export { wishlistAddSchema } from "./schemas/api-routes";
package/dist/index.js CHANGED
@@ -903,11 +903,11 @@ export { requireRole } from "./security/index.js";
903
903
  // AddressesRepository - unified top-level addresses collection (SB-UNI-A 2026-05-13).
904
904
  export { AddressesRepository } from "./repositories/index.js";
905
905
  // S-STORE foundation — 14 schemas + 14 repositories + RBAC.
906
- export { PAYOUT_METHODS_COLLECTION, PAYOUT_METHOD_INDEXED_FIELDS, DEFAULT_PAYOUT_METHOD_DATA, SHIPPING_CONFIGS_COLLECTION, SHIPPING_CONFIG_INDEXED_FIELDS, DEFAULT_SHIPPING_CONFIG_DATA, ANALYTICS_CARDS_COLLECTION, ANALYTICS_CARD_INDEXED_FIELDS, DEFAULT_ANALYTICS_CARD_DATA, ANALYTICS_ALERTS_COLLECTION, ANALYTICS_ALERT_INDEXED_FIELDS, DEFAULT_ANALYTICS_ALERT_DATA, storeCategoryFormSchema, storeCategoryCreateSchema, storeCategoryUpdateSchema, listingTemplateFormSchema, listingTemplateCreateSchema, listingTemplateUpdateSchema, LISTING_TEMPLATE_TYPES, LISTING_TEMPLATE_TYPE_OPTIONS, payoutMethodFormSchema, payoutMethodCreateSchema, payoutMethodUpdateSchema, shippingConfigFormSchema, SHIPPING_METHOD_OPTIONS, shippingConfigCreateSchema, shippingConfigUpdateSchema, customRoleFormSchema, customRoleCreateSchema, customRoleUpdateSchema, isKnownPermission, moderationReviewFormSchema, moderationReviewUpdateSchema, MODERATION_REVIEWER_STATUSES, reportReviewFormSchema, reportReviewUpdateSchema, REPORT_REVIEWER_STATUSES, REPORT_TERMINAL_STATUSES, reportCreateSchema, itemRequestCreateSchema, REPORT_ENTITY_TYPES, REPORT_REASONS, analyticsAlertCreateSchema, analyticsCardCreateSchema, ANALYTICS_ALERT_OPERATORS, ANALYTICS_CARD_TYPES, storeGoogleConfigUpdateSchema, toSellerGoogleConfig, adminNotificationCreateSchema, ADMIN_NOTIFICATION_CATEGORIES, ADMIN_NOTIFICATION_SEVERITIES, STORE_CATEGORIES_COLLECTION, STORE_CATEGORY_INDEXED_FIELDS, DEFAULT_STORE_CATEGORY_DATA, LISTING_TEMPLATES_COLLECTION, LISTING_TEMPLATE_INDEXED_FIELDS, DEFAULT_LISTING_TEMPLATE_DATA, MODERATION_QUEUE_COLLECTION, MODERATION_QUEUE_INDEXED_FIELDS, DEFAULT_MODERATION_QUEUE_DATA, REPORTS_COLLECTION, REPORT_INDEXED_FIELDS, DEFAULT_REPORT_DATA, ADMIN_NOTIFICATIONS_COLLECTION, ADMIN_NOTIFICATION_INDEXED_FIELDS, DEFAULT_ADMIN_NOTIFICATION_DATA, ITEM_REQUESTS_COLLECTION, ITEM_REQUEST_INDEXED_FIELDS, DEFAULT_ITEM_REQUEST_DATA, STORE_GOOGLE_CONFIG_COLLECTION, STORE_GOOGLE_CONFIG_INDEXED_FIELDS, DEFAULT_STORE_GOOGLE_CONFIG_DATA, CUSTOM_ROLES_COLLECTION, CUSTOM_ROLE_INDEXED_FIELDS, DEFAULT_CUSTOM_ROLE_DATA, ROLE_OVERRIDES_COLLECTION, ROLE_OVERRIDE_INDEXED_FIELDS, DEFAULT_ROLE_OVERRIDE_DATA,
906
+ export { PAYOUT_METHODS_COLLECTION, PAYOUT_METHOD_INDEXED_FIELDS, DEFAULT_PAYOUT_METHOD_DATA, SHIPPING_CONFIGS_COLLECTION, SHIPPING_CONFIG_INDEXED_FIELDS, DEFAULT_SHIPPING_CONFIG_DATA, ANALYTICS_CARDS_COLLECTION, ANALYTICS_CARD_INDEXED_FIELDS, DEFAULT_ANALYTICS_CARD_DATA, ANALYTICS_ALERTS_COLLECTION, ANALYTICS_ALERT_INDEXED_FIELDS, DEFAULT_ANALYTICS_ALERT_DATA, storeCategoryFormSchema, storeCategoryCreateSchema, storeCategoryUpdateSchema, listingTemplateFormSchema, listingTemplateCreateSchema, listingTemplateUpdateSchema, LISTING_TEMPLATE_TYPES, LISTING_TEMPLATE_TYPE_OPTIONS, payoutMethodFormSchema, payoutMethodCreateSchema, payoutMethodUpdateSchema, shippingConfigFormSchema, SHIPPING_METHOD_OPTIONS, shippingConfigCreateSchema, shippingConfigUpdateSchema, customRoleFormSchema, customRoleCreateSchema, customRoleUpdateSchema, isKnownPermission, moderationReviewFormSchema, moderationReviewUpdateSchema, MODERATION_REVIEWER_STATUSES, reportReviewFormSchema, reportReviewUpdateSchema, REPORT_REVIEWER_STATUSES, REPORT_TERMINAL_STATUSES, reportCreateSchema, itemRequestCreateSchema, REPORT_ENTITY_TYPES, REPORT_REASONS, analyticsAlertCreateSchema, analyticsCardCreateSchema, ANALYTICS_ALERT_OPERATORS, ANALYTICS_CARD_TYPES, storeGoogleConfigUpdateSchema, toSellerGoogleConfig, adminNotificationCreateSchema, ADMIN_NOTIFICATION_CATEGORIES, ADMIN_NOTIFICATION_SEVERITIES, STORE_CATEGORIES_COLLECTION, STORE_CATEGORY_INDEXED_FIELDS, DEFAULT_STORE_CATEGORY_DATA, LISTING_TEMPLATES_COLLECTION, LISTING_TEMPLATE_INDEXED_FIELDS, DEFAULT_LISTING_TEMPLATE_DATA, MODERATION_QUEUE_COLLECTION, MODERATION_QUEUE_INDEXED_FIELDS, DEFAULT_MODERATION_QUEUE_DATA, REPORTS_COLLECTION, REPORT_INDEXED_FIELDS, DEFAULT_REPORT_DATA, ADMIN_NOTIFICATIONS_COLLECTION, ADMIN_NOTIFICATION_INDEXED_FIELDS, DEFAULT_ADMIN_NOTIFICATION_DATA, ITEM_REQUESTS_COLLECTION, ITEM_REQUEST_INDEXED_FIELDS, DEFAULT_ITEM_REQUEST_DATA, STORE_GOOGLE_CONFIG_COLLECTION, STORE_GOOGLE_CONFIG_INDEXED_FIELDS, DEFAULT_STORE_GOOGLE_CONFIG_DATA, STORE_WHATSAPP_CONFIG_COLLECTION, STORE_WHATSAPP_CONFIG_INDEXED_FIELDS, DEFAULT_STORE_WHATSAPP_CONFIG_DATA, CUSTOM_ROLES_COLLECTION, CUSTOM_ROLE_INDEXED_FIELDS, DEFAULT_CUSTOM_ROLE_DATA, ROLE_OVERRIDES_COLLECTION, ROLE_OVERRIDE_INDEXED_FIELDS, DEFAULT_ROLE_OVERRIDE_DATA,
907
907
  // Repositories — classes
908
- PayoutMethodsRepository, ShippingConfigsRepository, AnalyticsCardsRepository, AnalyticsAlertsRepository, StoreCategoriesRepository, ListingTemplatesRepository, ModerationQueueRepository, ReportsRepository, AdminNotificationsRepository, ItemRequestsRepository, StoreGoogleConfigRepository, CustomRolesRepository, RoleOverridesRepository,
908
+ PayoutMethodsRepository, ShippingConfigsRepository, AnalyticsCardsRepository, AnalyticsAlertsRepository, StoreCategoriesRepository, ListingTemplatesRepository, ModerationQueueRepository, ReportsRepository, AdminNotificationsRepository, ItemRequestsRepository, StoreGoogleConfigRepository, StoreWhatsAppConfigRepository, CustomRolesRepository, RoleOverridesRepository,
909
909
  // Repositories — singletons
910
- payoutMethodsRepository, shippingConfigsRepository, analyticsCardsRepository, analyticsAlertsRepository, storeCategoriesRepository, listingTemplatesRepository, moderationQueueRepository, reportsRepository, adminNotificationsRepository, itemRequestsRepository, storeGoogleConfigRepository, customRolesRepository, roleOverridesRepository, } from "./features/store-extensions/index.js";
910
+ payoutMethodsRepository, shippingConfigsRepository, analyticsCardsRepository, analyticsAlertsRepository, storeCategoriesRepository, listingTemplatesRepository, moderationQueueRepository, reportsRepository, adminNotificationsRepository, itemRequestsRepository, storeGoogleConfigRepository, storeWhatsAppConfigRepository, customRolesRepository, roleOverridesRepository, } from "./features/store-extensions/index.js";
911
911
  // [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
912
912
  // BaseRepository - Shared export for base repository.
913
913
  export { BaseRepository } from "./repositories/index.js";
@@ -2173,7 +2173,7 @@ export { markAllNotificationsRead } from "./features/admin/server.js";
2173
2173
  // markNotificationRead - Shared export for mark notification read.
2174
2174
  export { markNotificationRead } from "./features/admin/server.js";
2175
2175
  // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
2176
- // sendNotification - Multi-channel notification dispatcher (in-app + optional email).
2176
+ // sendNotification - Multi-channel notification dispatcher (in-app + optional email/WhatsApp).
2177
2177
  export { sendNotification } from "./features/admin/server.js";
2178
2178
  // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
2179
2179
  // revokeSession - Shared export for revoke session.
@@ -4086,7 +4086,7 @@ export { cartRequiresShipping, cartIsDigitalOnly, cartIsChatOnly, } from "./_int
4086
4086
  // SB-UNI-W-1 2026-05-13 â€" CTA action registry shell.
4087
4087
  export { ACTIONS, action, act, canPerformAction, actionsForListingType, actionLabel, } from "./_internal/shared/actions/action-registry.js";
4088
4088
  export { buildBulkAction } from "./_internal/shared/actions/bulk-helpers.js";
4089
- // Shared fee calculator — platform/gateway/GST/COD handling/addon fee math (pure, client-safe).
4089
+ // Shared fee calculator — platform/gateway/GST/COD handling/WhatsApp-addon fee math (pure, client-safe).
4090
4090
  export { computeCheckoutFees,
4091
4091
  // The per-group split of the ONE capped commission. Exported for the capture
4092
4092
  // route's points tender: the tender is applied per order group against the
@@ -4094,7 +4094,7 @@ export { computeCheckoutFees,
4094
4094
  // it the route would have to re-derive the apportionment — and the allocator
4095
4095
  // also carries the `minimumTransactionFee` floor (D41), which already spent
4096
4096
  // a release being re-implemented by hand in that very file.
4097
- allocateCheckoutFees, computePayoutDeduction, computeCodHandlingFee, computeGiftWrapFee, computeShipmentProtectionFee, computeSaleProtectionFee, calculateGst, } from "./_internal/shared/fees/calculator.js";
4097
+ allocateCheckoutFees, computePayoutDeduction, computeCodHandlingFee, computeWhatsAppNotifyFee, computeGiftWrapFee, computeShipmentProtectionFee, computeSaleProtectionFee, calculateGst, } from "./_internal/shared/fees/calculator.js";
4098
4098
  // C5e buyer protections — the pure three-tier gate plus the one fee pair
4099
4099
  // every money path must agree on. Public API because the capture route
4100
4100
  // (/api/payment/create-order) is one of the three sites that must agree.
@@ -4835,6 +4835,7 @@ export { AdminTeamGuideView } from "./features/admin/components/AdminTeamGuideVi
4835
4835
  export { AdminAnalyticsGuideView } from "./features/admin/components/AdminAnalyticsGuideView.js";
4836
4836
  // [CLIENT-SSR]-Admin trust & safety guide — static view, no firebase-admin.
4837
4837
  export { AdminTrustGuideView } from "./features/admin/components/AdminTrustGuideView.js";
4838
+ // [CLIENT-SSR]-Admin WhatsApp integration guide — static view, no firebase-admin.
4838
4839
  // [CLIENT-SSR]-Admin payments (Razorpay) guide — static view, no firebase-admin.
4839
4840
  export { AdminPaymentsGuideView } from "./features/admin/components/AdminPaymentsGuideView.js";
4840
4841
  // [CLIENT-SSR]-Buyer shopping guide — static view, no firebase-admin.
@@ -4857,6 +4858,7 @@ export { StoreFinanceGuideView } from "./features/stores/components/StoreFinance
4857
4858
  export { StoreCapabilitiesGuideView } from "./features/stores/components/StoreCapabilitiesGuideView.js";
4858
4859
  // [CLIENT-SSR]-Store settings guide — static view, no firebase-admin.
4859
4860
  export { StoreSettingsGuideView } from "./features/stores/components/StoreSettingsGuideView.js";
4861
+ // [CLIENT-SSR]-Store WhatsApp catalog sync guide — static view, no firebase-admin.
4860
4862
  export { StorePreOrdersListing } from "./features/stores/components/StorePreOrdersListing.js";
4861
4863
  // [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
4862
4864
  // buildStoreColumns - Helper for build store columns.
@@ -4932,11 +4934,35 @@ export { storeSlugGET } from "./features/stores/server.js";
4932
4934
  // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
4933
4935
  // updateStoreAddressForSeller - Helper for update store address for seller.
4934
4936
  export { updateStoreAddressForSeller } from "./features/stores/server.js";
4935
- // ./features/orders/utils/payment-proof-message
4936
- // [CLIENT-SAFE] Pure wa.me share-link message builder — no crypto, no network.
4937
- // The WhatsApp Cloud API integration was removed 2026-10-20; this survived
4938
- // because a wa.me deep link needs no token, number or Meta billing account.
4939
- export { buildPaymentProofReviewMessage } from "./features/orders/utils/payment-proof-message.js";
4937
+ // ./features/whatsapp-bot/index
4938
+ // [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
4939
+ // WhatsAppChatButton - Component for whats app chat button.
4940
+ export { WhatsAppChatButton } from "./features/whatsapp-bot/index.js";
4941
+ export { SellerWhatsAppSettingsView } from "./features/whatsapp-bot/index.js";
4942
+ // ./features/whatsapp-bot/server
4943
+ // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
4944
+ // buildCheckoutMessageURL - Helper for build checkout message url.
4945
+ export { buildCheckoutMessageURL } from "./features/whatsapp-bot/server.js";
4946
+ // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
4947
+ // buildStatusMessage - Helper for build status message.
4948
+ export { buildStatusMessage } from "./features/whatsapp-bot/server.js";
4949
+ // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
4950
+ // buildStatusNotificationURL - Helper for build status notification url.
4951
+ export { buildStatusNotificationURL } from "./features/whatsapp-bot/server.js";
4952
+ // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
4953
+ // buildPaymentProofReviewMessage - Helper for build payment proof review message (Tier PP).
4954
+ export { buildPaymentProofReviewMessage } from "./features/whatsapp-bot/server.js";
4955
+ // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
4956
+ // isAdminNumber - Shared export for is admin number.
4957
+ export { isAdminNumber } from "./features/whatsapp-bot/server.js";
4958
+ // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
4959
+ // parseIncomingWebhookPayload - Helper for parse incoming webhook payload.
4960
+ export { parseIncomingWebhookPayload } from "./features/whatsapp-bot/server.js";
4961
+ // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
4962
+ // sendWhatsAppMessage - Shared export for send whats app message.
4963
+ export { sendWhatsAppMessage } from "./features/whatsapp-bot/server.js";
4964
+ // [SERVER-ONLY] Meta WhatsApp Business Cloud API helpers (WA1-WA8 integration)
4965
+ export { sendWhatsAppBusinessMessage, syncProductsToCatalog, buildPurchaseAnnouncementMessage, buildGroupShareLink } from "./features/whatsapp-bot/server.js";
4940
4966
  // ./features/wishlist/index
4941
4967
  // [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
4942
4968
  // WishlistCard - Component for wishlist card.
@@ -5369,7 +5395,7 @@ export { sublistingCategoryFormSchema } from "./features/store-extensions/schema
5369
5395
  export { adminStoreUpdateSchema, announcementBarSchema, } from "./features/admin/schemas/admin-editor-forms.js";
5370
5396
  export { adminOrderUpdateSchema, employeeInviteSchema, hardBanReasonSchema, featureFlagsUpdateSchema, adminAdFormSchema, } from "./features/admin/schemas/admin-ops-forms.js";
5371
5397
  export { changeEmailSchema } from "./features/account/schemas/index.js";
5372
- export { adminUserUpdateSchema, lotteryPullSchema, } from "./features/admin/schemas/admin-user-form.js";
5398
+ export { adminUserUpdateSchema, whatsappSettingsSchema, lotteryPullSchema, } from "./features/admin/schemas/admin-user-form.js";
5373
5399
  export { siteSettingsFormSchema } from "./features/admin/schemas/site-settings-form.js";
5374
5400
  /*
5375
5401
  * Two schemas that existed and whose own routes did not use them.
@@ -261,6 +261,7 @@ export declare const DEFAULT_ROUTE_MAP: {
261
261
  readonly ADDRESSES_NEW: "/store/addresses/new";
262
262
  readonly ADDRESSES_EDIT: (id: string) => string;
263
263
  readonly OFFERS: "/store/offers";
264
+ readonly WHATSAPP: "/store/whatsapp";
264
265
  readonly REVIEWS: "/store/reviews";
265
266
  readonly BIDS: "/store/bids";
266
267
  readonly BID_DETAIL: (id: string) => string;
@@ -770,6 +771,7 @@ export declare const ROUTES: {
770
771
  readonly ADDRESSES_NEW: "/store/addresses/new";
771
772
  readonly ADDRESSES_EDIT: (id: string) => string;
772
773
  readonly OFFERS: "/store/offers";
774
+ readonly WHATSAPP: "/store/whatsapp";
773
775
  readonly REVIEWS: "/store/reviews";
774
776
  readonly BIDS: "/store/bids";
775
777
  readonly BID_DETAIL: (id: string) => string;
@@ -1056,6 +1058,7 @@ export declare const SELLER_ROUTES: {
1056
1058
  readonly ADDRESSES_NEW: "/store/addresses/new";
1057
1059
  readonly ADDRESSES_EDIT: (id: string) => string;
1058
1060
  readonly OFFERS: "/store/offers";
1061
+ readonly WHATSAPP: "/store/whatsapp";
1059
1062
  readonly REVIEWS: "/store/reviews";
1060
1063
  readonly BIDS: "/store/bids";
1061
1064
  readonly BID_DETAIL: (id: string) => string;
@@ -396,6 +396,7 @@ export const DEFAULT_ROUTE_MAP = {
396
396
  ADDRESSES_NEW: "/store/addresses/new",
397
397
  ADDRESSES_EDIT: (id) => `/store/addresses/${id}/edit`,
398
398
  OFFERS: "/store/offers",
399
+ WHATSAPP: "/store/whatsapp",
399
400
  REVIEWS: "/store/reviews",
400
401
  BIDS: "/store/bids",
401
402
  BID_DETAIL: (id) => `/store/bids/${id}/view`,
@@ -19,7 +19,7 @@ export declare abstract class BaseRepository<T extends DocumentData> {
19
19
  *
20
20
  * It is a SEPARATE hook because a list is not a detail read. A repository
21
21
  * whose `mapDoc` decrypts a secret must not hand that secret to a list —
22
- * A subclass overrides this when a list row must drop a field, since
22
+ * `StoreRepository` overrides this to drop the WhatsApp token, since
23
23
  * `listStores(activeOnly)` backs the PUBLIC /stores page.
24
24
  */
25
25
  protected mapDocForList<D = T>(snap: DocumentSnapshot): D;
@@ -56,7 +56,7 @@ export class BaseRepository {
56
56
  *
57
57
  * It is a SEPARATE hook because a list is not a detail read. A repository
58
58
  * whose `mapDoc` decrypts a secret must not hand that secret to a list —
59
- * A subclass overrides this when a list row must drop a field, since
59
+ * `StoreRepository` overrides this to drop the WhatsApp token, since
60
60
  * `listStores(activeOnly)` backs the PUBLIC /stores page.
61
61
  */
62
62
  mapDocForList(snap) {
@@ -40,7 +40,7 @@ export { shipmentItemsRepository } from "../features/shipments/repository/shipme
40
40
  export { catalogueRepository } from "../features/catalogue/repository/catalogue.repository";
41
41
  export { SavedPaymentMethodsRepository, savedPaymentMethodsRepository, } from "../features/payments/repository/saved-payment-methods.repository";
42
42
  export { GroupedListingsRepository, groupedListingsRepository, } from "../features/grouped/repository/grouped-listings.repository";
43
- export { payoutMethodsRepository, shippingConfigsRepository, analyticsCardsRepository, analyticsAlertsRepository, storeCategoriesRepository, listingTemplatesRepository, moderationQueueRepository, reportsRepository, itemRequestsRepository, storeGoogleConfigRepository, PayoutMethodsRepository, ShippingConfigsRepository, AnalyticsCardsRepository, AnalyticsAlertsRepository, StoreCategoriesRepository, ListingTemplatesRepository, ModerationQueueRepository, ReportsRepository, ItemRequestsRepository, StoreGoogleConfigRepository, } from "../features/store-extensions/repository/store-extensions.repositories";
43
+ export { payoutMethodsRepository, shippingConfigsRepository, analyticsCardsRepository, analyticsAlertsRepository, storeCategoriesRepository, listingTemplatesRepository, moderationQueueRepository, reportsRepository, itemRequestsRepository, storeWhatsAppConfigRepository, storeGoogleConfigRepository, PayoutMethodsRepository, ShippingConfigsRepository, AnalyticsCardsRepository, AnalyticsAlertsRepository, StoreCategoriesRepository, ListingTemplatesRepository, ModerationQueueRepository, ReportsRepository, ItemRequestsRepository, StoreWhatsAppConfigRepository, StoreGoogleConfigRepository, } from "../features/store-extensions/repository/store-extensions.repositories";
44
44
  export { roleOverridesRepository, customRolesRepository, adminNotificationsRepository, RoleOverridesRepository, CustomRolesRepository, AdminNotificationsRepository, } from "../features/store-extensions/repository/rbac.repositories";
45
45
  export { OfferRepository, offerRepository, } from "../features/seller/repository/offer.repository";
46
46
  export { wishlistRepository, type UserWishlistItem as WishlistItem, WishlistFullError, } from "../features/wishlist/repository/user-wishlist.repository";
@@ -56,7 +56,7 @@ export { SavedPaymentMethodsRepository, savedPaymentMethodsRepository, } from ".
56
56
  // Grouped listings repository
57
57
  export { GroupedListingsRepository, groupedListingsRepository, } from "../features/grouped/repository/grouped-listings.repository.js";
58
58
  // S-STORE-CROSS — 11 new collection repositories
59
- export { payoutMethodsRepository, shippingConfigsRepository, analyticsCardsRepository, analyticsAlertsRepository, storeCategoriesRepository, listingTemplatesRepository, moderationQueueRepository, reportsRepository, itemRequestsRepository, storeGoogleConfigRepository, PayoutMethodsRepository, ShippingConfigsRepository, AnalyticsCardsRepository, AnalyticsAlertsRepository, StoreCategoriesRepository, ListingTemplatesRepository, ModerationQueueRepository, ReportsRepository, ItemRequestsRepository, StoreGoogleConfigRepository, } from "../features/store-extensions/repository/store-extensions.repositories.js";
59
+ export { payoutMethodsRepository, shippingConfigsRepository, analyticsCardsRepository, analyticsAlertsRepository, storeCategoriesRepository, listingTemplatesRepository, moderationQueueRepository, reportsRepository, itemRequestsRepository, storeWhatsAppConfigRepository, storeGoogleConfigRepository, PayoutMethodsRepository, ShippingConfigsRepository, AnalyticsCardsRepository, AnalyticsAlertsRepository, StoreCategoriesRepository, ListingTemplatesRepository, ModerationQueueRepository, ReportsRepository, ItemRequestsRepository, StoreWhatsAppConfigRepository, StoreGoogleConfigRepository, } from "../features/store-extensions/repository/store-extensions.repositories.js";
60
60
  // S-STORE RBAC + admin notifications
61
61
  export { roleOverridesRepository, customRolesRepository, adminNotificationsRepository, RoleOverridesRepository, CustomRolesRepository, AdminNotificationsRepository, } from "../features/store-extensions/repository/rbac.repositories.js";
62
62
  export { OfferRepository, offerRepository, } from "../features/seller/repository/offer.repository.js";