basePath: / definitions: anos_formaturas.AnoFormaturaResponse: properties: ano_semestre: type: string id: type: string type: object anos_formaturas.CreateAnoFormaturaRequest: properties: ano_semestre: example: "2029.1" type: string required: - ano_semestre type: object auth.loginRequest: properties: email: example: admin@photum.com type: string senha: example: "123456" minLength: 6 type: string required: - email - senha type: object auth.loginResponse: properties: access_token: type: string expires_at: type: string profissional: {} user: $ref: '#/definitions/auth.userResponse' type: object auth.registerRequest: properties: email: type: string nome: type: string role: description: Role is now required type: string senha: minLength: 6 type: string telefone: type: string required: - email - nome - role - senha type: object auth.updateRoleRequest: properties: role: type: string required: - role type: object auth.userResponse: properties: ativo: type: boolean email: type: string id: type: string role: type: string type: object cadastro_fot.CadastroFotResponse: properties: ano_formatura_id: type: string ano_formatura_label: type: string cidade: type: string curso_id: type: string curso_nome: type: string empresa_id: type: string empresa_nome: type: string estado: type: string fot: type: integer gastos_captacao: type: number id: type: string instituicao: type: string observacoes: type: string pre_venda: type: boolean type: object cadastro_fot.CreateInput: properties: ano_formatura_id: type: string cidade: type: string curso_id: type: string empresa_id: type: string estado: type: string fot: type: integer gastos_captacao: type: number instituicao: type: string observacoes: type: string pre_venda: type: boolean type: object cursos.CreateCursoRequest: properties: nome: type: string required: - nome type: object cursos.CursoResponse: properties: id: type: string nome: type: string type: object empresas.CreateEmpresaRequest: properties: nome: type: string required: - nome type: object empresas.EmpresaResponse: properties: id: type: string nome: type: string type: object funcoes.CreateFuncaoRequest: properties: nome: type: string required: - nome type: object funcoes.FuncaoResponse: properties: id: type: string nome: type: string type: object profissionais.CreateProfissionalInput: properties: agencia: type: string banco: type: string carro_disponivel: type: boolean cidade: type: string conta_pix: type: string cpf_cnpj_titular: type: string desempenho_evento: type: integer disp_horario: type: integer educacao_simpatia: type: integer endereco: type: string equipamentos: type: string extra_por_equipamento: type: boolean funcao_profissional_id: type: string media: type: number nome: type: string observacao: type: string qtd_estudio: type: integer qual_tec: type: integer tabela_free: type: string tem_estudio: type: boolean tipo_cartao: type: string uf: type: string whatsapp: type: string type: object profissionais.ProfissionalResponse: properties: agencia: type: string banco: type: string carro_disponivel: type: boolean cidade: type: string conta_pix: type: string cpf_cnpj_titular: type: string desempenho_evento: type: integer disp_horario: type: integer educacao_simpatia: type: integer endereco: type: string equipamentos: type: string extra_por_equipamento: type: boolean funcao_profissional: description: Now returns name from join type: string funcao_profissional_id: type: string id: type: string media: type: number nome: type: string observacao: type: string qtd_estudio: type: integer qual_tec: type: integer tabela_free: type: string tem_estudio: type: boolean tipo_cartao: type: string uf: type: string usuario_id: type: string whatsapp: type: string type: object profissionais.UpdateProfissionalInput: properties: agencia: type: string banco: type: string carro_disponivel: type: boolean cidade: type: string conta_pix: type: string cpf_cnpj_titular: type: string desempenho_evento: type: integer disp_horario: type: integer educacao_simpatia: type: integer endereco: type: string equipamentos: type: string extra_por_equipamento: type: boolean funcao_profissional_id: type: string media: type: number nome: type: string observacao: type: string qtd_estudio: type: integer qual_tec: type: integer tabela_free: type: string tem_estudio: type: boolean tipo_cartao: type: string uf: type: string whatsapp: type: string type: object tipos_eventos.CreateEventoRequest: properties: nome: type: string required: - nome type: object tipos_eventos.EventoResponse: properties: id: type: string nome: type: string precos: items: $ref: '#/definitions/tipos_eventos.PrecoResponse' type: array type: object tipos_eventos.PrecoResponse: properties: funcao_nome: type: string funcao_profissional_id: type: string id: type: string tipo_evento_id: type: string valor: type: number type: object tipos_eventos.PriceInput: properties: funcao_profissional_id: type: string tipo_evento_id: type: string valor: type: number type: object tipos_servicos.CreateTipoServicoRequest: properties: nome: type: string required: - nome type: object tipos_servicos.TipoServicoResponse: properties: id: type: string nome: type: string type: object host: localhost:8080 info: contact: email: support@swagger.io name: API Support url: http://www.swagger.io/support description: Backend authentication service for Photum. license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html termsOfService: http://swagger.io/terms/ title: Photum Backend API version: "1.0" paths: /api/admin/users: get: consumes: - application/json description: List all users (Admin only) produces: - application/json responses: "200": description: OK schema: items: additionalProperties: true type: object type: array "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: List all users tags: - admin post: consumes: - application/json description: Create a new user with specific role (Admin only) parameters: - description: Create User Request in: body name: request required: true schema: $ref: '#/definitions/auth.registerRequest' produces: - application/json responses: "201": description: Created schema: additionalProperties: type: string type: object "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Create user (Admin) tags: - admin /api/admin/users/{id}: delete: consumes: - application/json description: Delete user (Admin only) parameters: - description: User ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: type: string type: object "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Delete user tags: - admin get: consumes: - application/json description: Get user details by ID (Admin only) parameters: - description: User ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Get user by ID tags: - admin /api/admin/users/{id}/approve: patch: consumes: - application/json description: Set user ativo=true parameters: - description: User ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: type: string type: object "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Approve user tags: - admin /api/admin/users/{id}/role: patch: consumes: - application/json description: Update user role (Admin only) parameters: - description: User ID in: path name: id required: true type: string - description: Update Role Request in: body name: request required: true schema: $ref: '#/definitions/auth.updateRoleRequest' produces: - application/json responses: "200": description: OK schema: additionalProperties: type: string type: object "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Update user role tags: - admin /api/admin/users/pending: get: consumes: - application/json description: List users with ativo=false produces: - application/json responses: "200": description: OK schema: items: additionalProperties: true type: object type: array "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: List pending users tags: - admin /api/anos-formaturas: get: consumes: - application/json produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/anos_formaturas.AnoFormaturaResponse' type: array security: - BearerAuth: [] summary: List all graduation years tags: - anos_formaturas post: consumes: - application/json parameters: - description: Ano Semestre in: body name: request required: true schema: $ref: '#/definitions/anos_formaturas.CreateAnoFormaturaRequest' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/anos_formaturas.AnoFormaturaResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "409": description: Conflict schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Create a new graduation year tags: - anos_formaturas /api/anos-formaturas/{id}: delete: consumes: - application/json parameters: - description: ID in: path name: id required: true type: string produces: - application/json responses: "204": description: No Content security: - BearerAuth: [] summary: Delete a graduation year tags: - anos_formaturas put: consumes: - application/json parameters: - description: ID in: path name: id required: true type: string - description: Ano Semestre in: body name: request required: true schema: $ref: '#/definitions/anos_formaturas.CreateAnoFormaturaRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/anos_formaturas.AnoFormaturaResponse' security: - BearerAuth: [] summary: Update a graduation year tags: - anos_formaturas /api/cadastro-fot: get: consumes: - application/json produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/cadastro_fot.CadastroFotResponse' type: array security: - BearerAuth: [] summary: List all FOT records tags: - cadastro_fot post: consumes: - application/json parameters: - description: FOT Data in: body name: request required: true schema: $ref: '#/definitions/cadastro_fot.CreateInput' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/cadastro_fot.CadastroFotResponse' security: - BearerAuth: [] summary: Create a new FOT record tags: - cadastro_fot /api/cadastro-fot/{id}: delete: consumes: - application/json parameters: - description: ID in: path name: id required: true type: string produces: - application/json responses: "204": description: No Content security: - BearerAuth: [] summary: Delete FOT record tags: - cadastro_fot get: consumes: - application/json parameters: - description: ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/cadastro_fot.CadastroFotResponse' security: - BearerAuth: [] summary: Get FOT record by ID tags: - cadastro_fot put: consumes: - application/json parameters: - description: ID in: path name: id required: true type: string - description: Data in: body name: request required: true schema: $ref: '#/definitions/cadastro_fot.CreateInput' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/cadastro_fot.CadastroFotResponse' security: - BearerAuth: [] summary: Update FOT record tags: - cadastro_fot /api/cursos: get: consumes: - application/json produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/cursos.CursoResponse' type: array security: - BearerAuth: [] summary: List all courses tags: - cursos post: consumes: - application/json parameters: - description: Curso Name in: body name: request required: true schema: $ref: '#/definitions/cursos.CreateCursoRequest' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/cursos.CursoResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "409": description: Conflict schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Create a new course tags: - cursos /api/cursos/{id}: delete: consumes: - application/json parameters: - description: Curso ID in: path name: id required: true type: string produces: - application/json responses: "204": description: No Content security: - BearerAuth: [] summary: Delete a course tags: - cursos put: consumes: - application/json parameters: - description: Curso ID in: path name: id required: true type: string - description: Curso Name in: body name: request required: true schema: $ref: '#/definitions/cursos.CreateCursoRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/cursos.CursoResponse' security: - BearerAuth: [] summary: Update a course tags: - cursos /api/empresas: get: consumes: - application/json produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/empresas.EmpresaResponse' type: array security: - BearerAuth: [] summary: List all companies tags: - empresas post: consumes: - application/json parameters: - description: Empresa Name in: body name: request required: true schema: $ref: '#/definitions/empresas.CreateEmpresaRequest' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/empresas.EmpresaResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "409": description: Conflict schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Create a new company tags: - empresas /api/empresas/{id}: delete: consumes: - application/json parameters: - description: Empresa ID in: path name: id required: true type: string produces: - application/json responses: "204": description: No Content security: - BearerAuth: [] summary: Delete a company tags: - empresas put: consumes: - application/json parameters: - description: Empresa ID in: path name: id required: true type: string - description: Empresa Name in: body name: request required: true schema: $ref: '#/definitions/empresas.CreateEmpresaRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/empresas.EmpresaResponse' security: - BearerAuth: [] summary: Update a company tags: - empresas /api/funcoes: get: consumes: - application/json description: List all professional functions produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/funcoes.FuncaoResponse' type: array "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: List functions tags: - funcoes post: consumes: - application/json description: Create a new professional function parameters: - description: Create Function Request in: body name: request required: true schema: $ref: '#/definitions/funcoes.CreateFuncaoRequest' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/funcoes.FuncaoResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "409": description: Conflict schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Create a new function tags: - funcoes /api/funcoes/{id}: delete: consumes: - application/json description: Delete a professional function by ID parameters: - description: Function ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: type: string type: object "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Delete function tags: - funcoes put: consumes: - application/json description: Update a professional function by ID parameters: - description: Function ID in: path name: id required: true type: string - description: Update Function Request in: body name: request required: true schema: $ref: '#/definitions/funcoes.CreateFuncaoRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/funcoes.FuncaoResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "409": description: Conflict schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Update function tags: - funcoes /api/profissionais: get: consumes: - application/json description: List all profissionais produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/profissionais.ProfissionalResponse' type: array "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: List profissionais tags: - profissionais post: consumes: - application/json description: Create a new profissional record parameters: - description: Create Profissional Request in: body name: request required: true schema: $ref: '#/definitions/profissionais.CreateProfissionalInput' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/profissionais.ProfissionalResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Create a new profissional tags: - profissionais /api/profissionais/{id}: delete: consumes: - application/json description: Delete a profissional by ID parameters: - description: Profissional ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: type: string type: object "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Delete profissional tags: - profissionais get: consumes: - application/json description: Get a profissional by ID parameters: - description: Profissional ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/profissionais.ProfissionalResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "404": description: Not Found schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Get profissional by ID tags: - profissionais put: consumes: - application/json description: Update a profissional by ID parameters: - description: Profissional ID in: path name: id required: true type: string - description: Update Profissional Request in: body name: request required: true schema: $ref: '#/definitions/profissionais.UpdateProfissionalInput' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/profissionais.ProfissionalResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Update profissional tags: - profissionais /api/tipos-eventos: get: consumes: - application/json produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/tipos_eventos.EventoResponse' type: array security: - BearerAuth: [] summary: List all event types tags: - tipos_eventos post: consumes: - application/json parameters: - description: Nome in: body name: request required: true schema: $ref: '#/definitions/tipos_eventos.CreateEventoRequest' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/tipos_eventos.EventoResponse' security: - BearerAuth: [] summary: Create a new event type tags: - tipos_eventos /api/tipos-eventos/{id}: delete: consumes: - application/json parameters: - description: Event ID in: path name: id required: true type: string produces: - application/json responses: "204": description: No Content security: - BearerAuth: [] summary: Delete an event type tags: - tipos_eventos put: consumes: - application/json parameters: - description: Event ID in: path name: id required: true type: string - description: Event Data in: body name: request required: true schema: $ref: '#/definitions/tipos_eventos.CreateEventoRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/tipos_eventos.EventoResponse' security: - BearerAuth: [] summary: Update an event type tags: - tipos_eventos /api/tipos-eventos/{id}/precos: get: consumes: - application/json parameters: - description: Event ID in: path name: id required: true type: string produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/tipos_eventos.PrecoResponse' type: array security: - BearerAuth: [] summary: List prices for an event tags: - tipos_eventos /api/tipos-eventos/precos: post: consumes: - application/json parameters: - description: Price Input in: body name: request required: true schema: $ref: '#/definitions/tipos_eventos.PriceInput' produces: - application/json responses: "200": description: OK schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Set price for an event function tags: - tipos_eventos /api/tipos-servicos: get: consumes: - application/json produces: - application/json responses: "200": description: OK schema: items: $ref: '#/definitions/tipos_servicos.TipoServicoResponse' type: array security: - BearerAuth: [] summary: List all service types tags: - tipos_servicos post: consumes: - application/json parameters: - description: Nome in: body name: request required: true schema: $ref: '#/definitions/tipos_servicos.CreateTipoServicoRequest' produces: - application/json responses: "201": description: Created schema: $ref: '#/definitions/tipos_servicos.TipoServicoResponse' "400": description: Bad Request schema: additionalProperties: type: string type: object "409": description: Conflict schema: additionalProperties: type: string type: object security: - BearerAuth: [] summary: Create a new service type tags: - tipos_servicos /api/tipos-servicos/{id}: delete: consumes: - application/json parameters: - description: ID in: path name: id required: true type: string produces: - application/json responses: "204": description: No Content security: - BearerAuth: [] summary: Delete a service type tags: - tipos_servicos put: consumes: - application/json parameters: - description: ID in: path name: id required: true type: string - description: Nome in: body name: request required: true schema: $ref: '#/definitions/tipos_servicos.CreateTipoServicoRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/tipos_servicos.TipoServicoResponse' security: - BearerAuth: [] summary: Update a service type tags: - tipos_servicos /auth/login: post: consumes: - application/json description: Login with email and password parameters: - description: Login Request in: body name: request required: true schema: $ref: '#/definitions/auth.loginRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/auth.loginResponse' "401": description: Unauthorized schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: Login tags: - auth /auth/logout: post: consumes: - application/json description: Revoke refresh token and clear cookie parameters: - description: Refresh Token in: body name: refresh_token schema: type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: type: string type: object summary: Logout user tags: - auth /auth/refresh: post: consumes: - application/json description: Get a new access token using a valid refresh token parameters: - description: Refresh Token in: body name: refresh_token schema: type: string produces: - application/json responses: "200": description: OK schema: additionalProperties: true type: object "401": description: Unauthorized schema: additionalProperties: type: string type: object summary: Refresh access token tags: - auth /auth/register: post: consumes: - application/json description: Register a new user with email, password, name, phone and role parameters: - description: Register Request in: body name: request required: true schema: $ref: '#/definitions/auth.registerRequest' produces: - application/json responses: "201": description: Created schema: additionalProperties: type: string type: object "400": description: Bad Request schema: additionalProperties: type: string type: object "500": description: Internal Server Error schema: additionalProperties: type: string type: object summary: Register a new user tags: - auth securityDefinitions: BearerAuth: in: header name: Authorization type: apiKey swagger: "2.0" tags: - description: Authentication related operations name: auth - description: Administration operations name: admin