@mohasinac/appkit 4.53.2 → 4.54.0-next.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 (179) hide show
  1. package/dist/.build-stamp.json +5 -5
  2. package/dist/_internal/server/features/auth/capabilities.js +7 -5
  3. package/dist/_internal/server/features/checkout/supplier-identity.js +28 -6
  4. package/dist/_internal/server/features/products/listing-tab-counts.js +81 -25
  5. package/dist/_internal/server/features/search/index-build/sources.js +43 -2
  6. package/dist/_internal/server/jobs/core/jobRunners.js +0 -10
  7. package/dist/_internal/server/jobs/core/onOrderCreate.js +10 -104
  8. package/dist/_internal/shared/actions/action-registry.d.ts +1 -1
  9. package/dist/_internal/shared/actions/action-registry.js +128 -0
  10. package/dist/_internal/shared/features/categories/bundle-copy.d.ts +1 -1
  11. package/dist/_internal/shared/features/site-settings/supplier-of-record.d.ts +56 -0
  12. package/dist/_internal/shared/features/site-settings/supplier-of-record.js +57 -0
  13. package/dist/_internal/shared/listing-types/tiers.d.ts +94 -0
  14. package/dist/_internal/shared/listing-types/tiers.js +150 -0
  15. package/dist/cli/index.js +0 -2
  16. package/dist/client.d.ts +21 -2
  17. package/dist/client.js +23 -4
  18. package/dist/constants/api-endpoints.d.ts +21 -0
  19. package/dist/constants/api-endpoints.js +7 -0
  20. package/dist/features/account/components/UserOrdersView.js +26 -7
  21. package/dist/features/addresses/utils/postal-autofill.d.ts +39 -0
  22. package/dist/features/addresses/utils/postal-autofill.js +54 -0
  23. package/dist/features/admin/components/AdminStoreEditorView.js +73 -34
  24. package/dist/features/admin/components/OwnerQuickActions.d.ts +29 -0
  25. package/dist/features/admin/components/OwnerQuickActions.js +142 -0
  26. package/dist/features/admin/schemas/admin-editor-forms.d.ts +1 -1
  27. package/dist/features/admin/schemas/admin-editor-forms.js +4 -1
  28. package/dist/features/auctions/components/MarketplaceAuctionCard.d.ts +11 -1
  29. package/dist/features/auctions/components/MarketplaceAuctionCard.js +9 -2
  30. package/dist/features/auth/permissions/constants.d.ts +29 -2
  31. package/dist/features/auth/permissions/constants.js +68 -1
  32. package/dist/features/blog/components/BlogFeaturedCard.d.ts +11 -1
  33. package/dist/features/blog/components/BlogFeaturedCard.js +9 -2
  34. package/dist/features/cart/components/CartDrawer.js +3 -2
  35. package/dist/features/cart/components/CartGroupLineRow.js +2 -1
  36. package/dist/features/cart/hooks/useAddToCart.js +10 -5
  37. package/dist/features/cart/utils/pending-ops.d.ts +11 -1
  38. package/dist/features/cart/utils/pending-ops.js +14 -2
  39. package/dist/features/categories/components/BrandDetailPageView.js +2 -1
  40. package/dist/features/categories/components/CategoryDetailPageView.js +2 -1
  41. package/dist/features/categories/components/CategoryGrid.d.ts +11 -1
  42. package/dist/features/categories/components/CategoryGrid.js +9 -2
  43. package/dist/features/checkout/actions/checkout-value-otp-actions.d.ts +10 -5
  44. package/dist/features/checkout/actions/checkout-value-otp-actions.js +2 -88
  45. package/dist/features/events/components/EventCard.d.ts +11 -1
  46. package/dist/features/events/components/EventCard.js +9 -2
  47. package/dist/features/layout/AppLayoutShell.js +2 -1
  48. package/dist/features/layout/BottomActions.d.ts +1 -0
  49. package/dist/features/layout/BottomActions.js +330 -0
  50. package/dist/features/layout/BottomChrome.d.ts +45 -0
  51. package/dist/features/layout/BottomChrome.js +5 -17
  52. package/dist/features/layout/SideActionDock.js +36 -13
  53. package/dist/features/layout/index.d.ts +2 -7
  54. package/dist/features/layout/index.js +7 -7
  55. package/dist/features/layout/useIsDesktop.d.ts +36 -0
  56. package/dist/features/layout/useIsDesktop.js +48 -0
  57. package/dist/features/media/messages/en.json +67 -67
  58. package/dist/features/orders/components/YourPurchaseStrip.d.ts +24 -0
  59. package/dist/features/orders/components/YourPurchaseStrip.js +77 -0
  60. package/dist/features/orders/components/index.d.ts +2 -1
  61. package/dist/features/orders/components/index.js +1 -1
  62. package/dist/features/orders/utils/order-announcement-message.d.ts +18 -0
  63. package/dist/features/orders/utils/order-announcement-message.js +16 -0
  64. package/dist/features/orders/utils/payment-proof-message.d.ts +20 -0
  65. package/dist/features/orders/utils/payment-proof-message.js +17 -0
  66. package/dist/features/parts/schemas/firestore.d.ts +227 -0
  67. package/dist/features/parts/schemas/firestore.js +6 -6
  68. package/dist/features/pre-orders/components/MarketplacePreorderCard.d.ts +11 -1
  69. package/dist/features/pre-orders/components/MarketplacePreorderCard.js +10 -3
  70. package/dist/features/products/api/[id]/route.js +8 -1
  71. package/dist/features/products/api/route.js +16 -4
  72. package/dist/features/products/components/AvailabilityScopeHint.js +1 -1
  73. package/dist/features/products/components/InteractiveProductCard.d.ts +7 -1
  74. package/dist/features/products/components/InteractiveProductCard.js +16 -4
  75. package/dist/features/products/components/MarketplaceBundleCard.d.ts +11 -1
  76. package/dist/features/products/components/MarketplaceBundleCard.js +9 -2
  77. package/dist/features/products/components/MarketplacePrizeDrawCard.d.ts +11 -1
  78. package/dist/features/products/components/MarketplacePrizeDrawCard.js +9 -2
  79. package/dist/features/products/components/ProductDetailPageView.js +27 -2
  80. package/dist/features/products/components/ProductGrid.d.ts +14 -1
  81. package/dist/features/products/components/ProductGrid.js +22 -5
  82. package/dist/features/products/components/ProductsIndexListing.js +2 -2
  83. package/dist/features/reviews/api/[id]/route.js +83 -23
  84. package/dist/features/reviews/components/PurchaseReviewAffordance.d.ts +6 -0
  85. package/dist/features/reviews/components/PurchaseReviewAffordance.js +42 -0
  86. package/dist/features/reviews/components/ReviewFormDrawer.d.ts +34 -0
  87. package/dist/features/reviews/components/ReviewFormDrawer.js +127 -0
  88. package/dist/features/reviews/components/index.d.ts +4 -0
  89. package/dist/features/reviews/components/index.js +2 -0
  90. package/dist/features/seller/actions/seller-actions.d.ts +1 -1
  91. package/dist/features/seller/actions/seller-actions.js +49 -3
  92. package/dist/features/seller/components/SellerPayoutSettingsView.js +30 -2
  93. package/dist/features/seller/components/SellerProductShell.d.ts +17 -1
  94. package/dist/features/seller/hooks/useStoreListingEntitlements.d.ts +8 -0
  95. package/dist/features/seller/hooks/useStoreListingEntitlements.js +70 -0
  96. package/dist/features/stores/components/InteractiveStoreCard.d.ts +11 -1
  97. package/dist/features/stores/components/InteractiveStoreCard.js +9 -2
  98. package/dist/features/stores/components/index.d.ts +0 -2
  99. package/dist/features/stores/components/index.js +0 -1
  100. package/dist/features/stores/schemas/index.d.ts +1 -1
  101. package/dist/features/stores/schemas/index.js +10 -1
  102. package/dist/features/tester/seed-data/tester-checklist-seed-data.js +403 -0
  103. package/dist/index.d.ts +8 -27
  104. package/dist/index.js +14 -35
  105. package/dist/next/routing/route-map.d.ts +2 -0
  106. package/dist/next/routing/route-map.js +9 -0
  107. package/dist/providers/shipping-shiprocket/index.d.ts +98 -0
  108. package/dist/providers/shipping-shiprocket/index.js +353 -0
  109. package/dist/schemas/registry.d.ts +2 -2
  110. package/dist/security/csp.d.ts +16 -1
  111. package/dist/security/csp.js +5 -3
  112. package/dist/seed/_helpers/category-forest.js +27 -0
  113. package/dist/seed/_helpers/category-parts-glossary-map.js +1816 -86
  114. package/dist/seed/_helpers/category-parts.d.ts +1 -1
  115. package/dist/seed/_helpers/category-parts.js +13412 -3020
  116. package/dist/seed/categories-seed-data.js +48 -6
  117. package/dist/seed/homepage-sections-seed-data.js +41 -28
  118. package/dist/seed/model-composition-seed-data.js +6 -8
  119. package/dist/seed/part-glossary/chunk0.d.ts +9 -0
  120. package/dist/seed/part-glossary/chunk0.js +35044 -0
  121. package/dist/seed/part-glossary/chunk1.d.ts +9 -0
  122. package/dist/seed/part-glossary/chunk1.js +39955 -0
  123. package/dist/seed/part-glossary/chunk2.d.ts +9 -0
  124. package/dist/seed/part-glossary/chunk2.js +50335 -0
  125. package/dist/seed/part-glossary/chunk3.d.ts +9 -0
  126. package/dist/seed/part-glossary/chunk3.js +52386 -0
  127. package/dist/seed/part-glossary/chunk4.d.ts +9 -0
  128. package/dist/seed/part-glossary/chunk4.js +50549 -0
  129. package/dist/seed/part-glossary-seed-data.d.ts +1 -1
  130. package/dist/seed/part-glossary-seed-data.js +23 -47483
  131. package/dist/server.d.ts +4 -8
  132. package/dist/server.js +8 -20
  133. package/dist/styles.css +516 -358
  134. package/dist/tailwind-utilities.css +1 -1
  135. package/dist/tokens/themes/index.d.ts +3 -1
  136. package/dist/tokens/themes/index.js +11 -1
  137. package/dist/tokens/themes/technical-dark.d.ts +30 -0
  138. package/dist/tokens/themes/technical-dark.js +103 -0
  139. package/dist/tokens/themes/technical-light.d.ts +22 -0
  140. package/dist/tokens/themes/technical-light.js +89 -0
  141. package/dist/tokens/tokens.css +155 -0
  142. package/dist/ui/components/GatedPrice.js +30 -3
  143. package/dist/ui/components/GatedPrice.style.css +22 -19
  144. package/dist/ui/components/QuickCreateModal.style.css +78 -78
  145. package/dist/ui/forms/FormShell.style.css +260 -260
  146. package/package.json +1 -1
  147. package/dist/_internal/server/jobs/core/whatsappCatalogImport.d.ts +0 -27
  148. package/dist/_internal/server/jobs/core/whatsappCatalogImport.js +0 -172
  149. package/dist/_internal/server/jobs/core/whatsappNotify.d.ts +0 -35
  150. package/dist/_internal/server/jobs/core/whatsappNotify.js +0 -140
  151. package/dist/features/admin/components/AdminWhatsAppGuideView.d.ts +0 -2
  152. package/dist/features/admin/components/AdminWhatsAppGuideView.js +0 -35
  153. package/dist/features/orders/components/MarketplaceOrderCard.d.ts +0 -36
  154. package/dist/features/orders/components/MarketplaceOrderCard.js +0 -57
  155. package/dist/features/stores/components/StoreWhatsAppGuideView.d.ts +0 -3
  156. package/dist/features/stores/components/StoreWhatsAppGuideView.js +0 -12
  157. package/dist/features/whatsapp-bot/api/send-status/route.d.ts +0 -12
  158. package/dist/features/whatsapp-bot/api/send-status/route.js +0 -38
  159. package/dist/features/whatsapp-bot/api/webhook/route.d.ts +0 -12
  160. package/dist/features/whatsapp-bot/api/webhook/route.js +0 -43
  161. package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.d.ts +0 -6
  162. package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +0 -270
  163. package/dist/features/whatsapp-bot/components/WhatsAppChatButton.d.ts +0 -9
  164. package/dist/features/whatsapp-bot/components/WhatsAppChatButton.js +0 -7
  165. package/dist/features/whatsapp-bot/components/index.d.ts +0 -3
  166. package/dist/features/whatsapp-bot/components/index.js +0 -2
  167. package/dist/features/whatsapp-bot/helpers/payment-proof-message.d.ts +0 -14
  168. package/dist/features/whatsapp-bot/helpers/payment-proof-message.js +0 -17
  169. package/dist/features/whatsapp-bot/helpers/whatsapp.d.ts +0 -52
  170. package/dist/features/whatsapp-bot/helpers/whatsapp.js +0 -283
  171. package/dist/features/whatsapp-bot/index.d.ts +0 -3
  172. package/dist/features/whatsapp-bot/index.js +0 -3
  173. package/dist/features/whatsapp-bot/manifest.d.ts +0 -2
  174. package/dist/features/whatsapp-bot/manifest.js +0 -13
  175. package/dist/features/whatsapp-bot/messages/en.json +0 -7
  176. package/dist/features/whatsapp-bot/server.d.ts +0 -7
  177. package/dist/features/whatsapp-bot/server.js +0 -7
  178. package/dist/features/whatsapp-bot/types/index.d.ts +0 -126
  179. package/dist/features/whatsapp-bot/types/index.js +0 -1
