{
  "openapi": "3.0.4",
  "info": {
    "title": "LightHouse — Usuários (GPT pack, somente leitura)",
    "description": "API principal do Leankeep — gestão de manutenção predial (preventiva e corretiva). Documentação gerada a partir do Swagger real da aplicação.\n\n## Rate limiting\n\nLimite: **250 requisições/hora** por credencial (janela de 1 hora; valor pode variar por ambiente - confirme o vigente com o time). Ao exceder, a API responde **429 Too Many Requests**. A integração deve respeitar o código 429 (não reenviar imediatamente), aplicar **backoff exponencial** antes de tentar de novo e distribuir chamadas ao longo do tempo em vez de picos. Ver o guia [Rate limiting](/guides/rate-limiting).",
    "version": "2.0.0.5",
    "contact": {
      "name": "Leankeep Software"
    }
  },
  "servers": [
    {
      "url": "https://lighthouse.lkp.dev.br",
      "description": "Sandbox"
    },
    {
      "url": "https://lighthousev2.lkp.app.br",
      "description": "Produção"
    }
  ],
  "security": [
    {
      "Bearer": []
    }
  ],
  "paths": {
    "/v1/usuarios": {
      "get": {
        "tags": [
          "Usuarios (V1)"
        ],
        "parameters": [
          {
            "name": "SiteId",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "deprecated": true
            }
          },
          {
            "name": "Fornecedores",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              },
              "deprecated": true
            }
          },
          {
            "name": "Search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "UsuarioId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Filtro genérico por usuário; prefira ExecutorId ou EmitenteId quando a intenção for clara."
          },
          {
            "name": "EmpresaId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "TipoUsuario",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ETipoUsuario"
            }
          },
          {
            "name": "UnidadeId",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "GrupoUnidadeId",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "SubGrupoUnidadeId",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "EstadoId",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "CidadeId",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "FornecedorId",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Usuarios"
                  }
                },
                "example": [
                  {
                    "usuario": 1,
                    "nome": "Fulano de Tal",
                    "email": "usuario@empresa.com.br",
                    "inativo": false,
                    "superUsuario": false,
                    "login": "⚠️ A confirmar",
                    "usuarioDesignado": false,
                    "filtrosDefault": false,
                    "filtrosAlteracaoDefault": false,
                    "filtrosTodosTiposAnomalias": false,
                    "tipo": 1,
                    "cargo": 1,
                    "setor": 1,
                    "assinaturaPath": "/uploads/exemplo.png",
                    "celular": "11999998888",
                    "dataCadastro": "2026-06-29T10:00:00Z",
                    "acessoTodasAreas": false,
                    "tipoNome": "⚠️ A confirmar",
                    "image": "⚠️ A confirmar",
                    "emailValido": false
                  }
                ]
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Usuarios"
                  }
                },
                "example": [
                  {
                    "usuario": 1,
                    "nome": "Fulano de Tal",
                    "email": "usuario@empresa.com.br",
                    "inativo": false,
                    "superUsuario": false,
                    "login": "⚠️ A confirmar",
                    "usuarioDesignado": false,
                    "filtrosDefault": false,
                    "filtrosAlteracaoDefault": false,
                    "filtrosTodosTiposAnomalias": false,
                    "tipo": 1,
                    "cargo": 1,
                    "setor": 1,
                    "assinaturaPath": "/uploads/exemplo.png",
                    "celular": "11999998888",
                    "dataCadastro": "2026-06-29T10:00:00Z",
                    "acessoTodasAreas": false,
                    "tipoNome": "⚠️ A confirmar",
                    "image": "⚠️ A confirmar",
                    "emailValido": false
                  }
                ]
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Usuarios"
                  }
                },
                "example": [
                  {
                    "usuario": 1,
                    "nome": "Fulano de Tal",
                    "email": "usuario@empresa.com.br",
                    "inativo": false,
                    "superUsuario": false,
                    "login": "⚠️ A confirmar",
                    "usuarioDesignado": false,
                    "filtrosDefault": false,
                    "filtrosAlteracaoDefault": false,
                    "filtrosTodosTiposAnomalias": false,
                    "tipo": 1,
                    "cargo": 1,
                    "setor": 1,
                    "assinaturaPath": "/uploads/exemplo.png",
                    "celular": "11999998888",
                    "dataCadastro": "2026-06-29T10:00:00Z",
                    "acessoTodasAreas": false,
                    "tipoNome": "⚠️ A confirmar",
                    "image": "⚠️ A confirmar",
                    "emailValido": false
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Bad Request - payload inválido (ver a mensagem retornada para o campo/motivo específico).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "detail": "Um ou mais campos do payload são inválidos.",
                  "instance": null
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "detail": "Um ou mais campos do payload são inválidos.",
                  "instance": null
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "detail": "Um ou mais campos do payload são inválidos.",
                  "instance": null
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "detail": "Um ou mais campos do payload são inválidos.",
                  "instance": null
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - autenticado, mas sem permissão para o recurso/empresa.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.3",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "Usuário autenticado, mas sem permissão para este recurso/empresa.",
                  "instance": null
                }
              }
            }
          },
          "404": {
            "description": "Not Found - recurso inexistente para o identificador informado.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.4",
                  "title": "Not Found",
                  "status": 404,
                  "detail": "Recurso inexistente para o identificador informado.",
                  "instance": null
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - limite de 250 req/h excedido. Aguarde e aplique backoff exponencial (ver guia Rate limiting).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc6585#section-4",
                  "title": "Too Many Requests",
                  "status": 429,
                  "detail": "Limite de 250 requisições/hora excedido. Aguarde e aplique backoff exponencial antes de tentar novamente.",
                  "instance": null
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorCommandResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorCommandResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorCommandResult"
                }
              }
            }
          }
        },
        "operationId": "buscarUsuariosV1",
        "summary": "Buscar usuários",
        "description": "Busca usuários pelo nome via parâmetro Search. Use o campo 'usuario' da resposta como ID nos filtros UsuarioId/ExecutorId/EmitenteId.",
        "x-openai-isConsequential": false
      }
    },
    "/v1/usuarios/{id}": {
      "get": {
        "tags": [
          "Usuarios (V1)"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "EmpresaId",
            "in": "header",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "UnidadeId",
            "in": "header",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Usuarios"
                },
                "example": {
                  "usuario": 1,
                  "nome": "Fulano de Tal",
                  "email": "usuario@empresa.com.br",
                  "inativo": false,
                  "superUsuario": false,
                  "login": "⚠️ A confirmar",
                  "usuarioDesignado": false,
                  "filtrosDefault": false,
                  "filtrosAlteracaoDefault": false,
                  "filtrosTodosTiposAnomalias": false,
                  "tipo": 1,
                  "cargo": 1,
                  "setor": 1,
                  "assinaturaPath": "/uploads/exemplo.png",
                  "celular": "11999998888",
                  "dataCadastro": "2026-06-29T10:00:00Z",
                  "acessoTodasAreas": false,
                  "tipoNome": "⚠️ A confirmar",
                  "image": "⚠️ A confirmar",
                  "emailValido": false
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usuarios"
                },
                "example": {
                  "usuario": 1,
                  "nome": "Fulano de Tal",
                  "email": "usuario@empresa.com.br",
                  "inativo": false,
                  "superUsuario": false,
                  "login": "⚠️ A confirmar",
                  "usuarioDesignado": false,
                  "filtrosDefault": false,
                  "filtrosAlteracaoDefault": false,
                  "filtrosTodosTiposAnomalias": false,
                  "tipo": 1,
                  "cargo": 1,
                  "setor": 1,
                  "assinaturaPath": "/uploads/exemplo.png",
                  "celular": "11999998888",
                  "dataCadastro": "2026-06-29T10:00:00Z",
                  "acessoTodasAreas": false,
                  "tipoNome": "⚠️ A confirmar",
                  "image": "⚠️ A confirmar",
                  "emailValido": false
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usuarios"
                },
                "example": {
                  "usuario": 1,
                  "nome": "Fulano de Tal",
                  "email": "usuario@empresa.com.br",
                  "inativo": false,
                  "superUsuario": false,
                  "login": "⚠️ A confirmar",
                  "usuarioDesignado": false,
                  "filtrosDefault": false,
                  "filtrosAlteracaoDefault": false,
                  "filtrosTodosTiposAnomalias": false,
                  "tipo": 1,
                  "cargo": 1,
                  "setor": 1,
                  "assinaturaPath": "/uploads/exemplo.png",
                  "celular": "11999998888",
                  "dataCadastro": "2026-06-29T10:00:00Z",
                  "acessoTodasAreas": false,
                  "tipoNome": "⚠️ A confirmar",
                  "image": "⚠️ A confirmar",
                  "emailValido": false
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - payload inválido (ver a mensagem retornada para o campo/motivo específico).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "detail": "Um ou mais campos do payload são inválidos.",
                  "instance": null
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "detail": "Um ou mais campos do payload são inválidos.",
                  "instance": null
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "detail": "Um ou mais campos do payload são inválidos.",
                  "instance": null
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "detail": "Um ou mais campos do payload são inválidos.",
                  "instance": null
                }
              }
            }
          },
          "403": {
            "description": "Forbidden - autenticado, mas sem permissão para o recurso/empresa.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.3",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "Usuário autenticado, mas sem permissão para este recurso/empresa.",
                  "instance": null
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "detail": "Um ou mais campos do payload são inválidos.",
                  "instance": null
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "detail": "Um ou mais campos do payload são inválidos.",
                  "instance": null
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
                  "title": "Bad Request",
                  "status": 400,
                  "detail": "Um ou mais campos do payload são inválidos.",
                  "instance": null
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - limite de 250 req/h excedido. Aguarde e aplique backoff exponencial (ver guia Rate limiting).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "example": {
                  "type": "https://tools.ietf.org/html/rfc6585#section-4",
                  "title": "Too Many Requests",
                  "status": 429,
                  "detail": "Limite de 250 requisições/hora excedido. Aguarde e aplique backoff exponencial antes de tentar novamente.",
                  "instance": null
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorCommandResult"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorCommandResult"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorCommandResult"
                }
              }
            }
          }
        },
        "operationId": "obterUsuarioPorIdV1",
        "summary": "Consultar usuário",
        "description": "Consulta um usuário pelo ID (dados cadastrais). Não retorna senha. Use depois de achar o ID por nome em GET /v1/usuarios.",
        "x-openai-isConsequential": false
      }
    },
    "/v1/usuarios/{id}/permissoes": {
      "get": {
        "tags": [
          "Usuarios (V1)"
        ],
        "operationId": "obterPermissoesUsuarioV1",
        "summary": "Consultar permissões do usuário",
        "description": "SOMENTE LEITURA. Lista as permissões do usuário por unidade (site nulo = nível empresa). Exige perfil administrativo: com usuário de menor privilégio retorna 403 — informe isso ao usuário, não tente contornar.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "ID do usuário.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "EmpresaId",
            "in": "header",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "UnidadeId",
            "in": "header",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Permissões atuais.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PermissaoUsuarioItem"
                  }
                },
                "example": [
                  {
                    "permissaoUsuario": 5001,
                    "empresa": 100,
                    "site": null,
                    "permissao": 321,
                    "permissaoNome": "Operacional — padrão",
                    "fornecedor": null,
                    "filtrosTodosTiposAnomalias": false
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Não autenticado — token ausente, inválido ou expirado."
          },
          "403": {
            "description": "Perfil sem permissão para consultar este usuário.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroNegocio"
                },
                "example": {
                  "message": "Consultar permissões de usuário requer Administrador vinculado à empresa ou a operação de gestão de usuários em todas as unidades do alvo."
                }
              }
            }
          },
          "404": {
            "description": "Usuário não encontrado na empresa do contexto.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroNegocio"
                },
                "example": {
                  "message": "Usuário não encontrado."
                }
              }
            }
          },
          "422": {
            "description": "Usuário-alvo não permite consulta de permissões por este endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErroNegocio"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorCommandResult"
                }
              }
            }
          }
        },
        "x-openai-isConsequential": false
      }
    },
    "/v1/permissoes": {
      "get": {
        "tags": [
          "Permissoes (V1)"
        ],
        "parameters": [
          {
            "name": "tipoUsuarioAlvo",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ETipoUsuario"
            },
            "description": "Tipo do usuário que vai RECEBER o perfil: 2 Administrador → perfis tipo 7; 4 Chamado → tipo 2; 3 Operacional → demais. Omitido = catálogo inteiro."
          },
          {
            "name": "incluirInativas",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "Inclui perfis inativos. Padrão: false."
          },
          {
            "name": "EmpresaId",
            "in": "header",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "UnidadeId",
            "in": "header",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Catálogo de perfis.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PermissaoCatalogoItem"
                  }
                },
                "example": [
                  {
                    "permissao": 321,
                    "nome": "Operacional — padrão",
                    "descricao": "Perfil de exemplo",
                    "nivel": "Unidade",
                    "tipo": 3,
                    "empresa": 100,
                    "inativo": false
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Não autenticado — token ausente, inválido ou expirado."
          },
          "403": {
            "description": "Perfil sem permissão para consultar o catálogo."
          },
          "500": {
            "description": "Erro interno.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorCommandResult"
                }
              }
            }
          }
        },
        "operationId": "get__v1_permissoes_v1",
        "summary": "Listar permissões (perfis)",
        "description": "SOMENTE LEITURA. Catálogo de perfis de permissão da empresa. Filtre por tipoUsuarioAlvo (2 Administrador, 3 Operacional, 4 Chamado). Exige perfil administrativo (403 caso contrário).",
        "x-openai-isConsequential": false
      }
    }
  },
  "components": {
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "JWT emitido pelo AuthCenter. Cole apenas o token (sem o prefixo Bearer)."
      }
    },
    "schemas": {
      "ETipoUsuario": {
        "enum": [
          1,
          2,
          3,
          4
        ],
        "type": "integer",
        "format": "int32",
        "description": "Tipo do usuário: 2 = Administrador, 3 = Operacional, 4 = Chamado. Determina as permissões geradas na criação."
      },
      "Usuarios": {
        "type": "object",
        "properties": {
          "usuario": {
            "type": "integer",
            "format": "int32"
          },
          "nome": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "inativo": {
            "type": "boolean"
          },
          "superUsuario": {
            "type": "boolean",
            "nullable": true
          },
          "login": {
            "type": "string",
            "nullable": true
          },
          "usuarioDesignado": {
            "type": "boolean",
            "nullable": true
          },
          "filtrosDefault": {
            "type": "boolean",
            "nullable": true
          },
          "filtrosAlteracaoDefault": {
            "type": "boolean",
            "nullable": true
          },
          "filtrosTodosTiposAnomalias": {
            "type": "boolean",
            "nullable": true
          },
          "tipo": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "cargo": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "setor": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "assinaturaPath": {
            "type": "string",
            "nullable": true
          },
          "celular": {
            "type": "string",
            "nullable": true
          },
          "dataCadastro": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "acessoTodasAreas": {
            "type": "boolean"
          },
          "tipoNome": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "image": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "emailValido": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": {}
      },
      "ErrorCommandResult": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "hash": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PermissaoUsuarioItem": {
        "type": "object",
        "properties": {
          "permissaoUsuario": {
            "type": "integer",
            "format": "int32",
            "description": "ID da linha de vínculo."
          },
          "empresa": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "site": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "description": "ID da unidade. `null` = permissão em nível de empresa (linha base, necessária para o login)."
          },
          "permissao": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "description": "ID do perfil de permissão (ver GET /v1/permissoes)."
          },
          "permissaoNome": {
            "type": "string",
            "nullable": true,
            "description": "Nome do perfil."
          },
          "fornecedor": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "filtrosTodosTiposAnomalias": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ErroNegocio": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Motivo da recusa, em português, pronto para exibir ao operador."
          }
        },
        "additionalProperties": false
      },
      "PermissaoCatalogoItem": {
        "type": "object",
        "properties": {
          "permissao": {
            "type": "integer",
            "format": "int32",
            "description": "ID do perfil (use em `permissaoInicial` e em `itens[].permissao`)."
          },
          "nome": {
            "type": "string",
            "nullable": true
          },
          "descricao": {
            "type": "string",
            "nullable": true
          },
          "nivel": {
            "type": "string",
            "nullable": true
          },
          "tipo": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "description": "Tipo do perfil: 7 = para Administrador, 2 = para Chamado, demais = Operacional."
          },
          "empresa": {
            "type": "integer",
            "format": "int32",
            "nullable": true,
            "description": "`null` = perfil global, compartilhado por todas as empresas."
          },
          "inativo": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    }
  }
}