{
  "openapi": "3.0.4",
  "info": {
    "title": "DashboardAPI",
    "version": "1.0"
  },
  "paths": {
    "/api/Admin/avisos": {
      "get": {
        "tags": [
          "Admin"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnnouncementRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AnnouncementRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AnnouncementRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Admin/avisos/{id}": {
      "put": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnnouncementRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AnnouncementRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AnnouncementRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Admin/avisos/{id}/retirar": {
      "post": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Admin/usuarios": {
      "get": {
        "tags": [
          "Admin"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": { }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": { }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": { }
                }
              }
            }
          }
        }
      }
    },
    "/api/Admin/roles": {
      "get": {
        "tags": [
          "Admin"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": { }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": { }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": { }
                }
              }
            }
          }
        }
      }
    },
    "/api/Admin/historial": {
      "get": {
        "tags": [
          "Admin"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": { }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": { }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": { }
                }
              }
            }
          }
        }
      }
    },
    "/api/Admin/puestos": {
      "get": {
        "tags": [
          "Admin"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/Admin/usuario": {
      "post": {
        "tags": [
          "Admin"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUsuarioRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUsuarioRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUsuarioRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Admin/usuario/{id}": {
      "put": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUsuarioRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUsuarioRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUsuarioRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Admin/usuario/{id}/toggle-status": {
      "patch": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Admin/usuario/{id}/reset-access": {
      "post": {
        "tags": [
          "Admin"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/applications/public": {
      "get": {
        "tags": [
          "Applications"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/applications": {
      "get": {
        "tags": [
          "Applications"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Auth/login": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Auth/verify-login": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyLoginRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyLoginRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyLoginRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Auth/resend-login-code": {
      "post": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Auth/session": {
      "get": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Auth/logout": {
      "post": {
        "tags": [
          "Auth"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Auth/forgot-password": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Auth/reset-password": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Auth/change-password": {
      "post": {
        "tags": [
          "Auth"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Dashboard/search-suggestions": {
      "get": {
        "tags": [
          "Dashboard"
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "context",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Dashboard/powerbi/export-pdf": {
      "post": {
        "tags": [
          "Dashboard"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PdfExportRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PdfExportRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PdfExportRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Dashboard/avisos": {
      "get": {
        "tags": [
          "Dashboard"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Dashboard/powerbi/config": {
      "get": {
        "tags": [
          "Dashboard"
        ],
        "parameters": [
          {
            "name": "report",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "inventory"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Dashboard/powerbi": {
      "get": {
        "tags": [
          "Dashboard"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/health": {
      "get": {
        "tags": [
          "DashboardAPI"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/admin/monitoring": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/monitoring/ingest/{agentId}": {
      "post": {
        "tags": [
          "MonitoringIngest"
        ],
        "parameters": [
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": { }
            },
            "text/json": {
              "schema": { }
            },
            "application/*+json": {
              "schema": { }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AnnouncementRequest": {
        "type": "object",
        "properties": {
          "titulo": {
            "type": "string",
            "nullable": true
          },
          "mensaje": {
            "type": "string",
            "nullable": true
          },
          "tipo": {
            "type": "string",
            "nullable": true
          },
          "expiraUtc": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ChangePasswordRequest": {
        "required": [
          "currentPassword",
          "newPassword"
        ],
        "type": "object",
        "properties": {
          "currentPassword": {
            "maxLength": 128,
            "minLength": 0,
            "type": "string"
          },
          "newPassword": {
            "maxLength": 128,
            "minLength": 8,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "CreateUsuarioRequest": {
        "required": [
          "correo",
          "numeroEmpleado"
        ],
        "type": "object",
        "properties": {
          "numeroEmpleado": {
            "minLength": 1,
            "pattern": "^[0-9]{1,32}$",
            "type": "string"
          },
          "nombre": {
            "type": "string",
            "nullable": true
          },
          "apellido": {
            "type": "string",
            "nullable": true
          },
          "correo": {
            "minLength": 1,
            "type": "string",
            "format": "email"
          },
          "username": {
            "type": "string",
            "nullable": true
          },
          "puesto": {
            "type": "string",
            "nullable": true
          },
          "almacen": {
            "type": "string",
            "nullable": true
          },
          "rol": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ForgotPasswordRequest": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "maxLength": 254,
            "minLength": 0,
            "type": "string",
            "format": "email"
          }
        },
        "additionalProperties": false
      },
      "LoginRequest": {
        "required": [
          "email",
          "password"
        ],
        "type": "object",
        "properties": {
          "email": {
            "maxLength": 254,
            "minLength": 0,
            "type": "string",
            "format": "email"
          },
          "password": {
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "PdfExportRequest": {
        "type": "object",
        "properties": {
          "report": {
            "type": "string",
            "nullable": true
          },
          "pageName": {
            "type": "string",
            "nullable": true
          },
          "bookmarkState": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ResetPasswordRequest": {
        "required": [
          "newPassword",
          "token"
        ],
        "type": "object",
        "properties": {
          "token": {
            "minLength": 1,
            "pattern": "^[A-Fa-f0-9]{64}$",
            "type": "string"
          },
          "newPassword": {
            "maxLength": 128,
            "minLength": 8,
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "UpdateUsuarioRequest": {
        "type": "object",
        "properties": {
          "numeroEmpleado": {
            "minLength": 1,
            "pattern": "^[0-9]{1,32}$",
            "type": "string",
            "nullable": true
          },
          "nombre": {
            "type": "string",
            "nullable": true
          },
          "apellido": {
            "type": "string",
            "nullable": true
          },
          "correo": {
            "type": "string",
            "nullable": true
          },
          "username": {
            "type": "string",
            "nullable": true
          },
          "puesto": {
            "type": "string",
            "nullable": true
          },
          "almacen": {
            "type": "string",
            "nullable": true
          },
          "rol": {
            "type": "string",
            "nullable": true
          },
          "activo": {
            "type": "boolean",
            "nullable": true
          },
          "contraseña": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "VerifyLoginRequest": {
        "required": [
          "code"
        ],
        "type": "object",
        "properties": {
          "code": {
            "minLength": 1,
            "pattern": "^[0-9]{6}$",
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "tags": [
    {
      "name": "Admin"
    },
    {
      "name": "Applications"
    },
    {
      "name": "Auth"
    },
    {
      "name": "Dashboard"
    },
    {
      "name": "DashboardAPI"
    },
    {
      "name": "Monitoring"
    },
    {
      "name": "MonitoringIngest"
    }
  ]
}