package/dist/index.d.ts CHANGED
@@ -2076,7 +2076,6 @@ export { finalizeStagedMediaObject } from "./features/media/server";
2076
2076
  export { finalizeStagedMediaObjectArray } from "./features/media/server";
2077
2077
  export { finalizeStagedMediaUrl } from "./features/media/server";
2078
2078
  export { DEFAULT_ORDER_DATA } from "./features/orders/index";
2079
- export { MarketplaceOrderCard } from "./features/orders/index";
2080
2079
  export { ORDER_ADMIN_SORT_OPTIONS } from "./features/orders/index";
2081
2080
  export { ORDER_COLLECTION } from "./features/orders/index";
2082
2081
  export { ORDER_FILTER_KEYS } from "./features/orders/index";
@@ -2125,10 +2124,6 @@ export { orderTimelineSchema } from "./features/orders/index";
2125
2124
  export { useOrder } from "./features/orders/index";
2126
2125
  export { useOrders } from "./features/orders/index";
2127
2126
  export { useTrackOrder } from "./features/orders/index";
2128
- export type { MarketplaceOrderCardLabels } from "./features/orders/index";
2129
- export type { MarketplaceOrderCardLinks } from "./features/orders/index";
2130
- export type { MarketplaceOrderCardOrder } from "./features/orders/index";
2131
- export type { MarketplaceOrderCardProps } from "./features/orders/index";
2132
2127
  export type { Order } from "./features/orders/index";
