@mohasinac/appkit 3.2.20 → 3.3.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 (190) hide show
  1. package/dist/_internal/server/features/checkout/actions.d.ts +2 -0
  2. package/dist/_internal/server/features/checkout/actions.js +239 -190
  3. package/dist/_internal/server/functions/scheduled.d.ts +2 -1
  4. package/dist/_internal/server/functions/scheduled.js +9 -1
  5. package/dist/_internal/server/jobs/core/autoPayoutEligibility.js +8 -11
  6. package/dist/_internal/server/jobs/core/emiInstallmentReminder.d.ts +8 -0
  7. package/dist/_internal/server/jobs/core/emiInstallmentReminder.js +78 -0
  8. package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.d.ts +2 -2
  9. package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.js +15 -10
  10. package/dist/_internal/server/jobs/handlers/emiInstallmentReminder.d.ts +2 -0
  11. package/dist/_internal/server/jobs/handlers/emiInstallmentReminder.js +2 -0
  12. package/dist/_internal/server/jobs/handlers/index.d.ts +1 -0
  13. package/dist/_internal/server/jobs/handlers/index.js +2 -0
  14. package/dist/_internal/server/providers/index.d.ts +4 -4
  15. package/dist/_internal/server/providers/index.js +4 -4
  16. package/dist/_internal/server/providers/payment/razorpay-mock.d.ts +3 -2
  17. package/dist/_internal/server/providers/payment/razorpay-mock.js +3 -1
  18. package/dist/_internal/server/providers/resolve.d.ts +10 -13
  19. package/dist/_internal/server/providers/resolve.js +9 -15
  20. package/dist/_internal/shared/actions/action-registry.js +28 -0
  21. package/dist/_internal/shared/checkout/rules/_defaults.js +1 -0
  22. package/dist/_internal/shared/checkout/rules/_registry.js +4 -0
  23. package/dist/_internal/shared/checkout/rules/art.rule.d.ts +9 -0
  24. package/dist/_internal/shared/checkout/rules/art.rule.js +5 -0
  25. package/dist/_internal/shared/checkout/rules/auction.rule.js +1 -0
  26. package/dist/_internal/shared/checkout/rules/classified.rule.js +1 -0
  27. package/dist/_internal/shared/checkout/rules/index.d.ts +2 -0
  28. package/dist/_internal/shared/checkout/rules/index.js +2 -0
  29. package/dist/_internal/shared/checkout/rules/stickers.rule.d.ts +9 -0
  30. package/dist/_internal/shared/checkout/rules/stickers.rule.js +5 -0
  31. package/dist/_internal/shared/checkout/rules/types.d.ts +6 -0
  32. package/dist/_internal/shared/features/checkout/config.d.ts +16 -1
  33. package/dist/_internal/shared/features/checkout/config.js +16 -1
  34. package/dist/_internal/shared/features/emi/schedule.d.ts +63 -0
  35. package/dist/_internal/shared/features/emi/schedule.js +62 -0
  36. package/dist/_internal/shared/fees/calculator.d.ts +53 -0
  37. package/dist/_internal/shared/fees/calculator.js +40 -0
  38. package/dist/_internal/shared/listing-types/_registry.d.ts +22 -66
  39. package/dist/_internal/shared/listing-types/_registry.js +19 -2
  40. package/dist/_internal/shared/listing-types/art/config.d.ts +15 -0
  41. package/dist/_internal/shared/listing-types/art/config.js +14 -0
  42. package/dist/_internal/shared/listing-types/art/ctas.d.ts +1 -0
  43. package/dist/_internal/shared/listing-types/art/ctas.js +3 -0
  44. package/dist/_internal/shared/listing-types/art/og.d.ts +1 -0
  45. package/dist/_internal/shared/listing-types/art/og.js +1 -0
  46. package/dist/_internal/shared/listing-types/art/schema.d.ts +2 -0
  47. package/dist/_internal/shared/listing-types/art/schema.js +3 -0
  48. package/dist/_internal/shared/listing-types/art/seed-factory.d.ts +1 -0
  49. package/dist/_internal/shared/listing-types/art/seed-factory.js +1 -0
  50. package/dist/_internal/shared/listing-types/auction/config.d.ts +8 -0
  51. package/dist/_internal/shared/listing-types/auction/config.js +6 -0
  52. package/dist/_internal/shared/listing-types/capabilities.js +17 -0
  53. package/dist/_internal/shared/listing-types/classified/config.d.ts +8 -0
  54. package/dist/_internal/shared/listing-types/classified/config.js +6 -0
  55. package/dist/_internal/shared/listing-types/digital-code/config.d.ts +8 -0
  56. package/dist/_internal/shared/listing-types/digital-code/config.js +6 -0
  57. package/dist/_internal/shared/listing-types/live/config.d.ts +8 -0
  58. package/dist/_internal/shared/listing-types/live/config.js +6 -0
  59. package/dist/_internal/shared/listing-types/pre-order/config.d.ts +8 -0
  60. package/dist/_internal/shared/listing-types/pre-order/config.js +6 -0
  61. package/dist/_internal/shared/listing-types/prize-draw/config.d.ts +8 -0
  62. package/dist/_internal/shared/listing-types/prize-draw/config.js +6 -0
  63. package/dist/_internal/shared/listing-types/standard/config.d.ts +8 -0
  64. package/dist/_internal/shared/listing-types/standard/config.js +6 -0
  65. package/dist/_internal/shared/listing-types/stickers/config.d.ts +15 -0
  66. package/dist/_internal/shared/listing-types/stickers/config.js +14 -0
  67. package/dist/_internal/shared/listing-types/stickers/ctas.d.ts +1 -0
  68. package/dist/_internal/shared/listing-types/stickers/ctas.js +3 -0
  69. package/dist/_internal/shared/listing-types/stickers/og.d.ts +1 -0
  70. package/dist/_internal/shared/listing-types/stickers/og.js +1 -0
  71. package/dist/_internal/shared/listing-types/stickers/schema.d.ts +2 -0
  72. package/dist/_internal/shared/listing-types/stickers/schema.js +3 -0
  73. package/dist/_internal/shared/listing-types/stickers/seed-factory.d.ts +1 -0
  74. package/dist/_internal/shared/listing-types/stickers/seed-factory.js +1 -0
  75. package/dist/client.d.ts +7 -2
  76. package/dist/client.js +4 -2
  77. package/dist/constants/field-names.d.ts +2 -6
  78. package/dist/constants/field-names.js +2 -6
  79. package/dist/contracts/index.d.ts +4 -2
  80. package/dist/contracts/index.js +6 -0
  81. package/dist/contracts/payment.d.ts +14 -9
  82. package/dist/contracts/payment.js +11 -1
  83. package/dist/contracts/shipping.d.ts +14 -9
  84. package/dist/contracts/shipping.js +11 -1
  85. package/dist/features/about/components/PublicProfileView.js +3 -6
  86. package/dist/features/admin/components/AdminAddressBookView.d.ts +11 -0
  87. package/dist/features/admin/components/AdminAddressBookView.js +30 -0
  88. package/dist/features/admin/components/AdminArtView.d.ts +3 -0
  89. package/dist/features/admin/components/AdminArtView.js +45 -0
  90. package/dist/features/admin/components/AdminSiteConfigGuideView.js +1 -1
  91. package/dist/features/admin/components/AdminSiteSettingsView.js +14 -9
  92. package/dist/features/admin/components/AdminStickersView.d.ts +3 -0
  93. package/dist/features/admin/components/AdminStickersView.js +45 -0
  94. package/dist/features/admin/components/index.d.ts +6 -0
  95. package/dist/features/admin/components/index.js +4 -0
  96. package/dist/features/admin/schemas/firestore.d.ts +19 -11
  97. package/dist/features/admin/schemas/firestore.js +12 -2
  98. package/dist/features/auctions/components/MarketplaceAuctionCard.d.ts +3 -2
  99. package/dist/features/auth/hooks/useAuth.js +35 -9
  100. package/dist/features/auth/schemas/firestore.d.ts +2 -6
  101. package/dist/features/cart/schemas/firestore.d.ts +3 -2
  102. package/dist/features/consultation/schemas/index.d.ts +2 -2
  103. package/dist/features/loyalty/schemas/index.d.ts +6 -6
  104. package/dist/features/orders/repository/orders.repository.d.ts +20 -2
  105. package/dist/features/orders/repository/orders.repository.js +34 -5
  106. package/dist/features/orders/schemas/firestore.d.ts +33 -7
  107. package/dist/features/orders/schemas/firestore.js +1 -1
  108. package/dist/features/orders/schemas/index.d.ts +176 -31
  109. package/dist/features/orders/schemas/index.js +20 -6
  110. package/dist/features/orders/types/index.d.ts +3 -3
  111. package/dist/features/payments/repository/payout.repository.js +2 -2
  112. package/dist/features/payments/schemas/firestore.d.ts +3 -3
  113. package/dist/features/payments/schemas/firestore.js +2 -2
  114. package/dist/features/payments/schemas/index.d.ts +5 -5
  115. package/dist/features/payments/schemas/index.js +2 -2
  116. package/dist/features/products/api/[id]/route.js +4 -1
  117. package/dist/features/products/api/route.js +4 -1
  118. package/dist/features/products/components/CompareOverlay.js +7 -9
  119. package/dist/features/products/components/ProductDetailPageView.d.ts +3 -1
  120. package/dist/features/products/components/ProductDetailPageView.js +2 -2
  121. package/dist/features/products/components/ProductForm.js +18 -7
  122. package/dist/features/products/components/ProductGrid.js +7 -12
  123. package/dist/features/products/components/ShowGroupSection.js +3 -5
  124. package/dist/features/products/components/SublistingCarouselSection.js +3 -6
  125. package/dist/features/products/constants/listing-tabs.d.ts +32 -0
  126. package/dist/features/products/constants/listing-tabs.js +8 -0
  127. package/dist/features/products/index.d.ts +1 -1
  128. package/dist/features/products/index.js +3 -1
  129. package/dist/features/products/schemas/firestore.d.ts +20 -1
  130. package/dist/features/products/schemas/firestore.js +2 -0
  131. package/dist/features/products/schemas/index.d.ts +48 -0
  132. package/dist/features/products/schemas/index.js +9 -0
  133. package/dist/features/products/schemas/product-features.d.ts +1 -1
  134. package/dist/features/products/types/index.d.ts +5 -3
  135. package/dist/features/products/utils/listing-type.d.ts +6 -0
  136. package/dist/features/products/utils/listing-type.js +3 -0
  137. package/dist/features/reviews/api/[id]/route.js +5 -4
  138. package/dist/features/seller/actions/seller-actions.d.ts +29 -14
  139. package/dist/features/seller/actions/seller-actions.js +101 -27
  140. package/dist/features/seller/components/SellerArtView.d.ts +7 -0
  141. package/dist/features/seller/components/SellerArtView.js +114 -0
  142. package/dist/features/seller/components/SellerOrdersView.js +38 -1
  143. package/dist/features/seller/components/SellerProductShell.d.ts +5 -1
  144. package/dist/features/seller/components/SellerProductShell.js +69 -59
  145. package/dist/features/seller/components/SellerShippingView.js +6 -25
  146. package/dist/features/seller/components/SellerStickersView.d.ts +7 -0
  147. package/dist/features/seller/components/SellerStickersView.js +114 -0
  148. package/dist/features/seller/components/index.d.ts +4 -0
  149. package/dist/features/seller/components/index.js +2 -0
  150. package/dist/features/seller/messages/en.json +1 -1
  151. package/dist/features/seller/schemas/index.d.ts +7 -7
  152. package/dist/features/seller/schemas/index.js +1 -1
  153. package/dist/features/seller/types/index.d.ts +1 -1
  154. package/dist/features/stores/components/StoreDetailLayoutView.js +18 -2
  155. package/dist/features/stores/schemas/firestore.d.ts +7 -1
  156. package/dist/features/stores/schemas/index.d.ts +19 -16
  157. package/dist/features/stores/schemas/index.js +1 -1
  158. package/dist/index.d.ts +21 -36
  159. package/dist/index.js +27 -39
  160. package/dist/next/routing/route-map.d.ts +22 -0
  161. package/dist/next/routing/route-map.js +10 -0
  162. package/dist/providers/payment-manual/index.d.ts +40 -0
  163. package/dist/providers/payment-manual/index.js +91 -0
  164. package/dist/providers/payment-razorpay/index.d.ts +4 -2
  165. package/dist/providers/payment-razorpay/index.js +4 -1
  166. package/dist/providers/shipping-manual/index.d.ts +22 -0
  167. package/dist/providers/shipping-manual/index.js +47 -0
  168. package/dist/providers.d.ts +2 -2
  169. package/dist/providers.js +5 -3
  170. package/dist/schemas/registry.d.ts +129 -70
  171. package/dist/schemas/registry.js +0 -4
  172. package/dist/security/pii-encrypt.js +0 -7
  173. package/dist/security/pii-redact.js +0 -1
  174. package/dist/seed/conversations-seed-data.js +2 -2
  175. package/dist/seed/faq-seed-data.js +7 -7
  176. package/dist/seed/grouped-listings-seed-data.d.ts +2 -0
  177. package/dist/seed/index.d.ts +2 -0
  178. package/dist/seed/index.js +2 -0
  179. package/dist/seed/manifest.js +20 -16
  180. package/dist/seed/payouts-seed-data.js +5 -5
  181. package/dist/seed/products-art-seed-data.d.ts +11 -0
  182. package/dist/seed/products-art-seed-data.js +125 -0
  183. package/dist/seed/products-preorders-seed-data.d.ts +2 -0
  184. package/dist/seed/products-stickers-seed-data.d.ts +11 -0
  185. package/dist/seed/products-stickers-seed-data.js +125 -0
  186. package/dist/seed/site-settings-seed-data.js +13 -4
  187. package/dist/seed/stores-seed-data.js +11 -11
  188. package/dist/server.d.ts +7 -15
  189. package/dist/server.js +17 -42
  190. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -662,6 +662,8 @@ export { productsPrizeDrawsSeedData } from "./seed/index";
