wip: currently rewriting the project as a full stack application
tangled.org/kacaii.dev/sigo
gleam
/user#
POST /user/login#
Request#
{
"matricula": "000",
"senha": "wibble"
}
Response#
set-cookie: SESSION=SFM1MTI.eyJ1c2VyX2lkIjoiMDE5YjZiMjgtZDc0YS03ZjBiLTg3N;
{
"access_level": "developer"
}
PUT /user/password#
Request#
{
"senhaAtual": "wibble",
"novaSenha": "wobble",
"confirmarSenha": "wobble"
}
Response#
Senha atualizada com sucesso!
GET /user/profile#
Response#
{
"id": "b2c3d4e5-f6g7-8901-bcde-f23456789012",
"full_name": "Maria Oliveira Costa",
"registration": "000000",
"user_role": "Desenvolvedor",
"email": "maria.oliveira@empresa.com.br",
"phone": "+55 (81) 9 8888-8888"
}
PUT /user/profile#
Request#
{
"full_name": "Fulaninho Moreira",
"email": "email.novo@email.com",
"phone": "+55 (81) 9 8888-8888"
}
Response#
{
"full_name": "Fulaninho Moreira",
"email": "email.novo@email.com",
"phone": "+55 (81) 9 8888-8888"
}
GET /user/roles#
Response#
["desenvolvedor", "bombeiro", "capitão", "analista"]
GET /user/{{id}}/occurrences#
Response#
[
{
"id": "uuid-string",
"status": "em andamento" // | "Finalizada",
"prioridade": "alta" // | "Média" | "Baixa",
"chamado": {
"tipo": "acidente de trânsito" // | "Incêndio" | "Emergência Médica" | "Outro",
"detalhes": "something something",
"solicitante": {
"nome": "Drop Table da Silva"
}
},
"coordenadas": [-123, 124] // | null,
"timestamps": {
"abertura": 1700000000.0,
"chegadaNoLocal": 1700000050.0 // | null,
"finalizacao": 1700000100.0 // | null
},
"metadata": {
"nomeUsuario": "Drop Table da Silva",
"matriculaUsuario": "001",
"usuarioId": "uuid-string"
},
"equipes": [
{
"id": "brigade-uuid",
"nomeEquipe": "TEAM-ABC",
"lider": "Drop Table da Silva",
"codigoViatura": "VHC-789"
}
]
}
]