{"openapi":"3.1.0","info":{"title":"API Centurión","description":"API para gestionar controladores y proyectos","version":"1.0.0"},"paths":{"/sistema/test":{"get":{"tags":["Sistema"],"summary":"Test","description":"Performs a connection test with the database and the MQTT server.","operationId":"test_sistema_test_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/sistema/respaldo":{"post":{"tags":["Sistema"],"summary":"Database Backup ","description":"Executes the database backup task.","operationId":"database_backup__sistema_respaldo_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/respaldo"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sistema/ClientStatus":{"post":{"tags":["Sistema"],"summary":"Client Connection Status","description":"Sends a notification by email and Telegram each time a client connects/disconnects from the broker.","operationId":"client_connection_status_sistema_ClientStatus_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/estadoCliente"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sistema/testCenturion":{"post":{"tags":["Sistema"],"summary":"Test Init","description":"Performs a general test on a specific controller. The test consists of sending scheduling and changing the operating modes.","operationId":"test_init_sistema_testCenturion_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/testCenturion"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/":{"post":{"tags":["Autenticación"],"summary":"Authentication","description":"Checks if the user exists in the database, their role, and if they are linked to the entered project.","operationId":"authentication_auth__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/external":{"post":{"tags":["Autenticación"],"summary":"External Authentication","description":"Checks if the user exists in the database, their role, and if they are linked to the entered project.","operationId":"external_authentication_auth_external_post","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$","description":"Dirección de correo electrónico válida","title":"Email"},"description":"Dirección de correo electrónico válida","example":"usuario@trafficlight.mx"},{"name":"password","in":"query","required":true,"schema":{"type":"string","title":"Password"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/info/monitoreo":{"get":{"tags":["Centurion info"],"summary":"Current State","description":"Checks the latest state of a specific Centurión regarding the entered date and time.","operationId":"current_state_info_monitoreo_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"matricula","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Z]{2}-[A-Z]{2}-[0-9]{2}-[0-9]{4}$","description":"Matrícula de control a consultar. Formato: XX-XX-XX-XXXX ","title":"Matricula"},"description":"Matrícula de control a consultar. Formato: XX-XX-XX-XXXX ","example":"TC-CL-24-0023"},{"name":"fecha","in":"query","required":true,"schema":{"type":"string","pattern":"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$","description":"Fecha en formato YYYY-MM-DD","title":"Fecha"},"description":"Fecha en formato YYYY-MM-DD","example":"2025-09-01"},{"name":"hora","in":"query","required":true,"schema":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$","description":"Hora en formato HH:MM:SS (24 horas)","title":"Hora"},"description":"Hora en formato HH:MM:SS (24 horas)","example":"17:13:13"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/info/listaEstados":{"get":{"tags":["Centurion info"],"summary":"List Of States","description":"Returns a JSON with the list of states that Centurión has had on the given date.","operationId":"list_of_states_info_listaEstados_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"matricula","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Z]{2}-[A-Z]{2}-[0-9]{2}-[0-9]{4}$","description":"Matrícula de control a consultar. Formato: XX-XX-XX-XXXX ","title":"Matricula"},"description":"Matrícula de control a consultar. Formato: XX-XX-XX-XXXX ","example":"TC-CL-24-0023"},{"name":"fecha","in":"query","required":true,"schema":{"type":"string","pattern":"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$","description":"Fecha en formato YYYY-MM-DD","title":"Fecha"},"description":"Fecha en formato YYYY-MM-DD","example":"2025-09-01"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/info/controladores":{"get":{"tags":["Centurion info"],"summary":"List Of Controllers","description":"Returns a JSON with the list of active controllers related to the project. Each controller shows its auxiliary name, location, and intersection.","operationId":"list_of_controllers_info_controladores_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$","description":"Dirección de correo electrónico válida","title":"Email"},"description":"Dirección de correo electrónico válida","example":"usuario@trafficlight.mx"},{"name":"proyecto","in":"query","required":true,"schema":{"type":"string","description":"Proyecto válido","title":"Proyecto"},"description":"Proyecto válido","example":"DEMO"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/info/historial":{"get":{"tags":["Centurion info"],"summary":"Programming History","description":"Returns a JSON with the list of schedules made to a specific Centurión. Each item indicates the user who scheduled it, date, time, origin, and auxiliary note.","operationId":"programming_history_info_historial_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"matricula","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Z]{2}-[A-Z]{2}-[0-9]{2}-[0-9]{4}$","description":"Matrícula de control a consultar. Formato: XX-XX-XX-XXXX ","title":"Matricula"},"description":"Matrícula de control a consultar. Formato: XX-XX-XX-XXXX ","example":"TC-CL-24-0023"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/info/progHistorial":{"get":{"tags":["Centurion info"],"summary":"Programming History Id","description":"Returns the scheduling JSON of a specific item.","operationId":"programming_history_ID_info_progHistorial_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"matricula","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Z]{2}-[A-Z]{2}-[0-9]{2}-[0-9]{4}$","description":"Matrícula de control a consultar. Formato: XX-XX-XX-XXXX ","title":"Matricula"},"description":"Matrícula de control a consultar. Formato: XX-XX-XX-XXXX ","example":"TC-CL-24-0023"},{"name":"ID","in":"query","required":true,"schema":{"type":"integer","description":"ID de historial entero","title":"Id"},"description":"ID de historial entero","example":"1"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/info/progActual":{"get":{"tags":["Centurion info"],"summary":"Current Programming","description":"Returns the latest schedule of a specific Centurión.","operationId":"current_programming_info_progActual_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"matricula","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Z]{2}-[A-Z]{2}-[0-9]{2}-[0-9]{4}$","description":"Matrícula de control a consultar. Formato: XX-XX-XX-XXXX ","title":"Matricula"},"description":"Matrícula de control a consultar. Formato: XX-XX-XX-XXXX ","example":"TC-CL-24-0023"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/info/proyectos":{"get":{"tags":["Centurion info"],"summary":"List Of Projects","description":"Returns the active projects.","operationId":"list_of_projects_info_proyectos_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$","description":"Dirección de correo electrónico válida","title":"Email"},"description":"Dirección de correo electrónico válida","example":"usuario@trafficlight.mx"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/info/usuarios":{"get":{"tags":["Centurion info"],"summary":"List Of Users","description":"Returns the list of users.","operationId":"list_of_users_info_usuarios_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$","description":"Dirección de correo electrónico válida","title":"Email"},"description":"Dirección de correo electrónico válida","example":"usuario@trafficlight.mx"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/info/status_controller":{"get":{"tags":["Centurion info"],"summary":"Status Controler","description":"Sends a notification by email and Telegram each time a client connects/disconnects from the broker.","operationId":"status_controler_info_status_controller_get","parameters":[{"name":"matricula","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Z]{2}-[A-Z]{2}-[0-9]{2}-[0-9]{4}$","description":"Matrícula de control a consultar. Formato: XX-XX-XX-XXXX ","title":"Matricula"},"description":"Matrícula de control a consultar. Formato: XX-XX-XX-XXXX ","example":"TC-CL-24-0023"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/info/planos":{"get":{"tags":["Centurion info"],"summary":"Read Plans","operationId":"read_plans_info_planos_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"matricula","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Z]{2}-[A-Z]{2}-[0-9]{2}-[0-9]{4}$","description":"Matrícula de control a consultar. Formato: XX-XX-XX-XXXX ","title":"Matricula"},"description":"Matrícula de control a consultar. Formato: XX-XX-XX-XXXX ","example":"TC-CL-24-0023"},{"name":"tipo","in":"query","required":true,"schema":{"$ref":"#/components/schemas/TipoConsulta"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/update/add_control":{"post":{"tags":["Actualizar agregar"],"summary":"Add Controller","description":"This endpoint adds a new controller to the database.","operationId":"add_controller_update_add_control_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Control"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/update/delete_control":{"delete":{"tags":["Actualizar agregar"],"summary":"Delete Controller","description":"Deletes a controller from the database.","operationId":"delete_controller_update_delete_control_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"matricula","in":"query","required":true,"schema":{"type":"string","title":"Matricula"}},{"name":"user","in":"query","required":true,"schema":{"type":"string","title":"User"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/update/add_user":{"post":{"tags":["Actualizar agregar"],"summary":"Add User ","description":"Adds a new user to the database.","operationId":"add_user__update_add_user_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/add_user"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/update/proy_asign":{"post":{"tags":["Actualizar agregar"],"summary":"Assign Project","description":"Assigns a project to a specific user.","operationId":"assign_project_update_proy_asign_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/assign_user"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/update/user_desactivate":{"patch":{"tags":["Actualizar agregar"],"summary":"Delete User","description":"Assigns a project to a specific user.","operationId":"delete_user_update_user_desactivate_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_email","in":"query","required":true,"schema":{"type":"string","title":"User Email"}},{"name":"user_desactivate_email","in":"query","required":true,"schema":{"type":"string","title":"User Desactivate Email"}},{"name":"estado","in":"query","required":true,"schema":{"type":"integer","title":"Estado"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/update/agregar_planos":{"post":{"tags":["Actualizar agregar"],"summary":"Add Plans","operationId":"add_plans_update_agregar_planos_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_add_plans_update_agregar_planos_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/update/borrar_planos":{"delete":{"tags":["Actualizar agregar"],"summary":"Delete Plans","operationId":"delete_plans_update_borrar_planos_delete","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_delete_plans_update_borrar_planos_delete"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/operacion/progLocal":{"post":{"tags":["Operación"],"summary":"Send Local Programming","description":"Saves locally made scheduling in the database.","operationId":"send_local_programming_operacion_progLocal_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Local"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/operacion/prog":{"post":{"tags":["Operación"],"summary":"Send Remote Programming","description":"# Send Programming to Controller\n---\n## Description\nSends programming to a specific controller\n\n\n## Parameters\n-  ☑️ ​ID: controller identifier \n-  ☑️ ​User: user who will perform the programming  \n-  ☑️​ Prog: controller programming json\n-  ☑️​ Intersection: crossing where the controller is placed\n-  ☑️​ Note: additional operator comment  \n-  ☑️​ Date: of last programming\n## Usage\nBefore sending programming it is necessary to obtain two pieces of data:\n\n- Date and time of last programming\n- Programming JSON\n\nTo obtain them it is necessary to consume **/info/progActual** and locate the ***Date*** key and the ***Programming*** key.\n\nWith this data you can send test programming to the controller.\n\n⚠️​ **Note:** Once the programming has been sent, the controller will switch to flash mode. It will switch to automatic mode when the internal clock finds **even minute zero second plus its synchronization time**. At that point the controller will execute the programming it has received.","operationId":"send_remote_programming_operacion_prog_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operacion"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/operacion/modo":{"post":{"tags":["Operación"],"summary":"Send Operation Mode","description":"# Change Operation Mode\n---\n## Description\nThe controller has 4 operation modes:\n1. Automatic       **A**\n2. Manual          **M**\n3. Semi-automatic  **S**\n4. Flash           **D**\n\nTo change mode it is necessary:\n\n- ID: controller identifier\n- Mode: letter corresponding to the desired mode\n- User: who will perform the mode change\n\n## Operation\n### Automatic\nThe controller switches to flash mode and will remain so until its internal clock finds even minute zero second plus synchronization time. At that point the controller will execute the programming it has received and will operate in automatic mode.\n### Manual\nThe controller will change scenario and will remain there until a state change is indicated again.\n### Semi-automatic\nThe controller will change scenario. It will continue operating with the programmed times. \n### Flash\nThe controller will start infinite flash","operationId":"send_operation_mode_operacion_modo_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Modo"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/estado/save":{"post":{"tags":["Estado"],"summary":"Save Current Sate","description":"Saves the state changes presented by Centurión throughout the day. These data are stored in the database.","operationId":"save_current_sate_estado_save_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Estado"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/estado/savePOS":{"post":{"tags":["Estado"],"summary":"Current Position","description":"Saves positioning information in the database for a specific Centurión.","operationId":"current_position_estado_savePOS_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstadoPos"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/estado/savEMQX":{"post":{"tags":["Estado"],"summary":"Save Current Sate Emqx","operationId":"save_current_sate_emqx_estado_savEMQX_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstadoEMQX"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/estado/operActual":{"get":{"tags":["Estado"],"summary":"Current Operating Mode","description":"Returns the operating mode in which the controller is currently working.","operationId":"current_operating_mode_estado_operActual_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"controlador","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Z]{2}-[A-Z]{2}-[0-9]{2}-[0-9]{4}$","description":"Matrícula de control a consultar. Formato: XX-XX-XX-XXXX ","title":"Controlador"},"description":"Matrícula de control a consultar. Formato: XX-XX-XX-XXXX ","example":"TC-CL-24-0023"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AuthRequest":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"},"proyecto":{"type":"string","title":"Proyecto"},"origen":{"type":"boolean","title":"Origen"}},"type":"object","required":["email","password","proyecto","origen"],"title":"AuthRequest"},"Body_add_plans_update_agregar_planos_post":{"properties":{"matricula":{"type":"string","title":"Matricula"},"histograma":{"type":"string","format":"binary","title":"Histograma"},"esquema":{"type":"string","format":"binary","title":"Esquema"}},"type":"object","required":["matricula"],"title":"Body_add_plans_update_agregar_planos_post"},"Body_delete_plans_update_borrar_planos_delete":{"properties":{"matricula":{"type":"string","title":"Matricula"},"borrar_histograma":{"type":"boolean","title":"Borrar Histograma","default":false},"borrar_esquema":{"type":"boolean","title":"Borrar Esquema","default":false}},"type":"object","required":["matricula"],"title":"Body_delete_plans_update_borrar_planos_delete"},"Control":{"properties":{"matricula":{"type":"string","title":"Matricula"},"nombre_auxiliar":{"type":"string","title":"Nombre Auxiliar"},"programacion":{"type":"string","title":"Programacion"},"nota":{"type":"string","title":"Nota"},"user_reg":{"type":"string","title":"User Reg"},"fecha":{"type":"string","format":"date","title":"Fecha"},"hora":{"type":"string","format":"time","title":"Hora"},"proyecto":{"type":"string","title":"Proyecto"},"latitud":{"type":"string","title":"Latitud"},"longitud":{"type":"string","title":"Longitud"},"interseccion":{"type":"string","title":"Interseccion"}},"type":"object","required":["matricula","nombre_auxiliar","programacion","nota","user_reg","fecha","hora","proyecto","latitud","longitud","interseccion"],"title":"Control"},"Estado":{"properties":{"matricula":{"type":"string","title":"Matricula"},"estado":{"type":"object","title":"Estado"},"latitud":{"type":"number","title":"Latitud"},"longitud":{"type":"number","title":"Longitud"},"fecha":{"type":"string","format":"date","title":"Fecha"},"hora":{"type":"string","format":"time","title":"Hora"},"descripcion":{"type":"string","title":"Descripcion"}},"type":"object","required":["matricula","estado","latitud","longitud","fecha","hora","descripcion"],"title":"Estado"},"EstadoEMQX":{"properties":{"matricula":{"type":"string","title":"Matricula"},"estado":{"type":"object","title":"Estado"},"latitud":{"type":"number","title":"Latitud"},"longitud":{"type":"number","title":"Longitud"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","required":["matricula","estado","latitud","longitud","timestamp"],"title":"EstadoEMQX"},"EstadoPos":{"properties":{"matricula":{"type":"string","title":"Matricula"},"latitud":{"type":"number","title":"Latitud"},"longitud":{"type":"number","title":"Longitud"},"zona":{"type":"integer","title":"Zona"}},"type":"object","required":["matricula","latitud","longitud","zona"],"title":"EstadoPos"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Local":{"properties":{"matricula":{"type":"string","title":"Matricula"},"usuario":{"type":"string","title":"Usuario"},"prog":{"type":"object","title":"Prog"},"interseccion":{"type":"string","title":"Interseccion"},"nota":{"type":"string","title":"Nota"},"fecha":{"type":"string","format":"date-time","title":"Fecha"}},"type":"object","required":["matricula","usuario","prog","interseccion","nota","fecha"],"title":"Local"},"Modo":{"properties":{"matricula":{"type":"string","title":"Matricula","example":"TC-CL-24-0023"},"modo":{"type":"string","title":"Modo","example":"A"},"usuario":{"type":"string","title":"Usuario","example":"miovision@miovision"}},"type":"object","required":["matricula","modo","usuario"],"title":"Modo"},"Operacion":{"properties":{"matricula":{"type":"string","title":"Matricula","description":"Matrícula de control","example":"TC-CL-24-0023"},"usuario":{"type":"string","title":"Usuario","description":"Usuario que realiza la solicitud","example":"miovision@miovision.com"},"prog":{"type":"object","title":"Prog","description":"Datos de programación","default":{},"example":{}},"interseccion":{"type":"string","title":"Interseccion","description":"Intersección de referencia","example":"Calle 1 y Av. 2"},"nota":{"type":"string","title":"Nota","description":"Comentarios adicionales","example":"Nota importante"},"fecha":{"type":"string","format":"date-time","title":"Fecha","description":"Fecha y hora de la solicitud","example":"2025-06-02T09:22:28"}},"type":"object","required":["matricula","usuario","interseccion","nota","fecha"],"title":"Operacion"},"TipoConsulta":{"type":"string","enum":["Histograma","Esquema"],"title":"TipoConsulta"},"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"},"add_user":{"properties":{"usuario_reg":{"type":"string","title":"Usuario Reg"},"nombre":{"type":"string","title":"Nombre"},"ap_pater":{"type":"string","title":"Ap Pater"},"ap_mater":{"type":"string","title":"Ap Mater"},"correo":{"type":"string","title":"Correo"},"rol":{"type":"integer","title":"Rol"},"password":{"type":"string","title":"Password"},"proyecto":{"items":{"type":"string"},"type":"array","title":"Proyecto"}},"type":"object","required":["usuario_reg","nombre","ap_pater","ap_mater","correo","rol","password","proyecto"],"title":"add_user"},"assign_user":{"properties":{"usuario_reg":{"type":"string","title":"Usuario Reg"},"correo":{"type":"string","title":"Correo"},"proyecto":{"type":"string","title":"Proyecto"}},"type":"object","required":["usuario_reg","correo","proyecto"],"title":"assign_user"},"estadoCliente":{"properties":{"estado":{"type":"boolean","title":"Estado"},"matricula":{"type":"string","title":"Matricula"}},"type":"object","required":["estado","matricula"],"title":"estadoCliente"},"respaldo":{"properties":{"correo":{"type":"string","title":"Correo"}},"type":"object","required":["correo"],"title":"respaldo"},"testCenturion":{"properties":{"usuario":{"type":"string","title":"Usuario"},"matricula":{"type":"string","title":"Matricula"}},"type":"object","required":["usuario","matricula"],"title":"testCenturion"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}