662
662
  export { productsClassifiedsSeedData } from "./seed/index";
663
663
  export { productsDigitalCodesSeedData } from "./seed/index";
664
664
  export { productsLiveItemsSeedData } from "./seed/index";
665
+ export { productsArtSeedData } from "./seed/index";
666
+ export { productsStickersSeedData } from "./seed/index";
665
667
  export { registerSeedLocale } from "./seed/index";
666
668
  export { reviewsSeedData } from "./seed/index";
667
669
  export { seedForTest } from "./seed/index";
@@ -895,40 +897,8 @@ export type { RazorpayOrder } from "./providers/payment-razorpay/index";
895
897
  export type { RazorpayOrderOptions } from "./providers/payment-razorpay/index";
896
898
  export type { RazorpayPaymentResult } from "./providers/payment-razorpay/index";
897
899
  export type { RazorpayRefundResult } from "./providers/payment-razorpay/index";
898
- export { SHIPROCKET_TOKEN_TTL_MS } from "./providers/shipping-shiprocket/index";
899
- export { SHIPROCKET_TRACKING_URL_BASE, buildShiprocketTrackingUrl, SHIPROCKET_STATUS_PICKUP_SCHEDULED, } from "./providers/shipping-shiprocket/index";
900
- export { ShiprocketProvider } from "./providers/shipping-shiprocket/index";
901
- export { isShiprocketTokenExpired } from "./providers/shipping-shiprocket/index";
902
- export { shiprocketAddPickupLocation } from "./providers/shipping-shiprocket/index";
903
- export { shiprocketAuthenticate } from "./providers/shipping-shiprocket/index";
904
- export { shiprocketCheckServiceability } from "./providers/shipping-shiprocket/index";
905
- export { shiprocketCreateOrder } from "./providers/shipping-shiprocket/index";
906
- export { shiprocketGenerateAWB } from "./providers/shipping-shiprocket/index";
907
- export { shiprocketGeneratePickup } from "./providers/shipping-shiprocket/index";
908
- export { shiprocketGetPickupLocations } from "./providers/shipping-shiprocket/index";
909
- export { shiprocketTrackByAWB } from "./providers/shipping-shiprocket/index";
910
- export { shiprocketVerifyPickupOTP } from "./providers/shipping-shiprocket/index";
911
- export type { ShiprocketAWBResponse } from "./providers/shipping-shiprocket/index";
912
- export type { ShiprocketAddPickupRequest } from "./providers/shipping-shiprocket/index";
913
- export type { ShiprocketAddPickupResponse } from "./providers/shipping-shiprocket/index";
914
- export type { ShiprocketAuthRequest } from "./providers/shipping-shiprocket/index";
915
- export type { ShiprocketAuthResponse } from "./providers/shipping-shiprocket/index";
916
- export type { ShiprocketCourierServiceabilityResponse } from "./providers/shipping-shiprocket/index";
917
- export type { ShiprocketCreateOrderRequest } from "./providers/shipping-shiprocket/index";
918
- export type { ShiprocketCreateOrderResponse } from "./providers/shipping-shiprocket/index";
919
- export type { ShiprocketGenerateAWBRequest } from "./providers/shipping-shiprocket/index";
920
- export type { ShiprocketGeneratePickupRequest } from "./providers/shipping-shiprocket/index";
921
- export type { ShiprocketOrderItem } from "./providers/shipping-shiprocket/index";
922
- export type { ShiprocketPickupLocation } from "./providers/shipping-shiprocket/index";
923
- export type { ShiprocketPickupLocationsResponse } from "./providers/shipping-shiprocket/index";
924
- export type { ShiprocketPickupResponse } from "./providers/shipping-shiprocket/index";
925
- export type { ShiprocketProviderConfig } from "./providers/shipping-shiprocket/index";
926
- export type { ShiprocketShipmentTrack } from "./providers/shipping-shiprocket/index";
927
- export type { ShiprocketTrackActivity } from "./providers/shipping-shiprocket/index";
928
- export type { ShiprocketTrackingResponse } from "./providers/shipping-shiprocket/index";
929
- export type { ShiprocketVerifyPickupOTPRequest } from "./providers/shipping-shiprocket/index";
930
- export type { ShiprocketVerifyPickupOTPResponse } from "./providers/shipping-shiprocket/index";
931
- export type { ShiprocketWebhookPayload } from "./providers/shipping-shiprocket/index";
900
+ export { ManualPaymentProvider } from "./providers/payment-manual/index";
901
+ export { ManualShippingProvider } from "./providers/shipping-manual/index";
932
902
  export { STORAGE_PATHS } from "./providers/storage-firebase/client";
