{"openapi":"3.0.0","paths":{"/teams/{teamId}/files/upload":{"post":{"operationId":"uploadFile","summary":"","description":"Upload a File","parameters":[{"name":"teamId","required":true,"in":"path","description":"The ID of the team","schema":{}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadFileDto"}}}},"responses":{"201":{"description":""}},"tags":["files"]}},"/teams/{teamId}/files/signedUrl":{"get":{"operationId":"getSignedUrl","summary":"","description":"Get Signed Url","parameters":[{"name":"path","required":true,"in":"query","schema":{"type":"string"}},{"name":"contentType","required":true,"in":"query","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"path","description":"The ID of the team","schema":{}}],"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/SignedUrlDto"}}}]}}}}},"tags":["files"]}},"/teams/{teamId}/files":{"post":{"operationId":"createFile","summary":"","description":"Create Files","parameters":[{"name":"teamId","required":true,"in":"path","description":"The ID of the team","schema":{}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFileDto"}}}},"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/FileDto"}}}]}}}}},"tags":["files"]},"get":{"operationId":"getFiles","summary":"","description":"Get all Files","parameters":[{"name":"type","required":false,"in":"query","schema":{"type":"string"}},{"name":"contentType","required":false,"in":"query","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"path","description":"The ID of the team","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FileDto"}}}}]}}}}},"tags":["files"]}},"/teams/{teamId}/files/{id}":{"get":{"operationId":"getFile","summary":"","description":"Get all Files","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"path","description":"The ID of the team","schema":{}}],"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/FileDto"}}}]}}}}},"tags":["files"]},"delete":{"operationId":"deleteFile","summary":"","description":"Delete File","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"path","description":"The ID of the team","schema":{}}],"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessModel"}]}}}}},"tags":["files"]}},"/users":{"get":{"operationId":"getUsers","summary":"","description":"List all users","parameters":[{"name":"email","required":false,"in":"query","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"ids","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"lastKey","required":false,"in":"query","schema":{"type":"string"}},{"name":"perPage","required":false,"in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginationModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UserDto"}}}}]}}}}},"tags":["users"]},"post":{"operationId":"createUser","summary":"","description":"Create a new user","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserDto"}}}},"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/UserDto"}}}]}}}}},"tags":["users"]}},"/users/{id}":{"get":{"operationId":"getUser","summary":"","description":"Get a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/UserDto"}}}]}}}}},"tags":["users"]},"put":{"operationId":"updateUser","summary":"","description":"Update a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserDto"}}}},"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/UserDto"}}}]}}}}},"tags":["users"]},"delete":{"operationId":"deleteUser","summary":"","description":"Delete a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["users"]}},"/auth/me":{"get":{"operationId":"me","summary":"","description":"Returns currently logged in user","parameters":[],"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/UserDto"}}}]}}}}},"tags":["auth"]}},"/auth/login":{"post":{"operationId":"login","summary":"","description":"Login with email and password","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginUserDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthDto"}}}}},"tags":["auth"]}},"/auth/register":{"post":{"operationId":"register","summary":"","description":"Register a new user","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterUserDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}},"409":{"description":"User already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorDto"}}}}},"tags":["auth"]}},"/auth/refresh":{"post":{"operationId":"refresh","summary":"","description":"Refresh access token","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthDto"}}}}},"tags":["auth"]}},"/auth/confirm":{"get":{"operationId":"AuthController_confirm","parameters":[{"name":"code","required":true,"in":"query","schema":{"type":"string"}},{"name":"username","required":true,"in":"query","schema":{"type":"string"}},{"name":"redirectUrl","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["auth"]}},"/auth/resendConfirm":{"post":{"operationId":"resendConfirm","summary":"","description":"Resend confirm email to username","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"201":{"description":""}},"tags":["auth"]}},"/teams/{teamId}/apiKeys":{"get":{"operationId":"getApiKeys","summary":"","description":"Get all apiKeys","parameters":[{"name":"name","required":false,"in":"query","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"path","description":"The ID of the team","schema":{}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ListModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyDto"}}}}]}}}}},"tags":["apiKeys"]},"post":{"operationId":"createApiKey","summary":"","description":"Create an apiKey","parameters":[{"name":"teamId","required":true,"in":"path","description":"The ID of the team","schema":{}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyDto"}}}},"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ApiKeyDto"}}}]}}}}},"tags":["apiKeys"]}},"/teams/{teamId}/apiKeys/{id}":{"get":{"operationId":"getApiKey","summary":"","description":"Get an apiKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"path","description":"The ID of the team","schema":{}}],"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ApiKeyDto"}}}]}}}}},"tags":["apiKeys"]},"put":{"operationId":"updateApiKey","summary":"","description":"Edit an apiKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"path","description":"The ID of the team","schema":{}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApiKeyDto"}}}},"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/ApiKeyDto"}}}]}}}}},"tags":["apiKeys"]},"delete":{"operationId":"deleteApiKey","summary":"","description":"Delete an apiKey","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"teamId","required":true,"in":"path","description":"The ID of the team","schema":{}}],"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SuccessModel"}]}}}}},"tags":["apiKeys"]}},"/teams":{"get":{"operationId":"getTeams","summary":"","description":"List all teams by User","parameters":[{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"ids","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"page","required":false,"in":"query","schema":{"type":"number"}},{"name":"perPage","required":false,"in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginationModel"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TeamDto"}}}}]}}}}},"tags":["teams"]},"post":{"operationId":"createTeam","summary":"","description":"Create an team","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamDto"}}}},"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/TeamDto"}}}]}}}}},"tags":["teams"]}},"/teams/{id}":{"get":{"operationId":"getTeam","summary":"","description":"Get a team","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/TeamDto"}}}]}}}}},"tags":["teams"]},"put":{"operationId":"updateTeam","summary":"","description":"Update a team","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeamDto"}}}},"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/TeamDto"}}}]}}}}},"tags":["teams"]},"delete":{"operationId":"deleteTeam","summary":"","description":"Delete a team","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["teams"]}},"/mails/bounces":{"post":{"operationId":"MailsController_handleMailBounces","parameters":[],"responses":{"201":{"description":""}},"tags":["mails"]}},"/mails/complaints":{"post":{"operationId":"MailsController_handleMailComplaints","parameters":[],"responses":{"201":{"description":""}},"tags":["mails"]}},"/mails/deliveries":{"post":{"operationId":"MailsController_handleMailDeliveries","parameters":[],"responses":{"201":{"description":""}},"tags":["mails"]}},"/health":{"get":{"operationId":"getHealth","summary":"","description":"Get Health status","parameters":[],"responses":{"200":{"description":""}},"tags":["health"]}}},"info":{"title":"Swagger API","description":"","version":"1.0","contact":{}},"tags":[{"name":"api","description":""}],"servers":[{"url":"/"}],"components":{"securitySchemes":{"defaultBearerAuth":{"scheme":"bearer","bearerFormat":"JWT","type":"http","in":"header"},"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key Authorization"}},"schemas":{"UploadFileDto":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]},"SingleModel":{"type":"object","properties":{"success":{"type":"boolean","example":true}},"required":["success"]},"SignedUrlDto":{"type":"object","properties":{"url":{"type":"string"},"path":{"type":"string"}},"required":["url","path"]},"FileDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"path":{"type":"string"},"url":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","teamId","name","contentType","path","url","createdAt","updatedAt"]},"CreateFileDto":{"type":"object","properties":{"contentType":{"type":"string"},"name":{"type":"string"},"path":{"type":"string"}},"required":["contentType","name","path"]},"ListModel":{"type":"object","properties":{}},"SuccessModel":{"type":"object","properties":{"success":{"type":"boolean","example":true}},"required":["success"]},"MetaListDto":{"type":"object","properties":{"total":{"type":"number","example":1},"lastPage":{"type":"number","example":1},"currentPage":{"type":"number","example":1},"perPage":{"type":"number","example":20},"prev":{"type":"number","example":null},"next":{"type":"number","example":null}},"required":["total","lastPage","currentPage","perPage","prev","next"]},"PaginationModel":{"type":"object","properties":{"meta":{"$ref":"#/components/schemas/MetaListDto"}},"required":["meta"]},"Role":{"type":"string","enum":["user","admin"]},"UserDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"emailError":{"type":"boolean"},"emailErrorDescription":{"type":"string"},"verified":{"type":"boolean"},"banned":{"type":"boolean"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","name","email","emailError","emailErrorDescription","verified","banned","roles","createdAt","updatedAt"]},"CreateUserDto":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string","enum":["user","admin"]}}},"required":["name","email","roles"]},"UpdateUserDto":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}},"required":["roles"]},"LoginUserDto":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"deviceId":{"type":"string"}},"required":["email","password","deviceId"]},"AuthDto":{"type":"object","properties":{"id":{"type":"string"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"}},"required":["id","accessToken","refreshToken"]},"RegisterUserDto":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"},"deviceId":{"type":"string"}},"required":["name","email","password","deviceId"]},"BaseErrorDto":{"type":"object","properties":{"statusCode":{"type":"number","example":409},"code":{"type":"string","example":"USER_ALREADY_EXISTS"},"message":{"type":"string","example":"A user with this email already exists."},"timestamp":{"type":"string","example":"2024-08-29T12:34:56.789Z"},"path":{"type":"string","example":"/users/register"}},"required":["statusCode","code","message","timestamp","path"]},"RefreshTokenDto":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]},"ApiKeyDto":{"type":"object","properties":{"id":{"type":"string"},"teamId":{"type":"string"},"name":{"type":"string"},"secret":{"type":"string"},"lastUsedAt":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","teamId","name","secret","lastUsedAt","createdAt","updatedAt"]},"CreateApiKeyDto":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"UpdateApiKeyDto":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"TeamDto":{"type":"object","properties":{"id":{"type":"string"},"codename":{"type":"string"},"name":{"type":"string"},"userId":{"type":"string"},"user":{"$ref":"#/components/schemas/UserDto"},"vectorId":{"type":"string"},"vectorTable":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","codename","name","userId","user","vectorId","vectorTable","createdAt","updatedAt"]},"CreateTeamDto":{"type":"object","properties":{"name":{"type":"string"},"codename":{"type":"string"}},"required":["name","codename"]},"UpdateTeamDto":{"type":"object","properties":{"name":{"type":"string"},"codename":{"type":"string"}},"required":["name","codename"]}}}}