2133
2128
  export type { OrderAdminUpdateInput } from "./features/orders/index";
2134
2129
  export type { AppliedOrderDiscount } from "./features/orders/index";
@@ -2311,6 +2306,8 @@ export { getProductTableColumns } from "./features/products/index";
2311
2306
  export { normalizeListingType, isAuctionListing, isPreOrderListing, isStandardListing, isPrizeDrawListing, isClassifiedListing, isDigitalCodeListing, isLiveListing, isArtListing, isStickersListing, } from "./features/products/index";
2312
2307
  export { isFinalSale, acceptsChangeOfMindReturns, } from "./features/products/constants/final-sale";
2313
2308
  export { isListingTypeEnabled, isCategoryTypeEnabled, enabledListingTypes, enabledCategoryTypes, ALL_LISTING_TYPES, isListingType, } from "./_internal/shared/listing-types/feature-flags";
2309
+ export { ADVANCED_LISTING_TYPE_CAPABILITY, ADVANCED_LISTING_TYPES, BASIC_LISTING_TYPES, LISTING_TYPE_TIER, assertListingTypeAllowed, hasAdvancedListingTypes, isAdvancedListingType, isListingTypeAllowedFor, listingTypesAllowedFor, } from "./_internal/shared/listing-types/tiers";
2310
+ export type { ListingTypeAccessContext, ListingTypeTier, } from "./_internal/shared/listing-types/tiers";
2314
2311
  export { actionTracker, setActionTrackerSink, resetActionTrackerSink, type ActionEvent, type ActionTrackerSink, } from "./_internal/shared/listing-types/action-tracker";