933
903
  export { createStorageHelpers } from "./providers/storage-firebase/client";
934
904
  export { validateFileSize } from "./providers/storage-firebase/client";
@@ -1147,6 +1117,8 @@ export { AdminPrizeDrawsView } from "./features/admin/index";
1147
1117
  export { AdminClassifiedView } from "./features/admin/index";
1148
1118
  export { AdminDigitalCodesView } from "./features/admin/index";
1149
1119
  export { AdminLiveView } from "./features/admin/index";
1120
+ export { AdminArtView } from "./features/admin/index";
1121
+ export { AdminStickersView } from "./features/admin/index";
1150
1122
  export type { AdminPrizeDrawsViewProps } from "./features/admin/index";
1151
1123
  export { AdminProductsView } from "./features/admin/index";
1152
1124
  export { AdminProductEditorView } from "./features/admin/index";
@@ -1188,6 +1160,8 @@ export { AdminStoreAddressesView } from "./features/admin/index";
1188
1160
  export type { AdminStoreAddressesViewProps } from "./features/admin/index";
1189
1161
  export { AdminAddressesView } from "./features/admin/index";
1190
1162
  export type { AdminAddressesViewProps } from "./features/admin/index";
1163
+ export { AdminAddressBookView } from "./features/admin/index";
1164
+ export type { AdminAddressBookViewProps } from "./features/admin/index";
1191
1165
  export { AdminAddressClustersView } from "./features/admin/index";
1192
1166
  export type { AdminAddressClustersViewProps } from "./features/admin/index";
1193
1167
  export { AdminPaymentMethodsView } from "./features/admin/index";
@@ -2431,12 +2405,16 @@ export { createProductId } from "./features/products/index";
2431
2405
  export { getProductFilterKeys } from "./features/products/index";
2432
2406
  export { getProductSortOptions } from "./features/products/index";
2433
2407
  export { getProductTableColumns } from "./features/products/index";
2434
- export { normalizeListingType, isAuctionListing, isPreOrderListing, isStandardListing, isPrizeDrawListing, isClassifiedListing, isDigitalCodeListing, isLiveListing, } from "./features/products/index";
2408
+ export { normalizeListingType, isAuctionListing, isPreOrderListing, isStandardListing, isPrizeDrawListing, isClassifiedListing, isDigitalCodeListing, isLiveListing, isArtListing, isStickersListing, } from "./features/products/index";
2435
2409
  export { isListingTypeEnabled, isCategoryTypeEnabled, enabledListingTypes, enabledCategoryTypes, } from "./_internal/shared/listing-types/feature-flags";
