{"openapi":"3.0.0","paths":{"/teams/{teamId}/files/upload":{"post":{"description":"Upload a File","operationId":"uploadFile","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":""}},"summary":"","tags":["files"]}},"/teams/{teamId}/files/signedUrl":{"get":{"description":"Get Signed Url","operationId":"getSignedUrl","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"}}}]}}}}},"summary":"","tags":["files"]}},"/teams/{teamId}/files":{"post":{"description":"Create Files","operationId":"createFile","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"}}}]}}}}},"summary":"","tags":["files"]},"get":{"description":"Get all Files","operationId":"getFiles","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"}}}}]}}}}},"summary":"","tags":["files"]}},"/teams/{teamId}/files/{id}":{"get":{"description":"Get all Files","operationId":"getFile","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"}}}]}}}}},"summary":"","tags":["files"]},"delete":{"description":"Delete File","operationId":"deleteFile","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"}]}}}}},"summary":"","tags":["files"]}},"/users":{"get":{"description":"List all users","operationId":"getUsers","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"}}}}]}}}}},"summary":"","tags":["users"]},"post":{"description":"Create a new user","operationId":"createUser","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"}}}]}}}}},"summary":"","tags":["users"]}},"/users/{id}":{"get":{"description":"Get a user","operationId":"getUser","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"}}}]}}}}},"summary":"","tags":["users"]},"put":{"description":"Update a user","operationId":"updateUser","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"}}}]}}}}},"summary":"","tags":["users"]},"delete":{"description":"Delete a user","operationId":"deleteUser","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"","tags":["users"]}},"/auth/me":{"get":{"description":"Retrieves the profile information of the currently authenticated user. Requires a valid JWT access token.","operationId":"me","parameters":[],"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/UserDto"}}}]}}}},"401":{"description":"Unauthorized - Invalid or missing access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorDto"}}}}},"security":[{"bearer":[]}],"summary":"Get Current User","tags":["auth"]}},"/auth/login":{"post":{"description":"Authenticates a user and returns JWT access and refresh tokens.","operationId":"login","parameters":[],"requestBody":{"required":true,"description":"User login credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginUserDto"},"examples":{"validCredentials":{"value":{"email":"user@example.com","password":"securePassword123","deviceId":"device-123"}}}}}},"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AuthDto"}}}]}}}},"400":{"description":"Invalid credentials or validation error","schema":{"example":{"statusCode":400,"message":"Invalid email or password","error":"Bad Request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorDto"}}}},"401":{"description":"Unauthorized - Invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorDto"}}}}},"security":[{"bearer":[]}],"summary":"User Login","tags":["auth"]}},"/auth/register":{"post":{"description":"Creates a new user account. The user will receive a confirmation email to verify their email address.","operationId":"register","parameters":[],"requestBody":{"required":true,"description":"User registration information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterUserDto"},"examples":{"newUser":{"value":{"email":"newuser@example.com","password":"securePassword123","firstName":"John","lastName":"Doe"}}}}}},"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/UserDto"}}}]}}}},"409":{"description":"User already exists","schema":{"example":{"statusCode":409,"message":"User with this email already exists","error":"Conflict"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorDto"}}}}},"security":[{"bearer":[]}],"summary":"User Registration","tags":["auth"]}},"/auth/confirm":{"get":{"description":"Confirms a user's email address using the token sent in the confirmation email.","operationId":"confirmEmail","parameters":[{"name":"token","required":true,"in":"query","description":"Email confirmation token","schema":{"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","type":"string"}},{"name":"email","required":true,"in":"query","description":"Email address to confirm","schema":{"example":"user@example.com","type":"string"}}],"responses":{"200":{"description":"Email successfully confirmed","content":{"application/json":{"schema":{"example":{"message":"Email confirmed successfully"}}}}},"400":{"description":"Invalid or expired confirmation token","schema":{"example":{"statusCode":400,"message":"Invalid or expired confirmation token","error":"Bad Request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorDto"}}}}},"security":[{"bearer":[]}],"summary":"Confirm Email","tags":["auth"]}},"/auth/resendConfirm":{"post":{"description":"Resends the email confirmation link to the specified email address.","operationId":"resendConfirmation","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Email address to resend confirmation to","example":"user@example.com"}},"required":["email"]}}}},"responses":{"200":{"description":"Confirmation email sent successfully","content":{"application/json":{"schema":{"example":{"message":"Confirmation email sent successfully"}}}}},"400":{"description":"Invalid email or user not found","schema":{"example":{"statusCode":400,"message":"User not found or email already confirmed","error":"Bad Request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorDto"}}}}},"security":[{"bearer":[]}],"summary":"Resend Confirmation Email","tags":["auth"]}},"/auth/refreshToken":{"post":{"description":"Generates a new access token using a valid refresh token.","operationId":"refreshToken","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"refreshToken":{"type":"string","description":"Valid refresh token","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}},"required":["refreshToken"]}}}},"responses":{"200":{"description":"Successfully received model list","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/SingleModel"},{"properties":{"data":{"$ref":"#/components/schemas/AuthDto"}}}]}}}},"400":{"description":"Invalid or expired refresh token","schema":{"example":{"statusCode":400,"message":"Invalid or expired refresh token","error":"Bad Request"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorDto"}}}}},"security":[{"bearer":[]}],"summary":"Refresh Access Token","tags":["auth"]}},"/teams/{teamId}/apiKeys":{"get":{"description":"Get all apiKeys","operationId":"getApiKeys","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"}}}}]}}}}},"summary":"","tags":["apiKeys"]},"post":{"description":"Create an apiKey","operationId":"createApiKey","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"}}}]}}}}},"summary":"","tags":["apiKeys"]}},"/teams/{teamId}/apiKeys/{id}":{"get":{"description":"Get an apiKey","operationId":"getApiKey","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"}}}]}}}}},"summary":"","tags":["apiKeys"]},"put":{"description":"Edit an apiKey","operationId":"updateApiKey","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"}}}]}}}}},"summary":"","tags":["apiKeys"]},"delete":{"description":"Delete an apiKey","operationId":"deleteApiKey","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"}]}}}}},"summary":"","tags":["apiKeys"]}},"/teams":{"get":{"description":"List all teams by User","operationId":"getTeams","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"}}}}]}}}}},"summary":"","tags":["teams"]},"post":{"description":"Create an team","operationId":"createTeam","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"}}}]}}}}},"summary":"","tags":["teams"]}},"/teams/{id}":{"get":{"description":"Get a team","operationId":"getTeam","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"}}}]}}}}},"summary":"","tags":["teams"]},"put":{"description":"Update a team","operationId":"updateTeam","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"}}}]}}}}},"summary":"","tags":["teams"]},"delete":{"description":"Delete a team","operationId":"deleteTeam","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"","tags":["teams"]}},"/mail/bounces":{"post":{"operationId":"MailController_handleMailBounces","parameters":[],"responses":{"201":{"description":""}},"tags":["mail"]}},"/mail/complaints":{"post":{"operationId":"MailController_handleMailComplaints","parameters":[],"responses":{"201":{"description":""}},"tags":["mail"]}},"/mail/deliveries":{"post":{"operationId":"MailController_handleMailDeliveries","parameters":[],"responses":{"201":{"description":""}},"tags":["mail"]}},"/health":{"get":{"description":"Get Health status","operationId":"getHealth","parameters":[],"responses":{"200":{"description":""}},"summary":"","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"},"emailConfirmed":{"type":"boolean"},"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","emailConfirmed","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"]},"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"]},"AuthDto":{"type":"object","properties":{"id":{"type":"string"},"accessToken":{"type":"string"},"refreshToken":{"type":"string"}},"required":["id","accessToken","refreshToken"]},"LoginUserDto":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"deviceId":{"type":"string"}},"required":["email","password","deviceId"]},"RegisterUserDto":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"},"deviceId":{"type":"string"}},"required":["name","email","password","deviceId"]},"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"]}}}}