{"openapi":"3.1.0","info":{"title":"API Login Sistema","description":"API para sistema de login con autenticación JWT","version":"2.0.0"},"paths":{"/{path}":{"options":{"summary":"Options Handler","description":"Manejar todas las requests OPTIONS para CORS","operationId":"options_handler__path__options","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/cors-test":{"get":{"summary":"Cors Test","description":"Endpoint para probar CORS","operationId":"cors_test_cors_test_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/register":{"post":{"summary":"Register","operationId":"register_auth_register_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_register_auth_register_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Register Auth Register Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/login":{"post":{"summary":"Login","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/refresh":{"post":{"summary":"Refresh Token","operationId":"refresh_token_auth_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Refresh Token Auth Refresh Post"}}}}},"security":[{"HTTPBearer":[]}]}},"/profile":{"get":{"summary":"Get Profile","operationId":"get_profile_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/admin/users/pending":{"get":{"summary":"Get Pending Users","operationId":"get_pending_users_admin_users_pending_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Per Page"}},{"name":"role_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/authorize":{"post":{"summary":"Authorize User","operationId":"authorize_user_admin_users__user_id__authorize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/reject":{"post":{"summary":"Reject User","operationId":"reject_user_admin_users__user_id__reject_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/users/{user_id}/identification":{"get":{"summary":"Get User Identification","operationId":"get_user_identification_admin_users__user_id__identification_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/stats":{"get":{"summary":"Admin Stats","operationId":"admin_stats_admin_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminStats"}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"AdminStats":{"properties":{"users_total":{"type":"integer","title":"Users Total"},"users_authorized":{"type":"integer","title":"Users Authorized"},"users_pending":{"type":"integer","title":"Users Pending"},"users_by_role":{"additionalProperties":{"type":"integer"},"type":"object","title":"Users By Role"}},"type":"object","required":["users_total","users_authorized","users_pending","users_by_role"],"title":"AdminStats"},"Body_register_auth_register_post":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"nombre_completo":{"type":"string","title":"Nombre Completo"},"apellidos":{"type":"string","title":"Apellidos"},"direccion":{"type":"string","title":"Direccion"},"edad":{"type":"integer","title":"Edad"},"telefono":{"type":"string","title":"Telefono"},"role":{"type":"string","title":"Role"},"foto_identificacion":{"type":"string","format":"binary","title":"Foto Identificacion"}},"type":"object","required":["email","password","nombre_completo","apellidos","direccion","edad","telefono","role","foto_identificacion"],"title":"Body_register_auth_register_post"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Token":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token","refresh_token"],"title":"Token"},"UserLogin":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","minLength":6,"title":"Password"}},"type":"object","required":["email","password"],"title":"UserLogin"},"UserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"nombre_completo":{"type":"string","title":"Nombre Completo"},"apellidos":{"type":"string","title":"Apellidos"},"direccion":{"type":"string","title":"Direccion"},"edad":{"type":"integer","title":"Edad"},"telefono":{"type":"string","title":"Telefono"},"role":{"type":"string","title":"Role"},"is_authorized":{"type":"boolean","title":"Is Authorized"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"authorized_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Authorized At"}},"type":"object","required":["id","email","nombre_completo","apellidos","direccion","edad","telefono","role","is_authorized","created_at"],"title":"UserResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}