2436
2410
  export { actionTracker, setActionTrackerSink, resetActionTrackerSink, type ActionEvent, type ActionTrackerSink, } from "./_internal/shared/listing-types/action-tracker";
2437
2411
  export { cartRequiresShipping, cartIsDigitalOnly, cartIsChatOnly, } from "./_internal/shared/listing-types/cart-shipping";
2438
2412
  export { ACTIONS, action, act, canPerformAction, actionsForListingType, actionLabel, type ActionDef, type ActionKind, type ActionResource, type ActionTree, type ActionConfirmation, } from "./_internal/shared/actions/action-registry";
2439
2413
  export { buildBulkAction } from "./_internal/shared/actions/bulk-helpers";
2414
+ export { computeCheckoutFees, computePayoutDeduction, computeCodHandlingFee, } from "./_internal/shared/fees/calculator";
2415
+ export type { FeeCommissionRates, CheckoutFees, PayoutDeduction, CodHandlingFeeRates, } from "./_internal/shared/fees/calculator";
2416
+ export { checkEmiEligibility, computeEmiSchedule } from "./_internal/shared/features/emi/schedule";
2417
+ export type { EmiSettings, EmiIneligibleReason, EmiEligibility, EmiInstallmentPlan, EmiScheduleResult, } from "./_internal/shared/features/emi/schedule";
2440
2418
  export { isAdminUser, isSellerUser, isModeratorUser, isEmployeeUser, isBuyerUser, } from "./features/auth/role-predicates";
2441
2419
  export { sanitizeProductForPublic, sanitizeProductsForPublic } from "./features/products/index";
2442
2420
  export { productAdminColumns } from "./features/products/index";
@@ -2806,6 +2784,9 @@ export { counterOfferByBuyer } from "./features/seller/server";
2806
2784
  export { createSellerProduct } from "./features/seller/server";
2807
2785
  export { createStore } from "./features/seller/server";
2808
2786
  export { customShipOrder } from "./features/seller/server";
2787
+ export { assertEmiShippable } from "./features/seller/server";
2788
+ export { markEmiInstallmentPaid } from "./features/seller/server";
2789
+ export type { MarkEmiInstallmentPaidInput } from "./features/seller/server";
2809
2790
  export { getSellerAnalytics } from "./features/seller/server";
2810
2791
  export { getSellerPayoutSettings } from "./features/seller/server";
2811
2792
  export { getSellerShipping } from "./features/seller/server";
@@ -3166,7 +3147,7 @@ export { renderPrivateProfileOgImage, renderUserProfileOgImage } from "./_intern
3166
3147
  export type { UserProfileOgData } from "./_internal/server/features/profile/og";
3167
3148
  export { LISTING_TYPE_CAPABILITIES, capabilityFor, canAddToCart, canBid, supportsShipping, requiresVendorVerified, requiresJurisdictionCheck, hasInstantFulfillment, assertNever, } from "./_internal/shared/listing-types/capabilities";
3168
3149
  export type { ListingTypeCapability } from "./_internal/shared/listing-types/capabilities";
3169
- export { LISTING_TYPE_REGISTRY, pluginFor } from "./_internal/shared/listing-types/_registry";
3150
+ export { LISTING_TYPE_REGISTRY, pluginFor, detectListingTypeFromSlug } from "./_internal/shared/listing-types/_registry";
3170
3151
  export type { ListingTypePlugin } from "./_internal/shared/listing-types/_registry";
3171
3152
  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";
3172
3153
  export type { ListingCheckoutRule, CategoryCheckoutRule, CartItemProductPair, OrderItemInput, RefundPolicy, } from "./_internal/shared/checkout/rules";
@@ -3208,6 +3189,10 @@ export { SellerBundlesView } from "./features/seller/components/SellerBundlesVie
3208
3189
  export type { SellerBundlesViewProps } from "./features/seller/components/SellerBundlesView";
3209
3190
  export { SellerClassifiedView } from "./features/seller/components/SellerClassifiedView";
3210
3191
  export type { SellerClassifiedViewProps } from "./features/seller/components/SellerClassifiedView";
3192
+ export { SellerArtView } from "./features/seller/components/SellerArtView";
3193
+ export type { SellerArtViewProps } from "./features/seller/components/SellerArtView";
3194
+ export { SellerStickersView } from "./features/seller/components/SellerStickersView";
3195
+ export type { SellerStickersViewProps } from "./features/seller/components/SellerStickersView";
3211
3196
  export { SellerDigitalCodesView } from "./features/seller/components/SellerDigitalCodesView";
3212
3197
  export type { SellerDigitalCodesViewProps } from "./features/seller/components/SellerDigitalCodesView";
3213
3198
  export { SellerLiveView } from "./features/seller/components/SellerLiveView";
package/dist/index.js CHANGED
@@ -1383,6 +1383,10 @@ export { productsClassifiedsSeedData } from "./seed/index";
1383
1383
  export { productsDigitalCodesSeedData } from "./seed/index";
1384
1384
  // productsLiveItemsSeedData - Seed data for live-item product listings (SB-UNI-K).
1385
1385
  export { productsLiveItemsSeedData } from "./seed/index";
1386
+ // productsArtSeedData - Seed data for art product listings (EMI/art-stickers session).
1387
+ export { productsArtSeedData } from "./seed/index";
1388
+ // productsStickersSeedData - Seed data for stickers product listings (EMI/art-stickers session).
1389
+ export { productsStickersSeedData } from "./seed/index";
1386
1390
  // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
1387
1391
  // registerSeedLocale - Helper for register seed locale.
1388
1392
  export { registerSeedLocale } from "./seed/index";
@@ -1840,45 +1844,14 @@ export { verifyPaymentSignatureWithKeys } from "./providers/payment-razorpay/ind
1840
1844
  // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
1841
1845
  // verifyWebhookSignature - Shared export for verify webhook signature.
1842
1846
  export { verifyWebhookSignature } from "./providers/payment-razorpay/index";
1843
- // ./providers/shipping-shiprocket/index
1847
+ // ./providers/payment-manual/index
1844
1848
  // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
1845
- // SHIPROCKET_TOKEN_TTL_MS - Constant used across modules.
1846
- export { SHIPROCKET_TOKEN_TTL_MS } from "./providers/shipping-shiprocket/index";
1847
- // SHIPROCKET_TRACKING_URL_BASE / buildShiprocketTrackingUrl / SHIPROCKET_STATUS_PICKUP_SCHEDULED â€" pure helpers, see O5.
1848
- export { SHIPROCKET_TRACKING_URL_BASE, buildShiprocketTrackingUrl, SHIPROCKET_STATUS_PICKUP_SCHEDULED, } from "./providers/shipping-shiprocket/index";
1849
+ // ManualPaymentProvider - the default IPaymentProvider implementation (no gateway).
1850
+ export { ManualPaymentProvider } from "./providers/payment-manual/index";
1851
+ // ./providers/shipping-manual/index
1849
1852
  // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
