Validación técnica de la API de BIND contra producción (GET-only)

Plan A del saldo CONFIRMADO (Total − Payments − CreditNotes, misma fila);
flujo MVP sostenible 100% en lectura; PDF del CFDI por API. Hallazgo duro:
sin recurso de pagos individuales ni REP (escalar a Pedro). Cliente extendido
(Quotes, Currencies, Locations, pdf/xml, GET por ID estilo REST) y tipos
reales en types.real.ts. Detalle en bind-api-sandbox/VALIDACION-API.md;
reporte crudo y token gitignoreados.
This commit is contained in:
JohannVelazquez
2026-07-06 17:17:27 -06:00
parent 12006b5fa4
commit 9ccfbe262e
10 changed files with 1697 additions and 27 deletions
+14 -4
View File
@@ -1,16 +1,23 @@
# --- Configuración del sandbox de BIND ---
#
# Por default el cliente apunta al mock local (puerto 4010).
# Cuando Pedro entregue el API key real, copia este archivo a .env y
# cambia BIND_BASE_URL a https://api.bind.com.mx + llena las credenciales.
# Para apuntar al API REAL: BIND_BASE_URL=https://api.bind.com.mx y pon el
# token en BIND_API_TOKEN (así lo nombra el correo de entrega de Pedro, 6-jul).
#
# Recuerda: BIND solo tiene PRODUCCIÓN. Cualquier llamada con base URL real
# afecta datos reales de Balam. Mantén MODE=read-only mientras no haya
# autorización explícita para escribir.
# autorización explícita para escribir. El token NUNCA se versiona ni se
# imprime (este archivo .env está en .gitignore).
#
# Validado 6-jul-2026 (ver VALIDACION-API.md): la auth real es SOLO
# Authorization: Bearer <token> — la subscription key no se requiere.
BIND_BASE_URL=http://localhost:4010
# Token del API real (entregado por Pedro; usuario BIND de Arturo Rosas):
BIND_API_TOKEN=
# Credencial para el mock local (cualquier string no vacío funciona):
BIND_API_KEY=mock-bearer-token
BIND_SUBSCRIPTION_KEY=mock-subscription-key
BIND_SUBSCRIPTION_KEY=
# read-only | dry-run | write
# - read-only: solo GET. Bloquea POST/PUT/PATCH/DELETE en el cliente.
@@ -20,3 +27,6 @@ BIND_MODE=read-only
# Puerto del mock server
MOCK_PORT=4010
# Presupuesto de peticiones del script de validación (src/validate-real-api.ts)
VALIDATION_BUDGET=120