2315
2312
  export { cartRequiresShipping, cartIsDigitalOnly, cartIsChatOnly, } from "./_internal/shared/listing-types/cart-shipping";
2316
2313
  export { ACTIONS, action, act, canPerformAction, actionsForListingType, actionLabel, type ActionDef, type ActionKind, type ActionResource, type ActionTree, type ActionConfirmation, } from "./_internal/shared/actions/action-registry";
@@ -2747,7 +2744,6 @@ export { AdminSiteConfigGuideView } from "./features/admin/components/AdminSiteC
2747
2744
  export { AdminTeamGuideView } from "./features/admin/components/AdminTeamGuideView";
2748
2745
  export { AdminAnalyticsGuideView } from "./features/admin/components/AdminAnalyticsGuideView";
2749
2746
  export { AdminTrustGuideView } from "./features/admin/components/AdminTrustGuideView";
2750
- export { AdminWhatsAppGuideView } from "./features/admin/components/AdminWhatsAppGuideView";
2751
2747
  export { AdminPaymentsGuideView } from "./features/admin/components/AdminPaymentsGuideView";
2752
2748
  export { BuyerShoppingGuideView } from "./features/account/components/BuyerShoppingGuideView";
2753
2749
  export { BuyerAuctionsGuideView } from "./features/account/components/BuyerAuctionsGuideView";
@@ -2765,8 +2761,6 @@ export { StoreCapabilitiesGuideView } from "./features/stores/components/StoreCa
2765
2761
  export type { StoreCapabilitiesGuideViewProps } from "./features/stores/components/StoreCapabilitiesGuideView";
2766
2762
  export { StoreSettingsGuideView } from "./features/stores/components/StoreSettingsGuideView";
2767
2763
  export type { StoreSettingsGuideViewProps } from "./features/stores/components/StoreSettingsGuideView";
2768
- export { StoreWhatsAppGuideView } from "./features/stores/components/StoreWhatsAppGuideView";
2769
- export type { StoreWhatsAppGuideViewProps } from "./features/stores/components/StoreWhatsAppGuideView";
2770
2764
  export { StorePreOrdersListing } from "./features/stores/components/StorePreOrdersListing";
2771
2765
  export type { StorePreOrdersListingProps } from "./features/stores/components/StorePreOrdersListing";
2772
2766
  export { buildStoreColumns } from "./features/stores/index";
@@ -2820,25 +2814,8 @@ export { updateStoreAddressForSeller } from "./features/stores/server";
2820
2814
  export type { StoreContentParams } from "./features/stores/server";
2821
2815
  export type { StoreQueryListParams } from "./features/stores/server";
2822
2816
  export type { StoreReviewsResult } from "./features/stores/server";
