@mohasinac/appkit 4.41.17 → 4.42.1

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 (171) hide show
  1. package/dist/_internal/client/features/layout/DashboardLayoutClient.js +2 -30
  2. package/dist/_internal/client/features/maintenance/views/MaintenanceDashboardView.js +1 -1
  3. package/dist/_internal/server/features/checkout/actions.d.ts +16 -14
  4. package/dist/_internal/server/features/checkout/actions.js +145 -97
  5. package/dist/_internal/server/features/checkout/bundle-expansion.d.ts +1 -1
  6. package/dist/_internal/server/features/checkout/index.d.ts +1 -1
  7. package/dist/_internal/server/features/checkout/index.js +1 -1
  8. package/dist/_internal/server/features/checkout/locked-lines.js +1 -1
  9. package/dist/_internal/server/features/checkout/source-context.js +2 -2
  10. package/dist/_internal/server/features/maintenance/analyze.js +1 -1
  11. package/dist/_internal/server/features/refunds/actions.d.ts +4 -4
  12. package/dist/_internal/server/features/refunds/actions.js +9 -8
  13. package/dist/_internal/server/functions/scheduled.d.ts +1 -2
  14. package/dist/_internal/server/functions/scheduled.js +1 -9
  15. package/dist/_internal/server/jobs/core/index.d.ts +0 -1
  16. package/dist/_internal/server/jobs/core/index.js +0 -1
  17. package/dist/_internal/server/jobs/handlers/index.d.ts +0 -1
  18. package/dist/_internal/server/jobs/handlers/index.js +0 -1
  19. package/dist/_internal/shared/actions/action-registry.js +2 -2
  20. package/dist/_internal/shared/checkout/order-math.d.ts +1 -1
  21. package/dist/_internal/shared/checkout/order-math.js +1 -1
  22. package/dist/_internal/shared/checkout/rules/prize-draw.rule.js +2 -2
  23. package/dist/_internal/shared/features/blog/schema.d.ts +4 -4
  24. package/dist/_internal/shared/features/cart/schema.d.ts +6 -6
  25. package/dist/_internal/shared/features/orders/refund-copy.d.ts +1 -1
  26. package/dist/_internal/shared/features/orders/refund-copy.js +1 -1
  27. package/dist/_internal/shared/features/orders/schema.d.ts +5 -5
  28. package/dist/_internal/shared/features/orders/schema.js +1 -1
  29. package/dist/_internal/shared/features/products/schema.d.ts +2 -2
  30. package/dist/_internal/shared/features/promotions/schema.d.ts +4 -4
  31. package/dist/_internal/shared/features/reviews/schema.d.ts +1 -1
  32. package/dist/client.d.ts +1 -1
  33. package/dist/client.js +1 -1
  34. package/dist/configs/next.js +2 -2
  35. package/dist/constants/field-names.d.ts +1 -1
  36. package/dist/constants/field-names.js +1 -1
  37. package/dist/contracts/index.d.ts +0 -2
  38. package/dist/contracts/index.js +0 -1
  39. package/dist/contracts/payment.d.ts +13 -2
  40. package/dist/contracts/payment.js +2 -2
  41. package/dist/core/integration-keys.d.ts +7 -3
  42. package/dist/core/integration-keys.js +13 -7
  43. package/dist/core/money.d.ts +11 -0
  44. package/dist/core/money.js +15 -0
  45. package/dist/errors/index.d.ts +1 -1
  46. package/dist/errors/index.js +1 -1
  47. package/dist/errors/messages.d.ts +1 -0
  48. package/dist/errors/messages.js +1 -0
  49. package/dist/errors/{razorpay-unreachable.d.ts → payment-provider-unreachable.d.ts} +1 -1
  50. package/dist/errors/{razorpay-unreachable.js → payment-provider-unreachable.js} +1 -1
  51. package/dist/features/addresses/schemas/address-form.d.ts +20 -20
  52. package/dist/features/addresses/schemas/index.d.ts +2 -2
  53. package/dist/features/admin/components/AdminSiteSettingsView.js +32 -16
  54. package/dist/features/admin/constants/site-settings-tabs.d.ts +1 -1
  55. package/dist/features/admin/schemas/admin-ops-forms.d.ts +10 -10
  56. package/dist/features/admin/schemas/admin-user-form.d.ts +2 -2
  57. package/dist/features/admin/schemas/firestore.d.ts +17 -8
  58. package/dist/features/admin/schemas/firestore.js +1 -1
  59. package/dist/features/admin/schemas/nav-item-form.d.ts +2 -2
  60. package/dist/features/auctions/schemas/index.d.ts +2 -2
  61. package/dist/features/auth/schemas/index.d.ts +2 -2
  62. package/dist/features/before-after/schemas/index.d.ts +2 -2
  63. package/dist/features/blog/actions/blog-actions.d.ts +4 -4
  64. package/dist/features/blog/schemas/blog-form.d.ts +2 -2
  65. package/dist/features/blog/schemas/index.d.ts +4 -4
  66. package/dist/features/cart/schemas/index.d.ts +3 -3
  67. package/dist/features/catalogue/schemas/validation.d.ts +4 -4
  68. package/dist/features/categories/schemas/index.d.ts +2 -2
  69. package/dist/features/checkout/index.d.ts +0 -4
  70. package/dist/features/checkout/index.js +0 -3
  71. package/dist/features/checkout/types/index.d.ts +0 -25
  72. package/dist/features/checkout/types/index.js +1 -2
  73. package/dist/features/collections/schemas/index.d.ts +2 -2
  74. package/dist/features/consultation/schemas/index.d.ts +4 -4
  75. package/dist/features/corporate/schemas/index.d.ts +2 -2
  76. package/dist/features/events/schemas/index.d.ts +4 -4
  77. package/dist/features/grouped/schemas/index.d.ts +2 -2
  78. package/dist/features/homepage/schemas/index.d.ts +2 -2
  79. package/dist/features/layout/AppLayoutShell.js +2 -2
  80. package/dist/features/layout/BottomNavLayout.d.ts +9 -3
  81. package/dist/features/layout/BottomNavLayout.js +9 -3
  82. package/dist/features/lottery/schemas/zod.d.ts +4 -4
  83. package/dist/features/loyalty/schemas/index.d.ts +6 -6
  84. package/dist/features/orders/components/OrderPaymentSummary.d.ts +1 -1
  85. package/dist/features/orders/components/OrderPaymentSummary.js +5 -5
  86. package/dist/features/orders/components/RefundHistoryTable.js +1 -1
  87. package/dist/features/orders/repository/orders.repository.d.ts +10 -1
  88. package/dist/features/orders/repository/orders.repository.js +17 -1
  89. package/dist/features/orders/schemas/firestore.d.ts +11 -12
  90. package/dist/features/orders/schemas/firestore.js +0 -1
  91. package/dist/features/orders/schemas/index.d.ts +48 -48
  92. package/dist/features/orders/schemas/index.js +1 -1
  93. package/dist/features/orders/types/index.d.ts +1 -3
  94. package/dist/features/orders/types/index.js +1 -2
  95. package/dist/features/payments/manifest.js +1 -1
  96. package/dist/features/payments/repository/payout.repository.d.ts +1 -4
  97. package/dist/features/payments/repository/payout.repository.js +0 -29
  98. package/dist/features/payments/schemas/firestore.d.ts +8 -15
  99. package/dist/features/payments/schemas/firestore.js +7 -5
  100. package/dist/features/payments/schemas/index.d.ts +52 -125
  101. package/dist/features/payments/schemas/index.js +0 -58
  102. package/dist/features/payments/types/index.d.ts +2 -4
  103. package/dist/features/payments/types/index.js +1 -2
  104. package/dist/features/products/schemas/index.d.ts +14 -14
  105. package/dist/features/products/schemas/product-features.validators.d.ts +10 -10
  106. package/dist/features/promotions/schemas/index.d.ts +20 -20
  107. package/dist/features/reviews/schemas/index.d.ts +8 -8
  108. package/dist/features/scams/schemas/index.d.ts +10 -10
  109. package/dist/features/search/action-index/settings-entries.js +4 -4
  110. package/dist/features/seller/schemas/index.d.ts +12 -12
  111. package/dist/features/seller/schemas/order-forms.d.ts +4 -4
  112. package/dist/features/shipments/schemas/validation.d.ts +28 -28
  113. package/dist/features/store-extensions/schemas/payout-method-form.d.ts +50 -50
  114. package/dist/features/store-extensions/schemas/report-create-form.d.ts +2 -2
  115. package/dist/features/store-extensions/schemas/shipping-config-form.d.ts +10 -10
  116. package/dist/features/support/schemas/index.d.ts +14 -14
  117. package/dist/features/tester/actions/checklist-item-actions.d.ts +4 -4
  118. package/dist/features/tester/schemas/checklist-item-form.d.ts +2 -2
  119. package/dist/features/tester/seed-data/_money-flows.js +145 -0
  120. package/dist/features/tester/seed-data/authored/admin__site-system.js +38 -0
  121. package/dist/features/tester/seed-data/authored/buying__buying-checkout.js +10 -10
  122. package/dist/features/tester/seed-data/authored/buying__offers.js +11 -10
  123. package/dist/features/tester/seed-data/authored/buying__user-dashboard-navigation.js +6 -5
  124. package/dist/features/tester/seed-data/authored/cta-layout__checkout-bottom-bar.js +1 -1
  125. package/dist/features/tester/seed-data/authored/design-ux__hand-mode-layout.js +3 -3
  126. package/dist/features/tester/seed-data/authored/selling__store-dashboard-navigation.js +6 -5
  127. package/dist/features/tester/seed-data/tester-checklist-seed-data.js +27 -15
  128. package/dist/features/wishlist/schemas/index.d.ts +2 -2
  129. package/dist/index.d.ts +6 -28
  130. package/dist/index.js +8 -51
  131. package/dist/jobs.d.ts +1 -1
  132. package/dist/jobs.js +1 -1
  133. package/dist/providers/payment-phonepe/index.d.ts +117 -0
  134. package/dist/providers/payment-phonepe/index.js +221 -0
  135. package/dist/providers.d.ts +3 -2
  136. package/dist/providers.js +3 -2
  137. package/dist/schemas/registry.d.ts +163 -2623
  138. package/dist/schemas/registry.js +1 -6
  139. package/dist/seed/faq-seed-data.js +5 -5
  140. package/dist/seed/payouts-seed-data.js +3 -3
  141. package/dist/seed/site-settings-seed-data.js +7 -4
  142. package/dist/server-entry.d.ts +1 -2
  143. package/dist/server-entry.js +1 -3
  144. package/dist/server.d.ts +3 -9
  145. package/dist/server.js +5 -23
  146. package/dist/validation/schemas.d.ts +2 -2
  147. package/package.json +5 -4
  148. package/dist/_internal/server/features/payments/actions.d.ts +0 -30
  149. package/dist/_internal/server/features/payments/actions.js +0 -45
  150. package/dist/_internal/server/features/payments/data.d.ts +0 -13
  151. package/dist/_internal/server/features/payments/data.js +0 -20
  152. package/dist/_internal/server/features/payments/index.d.ts +0 -3
  153. package/dist/_internal/server/features/payments/index.js +0 -3
  154. package/dist/_internal/server/jobs/core/payoutBatch.d.ts +0 -2
  155. package/dist/_internal/server/jobs/core/payoutBatch.js +0 -120
  156. package/dist/_internal/server/jobs/handlers/payoutBatch.d.ts +0 -2
  157. package/dist/_internal/server/jobs/handlers/payoutBatch.js +0 -2
  158. package/dist/_internal/shared/features/payments/config.d.ts +0 -3
  159. package/dist/_internal/shared/features/payments/config.js +0 -3
  160. package/dist/contracts/client-payment-gateway.d.ts +0 -64
  161. package/dist/contracts/client-payment-gateway.js +0 -25
  162. package/dist/features/checkout/hooks/useCheckout.d.ts +0 -9
  163. package/dist/features/checkout/hooks/useCheckout.js +0 -24
  164. package/dist/features/checkout/hooks/useCheckoutApi.d.ts +0 -72
  165. package/dist/features/checkout/hooks/useCheckoutApi.js +0 -47
  166. package/dist/features/checkout/hooks/usePaymentCheckout.d.ts +0 -77
  167. package/dist/features/checkout/hooks/usePaymentCheckout.js +0 -192
  168. package/dist/providers/payment-razorpay/index.d.ts +0 -115
  169. package/dist/providers/payment-razorpay/index.js +0 -208
  170. package/dist/schemas/webhooks/razorpay.d.ts +0 -2634
  171. package/dist/schemas/webhooks/razorpay.js +0 -104
