-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp-swagger.json
1 lines (1 loc) · 22 KB
/
app-swagger.json
1
{"openapi":"3.0.0","paths":{"/api/health":{"get":{"operationId":"TerminusHealthCheckController_check","parameters":[],"responses":{"200":{"description":"The Health Check is successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}},"503":{"description":"The Health Check is not successful","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"error"},"info":{"type":"object","example":{"database":{"status":"up"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"error":{"type":"object","example":{"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true},"nullable":true},"details":{"type":"object","example":{"database":{"status":"up"},"redis":{"status":"down","message":"Could not connect"}},"additionalProperties":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}},"additionalProperties":true}}}}}}}},"tags":["TerminusHealthCheck"]}},"/api/files/get-presigned-url":{"get":{"operationId":"FilesController_getPresignedUrl","parameters":[{"name":"ext","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignedUrls"}}}}},"tags":["Files"]}},"/api/files/delete-file":{"post":{"operationId":"FilesController_deleteFile","parameters":[{"name":"downloadUrl","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}}},"tags":["Files"]}},"/api/get-data":{"get":{"operationId":"AppController_getData","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppData"}}}}},"tags":["App"]}},"/api/demo":{"post":{"operationId":"AppController_demoCreateOne","parameters":[],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppDemo"}}}}},"tags":["App"]},"get":{"operationId":"AppController_demoFindMany","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppDemo"}}}}}},"tags":["App"]}},"/api/demo/{id}":{"get":{"operationId":"AppController_demoFindOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppDemo"}}}}},"tags":["App"]},"delete":{"operationId":"AppController_demoDeleteOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppDemo"}}}}},"tags":["App"]},"put":{"operationId":"AppController_demoUpdateOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppDemo"}}}}},"tags":["App"]}},"/api/time":{"get":{"operationId":"TimeController_time","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Date"}}}}},"tags":["Time"]}},"/api/authorizer/client-id":{"get":{"operationId":"AuthorizerController_getAuthorizerClientID","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizerClientID"}}}}},"tags":["Authorizer"]}},"/api/auth/profile":{"get":{"operationId":"AuthController_profile","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthProfileDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AuthError"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"tags":["Auth"]}},"/api/auth/update-profile":{"post":{"operationId":"AuthController_updateProfile","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthProfileDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/AuthError"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"tags":["Auth"]}},"/api/webhook/users":{"get":{"operationId":"WebhookUsersController_findMany","parameters":[{"name":"x-external-user-id","in":"header","schema":{"type":"string"}},{"name":"x-external-tenant-id","in":"header","schema":{"type":"string"}},{"name":"curPage","required":false,"in":"query","schema":{"type":"number"}},{"name":"perPage","required":false,"in":"query","schema":{"type":"number"}},{"name":"searchText","required":false,"in":"query","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindManyWebhookUserResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookError"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"tags":["Webhook"]}},"/api/webhook/users/{id}":{"put":{"operationId":"WebhookUsersController_updateOne","parameters":[{"name":"x-external-user-id","in":"header","schema":{"type":"string"}},{"name":"x-external-tenant-id","in":"header","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookUserDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUser"}}}},"400":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookError"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"tags":["Webhook"]},"delete":{"operationId":"WebhookUsersController_deleteOne","parameters":[{"name":"x-external-user-id","in":"header","schema":{"type":"string"}},{"name":"x-external-tenant-id","in":"header","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookError"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"tags":["Webhook"]},"get":{"operationId":"WebhookUsersController_findOne","parameters":[{"name":"x-external-user-id","in":"header","schema":{"type":"string"}},{"name":"x-external-tenant-id","in":"header","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUser"}}}},"400":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookError"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"tags":["Webhook"]}},"/api/webhook/profile":{"get":{"operationId":"WebhookController_profile","parameters":[{"name":"x-external-user-id","in":"header","schema":{"type":"string"}},{"name":"x-external-tenant-id","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUser"}}}},"400":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookError"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"tags":["Webhook"]}},"/api/webhook/events":{"get":{"operationId":"WebhookController_events","parameters":[{"name":"x-external-user-id","in":"header","schema":{"type":"string"}},{"name":"x-external-tenant-id","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEvent"}}}}},"400":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookError"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"tags":["Webhook"]}},"/api/webhook":{"get":{"operationId":"WebhookController_findMany","parameters":[{"name":"x-external-user-id","in":"header","schema":{"type":"string"}},{"name":"x-external-tenant-id","in":"header","schema":{"type":"string"}},{"name":"curPage","required":false,"in":"query","schema":{"type":"number"}},{"name":"perPage","required":false,"in":"query","schema":{"type":"number"}},{"name":"searchText","required":false,"in":"query","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindManyWebhookResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookError"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"tags":["Webhook"]},"post":{"operationId":"WebhookController_createOne","parameters":[{"name":"x-external-user-id","in":"header","schema":{"type":"string"}},{"name":"x-external-tenant-id","in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookError"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"tags":["Webhook"]}},"/api/webhook/{id}":{"put":{"operationId":"WebhookController_updateOne","parameters":[{"name":"x-external-user-id","in":"header","schema":{"type":"string"}},{"name":"x-external-tenant-id","in":"header","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookError"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"tags":["Webhook"]},"delete":{"operationId":"WebhookController_deleteOne","parameters":[{"name":"x-external-user-id","in":"header","schema":{"type":"string"}},{"name":"x-external-tenant-id","in":"header","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookError"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"tags":["Webhook"]},"get":{"operationId":"WebhookController_findOne","parameters":[{"name":"x-external-user-id","in":"header","schema":{"type":"string"}},{"name":"x-external-tenant-id","in":"header","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookError"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"tags":["Webhook"]}},"/api/webhook/{id}/logs":{"get":{"operationId":"WebhookController_findManyLogs","parameters":[{"name":"x-external-user-id","in":"header","schema":{"type":"string"}},{"name":"x-external-tenant-id","in":"header","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"curPage","required":false,"in":"query","schema":{"type":"number"}},{"name":"perPage","required":false,"in":"query","schema":{"type":"number"}},{"name":"searchText","required":false,"in":"query","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindManyWebhookLogResponse"}}}},"400":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/WebhookError"},{"$ref":"#/components/schemas/ValidationError"}]}}}}},"tags":["Webhook"]}}},"info":{"title":"","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"FilesErrorEnum":{"type":"string","enum":["FILES-000","FILES-001"]},"FilesError":{"type":"object","properties":{"message":{"type":"string","description":"Files error (FILES-000), Forbidden (FILES-001)","example":"Files error"},"code":{"example":"FILES-000","allOf":[{"$ref":"#/components/schemas/FilesErrorEnum"}]},"metadata":{"type":"object"}},"required":["message","code"]},"PresignedUrls":{"type":"object","properties":{"downloadUrl":{"type":"string"},"uploadUrl":{"type":"string"}},"required":["downloadUrl","uploadUrl"]},"StatusResponse":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"AppData":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"AppDemo":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","createdAt","updatedAt"]},"Date":{"type":"object","properties":{}},"AuthErrorEnum":{"type":"string","enum":["AUTH-000","AUTH-001","AUTH-002"]},"AuthError":{"type":"object","properties":{"message":{"type":"string","description":"Auth error (AUTH-000), Forbidden (AUTH-001), User not found (AUTH-002)","example":"Auth error"},"code":{"example":"AUTH-000","allOf":[{"$ref":"#/components/schemas/AuthErrorEnum"}]},"metadata":{"type":"object"}},"required":["message","code"]},"AuthorizerClientID":{"type":"object","properties":{"clientID":{"type":"string"}},"required":["clientID"]},"AuthUserScalarFieldEnum":{"type":"string","enum":["id","externalUserId","userRole","timezone","createdAt","updatedAt","lang"]},"AuthEntities":{"type":"object","properties":{"authUser":{"allOf":[{"$ref":"#/components/schemas/AuthUserScalarFieldEnum"}]}},"required":["authUser"]},"ValidationErrorEnum":{"type":"string","enum":["VALIDATION-000"]},"ValidationErrorMetadataConstraint":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name","description"]},"ValidationErrorMetadata":{"type":"object","properties":{"property":{"type":"string"},"constraints":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorMetadataConstraint"}},"children":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorMetadata"}}},"required":["property","constraints"]},"ValidationError":{"type":"object","properties":{"message":{"type":"string","description":"Validation error (VALIDATION-000)","example":"Validation error"},"code":{"example":"VALIDATION-000","allOf":[{"$ref":"#/components/schemas/ValidationErrorEnum"}]},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorMetadata"}}},"required":["message","code"]},"AuthProfileDto":{"type":"object","properties":{"timezone":{"type":"number","format":"float","nullable":true},"lang":{"type":"string","nullable":true}}},"WebhookErrorEnum":{"type":"string","enum":["WEBHOOK-000","WEBHOOK-001","WEBHOOK-002","WEBHOOK-003","WEBHOOK-004","WEBHOOK-005"]},"WebhookError":{"type":"object","properties":{"message":{"type":"string","description":"Webhook error (WEBHOOK-000), Tenant ID not set (WEBHOOK-003), User ID not set (WEBHOOK-002), Forbidden (WEBHOOK-001), User not found (WEBHOOK-004), Event not found (WEBHOOK-005)","example":"Webhook error"},"code":{"example":"WEBHOOK-000","allOf":[{"$ref":"#/components/schemas/WebhookErrorEnum"}]},"metadata":{"type":"object"}},"required":["message","code"]},"WebhookRole":{"type":"string","enum":["Admin","User"]},"WebhookStatus":{"type":"string","enum":["Pending","Process","Success","Error","Timeout"]},"WebhookLog":{"type":"object","properties":{"id":{"type":"string"},"request":{"type":"object"},"responseStatus":{"type":"string"},"response":{"type":"object","nullable":true},"webhookStatus":{"allOf":[{"$ref":"#/components/schemas/WebhookStatus"}]},"webhookId":{"type":"string"},"externalTenantId":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"Webhook":{"$ref":"#/components/schemas/Webhook"}},"required":["id","request","responseStatus","response","webhookStatus","webhookId","externalTenantId","createdAt","updatedAt"]},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"eventName":{"type":"string"},"endpoint":{"type":"string"},"enabled":{"type":"boolean"},"headers":{"type":"object","nullable":true},"requestTimeout":{"type":"integer","format":"int32","nullable":true},"externalTenantId":{"type":"string"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"workUntilDate":{"type":"string","format":"date-time","nullable":true},"WebhookUser_Webhook_createdByToWebhookUser":{"$ref":"#/components/schemas/WebhookUser"},"WebhookUser_Webhook_updatedByToWebhookUser":{"$ref":"#/components/schemas/WebhookUser"},"WebhookLog":{"type":"array","items":{"$ref":"#/components/schemas/WebhookLog"}}},"required":["id","eventName","endpoint","enabled","headers","requestTimeout","externalTenantId","createdBy","updatedBy","createdAt","updatedAt","workUntilDate"]},"WebhookUser":{"type":"object","properties":{"id":{"type":"string"},"externalTenantId":{"type":"string"},"externalUserId":{"type":"string"},"userRole":{"allOf":[{"$ref":"#/components/schemas/WebhookRole"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"Webhook_Webhook_createdByToWebhookUser":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"Webhook_Webhook_updatedByToWebhookUser":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}},"required":["id","externalTenantId","externalUserId","userRole","createdAt","updatedAt"]},"FindManyResponseMeta":{"type":"object","properties":{"curPage":{"type":"number"},"perPage":{"type":"number"},"totalResults":{"type":"number"}},"required":["totalResults"]},"FindManyWebhookUserResponse":{"type":"object","properties":{"webhookUsers":{"type":"array","items":{"$ref":"#/components/schemas/WebhookUser"}},"meta":{"$ref":"#/components/schemas/FindManyResponseMeta"}},"required":["webhookUsers","meta"]},"UpdateWebhookUserDto":{"type":"object","properties":{"externalTenantId":{"type":"string"},"externalUserId":{"type":"string"},"userRole":{"allOf":[{"$ref":"#/components/schemas/WebhookRole"}]}}},"WebhookScalarFieldEnum":{"type":"string","enum":["id","eventName","endpoint","enabled","headers","requestTimeout","externalTenantId","createdBy","updatedBy","createdAt","updatedAt","workUntilDate"]},"WebhookLogScalarFieldEnum":{"type":"string","enum":["id","request","responseStatus","response","webhookStatus","webhookId","externalTenantId","createdAt","updatedAt"]},"WebhookUserScalarFieldEnum":{"type":"string","enum":["id","externalTenantId","externalUserId","userRole","createdAt","updatedAt"]},"WebhookEntities":{"type":"object","properties":{"webhook":{"allOf":[{"$ref":"#/components/schemas/WebhookScalarFieldEnum"}]},"webhookLog":{"allOf":[{"$ref":"#/components/schemas/WebhookLogScalarFieldEnum"}]},"webhookUser":{"allOf":[{"$ref":"#/components/schemas/WebhookUserScalarFieldEnum"}]}},"required":["webhook","webhookLog","webhookUser"]},"WebhookEvent":{"type":"object","properties":{"eventName":{"type":"string"},"description":{"type":"string"},"example":{"type":"object"}},"required":["eventName","description","example"]},"FindManyWebhookResponse":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"meta":{"$ref":"#/components/schemas/FindManyResponseMeta"}},"required":["webhooks","meta"]},"CreateWebhookDto":{"type":"object","properties":{"eventName":{"type":"string"},"endpoint":{"type":"string"},"enabled":{"type":"boolean"},"headers":{"type":"object","nullable":true},"requestTimeout":{"type":"integer","format":"int32","nullable":true},"workUntilDate":{"type":"string","format":"date-time","nullable":true}},"required":["eventName","endpoint","enabled"]},"UpdateWebhookDto":{"type":"object","properties":{"eventName":{"type":"string"},"endpoint":{"type":"string"},"enabled":{"type":"boolean"},"headers":{"type":"object","nullable":true},"requestTimeout":{"type":"integer","format":"int32","nullable":true},"workUntilDate":{"type":"string","format":"date-time","nullable":true}}},"FindManyWebhookLogResponse":{"type":"object","properties":{"webhookLogs":{"type":"array","items":{"$ref":"#/components/schemas/WebhookLog"}},"meta":{"$ref":"#/components/schemas/FindManyResponseMeta"}},"required":["webhookLogs","meta"]}}}}