2823
- export { WhatsAppChatButton } from "./features/whatsapp-bot/index";
2824
- export { SellerWhatsAppSettingsView } from "./features/whatsapp-bot/index";
2825
- export type { SellerWhatsAppSettingsViewProps } from "./features/whatsapp-bot/index";
2826
- export type { CheckoutMessageInput } from "./features/whatsapp-bot/index";
2827
- export type { IncomingWebhookPayload } from "./features/whatsapp-bot/index";
2828
- export type { OrderStatusKey } from "./features/whatsapp-bot/index";
2829
- export type { SendWhatsAppInput } from "./features/whatsapp-bot/index";
2830
- export type { StatusMessageInput } from "./features/whatsapp-bot/index";
2831
- export type { StatusNotificationInput } from "./features/whatsapp-bot/index";
2832
- export type { WebhookVerifyInput } from "./features/whatsapp-bot/index";
2833
- export { buildCheckoutMessageURL } from "./features/whatsapp-bot/server";
2834
- export { buildStatusMessage } from "./features/whatsapp-bot/server";
2835
- export { buildStatusNotificationURL } from "./features/whatsapp-bot/server";
2836
- export { buildPaymentProofReviewMessage } from "./features/whatsapp-bot/server";
2837
- export { isAdminNumber } from "./features/whatsapp-bot/server";
2838
- export { parseIncomingWebhookPayload } from "./features/whatsapp-bot/server";
2839
- export { sendWhatsAppMessage } from "./features/whatsapp-bot/server";
2840
- export { sendWhatsAppBusinessMessage, syncProductsToCatalog, buildPurchaseAnnouncementMessage, buildGroupShareLink } from "./features/whatsapp-bot/server";
2841
- export type { WaBusinessSendInput, CatalogSyncProduct, CatalogSyncInput, CatalogSyncResult, PurchaseAnnouncementInput } from "./features/whatsapp-bot/index";
2817
+ export { buildPaymentProofReviewMessage } from "./features/orders/utils/payment-proof-message";
2818
+ export type { PaymentProofReviewMessageInput } from "./features/orders/utils/payment-proof-message";
2842
2819
  export { WishlistCard } from "./features/wishlist/index";
2843
2820
  export { WishlistPage } from "./features/wishlist/index";
2844
2821
  export { WishlistHeartButton } from "./features/wishlist/index";
@@ -3082,6 +3059,8 @@ export type { UserProfileOgData } from "./_internal/server/features/profile/og";
3082
3059
  export { LISTING_TYPE_CAPABILITIES, capabilityFor, canAddToCart, canBid, supportsShipping, requiresVendorVerified, requiresJurisdictionCheck, hasInstantFulfillment, assertNever, } from "./_internal/shared/listing-types/capabilities";
3083
3060
  export type { ListingTypeCapability } from "./_internal/shared/listing-types/capabilities";
3084
3061
  export { LISTING_TYPE_REGISTRY, pluginFor, detectListingTypeFromSlug } from "./_internal/shared/listing-types/_registry";
3062
+ export { OwnerQuickActions } from "./features/admin/components/OwnerQuickActions";
3063
+ export type { OwnerQuickActionsProps, OwnerQuickActionsResource } from "./features/admin/components/OwnerQuickActions";
3085
3064
  export type { ListingTypePlugin } from "./_internal/shared/listing-types/_registry";
3086
3065
  export { getListingRule, getCategoryRule, pickOrderType, getSplitKey, runSyncPreflight, CHECKOUT_RULES, CATEGORY_CHECKOUT_RULES, CHECKOUT_MAX_ORDERS_PER_TX, PRIZE_DRAW_MAX_REVEALS_PER_ORDER, BUNDLE_MAX_QTY_PER_TX, STANDARD_MAX_QTY_PER_LINE, } from "./_internal/shared/checkout/rules";
3087
3066
  export type { ListingCheckoutRule, CategoryCheckoutRule, CartItemProductPair, OrderItemInput, RefundPolicy, } from "./_internal/shared/checkout/rules";