1850
- // ShiprocketProvider - Component for shiprocket provider.
1851
- export { ShiprocketProvider } from "./providers/shipping-shiprocket/index";
1852
- // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
1853
- // isShiprocketTokenExpired - Shared export for is shiprocket token expired.
1854
- export { isShiprocketTokenExpired } from "./providers/shipping-shiprocket/index";
1855
- // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
1856
- // shiprocketAddPickupLocation - Shared export for shiprocket add pickup location.
1857
- export { shiprocketAddPickupLocation } from "./providers/shipping-shiprocket/index";
1858
- // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
1859
- // shiprocketAuthenticate - Shared export for shiprocket authenticate.
1860
- export { shiprocketAuthenticate } from "./providers/shipping-shiprocket/index";
1861
- // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
1862
- // shiprocketCheckServiceability - Shared export for shiprocket check serviceability.
1863
- export { shiprocketCheckServiceability } from "./providers/shipping-shiprocket/index";
1864
- // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
1865
- // shiprocketCreateOrder - Shared export for shiprocket create order.
1866
- export { shiprocketCreateOrder } from "./providers/shipping-shiprocket/index";
1867
- // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
1868
- // shiprocketGenerateAWB - Shared export for shiprocket generate awb.
1869
- export { shiprocketGenerateAWB } from "./providers/shipping-shiprocket/index";
1870
- // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
1871
- // shiprocketGeneratePickup - Shared export for shiprocket generate pickup.
1872
- export { shiprocketGeneratePickup } from "./providers/shipping-shiprocket/index";
1873
- // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
1874
- // shiprocketGetPickupLocations - Shared export for shiprocket get pickup locations.
1875
- export { shiprocketGetPickupLocations } from "./providers/shipping-shiprocket/index";
1876
- // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
1877
- // shiprocketTrackByAWB - Shared export for shiprocket track by awb.
1878
- export { shiprocketTrackByAWB } from "./providers/shipping-shiprocket/index";
1879
- // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
1880
- // shiprocketVerifyPickupOTP - Shared export for shiprocket verify pickup otp.
1881
- export { shiprocketVerifyPickupOTP } from "./providers/shipping-shiprocket/index";
1853
+ // ManualShippingProvider - the default (and only) IShippingProvider implementation.
1854
+ export { ManualShippingProvider } from "./providers/shipping-manual/index";
1882
1855
  // ./providers/storage-firebase/client
1883
1856
  // [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
1884
1857
  // STORAGE_PATHS - Constant used across modules.
@@ -2211,6 +2184,9 @@ export { AdminPrizeDrawsView } from "./features/admin/index";
2211
2184
  export { AdminClassifiedView } from "./features/admin/index";
2212
2185
  export { AdminDigitalCodesView } from "./features/admin/index";
2213
2186
  export { AdminLiveView } from "./features/admin/index";
2187
+ // EMI/art-stickers session — admin listing views for art / stickers.
2188
+ export { AdminArtView } from "./features/admin/index";
2189
+ export { AdminStickersView } from "./features/admin/index";
2214
2190
  // [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
2215
2191
  // AdminProductsView - Component for admin products view.
2216
2192
  export { AdminProductsView } from "./features/admin/index";
@@ -2280,6 +2256,8 @@ export { AdminReturnRequestsView } from "./features/admin/index";
2280
2256
  export { AdminStoreAddressesView } from "./features/admin/index";
2281
2257
  // AdminAddressesView - Address ban management (Banned / Unban Requested / Suspicious tabs).
2282
2258
  export { AdminAddressesView } from "./features/admin/index";
2259
+ // AdminAddressBookView - Address book lookup by owner (ADMIN.ADDRESSES).
2260
+ export { AdminAddressBookView } from "./features/admin/index";
2283
2261
  // AdminAddressClustersView - Multi-account shared address cluster view.
2284
2262
  export { AdminAddressClustersView } from "./features/admin/index";
2285
2263
  // AdminPaymentMethodsView - Payment method ban management.
@@ -4494,7 +4472,7 @@ export { getProductTableColumns } from "./features/products/index";
4494
4472
  // [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
4495
4473
  // normalizeListingType + predicate helpers â€" canonical SB1-G accessors.
4496
4474
  // SB-UNI-F 2026-05-13 â€" Phase 2 predicates added (classified/digital-code/live).
4497
- export { normalizeListingType, isAuctionListing, isPreOrderListing, isStandardListing, isPrizeDrawListing, isClassifiedListing, isDigitalCodeListing, isLiveListing, } from "./features/products/index";
4475
+ export { normalizeListingType, isAuctionListing, isPreOrderListing, isStandardListing, isPrizeDrawListing, isClassifiedListing, isDigitalCodeListing, isLiveListing, isArtListing, isStickersListing, } from "./features/products/index";
4498
4476
  // SB-UNI-X4 2026-05-13 â€" per-type feature-flag helpers.
4499
4477
  export { isListingTypeEnabled, isCategoryTypeEnabled, enabledListingTypes, enabledCategoryTypes, } from "./_internal/shared/listing-types/feature-flags";
4500
4478
  // SB-UNI-X5 2026-05-13 â€" action telemetry sink.
@@ -4504,6 +4482,10 @@ export { cartRequiresShipping, cartIsDigitalOnly, cartIsChatOnly, } from "./_int
4504
4482
  // SB-UNI-W-1 2026-05-13 â€" CTA action registry shell.
4505
4483
  export { ACTIONS, action, act, canPerformAction, actionsForListingType, actionLabel, } from "./_internal/shared/actions/action-registry";
4506
4484
  export { buildBulkAction } from "./_internal/shared/actions/bulk-helpers";
4485
+ // Shared fee calculator — platform/gateway/GST/COD handling fee math (pure, client-safe).
4486
+ export { computeCheckoutFees, computePayoutDeduction, computeCodHandlingFee, } from "./_internal/shared/fees/calculator";
4487
+ // EMI eligibility + schedule computation (pure, client-safe — used for checkout quotes).
4488
+ export { checkEmiEligibility, computeEmiSchedule } from "./_internal/shared/features/emi/schedule";
4507
4489
  // User-role predicates â€" SB-UNI-E 2026-05-13.
4508
4490
  export { isAdminUser, isSellerUser, isModeratorUser, isEmployeeUser, isBuyerUser, } from "./features/auth/role-predicates";
4509
4491
  // [SERVER-ONLY]-Safe in browser but intended for server routes.
@@ -5100,6 +5082,10 @@ export { createStore } from "./features/seller/server";
5100
5082
  // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
5101
5083
  // customShipOrder - Shared export for custom ship order.
5102
5084
  export { customShipOrder } from "./features/seller/server";
5085
+ // assertEmiShippable - the single EMI shipment-gate choke point; any code path that transitions an order to "shipped" must call this first.
5086
+ export { assertEmiShippable } from "./features/seller/server";
5087
+ // markEmiInstallmentPaid - records collection of one EMI installment; recomputes emiRemainingBalance/emiComplete.
5088
+ export { markEmiInstallmentPaid } from "./features/seller/server";
5103
5089
  // [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
