feat(mp): add Mercado Pago reauthorization notice and status card components

- Implemented MpReauthNotice component to notify users when reauthorization is needed.
- Created MpStatusCard component to display the current status of the Mercado Pago account.
- Added utility functions and constants for handling Mercado Pago status and messages.
- Introduced hooks for managing the connection and disconnection of Mercado Pago accounts.
- Developed a disconnect confirmation modal for user actions.
- Added tests for the new functionality and utility functions.
- Defined schemas for Mercado Pago account status and callback reasons in shared package.
This commit is contained in:
Jose Selesan
2026-10-07 12:00:38 -03:00
parent e03f510874
commit 21a4c69f38
64 changed files with 3154 additions and 425 deletions

View File

@@ -35,6 +35,17 @@ BETTER_AUTH_SECRET=""
# EMAIL_SERVER_PASSWORD=""
# EMAIL_FROM="Gruperly <no-reply@gruperly.com>"
# Mercado Pago (OAuth Authorization Code + PKCE). Opcionales: sin credenciales
# GET /mp/connect responde 503 mp_not_configured y la app sigue funcionando
# (el paso "Cobros" del onboarding es salteable).
# Generate it with: openssl rand -base64 32 -- exactly 32 bytes once decoded.
# TOKEN_ENCRYPTION_KEY=""
# Redirect URL registered in the Mercado Pago panel, character for character.
# The panel requires HTTPS (no http://localhost): local dev goes through a tunnel.
# MP_REDIRECT_URI="https://api.gruperly.com/api/v1/mp/callback"
# MP_CLIENT_ID=""
# MP_CLIENT_SECRET=""
# Only if you want the API on another domain: it is baked into the Vite bundle
# and forces you to drop the /api proxy from apps/web/nginx.conf. Empty = same
# origin (recommended).