{
  "openapi": "3.0.0",
  "info": {
    "title": "exati-integration-middleware",
    "version": "1.0.0",
    "description": "Exati Middleware Issue Integration",
    "contact": {}
  },
  "paths": {
    "/signup": {
      "post": {
        "x-controller-name": "UserController",
        "x-operation-name": "signUp",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "User",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewUser"
              }
            }
          }
        },
        "operationId": "UserController.signUp"
      }
    },
    "/tickets/count": {
      "get": {
        "x-controller-name": "TicketControllerController",
        "x-operation-name": "count",
        "tags": [
          "TicketControllerController"
        ],
        "responses": {
          "200": {
            "description": "Ticket model count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "Ticket.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<Ticket>"
                }
              }
            }
          }
        ],
        "operationId": "TicketControllerController.count"
      }
    },
    "/tickets/{id}": {
      "put": {
        "x-controller-name": "TicketControllerController",
        "x-operation-name": "replaceById",
        "tags": [
          "TicketControllerController"
        ],
        "responses": {
          "204": {
            "description": "Ticket PUT success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Ticket"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "TicketControllerController.replaceById"
      },
      "patch": {
        "x-controller-name": "TicketControllerController",
        "x-operation-name": "updateById",
        "tags": [
          "TicketControllerController"
        ],
        "responses": {
          "204": {
            "description": "Ticket PATCH success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketPartial"
              }
            }
          },
          "x-parameter-index": 1
        },
        "operationId": "TicketControllerController.updateById"
      },
      "get": {
        "x-controller-name": "TicketControllerController",
        "x-operation-name": "findById",
        "tags": [
          "TicketControllerController"
        ],
        "responses": {
          "200": {
            "description": "Ticket model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TicketWithRelations"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ticket.Filter"
                }
              }
            }
          }
        ],
        "operationId": "TicketControllerController.findById"
      },
      "delete": {
        "x-controller-name": "TicketControllerController",
        "x-operation-name": "deleteById",
        "tags": [
          "TicketControllerController"
        ],
        "responses": {
          "204": {
            "description": "Ticket DELETE success"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "TicketControllerController.deleteById"
      }
    },
    "/tickets": {
      "post": {
        "x-controller-name": "TicketControllerController",
        "x-operation-name": "create",
        "tags": [
          "TicketControllerController"
        ],
        "responses": {
          "200": {
            "description": "Ticket model instance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ticket"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewTicket"
              }
            }
          }
        },
        "operationId": "TicketControllerController.create"
      },
      "patch": {
        "x-controller-name": "TicketControllerController",
        "x-operation-name": "updateAll",
        "tags": [
          "TicketControllerController"
        ],
        "responses": {
          "200": {
            "description": "Ticket PATCH success count",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loopback.Count"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "where",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "title": "Ticket.WhereFilter",
                  "additionalProperties": true,
                  "x-typescript-type": "@loopback/repository#Where<Ticket>"
                }
              }
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TicketPartial"
              }
            }
          }
        },
        "operationId": "TicketControllerController.updateAll"
      },
      "get": {
        "x-controller-name": "TicketControllerController",
        "x-operation-name": "find",
        "tags": [
          "TicketControllerController"
        ],
        "responses": {
          "200": {
            "description": "Array of Ticket model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TicketWithRelations"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "filter",
            "in": "query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Ticket.Filter1"
                }
              }
            }
          }
        ],
        "operationId": "TicketControllerController.find"
      }
    },
    "/update-ticket-status": {
      "post": {
        "x-controller-name": "TicketControllerController",
        "x-operation-name": "updateTicketStatus",
        "tags": [
          "TicketControllerController"
        ],
        "responses": {
          "204": {
            "description": "Ticket Status Success"
          }
        },
        "parameters": [
          {
            "name": "idSolicitacao",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "TicketControllerController.updateTicketStatus"
      }
    },
    "/users/login": {
      "post": {
        "x-controller-name": "UserController",
        "x-operation-name": "login",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "Token",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "description": "The input of login function",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "password"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 8
                  }
                }
              }
            }
          }
        },
        "operationId": "UserController.login"
      }
    },
    "/whoAmI": {
      "get": {
        "x-controller-name": "UserController",
        "x-operation-name": "whoAmI",
        "tags": [
          "UserController"
        ],
        "responses": {
          "200": {
            "description": "",
            "schema": {
              "type": "string"
            }
          }
        },
        "operationId": "UserController.whoAmI"
      }
    }
  },
  "servers": [
    {
      "url": "https://bhintegracao.exati.com.br"
    }
  ],
  "components": {
    "schemas": {
      "Ticket": {
        "title": "Ticket",
        "properties": {
          "idSolicitacao": {
            "type": "string"
          },
          "nomeCidadao": {
            "type": "string"
          },
          "cpf": {
            "type": "string"
          },
          "telefoneCidadao": {
            "type": "string"
          },
          "emailCidadao": {
            "type": "string"
          },
          "enderecoCidadao": {
            "type": "object"
          },
          "idServico": {
            "type": "number"
          },
          "enderecoSolicitacao": {
            "type": "object"
          },
          "infosAdicionaisEnderecoSolicitacao": {
            "type": "object"
          },
          "detalhamento": {
            "type": "string"
          },
          "dataAbertura": {
            "type": "string"
          },
          "plaquetaIdentificacao": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "idSolicitacao",
          "idServico",
          "enderecoSolicitacao",
          "dataAbertura"
        ],
        "additionalProperties": true
      },
      "NewTicket": {
        "title": "NewTicket",
        "description": "(tsType: Omit<Ticket, 'status'>, schemaOptions: { title: 'NewTicket', exclude: [ 'status' ] })",
        "properties": {
          "idSolicitacao": {
            "type": "string"
          },
          "nomeCidadao": {
            "type": "string"
          },
          "cpf": {
            "type": "string"
          },
          "telefoneCidadao": {
            "type": "string"
          },
          "emailCidadao": {
            "type": "string"
          },
          "enderecoCidadao": {
            "type": "object"
          },
          "idServico": {
            "type": "number"
          },
          "enderecoSolicitacao": {
            "type": "object"
          },
          "infosAdicionaisEnderecoSolicitacao": {
            "type": "object"
          },
          "detalhamento": {
            "type": "string"
          },
          "dataAbertura": {
            "type": "string"
          },
          "plaquetaIdentificacao": {
            "type": "string"
          }
        },
        "required": [
          "idSolicitacao",
          "idServico",
          "enderecoSolicitacao",
          "dataAbertura"
        ],
        "additionalProperties": true,
        "x-typescript-type": "Omit<Ticket, 'status'>"
      },
      "TicketWithRelations": {
        "title": "TicketWithRelations",
        "description": "(tsType: TicketWithRelations, schemaOptions: { includeRelations: true })",
        "properties": {
          "idSolicitacao": {
            "type": "string"
          },
          "nomeCidadao": {
            "type": "string"
          },
          "cpf": {
            "type": "string"
          },
          "telefoneCidadao": {
            "type": "string"
          },
          "emailCidadao": {
            "type": "string"
          },
          "enderecoCidadao": {
            "type": "object"
          },
          "idServico": {
            "type": "number"
          },
          "enderecoSolicitacao": {
            "type": "object"
          },
          "infosAdicionaisEnderecoSolicitacao": {
            "type": "object"
          },
          "detalhamento": {
            "type": "string"
          },
          "dataAbertura": {
            "type": "string"
          },
          "plaquetaIdentificacao": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "idSolicitacao",
          "idServico",
          "enderecoSolicitacao",
          "dataAbertura"
        ],
        "additionalProperties": true,
        "x-typescript-type": "TicketWithRelations"
      },
      "TicketPartial": {
        "title": "TicketPartial",
        "description": "(tsType: Partial<Ticket>, schemaOptions: { partial: true })",
        "properties": {
          "idSolicitacao": {
            "type": "string"
          },
          "nomeCidadao": {
            "type": "string"
          },
          "cpf": {
            "type": "string"
          },
          "telefoneCidadao": {
            "type": "string"
          },
          "emailCidadao": {
            "type": "string"
          },
          "enderecoCidadao": {
            "type": "object"
          },
          "idServico": {
            "type": "number"
          },
          "enderecoSolicitacao": {
            "type": "object"
          },
          "infosAdicionaisEnderecoSolicitacao": {
            "type": "object"
          },
          "detalhamento": {
            "type": "string"
          },
          "dataAbertura": {
            "type": "string"
          },
          "plaquetaIdentificacao": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "additionalProperties": true,
        "x-typescript-type": "Partial<Ticket>"
      },
      "User": {
        "title": "User",
        "properties": {
          "id": {
            "type": "string"
          },
          "realm": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "verificationToken": {
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "additionalProperties": true
      },
      "NewUser": {
        "title": "NewUser",
        "description": "(tsType: NewUserRequest, schemaOptions: { title: 'NewUser' })",
        "properties": {
          "id": {
            "type": "string"
          },
          "realm": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "verificationToken": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "additionalProperties": true,
        "x-typescript-type": "NewUserRequest"
      },
      "NewUserRequest": {
        "title": "NewUserRequest",
        "properties": {
          "id": {
            "type": "string"
          },
          "realm": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "verificationToken": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        },
        "required": [
          "email",
          "password"
        ],
        "additionalProperties": true
      },
      "loopback.Count": {
        "type": "object",
        "title": "loopback.Count",
        "x-typescript-type": "@loopback/repository#Count",
        "properties": {
          "count": {
            "type": "number"
          }
        }
      },
      "Ticket.Fields": {
        "title": "Ticket.Fields",
        "type": "object",
        "properties": {
          "idSolicitacao": {
            "type": "boolean"
          },
          "nomeCidadao": {
            "type": "boolean"
          },
          "cpf": {
            "type": "boolean"
          },
          "telefoneCidadao": {
            "type": "boolean"
          },
          "emailCidadao": {
            "type": "boolean"
          },
          "enderecoCidadao": {
            "type": "boolean"
          },
          "idServico": {
            "type": "boolean"
          },
          "enderecoSolicitacao": {
            "type": "boolean"
          },
          "infosAdicionaisEnderecoSolicitacao": {
            "type": "boolean"
          },
          "detalhamento": {
            "type": "boolean"
          },
          "dataAbertura": {
            "type": "boolean"
          },
          "plaquetaIdentificacao": {
            "type": "boolean"
          },
          "status": {
            "type": "boolean"
          }
        },
        "additionalProperties": true
      },
      "Ticket.Filter": {
        "type": "object",
        "title": "Ticket.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "fields": {
            "$ref": "#/components/schemas/Ticket.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<Ticket>"
      },
      "Ticket.Filter1": {
        "type": "object",
        "title": "Ticket.Filter",
        "properties": {
          "offset": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "example": 100
          },
          "skip": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "where": {
            "title": "Ticket.WhereFilter",
            "type": "object",
            "additionalProperties": true
          },
          "fields": {
            "$ref": "#/components/schemas/Ticket.Fields"
          }
        },
        "additionalProperties": false,
        "x-typescript-type": "@loopback/repository#Filter<Ticket>"
      }
    },
    "securitySchemes": {
      "jwt": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "jwt": []
    }
  ]
}