5104
5090
  // getSellerAnalytics - Helper for get seller analytics.
5105
5091
  export { getSellerAnalytics } from "./features/seller/server";
@@ -5612,7 +5598,7 @@ export { renderSublistingCategoryOgImage } from "./_internal/server/features/sub
5612
5598
  export { renderPrivateProfileOgImage, renderUserProfileOgImage } from "./_internal/server/features/profile/og";
5613
5599
  // Listing-type capability registry â€" SB-UNI X1.
5614
5600
  export { LISTING_TYPE_CAPABILITIES, capabilityFor, canAddToCart, canBid, supportsShipping, requiresVendorVerified, requiresJurisdictionCheck, hasInstantFulfillment, assertNever, } from "./_internal/shared/listing-types/capabilities";
5615
- export { LISTING_TYPE_REGISTRY, pluginFor } from "./_internal/shared/listing-types/_registry";
5601
+ export { LISTING_TYPE_REGISTRY, pluginFor, detectListingTypeFromSlug } from "./_internal/shared/listing-types/_registry";
5616
5602
  // Checkout rule registry â€" pure TS, safe in both client and server bundles.
5617
5603
  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";
5618
5604
  // Media upload limits â€" pure constants, safe in both client and server bundles.
@@ -5654,6 +5640,8 @@ export { SellerGoogleReviewsView } from "./features/seller/components/SellerGoog
5654
5640
  // ── Wave 5 listing-type views ─────────────────────────────────────────────────
5655
5641
  export { SellerBundlesView } from "./features/seller/components/SellerBundlesView";
5656
5642
  export { SellerClassifiedView } from "./features/seller/components/SellerClassifiedView";
5643
+ export { SellerArtView } from "./features/seller/components/SellerArtView";
5644
+ export { SellerStickersView } from "./features/seller/components/SellerStickersView";
5657
5645
  export { SellerDigitalCodesView } from "./features/seller/components/SellerDigitalCodesView";
5658
5646
  export { SellerLiveView } from "./features/seller/components/SellerLiveView";
5659
5647
  // ── Central schema registry (W1) ──────────────────────────────────────────────