@@ -210,9 +210,12 @@ export function AdminSiteSettingsView({ labels = {}, ...rest }) {
210
210
  const [platformShippingPercent, setPlatformShippingPercent] = React.useState(10);
211
211
  const [platformShippingFixedMin, setPlatformShippingFixedMin] = React.useState(0);
212
212
  // ⑧ Integrations
213
- const [razorpayKeyId, setRazorpayKeyId] = React.useState("");
214
- const [razorpayKeySecret, setRazorpayKeySecret] = React.useState("");
215
- const [razorpayWebhookSecret, setRazorpayWebhookSecret] = React.useState("");
213
+ const [phonepeClientId, setPhonepeClientId] = React.useState("");
214
+ const [phonepeClientSecret, setPhonepeClientSecret] = React.useState("");
215
+ const [phonepeClientVersion, setPhonepeClientVersion] = React.useState("1");
216
+ const [phonepeEnvironment, setPhonepeEnvironment] = React.useState("sandbox");
217
+ const [phonepeWebhookUsername, setPhonepeWebhookUsername] = React.useState("");
218
+ const [phonepeWebhookPassword, setPhonepeWebhookPassword] = React.useState("");
216
219
  const [smtpHost, setSmtpHost] = React.useState("");
217
220
  const [smtpPort, setSmtpPort] = React.useState("587");
218
221
  const [smtpUser, setSmtpUser] = React.useState("");
@@ -235,7 +238,7 @@ export function AdminSiteSettingsView({ labels = {}, ...rest }) {
235
238
  const [defaultCarrier, setDefaultCarrier] = React.useState("custom");
236
239
  const [maxDeliveryRadius, setMaxDeliveryRadius] = React.useState(0);
237
240
  // ⑨ Payment methods (siteSettings.payment — read by checkout for method eligibility)
238
- const [razorpayEnabled, setRazorpayEnabled] = React.useState(false);
241
+ const [phonepeEnabled, setPhonepeEnabled] = React.useState(false);
239
242
  const [upiManualEnabled, setUpiManualEnabled] = React.useState(true);
240
243
  const [codEnabled, setCodEnabled] = React.useState(true);
241
244
  const [otpCheckoutThreshold, setOtpCheckoutThreshold] = React.useState(5000);
@@ -417,9 +420,12 @@ export function AdminSiteSettingsView({ labels = {}, ...rest }) {
417
420
  setGstin(s.gst?.gstin ?? "");
418
421
  setGstLegalName(s.gst?.legalName ?? "");
419
422
  setGstAddress(s.gst?.address ?? "");
420
- setRazorpayKeyId(s.credentialsMasked?.razorpayKeyId ?? "");
421
- setRazorpayKeySecret(s.credentialsMasked?.razorpayKeySecret ?? "");
422
- setRazorpayWebhookSecret(s.credentialsMasked?.razorpayWebhookSecret ?? "");
423
+ setPhonepeClientId(s.credentialsMasked?.phonepeClientId ?? "");
424
+ setPhonepeClientSecret(s.credentialsMasked?.phonepeClientSecret ?? "");
425
+ setPhonepeClientVersion(s.credentialsMasked?.phonepeClientVersion ?? "1");
426
+ setPhonepeEnvironment(s.credentialsMasked?.phonepeEnvironment ?? "sandbox");
427
+ setPhonepeWebhookUsername(s.credentialsMasked?.phonepeWebhookUsername ?? "");
428
+ setPhonepeWebhookPassword(s.credentialsMasked?.phonepeWebhookPassword ?? "");
423
429
  setGoogleMapsApiKey(s.credentialsMasked?.googleMapsApiKey ?? "");
424
430
  setGooglePlaceId(s.credentialsMasked?.googlePlaceId ?? "");
425
431
  setSmtpHost(s.emailSettings?.host ?? "");
@@ -439,7 +445,7 @@ export function AdminSiteSettingsView({ labels = {}, ...rest }) {
439
445
  setFreeShippingThreshold(s.shipping?.freeShippingThreshold ?? 999);
440
446
  setDefaultCarrier(s.shipping?.defaultCarrier ?? "custom");
441
447
  setMaxDeliveryRadius(s.shipping?.maxDeliveryRadius ?? 0);
442
- setRazorpayEnabled(s.payment?.razorpayEnabled ?? false);
448
+ setPhonepeEnabled(s.payment?.phonepeEnabled ?? false);
443
449
  setUpiManualEnabled(s.payment?.upiManualEnabled ?? true);
444
450
  setCodEnabled(s.payment?.codEnabled ?? true);
445
451
  setOtpCheckoutThreshold(s.payment?.otpCheckoutThreshold ?? 5000);
@@ -508,9 +514,12 @@ export function AdminSiteSettingsView({ labels = {}, ...rest }) {
508
514
  setMsgCeilingEmail(s.messaging?.dailyCeiling?.email ?? 80);
509
515
  setMsgCeilingWhatsapp(s.messaging?.dailyCeiling?.whatsapp ?? 200);
510
516
  originalMaskedRef.current = {
511
- razorpayKeyId: s.credentialsMasked?.razorpayKeyId ?? "",
512
- razorpayKeySecret: s.credentialsMasked?.razorpayKeySecret ?? "",
513
- razorpayWebhookSecret: s.credentialsMasked?.razorpayWebhookSecret ?? "",
517
+ phonepeClientId: s.credentialsMasked?.phonepeClientId ?? "",
518
+ phonepeClientSecret: s.credentialsMasked?.phonepeClientSecret ?? "",
519
+ phonepeClientVersion: s.credentialsMasked?.phonepeClientVersion ?? "",
520
+ phonepeEnvironment: s.credentialsMasked?.phonepeEnvironment ?? "",
521
+ phonepeWebhookUsername: s.credentialsMasked?.phonepeWebhookUsername ?? "",
522
+ phonepeWebhookPassword: s.credentialsMasked?.phonepeWebhookPassword ?? "",
514
523
  googleMapsApiKey: s.credentialsMasked?.googleMapsApiKey ?? "",
515
524
  googlePlaceId: s.credentialsMasked?.googlePlaceId ?? "",
516
525
  metaPageAccessToken: s.credentialsMasked?.metaPageAccessToken ?? "",
@@ -616,9 +625,12 @@ export function AdminSiteSettingsView({ labels = {}, ...rest }) {
616
625
  // "" field, so an unedited tab never overwrites a real secret with its
617
626
  // own masked display string.
618
627
  credentials: {
619
- razorpayKeyId: maskedOrReal("razorpayKeyId", razorpayKeyId),
620
- razorpayKeySecret: maskedOrReal("razorpayKeySecret", razorpayKeySecret),
621
- razorpayWebhookSecret: maskedOrReal("razorpayWebhookSecret", razorpayWebhookSecret),
628
+ phonepeClientId: maskedOrReal("phonepeClientId", phonepeClientId),
629
+ phonepeClientSecret: maskedOrReal("phonepeClientSecret", phonepeClientSecret),
630
+ phonepeClientVersion: maskedOrReal("phonepeClientVersion", phonepeClientVersion),
631
+ phonepeEnvironment: maskedOrReal("phonepeEnvironment", phonepeEnvironment),
632
+ phonepeWebhookUsername: maskedOrReal("phonepeWebhookUsername", phonepeWebhookUsername),
633
+ phonepeWebhookPassword: maskedOrReal("phonepeWebhookPassword", phonepeWebhookPassword),
622
634
  googleMapsApiKey: maskedOrReal("googleMapsApiKey", googleMapsApiKey),
623
635
  googlePlaceId: maskedOrReal("googlePlaceId", googlePlaceId),
624
636
  metaPageAccessToken: maskedOrReal("metaPageAccessToken", metaPageAccessToken),
@@ -665,7 +677,7 @@ export function AdminSiteSettingsView({ labels = {}, ...rest }) {
665
677
  },
666
678
  integrations: { googleAnalyticsId: gaMeasurementId, facebookPixelId: fbPixelId, gtmContainerId },
667
679
  shipping: { freeShippingThreshold, defaultCarrier, maxDeliveryRadius },
668
- payment: { razorpayEnabled, upiManualEnabled, codEnabled, otpCheckoutThreshold },
680
+ payment: { phonepeEnabled, upiManualEnabled, codEnabled, otpCheckoutThreshold },
669
681
  auctionConfig: { bidIncrementTiers: bidIncrementTiers, autoExtendWindowMinutes: autoExtendWindow, settlementGracePeriodHours: settlementGrace },
670
682
  platformLimits: { maxProductsPerStore, maxCustomFieldsPerProduct: maxCustomFields, maxCustomSectionsPerProduct: maxCustomSections, orderCancellationWindowHours: orderCancelWindow },
671
683
  legalPages: { terms: termsHtml, privacy: privacyHtml, refundPolicy: refundHtml, shipping: shippingPolicyHtml, cookies: cookieHtml, ethics: ethicsHtml, codeOfConduct: conductHtml },
@@ -720,6 +732,10 @@ export function AdminSiteSettingsView({ labels = {}, ...rest }) {
720
732
  { label: "Bluedart", value: "bluedart" },
721
733
  { label: "FedEx", value: "fedex" },
722
734
  ];
735
+ const PHONEPE_ENVIRONMENT_OPTIONS = [
736
+ { label: "Sandbox (test)", value: "sandbox" },
737
+ { label: "Production (live)", value: "production" },
738
+ ];
723
739
  const LISTING_TYPE_KEYS = ["standard", "auction", "pre-order", "prize-draw", "bundle", "classified", "digital-code", "live"];
724
740
  const CATEGORY_TYPE_KEYS = ["category", "sublisting", "brand", "bundle"];
725
741
  const NOTIF_TYPE_OPTIONS = NOTIFICATION_TYPE_TABS.filter((t) => t.id !== "All").map((t) => ({ value: t.id, label: t.label }));
@@ -767,7 +783,7 @@ export function AdminSiteSettingsView({ labels = {}, ...rest }) {
767
783
  { label: "Top right", value: "top-right" },
768
784
  { label: "Bottom left", value: "bottom-left" },
769
785
  { label: "Bottom right", value: "bottom-right" },
770
- ], value: watermarkPosition, onValueChange: (v) => setWatermarkPosition(v), disabled: watermarkUseCustomOffset }), _jsx(Toggle, { checked: watermarkUseCustomOffset, onChange: setWatermarkUseCustomOffset, label: "Use a custom X/Y offset instead" }), watermarkUseCustomOffset && (_jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "X offset (%) \u2014 + right / \u2212 left of center", value: String(watermarkOffsetX), onChange: (e) => setWatermarkOffsetX(Math.max(-45, Math.min(45, parseInt(e.target.value) || 0))), type: "number", min: -45, max: 45 }), _jsx(Input, { label: "Y offset (%) \u2014 + down / \u2212 up from center", value: String(watermarkOffsetY), onChange: (e) => setWatermarkOffsetY(Math.max(-45, Math.min(45, parseInt(e.target.value) || 0))), type: "number", min: -45, max: 45 })] })), _jsxs(Stack, { gap: "xs", surface: "muted", rounded: "lg", border: "default", padding: "md", children: [_jsx(Text, { size: "xs", color: "muted", children: "Preview (text watermark only)" }), _jsx(Row, { surface: "default", justify: "end", align: "end", className: `relative h-32 ${__O.hidden}`, rounded: "default", children: _jsx(Span, { ref: watermarkPreviewRef, weight: "medium", color: "faint", padding: "1", className: "select-none", children: watermarkText }) })] })] }) }), _jsx(TabsContent, { value: "fees", children: _jsxs(SettingsTabForm, { id: "fees", label: "Fees", children: [_jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Platform fee \u2014 our cut (%)", helperText: "% charged on order value. Buyer pays this.", value: String(platformFeePercent), onChange: (e) => setPlatformFeePercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100, step: 0.1 }), _jsx(Input, { label: "GST on platform fee (%)", helperText: "Applied to our fee only (not full order). Usually 18%.", value: String(gstPercent), onChange: (e) => setGstPercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100, step: 0.1 }), _jsx(Input, { label: "Razorpay gateway cost (%)", helperText: "Gateway's own fee \u2014 absorbed by platform, not passed through.", value: String(gatewayFeePercent), onChange: (e) => setGatewayFeePercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 10, step: 0.01 }), _jsx(Input, { label: "Minimum transaction fee (\u20B9)", helperText: "Per-transaction floor. Total charge will never be below base + this.", value: String(minimumTransactionFee), onChange: (e) => setMinimumTransactionFee(parseFloat(e.target.value) || 0), type: "number", min: 0, step: 0.01 }), _jsx(Input, { label: "Maximum platform fee (\u20B9)", helperText: "Ceiling on the buyer's platform commission, charged once per checkout on every payment method. GST is calculated on the capped amount.", value: String(platformFeeMax), onChange: (e) => setPlatformFeeMax(parseFloat(e.target.value) || 0), type: "number", min: 0, step: 0.01 }), _jsx(Input, { label: "Seller payout hold (days)", value: String(payoutHoldDays), onChange: (e) => setPayoutHoldDays(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Minimum payout amount (\u20B9)", value: String(minPayoutAmount), onChange: (e) => setMinPayoutAmount(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Auction listing fee (\u20B9)", value: String(auctionListingFee), onChange: (e) => setAuctionListingFee(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Pre-order listing fee (\u20B9)", value: String(preOrderListingFee), onChange: (e) => setPreOrderListingFee(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Featured slot fee (\u20B9)", value: String(featuredSlotFee), onChange: (e) => setFeaturedSlotFee(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Promoted slot fee (\u20B9)", value: String(promotedSlotFee), onChange: (e) => setPromotedSlotFee(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "COD deposit (%)", helperText: "% of order collected upfront on COD orders; remainder paid on delivery.", value: String(codDepositPercent), onChange: (e) => setCodDepositPercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100, step: 0.1 })] }), _jsx(Toggle, { checked: whatsappNotifyFeeEnabled, onChange: setWhatsappNotifyFeeEnabled, label: "Offer the WhatsApp order-updates addon at checkout" }), _jsx(Grid, { cols: 2, gap: "md", children: _jsx(Input, { label: "WhatsApp addon fee (\u20B9)", helperText: "Flat fee charged to the buyer when they opt in. Requires WhatsApp credentials + at least one approved template \u2014 see the WhatsApp tab.", value: String(whatsappNotifyFee), onChange: (e) => setWhatsappNotifyFee(parseFloat(e.target.value) || 0), type: "number", min: 0, disabled: !whatsappNotifyFeeEnabled }) }), _jsx(Toggle, { checked: giftWrapFeeEnabled, onChange: setGiftWrapFeeEnabled, label: "Offer the gift-wrap addon at checkout" }), _jsx(Grid, { cols: 2, gap: "md", children: _jsx(Input, { label: "Gift wrap fee (\u20B9)", helperText: "Flat fee charged to the buyer when they opt in.", value: String(giftWrapFee), onChange: (e) => setGiftWrapFee(parseFloat(e.target.value) || 0), type: "number", min: 0, disabled: !giftWrapFeeEnabled }) }), _jsx(Toggle, { checked: shipmentProtectionFeeEnabled, onChange: setShipmentProtectionFeeEnabled, label: "Offer the shipment-protection addon at checkout" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Shipment protection (%)", helperText: "% of order subtotal, charged when the buyer opts in.", value: String(shipmentProtectionFeePercent), onChange: (e) => setShipmentProtectionFeePercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100, step: 0.1, disabled: !shipmentProtectionFeeEnabled }), _jsx(Input, { label: "Shipment protection minimum (\u20B9)", helperText: "Floor for the shipment-protection fee.", value: String(shipmentProtectionFeeMin), onChange: (e) => setShipmentProtectionFeeMin(parseFloat(e.target.value) || 0), type: "number", min: 0, disabled: !shipmentProtectionFeeEnabled })] })] }) }), _jsx(TabsContent, { value: "procurement", children: _jsxs(SettingsTabForm, { id: "procurement", label: "Procurement", children: [_jsx(Text, { size: "xs", color: "muted", children: "Used to compute each procurement shipment's labor cost (hours spent \u00D7 hourly rate) and its estimated processing time (hours spent \u00F7 max hours/day)." }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Hourly rate (\u20B9)", helperText: "Your effective hourly wage for sorting/categorizing/listing a shipment.", value: String(laborHourlyRate), onChange: (e) => setLaborHourlyRate(Math.round((parseFloat(e.target.value) || 0) * 100) / 100), type: "number", min: 0 }), _jsx(Input, { label: "Max hours per day", helperText: "Used only to project how many days a shipment's tracked hours will take.", value: String(laborMaxHoursPerDay), onChange: (e) => setLaborMaxHoursPerDay(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 24 })] })] }) }), _jsx(TabsContent, { value: "emi", children: _jsxs(SettingsTabForm, { id: "emi", label: "Emi", children: [_jsx(Text, { size: "xs", color: "muted", children: "A seller must also opt in via their own Payout Settings for EMI to appear at checkout on their items. See the \"How EMI Works\" public page for buyer-facing copy." }), _jsx(Toggle, { checked: emiEnabled, onChange: setEmiEnabled, label: "Enable EMI platform-wide" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Minimum order value (\u20B9)", helperText: "A seller's cart subtotal must exceed this for EMI to appear as an option.", value: String(emiMinOrderValue), onChange: (e) => setEmiMinOrderValue(Math.round((parseFloat(e.target.value) || 0) * 100) / 100), type: "number", min: 0 }), _jsx(Input, { label: "Tenure options (months, comma-separated)", helperText: "e.g. 2,3,4,5,6", value: emiTenureOptionsText, onChange: (e) => setEmiTenureOptionsText(e.target.value) }), _jsx(Input, { label: "Token / down-payment (%)", helperText: "Collected upfront at checkout.", value: String(emiTokenPercent), onChange: (e) => setEmiTokenPercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100 }), _jsx(Input, { label: "Billing day (1\u201310)", helperText: "Day of month each installment is due.", value: String(emiBillingDay), onChange: (e) => setEmiBillingDay(parseFloat(e.target.value) || 1), type: "number", min: 1, max: 10 }), _jsx(Input, { label: "Surcharge (% of principal per month)", helperText: "The 'excess EMI fee' the buyer pays for spreading payment.", value: String(emiSurchargePercentPerMonth), onChange: (e) => setEmiSurchargePercentPerMonth(parseFloat(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Seller's share of surcharge (%)", helperText: "The rest of the surcharge goes to the platform.", value: String(emiSurchargeSellerSharePercent), onChange: (e) => setEmiSurchargeSellerSharePercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100 })] })] }) }), _jsx(TabsContent, { value: "gst", children: _jsxs(SettingsTabForm, { id: "gst", label: "Gst", children: [_jsx(Text, { size: "xs", color: "muted", children: "Required before enabling GST-inclusive checkout (P-8). Also set a GST rate + HSN code on each taxable product for the tax breakdown to appear." }), _jsx(Toggle, { checked: gstEnabled, onChange: setGstEnabled, label: "Enable GST on checkout" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "GSTIN", helperText: "15-character GST Identification Number.", value: gstin, onChange: (e) => setGstin(e.target.value), placeholder: "29AAAAA0000A1Z5", maxLength: 15 }), _jsx(Input, { label: "Legal name", helperText: "Registered business name for invoices.", value: gstLegalName, onChange: (e) => setGstLegalName(e.target.value), placeholder: "LetItRip Collectibles Pvt Ltd" })] }), _jsxs(Stack, { gap: "xs", children: [_jsx(Text, { size: "sm", weight: "semibold", children: "Registered address" }), _jsx(Textarea, { value: gstAddress, onChange: (e) => setGstAddress(e.target.value), placeholder: "Registered business address for GST invoices\u2026", rows: 3 })] })] }) }), _jsx(TabsContent, { value: "listings", children: _jsxs(SettingsTabForm, { id: "listings", label: "Listings", children: [_jsx(Text, { size: "xs", color: "muted", children: "Which listing and category types the marketplace offers. A disabled type is hidden from every browse surface and rejected on create and add-to-cart \u2014 existing data is untouched, it just becomes unreachable until re-enabled." }), _jsxs(Stack, { gap: "xs", children: [_jsx(Text, { size: "sm", weight: "semibold", children: "Listing types" }), _jsx(Text, { size: "xs", color: "muted", children: "Disabled types are hidden from listings and reject create/add-to-cart." }), _jsx(Grid, { cols: 2, gap: "sm", children: LISTING_TYPE_KEYS.map((key) => (_jsx(Toggle, { label: key, checked: listingTypeFlags[key] ?? true, onChange: (v) => setListingTypeFlags((prev) => ({ ...prev, [key]: v })) }, key))) })] }), _jsxs(Stack, { gap: "xs", children: [_jsx(Text, { size: "sm", weight: "semibold", children: "Category types" }), _jsx(Grid, { cols: 2, gap: "sm", children: CATEGORY_TYPE_KEYS.map((key) => (_jsx(Toggle, { label: key, checked: categoryTypeFlags[key] ?? true, onChange: (v) => setCategoryTypeFlags((prev) => ({ ...prev, [key]: v })) }, key))) })] })] }) }), _jsx(TabsContent, { value: "integrations", children: _jsxs(SettingsTabForm, { id: "integrations", label: "Integrations", children: [_jsx(Text, { size: "xs", color: "muted", children: "Keys are masked in transit and stored encrypted. Click Reveal to view." }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "Razorpay" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "Razorpay Key ID", value: razorpayKeyId, onChange: setRazorpayKeyId, placeholder: "rzp_live_\u2026" }), _jsx(MaskedInput, { label: "Razorpay Key Secret", value: razorpayKeySecret, onChange: setRazorpayKeySecret, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" }), _jsx(MaskedInput, { label: "Razorpay Webhook Secret", value: razorpayWebhookSecret, onChange: setRazorpayWebhookSecret, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "SMTP / Email" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "SMTP host", value: smtpHost, onChange: (e) => setSmtpHost(e.target.value), placeholder: "smtp.sendgrid.net" }), _jsx(Input, { label: "SMTP port", value: smtpPort, onChange: (e) => setSmtpPort(e.target.value), type: "number", placeholder: "587" }), _jsx(Input, { label: "SMTP user", value: smtpUser, onChange: (e) => setSmtpUser(e.target.value), placeholder: "apikey" })] }), _jsx(Input, { label: "From address", value: smtpFrom, onChange: (e) => setSmtpFrom(e.target.value), placeholder: "noreply@letitrip.in", type: "email" }), _jsx(Text, { size: "xs", color: "muted", children: "Transactional email is delivered through Resend \u2014 set the Resend API key below. These SMTP fields are stored but not currently used for delivery." })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "Google Places (store reviews)" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "Google Maps API key", value: googleMapsApiKey, onChange: setGoogleMapsApiKey, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" }), _jsx(Input, { label: "Default Google Place ID", value: googlePlaceId, onChange: (e) => setGooglePlaceId(e.target.value), placeholder: "ChIJ\u2026" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "Analytics & Tracking" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Google Analytics ID", value: gaMeasurementId, onChange: (e) => setGaMeasurementId(e.target.value), placeholder: "G-XXXXXXXXXX" }), _jsx(Input, { label: "Facebook Pixel ID", value: fbPixelId, onChange: (e) => setFbPixelId(e.target.value), placeholder: "XXXXXXXXXXXXXXXX" }), _jsx(Input, { label: "GTM Container ID", value: gtmContainerId, onChange: (e) => setGtmContainerId(e.target.value), placeholder: "GTM-XXXXXXX" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "Meta (Instagram & Facebook Social Feed)" }), _jsx(Text, { size: "xs", color: "muted", children: "Used by the Social Feed section to fetch Instagram and Facebook posts via Meta Graph API v19." }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "Page Access Token", value: metaPageAccessToken, onChange: setMetaPageAccessToken, placeholder: "EAAxxxxxxx\u2026" }), _jsx(Input, { label: "Page ID (or handle)", value: metaPageId, onChange: (e) => setMetaPageId(e.target.value), placeholder: "letitrip" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "TikTok for Developers (Social Feed)" }), _jsx(Text, { size: "xs", color: "muted", children: "Client credentials + long-lived access token from TikTok for Developers. Used to list your account's public videos." }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "Client Key", value: tiktokClientKey, onChange: setTiktokClientKey, placeholder: "aw\u2026" }), _jsx(MaskedInput, { label: "Client Secret", value: tiktokClientSecret, onChange: setTiktokClientSecret, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" }), _jsx(MaskedInput, { label: "Access Token (long-lived)", value: tiktokAccessToken, onChange: setTiktokAccessToken, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "DeviantArt OAuth2 (Social Feed)" }), _jsx(Text, { size: "xs", color: "muted", children: "Client credentials for DeviantArt gallery fetching (client-credentials OAuth2 flow \u2014 no user login required)." }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "Client ID", value: deviantartClientId, onChange: setDeviantartClientId, placeholder: "1234" }), _jsx(MaskedInput, { label: "Client Secret", value: deviantartClientSecret, onChange: setDeviantartClientSecret, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] })] })] }) }), _jsx(TabsContent, { value: "shipping", children: _jsxs(SettingsTabForm, { id: "shipping", label: "Shipping", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "Payment methods" }), _jsx(Div, { id: "setting-razorpay-enabled", children: _jsx(Toggle, { label: "Razorpay (online card/UPI) enabled \u2014 disabled by default, manual payment is the default", checked: razorpayEnabled, onChange: setRazorpayEnabled }) }), _jsx(Div, { id: "setting-manual-payment-enabled", children: _jsx(Toggle, { label: "Manual UPI/bank transfer enabled", checked: upiManualEnabled, onChange: setUpiManualEnabled }) }), _jsx(Div, { id: "setting-cod-enabled", children: _jsx(Toggle, { label: "Cash on delivery (COD) enabled", checked: codEnabled, onChange: setCodEnabled }) }), _jsx(Input, { label: "Free shipping threshold (\u20B9)", value: String(freeShippingThreshold), onChange: (e) => setFreeShippingThreshold(parseInt(e.target.value) || 0), type: "number", min: 0, helperText: "Orders above this amount get free shipping." }), _jsx(Select, { label: "Default carrier", options: CARRIER_OPTIONS, value: defaultCarrier, onValueChange: setDefaultCarrier }), _jsx(Input, { label: "Max delivery radius (km, 0 = no limit)", value: String(maxDeliveryRadius), onChange: (e) => setMaxDeliveryRadius(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "High-value checkout OTP threshold (\u20B9)", helperText: "Carts at or above this subtotal require an extra OTP verification step before payment (0 = disabled).", value: String(otpCheckoutThreshold), onChange: (e) => setOtpCheckoutThreshold(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Text, { size: "sm", weight: "medium", color: "muted", className: "pt-[var(--appkit-space-2)]", children: "Seller shipping charge defaults" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Seller shipping fixed (\u20B9)", helperText: "Flat shipping charge collected on the seller's behalf.", value: String(sellerShippingFixed), onChange: (e) => setSellerShippingFixed(parseFloat(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Platform shipping (%)", helperText: "Platform's own shipping markup, as a % of order value.", value: String(platformShippingPercent), onChange: (e) => setPlatformShippingPercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100, step: 0.1 }), _jsx(Input, { label: "Platform shipping minimum (\u20B9)", helperText: "Floor for the platform shipping markup.", value: String(platformShippingFixedMin), onChange: (e) => setPlatformShippingFixedMin(parseFloat(e.target.value) || 0), type: "number", min: 0 })] })] }) }), _jsx(TabsContent, { value: "auction", children: _jsxs(SettingsTabForm, { id: "auction", label: "Auction", children: [_jsxs(Stack, { gap: "sm", rounded: "lg", border: "default", padding: "sm", children: [_jsx(Text, { size: "xs", weight: "medium", color: "muted", children: "Bid increment tiers" }), _jsx(Text, { size: "xs", color: "muted", children: "The minimum jump a new bid must clear, based on the current bid amount. A seller's per-listing override can require more than the matching tier, but can never undercut it." }), bidIncrementTiers.map((tier, i) => {
786
+ ], value: watermarkPosition, onValueChange: (v) => setWatermarkPosition(v), disabled: watermarkUseCustomOffset }), _jsx(Toggle, { checked: watermarkUseCustomOffset, onChange: setWatermarkUseCustomOffset, label: "Use a custom X/Y offset instead" }), watermarkUseCustomOffset && (_jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "X offset (%) \u2014 + right / \u2212 left of center", value: String(watermarkOffsetX), onChange: (e) => setWatermarkOffsetX(Math.max(-45, Math.min(45, parseInt(e.target.value) || 0))), type: "number", min: -45, max: 45 }), _jsx(Input, { label: "Y offset (%) \u2014 + down / \u2212 up from center", value: String(watermarkOffsetY), onChange: (e) => setWatermarkOffsetY(Math.max(-45, Math.min(45, parseInt(e.target.value) || 0))), type: "number", min: -45, max: 45 })] })), _jsxs(Stack, { gap: "xs", surface: "muted", rounded: "lg", border: "default", padding: "md", children: [_jsx(Text, { size: "xs", color: "muted", children: "Preview (text watermark only)" }), _jsx(Row, { surface: "default", justify: "end", align: "end", className: `relative h-32 ${__O.hidden}`, rounded: "default", children: _jsx(Span, { ref: watermarkPreviewRef, weight: "medium", color: "faint", padding: "1", className: "select-none", children: watermarkText }) })] })] }) }), _jsx(TabsContent, { value: "fees", children: _jsxs(SettingsTabForm, { id: "fees", label: "Fees", children: [_jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Platform fee \u2014 our cut (%)", helperText: "% charged on order value. Buyer pays this.", value: String(platformFeePercent), onChange: (e) => setPlatformFeePercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100, step: 0.1 }), _jsx(Input, { label: "GST on platform fee (%)", helperText: "Applied to our fee only (not full order). Usually 18%.", value: String(gstPercent), onChange: (e) => setGstPercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100, step: 0.1 }), _jsx(Input, { label: "PhonePe gateway cost (%)", helperText: "Gateway's own fee \u2014 absorbed by platform, not passed through.", value: String(gatewayFeePercent), onChange: (e) => setGatewayFeePercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 10, step: 0.01 }), _jsx(Input, { label: "Minimum transaction fee (\u20B9)", helperText: "Per-transaction floor. Total charge will never be below base + this.", value: String(minimumTransactionFee), onChange: (e) => setMinimumTransactionFee(parseFloat(e.target.value) || 0), type: "number", min: 0, step: 0.01 }), _jsx(Input, { label: "Maximum platform fee (\u20B9)", helperText: "Ceiling on the buyer's platform commission, charged once per checkout on every payment method. GST is calculated on the capped amount.", value: String(platformFeeMax), onChange: (e) => setPlatformFeeMax(parseFloat(e.target.value) || 0), type: "number", min: 0, step: 0.01 }), _jsx(Input, { label: "Seller payout hold (days)", value: String(payoutHoldDays), onChange: (e) => setPayoutHoldDays(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Minimum payout amount (\u20B9)", value: String(minPayoutAmount), onChange: (e) => setMinPayoutAmount(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Auction listing fee (\u20B9)", value: String(auctionListingFee), onChange: (e) => setAuctionListingFee(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Pre-order listing fee (\u20B9)", value: String(preOrderListingFee), onChange: (e) => setPreOrderListingFee(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Featured slot fee (\u20B9)", value: String(featuredSlotFee), onChange: (e) => setFeaturedSlotFee(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Promoted slot fee (\u20B9)", value: String(promotedSlotFee), onChange: (e) => setPromotedSlotFee(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "COD deposit (%)", helperText: "% of order collected upfront on COD orders; remainder paid on delivery.", value: String(codDepositPercent), onChange: (e) => setCodDepositPercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100, step: 0.1 })] }), _jsx(Toggle, { checked: whatsappNotifyFeeEnabled, onChange: setWhatsappNotifyFeeEnabled, label: "Offer the WhatsApp order-updates addon at checkout" }), _jsx(Grid, { cols: 2, gap: "md", children: _jsx(Input, { label: "WhatsApp addon fee (\u20B9)", helperText: "Flat fee charged to the buyer when they opt in. Requires WhatsApp credentials + at least one approved template \u2014 see the WhatsApp tab.", value: String(whatsappNotifyFee), onChange: (e) => setWhatsappNotifyFee(parseFloat(e.target.value) || 0), type: "number", min: 0, disabled: !whatsappNotifyFeeEnabled }) }), _jsx(Toggle, { checked: giftWrapFeeEnabled, onChange: setGiftWrapFeeEnabled, label: "Offer the gift-wrap addon at checkout" }), _jsx(Grid, { cols: 2, gap: "md", children: _jsx(Input, { label: "Gift wrap fee (\u20B9)", helperText: "Flat fee charged to the buyer when they opt in.", value: String(giftWrapFee), onChange: (e) => setGiftWrapFee(parseFloat(e.target.value) || 0), type: "number", min: 0, disabled: !giftWrapFeeEnabled }) }), _jsx(Toggle, { checked: shipmentProtectionFeeEnabled, onChange: setShipmentProtectionFeeEnabled, label: "Offer the shipment-protection addon at checkout" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Shipment protection (%)", helperText: "% of order subtotal, charged when the buyer opts in.", value: String(shipmentProtectionFeePercent), onChange: (e) => setShipmentProtectionFeePercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100, step: 0.1, disabled: !shipmentProtectionFeeEnabled }), _jsx(Input, { label: "Shipment protection minimum (\u20B9)", helperText: "Floor for the shipment-protection fee.", value: String(shipmentProtectionFeeMin), onChange: (e) => setShipmentProtectionFeeMin(parseFloat(e.target.value) || 0), type: "number", min: 0, disabled: !shipmentProtectionFeeEnabled })] })] }) }), _jsx(TabsContent, { value: "procurement", children: _jsxs(SettingsTabForm, { id: "procurement", label: "Procurement", children: [_jsx(Text, { size: "xs", color: "muted", children: "Used to compute each procurement shipment's labor cost (hours spent \u00D7 hourly rate) and its estimated processing time (hours spent \u00F7 max hours/day)." }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Hourly rate (\u20B9)", helperText: "Your effective hourly wage for sorting/categorizing/listing a shipment.", value: String(laborHourlyRate), onChange: (e) => setLaborHourlyRate(Math.round((parseFloat(e.target.value) || 0) * 100) / 100), type: "number", min: 0 }), _jsx(Input, { label: "Max hours per day", helperText: "Used only to project how many days a shipment's tracked hours will take.", value: String(laborMaxHoursPerDay), onChange: (e) => setLaborMaxHoursPerDay(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 24 })] })] }) }), _jsx(TabsContent, { value: "emi", children: _jsxs(SettingsTabForm, { id: "emi", label: "Emi", children: [_jsx(Text, { size: "xs", color: "muted", children: "A seller must also opt in via their own Payout Settings for EMI to appear at checkout on their items. See the \"How EMI Works\" public page for buyer-facing copy." }), _jsx(Toggle, { checked: emiEnabled, onChange: setEmiEnabled, label: "Enable EMI platform-wide" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Minimum order value (\u20B9)", helperText: "A seller's cart subtotal must exceed this for EMI to appear as an option.", value: String(emiMinOrderValue), onChange: (e) => setEmiMinOrderValue(Math.round((parseFloat(e.target.value) || 0) * 100) / 100), type: "number", min: 0 }), _jsx(Input, { label: "Tenure options (months, comma-separated)", helperText: "e.g. 2,3,4,5,6", value: emiTenureOptionsText, onChange: (e) => setEmiTenureOptionsText(e.target.value) }), _jsx(Input, { label: "Token / down-payment (%)", helperText: "Collected upfront at checkout.", value: String(emiTokenPercent), onChange: (e) => setEmiTokenPercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100 }), _jsx(Input, { label: "Billing day (1\u201310)", helperText: "Day of month each installment is due.", value: String(emiBillingDay), onChange: (e) => setEmiBillingDay(parseFloat(e.target.value) || 1), type: "number", min: 1, max: 10 }), _jsx(Input, { label: "Surcharge (% of principal per month)", helperText: "The 'excess EMI fee' the buyer pays for spreading payment.", value: String(emiSurchargePercentPerMonth), onChange: (e) => setEmiSurchargePercentPerMonth(parseFloat(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Seller's share of surcharge (%)", helperText: "The rest of the surcharge goes to the platform.", value: String(emiSurchargeSellerSharePercent), onChange: (e) => setEmiSurchargeSellerSharePercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100 })] })] }) }), _jsx(TabsContent, { value: "gst", children: _jsxs(SettingsTabForm, { id: "gst", label: "Gst", children: [_jsx(Text, { size: "xs", color: "muted", children: "Required before enabling GST-inclusive checkout (P-8). Also set a GST rate + HSN code on each taxable product for the tax breakdown to appear." }), _jsx(Toggle, { checked: gstEnabled, onChange: setGstEnabled, label: "Enable GST on checkout" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "GSTIN", helperText: "15-character GST Identification Number.", value: gstin, onChange: (e) => setGstin(e.target.value), placeholder: "29AAAAA0000A1Z5", maxLength: 15 }), _jsx(Input, { label: "Legal name", helperText: "Registered business name for invoices.", value: gstLegalName, onChange: (e) => setGstLegalName(e.target.value), placeholder: "LetItRip Collectibles Pvt Ltd" })] }), _jsxs(Stack, { gap: "xs", children: [_jsx(Text, { size: "sm", weight: "semibold", children: "Registered address" }), _jsx(Textarea, { value: gstAddress, onChange: (e) => setGstAddress(e.target.value), placeholder: "Registered business address for GST invoices\u2026", rows: 3 })] })] }) }), _jsx(TabsContent, { value: "listings", children: _jsxs(SettingsTabForm, { id: "listings", label: "Listings", children: [_jsx(Text, { size: "xs", color: "muted", children: "Which listing and category types the marketplace offers. A disabled type is hidden from every browse surface and rejected on create and add-to-cart \u2014 existing data is untouched, it just becomes unreachable until re-enabled." }), _jsxs(Stack, { gap: "xs", children: [_jsx(Text, { size: "sm", weight: "semibold", children: "Listing types" }), _jsx(Text, { size: "xs", color: "muted", children: "Disabled types are hidden from listings and reject create/add-to-cart." }), _jsx(Grid, { cols: 2, gap: "sm", children: LISTING_TYPE_KEYS.map((key) => (_jsx(Toggle, { label: key, checked: listingTypeFlags[key] ?? true, onChange: (v) => setListingTypeFlags((prev) => ({ ...prev, [key]: v })) }, key))) })] }), _jsxs(Stack, { gap: "xs", children: [_jsx(Text, { size: "sm", weight: "semibold", children: "Category types" }), _jsx(Grid, { cols: 2, gap: "sm", children: CATEGORY_TYPE_KEYS.map((key) => (_jsx(Toggle, { label: key, checked: categoryTypeFlags[key] ?? true, onChange: (v) => setCategoryTypeFlags((prev) => ({ ...prev, [key]: v })) }, key))) })] })] }) }), _jsx(TabsContent, { value: "integrations", children: _jsxs(SettingsTabForm, { id: "integrations", label: "Integrations", children: [_jsx(Text, { size: "xs", color: "muted", children: "Keys are masked in transit and stored encrypted. Click Reveal to view." }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "PhonePe" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "PhonePe Client ID", value: phonepeClientId, onChange: setPhonepeClientId, placeholder: "MERCHANTID_\u2026" }), _jsx(MaskedInput, { label: "PhonePe Client Secret", value: phonepeClientSecret, onChange: setPhonepeClientSecret, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" }), _jsx(Input, { label: "PhonePe Client Version", value: phonepeClientVersion, onChange: (e) => setPhonepeClientVersion(e.target.value), placeholder: "1" }), _jsx(Select, { label: "PhonePe Environment", options: PHONEPE_ENVIRONMENT_OPTIONS, value: phonepeEnvironment, onValueChange: setPhonepeEnvironment }), _jsx(MaskedInput, { label: "PhonePe Webhook Username", value: phonepeWebhookUsername, onChange: setPhonepeWebhookUsername, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" }), _jsx(MaskedInput, { label: "PhonePe Webhook Password", value: phonepeWebhookPassword, onChange: setPhonepeWebhookPassword, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "SMTP / Email" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "SMTP host", value: smtpHost, onChange: (e) => setSmtpHost(e.target.value), placeholder: "smtp.sendgrid.net" }), _jsx(Input, { label: "SMTP port", value: smtpPort, onChange: (e) => setSmtpPort(e.target.value), type: "number", placeholder: "587" }), _jsx(Input, { label: "SMTP user", value: smtpUser, onChange: (e) => setSmtpUser(e.target.value), placeholder: "apikey" })] }), _jsx(Input, { label: "From address", value: smtpFrom, onChange: (e) => setSmtpFrom(e.target.value), placeholder: "noreply@letitrip.in", type: "email" }), _jsx(Text, { size: "xs", color: "muted", children: "Transactional email is delivered through Resend \u2014 set the Resend API key below. These SMTP fields are stored but not currently used for delivery." })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "Google Places (store reviews)" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "Google Maps API key", value: googleMapsApiKey, onChange: setGoogleMapsApiKey, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" }), _jsx(Input, { label: "Default Google Place ID", value: googlePlaceId, onChange: (e) => setGooglePlaceId(e.target.value), placeholder: "ChIJ\u2026" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "Analytics & Tracking" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Google Analytics ID", value: gaMeasurementId, onChange: (e) => setGaMeasurementId(e.target.value), placeholder: "G-XXXXXXXXXX" }), _jsx(Input, { label: "Facebook Pixel ID", value: fbPixelId, onChange: (e) => setFbPixelId(e.target.value), placeholder: "XXXXXXXXXXXXXXXX" }), _jsx(Input, { label: "GTM Container ID", value: gtmContainerId, onChange: (e) => setGtmContainerId(e.target.value), placeholder: "GTM-XXXXXXX" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "Meta (Instagram & Facebook Social Feed)" }), _jsx(Text, { size: "xs", color: "muted", children: "Used by the Social Feed section to fetch Instagram and Facebook posts via Meta Graph API v19." }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "Page Access Token", value: metaPageAccessToken, onChange: setMetaPageAccessToken, placeholder: "EAAxxxxxxx\u2026" }), _jsx(Input, { label: "Page ID (or handle)", value: metaPageId, onChange: (e) => setMetaPageId(e.target.value), placeholder: "letitrip" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "TikTok for Developers (Social Feed)" }), _jsx(Text, { size: "xs", color: "muted", children: "Client credentials + long-lived access token from TikTok for Developers. Used to list your account's public videos." }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "Client Key", value: tiktokClientKey, onChange: setTiktokClientKey, placeholder: "aw\u2026" }), _jsx(MaskedInput, { label: "Client Secret", value: tiktokClientSecret, onChange: setTiktokClientSecret, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" }), _jsx(MaskedInput, { label: "Access Token (long-lived)", value: tiktokAccessToken, onChange: setTiktokAccessToken, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] })] }), _jsxs(Stack, { gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "DeviantArt OAuth2 (Social Feed)" }), _jsx(Text, { size: "xs", color: "muted", children: "Client credentials for DeviantArt gallery fetching (client-credentials OAuth2 flow \u2014 no user login required)." }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(MaskedInput, { label: "Client ID", value: deviantartClientId, onChange: setDeviantartClientId, placeholder: "1234" }), _jsx(MaskedInput, { label: "Client Secret", value: deviantartClientSecret, onChange: setDeviantartClientSecret, placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" })] })] })] }) }), _jsx(TabsContent, { value: "shipping", children: _jsxs(SettingsTabForm, { id: "shipping", label: "Shipping", children: [_jsx(Text, { size: "sm", weight: "medium", color: "muted", children: "Payment methods" }), _jsx(Div, { id: "setting-phonepe-enabled", children: _jsx(Toggle, { label: "PhonePe (online card/UPI) enabled \u2014 disabled by default, manual payment is the default", checked: phonepeEnabled, onChange: setPhonepeEnabled }) }), _jsx(Div, { id: "setting-manual-payment-enabled", children: _jsx(Toggle, { label: "Manual UPI/bank transfer enabled", checked: upiManualEnabled, onChange: setUpiManualEnabled }) }), _jsx(Div, { id: "setting-cod-enabled", children: _jsx(Toggle, { label: "Cash on delivery (COD) enabled", checked: codEnabled, onChange: setCodEnabled }) }), _jsx(Input, { label: "Free shipping threshold (\u20B9)", value: String(freeShippingThreshold), onChange: (e) => setFreeShippingThreshold(parseInt(e.target.value) || 0), type: "number", min: 0, helperText: "Orders above this amount get free shipping." }), _jsx(Select, { label: "Default carrier", options: CARRIER_OPTIONS, value: defaultCarrier, onValueChange: setDefaultCarrier }), _jsx(Input, { label: "Max delivery radius (km, 0 = no limit)", value: String(maxDeliveryRadius), onChange: (e) => setMaxDeliveryRadius(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "High-value checkout OTP threshold (\u20B9)", helperText: "Carts at or above this subtotal require an extra OTP verification step before payment (0 = disabled).", value: String(otpCheckoutThreshold), onChange: (e) => setOtpCheckoutThreshold(parseInt(e.target.value) || 0), type: "number", min: 0 }), _jsx(Text, { size: "sm", weight: "medium", color: "muted", className: "pt-[var(--appkit-space-2)]", children: "Seller shipping charge defaults" }), _jsxs(Grid, { cols: 2, gap: "md", children: [_jsx(Input, { label: "Seller shipping fixed (\u20B9)", helperText: "Flat shipping charge collected on the seller's behalf.", value: String(sellerShippingFixed), onChange: (e) => setSellerShippingFixed(parseFloat(e.target.value) || 0), type: "number", min: 0 }), _jsx(Input, { label: "Platform shipping (%)", helperText: "Platform's own shipping markup, as a % of order value.", value: String(platformShippingPercent), onChange: (e) => setPlatformShippingPercent(parseFloat(e.target.value) || 0), type: "number", min: 0, max: 100, step: 0.1 }), _jsx(Input, { label: "Platform shipping minimum (\u20B9)", helperText: "Floor for the platform shipping markup.", value: String(platformShippingFixedMin), onChange: (e) => setPlatformShippingFixedMin(parseFloat(e.target.value) || 0), type: "number", min: 0 })] })] }) }), _jsx(TabsContent, { value: "auction", children: _jsxs(SettingsTabForm, { id: "auction", label: "Auction", children: [_jsxs(Stack, { gap: "sm", rounded: "lg", border: "default", padding: "sm", children: [_jsx(Text, { size: "xs", weight: "medium", color: "muted", children: "Bid increment tiers" }), _jsx(Text, { size: "xs", color: "muted", children: "The minimum jump a new bid must clear, based on the current bid amount. A seller's per-listing override can require more than the matching tier, but can never undercut it." }), bidIncrementTiers.map((tier, i) => {
771
787
  const isLast = i === bidIncrementTiers.length - 1;
772
788
  return (_jsxs(Grid, { align: "end", gap: "xs", className: "grid-cols-12", children: [_jsx(Div, { className: "col-span-5", children: isLast ? (_jsxs(_Fragment, { children: [_jsx(Text, { size: "xs", weight: "medium", className: "mb-1", children: "Up to (\u20B9)" }), _jsx(Text, { size: "sm", color: "muted", children: "and above" })] })) : (_jsx(Input, { label: "Up to (\u20B9)", type: "number", min: 1, value: String(tier.upTo ?? ""), onChange: (e) => setBidIncrementTiers(bidIncrementTiers.map((t, j) => j === i ? { ...t, upTo: parseInt(e.target.value) || 0 } : t)) })) }), _jsx(Div, { className: "col-span-5", children: _jsx(Input, { label: "Increment (\u20B9)", type: "number", min: 1, value: String(tier.increment), onChange: (e) => setBidIncrementTiers(bidIncrementTiers.map((t, j) => j === i ? { ...t, increment: parseInt(e.target.value) || 0 } : t)) }) }), _jsx(Row, { centered: true, className: "col-span-2", padding: "b-xs", children: _jsx(Button, { variant: "ghost", type: "button", disabled: bidIncrementTiers.length <= 1, onClick: () => setBidIncrementTiers(bidIncrementTiers.filter((_, j) => j !== i)), "aria-label": "Remove tier", children: "\u00D7" }) })] }, i));
773
789
  }), _jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => setBidIncrementTiers([
@@ -107,7 +107,7 @@ export declare const SITE_SETTINGS_TABS: readonly [{
107
107
  readonly description: "Which listing types sellers may create, and their defaults.";
108
108
  readonly keywords: ["listing types", "auctions on", "enable", "categories"];
109
109
  }];
110
- export declare const SITE_SETTINGS_TAB_IDS: ("about" | "shipping" | "whatsapp" | "notifications" | "contact" | "auction" | "seo" | "listings" | "appearance" | "emi" | "gst" | "watermark" | "integrations" | "limits" | "announcement" | "branding" | "themes" | "fees" | "legal" | "procurement")[];
110
+ export declare const SITE_SETTINGS_TAB_IDS: ("about" | "shipping" | "notifications" | "contact" | "auction" | "seo" | "listings" | "appearance" | "emi" | "gst" | "watermark" | "integrations" | "limits" | "announcement" | "whatsapp" | "branding" | "themes" | "fees" | "legal" | "procurement")[];
111
111
  /**
112
112
  * The union `?tab=` is validated against.
113
113
  *
@@ -7,14 +7,14 @@ export declare const adminOrderUpdateSchema: z.ZodObject<{
7
7
  notes: z.ZodOptional<z.ZodString>;
8
8
  }, "strip", z.ZodTypeAny, {
9
9
  status: string;
10
- notes?: string | undefined;
11
10
  trackingNumber?: string | undefined;
11
+ notes?: string | undefined;
12
12
  refundAmount?: number | undefined;
13
13
  carrier?: string | undefined;
14
14
  }, {
15
15
  status: string;
16
- notes?: string | undefined;
17
16
  trackingNumber?: string | undefined;
17
+ notes?: string | undefined;
18
18
  refundAmount?: number | undefined;
19
19
  carrier?: string | undefined;
20
20
  }>;
@@ -108,7 +108,7 @@ export declare const adminAdFormSchema: z.ZodEffects<z.ZodObject<{
108
108
  adsenseSlot: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
109
109
  thirdPartyUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
110
110
  }, "strip", z.ZodTypeAny, {
111
- status: "draft" | "active" | "scheduled" | "paused";
111
+ status: "active" | "draft" | "scheduled" | "paused";
112
112
  name: string;
113
113
  priority: number;
114
114
  provider: "manual" | "adsense" | "thirdParty";
@@ -124,7 +124,7 @@ export declare const adminAdFormSchema: z.ZodEffects<z.ZodObject<{
124
124
  adsenseSlot?: string | undefined;
125
125
  thirdPartyUrl?: string | undefined;
126
126
  }, {
127
- status: "draft" | "active" | "scheduled" | "paused";
127
+ status: "active" | "draft" | "scheduled" | "paused";
128
128
  name: string;
129
129
  priority: number;
130
130
  provider: "manual" | "adsense" | "thirdParty";
@@ -140,7 +140,7 @@ export declare const adminAdFormSchema: z.ZodEffects<z.ZodObject<{
140
140
  adsenseSlot?: string | undefined;
141
141
  thirdPartyUrl?: string | undefined;
142
142
  }>, {
143
- status: "draft" | "active" | "scheduled" | "paused";
143
+ status: "active" | "draft" | "scheduled" | "paused";
144
144
  name: string;
145
145
  priority: number;
146
146
  provider: "manual" | "adsense" | "thirdParty";
@@ -156,7 +156,7 @@ export declare const adminAdFormSchema: z.ZodEffects<z.ZodObject<{
156
156
  adsenseSlot?: string | undefined;
157
157
  thirdPartyUrl?: string | undefined;
158
158
  }, {
159
- status: "draft" | "active" | "scheduled" | "paused";
159
+ status: "active" | "draft" | "scheduled" | "paused";
160
160
  name: string;
161
161
  priority: number;
162
162
  provider: "manual" | "adsense" | "thirdParty";
@@ -232,19 +232,19 @@ export declare const supportTicketUpdateSchema: z.ZodObject<{
232
232
  status: "closed" | "open" | "resolved" | "in_progress" | "waiting_on_user";
233
233
  priority: "normal" | "high" | "low" | "urgent";
234
234
  storeId?: string | undefined;
235
- userId?: string | undefined;
236
- orderId?: string | undefined;
237
235
  productId?: string | undefined;
236
+ userId?: string | undefined;
238
237
  bidId?: string | undefined;
238
+ orderId?: string | undefined;
239
239
  internalNotes?: string | undefined;
240
240
  }, {
241
241
  status: "closed" | "open" | "resolved" | "in_progress" | "waiting_on_user";
242
242
  priority: "normal" | "high" | "low" | "urgent";
243
243
  storeId?: string | undefined;
244
- userId?: string | undefined;
245
- orderId?: string | undefined;
246
244
  productId?: string | undefined;
245
+ userId?: string | undefined;
247
246
  bidId?: string | undefined;
247
+ orderId?: string | undefined;
248
248
  internalNotes?: string | undefined;
249
249
  }>;
250
250
  export type SupportTicketUpdateValues = z.infer<typeof supportTicketUpdateSchema>;
@@ -16,7 +16,7 @@ export declare const adminUserUpdateSchema: z.ZodObject<{
16
16
  facebook: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
17
17
  linkedin: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
18
18
  }, "strip", z.ZodTypeAny, {
19
- role?: "user" | "seller" | "admin" | "moderator" | undefined;
19
+ role?: "user" | "admin" | "moderator" | "seller" | undefined;
20
20
  displayName?: string | undefined;
21
21
  location?: string | undefined;
22
22
  adminNotes?: string | undefined;
@@ -31,7 +31,7 @@ export declare const adminUserUpdateSchema: z.ZodObject<{
31
31
  twitter?: string | undefined;
32
32
  linkedin?: string | undefined;
33
33
  }, {
34
- role?: "user" | "seller" | "admin" | "moderator" | undefined;
34
+ role?: "user" | "admin" | "moderator" | "seller" | undefined;
35
35
  displayName?: string | undefined;
36
36
  location?: string | undefined;
37
37
  adminNotes?: string | undefined;
@@ -77,7 +77,7 @@ export type NotificationUpdateInput = Partial<Pick<NotificationDocument, "isRead
77
77
  export declare const notificationQueryHelpers: {
78
78
  readonly byUser: (userId: string) => readonly ["userId", "==", string];
79
79
  readonly unread: (userId: string) => readonly [readonly ["userId", "==", string], readonly ["isRead", "==", false]];
80
- readonly byType: (type: NotificationType) => readonly ["type", "==", "system" | "welcome" | "promotion" | "order_placed" | "order_confirmed" | "order_shipped" | "order_delivered" | "order_cancelled" | "bid_placed" | "bid_outbid" | "bid_won" | "bid_lost" | "auction_ended" | "review_approved" | "review_replied" | "product_available" | "account_action" | "support_ticket_update" | "scam_report_update" | "offer_received" | "offer_responded" | "offer_expired" | "offer_counter_accepted" | "refund_initiated" | "prize_won" | "prize_reveal_expired" | "emi_installment_due_soon" | "emi_installment_overdue" | "payment_review" | "catalogue_images_stale"];
80
+ readonly byType: (type: NotificationType) => readonly ["type", "==", "welcome" | "promotion" | "order_placed" | "order_confirmed" | "order_shipped" | "order_delivered" | "order_cancelled" | "bid_placed" | "bid_outbid" | "bid_won" | "bid_lost" | "auction_ended" | "review_approved" | "review_replied" | "product_available" | "system" | "account_action" | "support_ticket_update" | "scam_report_update" | "offer_received" | "offer_responded" | "offer_expired" | "offer_counter_accepted" | "refund_initiated" | "prize_won" | "prize_reveal_expired" | "emi_installment_due_soon" | "emi_installment_overdue" | "payment_review" | "catalogue_images_stale"];
81
81
  };
82
82
  export interface TrustBarItem {
83
83
  icon: string;
@@ -90,9 +90,15 @@ export interface FeaturedResult {
90
90
  caption: string;
91
91
  }
92
92
  export interface SiteSettingsCredentials {
93
- razorpayKeyId?: string;
94
- razorpayKeySecret?: string;
95
- razorpayWebhookSecret?: string;
93
+ phonepeClientId?: string;
94
+ phonepeClientSecret?: string;
95
+ /** Version number PhonePe assigned this client credential (sent as-is to their API — a number in their SDK, stored as a string here to match every other credentials field). */
96
+ phonepeClientVersion?: string;
97
+ /** "sandbox" | "production" — selects PhonePe's base URL + Env enum. */
98
+ phonepeEnvironment?: string;
99
+ /** Username/password pair configured in the PhonePe dashboard's Webhook tab (SHA/Basic auth mode) — verified via the SDK's `validateCallback()`. */
100
+ phonepeWebhookUsername?: string;
101
+ phonepeWebhookPassword?: string;
96
102
  resendApiKey?: string;
97
103
  whatsappApiKey?: string;
98
104
  metaAppId?: string;
@@ -133,9 +139,12 @@ export interface SiteSettingsCredentials {
133
139
  whatsappTemplateLanguage?: string;
134
140
  }
135
141
  export interface SiteSettingsCredentialsMasked {
136
- razorpayKeyId?: string;
137
- razorpayKeySecret?: string;
138
- razorpayWebhookSecret?: string;
142
+ phonepeClientId?: string;
143
+ phonepeClientSecret?: string;
144
+ phonepeClientVersion?: string;
145
+ phonepeEnvironment?: string;
146
+ phonepeWebhookUsername?: string;
147
+ phonepeWebhookPassword?: string;
139
148
  resendApiKey?: string;
140
149
  whatsappApiKey?: string;
141
150
  metaAppId?: string;
@@ -326,7 +335,7 @@ export interface SiteSettingsDocument extends BaseDocument {
326
335
  whatsappNumber?: string;
327
336
  };
328
337
  payment: {
329
- razorpayEnabled: boolean;
338
+ phonepeEnabled: boolean;
330
339
  upiManualEnabled: boolean;
331
340
  codEnabled: boolean;
332
341
  /** Tier PP — cart total (rupees) at/above which checkout requires OTP verification. Applies to all payment methods except COD. Optional — falls back to no OTP gate when unset. */
@@ -212,7 +212,7 @@ export const DEFAULT_SITE_SETTINGS_DATA = {
212
212
  motto: "Your Marketplace, Your Rules",
213
213
  theme: DEFAULT_SITE_SETTINGS_THEME,
214
214
  payment: {
215
- razorpayEnabled: false,
215
+ phonepeEnabled: false,
216
216
  upiManualEnabled: true,
217
217
  codEnabled: true,
218
218
  otpCheckoutThreshold: 5000,
@@ -60,15 +60,15 @@ export declare const navItemUpdateSchema: z.ZodObject<{
60
60
  }, "strip", z.ZodTypeAny, {
61
61
  label?: string | undefined;
62
62
  icon?: string | undefined;
63
- href?: string | undefined;
64
63
  order?: number | undefined;
65
64
  parentId?: string | undefined;
65
+ href?: string | undefined;
66
66
  isVisible?: boolean | undefined;
67
67
  }, {
68
68
  label?: string | undefined;
69
69
  icon?: string | undefined;
70
- href?: string | undefined;
71
70
  order?: number | undefined;
72
71
  parentId?: string | undefined;
72
+ href?: string | undefined;
73
73
  isVisible?: boolean | undefined;
74
74
  }>;
@@ -62,7 +62,7 @@ export declare const auctionItemSchema: z.ZodObject<{
62
62
  updatedAt: z.ZodString;
63
63
  }, "strip", z.ZodTypeAny, {
64
64
  currency: string;
65
- status: "draft" | "published" | "archived" | "sold";
65
+ status: "published" | "draft" | "archived" | "sold";
66
66
  id: string;
67
67
  title: string;
68
68
  createdAt: string;
@@ -92,7 +92,7 @@ export declare const auctionItemSchema: z.ZodObject<{
92
92
  storeSlug?: string | undefined;
93
93
  }, {
94
94
  currency: string;
95
- status: "draft" | "published" | "archived" | "sold";
95
+ status: "published" | "draft" | "archived" | "sold";
96
96
  id: string;
97
97
  title: string;
98
98
  createdAt: string;
@@ -65,14 +65,14 @@ export declare const authUserSchema: z.ZodObject<{
65
65
  isEmailVerified: z.ZodOptional<z.ZodBoolean>;
66
66
  }, "strip", z.ZodTypeAny, {
67
67
  id: string;
68
- role?: "user" | "seller" | "admin" | "moderator" | "employee" | undefined;
68
+ role?: "user" | "admin" | "moderator" | "seller" | "employee" | undefined;
69
69
  email?: string | undefined;
70
70
  displayName?: string | undefined;
71
71
  photoURL?: string | undefined;
72
72
  isEmailVerified?: boolean | undefined;
73
73
  }, {
74
74
  id: string;
75
- role?: "user" | "seller" | "admin" | "moderator" | "employee" | undefined;
75
+ role?: "user" | "admin" | "moderator" | "seller" | "employee" | undefined;
76
76
  email?: string | undefined;
77
77
  displayName?: string | undefined;
78
78
  photoURL?: string | undefined;
@@ -24,8 +24,8 @@ export declare const beforeAfterItemSchema: z.ZodObject<{
24
24
  }, "strip", z.ZodTypeAny, {
25
25
  id: string;
26
26
  title: string;
27
- sortOrder: number;
28
27
  isActive: boolean;
28
+ sortOrder: number;
29
29
  createdAt?: string | undefined;
30
30
  description?: string | undefined;
31
31
  productId?: string | undefined;
@@ -37,10 +37,10 @@ export declare const beforeAfterItemSchema: z.ZodObject<{
37
37
  id: string;
38
38
  title: string;
39
39
  createdAt?: string | undefined;
40
- sortOrder?: number | undefined;
41
40
  description?: string | undefined;
42
41
  isActive?: boolean | undefined;
43
42
  productId?: string | undefined;
43
+ sortOrder?: number | undefined;
44
44
  concern?: string | undefined;
45
45
  beforeImageUrl?: string | undefined;
46
46
  afterImageUrl?: string | undefined;
@@ -69,7 +69,7 @@ export declare const createBlogPostSchema: z.ZodObject<{
69
69
  metaTitle: z.ZodOptional<z.ZodString>;
70
70
  metaDescription: z.ZodOptional<z.ZodString>;
71
71
  }, "strip", z.ZodTypeAny, {
72
- status: "draft" | "published" | "archived";
72
+ status: "published" | "draft" | "archived";
73
73
  title: string;
74
74
  content: string;
75
75
  category: "news" | "tips" | "guides" | "updates" | "community";
@@ -111,7 +111,7 @@ export declare const createBlogPostSchema: z.ZodObject<{
111
111
  category: "news" | "tips" | "guides" | "updates" | "community";
112
112
  slug: string;
113
113
  excerpt: string;
114
- status?: "draft" | "published" | "archived" | undefined;
114
+ status?: "published" | "draft" | "archived" | undefined;
115
115
  publishedAt?: string | undefined;
116
116
  tags?: string[] | undefined;
117
117
  isFeatured?: boolean | undefined;
@@ -208,7 +208,7 @@ export declare const updateBlogPostSchema: z.ZodObject<{
208
208
  metaTitle: z.ZodOptional<z.ZodOptional<z.ZodString>>;
209
209
  metaDescription: z.ZodOptional<z.ZodOptional<z.ZodString>>;
210
210
  }, "strip", z.ZodTypeAny, {
211
- status?: "draft" | "published" | "archived" | undefined;
211
+ status?: "published" | "draft" | "archived" | undefined;
212
212
  title?: string | undefined;
213
213
  content?: string | undefined;
214
214
  category?: "news" | "tips" | "guides" | "updates" | "community" | undefined;
@@ -245,7 +245,7 @@ export declare const updateBlogPostSchema: z.ZodObject<{
245
245
  metaTitle?: string | undefined;
246
246
  metaDescription?: string | undefined;
247
247
  }, {
248
- status?: "draft" | "published" | "archived" | undefined;
248
+ status?: "published" | "draft" | "archived" | undefined;
249
249
  title?: string | undefined;
250
250
  content?: string | undefined;
251
251
  category?: "news" | "tips" | "guides" | "updates" | "community" | undefined;
@@ -48,7 +48,7 @@ export declare const blogDraftSchema: z.ZodObject<{
48
48
  authorName: z.ZodString;
49
49
  isFeatured: z.ZodBoolean;
50
50
  }, "strip", z.ZodTypeAny, {
51
- status: "draft" | "published" | "archived";
51
+ status: "published" | "draft" | "archived";
52
52
  title: string;
53
53
  content: string;
54
54
  category: "news" | "tips" | "guides" | "updates" | "community";
@@ -63,7 +63,7 @@ export declare const blogDraftSchema: z.ZodObject<{
63
63
  metaTitle: string;
64
64
  metaDescription: string;
65
65
  }, {
66
- status: "draft" | "published" | "archived";
66
+ status: "published" | "draft" | "archived";
67
67
  title: string;
68
68
  content: string;
69
69
  category: "news" | "tips" | "guides" | "updates" | "community";
@@ -115,7 +115,7 @@ export declare const blogPostFirestoreSchema: z.ZodObject<{
115
115
  metaTitle: z.ZodOptional<z.ZodString>;
116
116
  metaDescription: z.ZodOptional<z.ZodString>;
117
117
  }, "strip", z.ZodTypeAny, {
118
- status: "draft" | "published" | "archived";
118
+ status: "published" | "draft" | "archived";
119
119
  id: string;
120
120
  title: string;
121
121
  content: string;
@@ -168,7 +168,7 @@ export declare const blogPostFirestoreSchema: z.ZodObject<{
168
168
  metaTitle?: string | undefined;
169
169
  metaDescription?: string | undefined;
170
170
  }, {
171
- status: "draft" | "published" | "archived";
171
+ status: "published" | "draft" | "archived";
172
172
  id: string;
173
173
  title: string;
174
174
  content: string;
@@ -355,7 +355,7 @@ export declare const blogPostSchema: z.ZodObject<{
355
355
  createdAt: z.ZodOptional<z.ZodString>;
356
356
  updatedAt: z.ZodOptional<z.ZodString>;
357
357
  }, "strip", z.ZodTypeAny, {
358
- status: "draft" | "published" | "archived";
358
+ status: "published" | "draft" | "archived";
359
359
  id: string;
360
360
  title: string;
361
361
  category: "news" | "tips" | "guides" | "updates" | "community";
@@ -405,7 +405,7 @@ export declare const blogPostSchema: z.ZodObject<{
405
405
  metaTitle?: string | undefined;
406
406
  metaDescription?: string | undefined;
407
407
  }, {
408
- status: "draft" | "published" | "archived";
408
+ status: "published" | "draft" | "archived";
409
409
  id: string;
410
410
  title: string;
411
411
  category: "news" | "tips" | "guides" | "updates" | "community";
@@ -79,8 +79,8 @@ export declare const cartItemSchema: z.ZodObject<{
79
79
  slug?: string | undefined;
80
80
  attributes?: Record<string, string> | undefined;
81
81
  } | undefined;
82
- userId?: string | undefined;
83
82
  quantity?: number | undefined;
83
+ userId?: string | undefined;
84
84
  sessionId?: string | undefined;
85
85
  addedAt?: string | undefined;
86
86
  }>;
@@ -135,8 +135,8 @@ export declare const cartSummarySchema: z.ZodObject<{
135
135
  slug?: string | undefined;
136
136
  attributes?: Record<string, string> | undefined;
137
137
  } | undefined;
138
- userId?: string | undefined;
139
138
  quantity?: number | undefined;
139
+ userId?: string | undefined;
140
140
  sessionId?: string | undefined;
141
141
  addedAt?: string | undefined;
142
142
  }>, "many">;
@@ -173,8 +173,8 @@ export declare const cartSummarySchema: z.ZodObject<{
173
173
  slug?: string | undefined;
174
174
  attributes?: Record<string, string> | undefined;
175
175
  } | undefined;
176
- userId?: string | undefined;
177
176
  quantity?: number | undefined;
177
+ userId?: string | undefined;
178
178
  sessionId?: string | undefined;
179
179
  addedAt?: string | undefined;
180
180
  }[];
@@ -20,7 +20,7 @@ export declare const createCatalogueItemSchema: z.ZodObject<{
20
20
  description?: string | undefined;
21
21
  categorySlugs?: string[] | undefined;
22
22
  mainImage?: string | undefined;
23
- condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | "graded" | undefined;
23
+ condition?: "new" | "like_new" | "good" | "fair" | "poor" | "used" | "refurbished" | "broken" | "graded" | undefined;
24
24
  }, {
25
25
  title: string;
26
26
  price?: number | undefined;
@@ -30,7 +30,7 @@ export declare const createCatalogueItemSchema: z.ZodObject<{
30
30
  categorySlugs?: string[] | undefined;
31
31
  mainImage?: string | undefined;
32
32
  images?: string[] | undefined;
33
- condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | "graded" | undefined;
33
+ condition?: "new" | "like_new" | "good" | "fair" | "poor" | "used" | "refurbished" | "broken" | "graded" | undefined;
34
34
  visibility?: "public" | "private" | undefined;
35
35
  }>;
36
36
  export declare const updateCatalogueItemSchema: z.ZodObject<{
@@ -53,7 +53,7 @@ export declare const updateCatalogueItemSchema: z.ZodObject<{
53
53
  categorySlugs?: string[] | undefined;
54
54
  mainImage?: string | undefined;
55
55
  images?: string[] | undefined;
56
- condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | "graded" | undefined;
56
+ condition?: "new" | "like_new" | "good" | "fair" | "poor" | "used" | "refurbished" | "broken" | "graded" | undefined;
57
57
  visibility?: "public" | "private" | undefined;
58
58
  }, {
59
59
  title?: string | undefined;
@@ -64,7 +64,7 @@ export declare const updateCatalogueItemSchema: z.ZodObject<{
64
64
  categorySlugs?: string[] | undefined;
65
65
  mainImage?: string | undefined;
66
66
  images?: string[] | undefined;
67
- condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | "graded" | undefined;
67
+ condition?: "new" | "like_new" | "good" | "fair" | "poor" | "used" | "refurbished" | "broken" | "graded" | undefined;
68
68
  visibility?: "public" | "private" | undefined;
69
69
  }>;
70
70
  export type CreateCatalogueItemInput = z.infer<typeof createCatalogueItemSchema>;