Add tsoa create endpoints for orgs users and projects

This commit is contained in:
2026-03-03 16:06:30 +00:00
parent 8e223bfbec
commit 2d2aacf2c0
12 changed files with 803 additions and 63 deletions

View File

@@ -54,6 +54,67 @@
"type": "object",
"additionalProperties": true
},
"UserEnvelope": {
"properties": {
"user": {
"$ref": "#/components/schemas/User"
}
},
"required": [
"user"
],
"type": "object",
"additionalProperties": true
},
"Record_string.unknown_": {
"properties": {},
"additionalProperties": {},
"type": "object",
"description": "Construct a type with a set of properties K of type T"
},
"ErrorResponse": {
"properties": {
"error": {
"type": "string"
},
"details": {
"$ref": "#/components/schemas/Record_string.unknown_"
}
},
"required": [
"error"
],
"type": "object",
"additionalProperties": true
},
"CreateUserRequest": {
"properties": {
"orgId": {
"type": "string"
},
"fullName": {
"type": "string"
},
"email": {
"type": "string"
},
"role": {
"type": "string"
},
"timezone": {
"type": "string"
}
},
"required": [
"orgId",
"fullName",
"email",
"role",
"timezone"
],
"type": "object",
"additionalProperties": true
},
"TaskListItem": {
"properties": {
"id": {
@@ -289,27 +350,6 @@
"type": "object",
"additionalProperties": true
},
"Record_string.unknown_": {
"properties": {},
"additionalProperties": {},
"type": "object",
"description": "Construct a type with a set of properties K of type T"
},
"ErrorResponse": {
"properties": {
"error": {
"type": "string"
},
"details": {
"$ref": "#/components/schemas/Record_string.unknown_"
}
},
"required": [
"error"
],
"type": "object",
"additionalProperties": true
},
"CreateTaskRequest": {
"properties": {
"orgId": {
@@ -445,6 +485,50 @@
"type": "object",
"additionalProperties": true
},
"ProjectEnvelope": {
"properties": {
"project": {
"$ref": "#/components/schemas/Project"
}
},
"required": [
"project"
],
"type": "object",
"additionalProperties": true
},
"CreateProjectRequest": {
"properties": {
"orgId": {
"type": "string"
},
"key": {
"type": "string"
},
"name": {
"type": "string"
},
"status": {
"type": "string"
},
"ownerUserId": {
"type": "string"
},
"dueDate": {
"type": "string",
"nullable": true
}
},
"required": [
"orgId",
"key",
"name",
"status",
"ownerUserId"
],
"type": "object",
"additionalProperties": true
},
"OrganizationSummaryListItem": {
"properties": {
"id": {
@@ -595,6 +679,30 @@
"type": "object",
"additionalProperties": true
},
"CreateOrganizationRequest": {
"properties": {
"slug": {
"type": "string"
},
"name": {
"type": "string"
},
"plan": {
"type": "string"
},
"industry": {
"type": "string"
}
},
"required": [
"slug",
"name",
"plan",
"industry"
],
"type": "object",
"additionalProperties": true
},
"HealthResponse": {
"properties": {
"status": {
@@ -648,6 +756,46 @@
}
}
]
},
"post": {
"operationId": "CreateUser",
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserEnvelope"
}
}
}
},
"400": {
"description": "Invalid payload",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"tags": [
"Users"
],
"security": [],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateUserRequest"
}
}
}
}
}
},
"/tasks": {
@@ -872,6 +1020,46 @@
}
}
]
},
"post": {
"operationId": "CreateProject",
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProjectEnvelope"
}
}
}
},
"400": {
"description": "Invalid payload",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"tags": [
"Projects"
],
"security": [],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateProjectRequest"
}
}
}
}
}
},
"/orgs": {
@@ -894,6 +1082,46 @@
],
"security": [],
"parameters": []
},
"post": {
"operationId": "CreateOrganization",
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OrganizationEnvelope"
}
}
}
},
"400": {
"description": "Invalid payload",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
},
"tags": [
"Organizations"
],
"security": [],
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateOrganizationRequest"
}
}
}
}
}
},
"/orgs/{orgId}": {