@@ -201,6 +201,12 @@ export declare const DEFAULT_ROUTE_MAP: {
201
201
  readonly LIVE_ITEMS: "/store/live";
202
202
  readonly LIVE_ITEMS_NEW: "/store/live/new";
203
203
  readonly LIVE_ITEMS_EDIT: (id: string) => string;
204
+ readonly ART: "/store/art";
205
+ readonly ART_NEW: "/store/art/new";
206
+ readonly ART_EDIT: (id: string) => string;
207
+ readonly STICKERS: "/store/stickers";
208
+ readonly STICKERS_NEW: "/store/stickers/new";
209
+ readonly STICKERS_EDIT: (id: string) => string;
204
210
  readonly PRINT_CENTER: "/store/print-center";
205
211
  readonly INVENTORY_PRINT: "/store/inventory/print";
206
212
  readonly FULFILLMENT: "/store/fulfillment";
@@ -260,6 +266,8 @@ export declare const DEFAULT_ROUTE_MAP: {
260
266
  readonly CLASSIFIED: "/admin/classified";
261
267
  readonly DIGITAL_CODES: "/admin/digital-codes";
262
268
  readonly LIVE: "/admin/live";
269
+ readonly ART: "/admin/art";
270
+ readonly STICKERS: "/admin/stickers";
263
271
  readonly GROUPED_LISTINGS: "/admin/grouped-listings";
264
272
  readonly DEALS: "/admin/deals";
265
273
  readonly FEATURED: "/admin/featured";
@@ -542,6 +550,12 @@ export declare const ROUTES: {
542
550
  readonly LIVE_ITEMS: "/store/live";
543
551
  readonly LIVE_ITEMS_NEW: "/store/live/new";
544
552
  readonly LIVE_ITEMS_EDIT: (id: string) => string;
553
+ readonly ART: "/store/art";
554
+ readonly ART_NEW: "/store/art/new";
555
+ readonly ART_EDIT: (id: string) => string;
556
+ readonly STICKERS: "/store/stickers";
557
+ readonly STICKERS_NEW: "/store/stickers/new";
558
+ readonly STICKERS_EDIT: (id: string) => string;
545
559
  readonly PRINT_CENTER: "/store/print-center";
546
560
  readonly INVENTORY_PRINT: "/store/inventory/print";
547
561
  readonly FULFILLMENT: "/store/fulfillment";
@@ -601,6 +615,8 @@ export declare const ROUTES: {
601
615
  readonly CLASSIFIED: "/admin/classified";
602
616
  readonly DIGITAL_CODES: "/admin/digital-codes";
603
617
  readonly LIVE: "/admin/live";
618
+ readonly ART: "/admin/art";
619
+ readonly STICKERS: "/admin/stickers";
604
620
  readonly GROUPED_LISTINGS: "/admin/grouped-listings";
605
621
  readonly DEALS: "/admin/deals";
606
622
  readonly FEATURED: "/admin/featured";
@@ -746,6 +762,12 @@ export declare const SELLER_ROUTES: {
746
762
  readonly LIVE_ITEMS: "/store/live";
747
763
  readonly LIVE_ITEMS_NEW: "/store/live/new";
748
764
  readonly LIVE_ITEMS_EDIT: (id: string) => string;
765
+ readonly ART: "/store/art";
766
+ readonly ART_NEW: "/store/art/new";
767
+ readonly ART_EDIT: (id: string) => string;
768
+ readonly STICKERS: "/store/stickers";
769
+ readonly STICKERS_NEW: "/store/stickers/new";
770
+ readonly STICKERS_EDIT: (id: string) => string;
749
771
  readonly PRINT_CENTER: "/store/print-center";
750
772
  readonly INVENTORY_PRINT: "/store/inventory/print";
751
773
  readonly FULFILLMENT: "/store/fulfillment";
@@ -191,6 +191,13 @@ export const DEFAULT_ROUTE_MAP = {
191
191
  LIVE_ITEMS: "/store/live",
192
192
  LIVE_ITEMS_NEW: "/store/live/new",
193
193
  LIVE_ITEMS_EDIT: (id) => `/store/live/${id}/edit`,
194
+ // EMI/art-stickers session — art / stickers
195
+ ART: "/store/art",
196
+ ART_NEW: "/store/art/new",
197
+ ART_EDIT: (id) => `/store/art/${id}/edit`,
198
+ STICKERS: "/store/stickers",
199
+ STICKERS_NEW: "/store/stickers/new",
200
+ STICKERS_EDIT: (id) => `/store/stickers/${id}/edit`,
194
201
  PRINT_CENTER: "/store/print-center",
195
202
  INVENTORY_PRINT: "/store/inventory/print",
196
203
  FULFILLMENT: "/store/fulfillment",
@@ -252,6 +259,9 @@ export const DEFAULT_ROUTE_MAP = {
252
259
  CLASSIFIED: "/admin/classified",
253
260
  DIGITAL_CODES: "/admin/digital-codes",
254
261
  LIVE: "/admin/live",
262
+ // EMI/art-stickers session — art / stickers
263
+ ART: "/admin/art",
264
+ STICKERS: "/admin/stickers",
255
265
  GROUPED_LISTINGS: "/admin/grouped-listings",
256
266
  DEALS: "/admin/deals",
257
267
  FEATURED: "/admin/featured",
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @mohasinac/payment-manual — the default IPaymentProvider implementation.
3
+ *
4
+ * There is no gateway here: the buyer pays via bank transfer / UPI outside
5
+ * the app and uploads a reference (UTR) + proof image, which the seller or
6
+ * admin manually confirms. This mirrors the `paymentProofUrl` /
7
+ * `paymentTransactionId` fields already on `OrderDocument` — this class
8
+ * formalizes that flow behind the `IPaymentProvider` contract so callers
9
+ * that go through `getProviders().payment` get a real implementation
10
+ * instead of `undefined`.
11
+ *
12
+ * In-memory bookkeeping only (like `MockRazorpayProvider`) — there is no
13
+ * external system of record. The order document itself (`paymentStatus`,
14
+ * `paymentTransactionId`, `paymentProofUrl`) is the actual source of truth;
15
+ * this provider is a thin, self-consistent adapter for code that talks to
16
+ * `IPaymentProvider` generically rather than the order repository directly.
17
+ */
18
+ import { IPaymentProvider } from "../../contracts";
19
+ import type { PaymentOrder, PaymentCapture, Refund } from "../../contracts";
20
+ import type { JsonValue } from "../../schemas/types";
21
+ export declare class ManualPaymentProvider extends IPaymentProvider {
22
+ readonly name = "manual";
23
+ private readonly orders;
24
+ private readonly captures;
25
+ createOrder(amount: number, currency: string, metadata?: Record<string, JsonValue>): Promise<PaymentOrder>;
26
+ /** Manual payments have no webhook source — always false. */
27
+ verifyWebhook(_payload: string, _signature: string): boolean;
28
+ /**
29
+ * Manual payments are considered captured the moment the buyer's
30
+ * reference/proof is recorded — there is no separate auth+capture step.
31
+ */
32
+ capturePayment(orderId: string): Promise<PaymentCapture>;
33
+ /**
34
+ * Records the refund as pending — the actual money movement happens via
35
+ * bank transfer outside the system and is reconciled manually by an
36
+ * admin, same as the rest of the manual-payment flow.
37
+ */
38
+ refund(paymentId: string, amount?: number): Promise<Refund>;
39
+ getOrder(orderId: string): Promise<PaymentOrder>;
40
+ }
@@ -0,0 +1,91 @@
1
+ /**
2
+ * @mohasinac/payment-manual — the default IPaymentProvider implementation.
3
+ *
4
+ * There is no gateway here: the buyer pays via bank transfer / UPI outside
5
+ * the app and uploads a reference (UTR) + proof image, which the seller or
6
+ * admin manually confirms. This mirrors the `paymentProofUrl` /
7
+ * `paymentTransactionId` fields already on `OrderDocument` — this class
8
+ * formalizes that flow behind the `IPaymentProvider` contract so callers
9
+ * that go through `getProviders().payment` get a real implementation
10
+ * instead of `undefined`.
11
+ *
12
+ * In-memory bookkeeping only (like `MockRazorpayProvider`) — there is no
13
+ * external system of record. The order document itself (`paymentStatus`,
14
+ * `paymentTransactionId`, `paymentProofUrl`) is the actual source of truth;
15
+ * this provider is a thin, self-consistent adapter for code that talks to
16
+ * `IPaymentProvider` generically rather than the order repository directly.
17
+ */
18
+ import { randomBytes } from "node:crypto";
19
+ import { IPaymentProvider } from "../../contracts";
20
+ export class ManualPaymentProvider extends IPaymentProvider {
21
+ constructor() {
22
+ super(...arguments);
23
+ this.name = "manual";
24
+ this.orders = new Map();
25
+ this.captures = new Map();
26
+ }
27
+ async createOrder(amount, currency, metadata) {
28
+ const order = {
29
+ id: `manual_order_${randomBytes(8).toString("hex")}`,
30
+ amount,
31
+ currency,
32
+ status: "created",
33
+ metadata,
34
+ createdAt: new Date().toISOString(),
35
+ };
36
+ this.orders.set(order.id, order);
37
+ return order;
38
+ }
39
+ /** Manual payments have no webhook source — always false. */
40
+ verifyWebhook(_payload, _signature) {
41
+ return false;
42
+ }
43
+ /**
44
+ * Manual payments are considered captured the moment the buyer's
45
+ * reference/proof is recorded — there is no separate auth+capture step.
46
+ */
47
+ async capturePayment(orderId) {
48
+ const order = this.orders.get(orderId);
49
+ if (!order) {
50
+ throw Object.assign(new Error(`Manual order not found: ${orderId}`), {
51
+ httpStatus: 404,
52
+ });
53
+ }
54
+ const capture = {
55
+ id: `manual_pay_${randomBytes(8).toString("hex")}`,
56
+ orderId,
57
+ amount: order.amount,
58
+ currency: order.currency,
59
+ status: "captured",
60
+ capturedAt: new Date().toISOString(),
61
+ };
62
+ this.captures.set(capture.id, capture);
63
+ this.orders.set(orderId, { ...order, status: "paid" });
64
+ return capture;
65
+ }
66
+ /**
67
+ * Records the refund as pending — the actual money movement happens via
68
+ * bank transfer outside the system and is reconciled manually by an
69
+ * admin, same as the rest of the manual-payment flow.
70
+ */
71
+ async refund(paymentId, amount) {
72
+ const capture = this.captures.get(paymentId);
73
+ return {
74
+ id: `manual_rfnd_${randomBytes(8).toString("hex")}`,
75
+ paymentId,
76
+ amount: amount ?? capture?.amount ?? 0,
77
+ currency: capture?.currency ?? "INR",
78
+ status: "pending",
79
+ createdAt: new Date().toISOString(),
80
+ };
81
+ }
82
+ async getOrder(orderId) {
83
+ const order = this.orders.get(orderId);
84
+ if (!order) {
85
+ throw Object.assign(new Error(`Manual order not found: ${orderId}`), {
86
+ httpStatus: 404,
87
+ });
88
+ }
89
+ return order;
90
+ }
91
+ }
@@ -19,13 +19,15 @@
19
19
  * ```
20
20
  */
21
21
  import type { JsonValue } from "@mohasinac/appkit";
22
- import type { IPaymentProvider, PaymentOrder, PaymentCapture, Refund } from "../../contracts";
22
+ import { IPaymentProvider } from "../../contracts";
23
+ import type { PaymentOrder, PaymentCapture, Refund } from "../../contracts";
23
24
  export interface RazorpayConfig {
24
25
  keyId: string;
25
26
  keySecret: string;
26
27
  webhookSecret?: string;
27
28
  }
28
- export declare class RazorpayProvider implements IPaymentProvider {
29
+ export declare class RazorpayProvider extends IPaymentProvider {
30
+ readonly name = "razorpay";
29
31
  private readonly razorpay;
30
32
  private readonly webhookSecret?;
31
33
  constructor(config: RazorpayConfig);
@@ -20,10 +20,13 @@
20
20
  */
21
21
  import Razorpay from "razorpay";
22
22
  import { createHmac, timingSafeEqual } from "crypto";
23
+ import { IPaymentProvider } from "../../contracts";
23
24
  import { getDefaultCurrency } from "../../core/baseline-resolver";
24
25
  // --- IPaymentProvider implementation ------------------------------------------
25
- export class RazorpayProvider {
26
+ export class RazorpayProvider extends IPaymentProvider {
26
27
  constructor(config) {
28
+ super();
29
+ this.name = "razorpay";
27
30
  this.razorpay = new Razorpay({
28
31
  key_id: config.keyId,
29
32
  key_secret: config.keySecret,
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @mohasinac/shipping-manual — the default IShippingProvider implementation.
3
+ *
4
+ * There is no carrier API here: the seller enters a carrier name and
5
+ * tracking number/URL directly (see `customShipOrder` in
6
+ * `features/seller/actions/seller-actions.ts`, the actual write path used by
7
+ * the seller ship flow). This class exists so `getProviders().shipping` is
8
+ * always populated with a real implementation of the contract — a future
9
+ * carrier integration (e.g. Shiprocket, Delhivery) is a sibling package that
10
+ * `extends IShippingProvider` the same way this one does, and
11
+ * `providers.config.ts` swaps which one gets registered.
12
+ */
13
+ import { IShippingProvider } from "../../contracts";
14
+ import type { CreateShipmentInput, Shipment, TrackingInfo, ServiceabilityResult } from "../../contracts";
15
+ export declare class ManualShippingProvider extends IShippingProvider {
16
+ readonly name = "manual";
17
+ createShipment(data: CreateShipmentInput): Promise<Shipment>;
18
+ trackShipment(trackingId: string): Promise<TrackingInfo>;
19
+ cancelShipment(_shipmentId: string): Promise<void>;
20
+ checkServiceability(_pincode: string, _weight: number): Promise<ServiceabilityResult>;
21
+ generateLabel(_shipmentId: string): Promise<ArrayBuffer>;
22
+ }
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @mohasinac/shipping-manual — the default IShippingProvider implementation.
3
+ *
4
+ * There is no carrier API here: the seller enters a carrier name and
5
+ * tracking number/URL directly (see `customShipOrder` in
6
+ * `features/seller/actions/seller-actions.ts`, the actual write path used by
7
+ * the seller ship flow). This class exists so `getProviders().shipping` is
8
+ * always populated with a real implementation of the contract — a future
9
+ * carrier integration (e.g. Shiprocket, Delhivery) is a sibling package that
10
+ * `extends IShippingProvider` the same way this one does, and
11
+ * `providers.config.ts` swaps which one gets registered.
12
+ */
13
+ import { IShippingProvider } from "../../contracts";
14
+ export class ManualShippingProvider extends IShippingProvider {
15
+ constructor() {
16
+ super(...arguments);
17
+ this.name = "manual";
18
+ }
19
+ async createShipment(data) {
20
+ return {
21
+ id: `manual_${data.orderId}`,
22
+ trackingId: data.orderId,
23
+ orderId: data.orderId,
24
+ status: "created",
25
+ createdAt: new Date().toISOString(),
26
+ };
27
+ }
28
+ async trackShipment(trackingId) {
29
+ // Manual shipments carry their tracking state on the order document
30
+ // itself (status, trackingNumber, trackingUrl) — there is no carrier
31
+ // API to poll. Callers that need current state should read the order,
32
+ // not this method.
33
+ return { trackingId, currentStatus: "unknown", events: [] };
34
+ }
35
+ async cancelShipment(_shipmentId) {
36
+ // No-op — cancelling a manual shipment is an order-status update
37
+ // (orderRepository.cancelOrder), not a carrier API call.
38
+ }
39
+ async checkServiceability(_pincode, _weight) {
40
+ // Manual shipping has no carrier-imposed serviceability restriction —
41
+ // the seller decides whether they can fulfil an address.
42
+ return { isServiceable: true, couriers: [] };
43
+ }
44
+ async generateLabel(_shipmentId) {
45
+ throw new Error("Manual shipping does not support automatic label generation — the seller prints their own carrier's label.");
46
+ }
47
+ }
@@ -19,7 +19,7 @@ export { createResendProvider } from "./providers/email-resend/index";
19
19
  export type { ResendProviderOptions } from "./providers/email-resend/index";
20
20
  export { RazorpayProvider, rupeesToPaise, paiseToRupees, verifyPaymentSignature, createRazorpayOrder, fetchRazorpayOrder, verifyPaymentSignatureWithKeys, verifyWebhookSignature, createRazorpayRefund, } from "./providers/payment-razorpay/index";
21
21
  export type { RazorpayConfig, RazorpayPaymentResult, RazorpayOrderOptions, RazorpayOrder, RazorpayRefundResult, } from "./providers/payment-razorpay/index";
22
- export { ShiprocketProvider } from "./providers/shipping-shiprocket/index";
23
- export type { ShiprocketProviderConfig } from "./providers/shipping-shiprocket/index";
22
+ export { ManualPaymentProvider } from "./providers/payment-manual/index";
23
+ export { ManualShippingProvider } from "./providers/shipping-manual/index";
24
24
  export { tailwindAdapter } from "./style/tailwind/index";
25
25
  export { serverLogger } from "./monitoring/index";
package/dist/providers.js CHANGED
@@ -20,10 +20,12 @@ export { firebaseDbProvider, getAdminApp, getAdminAuth, getAdminDb, getAdminStor
20
20
  export { firebaseStorageProvider } from "./providers/storage-firebase/index";
21
21
  // Email (Resend)
22
22
  export { createResendProvider } from "./providers/email-resend/index";
23
- // Payment (Razorpay)
23
+ // Payment (Razorpay) — disabled by default; siteSettings.payment.razorpayEnabled turns it on
24
24
  export { RazorpayProvider, rupeesToPaise, paiseToRupees, verifyPaymentSignature, createRazorpayOrder, fetchRazorpayOrder, verifyPaymentSignatureWithKeys, verifyWebhookSignature, createRazorpayRefund, } from "./providers/payment-razorpay/index";
25
- // Shipping (Shiprocket)
26
- export { ShiprocketProvider } from "./providers/shipping-shiprocket/index";
25
+ // Payment (manual) — the default provider
26
+ export { ManualPaymentProvider } from "./providers/payment-manual/index";
27
+ // Shipping (manual) — the default (and only) provider
28
+ export { ManualShippingProvider } from "./providers/shipping-manual/index";
27
29
  // Style adapter
28
30
  export { tailwindAdapter } from "./style/tailwind/index";
29
31
  // Monitoring