@@ -3184,3 +3163,5 @@ export type { CourierRatingPair, CourierRatingDisplay, CourierRatingVote, Courie
3184
3163
  * server.ts.
3185
3164
  */
3186
3165
  export type { ConversationDocument, ConversationStatus, ConversationLastMessage, ParticipantRole, MessageDocument, MessageProductRef, } from "./features/messages/schemas/firestore";
3166
+ export { configurePlatformSupplier, getPlatformSupplier, resetPlatformSupplier, } from "./_internal/shared/features/site-settings/supplier-of-record";
3167
+ export type { PlatformSupplierIdentity } from "./_internal/shared/features/site-settings/supplier-of-record";
package/dist/index.js CHANGED
@@ -3915,8 +3915,6 @@ export { finalizeStagedMediaUrl } from "./features/media/server.js";
3915
3915
  // DEFAULT_ORDER_DATA - Constant used across modules.
3916
3916
  export { DEFAULT_ORDER_DATA } from "./features/orders/index.js";
3917
3917
  // [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
3918
- // MarketplaceOrderCard - Component for marketplace order card.
3919
- export { MarketplaceOrderCard } from "./features/orders/index.js";
3920
3918
  // [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
3921
3919
  // ORDER_ADMIN_SORT_OPTIONS - Constant used across modules.
3922
3920
  export { ORDER_ADMIN_SORT_OPTIONS } from "./features/orders/index.js";
@@ -4306,6 +4304,9 @@ export { normalizeListingType, isAuctionListing, isPreOrderListing, isStandardLi
4306
4304
  export { isFinalSale, acceptsChangeOfMindReturns, } from "./features/products/constants/final-sale.js";
4307
4305
  // SB-UNI-X4 2026-05-13 â€" per-type feature-flag helpers.
4308
4306
  export { isListingTypeEnabled, isCategoryTypeEnabled, enabledListingTypes, enabledCategoryTypes, ALL_LISTING_TYPES, isListingType, } from "./_internal/shared/listing-types/feature-flags.js";
4307
+ // Basic/advanced listing-type split — which types a store may create.
4308
+ // Pure (no firebase-admin in its import chain), so it is safe in index.ts.
4309
+ export { ADVANCED_LISTING_TYPE_CAPABILITY, ADVANCED_LISTING_TYPES, BASIC_LISTING_TYPES, LISTING_TYPE_TIER, assertListingTypeAllowed, hasAdvancedListingTypes, isAdvancedListingType, isListingTypeAllowedFor, listingTypesAllowedFor, } from "./_internal/shared/listing-types/tiers.js";
4309
4310
  // SB-UNI-X5 2026-05-13 â€" action telemetry sink.
4310
4311
  export { actionTracker, setActionTrackerSink, resetActionTrackerSink, } from "./_internal/shared/listing-types/action-tracker.js";
4311
4312
  // SB-UNI-S 2026-05-13 â€" cart-level shipping-requirement helpers.
@@ -5045,8 +5046,6 @@ export { AdminTeamGuideView } from "./features/admin/components/AdminTeamGuideVi
5045
5046
  export { AdminAnalyticsGuideView } from "./features/admin/components/AdminAnalyticsGuideView.js";
5046
5047
  // [CLIENT-SSR]-Admin trust & safety guide — static view, no firebase-admin.
5047
5048
  export { AdminTrustGuideView } from "./features/admin/components/AdminTrustGuideView.js";
5048
- // [CLIENT-SSR]-Admin WhatsApp integration guide — static view, no firebase-admin.
5049
- export { AdminWhatsAppGuideView } from "./features/admin/components/AdminWhatsAppGuideView.js";
5050
5049
  // [CLIENT-SSR]-Admin payments (Razorpay) guide — static view, no firebase-admin.
5051
5050
  export { AdminPaymentsGuideView } from "./features/admin/components/AdminPaymentsGuideView.js";
5052
5051
  // [CLIENT-SSR]-Buyer shopping guide — static view, no firebase-admin.
@@ -5069,8 +5068,6 @@ export { StoreFinanceGuideView } from "./features/stores/components/StoreFinance
5069
5068
  export { StoreCapabilitiesGuideView } from "./features/stores/components/StoreCapabilitiesGuideView.js";
5070
5069
  // [CLIENT-SSR]-Store settings guide — static view, no firebase-admin.
5071
5070
  export { StoreSettingsGuideView } from "./features/stores/components/StoreSettingsGuideView.js";
5072
- // [CLIENT-SSR]-Store WhatsApp catalog sync guide — static view, no firebase-admin.
5073
- export { StoreWhatsAppGuideView } from "./features/stores/components/StoreWhatsAppGuideView.js";
5074
5071
  export { StorePreOrdersListing } from "./features/stores/components/StorePreOrdersListing.js";
5075
5072
  // [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
5076
5073
  // buildStoreColumns - Helper for build store columns.
@@ -5146,35 +5143,11 @@ export { storeSlugGET } from "./features/stores/server.js";
5146
5143
  // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
5147
5144
  // updateStoreAddressForSeller - Helper for update store address for seller.
5148
5145
  export { updateStoreAddressForSeller } from "./features/stores/server.js";
5149
- // ./features/whatsapp-bot/index
5150
- // [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
5151
- // WhatsAppChatButton - Component for whats app chat button.
5152
- export { WhatsAppChatButton } from "./features/whatsapp-bot/index.js";
5153
- export { SellerWhatsAppSettingsView } from "./features/whatsapp-bot/index.js";
5154
- // ./features/whatsapp-bot/server
5155
- // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
5156
- // buildCheckoutMessageURL - Helper for build checkout message url.
5157
- export { buildCheckoutMessageURL } from "./features/whatsapp-bot/server.js";
5158
- // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
5159
- // buildStatusMessage - Helper for build status message.
5160
- export { buildStatusMessage } from "./features/whatsapp-bot/server.js";
5161
- // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
5162
- // buildStatusNotificationURL - Helper for build status notification url.
5163
- export { buildStatusNotificationURL } from "./features/whatsapp-bot/server.js";
5164
- // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
5165
- // buildPaymentProofReviewMessage - Helper for build payment proof review message (Tier PP).
5166
- export { buildPaymentProofReviewMessage } from "./features/whatsapp-bot/server.js";
5167
- // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
5168
- // isAdminNumber - Shared export for is admin number.
5169
- export { isAdminNumber } from "./features/whatsapp-bot/server.js";
5170
- // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
5171
- // parseIncomingWebhookPayload - Helper for parse incoming webhook payload.
5172
- export { parseIncomingWebhookPayload } from "./features/whatsapp-bot/server.js";
5173
- // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
5174
- // sendWhatsAppMessage - Shared export for send whats app message.
5175
- export { sendWhatsAppMessage } from "./features/whatsapp-bot/server.js";
5176
- // [SERVER-ONLY] Meta WhatsApp Business Cloud API helpers (WA1-WA8 integration)
5177
- export { sendWhatsAppBusinessMessage, syncProductsToCatalog, buildPurchaseAnnouncementMessage, buildGroupShareLink } from "./features/whatsapp-bot/server.js";
5146
+ // ./features/orders/utils/payment-proof-message
5147
+ // [CLIENT-SAFE] Pure wa.me share-link message builder — no crypto, no network.
5148
+ // The WhatsApp Cloud API integration was removed 2026-10-20; this survived
5149
+ // because a wa.me deep link needs no token, number or Meta billing account.
5150
+ export { buildPaymentProofReviewMessage } from "./features/orders/utils/payment-proof-message.js";
5178
5151
  // ./features/wishlist/index
5179
5152
  // [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
5180
5153
  // WishlistCard - Component for wishlist card.
@@ -5507,6 +5480,8 @@ export { renderPrivateProfileOgImage, renderUserProfileOgImage } from "./_intern
5507
5480
  // Listing-type capability registry â€" SB-UNI X1.
5508
5481
  export { LISTING_TYPE_CAPABILITIES, capabilityFor, canAddToCart, canBid, supportsShipping, requiresVendorVerified, requiresJurisdictionCheck, hasInstantFulfillment, assertNever, } from "./_internal/shared/listing-types/capabilities.js";
5509
5482
  export { LISTING_TYPE_REGISTRY, pluginFor, detectListingTypeFromSlug } from "./_internal/shared/listing-types/_registry.js";
5483
+ // Pencil / clone / bin for whoever owns the record, on a PUBLIC surface.
5484
+ export { OwnerQuickActions } from "./features/admin/components/OwnerQuickActions.js";
5510
5485
  // Checkout rule registry â€" pure TS, safe in both client and server bundles.
5511
5486
  export { getListingRule, getCategoryRule, pickOrderType, getSplitKey, runSyncPreflight, CHECKOUT_RULES, CATEGORY_CHECKOUT_RULES, CHECKOUT_MAX_ORDERS_PER_TX, PRIZE_DRAW_MAX_REVEALS_PER_ORDER, BUNDLE_MAX_QTY_PER_TX, STANDARD_MAX_QTY_PER_LINE, } from "./_internal/shared/checkout/rules/index.js";
5512
5487
  // Media upload limits â€" pure constants, safe in both client and server bundles.
@@ -5633,3 +5608,7 @@ export { RETURN_CUSTODY_STATES, RETURN_CUSTODY_COPY, isTerminalCustody, canAdvan
5633
5608
  export { resolveReturnAddress, RTO_ENTRY_CUSTODY, rtoCostBearer, RETURN_ABUSE_SCAM_TYPES, RETURN_ABUSE_THRESHOLDS, returnAbuseSignals, enforcementFor, } from "./_internal/shared/features/returns/destination.js";
5634
5609
  // C5f — courier ratings. Two numbers, never blended; see the module header.
5635
5610
  export { COURIER_RATING_MIN_CONFIDENT_SAMPLES, courierRatingDisplay, isValidCourierVote, courierVoteId, rollUpCourierVotes, } from "./_internal/shared/features/shipping/courier-rating.js";
5611
+ // The platform's statutory identity, injected at boot from appkit.config.js's
5612
+ // `business` block via the consumer's providers.config.ts. See the module
5613
+ // header for why the invoice path must not read it from siteSettings.
5614
+ export { configurePlatformSupplier, getPlatformSupplier, resetPlatformSupplier, } from "./_internal/shared/features/site-settings/supplier-of-record.js";
@@ -183,6 +183,7 @@ export declare const DEFAULT_ROUTE_MAP: {
183
183
  readonly CHECKOUT_SUCCESS: "/checkout/success";
184
184
  readonly OFFERS: "/user/offers";
185
185
  readonly REVIEWS: "/user/reviews";
186
+ readonly REVIEW_EDIT: (id: string) => string;
186
187
  readonly BIDS: "/user/bids";
187
188
  readonly BID_DETAIL: (id: string) => string;
188
189
  readonly RETURNS: "/user/returns";
@@ -618,6 +619,7 @@ export declare const ROUTES: {
618
619
  readonly CHECKOUT_SUCCESS: "/checkout/success";
619
620
  readonly OFFERS: "/user/offers";
620
621
  readonly REVIEWS: "/user/reviews";
622
+ readonly REVIEW_EDIT: (id: string) => string;
621
623
  readonly BIDS: "/user/bids";
622
624
  readonly BID_DETAIL: (id: string) => string;
623
625
  readonly RETURNS: "/user/returns";
@@ -273,6 +273,15 @@ export const DEFAULT_ROUTE_MAP = {
273
273
  CHECKOUT_SUCCESS: "/checkout/success",
274
274
  OFFERS: "/user/offers",
275
275
  REVIEWS: "/user/reviews",
276
+ /*
277
+ * The buyer's own review editor. There was no edit route for a review in
278
+ * EITHER portal — the user index was list-only and the admin side had just
279
+ * /admin/reviews — so a reviewer had no way to change what they had
280
+ * written. Added with its page and its nav entry in the same change
281
+ * (Root Cause #37: a route with no page, or a page with no nav, ships as
282
+ * half done).
283
+ */
284
+ REVIEW_EDIT: (id) => `/user/reviews/${id}/edit`,
276
285
  BIDS: "/user/bids",
277
286
  BID_DETAIL: (id) => `/user/bids/${id}/view`,
278
287
  RETURNS: "/user/returns",
@@ -0,0 +1,98 @@
1
+ /**
2
+ * @mohasinac/shipping-shiprocket — IShippingProvider over Shiprocket's v1 API.
3
+ *
4
+ * ── Read this before trusting it ──────────────────────────────────────────
5
+ *
6
+ * ── What is verified, and what is not ────────────────────────────────────
7
+ *
8
+ * ✅ VERIFIED against the live API (2026-10-20, real API-user credentials):
9
+ * `POST /v1/external/auth/login` returns HTTP 200 with
10
+ * `{ company_id, created_at, email, first_name, id, last_name, token }`.
11
+ * The `token` field is present and non-empty, which is the only field
12
+ * `loginResponse` requires — the rest are ignored, as Zod ignores unknown
13
+ * keys by default.
14
+ *
15
+ * 🛑 NOT VERIFIED: every other endpoint. Order creation, AWB assignment,
16
+ * tracking, serviceability and label generation all MUTATE or bill against
17
+ * a real carrier account, so none was called. Their field names below are
18
+ * claims taken from the published docs, not facts read off a payload.
19
+ *
20
+ * That asymmetry is the reason every response is parsed through Zod rather
21
+ * than cast: an unverified contract that is wrong surfaces as a named error at
22
+ * the boundary, instead of as an `undefined` AWB written to an order and shown
23
+ * to a buyer as a tracking number that tracks nothing.
24
+ *
25
+ * ── Auth: why a dedicated API user, and why the token is cached ───────────
26
+ *
27
+ * Shiprocket's core v1 API has no long-lived key/secret. You POST credentials
28
+ * to `/v1/external/auth/login` and receive a bearer token valid for roughly
29
+ * ten days, then log in again.
30
+ *
31
+ * 🛑 Those credentials should be a DEDICATED API USER (Shiprocket dashboard →
32
+ * Settings → API → Configure), not the dashboard login. Using the dashboard
33
+ * account means the token dies whenever someone changes that password — a
34
+ * shipping integration that breaks on an unrelated admin action — and it hands
35
+ * full account scope to this process. The env var is named
36
+ * `SHIPROCKET_LOGIN_USER_EMAIL` rather than `LOGIN_ID` because the login payload
37
+ * field is `email`; a var called "login id" invites someone to put a username
38
+ * in it and get a 400 they cannot explain.
39
+ *
40
+ * 🛑 The token is cached in module state with its expiry. Logging in per
41
+ * request would mean two round trips for every shipment and would hit
42
+ * Shiprocket's auth rate limit under any real volume. A 401 mid-flight clears
43
+ * the cache and retries ONCE — exactly once, because a credential that is
44
+ * genuinely wrong must fail fast rather than loop.
45
+ *
46
+ * ── What is deliberately NOT here ────────────────────────────────────────
47
+ *
48
+ * Inbound webhooks. Shiprocket pushes status updates to a URL configured in
49
+ * its dashboard and authenticates them with an `x-api-key` header whose value
50
+ * you set there — a THIRD secret, and an inbound route rather than a provider
51
+ * method. `trackShipment` below polls instead, which is correct for a provider
52
+ * contract and wasteful as a status mechanism; the webhook is the better
53
+ * answer and belongs in its own route with its own verification.
54
+ *
55
+ * @tag domain:shipping
56
+ * @tag layer:providers
57
+ * @tag access:server-only
58
+ */
59
+ import { IShippingProvider } from "../../contracts";
60
+ import type { CreateShipmentInput, Shipment, TrackingInfo, ServiceabilityResult } from "../../contracts";
61
+ export interface ShiprocketConfig {
62
+ /** The API user's email. See the header on why this is not a "login id". */
63
+ email: string;
64
+ password: string;
65
+ /** Shiprocket pickup-location nickname, as registered in their dashboard. */
66
+ pickupLocation?: string;
67
+ }
68
+ export declare class ShiprocketShippingProvider extends IShippingProvider {
69
+ private readonly config;
70
+ readonly name = "shiprocket";
71
+ private token;
72
+ private tokenExpiresAt;
73
+ constructor(config: ShiprocketConfig);
74
+ /**
75
+ * A bearer token, logging in only when the cached one is absent or stale.
76
+ *
77
+ * The 60-second safety margin matters: a token that expires mid-request
78
+ * produces a 401 the caller has to interpret, and shaving a minute off a
79
+ * ten-day lifetime costs nothing.
80
+ */
81
+ private getToken;
82
+ /**
83
+ * One authenticated call, with a single re-auth on 401.
84
+ *
85
+ * 🛑 Exactly one retry. A token that expired early is worth one more attempt;
86
+ * a credential that is wrong must fail rather than loop, because a retry loop
87
+ * against an auth endpoint is how an integration gets rate-limited and then
88
+ * looks like an outage.
89
+ */
90
+ private call;
91
+ /** Their order payload wants the address flattened across many keys. */
92
+ private addressFields;
93
+ createShipment(data: CreateShipmentInput): Promise<Shipment>;
94
+ trackShipment(trackingId: string): Promise<TrackingInfo>;
95
+ cancelShipment(shipmentId: string): Promise<void>;
96
+ checkServiceability(pincode: string, weight: number): Promise<ServiceabilityResult>;
97
+ generateLabel(shipmentId: string): Promise<ArrayBuffer>;
98
+ }