feat: marca Uriel Jareth Consulting, API segura para agentes, aprobacion humana y webhooks HMAC

This commit is contained in:
urieljareth
2026-11-25 00:55:18 -06:00
parent 75180b0fe4
commit 0d4f19f35d
111 changed files with 7167 additions and 1272 deletions
+4 -4
View File
@@ -11,7 +11,7 @@ from app.models.export_ import (
PlanBucefaloResponse,
)
from app.models.common import ErrorResponse
from app.auth import require_auth
from app.auth import require_scope
from app.services.calculators import (
calcular_financiamiento,
FINANCIAMIENTO_PLANES,
@@ -28,7 +28,7 @@ class PlanResponse(FinanciamientoResponse):
@router.get("/planes", response_model=list[PlanResponse])
async def get_planes(_auth: dict = Depends(require_auth)):
async def get_planes(_auth: dict = Depends(require_scope("catalogo:leer"))):
return [
PlanResponse(
meses=p["meses"],
@@ -47,7 +47,7 @@ async def get_planes(_auth: dict = Depends(require_auth)):
)
async def calcular(
body: FinanciamientoRequest,
_auth: dict = Depends(require_auth),
_auth: dict = Depends(require_scope("catalogo:leer")),
):
plan = next((p for p in FINANCIAMIENTO_PLANES if p["meses"] == body.meses), None)
if not plan:
@@ -77,7 +77,7 @@ async def calcular(
)
async def simulacion(
cotizacion_id: str,
_auth: dict = Depends(require_auth),
_auth: dict = Depends(require_scope("catalogo:leer")),
db: Connection = Depends(get_db),
):
cot = await db.fetchrow(