kaneo (minimalist kanban) fork to experiment adding a tangled integration github.com/usekaneo/kaneo
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(api,web): fix task access and editor link handling

Andrej 710d1751 282597f6

+674 -9425
+113 -48
apps/api/src/index.ts
··· 5 5 import { Hono } from "hono"; 6 6 import { cors } from "hono/cors"; 7 7 import { HTTPException } from "hono/http-exception"; 8 - import { openAPIRouteHandler } from "hono-openapi"; 8 + import { 9 + describeRoute, 10 + openAPIRouteHandler, 11 + resolver, 12 + validator, 13 + } from "hono-openapi"; 14 + import * as v from "valibot"; 9 15 import activity from "./activity"; 10 16 import { auth } from "./auth"; 11 17 import column from "./column"; ··· 132 138 return c.json(result); 133 139 }); 134 140 135 - api.get("/asset/:id", async (c) => { 136 - const { id } = c.req.param(); 137 - const [asset] = await db 138 - .select({ 139 - id: schema.assetTable.id, 140 - objectKey: schema.assetTable.objectKey, 141 - mimeType: schema.assetTable.mimeType, 142 - filename: schema.assetTable.filename, 143 - workspaceId: schema.assetTable.workspaceId, 144 - isPublic: schema.projectTable.isPublic, 145 - }) 146 - .from(schema.assetTable) 147 - .innerJoin( 148 - schema.projectTable, 149 - eq(schema.assetTable.projectId, schema.projectTable.id), 150 - ) 151 - .where(eq(schema.assetTable.id, id)) 152 - .limit(1); 141 + api.get( 142 + "/auth/get-session", 143 + describeRoute({ 144 + operationId: "getSession", 145 + tags: ["Authentication"], 146 + description: "Get the current authenticated session", 147 + security: [], 148 + responses: { 149 + 200: { 150 + description: "Current session details or null when unauthenticated", 151 + content: { 152 + "application/json": { schema: resolver(v.any()) }, 153 + }, 154 + }, 155 + }, 156 + }), 157 + async (c) => { 158 + const session = await auth.api.getSession({ headers: c.req.raw.headers }); 159 + return c.json(session ?? null); 160 + }, 161 + ); 162 + 163 + api.get( 164 + "/asset/:id", 165 + describeRoute({ 166 + operationId: "getAsset", 167 + tags: ["Assets"], 168 + description: "Download an uploaded asset by ID", 169 + security: [], 170 + responses: { 171 + 200: { 172 + description: "The requested asset binary stream", 173 + content: { 174 + "*/*": { schema: resolver(v.any()) }, 175 + }, 176 + }, 177 + }, 178 + }), 179 + validator("param", v.object({ id: v.string() })), 180 + async (c) => { 181 + const { id } = c.req.param(); 182 + const [asset] = await db 183 + .select({ 184 + id: schema.assetTable.id, 185 + objectKey: schema.assetTable.objectKey, 186 + mimeType: schema.assetTable.mimeType, 187 + filename: schema.assetTable.filename, 188 + workspaceId: schema.assetTable.workspaceId, 189 + isPublic: schema.projectTable.isPublic, 190 + }) 191 + .from(schema.assetTable) 192 + .innerJoin( 193 + schema.projectTable, 194 + eq(schema.assetTable.projectId, schema.projectTable.id), 195 + ) 196 + .where(eq(schema.assetTable.id, id)) 197 + .limit(1); 198 + 199 + if (!asset) { 200 + throw new HTTPException(404, { message: "Asset not found" }); 201 + } 202 + 203 + const authHeader = c.req.header("Authorization"); 204 + const bearerToken = authHeader?.startsWith("Bearer ") 205 + ? authHeader.substring(7).replace(/\s+/g, "").trim() 206 + : null; 207 + 208 + let userId = ""; 209 + let apiKeyId: string | undefined; 153 210 154 - if (!asset) { 155 - throw new HTTPException(404, { message: "Asset not found" }); 156 - } 211 + if (bearerToken) { 212 + const result = await verifyApiKey(bearerToken); 157 213 158 - const session = await auth.api.getSession({ headers: c.req.raw.headers }); 159 - const userId = session?.user?.id || ""; 214 + if (result?.valid && result.key) { 215 + userId = result.key.userId; 216 + apiKeyId = result.key.id; 217 + } else { 218 + throw new HTTPException(401, { message: "Invalid API key" }); 219 + } 220 + } else { 221 + const session = await auth.api.getSession({ headers: c.req.raw.headers }); 222 + userId = session?.user?.id || ""; 223 + } 160 224 161 - if (userId) { 162 - await validateWorkspaceAccess(userId, asset.workspaceId); 163 - } else if (!asset.isPublic) { 164 - throw new HTTPException(401, { message: "Unauthorized" }); 165 - } 225 + if (userId) { 226 + await validateWorkspaceAccess(userId, asset.workspaceId, apiKeyId); 227 + } else if (!asset.isPublic) { 228 + throw new HTTPException(401, { message: "Unauthorized" }); 229 + } 166 230 167 - try { 168 - const object = await getPrivateObject(asset.objectKey); 231 + try { 232 + const object = await getPrivateObject(asset.objectKey); 169 233 170 - return new Response(object.body as BodyInit, { 171 - headers: { 172 - "Cache-Control": asset.isPublic 173 - ? "public, max-age=300" 174 - : "private, max-age=120", 175 - "Content-Disposition": buildContentDisposition(asset.filename), 176 - "Content-Length": object.contentLength?.toString() || "", 177 - "Content-Type": object.contentType || asset.mimeType, 178 - ETag: object.etag || "", 179 - "Last-Modified": object.lastModified?.toUTCString() || "", 180 - }, 181 - }); 182 - } catch (error) { 183 - console.error("Failed to stream asset:", error); 184 - throw new HTTPException(404, { message: "Asset object not found" }); 185 - } 186 - }); 234 + return new Response(object.body as BodyInit, { 235 + headers: { 236 + "Cache-Control": asset.isPublic 237 + ? "public, max-age=300" 238 + : "private, max-age=120", 239 + "Content-Disposition": buildContentDisposition(asset.filename), 240 + "Content-Length": object.contentLength?.toString() || "", 241 + "Content-Type": object.contentType || asset.mimeType, 242 + ETag: object.etag || "", 243 + "Last-Modified": object.lastModified?.toUTCString() || "", 244 + }, 245 + }); 246 + } catch (error) { 247 + console.error("Failed to stream asset:", error); 248 + throw new HTTPException(404, { message: "Asset object not found" }); 249 + } 250 + }, 251 + ); 187 252 188 253 const configApi = api.route("/config", config); 189 254
+70
apps/api/src/label/controllers/assign-label-to-task.ts
··· 1 + import { eq } from "drizzle-orm"; 2 + import { HTTPException } from "hono/http-exception"; 3 + import db from "../../database"; 4 + import { labelTable, projectTable, taskTable } from "../../database/schema"; 5 + import { 6 + removeLabelFromGitHub, 7 + syncLabelToGitHub, 8 + } from "../../plugins/github/utils/sync-label-to-github"; 9 + 10 + async function assignLabelToTask(id: string, taskId: string) { 11 + const label = await db.query.labelTable.findFirst({ 12 + where: (label, { eq }) => eq(label.id, id), 13 + }); 14 + 15 + if (!label) { 16 + throw new HTTPException(404, { 17 + message: "Label not found", 18 + }); 19 + } 20 + 21 + const [task] = await db 22 + .select({ 23 + id: taskTable.id, 24 + workspaceId: projectTable.workspaceId, 25 + }) 26 + .from(taskTable) 27 + .innerJoin(projectTable, eq(taskTable.projectId, projectTable.id)) 28 + .where(eq(taskTable.id, taskId)) 29 + .limit(1); 30 + 31 + if (!task) { 32 + throw new HTTPException(404, { 33 + message: "Task not found", 34 + }); 35 + } 36 + 37 + if (label.workspaceId && label.workspaceId !== task.workspaceId) { 38 + throw new HTTPException(400, { 39 + message: "Label and task must belong to the same workspace", 40 + }); 41 + } 42 + 43 + const [updatedLabel] = await db 44 + .update(labelTable) 45 + .set({ taskId }) 46 + .where(eq(labelTable.id, id)) 47 + .returning(); 48 + 49 + if (!updatedLabel) { 50 + throw new HTTPException(500, { 51 + message: "Failed to attach label to task", 52 + }); 53 + } 54 + 55 + if (label.taskId && label.taskId !== taskId) { 56 + removeLabelFromGitHub(label.taskId, label.name).catch((error) => { 57 + console.error("Failed to remove label from GitHub:", error); 58 + }); 59 + } 60 + 61 + syncLabelToGitHub(taskId, updatedLabel.name, updatedLabel.color).catch( 62 + (error) => { 63 + console.error("Failed to sync label to GitHub:", error); 64 + }, 65 + ); 66 + 67 + return updatedLabel; 68 + } 69 + 70 + export default assignLabelToTask;
+39
apps/api/src/label/controllers/unassign-label-from-task.ts
··· 1 + import { eq } from "drizzle-orm"; 2 + import { HTTPException } from "hono/http-exception"; 3 + import db from "../../database"; 4 + import { labelTable } from "../../database/schema"; 5 + import { removeLabelFromGitHub } from "../../plugins/github/utils/sync-label-to-github"; 6 + 7 + async function unassignLabelFromTask(id: string) { 8 + const label = await db.query.labelTable.findFirst({ 9 + where: (label, { eq }) => eq(label.id, id), 10 + }); 11 + 12 + if (!label) { 13 + throw new HTTPException(404, { 14 + message: "Label not found", 15 + }); 16 + } 17 + 18 + const [updatedLabel] = await db 19 + .update(labelTable) 20 + .set({ taskId: null }) 21 + .where(eq(labelTable.id, id)) 22 + .returning(); 23 + 24 + if (!updatedLabel) { 25 + throw new HTTPException(500, { 26 + message: "Failed to detach label from task", 27 + }); 28 + } 29 + 30 + if (label.taskId) { 31 + removeLabelFromGitHub(label.taskId, label.name).catch((error) => { 32 + console.error("Failed to remove label from GitHub:", error); 33 + }); 34 + } 35 + 36 + return updatedLabel; 37 + } 38 + 39 + export default unassignLabelFromTask;
+50
apps/api/src/label/index.ts
··· 3 3 import * as v from "valibot"; 4 4 import { labelSchema } from "../schemas"; 5 5 import { workspaceAccess } from "../utils/workspace-access-middleware"; 6 + import assignLabelToTask from "./controllers/assign-label-to-task"; 6 7 import createLabel from "./controllers/create-label"; 7 8 import deleteLabel from "./controllers/delete-label"; 8 9 import getLabel from "./controllers/get-label"; 9 10 import getLabelsByTaskId from "./controllers/get-labels-by-task-id"; 10 11 import getLabelsByWorkspaceId from "./controllers/get-labels-by-workspace-id"; 12 + import unassignLabelFromTask from "./controllers/unassign-label-from-task"; 11 13 import updateLabel from "./controllers/update-label"; 12 14 13 15 const label = new Hono() ··· 108 110 async (c) => { 109 111 const { id } = c.req.valid("param"); 110 112 const label = await getLabel(id); 113 + return c.json(label); 114 + }, 115 + ) 116 + .put( 117 + "/:id/task", 118 + describeRoute({ 119 + operationId: "attachLabelToTask", 120 + tags: ["Labels"], 121 + description: "Attach an existing label to a task", 122 + responses: { 123 + 200: { 124 + description: "Label attached to task successfully", 125 + content: { 126 + "application/json": { schema: resolver(labelSchema) }, 127 + }, 128 + }, 129 + }, 130 + }), 131 + validator("param", v.object({ id: v.string() })), 132 + validator("json", v.object({ taskId: v.string() })), 133 + workspaceAccess.fromLabel(), 134 + async (c) => { 135 + const { id } = c.req.valid("param"); 136 + const { taskId } = c.req.valid("json"); 137 + const label = await assignLabelToTask(id, taskId); 138 + return c.json(label); 139 + }, 140 + ) 141 + .delete( 142 + "/:id/task", 143 + describeRoute({ 144 + operationId: "detachLabelFromTask", 145 + tags: ["Labels"], 146 + description: "Detach a label from its current task", 147 + responses: { 148 + 200: { 149 + description: "Label detached from task successfully", 150 + content: { 151 + "application/json": { schema: resolver(labelSchema) }, 152 + }, 153 + }, 154 + }, 155 + }), 156 + validator("param", v.object({ id: v.string() })), 157 + workspaceAccess.fromLabel(), 158 + async (c) => { 159 + const { id } = c.req.valid("param"); 160 + const label = await unassignLabelFromTask(id); 111 161 return c.json(label); 112 162 }, 113 163 )
+10 -17
apps/api/src/project/controllers/delete-project.ts
··· 1 - import { and, eq } from "drizzle-orm"; 1 + import { eq } from "drizzle-orm"; 2 2 import { HTTPException } from "hono/http-exception"; 3 3 import db from "../../database"; 4 4 import { projectTable } from "../../database/schema"; 5 + import getProject from "./get-project"; 5 6 6 7 async function deleteProject(id: string, workspaceId: string) { 7 - const [existingProject] = await db 8 - .select() 9 - .from(projectTable) 10 - .where( 11 - and(eq(projectTable.id, id), eq(projectTable.workspaceId, workspaceId)), 12 - ); 13 - 14 - const isProjectExisting = Boolean(existingProject); 15 - 16 - if (!isProjectExisting) { 17 - throw new HTTPException(404, { 18 - message: 19 - "Project doesn't exist or doesn't belong to the specified workspace", 20 - }); 21 - } 8 + const existingProject = await getProject(id, workspaceId); 22 9 23 10 const [deletedProject] = await db 24 11 .delete(projectTable) 25 12 .where(eq(projectTable.id, id)) 26 13 .returning(); 27 14 28 - return deletedProject; 15 + if (!deletedProject) { 16 + throw new HTTPException(500, { 17 + message: "Failed to delete project", 18 + }); 19 + } 20 + 21 + return existingProject; 29 22 } 30 23 31 24 export default deleteProject;
-1
apps/api/src/project/index.ts
··· 86 86 }, 87 87 }), 88 88 validator("param", v.object({ id: v.string() })), 89 - validator("query", v.optional(v.object({ workspaceId: v.string() }))), 90 89 workspaceAccess.fromProject(), 91 90 async (c) => { 92 91 const { id } = c.req.valid("param");
+5 -2
apps/api/src/task/controllers/delete-task.ts
··· 2 2 import { HTTPException } from "hono/http-exception"; 3 3 import db from "../../database"; 4 4 import { taskTable } from "../../database/schema"; 5 + import getTask from "./get-task"; 5 6 6 7 async function deleteTask(taskId: string) { 7 - const task = await db 8 + const task = await getTask(taskId); 9 + 10 + const [deletedTask] = await db 8 11 .delete(taskTable) 9 12 .where(eq(taskTable.id, taskId)) 10 13 .returning() 11 14 .execute(); 12 15 13 - if (!task) { 16 + if (!deletedTask) { 14 17 throw new HTTPException(404, { 15 18 message: "Task not found", 16 19 });
+82 -27
apps/api/src/task/controllers/get-tasks.ts
··· 1 - import { asc, eq, inArray } from "drizzle-orm"; 1 + import { and, asc, eq, inArray, sql } from "drizzle-orm"; 2 2 import { HTTPException } from "hono/http-exception"; 3 3 import db from "../../database"; 4 4 import { ··· 10 10 userTable, 11 11 } from "../../database/schema"; 12 12 13 - async function getTasks(projectId: string) { 13 + type GetTasksOptions = { 14 + assigneeId?: string; 15 + limit?: number; 16 + page?: number; 17 + priority?: string; 18 + status?: string; 19 + }; 20 + 21 + async function getTasks(projectId: string, options: GetTasksOptions = {}) { 14 22 const project = await db.query.projectTable.findFirst({ 15 23 where: eq(projectTable.id, projectId), 16 24 }); ··· 21 29 }); 22 30 } 23 31 24 - const tasks = await db 25 - .select({ 26 - id: taskTable.id, 27 - title: taskTable.title, 28 - number: taskTable.number, 29 - description: taskTable.description, 30 - status: taskTable.status, 31 - priority: taskTable.priority, 32 - dueDate: taskTable.dueDate, 33 - position: taskTable.position, 34 - createdAt: taskTable.createdAt, 35 - userId: taskTable.userId, 36 - assigneeName: userTable.name, 37 - assigneeId: userTable.id, 38 - assigneeImage: userTable.image, 39 - projectId: taskTable.projectId, 40 - }) 32 + const conditions = [eq(taskTable.projectId, projectId)]; 33 + 34 + if (options.status) { 35 + conditions.push(eq(taskTable.status, options.status)); 36 + } 37 + 38 + if (options.priority) { 39 + conditions.push(eq(taskTable.priority, options.priority)); 40 + } 41 + 42 + if (options.assigneeId) { 43 + conditions.push(eq(taskTable.userId, options.assigneeId)); 44 + } 45 + 46 + const whereClause = and(...conditions); 47 + const page = options.page && options.page > 0 ? options.page : 1; 48 + const limit = 49 + options.limit && options.limit > 0 ? Math.min(options.limit, 100) : null; 50 + const offset = limit ? (page - 1) * limit : 0; 51 + 52 + const [taskCount] = await db 53 + .select({ count: sql<number>`count(*)` }) 41 54 .from(taskTable) 42 - .leftJoin(userTable, eq(taskTable.userId, userTable.id)) 43 - .leftJoin(projectTable, eq(taskTable.projectId, projectTable.id)) 44 - .where(eq(taskTable.projectId, projectId)) 45 - .orderBy(taskTable.position); 55 + .where(whereClause); 56 + 57 + const taskSelection = { 58 + id: taskTable.id, 59 + title: taskTable.title, 60 + number: taskTable.number, 61 + description: taskTable.description, 62 + status: taskTable.status, 63 + priority: taskTable.priority, 64 + dueDate: taskTable.dueDate, 65 + position: taskTable.position, 66 + createdAt: taskTable.createdAt, 67 + userId: taskTable.userId, 68 + assigneeName: userTable.name, 69 + assigneeId: userTable.id, 70 + assigneeImage: userTable.image, 71 + projectId: taskTable.projectId, 72 + }; 46 73 47 - const taskIds = tasks.map((task) => task.id); 74 + const paginatedTasks = limit 75 + ? await db 76 + .select(taskSelection) 77 + .from(taskTable) 78 + .leftJoin(userTable, eq(taskTable.userId, userTable.id)) 79 + .leftJoin(projectTable, eq(taskTable.projectId, projectTable.id)) 80 + .where(whereClause) 81 + .orderBy(taskTable.position) 82 + .limit(limit) 83 + .offset(offset) 84 + : await db 85 + .select(taskSelection) 86 + .from(taskTable) 87 + .leftJoin(userTable, eq(taskTable.userId, userTable.id)) 88 + .leftJoin(projectTable, eq(taskTable.projectId, projectTable.id)) 89 + .where(whereClause) 90 + .orderBy(taskTable.position); 91 + 92 + const taskIds = paginatedTasks.map((task) => task.id); 48 93 49 94 const labelsData = 50 95 taskIds.length > 0 ··· 119 164 id: column.slug, 120 165 name: column.name, 121 166 isFinal: column.isFinal, 122 - tasks: tasks 167 + tasks: paginatedTasks 123 168 .filter((task) => task.status === column.slug) 124 169 .map((task) => ({ 125 170 ...task, ··· 128 173 })), 129 174 })); 130 175 131 - const archivedTasks = tasks 176 + const archivedTasks = paginatedTasks 132 177 .filter((task) => task.status === "archived") 133 178 .map((task) => ({ 134 179 ...task, ··· 136 181 externalLinks: taskExternalLinksMap.get(task.id) || [], 137 182 })); 138 183 139 - const plannedTasks = tasks 184 + const plannedTasks = paginatedTasks 140 185 .filter((task) => task.status === "planned") 141 186 .map((task) => ({ 142 187 ...task, ··· 155 200 columns, 156 201 archivedTasks, 157 202 plannedTasks, 203 + pagination: limit 204 + ? { 205 + page, 206 + limit, 207 + total: taskCount?.count ?? 0, 208 + totalPages: Math.max(1, Math.ceil((taskCount?.count ?? 0) / limit)), 209 + hasNextPage: offset + paginatedTasks.length < (taskCount?.count ?? 0), 210 + hasPreviousPage: page > 1, 211 + } 212 + : undefined, 158 213 }; 159 214 } 160 215
+7 -6
apps/api/src/task/controllers/update-task-assignee.ts
··· 10 10 id: string; 11 11 userId: string; 12 12 }) { 13 - const updatedTask = await db.query.taskTable.findFirst({ 13 + const existingTask = await db.query.taskTable.findFirst({ 14 14 where: eq(taskTable.id, id), 15 15 }); 16 16 17 - if (!updatedTask) { 17 + if (!existingTask) { 18 18 throw new HTTPException(404, { 19 19 message: "Task not found", 20 20 }); 21 21 } 22 22 23 - await db 23 + const [updatedTask] = await db 24 24 .update(taskTable) 25 25 .set({ userId: userId || null }) 26 - .where(eq(taskTable.id, id)); 26 + .where(eq(taskTable.id, id)) 27 + .returning(); 27 28 28 29 if (!updatedTask) { 29 - throw new HTTPException(404, { 30 - message: "Task not found", 30 + throw new HTTPException(500, { 31 + message: "Failed to update task assignee", 31 32 }); 32 33 } 33 34
+7 -6
apps/api/src/task/controllers/update-task-due-date.ts
··· 10 10 id: string; 11 11 dueDate: Date | null; 12 12 }) { 13 - const updatedTask = await db.query.taskTable.findFirst({ 13 + const existingTask = await db.query.taskTable.findFirst({ 14 14 where: eq(taskTable.id, id), 15 15 }); 16 16 17 - if (!updatedTask) { 17 + if (!existingTask) { 18 18 throw new HTTPException(404, { 19 19 message: "Task not found", 20 20 }); 21 21 } 22 22 23 - await db 23 + const [updatedTask] = await db 24 24 .update(taskTable) 25 25 .set({ dueDate: dueDate || null }) 26 - .where(eq(taskTable.id, id)); 26 + .where(eq(taskTable.id, id)) 27 + .returning(); 27 28 28 29 if (!updatedTask) { 29 - throw new HTTPException(404, { 30 - message: "Task not found", 30 + throw new HTTPException(500, { 31 + message: "Failed to update task due date", 31 32 }); 32 33 } 33 34
+9 -5
apps/api/src/task/controllers/update-task-priority.ts
··· 10 10 id: string; 11 11 priority: string; 12 12 }) { 13 - const updatedTask = await db.query.taskTable.findFirst({ 13 + const existingTask = await db.query.taskTable.findFirst({ 14 14 where: eq(taskTable.id, id), 15 15 }); 16 16 17 - if (!updatedTask) { 17 + if (!existingTask) { 18 18 throw new HTTPException(404, { 19 19 message: "Task not found", 20 20 }); 21 21 } 22 22 23 - await db.update(taskTable).set({ priority }).where(eq(taskTable.id, id)); 23 + const [updatedTask] = await db 24 + .update(taskTable) 25 + .set({ priority }) 26 + .where(eq(taskTable.id, id)) 27 + .returning(); 24 28 25 29 if (!updatedTask) { 26 - throw new HTTPException(404, { 27 - message: "Task not found", 30 + throw new HTTPException(500, { 31 + message: "Failed to update task priority", 28 32 }); 29 33 } 30 34
+12 -5
apps/api/src/task/controllers/update-task-status.ts
··· 10 10 id: string; 11 11 status: string; 12 12 }) { 13 - const updatedTask = await db.query.taskTable.findFirst({ 13 + const existingTask = await db.query.taskTable.findFirst({ 14 14 where: eq(taskTable.id, id), 15 15 }); 16 16 17 - if (!updatedTask) { 17 + if (!existingTask) { 18 18 throw new HTTPException(404, { 19 19 message: "Task not found", 20 20 }); ··· 22 22 23 23 const column = await db.query.columnTable.findFirst({ 24 24 where: and( 25 - eq(columnTable.projectId, updatedTask.projectId), 25 + eq(columnTable.projectId, existingTask.projectId), 26 26 eq(columnTable.slug, status), 27 27 ), 28 28 }); 29 29 30 - await db 30 + const [updatedTask] = await db 31 31 .update(taskTable) 32 32 .set({ status, columnId: column?.id ?? null }) 33 - .where(eq(taskTable.id, id)); 33 + .where(eq(taskTable.id, id)) 34 + .returning(); 35 + 36 + if (!updatedTask) { 37 + throw new HTTPException(500, { 38 + message: "Failed to update task status", 39 + }); 40 + } 34 41 35 42 return updatedTask; 36 43 }
+1 -1
apps/api/src/task/controllers/update-task.ts
··· 53 53 }); 54 54 } 55 55 56 - return existingTask; 56 + return updatedTask; 57 57 } 58 58 59 59 export default updateTask;
+55 -7
apps/api/src/task/index.ts
··· 56 56 }, 57 57 }), 58 58 validator("param", v.object({ projectId: v.string() })), 59 + validator( 60 + "query", 61 + v.optional( 62 + v.object({ 63 + status: v.optional(v.string()), 64 + priority: v.optional(v.string()), 65 + assigneeId: v.optional(v.string()), 66 + page: v.optional(v.pipe(v.string(), v.transform(Number))), 67 + limit: v.optional(v.pipe(v.string(), v.transform(Number))), 68 + }), 69 + ), 70 + ), 59 71 workspaceAccess.fromProject("projectId"), 60 72 async (c) => { 61 73 const { projectId } = c.req.valid("param"); 74 + const filters = c.req.valid("query") || {}; 62 75 63 - const tasks = await getTasks(projectId); 76 + const tasks = await getTasks(projectId, filters); 64 77 65 78 return c.json(tasks); 66 79 }, ··· 167 180 workspaceAccess.fromTask(), 168 181 async (c) => { 169 182 const { id } = c.req.valid("param"); 183 + const existingTask = await db.query.taskTable.findFirst({ 184 + where: eq(taskTable.id, id), 185 + }); 170 186 const { 171 187 title, 172 188 description, ··· 178 194 userId, 179 195 } = c.req.valid("json"); 180 196 197 + if (!existingTask) { 198 + throw new HTTPException(404, { message: "Task not found" }); 199 + } 200 + 181 201 const task = await updateTask( 182 202 id, 183 203 title, ··· 190 210 userId, 191 211 ); 192 212 193 - if (status !== task.status) { 213 + if (existingTask.status !== status) { 194 214 const user = c.get("userId"); 195 215 await publishEvent("task.status_changed", { 196 216 taskId: task.id, 197 217 projectId: task.projectId, 198 218 userId: user, 199 - oldStatus: task.status, 219 + oldStatus: existingTask.status, 200 220 newStatus: status, 201 221 title: task.title, 202 222 assigneeId: task.userId, ··· 320 340 const { id } = c.req.valid("param"); 321 341 const { status } = c.req.valid("json"); 322 342 const user = c.get("userId"); 343 + const existingTask = await db.query.taskTable.findFirst({ 344 + where: eq(taskTable.id, id), 345 + }); 346 + 347 + if (!existingTask) { 348 + throw new HTTPException(404, { message: "Task not found" }); 349 + } 323 350 324 351 const task = await updateTaskStatus({ id, status }); 325 352 ··· 327 354 taskId: task.id, 328 355 projectId: task.projectId, 329 356 userId: user, 330 - oldStatus: task.status, 357 + oldStatus: existingTask.status, 331 358 newStatus: status, 332 359 title: task.title, 333 360 assigneeId: task.userId, ··· 359 386 const { id } = c.req.valid("param"); 360 387 const { priority } = c.req.valid("json"); 361 388 const user = c.get("userId"); 389 + const existingTask = await db.query.taskTable.findFirst({ 390 + where: eq(taskTable.id, id), 391 + }); 392 + 393 + if (!existingTask) { 394 + throw new HTTPException(404, { message: "Task not found" }); 395 + } 362 396 363 397 const task = await updateTaskPriority({ id, priority }); 364 398 ··· 366 400 taskId: task.id, 367 401 projectId: task.projectId, 368 402 userId: user, 369 - oldPriority: task.priority, 403 + oldPriority: existingTask.priority, 370 404 newPriority: priority, 371 405 title: task.title, 372 406 type: "priority_changed", ··· 397 431 const { id } = c.req.valid("param"); 398 432 const { userId } = c.req.valid("json"); 399 433 const user = c.get("userId"); 434 + const existingTask = await db.query.taskTable.findFirst({ 435 + where: eq(taskTable.id, id), 436 + }); 437 + 438 + if (!existingTask) { 439 + throw new HTTPException(404, { message: "Task not found" }); 440 + } 400 441 401 442 const task = await updateTaskAssignee({ id, userId }); 402 443 const newAssigneeName = userId ··· 422 463 await publishEvent("task.assignee_changed", { 423 464 taskId: task.id, 424 465 userId: user, 425 - oldAssignee: task.userId, 466 + oldAssignee: existingTask.userId, 426 467 newAssignee: newAssigneeName, 427 468 newAssigneeId: userId, 428 469 title: task.title, ··· 454 495 const { id } = c.req.valid("param"); 455 496 const { dueDate = null } = c.req.valid("json"); 456 497 const user = c.get("userId"); 498 + const existingTask = await db.query.taskTable.findFirst({ 499 + where: eq(taskTable.id, id), 500 + }); 501 + 502 + if (!existingTask) { 503 + throw new HTTPException(404, { message: "Task not found" }); 504 + } 457 505 458 506 const task = await updateTaskDueDate({ 459 507 id, ··· 463 511 await publishEvent("task.due_date_changed", { 464 512 taskId: task.id, 465 513 userId: user, 466 - oldDueDate: task.dueDate, 514 + oldDueDate: existingTask.dueDate, 467 515 newDueDate: dueDate, 468 516 title: task.title, 469 517 type: "due_date_changed",
+28 -7
apps/api/src/utils/workspace-access-middleware.ts
··· 221 221 222 222 fromTask: (idKey = "id") => 223 223 workspaceAccessMiddleware({ 224 - sources: [{ type: "lookup", resource: "task", idKey }], 224 + sources: [ 225 + { type: "lookup", resource: "task", idKey }, 226 + { type: "query", key: "workspaceId" }, 227 + ], 225 228 }), 226 229 227 230 fromTaskId: (idKey = "taskId") => 228 231 workspaceAccessMiddleware({ 229 - sources: [{ type: "lookup", resource: "task", idKey }], 232 + sources: [ 233 + { type: "lookup", resource: "task", idKey }, 234 + { type: "query", key: "workspaceId" }, 235 + ], 230 236 }), 231 237 232 238 fromLabel: (idKey = "id") => 233 239 workspaceAccessMiddleware({ 234 - sources: [{ type: "lookup", resource: "label", idKey }], 240 + sources: [ 241 + { type: "lookup", resource: "label", idKey }, 242 + { type: "query", key: "workspaceId" }, 243 + ], 235 244 }), 236 245 237 246 fromTimeEntry: (idKey = "id") => 238 247 workspaceAccessMiddleware({ 239 - sources: [{ type: "lookup", resource: "timeEntry", idKey }], 248 + sources: [ 249 + { type: "lookup", resource: "timeEntry", idKey }, 250 + { type: "query", key: "workspaceId" }, 251 + ], 240 252 }), 241 253 242 254 fromActivity: (idKey = "id") => 243 255 workspaceAccessMiddleware({ 244 - sources: [{ type: "lookup", resource: "activity", idKey }], 256 + sources: [ 257 + { type: "lookup", resource: "activity", idKey }, 258 + { type: "query", key: "workspaceId" }, 259 + ], 245 260 }), 246 261 247 262 fromColumn: (idKey = "id") => 248 263 workspaceAccessMiddleware({ 249 - sources: [{ type: "lookup", resource: "column", idKey }], 264 + sources: [ 265 + { type: "lookup", resource: "column", idKey }, 266 + { type: "query", key: "workspaceId" }, 267 + ], 250 268 }), 251 269 252 270 fromWorkflowRule: (idKey = "id") => 253 271 workspaceAccessMiddleware({ 254 - sources: [{ type: "lookup", resource: "workflowRule", idKey }], 272 + sources: [ 273 + { type: "lookup", resource: "workflowRule", idKey }, 274 + { type: "query", key: "workspaceId" }, 275 + ], 255 276 }), 256 277 };
+2
apps/docs/core/functional/backlog-planning.mdx
··· 5 5 6 6 Backlog view is your planning layer. Use it to prepare tasks before moving them into active columns. 7 7 8 + In Kaneo's data model, backlog items use the `planned` task status. A board column named "Backlog" is just a regular board column, not the same thing as the Backlog view. 9 + 8 10 ## When to use Backlog 9 11 10 12 Use backlog when you need to:
+1 -1
apps/docs/docs.json
··· 100 100 }, 101 101 { 102 102 "tab": "API Reference", 103 - "openapi": "./openapi.json" 103 + "openapi": "https://cloud.kaneo.app/api/openapi" 104 104 } 105 105 ], 106 106 "global": {
-9265
apps/docs/openapi.json
··· 1 - { 2 - "openapi": "3.0.3", 3 - "info": { 4 - "title": "Kaneo API", 5 - "description": "Kaneo Project Management API - Manage projects, tasks, labels, and more", 6 - "version": "1.0.0" 7 - }, 8 - "servers": [ 9 - { 10 - "url": "https://cloud.kaneo.app/api", 11 - "description": "Kaneo API Server" 12 - } 13 - ], 14 - "components": { 15 - "securitySchemes": { 16 - "bearerAuth": { 17 - "type": "http", 18 - "scheme": "bearer", 19 - "description": "Bearer token authentication" 20 - }, 21 - "apiKeyCookie": { 22 - "type": "apiKey", 23 - "in": "cookie", 24 - "name": "apiKeyCookie", 25 - "description": "API Key authentication via cookie" 26 - } 27 - }, 28 - "schemas": { 29 - "Organization": { 30 - "type": "object", 31 - "properties": { 32 - "id": { 33 - "type": "string" 34 - }, 35 - "name": { 36 - "type": "string" 37 - }, 38 - "slug": { 39 - "type": "string" 40 - }, 41 - "logo": { 42 - "type": "string" 43 - }, 44 - "createdAt": { 45 - "type": "string", 46 - "format": "date-time" 47 - }, 48 - "metadata": { 49 - "type": "string" 50 - }, 51 - "description": { 52 - "type": "string" 53 - } 54 - }, 55 - "required": [ 56 - "name", 57 - "slug", 58 - "createdAt" 59 - ] 60 - }, 61 - "Team": { 62 - "type": "object", 63 - "properties": { 64 - "id": { 65 - "type": "string" 66 - }, 67 - "name": { 68 - "type": "string" 69 - }, 70 - "organizationId": { 71 - "type": "string" 72 - }, 73 - "createdAt": { 74 - "type": "string", 75 - "format": "date-time" 76 - }, 77 - "updatedAt": { 78 - "type": "string", 79 - "format": "date-time" 80 - } 81 - }, 82 - "required": [ 83 - "name", 84 - "organizationId", 85 - "createdAt" 86 - ] 87 - } 88 - } 89 - }, 90 - "security": [ 91 - { 92 - "bearerAuth": [] 93 - } 94 - ], 95 - "paths": { 96 - "/config": { 97 - "get": { 98 - "operationId": "getConfig", 99 - "tags": [ 100 - "Config" 101 - ], 102 - "description": "Get application settings and configuration", 103 - "responses": { 104 - "200": { 105 - "description": "Application settings", 106 - "content": { 107 - "application/json": { 108 - "schema": { 109 - "type": "object", 110 - "properties": { 111 - "disableRegistration": { 112 - "type": "boolean", 113 - "nullable": true 114 - }, 115 - "isDemoMode": { 116 - "type": "boolean" 117 - }, 118 - "hasSmtp": { 119 - "type": "boolean" 120 - }, 121 - "hasGithubSignIn": { 122 - "type": "boolean", 123 - "nullable": true 124 - }, 125 - "hasGoogleSignIn": { 126 - "type": "boolean", 127 - "nullable": true 128 - }, 129 - "hasDiscordSignIn": { 130 - "type": "boolean", 131 - "nullable": true 132 - }, 133 - "hasCustomOAuth": { 134 - "type": "boolean", 135 - "nullable": true 136 - }, 137 - "hasGuestAccess": { 138 - "type": "boolean", 139 - "nullable": true 140 - } 141 - }, 142 - "required": [ 143 - "disableRegistration", 144 - "isDemoMode", 145 - "hasSmtp", 146 - "hasGithubSignIn", 147 - "hasGoogleSignIn", 148 - "hasDiscordSignIn", 149 - "hasCustomOAuth", 150 - "hasGuestAccess" 151 - ] 152 - } 153 - } 154 - } 155 - } 156 - }, 157 - "summary": "Get Config" 158 - } 159 - }, 160 - "/project": { 161 - "get": { 162 - "operationId": "listProjects", 163 - "tags": [ 164 - "Projects" 165 - ], 166 - "description": "Get all projects in a workspace", 167 - "responses": { 168 - "200": { 169 - "description": "List of projects with statistics", 170 - "content": { 171 - "application/json": { 172 - "schema": { 173 - "type": "array", 174 - "items": { 175 - "type": "object", 176 - "properties": { 177 - "id": { 178 - "type": "string" 179 - }, 180 - "workspaceId": { 181 - "type": "string" 182 - }, 183 - "slug": { 184 - "type": "string" 185 - }, 186 - "icon": { 187 - "type": "string", 188 - "nullable": true 189 - }, 190 - "name": { 191 - "type": "string" 192 - }, 193 - "description": { 194 - "type": "string", 195 - "nullable": true 196 - }, 197 - "createdAt": {}, 198 - "isPublic": { 199 - "type": "boolean", 200 - "nullable": true 201 - } 202 - }, 203 - "required": [ 204 - "id", 205 - "workspaceId", 206 - "slug", 207 - "icon", 208 - "name", 209 - "description", 210 - "createdAt", 211 - "isPublic" 212 - ] 213 - } 214 - } 215 - } 216 - } 217 - } 218 - }, 219 - "parameters": [ 220 - { 221 - "in": "query", 222 - "name": "workspaceId", 223 - "schema": { 224 - "type": "string" 225 - }, 226 - "required": true 227 - } 228 - ], 229 - "summary": "List Projects" 230 - }, 231 - "post": { 232 - "operationId": "createProject", 233 - "tags": [ 234 - "Projects" 235 - ], 236 - "description": "Create a new project in a workspace", 237 - "responses": { 238 - "200": { 239 - "description": "Project created successfully", 240 - "content": { 241 - "application/json": { 242 - "schema": { 243 - "type": "object", 244 - "properties": { 245 - "id": { 246 - "type": "string" 247 - }, 248 - "workspaceId": { 249 - "type": "string" 250 - }, 251 - "slug": { 252 - "type": "string" 253 - }, 254 - "icon": { 255 - "type": "string", 256 - "nullable": true 257 - }, 258 - "name": { 259 - "type": "string" 260 - }, 261 - "description": { 262 - "type": "string", 263 - "nullable": true 264 - }, 265 - "createdAt": {}, 266 - "isPublic": { 267 - "type": "boolean", 268 - "nullable": true 269 - } 270 - }, 271 - "required": [ 272 - "id", 273 - "workspaceId", 274 - "slug", 275 - "icon", 276 - "name", 277 - "description", 278 - "createdAt", 279 - "isPublic" 280 - ] 281 - } 282 - } 283 - } 284 - } 285 - }, 286 - "requestBody": { 287 - "content": { 288 - "application/json": { 289 - "schema": { 290 - "type": "object", 291 - "properties": { 292 - "name": { 293 - "type": "string" 294 - }, 295 - "workspaceId": { 296 - "type": "string" 297 - }, 298 - "icon": { 299 - "type": "string" 300 - }, 301 - "slug": { 302 - "type": "string" 303 - } 304 - }, 305 - "required": [ 306 - "name", 307 - "workspaceId", 308 - "icon", 309 - "slug" 310 - ] 311 - } 312 - } 313 - } 314 - }, 315 - "summary": "Create Project" 316 - } 317 - }, 318 - "/project/{id}": { 319 - "get": { 320 - "operationId": "getProject", 321 - "tags": [ 322 - "Projects" 323 - ], 324 - "description": "Get a specific project by ID", 325 - "responses": { 326 - "200": { 327 - "description": "Project details", 328 - "content": { 329 - "application/json": { 330 - "schema": { 331 - "type": "object", 332 - "properties": { 333 - "id": { 334 - "type": "string" 335 - }, 336 - "workspaceId": { 337 - "type": "string" 338 - }, 339 - "slug": { 340 - "type": "string" 341 - }, 342 - "icon": { 343 - "type": "string", 344 - "nullable": true 345 - }, 346 - "name": { 347 - "type": "string" 348 - }, 349 - "description": { 350 - "type": "string", 351 - "nullable": true 352 - }, 353 - "createdAt": {}, 354 - "isPublic": { 355 - "type": "boolean", 356 - "nullable": true 357 - } 358 - }, 359 - "required": [ 360 - "id", 361 - "workspaceId", 362 - "slug", 363 - "icon", 364 - "name", 365 - "description", 366 - "createdAt", 367 - "isPublic" 368 - ] 369 - } 370 - } 371 - } 372 - } 373 - }, 374 - "parameters": [ 375 - { 376 - "in": "path", 377 - "name": "id", 378 - "schema": { 379 - "type": "string" 380 - }, 381 - "required": true 382 - }, 383 - { 384 - "in": "query", 385 - "name": "workspaceId", 386 - "schema": { 387 - "type": "string" 388 - }, 389 - "required": true 390 - } 391 - ], 392 - "summary": "Get Project" 393 - }, 394 - "put": { 395 - "operationId": "updateProject", 396 - "tags": [ 397 - "Projects" 398 - ], 399 - "description": "Update an existing project", 400 - "responses": { 401 - "200": { 402 - "description": "Project updated successfully", 403 - "content": { 404 - "application/json": { 405 - "schema": { 406 - "type": "object", 407 - "properties": { 408 - "id": { 409 - "type": "string" 410 - }, 411 - "workspaceId": { 412 - "type": "string" 413 - }, 414 - "slug": { 415 - "type": "string" 416 - }, 417 - "icon": { 418 - "type": "string", 419 - "nullable": true 420 - }, 421 - "name": { 422 - "type": "string" 423 - }, 424 - "description": { 425 - "type": "string", 426 - "nullable": true 427 - }, 428 - "createdAt": {}, 429 - "isPublic": { 430 - "type": "boolean", 431 - "nullable": true 432 - } 433 - }, 434 - "required": [ 435 - "id", 436 - "workspaceId", 437 - "slug", 438 - "icon", 439 - "name", 440 - "description", 441 - "createdAt", 442 - "isPublic" 443 - ] 444 - } 445 - } 446 - } 447 - } 448 - }, 449 - "parameters": [ 450 - { 451 - "in": "path", 452 - "name": "id", 453 - "schema": { 454 - "type": "string" 455 - }, 456 - "required": true 457 - } 458 - ], 459 - "requestBody": { 460 - "content": { 461 - "application/json": { 462 - "schema": { 463 - "type": "object", 464 - "properties": { 465 - "name": { 466 - "type": "string" 467 - }, 468 - "icon": { 469 - "type": "string" 470 - }, 471 - "slug": { 472 - "type": "string" 473 - }, 474 - "description": { 475 - "type": "string" 476 - }, 477 - "isPublic": { 478 - "type": "boolean" 479 - } 480 - }, 481 - "required": [ 482 - "name", 483 - "icon", 484 - "slug", 485 - "description", 486 - "isPublic" 487 - ] 488 - } 489 - } 490 - } 491 - }, 492 - "summary": "Update Project" 493 - }, 494 - "delete": { 495 - "operationId": "deleteProject", 496 - "tags": [ 497 - "Projects" 498 - ], 499 - "description": "Delete a project by ID", 500 - "responses": { 501 - "200": { 502 - "description": "Project deleted successfully", 503 - "content": { 504 - "application/json": { 505 - "schema": { 506 - "type": "object", 507 - "properties": { 508 - "id": { 509 - "type": "string" 510 - }, 511 - "workspaceId": { 512 - "type": "string" 513 - }, 514 - "slug": { 515 - "type": "string" 516 - }, 517 - "icon": { 518 - "type": "string", 519 - "nullable": true 520 - }, 521 - "name": { 522 - "type": "string" 523 - }, 524 - "description": { 525 - "type": "string", 526 - "nullable": true 527 - }, 528 - "createdAt": {}, 529 - "isPublic": { 530 - "type": "boolean", 531 - "nullable": true 532 - } 533 - }, 534 - "required": [ 535 - "id", 536 - "workspaceId", 537 - "slug", 538 - "icon", 539 - "name", 540 - "description", 541 - "createdAt", 542 - "isPublic" 543 - ] 544 - } 545 - } 546 - } 547 - } 548 - }, 549 - "parameters": [ 550 - { 551 - "in": "path", 552 - "name": "id", 553 - "schema": { 554 - "type": "string" 555 - }, 556 - "required": true 557 - } 558 - ], 559 - "summary": "Delete Project" 560 - } 561 - }, 562 - "/task/tasks/{projectId}": { 563 - "get": { 564 - "operationId": "listTasks", 565 - "tags": [ 566 - "Tasks" 567 - ], 568 - "description": "Get all tasks for a specific project", 569 - "responses": { 570 - "200": { 571 - "description": "Project with tasks organized by columns", 572 - "content": { 573 - "application/json": { 574 - "schema": {} 575 - } 576 - } 577 - } 578 - }, 579 - "parameters": [ 580 - { 581 - "in": "path", 582 - "name": "projectId", 583 - "schema": { 584 - "type": "string" 585 - }, 586 - "required": true 587 - } 588 - ], 589 - "summary": "List Tasks" 590 - } 591 - }, 592 - "/task/{projectId}": { 593 - "post": { 594 - "operationId": "createTask", 595 - "tags": [ 596 - "Tasks" 597 - ], 598 - "description": "Create a new task in a project", 599 - "responses": { 600 - "200": { 601 - "description": "Task created successfully", 602 - "content": { 603 - "application/json": { 604 - "schema": { 605 - "type": "object", 606 - "properties": { 607 - "id": { 608 - "type": "string" 609 - }, 610 - "projectId": { 611 - "type": "string" 612 - }, 613 - "position": { 614 - "type": "number", 615 - "nullable": true 616 - }, 617 - "number": { 618 - "type": "number", 619 - "nullable": true 620 - }, 621 - "userId": { 622 - "type": "string", 623 - "nullable": true 624 - }, 625 - "title": { 626 - "type": "string" 627 - }, 628 - "description": { 629 - "type": "string", 630 - "nullable": true 631 - }, 632 - "status": { 633 - "type": "string" 634 - }, 635 - "priority": { 636 - "enum": [ 637 - "no-priority", 638 - "low", 639 - "medium", 640 - "high", 641 - "urgent" 642 - ] 643 - }, 644 - "dueDate": {}, 645 - "createdAt": {} 646 - }, 647 - "required": [ 648 - "id", 649 - "projectId", 650 - "position", 651 - "number", 652 - "userId", 653 - "title", 654 - "description", 655 - "status", 656 - "priority", 657 - "createdAt" 658 - ] 659 - } 660 - } 661 - } 662 - } 663 - }, 664 - "requestBody": { 665 - "content": { 666 - "application/json": { 667 - "schema": { 668 - "type": "object", 669 - "properties": { 670 - "title": { 671 - "type": "string" 672 - }, 673 - "description": { 674 - "type": "string" 675 - }, 676 - "dueDate": { 677 - "type": "string" 678 - }, 679 - "priority": { 680 - "type": "string" 681 - }, 682 - "status": { 683 - "type": "string" 684 - }, 685 - "userId": { 686 - "type": "string" 687 - } 688 - }, 689 - "required": [ 690 - "title", 691 - "description", 692 - "priority", 693 - "status" 694 - ] 695 - } 696 - } 697 - } 698 - }, 699 - "parameters": [ 700 - { 701 - "schema": { 702 - "type": "string" 703 - }, 704 - "in": "path", 705 - "name": "projectId", 706 - "required": true 707 - } 708 - ], 709 - "summary": "Create Task" 710 - } 711 - }, 712 - "/task/{id}": { 713 - "get": { 714 - "operationId": "getTask", 715 - "tags": [ 716 - "Tasks" 717 - ], 718 - "description": "Get a specific task by ID", 719 - "responses": { 720 - "200": { 721 - "description": "Task details", 722 - "content": { 723 - "application/json": { 724 - "schema": { 725 - "type": "object", 726 - "properties": { 727 - "id": { 728 - "type": "string" 729 - }, 730 - "projectId": { 731 - "type": "string" 732 - }, 733 - "position": { 734 - "type": "number", 735 - "nullable": true 736 - }, 737 - "number": { 738 - "type": "number", 739 - "nullable": true 740 - }, 741 - "userId": { 742 - "type": "string", 743 - "nullable": true 744 - }, 745 - "title": { 746 - "type": "string" 747 - }, 748 - "description": { 749 - "type": "string", 750 - "nullable": true 751 - }, 752 - "status": { 753 - "type": "string" 754 - }, 755 - "priority": { 756 - "enum": [ 757 - "no-priority", 758 - "low", 759 - "medium", 760 - "high", 761 - "urgent" 762 - ] 763 - }, 764 - "dueDate": {}, 765 - "createdAt": {} 766 - }, 767 - "required": [ 768 - "id", 769 - "projectId", 770 - "position", 771 - "number", 772 - "userId", 773 - "title", 774 - "description", 775 - "status", 776 - "priority", 777 - "createdAt" 778 - ] 779 - } 780 - } 781 - } 782 - } 783 - }, 784 - "parameters": [ 785 - { 786 - "in": "path", 787 - "name": "id", 788 - "schema": { 789 - "type": "string" 790 - }, 791 - "required": true 792 - } 793 - ], 794 - "summary": "Get Task" 795 - }, 796 - "put": { 797 - "operationId": "updateTask", 798 - "tags": [ 799 - "Tasks" 800 - ], 801 - "description": "Update all fields of a task", 802 - "responses": { 803 - "200": { 804 - "description": "Task updated successfully", 805 - "content": { 806 - "application/json": { 807 - "schema": { 808 - "type": "object", 809 - "properties": { 810 - "id": { 811 - "type": "string" 812 - }, 813 - "projectId": { 814 - "type": "string" 815 - }, 816 - "position": { 817 - "type": "number", 818 - "nullable": true 819 - }, 820 - "number": { 821 - "type": "number", 822 - "nullable": true 823 - }, 824 - "userId": { 825 - "type": "string", 826 - "nullable": true 827 - }, 828 - "title": { 829 - "type": "string" 830 - }, 831 - "description": { 832 - "type": "string", 833 - "nullable": true 834 - }, 835 - "status": { 836 - "type": "string" 837 - }, 838 - "priority": { 839 - "enum": [ 840 - "no-priority", 841 - "low", 842 - "medium", 843 - "high", 844 - "urgent" 845 - ] 846 - }, 847 - "dueDate": {}, 848 - "createdAt": {} 849 - }, 850 - "required": [ 851 - "id", 852 - "projectId", 853 - "position", 854 - "number", 855 - "userId", 856 - "title", 857 - "description", 858 - "status", 859 - "priority", 860 - "createdAt" 861 - ] 862 - } 863 - } 864 - } 865 - } 866 - }, 867 - "parameters": [ 868 - { 869 - "in": "path", 870 - "name": "id", 871 - "schema": { 872 - "type": "string" 873 - }, 874 - "required": true 875 - } 876 - ], 877 - "requestBody": { 878 - "content": { 879 - "application/json": { 880 - "schema": { 881 - "type": "object", 882 - "properties": { 883 - "title": { 884 - "type": "string" 885 - }, 886 - "description": { 887 - "type": "string" 888 - }, 889 - "dueDate": { 890 - "type": "string" 891 - }, 892 - "priority": { 893 - "type": "string" 894 - }, 895 - "status": { 896 - "type": "string" 897 - }, 898 - "projectId": { 899 - "type": "string" 900 - }, 901 - "position": { 902 - "type": "number" 903 - }, 904 - "userId": { 905 - "type": "string" 906 - } 907 - }, 908 - "required": [ 909 - "title", 910 - "description", 911 - "priority", 912 - "status", 913 - "projectId", 914 - "position" 915 - ] 916 - } 917 - } 918 - } 919 - }, 920 - "summary": "Update Task" 921 - }, 922 - "delete": { 923 - "operationId": "deleteTask", 924 - "tags": [ 925 - "Tasks" 926 - ], 927 - "description": "Delete a task by ID", 928 - "responses": { 929 - "200": { 930 - "description": "Task deleted successfully", 931 - "content": { 932 - "application/json": { 933 - "schema": { 934 - "type": "object", 935 - "properties": { 936 - "id": { 937 - "type": "string" 938 - }, 939 - "projectId": { 940 - "type": "string" 941 - }, 942 - "position": { 943 - "type": "number", 944 - "nullable": true 945 - }, 946 - "number": { 947 - "type": "number", 948 - "nullable": true 949 - }, 950 - "userId": { 951 - "type": "string", 952 - "nullable": true 953 - }, 954 - "title": { 955 - "type": "string" 956 - }, 957 - "description": { 958 - "type": "string", 959 - "nullable": true 960 - }, 961 - "status": { 962 - "type": "string" 963 - }, 964 - "priority": { 965 - "enum": [ 966 - "no-priority", 967 - "low", 968 - "medium", 969 - "high", 970 - "urgent" 971 - ] 972 - }, 973 - "dueDate": {}, 974 - "createdAt": {} 975 - }, 976 - "required": [ 977 - "id", 978 - "projectId", 979 - "position", 980 - "number", 981 - "userId", 982 - "title", 983 - "description", 984 - "status", 985 - "priority", 986 - "createdAt" 987 - ] 988 - } 989 - } 990 - } 991 - } 992 - }, 993 - "parameters": [ 994 - { 995 - "in": "path", 996 - "name": "id", 997 - "schema": { 998 - "type": "string" 999 - }, 1000 - "required": true 1001 - } 1002 - ], 1003 - "summary": "Delete Task" 1004 - } 1005 - }, 1006 - "/task/export/{projectId}": { 1007 - "get": { 1008 - "operationId": "exportTasks", 1009 - "tags": [ 1010 - "Tasks" 1011 - ], 1012 - "description": "Export all tasks from a project", 1013 - "responses": { 1014 - "200": { 1015 - "description": "Exported tasks data", 1016 - "content": { 1017 - "application/json": { 1018 - "schema": {} 1019 - } 1020 - } 1021 - } 1022 - }, 1023 - "parameters": [ 1024 - { 1025 - "in": "path", 1026 - "name": "projectId", 1027 - "schema": { 1028 - "type": "string" 1029 - }, 1030 - "required": true 1031 - } 1032 - ], 1033 - "summary": "Export Tasks" 1034 - } 1035 - }, 1036 - "/task/import/{projectId}": { 1037 - "post": { 1038 - "operationId": "importTasks", 1039 - "tags": [ 1040 - "Tasks" 1041 - ], 1042 - "description": "Import multiple tasks into a project", 1043 - "responses": { 1044 - "200": { 1045 - "description": "Tasks imported successfully", 1046 - "content": { 1047 - "application/json": { 1048 - "schema": {} 1049 - } 1050 - } 1051 - } 1052 - }, 1053 - "parameters": [ 1054 - { 1055 - "in": "path", 1056 - "name": "projectId", 1057 - "schema": { 1058 - "type": "string" 1059 - }, 1060 - "required": true 1061 - } 1062 - ], 1063 - "requestBody": { 1064 - "content": { 1065 - "application/json": { 1066 - "schema": { 1067 - "type": "object", 1068 - "properties": { 1069 - "tasks": { 1070 - "type": "array", 1071 - "items": { 1072 - "type": "object", 1073 - "properties": { 1074 - "title": { 1075 - "type": "string" 1076 - }, 1077 - "description": { 1078 - "type": "string" 1079 - }, 1080 - "status": { 1081 - "type": "string" 1082 - }, 1083 - "priority": { 1084 - "type": "string" 1085 - }, 1086 - "dueDate": { 1087 - "type": "string" 1088 - }, 1089 - "userId": { 1090 - "type": "string", 1091 - "nullable": true 1092 - } 1093 - }, 1094 - "required": [ 1095 - "title", 1096 - "status" 1097 - ] 1098 - } 1099 - } 1100 - }, 1101 - "required": [ 1102 - "tasks" 1103 - ] 1104 - } 1105 - } 1106 - } 1107 - }, 1108 - "summary": "Import Tasks" 1109 - } 1110 - }, 1111 - "/task/status/{id}": { 1112 - "put": { 1113 - "operationId": "updateTaskStatus", 1114 - "tags": [ 1115 - "Tasks" 1116 - ], 1117 - "description": "Update only the status of a task", 1118 - "responses": { 1119 - "200": { 1120 - "description": "Task status updated successfully", 1121 - "content": { 1122 - "application/json": { 1123 - "schema": { 1124 - "type": "object", 1125 - "properties": { 1126 - "id": { 1127 - "type": "string" 1128 - }, 1129 - "projectId": { 1130 - "type": "string" 1131 - }, 1132 - "position": { 1133 - "type": "number", 1134 - "nullable": true 1135 - }, 1136 - "number": { 1137 - "type": "number", 1138 - "nullable": true 1139 - }, 1140 - "userId": { 1141 - "type": "string", 1142 - "nullable": true 1143 - }, 1144 - "title": { 1145 - "type": "string" 1146 - }, 1147 - "description": { 1148 - "type": "string", 1149 - "nullable": true 1150 - }, 1151 - "status": { 1152 - "type": "string" 1153 - }, 1154 - "priority": { 1155 - "enum": [ 1156 - "no-priority", 1157 - "low", 1158 - "medium", 1159 - "high", 1160 - "urgent" 1161 - ] 1162 - }, 1163 - "dueDate": {}, 1164 - "createdAt": {} 1165 - }, 1166 - "required": [ 1167 - "id", 1168 - "projectId", 1169 - "position", 1170 - "number", 1171 - "userId", 1172 - "title", 1173 - "description", 1174 - "status", 1175 - "priority", 1176 - "createdAt" 1177 - ] 1178 - } 1179 - } 1180 - } 1181 - } 1182 - }, 1183 - "parameters": [ 1184 - { 1185 - "in": "path", 1186 - "name": "id", 1187 - "schema": { 1188 - "type": "string" 1189 - }, 1190 - "required": true 1191 - } 1192 - ], 1193 - "requestBody": { 1194 - "content": { 1195 - "application/json": { 1196 - "schema": { 1197 - "type": "object", 1198 - "properties": { 1199 - "status": { 1200 - "type": "string" 1201 - } 1202 - }, 1203 - "required": [ 1204 - "status" 1205 - ] 1206 - } 1207 - } 1208 - } 1209 - }, 1210 - "summary": "Update Task Status" 1211 - } 1212 - }, 1213 - "/task/priority/{id}": { 1214 - "put": { 1215 - "operationId": "updateTaskPriority", 1216 - "tags": [ 1217 - "Tasks" 1218 - ], 1219 - "description": "Update only the priority of a task", 1220 - "responses": { 1221 - "200": { 1222 - "description": "Task priority updated successfully", 1223 - "content": { 1224 - "application/json": { 1225 - "schema": { 1226 - "type": "object", 1227 - "properties": { 1228 - "id": { 1229 - "type": "string" 1230 - }, 1231 - "projectId": { 1232 - "type": "string" 1233 - }, 1234 - "position": { 1235 - "type": "number", 1236 - "nullable": true 1237 - }, 1238 - "number": { 1239 - "type": "number", 1240 - "nullable": true 1241 - }, 1242 - "userId": { 1243 - "type": "string", 1244 - "nullable": true 1245 - }, 1246 - "title": { 1247 - "type": "string" 1248 - }, 1249 - "description": { 1250 - "type": "string", 1251 - "nullable": true 1252 - }, 1253 - "status": { 1254 - "type": "string" 1255 - }, 1256 - "priority": { 1257 - "enum": [ 1258 - "no-priority", 1259 - "low", 1260 - "medium", 1261 - "high", 1262 - "urgent" 1263 - ] 1264 - }, 1265 - "dueDate": {}, 1266 - "createdAt": {} 1267 - }, 1268 - "required": [ 1269 - "id", 1270 - "projectId", 1271 - "position", 1272 - "number", 1273 - "userId", 1274 - "title", 1275 - "description", 1276 - "status", 1277 - "priority", 1278 - "createdAt" 1279 - ] 1280 - } 1281 - } 1282 - } 1283 - } 1284 - }, 1285 - "parameters": [ 1286 - { 1287 - "in": "path", 1288 - "name": "id", 1289 - "schema": { 1290 - "type": "string" 1291 - }, 1292 - "required": true 1293 - } 1294 - ], 1295 - "requestBody": { 1296 - "content": { 1297 - "application/json": { 1298 - "schema": { 1299 - "type": "object", 1300 - "properties": { 1301 - "priority": { 1302 - "type": "string" 1303 - } 1304 - }, 1305 - "required": [ 1306 - "priority" 1307 - ] 1308 - } 1309 - } 1310 - } 1311 - }, 1312 - "summary": "Update Task Priority" 1313 - } 1314 - }, 1315 - "/task/assignee/{id}": { 1316 - "put": { 1317 - "operationId": "updateTaskAssignee", 1318 - "tags": [ 1319 - "Tasks" 1320 - ], 1321 - "description": "Assign or unassign a task to a user", 1322 - "responses": { 1323 - "200": { 1324 - "description": "Task assignee updated successfully", 1325 - "content": { 1326 - "application/json": { 1327 - "schema": { 1328 - "type": "object", 1329 - "properties": { 1330 - "id": { 1331 - "type": "string" 1332 - }, 1333 - "projectId": { 1334 - "type": "string" 1335 - }, 1336 - "position": { 1337 - "type": "number", 1338 - "nullable": true 1339 - }, 1340 - "number": { 1341 - "type": "number", 1342 - "nullable": true 1343 - }, 1344 - "userId": { 1345 - "type": "string", 1346 - "nullable": true 1347 - }, 1348 - "title": { 1349 - "type": "string" 1350 - }, 1351 - "description": { 1352 - "type": "string", 1353 - "nullable": true 1354 - }, 1355 - "status": { 1356 - "type": "string" 1357 - }, 1358 - "priority": { 1359 - "enum": [ 1360 - "no-priority", 1361 - "low", 1362 - "medium", 1363 - "high", 1364 - "urgent" 1365 - ] 1366 - }, 1367 - "dueDate": {}, 1368 - "createdAt": {} 1369 - }, 1370 - "required": [ 1371 - "id", 1372 - "projectId", 1373 - "position", 1374 - "number", 1375 - "userId", 1376 - "title", 1377 - "description", 1378 - "status", 1379 - "priority", 1380 - "createdAt" 1381 - ] 1382 - } 1383 - } 1384 - } 1385 - } 1386 - }, 1387 - "parameters": [ 1388 - { 1389 - "in": "path", 1390 - "name": "id", 1391 - "schema": { 1392 - "type": "string" 1393 - }, 1394 - "required": true 1395 - } 1396 - ], 1397 - "requestBody": { 1398 - "content": { 1399 - "application/json": { 1400 - "schema": { 1401 - "type": "object", 1402 - "properties": { 1403 - "userId": { 1404 - "type": "string" 1405 - } 1406 - }, 1407 - "required": [ 1408 - "userId" 1409 - ] 1410 - } 1411 - } 1412 - } 1413 - }, 1414 - "summary": "Update Task Assignee" 1415 - } 1416 - }, 1417 - "/task/due-date/{id}": { 1418 - "put": { 1419 - "operationId": "updateTaskDueDate", 1420 - "tags": [ 1421 - "Tasks" 1422 - ], 1423 - "description": "Update only the due date of a task", 1424 - "responses": { 1425 - "200": { 1426 - "description": "Task due date updated successfully", 1427 - "content": { 1428 - "application/json": { 1429 - "schema": { 1430 - "type": "object", 1431 - "properties": { 1432 - "id": { 1433 - "type": "string" 1434 - }, 1435 - "projectId": { 1436 - "type": "string" 1437 - }, 1438 - "position": { 1439 - "type": "number", 1440 - "nullable": true 1441 - }, 1442 - "number": { 1443 - "type": "number", 1444 - "nullable": true 1445 - }, 1446 - "userId": { 1447 - "type": "string", 1448 - "nullable": true 1449 - }, 1450 - "title": { 1451 - "type": "string" 1452 - }, 1453 - "description": { 1454 - "type": "string", 1455 - "nullable": true 1456 - }, 1457 - "status": { 1458 - "type": "string" 1459 - }, 1460 - "priority": { 1461 - "enum": [ 1462 - "no-priority", 1463 - "low", 1464 - "medium", 1465 - "high", 1466 - "urgent" 1467 - ] 1468 - }, 1469 - "dueDate": {}, 1470 - "createdAt": {} 1471 - }, 1472 - "required": [ 1473 - "id", 1474 - "projectId", 1475 - "position", 1476 - "number", 1477 - "userId", 1478 - "title", 1479 - "description", 1480 - "status", 1481 - "priority", 1482 - "createdAt" 1483 - ] 1484 - } 1485 - } 1486 - } 1487 - } 1488 - }, 1489 - "parameters": [ 1490 - { 1491 - "in": "path", 1492 - "name": "id", 1493 - "schema": { 1494 - "type": "string" 1495 - }, 1496 - "required": true 1497 - } 1498 - ], 1499 - "requestBody": { 1500 - "content": { 1501 - "application/json": { 1502 - "schema": { 1503 - "type": "object", 1504 - "properties": { 1505 - "dueDate": { 1506 - "type": "string" 1507 - } 1508 - } 1509 - } 1510 - } 1511 - } 1512 - }, 1513 - "summary": "Update Task Due Date" 1514 - } 1515 - }, 1516 - "/task/title/{id}": { 1517 - "put": { 1518 - "operationId": "updateTaskTitle", 1519 - "tags": [ 1520 - "Tasks" 1521 - ], 1522 - "description": "Update only the title of a task", 1523 - "responses": { 1524 - "200": { 1525 - "description": "Task title updated successfully", 1526 - "content": { 1527 - "application/json": { 1528 - "schema": { 1529 - "type": "object", 1530 - "properties": { 1531 - "id": { 1532 - "type": "string" 1533 - }, 1534 - "projectId": { 1535 - "type": "string" 1536 - }, 1537 - "position": { 1538 - "type": "number", 1539 - "nullable": true 1540 - }, 1541 - "number": { 1542 - "type": "number", 1543 - "nullable": true 1544 - }, 1545 - "userId": { 1546 - "type": "string", 1547 - "nullable": true 1548 - }, 1549 - "title": { 1550 - "type": "string" 1551 - }, 1552 - "description": { 1553 - "type": "string", 1554 - "nullable": true 1555 - }, 1556 - "status": { 1557 - "type": "string" 1558 - }, 1559 - "priority": { 1560 - "enum": [ 1561 - "no-priority", 1562 - "low", 1563 - "medium", 1564 - "high", 1565 - "urgent" 1566 - ] 1567 - }, 1568 - "dueDate": {}, 1569 - "createdAt": {} 1570 - }, 1571 - "required": [ 1572 - "id", 1573 - "projectId", 1574 - "position", 1575 - "number", 1576 - "userId", 1577 - "title", 1578 - "description", 1579 - "status", 1580 - "priority", 1581 - "createdAt" 1582 - ] 1583 - } 1584 - } 1585 - } 1586 - } 1587 - }, 1588 - "parameters": [ 1589 - { 1590 - "in": "path", 1591 - "name": "id", 1592 - "schema": { 1593 - "type": "string" 1594 - }, 1595 - "required": true 1596 - } 1597 - ], 1598 - "requestBody": { 1599 - "content": { 1600 - "application/json": { 1601 - "schema": { 1602 - "type": "object", 1603 - "properties": { 1604 - "title": { 1605 - "type": "string" 1606 - } 1607 - }, 1608 - "required": [ 1609 - "title" 1610 - ] 1611 - } 1612 - } 1613 - } 1614 - }, 1615 - "summary": "Update Task Title" 1616 - } 1617 - }, 1618 - "/task/description/{id}": { 1619 - "put": { 1620 - "operationId": "updateTaskDescription", 1621 - "tags": [ 1622 - "Tasks" 1623 - ], 1624 - "description": "Update only the description of a task", 1625 - "responses": { 1626 - "200": { 1627 - "description": "Task description updated successfully", 1628 - "content": { 1629 - "application/json": { 1630 - "schema": { 1631 - "type": "object", 1632 - "properties": { 1633 - "id": { 1634 - "type": "string" 1635 - }, 1636 - "projectId": { 1637 - "type": "string" 1638 - }, 1639 - "position": { 1640 - "type": "number", 1641 - "nullable": true 1642 - }, 1643 - "number": { 1644 - "type": "number", 1645 - "nullable": true 1646 - }, 1647 - "userId": { 1648 - "type": "string", 1649 - "nullable": true 1650 - }, 1651 - "title": { 1652 - "type": "string" 1653 - }, 1654 - "description": { 1655 - "type": "string", 1656 - "nullable": true 1657 - }, 1658 - "status": { 1659 - "type": "string" 1660 - }, 1661 - "priority": { 1662 - "enum": [ 1663 - "no-priority", 1664 - "low", 1665 - "medium", 1666 - "high", 1667 - "urgent" 1668 - ] 1669 - }, 1670 - "dueDate": {}, 1671 - "createdAt": {} 1672 - }, 1673 - "required": [ 1674 - "id", 1675 - "projectId", 1676 - "position", 1677 - "number", 1678 - "userId", 1679 - "title", 1680 - "description", 1681 - "status", 1682 - "priority", 1683 - "createdAt" 1684 - ] 1685 - } 1686 - } 1687 - } 1688 - } 1689 - }, 1690 - "parameters": [ 1691 - { 1692 - "in": "path", 1693 - "name": "id", 1694 - "schema": { 1695 - "type": "string" 1696 - }, 1697 - "required": true 1698 - } 1699 - ], 1700 - "requestBody": { 1701 - "content": { 1702 - "application/json": { 1703 - "schema": { 1704 - "type": "object", 1705 - "properties": { 1706 - "description": { 1707 - "type": "string" 1708 - } 1709 - }, 1710 - "required": [ 1711 - "description" 1712 - ] 1713 - } 1714 - } 1715 - } 1716 - }, 1717 - "summary": "Update Task Description" 1718 - } 1719 - }, 1720 - "/column/{projectId}": { 1721 - "get": { 1722 - "operationId": "getColumns", 1723 - "tags": [ 1724 - "Columns" 1725 - ], 1726 - "description": "Get all columns for a project", 1727 - "responses": { 1728 - "200": { 1729 - "description": "List of columns ordered by position", 1730 - "content": { 1731 - "application/json": { 1732 - "schema": {} 1733 - } 1734 - } 1735 - } 1736 - }, 1737 - "parameters": [ 1738 - { 1739 - "in": "path", 1740 - "name": "projectId", 1741 - "schema": { 1742 - "type": "string" 1743 - }, 1744 - "required": true 1745 - } 1746 - ], 1747 - "summary": "Get Columns" 1748 - }, 1749 - "post": { 1750 - "operationId": "createColumn", 1751 - "tags": [ 1752 - "Columns" 1753 - ], 1754 - "description": "Create a new column in a project", 1755 - "responses": { 1756 - "200": { 1757 - "description": "Column created successfully", 1758 - "content": { 1759 - "application/json": { 1760 - "schema": {} 1761 - } 1762 - } 1763 - } 1764 - }, 1765 - "parameters": [ 1766 - { 1767 - "in": "path", 1768 - "name": "projectId", 1769 - "schema": { 1770 - "type": "string" 1771 - }, 1772 - "required": true 1773 - } 1774 - ], 1775 - "requestBody": { 1776 - "content": { 1777 - "application/json": { 1778 - "schema": { 1779 - "type": "object", 1780 - "properties": { 1781 - "name": { 1782 - "type": "string" 1783 - }, 1784 - "icon": { 1785 - "type": "string" 1786 - }, 1787 - "color": { 1788 - "type": "string" 1789 - }, 1790 - "isFinal": { 1791 - "type": "boolean" 1792 - } 1793 - }, 1794 - "required": [ 1795 - "name" 1796 - ] 1797 - } 1798 - } 1799 - } 1800 - }, 1801 - "summary": "Create Column" 1802 - } 1803 - }, 1804 - "/column/reorder/{projectId}": { 1805 - "put": { 1806 - "operationId": "reorderColumns", 1807 - "tags": [ 1808 - "Columns" 1809 - ], 1810 - "description": "Reorder columns in a project", 1811 - "responses": { 1812 - "200": { 1813 - "description": "Columns reordered successfully", 1814 - "content": { 1815 - "application/json": { 1816 - "schema": {} 1817 - } 1818 - } 1819 - } 1820 - }, 1821 - "parameters": [ 1822 - { 1823 - "in": "path", 1824 - "name": "projectId", 1825 - "schema": { 1826 - "type": "string" 1827 - }, 1828 - "required": true 1829 - } 1830 - ], 1831 - "requestBody": { 1832 - "content": { 1833 - "application/json": { 1834 - "schema": { 1835 - "type": "object", 1836 - "properties": { 1837 - "columns": { 1838 - "type": "array", 1839 - "items": { 1840 - "type": "object", 1841 - "properties": { 1842 - "id": { 1843 - "type": "string" 1844 - }, 1845 - "position": { 1846 - "type": "number" 1847 - } 1848 - }, 1849 - "required": [ 1850 - "id", 1851 - "position" 1852 - ] 1853 - } 1854 - } 1855 - }, 1856 - "required": [ 1857 - "columns" 1858 - ] 1859 - } 1860 - } 1861 - } 1862 - }, 1863 - "summary": "Reorder Columns" 1864 - } 1865 - }, 1866 - "/column/{id}": { 1867 - "put": { 1868 - "operationId": "updateColumn", 1869 - "tags": [ 1870 - "Columns" 1871 - ], 1872 - "description": "Update a column", 1873 - "responses": { 1874 - "200": { 1875 - "description": "Column updated successfully", 1876 - "content": { 1877 - "application/json": { 1878 - "schema": {} 1879 - } 1880 - } 1881 - } 1882 - }, 1883 - "parameters": [ 1884 - { 1885 - "in": "path", 1886 - "name": "id", 1887 - "schema": { 1888 - "type": "string" 1889 - }, 1890 - "required": true 1891 - } 1892 - ], 1893 - "requestBody": { 1894 - "content": { 1895 - "application/json": { 1896 - "schema": { 1897 - "type": "object", 1898 - "properties": { 1899 - "name": { 1900 - "type": "string" 1901 - }, 1902 - "icon": { 1903 - "type": "string", 1904 - "nullable": true 1905 - }, 1906 - "color": { 1907 - "type": "string", 1908 - "nullable": true 1909 - }, 1910 - "isFinal": { 1911 - "type": "boolean" 1912 - } 1913 - } 1914 - } 1915 - } 1916 - } 1917 - }, 1918 - "summary": "Update Column" 1919 - }, 1920 - "delete": { 1921 - "operationId": "deleteColumn", 1922 - "tags": [ 1923 - "Columns" 1924 - ], 1925 - "description": "Delete a column", 1926 - "responses": { 1927 - "200": { 1928 - "description": "Column deleted successfully", 1929 - "content": { 1930 - "application/json": { 1931 - "schema": {} 1932 - } 1933 - } 1934 - } 1935 - }, 1936 - "parameters": [ 1937 - { 1938 - "in": "path", 1939 - "name": "id", 1940 - "schema": { 1941 - "type": "string" 1942 - }, 1943 - "required": true 1944 - } 1945 - ], 1946 - "summary": "Delete Column" 1947 - } 1948 - }, 1949 - "/activity/{taskId}": { 1950 - "get": { 1951 - "operationId": "getActivities", 1952 - "tags": [ 1953 - "Activity" 1954 - ], 1955 - "description": "Get all activities for a specific task", 1956 - "responses": { 1957 - "200": { 1958 - "description": "List of activities for the task", 1959 - "content": { 1960 - "application/json": { 1961 - "schema": { 1962 - "type": "array", 1963 - "items": { 1964 - "type": "object", 1965 - "properties": { 1966 - "id": { 1967 - "type": "string" 1968 - }, 1969 - "taskId": { 1970 - "type": "string" 1971 - }, 1972 - "type": { 1973 - "enum": [ 1974 - "comment", 1975 - "task", 1976 - "status_changed", 1977 - "priority_changed", 1978 - "unassigned", 1979 - "assignee_changed", 1980 - "due_date_changed", 1981 - "title_changed", 1982 - "description_changed", 1983 - "create" 1984 - ] 1985 - }, 1986 - "createdAt": {}, 1987 - "userId": { 1988 - "type": "string", 1989 - "nullable": true 1990 - }, 1991 - "content": { 1992 - "type": "string", 1993 - "nullable": true 1994 - }, 1995 - "externalUserName": { 1996 - "type": "string", 1997 - "nullable": true 1998 - }, 1999 - "externalUserAvatar": { 2000 - "type": "string", 2001 - "nullable": true 2002 - }, 2003 - "externalSource": { 2004 - "type": "string", 2005 - "nullable": true 2006 - }, 2007 - "externalUrl": { 2008 - "type": "string", 2009 - "nullable": true 2010 - } 2011 - }, 2012 - "required": [ 2013 - "id", 2014 - "taskId", 2015 - "type", 2016 - "createdAt", 2017 - "userId", 2018 - "content", 2019 - "externalUserName", 2020 - "externalUserAvatar", 2021 - "externalSource", 2022 - "externalUrl" 2023 - ] 2024 - } 2025 - } 2026 - } 2027 - } 2028 - } 2029 - }, 2030 - "parameters": [ 2031 - { 2032 - "in": "path", 2033 - "name": "taskId", 2034 - "schema": { 2035 - "type": "string" 2036 - }, 2037 - "required": true 2038 - } 2039 - ], 2040 - "summary": "Get Activities" 2041 - } 2042 - }, 2043 - "/activity/create": { 2044 - "post": { 2045 - "operationId": "createActivity", 2046 - "tags": [ 2047 - "Activity" 2048 - ], 2049 - "description": "Create a new activity (system-generated event)", 2050 - "responses": { 2051 - "200": { 2052 - "description": "Activity created successfully", 2053 - "content": { 2054 - "application/json": { 2055 - "schema": { 2056 - "type": "object", 2057 - "properties": { 2058 - "id": { 2059 - "type": "string" 2060 - }, 2061 - "taskId": { 2062 - "type": "string" 2063 - }, 2064 - "type": { 2065 - "enum": [ 2066 - "comment", 2067 - "task", 2068 - "status_changed", 2069 - "priority_changed", 2070 - "unassigned", 2071 - "assignee_changed", 2072 - "due_date_changed", 2073 - "title_changed", 2074 - "description_changed", 2075 - "create" 2076 - ] 2077 - }, 2078 - "createdAt": {}, 2079 - "userId": { 2080 - "type": "string", 2081 - "nullable": true 2082 - }, 2083 - "content": { 2084 - "type": "string", 2085 - "nullable": true 2086 - }, 2087 - "externalUserName": { 2088 - "type": "string", 2089 - "nullable": true 2090 - }, 2091 - "externalUserAvatar": { 2092 - "type": "string", 2093 - "nullable": true 2094 - }, 2095 - "externalSource": { 2096 - "type": "string", 2097 - "nullable": true 2098 - }, 2099 - "externalUrl": { 2100 - "type": "string", 2101 - "nullable": true 2102 - } 2103 - }, 2104 - "required": [ 2105 - "id", 2106 - "taskId", 2107 - "type", 2108 - "createdAt", 2109 - "userId", 2110 - "content", 2111 - "externalUserName", 2112 - "externalUserAvatar", 2113 - "externalSource", 2114 - "externalUrl" 2115 - ] 2116 - } 2117 - } 2118 - } 2119 - } 2120 - }, 2121 - "requestBody": { 2122 - "content": { 2123 - "application/json": { 2124 - "schema": { 2125 - "type": "object", 2126 - "properties": { 2127 - "taskId": { 2128 - "type": "string" 2129 - }, 2130 - "userId": { 2131 - "type": "string" 2132 - }, 2133 - "message": { 2134 - "type": "string" 2135 - }, 2136 - "type": { 2137 - "type": "string" 2138 - } 2139 - }, 2140 - "required": [ 2141 - "taskId", 2142 - "userId", 2143 - "message", 2144 - "type" 2145 - ] 2146 - } 2147 - } 2148 - } 2149 - }, 2150 - "summary": "Create Activity" 2151 - } 2152 - }, 2153 - "/activity/comment": { 2154 - "post": { 2155 - "operationId": "createComment", 2156 - "tags": [ 2157 - "Activity" 2158 - ], 2159 - "description": "Create a new comment on a task", 2160 - "responses": { 2161 - "200": { 2162 - "description": "Comment created successfully", 2163 - "content": { 2164 - "application/json": { 2165 - "schema": { 2166 - "type": "object", 2167 - "properties": { 2168 - "id": { 2169 - "type": "string" 2170 - }, 2171 - "taskId": { 2172 - "type": "string" 2173 - }, 2174 - "type": { 2175 - "enum": [ 2176 - "comment", 2177 - "task", 2178 - "status_changed", 2179 - "priority_changed", 2180 - "unassigned", 2181 - "assignee_changed", 2182 - "due_date_changed", 2183 - "title_changed", 2184 - "description_changed", 2185 - "create" 2186 - ] 2187 - }, 2188 - "createdAt": {}, 2189 - "userId": { 2190 - "type": "string", 2191 - "nullable": true 2192 - }, 2193 - "content": { 2194 - "type": "string", 2195 - "nullable": true 2196 - }, 2197 - "externalUserName": { 2198 - "type": "string", 2199 - "nullable": true 2200 - }, 2201 - "externalUserAvatar": { 2202 - "type": "string", 2203 - "nullable": true 2204 - }, 2205 - "externalSource": { 2206 - "type": "string", 2207 - "nullable": true 2208 - }, 2209 - "externalUrl": { 2210 - "type": "string", 2211 - "nullable": true 2212 - } 2213 - }, 2214 - "required": [ 2215 - "id", 2216 - "taskId", 2217 - "type", 2218 - "createdAt", 2219 - "userId", 2220 - "content", 2221 - "externalUserName", 2222 - "externalUserAvatar", 2223 - "externalSource", 2224 - "externalUrl" 2225 - ] 2226 - } 2227 - } 2228 - } 2229 - } 2230 - }, 2231 - "requestBody": { 2232 - "content": { 2233 - "application/json": { 2234 - "schema": { 2235 - "type": "object", 2236 - "properties": { 2237 - "taskId": { 2238 - "type": "string" 2239 - }, 2240 - "comment": { 2241 - "type": "string" 2242 - } 2243 - }, 2244 - "required": [ 2245 - "taskId", 2246 - "comment" 2247 - ] 2248 - } 2249 - } 2250 - } 2251 - }, 2252 - "summary": "Create Comment" 2253 - }, 2254 - "put": { 2255 - "operationId": "updateComment", 2256 - "tags": [ 2257 - "Activity" 2258 - ], 2259 - "description": "Update an existing comment", 2260 - "responses": { 2261 - "200": { 2262 - "description": "Comment updated successfully", 2263 - "content": { 2264 - "application/json": { 2265 - "schema": { 2266 - "type": "object", 2267 - "properties": { 2268 - "id": { 2269 - "type": "string" 2270 - }, 2271 - "taskId": { 2272 - "type": "string" 2273 - }, 2274 - "type": { 2275 - "enum": [ 2276 - "comment", 2277 - "task", 2278 - "status_changed", 2279 - "priority_changed", 2280 - "unassigned", 2281 - "assignee_changed", 2282 - "due_date_changed", 2283 - "title_changed", 2284 - "description_changed", 2285 - "create" 2286 - ] 2287 - }, 2288 - "createdAt": {}, 2289 - "userId": { 2290 - "type": "string", 2291 - "nullable": true 2292 - }, 2293 - "content": { 2294 - "type": "string", 2295 - "nullable": true 2296 - }, 2297 - "externalUserName": { 2298 - "type": "string", 2299 - "nullable": true 2300 - }, 2301 - "externalUserAvatar": { 2302 - "type": "string", 2303 - "nullable": true 2304 - }, 2305 - "externalSource": { 2306 - "type": "string", 2307 - "nullable": true 2308 - }, 2309 - "externalUrl": { 2310 - "type": "string", 2311 - "nullable": true 2312 - } 2313 - }, 2314 - "required": [ 2315 - "id", 2316 - "taskId", 2317 - "type", 2318 - "createdAt", 2319 - "userId", 2320 - "content", 2321 - "externalUserName", 2322 - "externalUserAvatar", 2323 - "externalSource", 2324 - "externalUrl" 2325 - ] 2326 - } 2327 - } 2328 - } 2329 - } 2330 - }, 2331 - "requestBody": { 2332 - "content": { 2333 - "application/json": { 2334 - "schema": { 2335 - "type": "object", 2336 - "properties": { 2337 - "activityId": { 2338 - "type": "string" 2339 - }, 2340 - "comment": { 2341 - "type": "string" 2342 - } 2343 - }, 2344 - "required": [ 2345 - "activityId", 2346 - "comment" 2347 - ] 2348 - } 2349 - } 2350 - } 2351 - }, 2352 - "summary": "Update Comment" 2353 - }, 2354 - "delete": { 2355 - "operationId": "deleteComment", 2356 - "tags": [ 2357 - "Activity" 2358 - ], 2359 - "description": "Delete a comment", 2360 - "responses": { 2361 - "200": { 2362 - "description": "Comment deleted successfully", 2363 - "content": { 2364 - "application/json": { 2365 - "schema": { 2366 - "type": "object", 2367 - "properties": { 2368 - "id": { 2369 - "type": "string" 2370 - }, 2371 - "taskId": { 2372 - "type": "string" 2373 - }, 2374 - "type": { 2375 - "enum": [ 2376 - "comment", 2377 - "task", 2378 - "status_changed", 2379 - "priority_changed", 2380 - "unassigned", 2381 - "assignee_changed", 2382 - "due_date_changed", 2383 - "title_changed", 2384 - "description_changed", 2385 - "create" 2386 - ] 2387 - }, 2388 - "createdAt": {}, 2389 - "userId": { 2390 - "type": "string", 2391 - "nullable": true 2392 - }, 2393 - "content": { 2394 - "type": "string", 2395 - "nullable": true 2396 - }, 2397 - "externalUserName": { 2398 - "type": "string", 2399 - "nullable": true 2400 - }, 2401 - "externalUserAvatar": { 2402 - "type": "string", 2403 - "nullable": true 2404 - }, 2405 - "externalSource": { 2406 - "type": "string", 2407 - "nullable": true 2408 - }, 2409 - "externalUrl": { 2410 - "type": "string", 2411 - "nullable": true 2412 - } 2413 - }, 2414 - "required": [ 2415 - "id", 2416 - "taskId", 2417 - "type", 2418 - "createdAt", 2419 - "userId", 2420 - "content", 2421 - "externalUserName", 2422 - "externalUserAvatar", 2423 - "externalSource", 2424 - "externalUrl" 2425 - ] 2426 - } 2427 - } 2428 - } 2429 - } 2430 - }, 2431 - "requestBody": { 2432 - "content": { 2433 - "application/json": { 2434 - "schema": { 2435 - "type": "object", 2436 - "properties": { 2437 - "activityId": { 2438 - "type": "string" 2439 - } 2440 - }, 2441 - "required": [ 2442 - "activityId" 2443 - ] 2444 - } 2445 - } 2446 - } 2447 - }, 2448 - "summary": "Delete Comment" 2449 - } 2450 - }, 2451 - "/time-entry/task/{taskId}": { 2452 - "get": { 2453 - "operationId": "getTaskTimeEntries", 2454 - "tags": [ 2455 - "Time Entries" 2456 - ], 2457 - "description": "Get all time entries for a specific task", 2458 - "responses": { 2459 - "200": { 2460 - "description": "List of time entries for the task", 2461 - "content": { 2462 - "application/json": { 2463 - "schema": { 2464 - "type": "array", 2465 - "items": { 2466 - "type": "object", 2467 - "properties": { 2468 - "id": { 2469 - "type": "string" 2470 - }, 2471 - "taskId": { 2472 - "type": "string" 2473 - }, 2474 - "userId": { 2475 - "type": "string", 2476 - "nullable": true 2477 - }, 2478 - "description": { 2479 - "type": "string", 2480 - "nullable": true 2481 - }, 2482 - "startTime": {}, 2483 - "endTime": {}, 2484 - "duration": { 2485 - "type": "number", 2486 - "nullable": true 2487 - }, 2488 - "createdAt": {} 2489 - }, 2490 - "required": [ 2491 - "id", 2492 - "taskId", 2493 - "userId", 2494 - "description", 2495 - "startTime", 2496 - "duration", 2497 - "createdAt" 2498 - ] 2499 - } 2500 - } 2501 - } 2502 - } 2503 - } 2504 - }, 2505 - "parameters": [ 2506 - { 2507 - "in": "path", 2508 - "name": "taskId", 2509 - "schema": { 2510 - "type": "string" 2511 - }, 2512 - "required": true 2513 - } 2514 - ], 2515 - "summary": "Get Task Time Entries" 2516 - } 2517 - }, 2518 - "/time-entry/{id}": { 2519 - "get": { 2520 - "operationId": "getTimeEntry", 2521 - "tags": [ 2522 - "Time Entries" 2523 - ], 2524 - "description": "Get a specific time entry by ID", 2525 - "responses": { 2526 - "200": { 2527 - "description": "Time entry details", 2528 - "content": { 2529 - "application/json": { 2530 - "schema": { 2531 - "type": "object", 2532 - "properties": { 2533 - "id": { 2534 - "type": "string" 2535 - }, 2536 - "taskId": { 2537 - "type": "string" 2538 - }, 2539 - "userId": { 2540 - "type": "string", 2541 - "nullable": true 2542 - }, 2543 - "description": { 2544 - "type": "string", 2545 - "nullable": true 2546 - }, 2547 - "startTime": {}, 2548 - "endTime": {}, 2549 - "duration": { 2550 - "type": "number", 2551 - "nullable": true 2552 - }, 2553 - "createdAt": {} 2554 - }, 2555 - "required": [ 2556 - "id", 2557 - "taskId", 2558 - "userId", 2559 - "description", 2560 - "startTime", 2561 - "duration", 2562 - "createdAt" 2563 - ] 2564 - } 2565 - } 2566 - } 2567 - } 2568 - }, 2569 - "parameters": [ 2570 - { 2571 - "in": "path", 2572 - "name": "id", 2573 - "schema": { 2574 - "type": "string" 2575 - }, 2576 - "required": true 2577 - } 2578 - ], 2579 - "summary": "Get Time Entry" 2580 - }, 2581 - "put": { 2582 - "operationId": "updateTimeEntry", 2583 - "tags": [ 2584 - "Time Entries" 2585 - ], 2586 - "description": "Update an existing time entry", 2587 - "responses": { 2588 - "200": { 2589 - "description": "Time entry updated successfully", 2590 - "content": { 2591 - "application/json": { 2592 - "schema": { 2593 - "type": "object", 2594 - "properties": { 2595 - "id": { 2596 - "type": "string" 2597 - }, 2598 - "taskId": { 2599 - "type": "string" 2600 - }, 2601 - "userId": { 2602 - "type": "string", 2603 - "nullable": true 2604 - }, 2605 - "description": { 2606 - "type": "string", 2607 - "nullable": true 2608 - }, 2609 - "startTime": {}, 2610 - "endTime": {}, 2611 - "duration": { 2612 - "type": "number", 2613 - "nullable": true 2614 - }, 2615 - "createdAt": {} 2616 - }, 2617 - "required": [ 2618 - "id", 2619 - "taskId", 2620 - "userId", 2621 - "description", 2622 - "startTime", 2623 - "duration", 2624 - "createdAt" 2625 - ] 2626 - } 2627 - } 2628 - } 2629 - } 2630 - }, 2631 - "parameters": [ 2632 - { 2633 - "in": "path", 2634 - "name": "id", 2635 - "schema": { 2636 - "type": "string" 2637 - }, 2638 - "required": true 2639 - } 2640 - ], 2641 - "requestBody": { 2642 - "content": { 2643 - "application/json": { 2644 - "schema": { 2645 - "type": "object", 2646 - "properties": { 2647 - "startTime": { 2648 - "type": "string" 2649 - }, 2650 - "endTime": { 2651 - "type": "string" 2652 - }, 2653 - "description": { 2654 - "type": "string" 2655 - } 2656 - }, 2657 - "required": [ 2658 - "startTime" 2659 - ] 2660 - } 2661 - } 2662 - } 2663 - }, 2664 - "summary": "Update Time Entry" 2665 - } 2666 - }, 2667 - "/time-entry": { 2668 - "post": { 2669 - "operationId": "createTimeEntry", 2670 - "tags": [ 2671 - "Time Entries" 2672 - ], 2673 - "description": "Create a new time entry for a task", 2674 - "responses": { 2675 - "200": { 2676 - "description": "Time entry created successfully", 2677 - "content": { 2678 - "application/json": { 2679 - "schema": { 2680 - "type": "object", 2681 - "properties": { 2682 - "id": { 2683 - "type": "string" 2684 - }, 2685 - "taskId": { 2686 - "type": "string" 2687 - }, 2688 - "userId": { 2689 - "type": "string", 2690 - "nullable": true 2691 - }, 2692 - "description": { 2693 - "type": "string", 2694 - "nullable": true 2695 - }, 2696 - "startTime": {}, 2697 - "endTime": {}, 2698 - "duration": { 2699 - "type": "number", 2700 - "nullable": true 2701 - }, 2702 - "createdAt": {} 2703 - }, 2704 - "required": [ 2705 - "id", 2706 - "taskId", 2707 - "userId", 2708 - "description", 2709 - "startTime", 2710 - "duration", 2711 - "createdAt" 2712 - ] 2713 - } 2714 - } 2715 - } 2716 - } 2717 - }, 2718 - "requestBody": { 2719 - "content": { 2720 - "application/json": { 2721 - "schema": { 2722 - "type": "object", 2723 - "properties": { 2724 - "taskId": { 2725 - "type": "string" 2726 - }, 2727 - "startTime": { 2728 - "type": "string" 2729 - }, 2730 - "endTime": { 2731 - "type": "string" 2732 - }, 2733 - "description": { 2734 - "type": "string" 2735 - } 2736 - }, 2737 - "required": [ 2738 - "taskId", 2739 - "startTime" 2740 - ] 2741 - } 2742 - } 2743 - } 2744 - }, 2745 - "summary": "Create Time Entry" 2746 - } 2747 - }, 2748 - "/label/task/{taskId}": { 2749 - "get": { 2750 - "operationId": "getTaskLabels", 2751 - "tags": [ 2752 - "Labels" 2753 - ], 2754 - "description": "Get all labels assigned to a specific task", 2755 - "responses": { 2756 - "200": { 2757 - "description": "List of labels for the task", 2758 - "content": { 2759 - "application/json": { 2760 - "schema": { 2761 - "type": "array", 2762 - "items": { 2763 - "type": "object", 2764 - "properties": { 2765 - "id": { 2766 - "type": "string" 2767 - }, 2768 - "name": { 2769 - "type": "string" 2770 - }, 2771 - "color": { 2772 - "type": "string" 2773 - }, 2774 - "createdAt": {}, 2775 - "taskId": { 2776 - "type": "string", 2777 - "nullable": true 2778 - }, 2779 - "workspaceId": { 2780 - "type": "string", 2781 - "nullable": true 2782 - } 2783 - }, 2784 - "required": [ 2785 - "id", 2786 - "name", 2787 - "color", 2788 - "createdAt", 2789 - "taskId", 2790 - "workspaceId" 2791 - ] 2792 - } 2793 - } 2794 - } 2795 - } 2796 - } 2797 - }, 2798 - "parameters": [ 2799 - { 2800 - "in": "path", 2801 - "name": "taskId", 2802 - "schema": { 2803 - "type": "string" 2804 - }, 2805 - "required": true 2806 - } 2807 - ], 2808 - "summary": "Get Task Labels" 2809 - } 2810 - }, 2811 - "/label/workspace/{workspaceId}": { 2812 - "get": { 2813 - "operationId": "getWorkspaceLabels", 2814 - "tags": [ 2815 - "Labels" 2816 - ], 2817 - "description": "Get all labels for a specific workspace", 2818 - "responses": { 2819 - "200": { 2820 - "description": "List of labels in the workspace", 2821 - "content": { 2822 - "application/json": { 2823 - "schema": { 2824 - "type": "array", 2825 - "items": { 2826 - "type": "object", 2827 - "properties": { 2828 - "id": { 2829 - "type": "string" 2830 - }, 2831 - "name": { 2832 - "type": "string" 2833 - }, 2834 - "color": { 2835 - "type": "string" 2836 - }, 2837 - "createdAt": {}, 2838 - "taskId": { 2839 - "type": "string", 2840 - "nullable": true 2841 - }, 2842 - "workspaceId": { 2843 - "type": "string", 2844 - "nullable": true 2845 - } 2846 - }, 2847 - "required": [ 2848 - "id", 2849 - "name", 2850 - "color", 2851 - "createdAt", 2852 - "taskId", 2853 - "workspaceId" 2854 - ] 2855 - } 2856 - } 2857 - } 2858 - } 2859 - } 2860 - }, 2861 - "parameters": [ 2862 - { 2863 - "in": "path", 2864 - "name": "workspaceId", 2865 - "schema": { 2866 - "type": "string" 2867 - }, 2868 - "required": true 2869 - } 2870 - ], 2871 - "summary": "Get Workspace Labels" 2872 - } 2873 - }, 2874 - "/label": { 2875 - "post": { 2876 - "operationId": "createLabel", 2877 - "tags": [ 2878 - "Labels" 2879 - ], 2880 - "description": "Create a new label in a workspace", 2881 - "responses": { 2882 - "200": { 2883 - "description": "Label created successfully", 2884 - "content": { 2885 - "application/json": { 2886 - "schema": { 2887 - "type": "object", 2888 - "properties": { 2889 - "id": { 2890 - "type": "string" 2891 - }, 2892 - "name": { 2893 - "type": "string" 2894 - }, 2895 - "color": { 2896 - "type": "string" 2897 - }, 2898 - "createdAt": {}, 2899 - "taskId": { 2900 - "type": "string", 2901 - "nullable": true 2902 - }, 2903 - "workspaceId": { 2904 - "type": "string", 2905 - "nullable": true 2906 - } 2907 - }, 2908 - "required": [ 2909 - "id", 2910 - "name", 2911 - "color", 2912 - "createdAt", 2913 - "taskId", 2914 - "workspaceId" 2915 - ] 2916 - } 2917 - } 2918 - } 2919 - } 2920 - }, 2921 - "requestBody": { 2922 - "content": { 2923 - "application/json": { 2924 - "schema": { 2925 - "type": "object", 2926 - "properties": { 2927 - "name": { 2928 - "type": "string" 2929 - }, 2930 - "color": { 2931 - "type": "string" 2932 - }, 2933 - "workspaceId": { 2934 - "type": "string" 2935 - }, 2936 - "taskId": { 2937 - "type": "string" 2938 - } 2939 - }, 2940 - "required": [ 2941 - "name", 2942 - "color", 2943 - "workspaceId" 2944 - ] 2945 - } 2946 - } 2947 - } 2948 - }, 2949 - "summary": "Create Label" 2950 - } 2951 - }, 2952 - "/label/{id}": { 2953 - "get": { 2954 - "operationId": "getLabel", 2955 - "tags": [ 2956 - "Labels" 2957 - ], 2958 - "description": "Get a specific label by ID", 2959 - "responses": { 2960 - "200": { 2961 - "description": "Label details", 2962 - "content": { 2963 - "application/json": { 2964 - "schema": { 2965 - "type": "object", 2966 - "properties": { 2967 - "id": { 2968 - "type": "string" 2969 - }, 2970 - "name": { 2971 - "type": "string" 2972 - }, 2973 - "color": { 2974 - "type": "string" 2975 - }, 2976 - "createdAt": {}, 2977 - "taskId": { 2978 - "type": "string", 2979 - "nullable": true 2980 - }, 2981 - "workspaceId": { 2982 - "type": "string", 2983 - "nullable": true 2984 - } 2985 - }, 2986 - "required": [ 2987 - "id", 2988 - "name", 2989 - "color", 2990 - "createdAt", 2991 - "taskId", 2992 - "workspaceId" 2993 - ] 2994 - } 2995 - } 2996 - } 2997 - } 2998 - }, 2999 - "parameters": [ 3000 - { 3001 - "in": "path", 3002 - "name": "id", 3003 - "schema": { 3004 - "type": "string" 3005 - }, 3006 - "required": true 3007 - } 3008 - ], 3009 - "summary": "Get Label" 3010 - }, 3011 - "put": { 3012 - "operationId": "updateLabel", 3013 - "tags": [ 3014 - "Labels" 3015 - ], 3016 - "description": "Update an existing label", 3017 - "responses": { 3018 - "200": { 3019 - "description": "Label updated successfully", 3020 - "content": { 3021 - "application/json": { 3022 - "schema": { 3023 - "type": "object", 3024 - "properties": { 3025 - "id": { 3026 - "type": "string" 3027 - }, 3028 - "name": { 3029 - "type": "string" 3030 - }, 3031 - "color": { 3032 - "type": "string" 3033 - }, 3034 - "createdAt": {}, 3035 - "taskId": { 3036 - "type": "string", 3037 - "nullable": true 3038 - }, 3039 - "workspaceId": { 3040 - "type": "string", 3041 - "nullable": true 3042 - } 3043 - }, 3044 - "required": [ 3045 - "id", 3046 - "name", 3047 - "color", 3048 - "createdAt", 3049 - "taskId", 3050 - "workspaceId" 3051 - ] 3052 - } 3053 - } 3054 - } 3055 - } 3056 - }, 3057 - "parameters": [ 3058 - { 3059 - "in": "path", 3060 - "name": "id", 3061 - "schema": { 3062 - "type": "string" 3063 - }, 3064 - "required": true 3065 - } 3066 - ], 3067 - "requestBody": { 3068 - "content": { 3069 - "application/json": { 3070 - "schema": { 3071 - "type": "object", 3072 - "properties": { 3073 - "name": { 3074 - "type": "string" 3075 - }, 3076 - "color": { 3077 - "type": "string" 3078 - } 3079 - }, 3080 - "required": [ 3081 - "name", 3082 - "color" 3083 - ] 3084 - } 3085 - } 3086 - } 3087 - }, 3088 - "summary": "Update Label" 3089 - }, 3090 - "delete": { 3091 - "operationId": "deleteLabel", 3092 - "tags": [ 3093 - "Labels" 3094 - ], 3095 - "description": "Delete a label by ID", 3096 - "responses": { 3097 - "200": { 3098 - "description": "Label deleted successfully", 3099 - "content": { 3100 - "application/json": { 3101 - "schema": { 3102 - "type": "object", 3103 - "properties": { 3104 - "id": { 3105 - "type": "string" 3106 - }, 3107 - "name": { 3108 - "type": "string" 3109 - }, 3110 - "color": { 3111 - "type": "string" 3112 - }, 3113 - "createdAt": {}, 3114 - "taskId": { 3115 - "type": "string", 3116 - "nullable": true 3117 - }, 3118 - "workspaceId": { 3119 - "type": "string", 3120 - "nullable": true 3121 - } 3122 - }, 3123 - "required": [ 3124 - "id", 3125 - "name", 3126 - "color", 3127 - "createdAt", 3128 - "taskId", 3129 - "workspaceId" 3130 - ] 3131 - } 3132 - } 3133 - } 3134 - } 3135 - }, 3136 - "parameters": [ 3137 - { 3138 - "in": "path", 3139 - "name": "id", 3140 - "schema": { 3141 - "type": "string" 3142 - }, 3143 - "required": true 3144 - } 3145 - ], 3146 - "summary": "Delete Label" 3147 - } 3148 - }, 3149 - "/notification": { 3150 - "get": { 3151 - "operationId": "listNotifications", 3152 - "tags": [ 3153 - "Notifications" 3154 - ], 3155 - "description": "Get all notifications for the current user", 3156 - "responses": { 3157 - "200": { 3158 - "description": "List of notifications", 3159 - "content": { 3160 - "application/json": { 3161 - "schema": { 3162 - "type": "array", 3163 - "items": { 3164 - "type": "object", 3165 - "properties": { 3166 - "id": { 3167 - "type": "string" 3168 - }, 3169 - "userId": { 3170 - "type": "string" 3171 - }, 3172 - "title": { 3173 - "type": "string" 3174 - }, 3175 - "content": { 3176 - "type": "string", 3177 - "nullable": true 3178 - }, 3179 - "type": { 3180 - "enum": [ 3181 - "info", 3182 - "task_created", 3183 - "workspace_created", 3184 - "task_status_changed", 3185 - "task_assignee_changed", 3186 - "time_entry_created" 3187 - ] 3188 - }, 3189 - "isRead": { 3190 - "type": "boolean" 3191 - }, 3192 - "resourceId": { 3193 - "type": "string" 3194 - }, 3195 - "resourceType": { 3196 - "enum": [ 3197 - "task", 3198 - "workspace" 3199 - ] 3200 - }, 3201 - "createdAt": {} 3202 - }, 3203 - "required": [ 3204 - "id", 3205 - "userId", 3206 - "title", 3207 - "content", 3208 - "type", 3209 - "createdAt" 3210 - ] 3211 - } 3212 - } 3213 - } 3214 - } 3215 - } 3216 - }, 3217 - "summary": "List Notifications" 3218 - }, 3219 - "post": { 3220 - "operationId": "createNotification", 3221 - "tags": [ 3222 - "Notifications" 3223 - ], 3224 - "description": "Create a new notification for a user", 3225 - "responses": { 3226 - "200": { 3227 - "description": "Notification created successfully", 3228 - "content": { 3229 - "application/json": { 3230 - "schema": { 3231 - "type": "object", 3232 - "properties": { 3233 - "id": { 3234 - "type": "string" 3235 - }, 3236 - "userId": { 3237 - "type": "string" 3238 - }, 3239 - "title": { 3240 - "type": "string" 3241 - }, 3242 - "content": { 3243 - "type": "string", 3244 - "nullable": true 3245 - }, 3246 - "type": { 3247 - "enum": [ 3248 - "info", 3249 - "task_created", 3250 - "workspace_created", 3251 - "task_status_changed", 3252 - "task_assignee_changed", 3253 - "time_entry_created" 3254 - ] 3255 - }, 3256 - "isRead": { 3257 - "type": "boolean" 3258 - }, 3259 - "resourceId": { 3260 - "type": "string" 3261 - }, 3262 - "resourceType": { 3263 - "enum": [ 3264 - "task", 3265 - "workspace" 3266 - ] 3267 - }, 3268 - "createdAt": {} 3269 - }, 3270 - "required": [ 3271 - "id", 3272 - "userId", 3273 - "title", 3274 - "content", 3275 - "type", 3276 - "createdAt" 3277 - ] 3278 - } 3279 - } 3280 - } 3281 - } 3282 - }, 3283 - "requestBody": { 3284 - "content": { 3285 - "application/json": { 3286 - "schema": { 3287 - "type": "object", 3288 - "properties": { 3289 - "userId": { 3290 - "type": "string" 3291 - }, 3292 - "title": { 3293 - "type": "string" 3294 - }, 3295 - "message": { 3296 - "type": "string" 3297 - }, 3298 - "type": { 3299 - "type": "string" 3300 - }, 3301 - "relatedEntityId": { 3302 - "type": "string" 3303 - }, 3304 - "relatedEntityType": { 3305 - "type": "string" 3306 - } 3307 - }, 3308 - "required": [ 3309 - "userId", 3310 - "title", 3311 - "message", 3312 - "type" 3313 - ] 3314 - } 3315 - } 3316 - } 3317 - }, 3318 - "summary": "Create Notification" 3319 - } 3320 - }, 3321 - "/notification/{id}/read": { 3322 - "patch": { 3323 - "operationId": "markNotificationAsRead", 3324 - "tags": [ 3325 - "Notifications" 3326 - ], 3327 - "description": "Mark a specific notification as read", 3328 - "responses": { 3329 - "200": { 3330 - "description": "Notification marked as read", 3331 - "content": { 3332 - "application/json": { 3333 - "schema": { 3334 - "type": "object", 3335 - "properties": { 3336 - "id": { 3337 - "type": "string" 3338 - }, 3339 - "userId": { 3340 - "type": "string" 3341 - }, 3342 - "title": { 3343 - "type": "string" 3344 - }, 3345 - "content": { 3346 - "type": "string", 3347 - "nullable": true 3348 - }, 3349 - "type": { 3350 - "enum": [ 3351 - "info", 3352 - "task_created", 3353 - "workspace_created", 3354 - "task_status_changed", 3355 - "task_assignee_changed", 3356 - "time_entry_created" 3357 - ] 3358 - }, 3359 - "isRead": { 3360 - "type": "boolean" 3361 - }, 3362 - "resourceId": { 3363 - "type": "string" 3364 - }, 3365 - "resourceType": { 3366 - "enum": [ 3367 - "task", 3368 - "workspace" 3369 - ] 3370 - }, 3371 - "createdAt": {} 3372 - }, 3373 - "required": [ 3374 - "id", 3375 - "userId", 3376 - "title", 3377 - "content", 3378 - "type", 3379 - "createdAt" 3380 - ] 3381 - } 3382 - } 3383 - } 3384 - } 3385 - }, 3386 - "parameters": [ 3387 - { 3388 - "in": "path", 3389 - "name": "id", 3390 - "schema": { 3391 - "type": "string" 3392 - }, 3393 - "required": true 3394 - } 3395 - ], 3396 - "summary": "Mark Notification As Read" 3397 - } 3398 - }, 3399 - "/notification/read-all": { 3400 - "patch": { 3401 - "operationId": "markAllNotificationsAsRead", 3402 - "tags": [ 3403 - "Notifications" 3404 - ], 3405 - "description": "Mark all notifications as read for the current user", 3406 - "responses": { 3407 - "200": { 3408 - "description": "All notifications marked as read", 3409 - "content": { 3410 - "application/json": { 3411 - "schema": { 3412 - "type": "object", 3413 - "properties": { 3414 - "success": { 3415 - "type": "boolean" 3416 - }, 3417 - "count": { 3418 - "type": "number" 3419 - } 3420 - }, 3421 - "required": [ 3422 - "success" 3423 - ] 3424 - } 3425 - } 3426 - } 3427 - } 3428 - }, 3429 - "summary": "Mark All Notifications As Read" 3430 - } 3431 - }, 3432 - "/notification/clear-all": { 3433 - "delete": { 3434 - "operationId": "clearAllNotifications", 3435 - "tags": [ 3436 - "Notifications" 3437 - ], 3438 - "description": "Clear all notifications for the current user", 3439 - "responses": { 3440 - "200": { 3441 - "description": "All notifications cleared", 3442 - "content": { 3443 - "application/json": { 3444 - "schema": { 3445 - "type": "object", 3446 - "properties": { 3447 - "success": { 3448 - "type": "boolean" 3449 - }, 3450 - "count": { 3451 - "type": "number" 3452 - } 3453 - }, 3454 - "required": [ 3455 - "success" 3456 - ] 3457 - } 3458 - } 3459 - } 3460 - } 3461 - }, 3462 - "summary": "Clear All Notifications" 3463 - } 3464 - }, 3465 - "/search": { 3466 - "get": { 3467 - "operationId": "globalSearch", 3468 - "tags": [ 3469 - "Search" 3470 - ], 3471 - "description": "Search across tasks, projects, workspaces, comments, and activities", 3472 - "responses": { 3473 - "200": { 3474 - "description": "Search results", 3475 - "content": { 3476 - "application/json": { 3477 - "schema": { 3478 - "type": "object", 3479 - "properties": { 3480 - "tasks": { 3481 - "type": "array", 3482 - "items": { 3483 - "type": "object", 3484 - "properties": { 3485 - "id": { 3486 - "type": "string" 3487 - }, 3488 - "projectId": { 3489 - "type": "string" 3490 - }, 3491 - "position": { 3492 - "type": "number", 3493 - "nullable": true 3494 - }, 3495 - "number": { 3496 - "type": "number", 3497 - "nullable": true 3498 - }, 3499 - "userId": { 3500 - "type": "string", 3501 - "nullable": true 3502 - }, 3503 - "title": { 3504 - "type": "string" 3505 - }, 3506 - "description": { 3507 - "type": "string", 3508 - "nullable": true 3509 - }, 3510 - "status": { 3511 - "type": "string" 3512 - }, 3513 - "priority": { 3514 - "enum": [ 3515 - "no-priority", 3516 - "low", 3517 - "medium", 3518 - "high", 3519 - "urgent" 3520 - ] 3521 - }, 3522 - "dueDate": {}, 3523 - "createdAt": {} 3524 - }, 3525 - "required": [ 3526 - "id", 3527 - "projectId", 3528 - "position", 3529 - "number", 3530 - "userId", 3531 - "title", 3532 - "description", 3533 - "status", 3534 - "priority", 3535 - "createdAt" 3536 - ] 3537 - } 3538 - }, 3539 - "projects": { 3540 - "type": "array", 3541 - "items": { 3542 - "type": "object", 3543 - "properties": { 3544 - "id": { 3545 - "type": "string" 3546 - }, 3547 - "workspaceId": { 3548 - "type": "string" 3549 - }, 3550 - "slug": { 3551 - "type": "string" 3552 - }, 3553 - "icon": { 3554 - "type": "string", 3555 - "nullable": true 3556 - }, 3557 - "name": { 3558 - "type": "string" 3559 - }, 3560 - "description": { 3561 - "type": "string", 3562 - "nullable": true 3563 - }, 3564 - "createdAt": {}, 3565 - "isPublic": { 3566 - "type": "boolean", 3567 - "nullable": true 3568 - } 3569 - }, 3570 - "required": [ 3571 - "id", 3572 - "workspaceId", 3573 - "slug", 3574 - "icon", 3575 - "name", 3576 - "description", 3577 - "createdAt", 3578 - "isPublic" 3579 - ] 3580 - } 3581 - }, 3582 - "workspaces": { 3583 - "type": "array", 3584 - "items": { 3585 - "type": "object", 3586 - "properties": { 3587 - "id": { 3588 - "type": "string" 3589 - }, 3590 - "name": { 3591 - "type": "string" 3592 - }, 3593 - "slug": { 3594 - "type": "string" 3595 - }, 3596 - "logo": { 3597 - "type": "string", 3598 - "nullable": true 3599 - }, 3600 - "metadata": { 3601 - "type": "string", 3602 - "nullable": true 3603 - }, 3604 - "description": { 3605 - "type": "string", 3606 - "nullable": true 3607 - }, 3608 - "createdAt": {} 3609 - }, 3610 - "required": [ 3611 - "id", 3612 - "name", 3613 - "slug", 3614 - "logo", 3615 - "metadata", 3616 - "description", 3617 - "createdAt" 3618 - ] 3619 - } 3620 - }, 3621 - "comments": { 3622 - "type": "array", 3623 - "items": { 3624 - "type": "object", 3625 - "properties": { 3626 - "id": { 3627 - "type": "string" 3628 - }, 3629 - "taskId": { 3630 - "type": "string" 3631 - }, 3632 - "type": { 3633 - "enum": [ 3634 - "comment", 3635 - "task", 3636 - "status_changed", 3637 - "priority_changed", 3638 - "unassigned", 3639 - "assignee_changed", 3640 - "due_date_changed", 3641 - "title_changed", 3642 - "description_changed", 3643 - "create" 3644 - ] 3645 - }, 3646 - "createdAt": {}, 3647 - "userId": { 3648 - "type": "string", 3649 - "nullable": true 3650 - }, 3651 - "content": { 3652 - "type": "string", 3653 - "nullable": true 3654 - }, 3655 - "externalUserName": { 3656 - "type": "string", 3657 - "nullable": true 3658 - }, 3659 - "externalUserAvatar": { 3660 - "type": "string", 3661 - "nullable": true 3662 - }, 3663 - "externalSource": { 3664 - "type": "string", 3665 - "nullable": true 3666 - }, 3667 - "externalUrl": { 3668 - "type": "string", 3669 - "nullable": true 3670 - } 3671 - }, 3672 - "required": [ 3673 - "id", 3674 - "taskId", 3675 - "type", 3676 - "createdAt", 3677 - "userId", 3678 - "content", 3679 - "externalUserName", 3680 - "externalUserAvatar", 3681 - "externalSource", 3682 - "externalUrl" 3683 - ] 3684 - } 3685 - }, 3686 - "activities": { 3687 - "type": "array", 3688 - "items": { 3689 - "type": "object", 3690 - "properties": { 3691 - "id": { 3692 - "type": "string" 3693 - }, 3694 - "taskId": { 3695 - "type": "string" 3696 - }, 3697 - "type": { 3698 - "enum": [ 3699 - "comment", 3700 - "task", 3701 - "status_changed", 3702 - "priority_changed", 3703 - "unassigned", 3704 - "assignee_changed", 3705 - "due_date_changed", 3706 - "title_changed", 3707 - "description_changed", 3708 - "create" 3709 - ] 3710 - }, 3711 - "createdAt": {}, 3712 - "userId": { 3713 - "type": "string", 3714 - "nullable": true 3715 - }, 3716 - "content": { 3717 - "type": "string", 3718 - "nullable": true 3719 - }, 3720 - "externalUserName": { 3721 - "type": "string", 3722 - "nullable": true 3723 - }, 3724 - "externalUserAvatar": { 3725 - "type": "string", 3726 - "nullable": true 3727 - }, 3728 - "externalSource": { 3729 - "type": "string", 3730 - "nullable": true 3731 - }, 3732 - "externalUrl": { 3733 - "type": "string", 3734 - "nullable": true 3735 - } 3736 - }, 3737 - "required": [ 3738 - "id", 3739 - "taskId", 3740 - "type", 3741 - "createdAt", 3742 - "userId", 3743 - "content", 3744 - "externalUserName", 3745 - "externalUserAvatar", 3746 - "externalSource", 3747 - "externalUrl" 3748 - ] 3749 - } 3750 - } 3751 - } 3752 - } 3753 - } 3754 - } 3755 - } 3756 - }, 3757 - "parameters": [ 3758 - { 3759 - "in": "query", 3760 - "name": "q", 3761 - "schema": { 3762 - "type": "string", 3763 - "minLength": 1 3764 - }, 3765 - "required": true 3766 - }, 3767 - { 3768 - "in": "query", 3769 - "name": "type", 3770 - "schema": { 3771 - "enum": [ 3772 - "all", 3773 - "tasks", 3774 - "projects", 3775 - "workspaces", 3776 - "comments", 3777 - "activities" 3778 - ], 3779 - "default": "all" 3780 - } 3781 - }, 3782 - { 3783 - "in": "query", 3784 - "name": "workspaceId", 3785 - "schema": { 3786 - "type": "string" 3787 - } 3788 - }, 3789 - { 3790 - "in": "query", 3791 - "name": "projectId", 3792 - "schema": { 3793 - "type": "string" 3794 - } 3795 - }, 3796 - { 3797 - "in": "query", 3798 - "name": "limit", 3799 - "schema": { 3800 - "type": "string", 3801 - "minimum": 1, 3802 - "maximum": 50, 3803 - "default": "20" 3804 - } 3805 - }, 3806 - { 3807 - "in": "query", 3808 - "name": "userEmail", 3809 - "schema": { 3810 - "type": "string", 3811 - "format": "email" 3812 - } 3813 - } 3814 - ], 3815 - "summary": "Global Search" 3816 - } 3817 - }, 3818 - "/github-integration/app-info": { 3819 - "get": { 3820 - "operationId": "getGitHubAppInfo", 3821 - "tags": [ 3822 - "GitHub" 3823 - ], 3824 - "description": "Get GitHub app configuration information", 3825 - "responses": { 3826 - "200": { 3827 - "description": "GitHub app information", 3828 - "content": { 3829 - "application/json": { 3830 - "schema": { 3831 - "type": "object", 3832 - "properties": { 3833 - "appName": { 3834 - "type": "string", 3835 - "nullable": true 3836 - } 3837 - }, 3838 - "required": [ 3839 - "appName" 3840 - ] 3841 - } 3842 - } 3843 - } 3844 - } 3845 - }, 3846 - "summary": "Get Git Hub App Info" 3847 - } 3848 - }, 3849 - "/github-integration/repositories": { 3850 - "get": { 3851 - "operationId": "listGitHubRepositories", 3852 - "tags": [ 3853 - "GitHub" 3854 - ], 3855 - "description": "List all accessible GitHub repositories", 3856 - "responses": { 3857 - "200": { 3858 - "description": "List of repositories", 3859 - "content": { 3860 - "application/json": { 3861 - "schema": { 3862 - "type": "array", 3863 - "items": { 3864 - "type": "object", 3865 - "properties": { 3866 - "id": { 3867 - "type": "number" 3868 - }, 3869 - "name": { 3870 - "type": "string" 3871 - }, 3872 - "full_name": { 3873 - "type": "string" 3874 - }, 3875 - "owner": { 3876 - "type": "object", 3877 - "properties": { 3878 - "login": { 3879 - "type": "string" 3880 - } 3881 - }, 3882 - "required": [ 3883 - "login" 3884 - ] 3885 - }, 3886 - "private": { 3887 - "type": "boolean" 3888 - }, 3889 - "html_url": { 3890 - "type": "string" 3891 - } 3892 - }, 3893 - "required": [ 3894 - "id", 3895 - "name", 3896 - "full_name", 3897 - "owner", 3898 - "private", 3899 - "html_url" 3900 - ] 3901 - } 3902 - } 3903 - } 3904 - } 3905 - } 3906 - }, 3907 - "summary": "List Git Hub Repositories" 3908 - } 3909 - }, 3910 - "/github-integration/verify": { 3911 - "post": { 3912 - "operationId": "verifyGitHubInstallation", 3913 - "tags": [ 3914 - "GitHub" 3915 - ], 3916 - "description": "Verify GitHub app installation for a repository", 3917 - "responses": { 3918 - "200": { 3919 - "description": "Verification result", 3920 - "content": { 3921 - "application/json": { 3922 - "schema": { 3923 - "type": "object", 3924 - "properties": { 3925 - "installed": { 3926 - "type": "boolean" 3927 - }, 3928 - "message": { 3929 - "type": "string" 3930 - } 3931 - }, 3932 - "required": [ 3933 - "installed" 3934 - ] 3935 - } 3936 - } 3937 - } 3938 - } 3939 - }, 3940 - "requestBody": { 3941 - "content": { 3942 - "application/json": { 3943 - "schema": { 3944 - "type": "object", 3945 - "properties": { 3946 - "repositoryOwner": { 3947 - "type": "string", 3948 - "minLength": 1 3949 - }, 3950 - "repositoryName": { 3951 - "type": "string", 3952 - "minLength": 1 3953 - } 3954 - }, 3955 - "required": [ 3956 - "repositoryOwner", 3957 - "repositoryName" 3958 - ] 3959 - } 3960 - } 3961 - } 3962 - }, 3963 - "summary": "Verify Git Hub Installation" 3964 - } 3965 - }, 3966 - "/github-integration/project/{projectId}": { 3967 - "get": { 3968 - "operationId": "getGitHubIntegration", 3969 - "tags": [ 3970 - "GitHub" 3971 - ], 3972 - "description": "Get GitHub integration for a project", 3973 - "responses": { 3974 - "200": { 3975 - "description": "GitHub integration details", 3976 - "content": { 3977 - "application/json": { 3978 - "schema": { 3979 - "type": "object", 3980 - "properties": { 3981 - "id": { 3982 - "type": "string" 3983 - }, 3984 - "projectId": { 3985 - "type": "string" 3986 - }, 3987 - "repositoryOwner": { 3988 - "type": "string" 3989 - }, 3990 - "repositoryName": { 3991 - "type": "string" 3992 - }, 3993 - "installationId": { 3994 - "type": "number", 3995 - "nullable": true 3996 - }, 3997 - "isActive": { 3998 - "type": "boolean", 3999 - "nullable": true 4000 - }, 4001 - "createdAt": {}, 4002 - "updatedAt": {} 4003 - }, 4004 - "required": [ 4005 - "id", 4006 - "projectId", 4007 - "repositoryOwner", 4008 - "repositoryName", 4009 - "installationId", 4010 - "isActive", 4011 - "createdAt", 4012 - "updatedAt" 4013 - ] 4014 - } 4015 - } 4016 - } 4017 - } 4018 - }, 4019 - "parameters": [ 4020 - { 4021 - "in": "path", 4022 - "name": "projectId", 4023 - "schema": { 4024 - "type": "string" 4025 - }, 4026 - "required": true 4027 - } 4028 - ], 4029 - "summary": "Get Git Hub Integration" 4030 - }, 4031 - "post": { 4032 - "operationId": "createGitHubIntegration", 4033 - "tags": [ 4034 - "GitHub" 4035 - ], 4036 - "description": "Create a new GitHub integration for a project", 4037 - "responses": { 4038 - "200": { 4039 - "description": "Integration created successfully", 4040 - "content": { 4041 - "application/json": { 4042 - "schema": { 4043 - "type": "object", 4044 - "properties": { 4045 - "id": { 4046 - "type": "string" 4047 - }, 4048 - "projectId": { 4049 - "type": "string" 4050 - }, 4051 - "repositoryOwner": { 4052 - "type": "string" 4053 - }, 4054 - "repositoryName": { 4055 - "type": "string" 4056 - }, 4057 - "installationId": { 4058 - "type": "number", 4059 - "nullable": true 4060 - }, 4061 - "isActive": { 4062 - "type": "boolean", 4063 - "nullable": true 4064 - }, 4065 - "createdAt": {}, 4066 - "updatedAt": {} 4067 - }, 4068 - "required": [ 4069 - "id", 4070 - "projectId", 4071 - "repositoryOwner", 4072 - "repositoryName", 4073 - "installationId", 4074 - "isActive", 4075 - "createdAt", 4076 - "updatedAt" 4077 - ] 4078 - } 4079 - } 4080 - } 4081 - } 4082 - }, 4083 - "parameters": [ 4084 - { 4085 - "in": "path", 4086 - "name": "projectId", 4087 - "schema": { 4088 - "type": "string" 4089 - }, 4090 - "required": true 4091 - } 4092 - ], 4093 - "requestBody": { 4094 - "content": { 4095 - "application/json": { 4096 - "schema": { 4097 - "type": "object", 4098 - "properties": { 4099 - "repositoryOwner": { 4100 - "type": "string", 4101 - "minLength": 1 4102 - }, 4103 - "repositoryName": { 4104 - "type": "string", 4105 - "minLength": 1 4106 - } 4107 - }, 4108 - "required": [ 4109 - "repositoryOwner", 4110 - "repositoryName" 4111 - ] 4112 - } 4113 - } 4114 - } 4115 - }, 4116 - "summary": "Create Git Hub Integration" 4117 - }, 4118 - "patch": { 4119 - "operationId": "updateGitHubIntegration", 4120 - "tags": [ 4121 - "GitHub" 4122 - ], 4123 - "description": "Update GitHub integration settings", 4124 - "responses": { 4125 - "200": { 4126 - "description": "Integration updated successfully", 4127 - "content": { 4128 - "application/json": { 4129 - "schema": { 4130 - "type": "object", 4131 - "properties": { 4132 - "id": { 4133 - "type": "string" 4134 - }, 4135 - "projectId": { 4136 - "type": "string" 4137 - }, 4138 - "repositoryOwner": { 4139 - "type": "string" 4140 - }, 4141 - "repositoryName": { 4142 - "type": "string" 4143 - }, 4144 - "installationId": { 4145 - "type": "number", 4146 - "nullable": true 4147 - }, 4148 - "isActive": { 4149 - "type": "boolean", 4150 - "nullable": true 4151 - }, 4152 - "createdAt": {}, 4153 - "updatedAt": {} 4154 - }, 4155 - "required": [ 4156 - "id", 4157 - "projectId", 4158 - "repositoryOwner", 4159 - "repositoryName", 4160 - "installationId", 4161 - "isActive", 4162 - "createdAt", 4163 - "updatedAt" 4164 - ] 4165 - } 4166 - } 4167 - } 4168 - }, 4169 - "404": { 4170 - "description": "Integration not found", 4171 - "content": { 4172 - "application/json": { 4173 - "schema": { 4174 - "type": "object", 4175 - "properties": { 4176 - "error": { 4177 - "type": "string" 4178 - } 4179 - }, 4180 - "required": [ 4181 - "error" 4182 - ] 4183 - } 4184 - } 4185 - } 4186 - } 4187 - }, 4188 - "parameters": [ 4189 - { 4190 - "in": "path", 4191 - "name": "projectId", 4192 - "schema": { 4193 - "type": "string" 4194 - }, 4195 - "required": true 4196 - } 4197 - ], 4198 - "requestBody": { 4199 - "content": { 4200 - "application/json": { 4201 - "schema": { 4202 - "type": "object", 4203 - "properties": { 4204 - "isActive": { 4205 - "type": "boolean" 4206 - } 4207 - } 4208 - } 4209 - } 4210 - } 4211 - }, 4212 - "summary": "Update Git Hub Integration" 4213 - }, 4214 - "delete": { 4215 - "operationId": "deleteGitHubIntegration", 4216 - "tags": [ 4217 - "GitHub" 4218 - ], 4219 - "description": "Delete GitHub integration for a project", 4220 - "responses": { 4221 - "200": { 4222 - "description": "Integration deleted successfully", 4223 - "content": { 4224 - "application/json": { 4225 - "schema": { 4226 - "type": "object", 4227 - "properties": { 4228 - "id": { 4229 - "type": "string" 4230 - }, 4231 - "projectId": { 4232 - "type": "string" 4233 - }, 4234 - "repositoryOwner": { 4235 - "type": "string" 4236 - }, 4237 - "repositoryName": { 4238 - "type": "string" 4239 - }, 4240 - "installationId": { 4241 - "type": "number", 4242 - "nullable": true 4243 - }, 4244 - "isActive": { 4245 - "type": "boolean", 4246 - "nullable": true 4247 - }, 4248 - "createdAt": {}, 4249 - "updatedAt": {} 4250 - }, 4251 - "required": [ 4252 - "id", 4253 - "projectId", 4254 - "repositoryOwner", 4255 - "repositoryName", 4256 - "installationId", 4257 - "isActive", 4258 - "createdAt", 4259 - "updatedAt" 4260 - ] 4261 - } 4262 - } 4263 - } 4264 - } 4265 - }, 4266 - "parameters": [ 4267 - { 4268 - "in": "path", 4269 - "name": "projectId", 4270 - "schema": { 4271 - "type": "string" 4272 - }, 4273 - "required": true 4274 - } 4275 - ], 4276 - "summary": "Delete Git Hub Integration" 4277 - } 4278 - }, 4279 - "/github-integration/import-issues": { 4280 - "post": { 4281 - "operationId": "importGitHubIssues", 4282 - "tags": [ 4283 - "GitHub" 4284 - ], 4285 - "description": "Import GitHub issues as tasks", 4286 - "responses": { 4287 - "200": { 4288 - "description": "Issues imported successfully", 4289 - "content": { 4290 - "application/json": { 4291 - "schema": { 4292 - "type": "object", 4293 - "properties": { 4294 - "imported": { 4295 - "type": "number" 4296 - }, 4297 - "skipped": { 4298 - "type": "number" 4299 - }, 4300 - "errors": { 4301 - "type": "array", 4302 - "items": { 4303 - "type": "string" 4304 - } 4305 - } 4306 - }, 4307 - "required": [ 4308 - "imported", 4309 - "skipped" 4310 - ] 4311 - } 4312 - } 4313 - } 4314 - } 4315 - }, 4316 - "requestBody": { 4317 - "content": { 4318 - "application/json": { 4319 - "schema": { 4320 - "type": "object", 4321 - "properties": { 4322 - "projectId": { 4323 - "type": "string" 4324 - } 4325 - }, 4326 - "required": [ 4327 - "projectId" 4328 - ] 4329 - } 4330 - } 4331 - } 4332 - }, 4333 - "summary": "Import Git Hub Issues" 4334 - } 4335 - }, 4336 - "/external-link/task/{taskId}": { 4337 - "get": { 4338 - "operationId": "getExternalLinksByTask", 4339 - "tags": [ 4340 - "External Links" 4341 - ], 4342 - "description": "Get all external links for a task", 4343 - "responses": { 4344 - "200": { 4345 - "description": "External links for the task", 4346 - "content": { 4347 - "application/json": { 4348 - "schema": { 4349 - "type": "array", 4350 - "items": { 4351 - "type": "object", 4352 - "properties": { 4353 - "id": { 4354 - "type": "string" 4355 - }, 4356 - "taskId": { 4357 - "type": "string" 4358 - }, 4359 - "integrationId": { 4360 - "type": "string" 4361 - }, 4362 - "resourceType": { 4363 - "type": "string" 4364 - }, 4365 - "externalId": { 4366 - "type": "string" 4367 - }, 4368 - "url": { 4369 - "type": "string" 4370 - }, 4371 - "title": { 4372 - "type": "string", 4373 - "nullable": true 4374 - }, 4375 - "metadata": {}, 4376 - "createdAt": {}, 4377 - "updatedAt": {} 4378 - }, 4379 - "required": [ 4380 - "id", 4381 - "taskId", 4382 - "integrationId", 4383 - "resourceType", 4384 - "externalId", 4385 - "url", 4386 - "title", 4387 - "metadata", 4388 - "createdAt", 4389 - "updatedAt" 4390 - ] 4391 - } 4392 - } 4393 - } 4394 - } 4395 - } 4396 - }, 4397 - "parameters": [ 4398 - { 4399 - "in": "path", 4400 - "name": "taskId", 4401 - "schema": { 4402 - "type": "string" 4403 - }, 4404 - "required": true 4405 - } 4406 - ], 4407 - "summary": "Get External Links By Task" 4408 - } 4409 - }, 4410 - "/workflow-rule/{projectId}": { 4411 - "get": { 4412 - "operationId": "getWorkflowRules", 4413 - "tags": [ 4414 - "Workflow Rules" 4415 - ], 4416 - "description": "Get all workflow rules for a project", 4417 - "responses": { 4418 - "200": { 4419 - "description": "List of workflow rules", 4420 - "content": { 4421 - "application/json": { 4422 - "schema": {} 4423 - } 4424 - } 4425 - } 4426 - }, 4427 - "parameters": [ 4428 - { 4429 - "in": "path", 4430 - "name": "projectId", 4431 - "schema": { 4432 - "type": "string" 4433 - }, 4434 - "required": true 4435 - } 4436 - ], 4437 - "summary": "Get Workflow Rules" 4438 - }, 4439 - "put": { 4440 - "operationId": "upsertWorkflowRule", 4441 - "tags": [ 4442 - "Workflow Rules" 4443 - ], 4444 - "description": "Create or update a workflow rule", 4445 - "responses": { 4446 - "200": { 4447 - "description": "Workflow rule upserted successfully", 4448 - "content": { 4449 - "application/json": { 4450 - "schema": {} 4451 - } 4452 - } 4453 - } 4454 - }, 4455 - "parameters": [ 4456 - { 4457 - "in": "path", 4458 - "name": "projectId", 4459 - "schema": { 4460 - "type": "string" 4461 - }, 4462 - "required": true 4463 - } 4464 - ], 4465 - "requestBody": { 4466 - "content": { 4467 - "application/json": { 4468 - "schema": { 4469 - "type": "object", 4470 - "properties": { 4471 - "integrationType": { 4472 - "type": "string" 4473 - }, 4474 - "eventType": { 4475 - "type": "string" 4476 - }, 4477 - "columnId": { 4478 - "type": "string" 4479 - } 4480 - }, 4481 - "required": [ 4482 - "integrationType", 4483 - "eventType", 4484 - "columnId" 4485 - ] 4486 - } 4487 - } 4488 - } 4489 - }, 4490 - "summary": "Upsert Workflow Rule" 4491 - } 4492 - }, 4493 - "/workflow-rule/{id}": { 4494 - "delete": { 4495 - "operationId": "deleteWorkflowRule", 4496 - "tags": [ 4497 - "Workflow Rules" 4498 - ], 4499 - "description": "Delete a workflow rule", 4500 - "responses": { 4501 - "200": { 4502 - "description": "Workflow rule deleted successfully", 4503 - "content": { 4504 - "application/json": { 4505 - "schema": {} 4506 - } 4507 - } 4508 - } 4509 - }, 4510 - "parameters": [ 4511 - { 4512 - "in": "path", 4513 - "name": "id", 4514 - "schema": { 4515 - "type": "string" 4516 - }, 4517 - "required": true 4518 - } 4519 - ], 4520 - "summary": "Delete Workflow Rule" 4521 - } 4522 - }, 4523 - "/invitation/pending": { 4524 - "get": { 4525 - "operationId": "getUserPendingInvitations", 4526 - "tags": [ 4527 - "Invitations" 4528 - ], 4529 - "description": "Get all pending invitations for the current user", 4530 - "responses": { 4531 - "200": { 4532 - "description": "List of pending invitations", 4533 - "content": { 4534 - "application/json": { 4535 - "schema": { 4536 - "type": "array", 4537 - "items": { 4538 - "type": "object", 4539 - "properties": { 4540 - "id": { 4541 - "type": "string" 4542 - }, 4543 - "email": { 4544 - "type": "string" 4545 - }, 4546 - "workspaceId": { 4547 - "type": "string" 4548 - }, 4549 - "workspaceName": { 4550 - "type": "string" 4551 - }, 4552 - "inviterName": { 4553 - "type": "string" 4554 - }, 4555 - "expiresAt": { 4556 - "type": "string" 4557 - }, 4558 - "createdAt": { 4559 - "type": "string" 4560 - }, 4561 - "status": { 4562 - "type": "string" 4563 - } 4564 - }, 4565 - "required": [ 4566 - "id", 4567 - "email", 4568 - "workspaceId", 4569 - "workspaceName", 4570 - "inviterName", 4571 - "expiresAt", 4572 - "createdAt", 4573 - "status" 4574 - ] 4575 - } 4576 - } 4577 - } 4578 - } 4579 - } 4580 - }, 4581 - "summary": "Get User Pending Invitations" 4582 - } 4583 - }, 4584 - "/invitation/{id}": { 4585 - "get": { 4586 - "operationId": "getInvitationDetails", 4587 - "tags": [ 4588 - "Invitations" 4589 - ], 4590 - "description": "Get details of a specific invitation by ID", 4591 - "responses": { 4592 - "200": { 4593 - "description": "Invitation details", 4594 - "content": { 4595 - "application/json": { 4596 - "schema": { 4597 - "type": "object", 4598 - "properties": { 4599 - "valid": { 4600 - "type": "boolean" 4601 - }, 4602 - "invitation": { 4603 - "type": "object", 4604 - "properties": { 4605 - "id": { 4606 - "type": "string" 4607 - }, 4608 - "email": { 4609 - "type": "string" 4610 - }, 4611 - "workspaceName": { 4612 - "type": "string" 4613 - }, 4614 - "inviterName": { 4615 - "type": "string" 4616 - }, 4617 - "expiresAt": { 4618 - "type": "string" 4619 - }, 4620 - "status": { 4621 - "type": "string" 4622 - }, 4623 - "expired": { 4624 - "type": "boolean" 4625 - } 4626 - }, 4627 - "required": [ 4628 - "id", 4629 - "email", 4630 - "workspaceName", 4631 - "inviterName", 4632 - "expiresAt", 4633 - "status", 4634 - "expired" 4635 - ] 4636 - }, 4637 - "error": { 4638 - "type": "string" 4639 - } 4640 - }, 4641 - "required": [ 4642 - "valid" 4643 - ] 4644 - } 4645 - } 4646 - } 4647 - } 4648 - }, 4649 - "parameters": [ 4650 - { 4651 - "in": "path", 4652 - "name": "id", 4653 - "schema": { 4654 - "type": "string" 4655 - }, 4656 - "required": true 4657 - } 4658 - ], 4659 - "summary": "Get Invitation Details" 4660 - } 4661 - }, 4662 - "/auth/organization/create": { 4663 - "post": { 4664 - "tags": [ 4665 - "Organization Management" 4666 - ], 4667 - "description": "Create an organization", 4668 - "security": [ 4669 - { 4670 - "bearerAuth": [] 4671 - } 4672 - ], 4673 - "parameters": [], 4674 - "requestBody": { 4675 - "required": true, 4676 - "content": { 4677 - "application/json": { 4678 - "schema": { 4679 - "type": "object", 4680 - "properties": { 4681 - "name": { 4682 - "type": "string", 4683 - "description": "The name of the organization" 4684 - }, 4685 - "slug": { 4686 - "type": "string", 4687 - "description": "The slug of the organization" 4688 - }, 4689 - "userId": { 4690 - "type": "string", 4691 - "description": "The user id of the organization creator. If not provided, the current user will be used. Should only be used by admins or when called by the server. server-only. Eg: \"user-id\"", 4692 - "nullable": true 4693 - }, 4694 - "logo": { 4695 - "type": "string", 4696 - "description": "The logo of the organization", 4697 - "nullable": true 4698 - }, 4699 - "metadata": { 4700 - "type": "string", 4701 - "description": "The metadata of the organization", 4702 - "nullable": true 4703 - }, 4704 - "keepCurrentActiveOrganization": { 4705 - "type": "boolean", 4706 - "description": "Whether to keep the current active organization active after creating a new one. Eg: true", 4707 - "nullable": true 4708 - }, 4709 - "description": { 4710 - "type": "string", 4711 - "nullable": true 4712 - } 4713 - }, 4714 - "required": [ 4715 - "name", 4716 - "slug" 4717 - ] 4718 - } 4719 - } 4720 - } 4721 - }, 4722 - "responses": { 4723 - "200": { 4724 - "description": "Success", 4725 - "content": { 4726 - "application/json": { 4727 - "schema": { 4728 - "type": "object", 4729 - "description": "The organization that was created", 4730 - "$ref": "#/components/schemas/Organization" 4731 - } 4732 - } 4733 - } 4734 - }, 4735 - "400": { 4736 - "content": { 4737 - "application/json": { 4738 - "schema": { 4739 - "type": "object", 4740 - "properties": { 4741 - "message": { 4742 - "type": "string" 4743 - } 4744 - }, 4745 - "required": [ 4746 - "message" 4747 - ] 4748 - } 4749 - } 4750 - }, 4751 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 4752 - }, 4753 - "401": { 4754 - "content": { 4755 - "application/json": { 4756 - "schema": { 4757 - "type": "object", 4758 - "properties": { 4759 - "message": { 4760 - "type": "string" 4761 - } 4762 - }, 4763 - "required": [ 4764 - "message" 4765 - ] 4766 - } 4767 - } 4768 - }, 4769 - "description": "Unauthorized. Due to missing or invalid authentication." 4770 - }, 4771 - "403": { 4772 - "content": { 4773 - "application/json": { 4774 - "schema": { 4775 - "type": "object", 4776 - "properties": { 4777 - "message": { 4778 - "type": "string" 4779 - } 4780 - } 4781 - } 4782 - } 4783 - }, 4784 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 4785 - }, 4786 - "404": { 4787 - "content": { 4788 - "application/json": { 4789 - "schema": { 4790 - "type": "object", 4791 - "properties": { 4792 - "message": { 4793 - "type": "string" 4794 - } 4795 - } 4796 - } 4797 - } 4798 - }, 4799 - "description": "Not Found. The requested resource was not found." 4800 - }, 4801 - "429": { 4802 - "content": { 4803 - "application/json": { 4804 - "schema": { 4805 - "type": "object", 4806 - "properties": { 4807 - "message": { 4808 - "type": "string" 4809 - } 4810 - } 4811 - } 4812 - } 4813 - }, 4814 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 4815 - }, 4816 - "500": { 4817 - "content": { 4818 - "application/json": { 4819 - "schema": { 4820 - "type": "object", 4821 - "properties": { 4822 - "message": { 4823 - "type": "string" 4824 - } 4825 - } 4826 - } 4827 - } 4828 - }, 4829 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 4830 - } 4831 - }, 4832 - "operationId": "createOrganization", 4833 - "summary": "Create Organization" 4834 - } 4835 - }, 4836 - "/auth/organization/update": { 4837 - "post": { 4838 - "tags": [ 4839 - "Organization Management" 4840 - ], 4841 - "description": "Update an organization", 4842 - "security": [ 4843 - { 4844 - "bearerAuth": [] 4845 - } 4846 - ], 4847 - "parameters": [], 4848 - "requestBody": { 4849 - "required": true, 4850 - "content": { 4851 - "application/json": { 4852 - "schema": { 4853 - "type": "object", 4854 - "properties": { 4855 - "data": { 4856 - "type": "object", 4857 - "properties": { 4858 - "description": { 4859 - "type": "string", 4860 - "nullable": true 4861 - }, 4862 - "name": { 4863 - "type": "string", 4864 - "description": "The name of the organization", 4865 - "nullable": true 4866 - }, 4867 - "slug": { 4868 - "type": "string", 4869 - "description": "The slug of the organization", 4870 - "nullable": true 4871 - }, 4872 - "logo": { 4873 - "type": "string", 4874 - "description": "The logo of the organization", 4875 - "nullable": true 4876 - }, 4877 - "metadata": { 4878 - "type": "string", 4879 - "description": "The metadata of the organization", 4880 - "nullable": true 4881 - } 4882 - } 4883 - }, 4884 - "organizationId": { 4885 - "type": "string", 4886 - "description": "The organization ID. Eg: \"org-id\"", 4887 - "nullable": true 4888 - } 4889 - }, 4890 - "required": [ 4891 - "data" 4892 - ] 4893 - } 4894 - } 4895 - } 4896 - }, 4897 - "responses": { 4898 - "200": { 4899 - "description": "Success", 4900 - "content": { 4901 - "application/json": { 4902 - "schema": { 4903 - "type": "object", 4904 - "description": "The updated organization", 4905 - "$ref": "#/components/schemas/Organization" 4906 - } 4907 - } 4908 - } 4909 - }, 4910 - "400": { 4911 - "content": { 4912 - "application/json": { 4913 - "schema": { 4914 - "type": "object", 4915 - "properties": { 4916 - "message": { 4917 - "type": "string" 4918 - } 4919 - }, 4920 - "required": [ 4921 - "message" 4922 - ] 4923 - } 4924 - } 4925 - }, 4926 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 4927 - }, 4928 - "401": { 4929 - "content": { 4930 - "application/json": { 4931 - "schema": { 4932 - "type": "object", 4933 - "properties": { 4934 - "message": { 4935 - "type": "string" 4936 - } 4937 - }, 4938 - "required": [ 4939 - "message" 4940 - ] 4941 - } 4942 - } 4943 - }, 4944 - "description": "Unauthorized. Due to missing or invalid authentication." 4945 - }, 4946 - "403": { 4947 - "content": { 4948 - "application/json": { 4949 - "schema": { 4950 - "type": "object", 4951 - "properties": { 4952 - "message": { 4953 - "type": "string" 4954 - } 4955 - } 4956 - } 4957 - } 4958 - }, 4959 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 4960 - }, 4961 - "404": { 4962 - "content": { 4963 - "application/json": { 4964 - "schema": { 4965 - "type": "object", 4966 - "properties": { 4967 - "message": { 4968 - "type": "string" 4969 - } 4970 - } 4971 - } 4972 - } 4973 - }, 4974 - "description": "Not Found. The requested resource was not found." 4975 - }, 4976 - "429": { 4977 - "content": { 4978 - "application/json": { 4979 - "schema": { 4980 - "type": "object", 4981 - "properties": { 4982 - "message": { 4983 - "type": "string" 4984 - } 4985 - } 4986 - } 4987 - } 4988 - }, 4989 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 4990 - }, 4991 - "500": { 4992 - "content": { 4993 - "application/json": { 4994 - "schema": { 4995 - "type": "object", 4996 - "properties": { 4997 - "message": { 4998 - "type": "string" 4999 - } 5000 - } 5001 - } 5002 - } 5003 - }, 5004 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 5005 - } 5006 - }, 5007 - "operationId": "updateOrganization", 5008 - "summary": "Update Organization" 5009 - } 5010 - }, 5011 - "/auth/organization/delete": { 5012 - "post": { 5013 - "tags": [ 5014 - "Organization Management" 5015 - ], 5016 - "description": "Delete an organization", 5017 - "security": [ 5018 - { 5019 - "bearerAuth": [] 5020 - } 5021 - ], 5022 - "parameters": [], 5023 - "requestBody": { 5024 - "required": true, 5025 - "content": { 5026 - "application/json": { 5027 - "schema": { 5028 - "type": "object", 5029 - "properties": { 5030 - "organizationId": { 5031 - "type": "string", 5032 - "description": "The organization id to delete" 5033 - } 5034 - }, 5035 - "required": [ 5036 - "organizationId" 5037 - ] 5038 - } 5039 - } 5040 - } 5041 - }, 5042 - "responses": { 5043 - "200": { 5044 - "description": "Success", 5045 - "content": { 5046 - "application/json": { 5047 - "schema": { 5048 - "type": "string", 5049 - "description": "The organization id that was deleted" 5050 - } 5051 - } 5052 - } 5053 - }, 5054 - "400": { 5055 - "content": { 5056 - "application/json": { 5057 - "schema": { 5058 - "type": "object", 5059 - "properties": { 5060 - "message": { 5061 - "type": "string" 5062 - } 5063 - }, 5064 - "required": [ 5065 - "message" 5066 - ] 5067 - } 5068 - } 5069 - }, 5070 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 5071 - }, 5072 - "401": { 5073 - "content": { 5074 - "application/json": { 5075 - "schema": { 5076 - "type": "object", 5077 - "properties": { 5078 - "message": { 5079 - "type": "string" 5080 - } 5081 - }, 5082 - "required": [ 5083 - "message" 5084 - ] 5085 - } 5086 - } 5087 - }, 5088 - "description": "Unauthorized. Due to missing or invalid authentication." 5089 - }, 5090 - "403": { 5091 - "content": { 5092 - "application/json": { 5093 - "schema": { 5094 - "type": "object", 5095 - "properties": { 5096 - "message": { 5097 - "type": "string" 5098 - } 5099 - } 5100 - } 5101 - } 5102 - }, 5103 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 5104 - }, 5105 - "404": { 5106 - "content": { 5107 - "application/json": { 5108 - "schema": { 5109 - "type": "object", 5110 - "properties": { 5111 - "message": { 5112 - "type": "string" 5113 - } 5114 - } 5115 - } 5116 - } 5117 - }, 5118 - "description": "Not Found. The requested resource was not found." 5119 - }, 5120 - "429": { 5121 - "content": { 5122 - "application/json": { 5123 - "schema": { 5124 - "type": "object", 5125 - "properties": { 5126 - "message": { 5127 - "type": "string" 5128 - } 5129 - } 5130 - } 5131 - } 5132 - }, 5133 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 5134 - }, 5135 - "500": { 5136 - "content": { 5137 - "application/json": { 5138 - "schema": { 5139 - "type": "object", 5140 - "properties": { 5141 - "message": { 5142 - "type": "string" 5143 - } 5144 - } 5145 - } 5146 - } 5147 - }, 5148 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 5149 - } 5150 - }, 5151 - "operationId": "deleteOrganization", 5152 - "summary": "Delete Organization" 5153 - } 5154 - }, 5155 - "/auth/organization/set-active": { 5156 - "post": { 5157 - "tags": [ 5158 - "Organization Management" 5159 - ], 5160 - "description": "Set the active organization", 5161 - "operationId": "setOrganizationActive", 5162 - "security": [ 5163 - { 5164 - "bearerAuth": [] 5165 - } 5166 - ], 5167 - "parameters": [], 5168 - "requestBody": { 5169 - "required": true, 5170 - "content": { 5171 - "application/json": { 5172 - "schema": { 5173 - "type": "object", 5174 - "properties": { 5175 - "organizationId": { 5176 - "type": "string", 5177 - "nullable": true 5178 - }, 5179 - "organizationSlug": { 5180 - "type": "string", 5181 - "description": "The organization slug to set as active. It can be null to unset the active organization if organizationId is not provided. Eg: \"org-slug\"", 5182 - "nullable": true 5183 - } 5184 - } 5185 - } 5186 - } 5187 - } 5188 - }, 5189 - "responses": { 5190 - "200": { 5191 - "description": "Success", 5192 - "content": { 5193 - "application/json": { 5194 - "schema": { 5195 - "type": "object", 5196 - "description": "The organization", 5197 - "$ref": "#/components/schemas/Organization" 5198 - } 5199 - } 5200 - } 5201 - }, 5202 - "400": { 5203 - "content": { 5204 - "application/json": { 5205 - "schema": { 5206 - "type": "object", 5207 - "properties": { 5208 - "message": { 5209 - "type": "string" 5210 - } 5211 - }, 5212 - "required": [ 5213 - "message" 5214 - ] 5215 - } 5216 - } 5217 - }, 5218 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 5219 - }, 5220 - "401": { 5221 - "content": { 5222 - "application/json": { 5223 - "schema": { 5224 - "type": "object", 5225 - "properties": { 5226 - "message": { 5227 - "type": "string" 5228 - } 5229 - }, 5230 - "required": [ 5231 - "message" 5232 - ] 5233 - } 5234 - } 5235 - }, 5236 - "description": "Unauthorized. Due to missing or invalid authentication." 5237 - }, 5238 - "403": { 5239 - "content": { 5240 - "application/json": { 5241 - "schema": { 5242 - "type": "object", 5243 - "properties": { 5244 - "message": { 5245 - "type": "string" 5246 - } 5247 - } 5248 - } 5249 - } 5250 - }, 5251 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 5252 - }, 5253 - "404": { 5254 - "content": { 5255 - "application/json": { 5256 - "schema": { 5257 - "type": "object", 5258 - "properties": { 5259 - "message": { 5260 - "type": "string" 5261 - } 5262 - } 5263 - } 5264 - } 5265 - }, 5266 - "description": "Not Found. The requested resource was not found." 5267 - }, 5268 - "429": { 5269 - "content": { 5270 - "application/json": { 5271 - "schema": { 5272 - "type": "object", 5273 - "properties": { 5274 - "message": { 5275 - "type": "string" 5276 - } 5277 - } 5278 - } 5279 - } 5280 - }, 5281 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 5282 - }, 5283 - "500": { 5284 - "content": { 5285 - "application/json": { 5286 - "schema": { 5287 - "type": "object", 5288 - "properties": { 5289 - "message": { 5290 - "type": "string" 5291 - } 5292 - } 5293 - } 5294 - } 5295 - }, 5296 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 5297 - } 5298 - }, 5299 - "summary": "Set Organization Active" 5300 - } 5301 - }, 5302 - "/auth/organization/get-full-organization": { 5303 - "get": { 5304 - "tags": [ 5305 - "Organization Management" 5306 - ], 5307 - "description": "Get the full organization", 5308 - "operationId": "getOrganizationFullOrganization", 5309 - "security": [ 5310 - { 5311 - "bearerAuth": [] 5312 - } 5313 - ], 5314 - "parameters": [], 5315 - "responses": { 5316 - "200": { 5317 - "description": "Success", 5318 - "content": { 5319 - "application/json": { 5320 - "schema": { 5321 - "type": "object", 5322 - "description": "The organization", 5323 - "$ref": "#/components/schemas/Organization" 5324 - } 5325 - } 5326 - } 5327 - }, 5328 - "400": { 5329 - "content": { 5330 - "application/json": { 5331 - "schema": { 5332 - "type": "object", 5333 - "properties": { 5334 - "message": { 5335 - "type": "string" 5336 - } 5337 - }, 5338 - "required": [ 5339 - "message" 5340 - ] 5341 - } 5342 - } 5343 - }, 5344 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 5345 - }, 5346 - "401": { 5347 - "content": { 5348 - "application/json": { 5349 - "schema": { 5350 - "type": "object", 5351 - "properties": { 5352 - "message": { 5353 - "type": "string" 5354 - } 5355 - }, 5356 - "required": [ 5357 - "message" 5358 - ] 5359 - } 5360 - } 5361 - }, 5362 - "description": "Unauthorized. Due to missing or invalid authentication." 5363 - }, 5364 - "403": { 5365 - "content": { 5366 - "application/json": { 5367 - "schema": { 5368 - "type": "object", 5369 - "properties": { 5370 - "message": { 5371 - "type": "string" 5372 - } 5373 - } 5374 - } 5375 - } 5376 - }, 5377 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 5378 - }, 5379 - "404": { 5380 - "content": { 5381 - "application/json": { 5382 - "schema": { 5383 - "type": "object", 5384 - "properties": { 5385 - "message": { 5386 - "type": "string" 5387 - } 5388 - } 5389 - } 5390 - } 5391 - }, 5392 - "description": "Not Found. The requested resource was not found." 5393 - }, 5394 - "429": { 5395 - "content": { 5396 - "application/json": { 5397 - "schema": { 5398 - "type": "object", 5399 - "properties": { 5400 - "message": { 5401 - "type": "string" 5402 - } 5403 - } 5404 - } 5405 - } 5406 - }, 5407 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 5408 - }, 5409 - "500": { 5410 - "content": { 5411 - "application/json": { 5412 - "schema": { 5413 - "type": "object", 5414 - "properties": { 5415 - "message": { 5416 - "type": "string" 5417 - } 5418 - } 5419 - } 5420 - } 5421 - }, 5422 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 5423 - } 5424 - }, 5425 - "summary": "Get Organization Full Organization" 5426 - } 5427 - }, 5428 - "/auth/organization/list": { 5429 - "get": { 5430 - "tags": [ 5431 - "Organization Management" 5432 - ], 5433 - "description": "List all organizations", 5434 - "security": [ 5435 - { 5436 - "bearerAuth": [] 5437 - } 5438 - ], 5439 - "parameters": [], 5440 - "responses": { 5441 - "200": { 5442 - "description": "Success", 5443 - "content": { 5444 - "application/json": { 5445 - "schema": { 5446 - "type": "array", 5447 - "items": { 5448 - "$ref": "#/components/schemas/Organization" 5449 - } 5450 - } 5451 - } 5452 - } 5453 - }, 5454 - "400": { 5455 - "content": { 5456 - "application/json": { 5457 - "schema": { 5458 - "type": "object", 5459 - "properties": { 5460 - "message": { 5461 - "type": "string" 5462 - } 5463 - }, 5464 - "required": [ 5465 - "message" 5466 - ] 5467 - } 5468 - } 5469 - }, 5470 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 5471 - }, 5472 - "401": { 5473 - "content": { 5474 - "application/json": { 5475 - "schema": { 5476 - "type": "object", 5477 - "properties": { 5478 - "message": { 5479 - "type": "string" 5480 - } 5481 - }, 5482 - "required": [ 5483 - "message" 5484 - ] 5485 - } 5486 - } 5487 - }, 5488 - "description": "Unauthorized. Due to missing or invalid authentication." 5489 - }, 5490 - "403": { 5491 - "content": { 5492 - "application/json": { 5493 - "schema": { 5494 - "type": "object", 5495 - "properties": { 5496 - "message": { 5497 - "type": "string" 5498 - } 5499 - } 5500 - } 5501 - } 5502 - }, 5503 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 5504 - }, 5505 - "404": { 5506 - "content": { 5507 - "application/json": { 5508 - "schema": { 5509 - "type": "object", 5510 - "properties": { 5511 - "message": { 5512 - "type": "string" 5513 - } 5514 - } 5515 - } 5516 - } 5517 - }, 5518 - "description": "Not Found. The requested resource was not found." 5519 - }, 5520 - "429": { 5521 - "content": { 5522 - "application/json": { 5523 - "schema": { 5524 - "type": "object", 5525 - "properties": { 5526 - "message": { 5527 - "type": "string" 5528 - } 5529 - } 5530 - } 5531 - } 5532 - }, 5533 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 5534 - }, 5535 - "500": { 5536 - "content": { 5537 - "application/json": { 5538 - "schema": { 5539 - "type": "object", 5540 - "properties": { 5541 - "message": { 5542 - "type": "string" 5543 - } 5544 - } 5545 - } 5546 - } 5547 - }, 5548 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 5549 - } 5550 - }, 5551 - "operationId": "listOrganization", 5552 - "summary": "List Organization" 5553 - } 5554 - }, 5555 - "/auth/organization/invite-member": { 5556 - "post": { 5557 - "tags": [ 5558 - "Organization Management" 5559 - ], 5560 - "description": "Create an invitation to an organization", 5561 - "operationId": "inviteOrganizationMember", 5562 - "security": [ 5563 - { 5564 - "bearerAuth": [] 5565 - } 5566 - ], 5567 - "parameters": [], 5568 - "requestBody": { 5569 - "required": true, 5570 - "content": { 5571 - "application/json": { 5572 - "schema": { 5573 - "type": "object", 5574 - "properties": { 5575 - "email": { 5576 - "type": "string", 5577 - "description": "The email address of the user to invite" 5578 - }, 5579 - "role": { 5580 - "type": "string", 5581 - "description": "The role(s) to assign to the user. It can be `admin`, `member`, owner. Eg: \"member\"" 5582 - }, 5583 - "organizationId": { 5584 - "type": "string", 5585 - "description": "The organization ID to invite the user to", 5586 - "nullable": true 5587 - }, 5588 - "resend": { 5589 - "type": "boolean", 5590 - "description": "Resend the invitation email, if the user is already invited. Eg: true", 5591 - "nullable": true 5592 - }, 5593 - "teamId": { 5594 - "type": "string" 5595 - } 5596 - }, 5597 - "required": [ 5598 - "email", 5599 - "role", 5600 - "teamId" 5601 - ] 5602 - } 5603 - } 5604 - } 5605 - }, 5606 - "responses": { 5607 - "200": { 5608 - "description": "Success", 5609 - "content": { 5610 - "application/json": { 5611 - "schema": { 5612 - "type": "object", 5613 - "properties": { 5614 - "id": { 5615 - "type": "string" 5616 - }, 5617 - "email": { 5618 - "type": "string" 5619 - }, 5620 - "role": { 5621 - "type": "string" 5622 - }, 5623 - "organizationId": { 5624 - "type": "string" 5625 - }, 5626 - "inviterId": { 5627 - "type": "string" 5628 - }, 5629 - "status": { 5630 - "type": "string" 5631 - }, 5632 - "expiresAt": { 5633 - "type": "string" 5634 - }, 5635 - "createdAt": { 5636 - "type": "string" 5637 - } 5638 - }, 5639 - "required": [ 5640 - "id", 5641 - "email", 5642 - "role", 5643 - "organizationId", 5644 - "inviterId", 5645 - "status", 5646 - "expiresAt", 5647 - "createdAt" 5648 - ] 5649 - } 5650 - } 5651 - } 5652 - }, 5653 - "400": { 5654 - "content": { 5655 - "application/json": { 5656 - "schema": { 5657 - "type": "object", 5658 - "properties": { 5659 - "message": { 5660 - "type": "string" 5661 - } 5662 - }, 5663 - "required": [ 5664 - "message" 5665 - ] 5666 - } 5667 - } 5668 - }, 5669 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 5670 - }, 5671 - "401": { 5672 - "content": { 5673 - "application/json": { 5674 - "schema": { 5675 - "type": "object", 5676 - "properties": { 5677 - "message": { 5678 - "type": "string" 5679 - } 5680 - }, 5681 - "required": [ 5682 - "message" 5683 - ] 5684 - } 5685 - } 5686 - }, 5687 - "description": "Unauthorized. Due to missing or invalid authentication." 5688 - }, 5689 - "403": { 5690 - "content": { 5691 - "application/json": { 5692 - "schema": { 5693 - "type": "object", 5694 - "properties": { 5695 - "message": { 5696 - "type": "string" 5697 - } 5698 - } 5699 - } 5700 - } 5701 - }, 5702 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 5703 - }, 5704 - "404": { 5705 - "content": { 5706 - "application/json": { 5707 - "schema": { 5708 - "type": "object", 5709 - "properties": { 5710 - "message": { 5711 - "type": "string" 5712 - } 5713 - } 5714 - } 5715 - } 5716 - }, 5717 - "description": "Not Found. The requested resource was not found." 5718 - }, 5719 - "429": { 5720 - "content": { 5721 - "application/json": { 5722 - "schema": { 5723 - "type": "object", 5724 - "properties": { 5725 - "message": { 5726 - "type": "string" 5727 - } 5728 - } 5729 - } 5730 - } 5731 - }, 5732 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 5733 - }, 5734 - "500": { 5735 - "content": { 5736 - "application/json": { 5737 - "schema": { 5738 - "type": "object", 5739 - "properties": { 5740 - "message": { 5741 - "type": "string" 5742 - } 5743 - } 5744 - } 5745 - } 5746 - }, 5747 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 5748 - } 5749 - }, 5750 - "summary": "Invite Organization Member" 5751 - } 5752 - }, 5753 - "/auth/organization/cancel-invitation": { 5754 - "post": { 5755 - "tags": [ 5756 - "Organization Management" 5757 - ], 5758 - "security": [ 5759 - { 5760 - "bearerAuth": [] 5761 - } 5762 - ], 5763 - "parameters": [], 5764 - "requestBody": { 5765 - "required": true, 5766 - "content": { 5767 - "application/json": { 5768 - "schema": { 5769 - "type": "object", 5770 - "properties": { 5771 - "invitationId": { 5772 - "type": "string", 5773 - "description": "The ID of the invitation to cancel" 5774 - } 5775 - }, 5776 - "required": [ 5777 - "invitationId" 5778 - ] 5779 - } 5780 - } 5781 - } 5782 - }, 5783 - "responses": { 5784 - "400": { 5785 - "content": { 5786 - "application/json": { 5787 - "schema": { 5788 - "type": "object", 5789 - "properties": { 5790 - "message": { 5791 - "type": "string" 5792 - } 5793 - }, 5794 - "required": [ 5795 - "message" 5796 - ] 5797 - } 5798 - } 5799 - }, 5800 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 5801 - }, 5802 - "401": { 5803 - "content": { 5804 - "application/json": { 5805 - "schema": { 5806 - "type": "object", 5807 - "properties": { 5808 - "message": { 5809 - "type": "string" 5810 - } 5811 - }, 5812 - "required": [ 5813 - "message" 5814 - ] 5815 - } 5816 - } 5817 - }, 5818 - "description": "Unauthorized. Due to missing or invalid authentication." 5819 - }, 5820 - "403": { 5821 - "content": { 5822 - "application/json": { 5823 - "schema": { 5824 - "type": "object", 5825 - "properties": { 5826 - "message": { 5827 - "type": "string" 5828 - } 5829 - } 5830 - } 5831 - } 5832 - }, 5833 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 5834 - }, 5835 - "404": { 5836 - "content": { 5837 - "application/json": { 5838 - "schema": { 5839 - "type": "object", 5840 - "properties": { 5841 - "message": { 5842 - "type": "string" 5843 - } 5844 - } 5845 - } 5846 - } 5847 - }, 5848 - "description": "Not Found. The requested resource was not found." 5849 - }, 5850 - "429": { 5851 - "content": { 5852 - "application/json": { 5853 - "schema": { 5854 - "type": "object", 5855 - "properties": { 5856 - "message": { 5857 - "type": "string" 5858 - } 5859 - } 5860 - } 5861 - } 5862 - }, 5863 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 5864 - }, 5865 - "500": { 5866 - "content": { 5867 - "application/json": { 5868 - "schema": { 5869 - "type": "object", 5870 - "properties": { 5871 - "message": { 5872 - "type": "string" 5873 - } 5874 - } 5875 - } 5876 - } 5877 - }, 5878 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 5879 - } 5880 - }, 5881 - "operationId": "cancelOrganizationInvitation", 5882 - "summary": "Cancel Organization Invitation" 5883 - } 5884 - }, 5885 - "/auth/organization/accept-invitation": { 5886 - "post": { 5887 - "tags": [ 5888 - "Organization Management" 5889 - ], 5890 - "description": "Accept an invitation to an organization", 5891 - "security": [ 5892 - { 5893 - "bearerAuth": [] 5894 - } 5895 - ], 5896 - "parameters": [], 5897 - "requestBody": { 5898 - "required": true, 5899 - "content": { 5900 - "application/json": { 5901 - "schema": { 5902 - "type": "object", 5903 - "properties": { 5904 - "invitationId": { 5905 - "type": "string", 5906 - "description": "The ID of the invitation to accept" 5907 - } 5908 - }, 5909 - "required": [ 5910 - "invitationId" 5911 - ] 5912 - } 5913 - } 5914 - } 5915 - }, 5916 - "responses": { 5917 - "200": { 5918 - "description": "Success", 5919 - "content": { 5920 - "application/json": { 5921 - "schema": { 5922 - "type": "object", 5923 - "properties": { 5924 - "invitation": { 5925 - "type": "object" 5926 - }, 5927 - "member": { 5928 - "type": "object" 5929 - } 5930 - } 5931 - } 5932 - } 5933 - } 5934 - }, 5935 - "400": { 5936 - "content": { 5937 - "application/json": { 5938 - "schema": { 5939 - "type": "object", 5940 - "properties": { 5941 - "message": { 5942 - "type": "string" 5943 - } 5944 - }, 5945 - "required": [ 5946 - "message" 5947 - ] 5948 - } 5949 - } 5950 - }, 5951 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 5952 - }, 5953 - "401": { 5954 - "content": { 5955 - "application/json": { 5956 - "schema": { 5957 - "type": "object", 5958 - "properties": { 5959 - "message": { 5960 - "type": "string" 5961 - } 5962 - }, 5963 - "required": [ 5964 - "message" 5965 - ] 5966 - } 5967 - } 5968 - }, 5969 - "description": "Unauthorized. Due to missing or invalid authentication." 5970 - }, 5971 - "403": { 5972 - "content": { 5973 - "application/json": { 5974 - "schema": { 5975 - "type": "object", 5976 - "properties": { 5977 - "message": { 5978 - "type": "string" 5979 - } 5980 - } 5981 - } 5982 - } 5983 - }, 5984 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 5985 - }, 5986 - "404": { 5987 - "content": { 5988 - "application/json": { 5989 - "schema": { 5990 - "type": "object", 5991 - "properties": { 5992 - "message": { 5993 - "type": "string" 5994 - } 5995 - } 5996 - } 5997 - } 5998 - }, 5999 - "description": "Not Found. The requested resource was not found." 6000 - }, 6001 - "429": { 6002 - "content": { 6003 - "application/json": { 6004 - "schema": { 6005 - "type": "object", 6006 - "properties": { 6007 - "message": { 6008 - "type": "string" 6009 - } 6010 - } 6011 - } 6012 - } 6013 - }, 6014 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 6015 - }, 6016 - "500": { 6017 - "content": { 6018 - "application/json": { 6019 - "schema": { 6020 - "type": "object", 6021 - "properties": { 6022 - "message": { 6023 - "type": "string" 6024 - } 6025 - } 6026 - } 6027 - } 6028 - }, 6029 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 6030 - } 6031 - }, 6032 - "operationId": "acceptOrganizationInvitation", 6033 - "summary": "Accept Organization Invitation" 6034 - } 6035 - }, 6036 - "/auth/organization/get-invitation": { 6037 - "get": { 6038 - "tags": [ 6039 - "Organization Management" 6040 - ], 6041 - "description": "Get an invitation by ID", 6042 - "security": [ 6043 - { 6044 - "bearerAuth": [] 6045 - } 6046 - ], 6047 - "parameters": [ 6048 - { 6049 - "name": "id", 6050 - "in": "query", 6051 - "schema": { 6052 - "type": "string", 6053 - "description": "The ID of the invitation to get" 6054 - } 6055 - } 6056 - ], 6057 - "responses": { 6058 - "200": { 6059 - "description": "Success", 6060 - "content": { 6061 - "application/json": { 6062 - "schema": { 6063 - "type": "object", 6064 - "properties": { 6065 - "id": { 6066 - "type": "string" 6067 - }, 6068 - "email": { 6069 - "type": "string" 6070 - }, 6071 - "role": { 6072 - "type": "string" 6073 - }, 6074 - "organizationId": { 6075 - "type": "string" 6076 - }, 6077 - "inviterId": { 6078 - "type": "string" 6079 - }, 6080 - "status": { 6081 - "type": "string" 6082 - }, 6083 - "expiresAt": { 6084 - "type": "string" 6085 - }, 6086 - "organizationName": { 6087 - "type": "string" 6088 - }, 6089 - "organizationSlug": { 6090 - "type": "string" 6091 - }, 6092 - "inviterEmail": { 6093 - "type": "string" 6094 - } 6095 - }, 6096 - "required": [ 6097 - "id", 6098 - "email", 6099 - "role", 6100 - "organizationId", 6101 - "inviterId", 6102 - "status", 6103 - "expiresAt", 6104 - "organizationName", 6105 - "organizationSlug", 6106 - "inviterEmail" 6107 - ] 6108 - } 6109 - } 6110 - } 6111 - }, 6112 - "400": { 6113 - "content": { 6114 - "application/json": { 6115 - "schema": { 6116 - "type": "object", 6117 - "properties": { 6118 - "message": { 6119 - "type": "string" 6120 - } 6121 - }, 6122 - "required": [ 6123 - "message" 6124 - ] 6125 - } 6126 - } 6127 - }, 6128 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 6129 - }, 6130 - "401": { 6131 - "content": { 6132 - "application/json": { 6133 - "schema": { 6134 - "type": "object", 6135 - "properties": { 6136 - "message": { 6137 - "type": "string" 6138 - } 6139 - }, 6140 - "required": [ 6141 - "message" 6142 - ] 6143 - } 6144 - } 6145 - }, 6146 - "description": "Unauthorized. Due to missing or invalid authentication." 6147 - }, 6148 - "403": { 6149 - "content": { 6150 - "application/json": { 6151 - "schema": { 6152 - "type": "object", 6153 - "properties": { 6154 - "message": { 6155 - "type": "string" 6156 - } 6157 - } 6158 - } 6159 - } 6160 - }, 6161 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 6162 - }, 6163 - "404": { 6164 - "content": { 6165 - "application/json": { 6166 - "schema": { 6167 - "type": "object", 6168 - "properties": { 6169 - "message": { 6170 - "type": "string" 6171 - } 6172 - } 6173 - } 6174 - } 6175 - }, 6176 - "description": "Not Found. The requested resource was not found." 6177 - }, 6178 - "429": { 6179 - "content": { 6180 - "application/json": { 6181 - "schema": { 6182 - "type": "object", 6183 - "properties": { 6184 - "message": { 6185 - "type": "string" 6186 - } 6187 - } 6188 - } 6189 - } 6190 - }, 6191 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 6192 - }, 6193 - "500": { 6194 - "content": { 6195 - "application/json": { 6196 - "schema": { 6197 - "type": "object", 6198 - "properties": { 6199 - "message": { 6200 - "type": "string" 6201 - } 6202 - } 6203 - } 6204 - } 6205 - }, 6206 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 6207 - } 6208 - }, 6209 - "operationId": "getOrganizationInvitation", 6210 - "summary": "Get Organization Invitation" 6211 - } 6212 - }, 6213 - "/auth/organization/reject-invitation": { 6214 - "post": { 6215 - "tags": [ 6216 - "Organization Management" 6217 - ], 6218 - "description": "Reject an invitation to an organization", 6219 - "security": [ 6220 - { 6221 - "bearerAuth": [] 6222 - } 6223 - ], 6224 - "parameters": [], 6225 - "requestBody": { 6226 - "required": true, 6227 - "content": { 6228 - "application/json": { 6229 - "schema": { 6230 - "type": "object", 6231 - "properties": { 6232 - "invitationId": { 6233 - "type": "string", 6234 - "description": "The ID of the invitation to reject" 6235 - } 6236 - }, 6237 - "required": [ 6238 - "invitationId" 6239 - ] 6240 - } 6241 - } 6242 - } 6243 - }, 6244 - "responses": { 6245 - "200": { 6246 - "description": "Success", 6247 - "content": { 6248 - "application/json": { 6249 - "schema": { 6250 - "type": "object", 6251 - "properties": { 6252 - "invitation": { 6253 - "type": "object" 6254 - }, 6255 - "member": { 6256 - "type": "object", 6257 - "nullable": true 6258 - } 6259 - } 6260 - } 6261 - } 6262 - } 6263 - }, 6264 - "400": { 6265 - "content": { 6266 - "application/json": { 6267 - "schema": { 6268 - "type": "object", 6269 - "properties": { 6270 - "message": { 6271 - "type": "string" 6272 - } 6273 - }, 6274 - "required": [ 6275 - "message" 6276 - ] 6277 - } 6278 - } 6279 - }, 6280 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 6281 - }, 6282 - "401": { 6283 - "content": { 6284 - "application/json": { 6285 - "schema": { 6286 - "type": "object", 6287 - "properties": { 6288 - "message": { 6289 - "type": "string" 6290 - } 6291 - }, 6292 - "required": [ 6293 - "message" 6294 - ] 6295 - } 6296 - } 6297 - }, 6298 - "description": "Unauthorized. Due to missing or invalid authentication." 6299 - }, 6300 - "403": { 6301 - "content": { 6302 - "application/json": { 6303 - "schema": { 6304 - "type": "object", 6305 - "properties": { 6306 - "message": { 6307 - "type": "string" 6308 - } 6309 - } 6310 - } 6311 - } 6312 - }, 6313 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 6314 - }, 6315 - "404": { 6316 - "content": { 6317 - "application/json": { 6318 - "schema": { 6319 - "type": "object", 6320 - "properties": { 6321 - "message": { 6322 - "type": "string" 6323 - } 6324 - } 6325 - } 6326 - } 6327 - }, 6328 - "description": "Not Found. The requested resource was not found." 6329 - }, 6330 - "429": { 6331 - "content": { 6332 - "application/json": { 6333 - "schema": { 6334 - "type": "object", 6335 - "properties": { 6336 - "message": { 6337 - "type": "string" 6338 - } 6339 - } 6340 - } 6341 - } 6342 - }, 6343 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 6344 - }, 6345 - "500": { 6346 - "content": { 6347 - "application/json": { 6348 - "schema": { 6349 - "type": "object", 6350 - "properties": { 6351 - "message": { 6352 - "type": "string" 6353 - } 6354 - } 6355 - } 6356 - } 6357 - }, 6358 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 6359 - } 6360 - }, 6361 - "operationId": "rejectOrganizationInvitation", 6362 - "summary": "Reject Organization Invitation" 6363 - } 6364 - }, 6365 - "/auth/organization/list-invitations": { 6366 - "get": { 6367 - "tags": [ 6368 - "Organization Management" 6369 - ], 6370 - "security": [ 6371 - { 6372 - "bearerAuth": [] 6373 - } 6374 - ], 6375 - "parameters": [], 6376 - "responses": { 6377 - "400": { 6378 - "content": { 6379 - "application/json": { 6380 - "schema": { 6381 - "type": "object", 6382 - "properties": { 6383 - "message": { 6384 - "type": "string" 6385 - } 6386 - }, 6387 - "required": [ 6388 - "message" 6389 - ] 6390 - } 6391 - } 6392 - }, 6393 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 6394 - }, 6395 - "401": { 6396 - "content": { 6397 - "application/json": { 6398 - "schema": { 6399 - "type": "object", 6400 - "properties": { 6401 - "message": { 6402 - "type": "string" 6403 - } 6404 - }, 6405 - "required": [ 6406 - "message" 6407 - ] 6408 - } 6409 - } 6410 - }, 6411 - "description": "Unauthorized. Due to missing or invalid authentication." 6412 - }, 6413 - "403": { 6414 - "content": { 6415 - "application/json": { 6416 - "schema": { 6417 - "type": "object", 6418 - "properties": { 6419 - "message": { 6420 - "type": "string" 6421 - } 6422 - } 6423 - } 6424 - } 6425 - }, 6426 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 6427 - }, 6428 - "404": { 6429 - "content": { 6430 - "application/json": { 6431 - "schema": { 6432 - "type": "object", 6433 - "properties": { 6434 - "message": { 6435 - "type": "string" 6436 - } 6437 - } 6438 - } 6439 - } 6440 - }, 6441 - "description": "Not Found. The requested resource was not found." 6442 - }, 6443 - "429": { 6444 - "content": { 6445 - "application/json": { 6446 - "schema": { 6447 - "type": "object", 6448 - "properties": { 6449 - "message": { 6450 - "type": "string" 6451 - } 6452 - } 6453 - } 6454 - } 6455 - }, 6456 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 6457 - }, 6458 - "500": { 6459 - "content": { 6460 - "application/json": { 6461 - "schema": { 6462 - "type": "object", 6463 - "properties": { 6464 - "message": { 6465 - "type": "string" 6466 - } 6467 - } 6468 - } 6469 - } 6470 - }, 6471 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 6472 - } 6473 - }, 6474 - "operationId": "listOrganizationInvitations", 6475 - "summary": "List Organization Invitations" 6476 - } 6477 - }, 6478 - "/auth/organization/get-active-member": { 6479 - "get": { 6480 - "tags": [ 6481 - "Organization Management" 6482 - ], 6483 - "description": "Get the member details of the active organization", 6484 - "security": [ 6485 - { 6486 - "bearerAuth": [] 6487 - } 6488 - ], 6489 - "parameters": [], 6490 - "responses": { 6491 - "200": { 6492 - "description": "Success", 6493 - "content": { 6494 - "application/json": { 6495 - "schema": { 6496 - "type": "object", 6497 - "properties": { 6498 - "id": { 6499 - "type": "string" 6500 - }, 6501 - "userId": { 6502 - "type": "string" 6503 - }, 6504 - "organizationId": { 6505 - "type": "string" 6506 - }, 6507 - "role": { 6508 - "type": "string" 6509 - } 6510 - }, 6511 - "required": [ 6512 - "id", 6513 - "userId", 6514 - "organizationId", 6515 - "role" 6516 - ] 6517 - } 6518 - } 6519 - } 6520 - }, 6521 - "400": { 6522 - "content": { 6523 - "application/json": { 6524 - "schema": { 6525 - "type": "object", 6526 - "properties": { 6527 - "message": { 6528 - "type": "string" 6529 - } 6530 - }, 6531 - "required": [ 6532 - "message" 6533 - ] 6534 - } 6535 - } 6536 - }, 6537 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 6538 - }, 6539 - "401": { 6540 - "content": { 6541 - "application/json": { 6542 - "schema": { 6543 - "type": "object", 6544 - "properties": { 6545 - "message": { 6546 - "type": "string" 6547 - } 6548 - }, 6549 - "required": [ 6550 - "message" 6551 - ] 6552 - } 6553 - } 6554 - }, 6555 - "description": "Unauthorized. Due to missing or invalid authentication." 6556 - }, 6557 - "403": { 6558 - "content": { 6559 - "application/json": { 6560 - "schema": { 6561 - "type": "object", 6562 - "properties": { 6563 - "message": { 6564 - "type": "string" 6565 - } 6566 - } 6567 - } 6568 - } 6569 - }, 6570 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 6571 - }, 6572 - "404": { 6573 - "content": { 6574 - "application/json": { 6575 - "schema": { 6576 - "type": "object", 6577 - "properties": { 6578 - "message": { 6579 - "type": "string" 6580 - } 6581 - } 6582 - } 6583 - } 6584 - }, 6585 - "description": "Not Found. The requested resource was not found." 6586 - }, 6587 - "429": { 6588 - "content": { 6589 - "application/json": { 6590 - "schema": { 6591 - "type": "object", 6592 - "properties": { 6593 - "message": { 6594 - "type": "string" 6595 - } 6596 - } 6597 - } 6598 - } 6599 - }, 6600 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 6601 - }, 6602 - "500": { 6603 - "content": { 6604 - "application/json": { 6605 - "schema": { 6606 - "type": "object", 6607 - "properties": { 6608 - "message": { 6609 - "type": "string" 6610 - } 6611 - } 6612 - } 6613 - } 6614 - }, 6615 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 6616 - } 6617 - }, 6618 - "operationId": "getOrganizationActiveMember", 6619 - "summary": "Get Organization Active Member" 6620 - } 6621 - }, 6622 - "/auth/organization/check-slug": { 6623 - "post": { 6624 - "tags": [ 6625 - "Organization Management" 6626 - ], 6627 - "security": [ 6628 - { 6629 - "bearerAuth": [] 6630 - } 6631 - ], 6632 - "parameters": [], 6633 - "requestBody": { 6634 - "required": true, 6635 - "content": { 6636 - "application/json": { 6637 - "schema": { 6638 - "type": "object", 6639 - "properties": { 6640 - "slug": { 6641 - "type": "string", 6642 - "description": "The organization slug to check. Eg: \"my-org\"" 6643 - } 6644 - }, 6645 - "required": [ 6646 - "slug" 6647 - ] 6648 - } 6649 - } 6650 - } 6651 - }, 6652 - "responses": { 6653 - "400": { 6654 - "content": { 6655 - "application/json": { 6656 - "schema": { 6657 - "type": "object", 6658 - "properties": { 6659 - "message": { 6660 - "type": "string" 6661 - } 6662 - }, 6663 - "required": [ 6664 - "message" 6665 - ] 6666 - } 6667 - } 6668 - }, 6669 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 6670 - }, 6671 - "401": { 6672 - "content": { 6673 - "application/json": { 6674 - "schema": { 6675 - "type": "object", 6676 - "properties": { 6677 - "message": { 6678 - "type": "string" 6679 - } 6680 - }, 6681 - "required": [ 6682 - "message" 6683 - ] 6684 - } 6685 - } 6686 - }, 6687 - "description": "Unauthorized. Due to missing or invalid authentication." 6688 - }, 6689 - "403": { 6690 - "content": { 6691 - "application/json": { 6692 - "schema": { 6693 - "type": "object", 6694 - "properties": { 6695 - "message": { 6696 - "type": "string" 6697 - } 6698 - } 6699 - } 6700 - } 6701 - }, 6702 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 6703 - }, 6704 - "404": { 6705 - "content": { 6706 - "application/json": { 6707 - "schema": { 6708 - "type": "object", 6709 - "properties": { 6710 - "message": { 6711 - "type": "string" 6712 - } 6713 - } 6714 - } 6715 - } 6716 - }, 6717 - "description": "Not Found. The requested resource was not found." 6718 - }, 6719 - "429": { 6720 - "content": { 6721 - "application/json": { 6722 - "schema": { 6723 - "type": "object", 6724 - "properties": { 6725 - "message": { 6726 - "type": "string" 6727 - } 6728 - } 6729 - } 6730 - } 6731 - }, 6732 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 6733 - }, 6734 - "500": { 6735 - "content": { 6736 - "application/json": { 6737 - "schema": { 6738 - "type": "object", 6739 - "properties": { 6740 - "message": { 6741 - "type": "string" 6742 - } 6743 - } 6744 - } 6745 - } 6746 - }, 6747 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 6748 - } 6749 - }, 6750 - "operationId": "checkOrganizationSlug", 6751 - "summary": "Check Organization Slug" 6752 - } 6753 - }, 6754 - "/auth/organization/remove-member": { 6755 - "post": { 6756 - "tags": [ 6757 - "Organization Management" 6758 - ], 6759 - "description": "Remove a member from an organization", 6760 - "security": [ 6761 - { 6762 - "bearerAuth": [] 6763 - } 6764 - ], 6765 - "parameters": [], 6766 - "requestBody": { 6767 - "required": true, 6768 - "content": { 6769 - "application/json": { 6770 - "schema": { 6771 - "type": "object", 6772 - "properties": { 6773 - "memberIdOrEmail": { 6774 - "type": "string", 6775 - "description": "The ID or email of the member to remove" 6776 - }, 6777 - "organizationId": { 6778 - "type": "string", 6779 - "description": "The ID of the organization to remove the member from. If not provided, the active organization will be used. Eg: \"org-id\"", 6780 - "nullable": true 6781 - } 6782 - }, 6783 - "required": [ 6784 - "memberIdOrEmail" 6785 - ] 6786 - } 6787 - } 6788 - } 6789 - }, 6790 - "responses": { 6791 - "200": { 6792 - "description": "Success", 6793 - "content": { 6794 - "application/json": { 6795 - "schema": { 6796 - "type": "object", 6797 - "properties": { 6798 - "member": { 6799 - "type": "object", 6800 - "properties": { 6801 - "id": { 6802 - "type": "string" 6803 - }, 6804 - "userId": { 6805 - "type": "string" 6806 - }, 6807 - "organizationId": { 6808 - "type": "string" 6809 - }, 6810 - "role": { 6811 - "type": "string" 6812 - } 6813 - }, 6814 - "required": [ 6815 - "id", 6816 - "userId", 6817 - "organizationId", 6818 - "role" 6819 - ] 6820 - } 6821 - }, 6822 - "required": [ 6823 - "member" 6824 - ] 6825 - } 6826 - } 6827 - } 6828 - }, 6829 - "400": { 6830 - "content": { 6831 - "application/json": { 6832 - "schema": { 6833 - "type": "object", 6834 - "properties": { 6835 - "message": { 6836 - "type": "string" 6837 - } 6838 - }, 6839 - "required": [ 6840 - "message" 6841 - ] 6842 - } 6843 - } 6844 - }, 6845 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 6846 - }, 6847 - "401": { 6848 - "content": { 6849 - "application/json": { 6850 - "schema": { 6851 - "type": "object", 6852 - "properties": { 6853 - "message": { 6854 - "type": "string" 6855 - } 6856 - }, 6857 - "required": [ 6858 - "message" 6859 - ] 6860 - } 6861 - } 6862 - }, 6863 - "description": "Unauthorized. Due to missing or invalid authentication." 6864 - }, 6865 - "403": { 6866 - "content": { 6867 - "application/json": { 6868 - "schema": { 6869 - "type": "object", 6870 - "properties": { 6871 - "message": { 6872 - "type": "string" 6873 - } 6874 - } 6875 - } 6876 - } 6877 - }, 6878 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 6879 - }, 6880 - "404": { 6881 - "content": { 6882 - "application/json": { 6883 - "schema": { 6884 - "type": "object", 6885 - "properties": { 6886 - "message": { 6887 - "type": "string" 6888 - } 6889 - } 6890 - } 6891 - } 6892 - }, 6893 - "description": "Not Found. The requested resource was not found." 6894 - }, 6895 - "429": { 6896 - "content": { 6897 - "application/json": { 6898 - "schema": { 6899 - "type": "object", 6900 - "properties": { 6901 - "message": { 6902 - "type": "string" 6903 - } 6904 - } 6905 - } 6906 - } 6907 - }, 6908 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 6909 - }, 6910 - "500": { 6911 - "content": { 6912 - "application/json": { 6913 - "schema": { 6914 - "type": "object", 6915 - "properties": { 6916 - "message": { 6917 - "type": "string" 6918 - } 6919 - } 6920 - } 6921 - } 6922 - }, 6923 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 6924 - } 6925 - }, 6926 - "operationId": "removeOrganizationMember", 6927 - "summary": "Remove Organization Member" 6928 - } 6929 - }, 6930 - "/auth/organization/update-member-role": { 6931 - "post": { 6932 - "tags": [ 6933 - "Organization Management" 6934 - ], 6935 - "description": "Update the role of a member in an organization", 6936 - "operationId": "updateOrganizationMemberRole", 6937 - "security": [ 6938 - { 6939 - "bearerAuth": [] 6940 - } 6941 - ], 6942 - "parameters": [], 6943 - "requestBody": { 6944 - "required": true, 6945 - "content": { 6946 - "application/json": { 6947 - "schema": { 6948 - "type": "object", 6949 - "properties": { 6950 - "role": { 6951 - "type": "string", 6952 - "description": "The new role to be applied. This can be a string or array of strings representing the roles. Eg: [\"admin\", \"sale\"]" 6953 - }, 6954 - "memberId": { 6955 - "type": "string", 6956 - "description": "The member id to apply the role update to. Eg: \"member-id\"" 6957 - }, 6958 - "organizationId": { 6959 - "type": "string", 6960 - "description": "An optional organization ID which the member is a part of to apply the role update. If not provided, you must provide session headers to get the active organization. Eg: \"organization-id\"", 6961 - "nullable": true 6962 - } 6963 - }, 6964 - "required": [ 6965 - "role", 6966 - "memberId" 6967 - ] 6968 - } 6969 - } 6970 - } 6971 - }, 6972 - "responses": { 6973 - "200": { 6974 - "description": "Success", 6975 - "content": { 6976 - "application/json": { 6977 - "schema": { 6978 - "type": "object", 6979 - "properties": { 6980 - "member": { 6981 - "type": "object", 6982 - "properties": { 6983 - "id": { 6984 - "type": "string" 6985 - }, 6986 - "userId": { 6987 - "type": "string" 6988 - }, 6989 - "organizationId": { 6990 - "type": "string" 6991 - }, 6992 - "role": { 6993 - "type": "string" 6994 - } 6995 - }, 6996 - "required": [ 6997 - "id", 6998 - "userId", 6999 - "organizationId", 7000 - "role" 7001 - ] 7002 - } 7003 - }, 7004 - "required": [ 7005 - "member" 7006 - ] 7007 - } 7008 - } 7009 - } 7010 - }, 7011 - "400": { 7012 - "content": { 7013 - "application/json": { 7014 - "schema": { 7015 - "type": "object", 7016 - "properties": { 7017 - "message": { 7018 - "type": "string" 7019 - } 7020 - }, 7021 - "required": [ 7022 - "message" 7023 - ] 7024 - } 7025 - } 7026 - }, 7027 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 7028 - }, 7029 - "401": { 7030 - "content": { 7031 - "application/json": { 7032 - "schema": { 7033 - "type": "object", 7034 - "properties": { 7035 - "message": { 7036 - "type": "string" 7037 - } 7038 - }, 7039 - "required": [ 7040 - "message" 7041 - ] 7042 - } 7043 - } 7044 - }, 7045 - "description": "Unauthorized. Due to missing or invalid authentication." 7046 - }, 7047 - "403": { 7048 - "content": { 7049 - "application/json": { 7050 - "schema": { 7051 - "type": "object", 7052 - "properties": { 7053 - "message": { 7054 - "type": "string" 7055 - } 7056 - } 7057 - } 7058 - } 7059 - }, 7060 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 7061 - }, 7062 - "404": { 7063 - "content": { 7064 - "application/json": { 7065 - "schema": { 7066 - "type": "object", 7067 - "properties": { 7068 - "message": { 7069 - "type": "string" 7070 - } 7071 - } 7072 - } 7073 - } 7074 - }, 7075 - "description": "Not Found. The requested resource was not found." 7076 - }, 7077 - "429": { 7078 - "content": { 7079 - "application/json": { 7080 - "schema": { 7081 - "type": "object", 7082 - "properties": { 7083 - "message": { 7084 - "type": "string" 7085 - } 7086 - } 7087 - } 7088 - } 7089 - }, 7090 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 7091 - }, 7092 - "500": { 7093 - "content": { 7094 - "application/json": { 7095 - "schema": { 7096 - "type": "object", 7097 - "properties": { 7098 - "message": { 7099 - "type": "string" 7100 - } 7101 - } 7102 - } 7103 - } 7104 - }, 7105 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 7106 - } 7107 - }, 7108 - "summary": "Update Organization Member Role" 7109 - } 7110 - }, 7111 - "/auth/organization/leave": { 7112 - "post": { 7113 - "tags": [ 7114 - "Organization Management" 7115 - ], 7116 - "security": [ 7117 - { 7118 - "bearerAuth": [] 7119 - } 7120 - ], 7121 - "parameters": [], 7122 - "requestBody": { 7123 - "required": true, 7124 - "content": { 7125 - "application/json": { 7126 - "schema": { 7127 - "type": "object", 7128 - "properties": { 7129 - "organizationId": { 7130 - "type": "string", 7131 - "description": "The organization Id for the member to leave. Eg: \"organization-id\"" 7132 - } 7133 - }, 7134 - "required": [ 7135 - "organizationId" 7136 - ] 7137 - } 7138 - } 7139 - } 7140 - }, 7141 - "responses": { 7142 - "400": { 7143 - "content": { 7144 - "application/json": { 7145 - "schema": { 7146 - "type": "object", 7147 - "properties": { 7148 - "message": { 7149 - "type": "string" 7150 - } 7151 - }, 7152 - "required": [ 7153 - "message" 7154 - ] 7155 - } 7156 - } 7157 - }, 7158 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 7159 - }, 7160 - "401": { 7161 - "content": { 7162 - "application/json": { 7163 - "schema": { 7164 - "type": "object", 7165 - "properties": { 7166 - "message": { 7167 - "type": "string" 7168 - } 7169 - }, 7170 - "required": [ 7171 - "message" 7172 - ] 7173 - } 7174 - } 7175 - }, 7176 - "description": "Unauthorized. Due to missing or invalid authentication." 7177 - }, 7178 - "403": { 7179 - "content": { 7180 - "application/json": { 7181 - "schema": { 7182 - "type": "object", 7183 - "properties": { 7184 - "message": { 7185 - "type": "string" 7186 - } 7187 - } 7188 - } 7189 - } 7190 - }, 7191 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 7192 - }, 7193 - "404": { 7194 - "content": { 7195 - "application/json": { 7196 - "schema": { 7197 - "type": "object", 7198 - "properties": { 7199 - "message": { 7200 - "type": "string" 7201 - } 7202 - } 7203 - } 7204 - } 7205 - }, 7206 - "description": "Not Found. The requested resource was not found." 7207 - }, 7208 - "429": { 7209 - "content": { 7210 - "application/json": { 7211 - "schema": { 7212 - "type": "object", 7213 - "properties": { 7214 - "message": { 7215 - "type": "string" 7216 - } 7217 - } 7218 - } 7219 - } 7220 - }, 7221 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 7222 - }, 7223 - "500": { 7224 - "content": { 7225 - "application/json": { 7226 - "schema": { 7227 - "type": "object", 7228 - "properties": { 7229 - "message": { 7230 - "type": "string" 7231 - } 7232 - } 7233 - } 7234 - } 7235 - }, 7236 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 7237 - } 7238 - }, 7239 - "operationId": "leaveOrganization", 7240 - "summary": "Leave Organization" 7241 - } 7242 - }, 7243 - "/auth/organization/list-user-invitations": { 7244 - "get": { 7245 - "tags": [ 7246 - "Organization Management" 7247 - ], 7248 - "description": "List all invitations a user has received", 7249 - "security": [ 7250 - { 7251 - "bearerAuth": [] 7252 - } 7253 - ], 7254 - "parameters": [], 7255 - "responses": { 7256 - "200": { 7257 - "description": "Success", 7258 - "content": { 7259 - "application/json": { 7260 - "schema": { 7261 - "type": "array", 7262 - "items": { 7263 - "type": "object", 7264 - "properties": { 7265 - "id": { 7266 - "type": "string" 7267 - }, 7268 - "email": { 7269 - "type": "string" 7270 - }, 7271 - "role": { 7272 - "type": "string" 7273 - }, 7274 - "organizationId": { 7275 - "type": "string" 7276 - }, 7277 - "organizationName": { 7278 - "type": "string" 7279 - }, 7280 - "inviterId": { 7281 - "type": "string", 7282 - "description": "The ID of the user who created the invitation" 7283 - }, 7284 - "teamId": { 7285 - "type": "string", 7286 - "description": "The ID of the team associated with the invitation", 7287 - "nullable": true 7288 - }, 7289 - "status": { 7290 - "type": "string" 7291 - }, 7292 - "expiresAt": { 7293 - "type": "string" 7294 - }, 7295 - "createdAt": { 7296 - "type": "string" 7297 - } 7298 - }, 7299 - "required": [ 7300 - "id", 7301 - "email", 7302 - "role", 7303 - "organizationId", 7304 - "organizationName", 7305 - "inviterId", 7306 - "status", 7307 - "expiresAt", 7308 - "createdAt" 7309 - ] 7310 - } 7311 - } 7312 - } 7313 - } 7314 - }, 7315 - "400": { 7316 - "content": { 7317 - "application/json": { 7318 - "schema": { 7319 - "type": "object", 7320 - "properties": { 7321 - "message": { 7322 - "type": "string" 7323 - } 7324 - }, 7325 - "required": [ 7326 - "message" 7327 - ] 7328 - } 7329 - } 7330 - }, 7331 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 7332 - }, 7333 - "401": { 7334 - "content": { 7335 - "application/json": { 7336 - "schema": { 7337 - "type": "object", 7338 - "properties": { 7339 - "message": { 7340 - "type": "string" 7341 - } 7342 - }, 7343 - "required": [ 7344 - "message" 7345 - ] 7346 - } 7347 - } 7348 - }, 7349 - "description": "Unauthorized. Due to missing or invalid authentication." 7350 - }, 7351 - "403": { 7352 - "content": { 7353 - "application/json": { 7354 - "schema": { 7355 - "type": "object", 7356 - "properties": { 7357 - "message": { 7358 - "type": "string" 7359 - } 7360 - } 7361 - } 7362 - } 7363 - }, 7364 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 7365 - }, 7366 - "404": { 7367 - "content": { 7368 - "application/json": { 7369 - "schema": { 7370 - "type": "object", 7371 - "properties": { 7372 - "message": { 7373 - "type": "string" 7374 - } 7375 - } 7376 - } 7377 - } 7378 - }, 7379 - "description": "Not Found. The requested resource was not found." 7380 - }, 7381 - "429": { 7382 - "content": { 7383 - "application/json": { 7384 - "schema": { 7385 - "type": "object", 7386 - "properties": { 7387 - "message": { 7388 - "type": "string" 7389 - } 7390 - } 7391 - } 7392 - } 7393 - }, 7394 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 7395 - }, 7396 - "500": { 7397 - "content": { 7398 - "application/json": { 7399 - "schema": { 7400 - "type": "object", 7401 - "properties": { 7402 - "message": { 7403 - "type": "string" 7404 - } 7405 - } 7406 - } 7407 - } 7408 - }, 7409 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 7410 - } 7411 - }, 7412 - "operationId": "listOrganizationUserInvitations", 7413 - "summary": "List Organization User Invitations" 7414 - } 7415 - }, 7416 - "/auth/organization/list-members": { 7417 - "get": { 7418 - "tags": [ 7419 - "Organization Management" 7420 - ], 7421 - "security": [ 7422 - { 7423 - "bearerAuth": [] 7424 - } 7425 - ], 7426 - "parameters": [], 7427 - "responses": { 7428 - "400": { 7429 - "content": { 7430 - "application/json": { 7431 - "schema": { 7432 - "type": "object", 7433 - "properties": { 7434 - "message": { 7435 - "type": "string" 7436 - } 7437 - }, 7438 - "required": [ 7439 - "message" 7440 - ] 7441 - } 7442 - } 7443 - }, 7444 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 7445 - }, 7446 - "401": { 7447 - "content": { 7448 - "application/json": { 7449 - "schema": { 7450 - "type": "object", 7451 - "properties": { 7452 - "message": { 7453 - "type": "string" 7454 - } 7455 - }, 7456 - "required": [ 7457 - "message" 7458 - ] 7459 - } 7460 - } 7461 - }, 7462 - "description": "Unauthorized. Due to missing or invalid authentication." 7463 - }, 7464 - "403": { 7465 - "content": { 7466 - "application/json": { 7467 - "schema": { 7468 - "type": "object", 7469 - "properties": { 7470 - "message": { 7471 - "type": "string" 7472 - } 7473 - } 7474 - } 7475 - } 7476 - }, 7477 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 7478 - }, 7479 - "404": { 7480 - "content": { 7481 - "application/json": { 7482 - "schema": { 7483 - "type": "object", 7484 - "properties": { 7485 - "message": { 7486 - "type": "string" 7487 - } 7488 - } 7489 - } 7490 - } 7491 - }, 7492 - "description": "Not Found. The requested resource was not found." 7493 - }, 7494 - "429": { 7495 - "content": { 7496 - "application/json": { 7497 - "schema": { 7498 - "type": "object", 7499 - "properties": { 7500 - "message": { 7501 - "type": "string" 7502 - } 7503 - } 7504 - } 7505 - } 7506 - }, 7507 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 7508 - }, 7509 - "500": { 7510 - "content": { 7511 - "application/json": { 7512 - "schema": { 7513 - "type": "object", 7514 - "properties": { 7515 - "message": { 7516 - "type": "string" 7517 - } 7518 - } 7519 - } 7520 - } 7521 - }, 7522 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 7523 - } 7524 - }, 7525 - "operationId": "listOrganizationMembers", 7526 - "summary": "List Organization Members" 7527 - } 7528 - }, 7529 - "/auth/organization/get-active-member-role": { 7530 - "get": { 7531 - "tags": [ 7532 - "Organization Management" 7533 - ], 7534 - "security": [ 7535 - { 7536 - "bearerAuth": [] 7537 - } 7538 - ], 7539 - "parameters": [], 7540 - "responses": { 7541 - "400": { 7542 - "content": { 7543 - "application/json": { 7544 - "schema": { 7545 - "type": "object", 7546 - "properties": { 7547 - "message": { 7548 - "type": "string" 7549 - } 7550 - }, 7551 - "required": [ 7552 - "message" 7553 - ] 7554 - } 7555 - } 7556 - }, 7557 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 7558 - }, 7559 - "401": { 7560 - "content": { 7561 - "application/json": { 7562 - "schema": { 7563 - "type": "object", 7564 - "properties": { 7565 - "message": { 7566 - "type": "string" 7567 - } 7568 - }, 7569 - "required": [ 7570 - "message" 7571 - ] 7572 - } 7573 - } 7574 - }, 7575 - "description": "Unauthorized. Due to missing or invalid authentication." 7576 - }, 7577 - "403": { 7578 - "content": { 7579 - "application/json": { 7580 - "schema": { 7581 - "type": "object", 7582 - "properties": { 7583 - "message": { 7584 - "type": "string" 7585 - } 7586 - } 7587 - } 7588 - } 7589 - }, 7590 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 7591 - }, 7592 - "404": { 7593 - "content": { 7594 - "application/json": { 7595 - "schema": { 7596 - "type": "object", 7597 - "properties": { 7598 - "message": { 7599 - "type": "string" 7600 - } 7601 - } 7602 - } 7603 - } 7604 - }, 7605 - "description": "Not Found. The requested resource was not found." 7606 - }, 7607 - "429": { 7608 - "content": { 7609 - "application/json": { 7610 - "schema": { 7611 - "type": "object", 7612 - "properties": { 7613 - "message": { 7614 - "type": "string" 7615 - } 7616 - } 7617 - } 7618 - } 7619 - }, 7620 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 7621 - }, 7622 - "500": { 7623 - "content": { 7624 - "application/json": { 7625 - "schema": { 7626 - "type": "object", 7627 - "properties": { 7628 - "message": { 7629 - "type": "string" 7630 - } 7631 - } 7632 - } 7633 - } 7634 - }, 7635 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 7636 - } 7637 - }, 7638 - "operationId": "getOrganizationActiveMemberRole", 7639 - "summary": "Get Organization Active Member Role" 7640 - } 7641 - }, 7642 - "/auth/organization/create-team": { 7643 - "post": { 7644 - "tags": [ 7645 - "Organization Management" 7646 - ], 7647 - "description": "Create a new team within an organization", 7648 - "security": [ 7649 - { 7650 - "bearerAuth": [] 7651 - } 7652 - ], 7653 - "parameters": [], 7654 - "requestBody": { 7655 - "required": true, 7656 - "content": { 7657 - "application/json": { 7658 - "schema": { 7659 - "type": "object", 7660 - "properties": { 7661 - "name": { 7662 - "type": "string", 7663 - "description": "The name of the team. Eg: \"my-team\"" 7664 - }, 7665 - "organizationId": { 7666 - "type": "string", 7667 - "description": "The organization ID which the team will be created in. Defaults to the active organization. Eg: \"organization-id\"", 7668 - "nullable": true 7669 - } 7670 - }, 7671 - "required": [ 7672 - "name" 7673 - ] 7674 - } 7675 - } 7676 - } 7677 - }, 7678 - "responses": { 7679 - "200": { 7680 - "description": "Team created successfully", 7681 - "content": { 7682 - "application/json": { 7683 - "schema": { 7684 - "type": "object", 7685 - "properties": { 7686 - "id": { 7687 - "type": "string", 7688 - "description": "Unique identifier of the created team" 7689 - }, 7690 - "name": { 7691 - "type": "string", 7692 - "description": "Name of the team" 7693 - }, 7694 - "organizationId": { 7695 - "type": "string", 7696 - "description": "ID of the organization the team belongs to" 7697 - }, 7698 - "createdAt": { 7699 - "type": "string", 7700 - "format": "date-time", 7701 - "description": "Timestamp when the team was created" 7702 - }, 7703 - "updatedAt": { 7704 - "type": "string", 7705 - "format": "date-time", 7706 - "description": "Timestamp when the team was last updated" 7707 - } 7708 - }, 7709 - "required": [ 7710 - "id", 7711 - "name", 7712 - "organizationId", 7713 - "createdAt", 7714 - "updatedAt" 7715 - ] 7716 - } 7717 - } 7718 - } 7719 - }, 7720 - "400": { 7721 - "content": { 7722 - "application/json": { 7723 - "schema": { 7724 - "type": "object", 7725 - "properties": { 7726 - "message": { 7727 - "type": "string" 7728 - } 7729 - }, 7730 - "required": [ 7731 - "message" 7732 - ] 7733 - } 7734 - } 7735 - }, 7736 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 7737 - }, 7738 - "401": { 7739 - "content": { 7740 - "application/json": { 7741 - "schema": { 7742 - "type": "object", 7743 - "properties": { 7744 - "message": { 7745 - "type": "string" 7746 - } 7747 - }, 7748 - "required": [ 7749 - "message" 7750 - ] 7751 - } 7752 - } 7753 - }, 7754 - "description": "Unauthorized. Due to missing or invalid authentication." 7755 - }, 7756 - "403": { 7757 - "content": { 7758 - "application/json": { 7759 - "schema": { 7760 - "type": "object", 7761 - "properties": { 7762 - "message": { 7763 - "type": "string" 7764 - } 7765 - } 7766 - } 7767 - } 7768 - }, 7769 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 7770 - }, 7771 - "404": { 7772 - "content": { 7773 - "application/json": { 7774 - "schema": { 7775 - "type": "object", 7776 - "properties": { 7777 - "message": { 7778 - "type": "string" 7779 - } 7780 - } 7781 - } 7782 - } 7783 - }, 7784 - "description": "Not Found. The requested resource was not found." 7785 - }, 7786 - "429": { 7787 - "content": { 7788 - "application/json": { 7789 - "schema": { 7790 - "type": "object", 7791 - "properties": { 7792 - "message": { 7793 - "type": "string" 7794 - } 7795 - } 7796 - } 7797 - } 7798 - }, 7799 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 7800 - }, 7801 - "500": { 7802 - "content": { 7803 - "application/json": { 7804 - "schema": { 7805 - "type": "object", 7806 - "properties": { 7807 - "message": { 7808 - "type": "string" 7809 - } 7810 - } 7811 - } 7812 - } 7813 - }, 7814 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 7815 - } 7816 - }, 7817 - "operationId": "createOrganizationTeam", 7818 - "summary": "Create Organization Team" 7819 - } 7820 - }, 7821 - "/auth/organization/list-teams": { 7822 - "get": { 7823 - "tags": [ 7824 - "Organization Management" 7825 - ], 7826 - "description": "List all teams in an organization", 7827 - "security": [ 7828 - { 7829 - "bearerAuth": [] 7830 - } 7831 - ], 7832 - "parameters": [], 7833 - "responses": { 7834 - "200": { 7835 - "description": "Teams retrieved successfully", 7836 - "content": { 7837 - "application/json": { 7838 - "schema": { 7839 - "type": "array", 7840 - "items": { 7841 - "type": "object", 7842 - "properties": { 7843 - "id": { 7844 - "type": "string", 7845 - "description": "Unique identifier of the team" 7846 - }, 7847 - "name": { 7848 - "type": "string", 7849 - "description": "Name of the team" 7850 - }, 7851 - "organizationId": { 7852 - "type": "string", 7853 - "description": "ID of the organization the team belongs to" 7854 - }, 7855 - "createdAt": { 7856 - "type": "string", 7857 - "format": "date-time", 7858 - "description": "Timestamp when the team was created" 7859 - }, 7860 - "updatedAt": { 7861 - "type": "string", 7862 - "format": "date-time", 7863 - "description": "Timestamp when the team was last updated" 7864 - } 7865 - }, 7866 - "required": [ 7867 - "id", 7868 - "name", 7869 - "organizationId", 7870 - "createdAt", 7871 - "updatedAt" 7872 - ] 7873 - }, 7874 - "description": "Array of team objects within the organization" 7875 - } 7876 - } 7877 - } 7878 - }, 7879 - "400": { 7880 - "content": { 7881 - "application/json": { 7882 - "schema": { 7883 - "type": "object", 7884 - "properties": { 7885 - "message": { 7886 - "type": "string" 7887 - } 7888 - }, 7889 - "required": [ 7890 - "message" 7891 - ] 7892 - } 7893 - } 7894 - }, 7895 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 7896 - }, 7897 - "401": { 7898 - "content": { 7899 - "application/json": { 7900 - "schema": { 7901 - "type": "object", 7902 - "properties": { 7903 - "message": { 7904 - "type": "string" 7905 - } 7906 - }, 7907 - "required": [ 7908 - "message" 7909 - ] 7910 - } 7911 - } 7912 - }, 7913 - "description": "Unauthorized. Due to missing or invalid authentication." 7914 - }, 7915 - "403": { 7916 - "content": { 7917 - "application/json": { 7918 - "schema": { 7919 - "type": "object", 7920 - "properties": { 7921 - "message": { 7922 - "type": "string" 7923 - } 7924 - } 7925 - } 7926 - } 7927 - }, 7928 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 7929 - }, 7930 - "404": { 7931 - "content": { 7932 - "application/json": { 7933 - "schema": { 7934 - "type": "object", 7935 - "properties": { 7936 - "message": { 7937 - "type": "string" 7938 - } 7939 - } 7940 - } 7941 - } 7942 - }, 7943 - "description": "Not Found. The requested resource was not found." 7944 - }, 7945 - "429": { 7946 - "content": { 7947 - "application/json": { 7948 - "schema": { 7949 - "type": "object", 7950 - "properties": { 7951 - "message": { 7952 - "type": "string" 7953 - } 7954 - } 7955 - } 7956 - } 7957 - }, 7958 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 7959 - }, 7960 - "500": { 7961 - "content": { 7962 - "application/json": { 7963 - "schema": { 7964 - "type": "object", 7965 - "properties": { 7966 - "message": { 7967 - "type": "string" 7968 - } 7969 - } 7970 - } 7971 - } 7972 - }, 7973 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 7974 - } 7975 - }, 7976 - "operationId": "listOrganizationTeams", 7977 - "summary": "List Organization Teams" 7978 - } 7979 - }, 7980 - "/auth/organization/remove-team": { 7981 - "post": { 7982 - "tags": [ 7983 - "Organization Management" 7984 - ], 7985 - "description": "Remove a team from an organization", 7986 - "security": [ 7987 - { 7988 - "bearerAuth": [] 7989 - } 7990 - ], 7991 - "parameters": [], 7992 - "requestBody": { 7993 - "required": true, 7994 - "content": { 7995 - "application/json": { 7996 - "schema": { 7997 - "type": "object", 7998 - "properties": { 7999 - "teamId": { 8000 - "type": "string", 8001 - "description": "The team ID of the team to remove. Eg: \"team-id\"" 8002 - }, 8003 - "organizationId": { 8004 - "type": "string", 8005 - "description": "The organization ID which the team falls under. If not provided, it will default to the user's active organization. Eg: \"organization-id\"", 8006 - "nullable": true 8007 - } 8008 - }, 8009 - "required": [ 8010 - "teamId" 8011 - ] 8012 - } 8013 - } 8014 - } 8015 - }, 8016 - "responses": { 8017 - "200": { 8018 - "description": "Team removed successfully", 8019 - "content": { 8020 - "application/json": { 8021 - "schema": { 8022 - "type": "object", 8023 - "properties": { 8024 - "message": { 8025 - "type": "string", 8026 - "description": "Confirmation message indicating successful removal", 8027 - "enum": [ 8028 - "Team removed successfully." 8029 - ] 8030 - } 8031 - }, 8032 - "required": [ 8033 - "message" 8034 - ] 8035 - } 8036 - } 8037 - } 8038 - }, 8039 - "400": { 8040 - "content": { 8041 - "application/json": { 8042 - "schema": { 8043 - "type": "object", 8044 - "properties": { 8045 - "message": { 8046 - "type": "string" 8047 - } 8048 - }, 8049 - "required": [ 8050 - "message" 8051 - ] 8052 - } 8053 - } 8054 - }, 8055 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 8056 - }, 8057 - "401": { 8058 - "content": { 8059 - "application/json": { 8060 - "schema": { 8061 - "type": "object", 8062 - "properties": { 8063 - "message": { 8064 - "type": "string" 8065 - } 8066 - }, 8067 - "required": [ 8068 - "message" 8069 - ] 8070 - } 8071 - } 8072 - }, 8073 - "description": "Unauthorized. Due to missing or invalid authentication." 8074 - }, 8075 - "403": { 8076 - "content": { 8077 - "application/json": { 8078 - "schema": { 8079 - "type": "object", 8080 - "properties": { 8081 - "message": { 8082 - "type": "string" 8083 - } 8084 - } 8085 - } 8086 - } 8087 - }, 8088 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 8089 - }, 8090 - "404": { 8091 - "content": { 8092 - "application/json": { 8093 - "schema": { 8094 - "type": "object", 8095 - "properties": { 8096 - "message": { 8097 - "type": "string" 8098 - } 8099 - } 8100 - } 8101 - } 8102 - }, 8103 - "description": "Not Found. The requested resource was not found." 8104 - }, 8105 - "429": { 8106 - "content": { 8107 - "application/json": { 8108 - "schema": { 8109 - "type": "object", 8110 - "properties": { 8111 - "message": { 8112 - "type": "string" 8113 - } 8114 - } 8115 - } 8116 - } 8117 - }, 8118 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 8119 - }, 8120 - "500": { 8121 - "content": { 8122 - "application/json": { 8123 - "schema": { 8124 - "type": "object", 8125 - "properties": { 8126 - "message": { 8127 - "type": "string" 8128 - } 8129 - } 8130 - } 8131 - } 8132 - }, 8133 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 8134 - } 8135 - }, 8136 - "operationId": "removeOrganizationTeam", 8137 - "summary": "Remove Organization Team" 8138 - } 8139 - }, 8140 - "/auth/organization/update-team": { 8141 - "post": { 8142 - "tags": [ 8143 - "Organization Management" 8144 - ], 8145 - "description": "Update an existing team in an organization", 8146 - "security": [ 8147 - { 8148 - "bearerAuth": [] 8149 - } 8150 - ], 8151 - "parameters": [], 8152 - "requestBody": { 8153 - "required": true, 8154 - "content": { 8155 - "application/json": { 8156 - "schema": { 8157 - "type": "object", 8158 - "properties": { 8159 - "teamId": { 8160 - "type": "string", 8161 - "description": "The ID of the team to be updated. Eg: \"team-id\"" 8162 - }, 8163 - "data": { 8164 - "type": "object", 8165 - "properties": { 8166 - "id": { 8167 - "type": "string", 8168 - "default": "vrJTKvZCXxj4Lop9wiAMXpztxBHNJnZF", 8169 - "nullable": true 8170 - }, 8171 - "name": { 8172 - "type": "string", 8173 - "nullable": true 8174 - }, 8175 - "organizationId": { 8176 - "type": "string", 8177 - "nullable": true 8178 - }, 8179 - "createdAt": { 8180 - "type": "string", 8181 - "nullable": true 8182 - }, 8183 - "updatedAt": { 8184 - "type": "string", 8185 - "nullable": true 8186 - } 8187 - } 8188 - } 8189 - }, 8190 - "required": [ 8191 - "teamId", 8192 - "data" 8193 - ] 8194 - } 8195 - } 8196 - } 8197 - }, 8198 - "responses": { 8199 - "200": { 8200 - "description": "Team updated successfully", 8201 - "content": { 8202 - "application/json": { 8203 - "schema": { 8204 - "type": "object", 8205 - "properties": { 8206 - "id": { 8207 - "type": "string", 8208 - "description": "Unique identifier of the updated team" 8209 - }, 8210 - "name": { 8211 - "type": "string", 8212 - "description": "Updated name of the team" 8213 - }, 8214 - "organizationId": { 8215 - "type": "string", 8216 - "description": "ID of the organization the team belongs to" 8217 - }, 8218 - "createdAt": { 8219 - "type": "string", 8220 - "format": "date-time", 8221 - "description": "Timestamp when the team was created" 8222 - }, 8223 - "updatedAt": { 8224 - "type": "string", 8225 - "format": "date-time", 8226 - "description": "Timestamp when the team was last updated" 8227 - } 8228 - }, 8229 - "required": [ 8230 - "id", 8231 - "name", 8232 - "organizationId", 8233 - "createdAt", 8234 - "updatedAt" 8235 - ] 8236 - } 8237 - } 8238 - } 8239 - }, 8240 - "400": { 8241 - "content": { 8242 - "application/json": { 8243 - "schema": { 8244 - "type": "object", 8245 - "properties": { 8246 - "message": { 8247 - "type": "string" 8248 - } 8249 - }, 8250 - "required": [ 8251 - "message" 8252 - ] 8253 - } 8254 - } 8255 - }, 8256 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 8257 - }, 8258 - "401": { 8259 - "content": { 8260 - "application/json": { 8261 - "schema": { 8262 - "type": "object", 8263 - "properties": { 8264 - "message": { 8265 - "type": "string" 8266 - } 8267 - }, 8268 - "required": [ 8269 - "message" 8270 - ] 8271 - } 8272 - } 8273 - }, 8274 - "description": "Unauthorized. Due to missing or invalid authentication." 8275 - }, 8276 - "403": { 8277 - "content": { 8278 - "application/json": { 8279 - "schema": { 8280 - "type": "object", 8281 - "properties": { 8282 - "message": { 8283 - "type": "string" 8284 - } 8285 - } 8286 - } 8287 - } 8288 - }, 8289 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 8290 - }, 8291 - "404": { 8292 - "content": { 8293 - "application/json": { 8294 - "schema": { 8295 - "type": "object", 8296 - "properties": { 8297 - "message": { 8298 - "type": "string" 8299 - } 8300 - } 8301 - } 8302 - } 8303 - }, 8304 - "description": "Not Found. The requested resource was not found." 8305 - }, 8306 - "429": { 8307 - "content": { 8308 - "application/json": { 8309 - "schema": { 8310 - "type": "object", 8311 - "properties": { 8312 - "message": { 8313 - "type": "string" 8314 - } 8315 - } 8316 - } 8317 - } 8318 - }, 8319 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 8320 - }, 8321 - "500": { 8322 - "content": { 8323 - "application/json": { 8324 - "schema": { 8325 - "type": "object", 8326 - "properties": { 8327 - "message": { 8328 - "type": "string" 8329 - } 8330 - } 8331 - } 8332 - } 8333 - }, 8334 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 8335 - } 8336 - }, 8337 - "operationId": "updateOrganizationTeam", 8338 - "summary": "Update Organization Team" 8339 - } 8340 - }, 8341 - "/auth/organization/set-active-team": { 8342 - "post": { 8343 - "tags": [ 8344 - "Organization Management" 8345 - ], 8346 - "description": "Set the active team", 8347 - "security": [ 8348 - { 8349 - "bearerAuth": [] 8350 - } 8351 - ], 8352 - "parameters": [], 8353 - "requestBody": { 8354 - "required": true, 8355 - "content": { 8356 - "application/json": { 8357 - "schema": { 8358 - "type": "object", 8359 - "properties": { 8360 - "teamId": { 8361 - "type": "string", 8362 - "nullable": true 8363 - } 8364 - } 8365 - } 8366 - } 8367 - } 8368 - }, 8369 - "responses": { 8370 - "200": { 8371 - "description": "Success", 8372 - "content": { 8373 - "application/json": { 8374 - "schema": { 8375 - "type": "object", 8376 - "description": "The team", 8377 - "$ref": "#/components/schemas/Team" 8378 - } 8379 - } 8380 - } 8381 - }, 8382 - "400": { 8383 - "content": { 8384 - "application/json": { 8385 - "schema": { 8386 - "type": "object", 8387 - "properties": { 8388 - "message": { 8389 - "type": "string" 8390 - } 8391 - }, 8392 - "required": [ 8393 - "message" 8394 - ] 8395 - } 8396 - } 8397 - }, 8398 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 8399 - }, 8400 - "401": { 8401 - "content": { 8402 - "application/json": { 8403 - "schema": { 8404 - "type": "object", 8405 - "properties": { 8406 - "message": { 8407 - "type": "string" 8408 - } 8409 - }, 8410 - "required": [ 8411 - "message" 8412 - ] 8413 - } 8414 - } 8415 - }, 8416 - "description": "Unauthorized. Due to missing or invalid authentication." 8417 - }, 8418 - "403": { 8419 - "content": { 8420 - "application/json": { 8421 - "schema": { 8422 - "type": "object", 8423 - "properties": { 8424 - "message": { 8425 - "type": "string" 8426 - } 8427 - } 8428 - } 8429 - } 8430 - }, 8431 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 8432 - }, 8433 - "404": { 8434 - "content": { 8435 - "application/json": { 8436 - "schema": { 8437 - "type": "object", 8438 - "properties": { 8439 - "message": { 8440 - "type": "string" 8441 - } 8442 - } 8443 - } 8444 - } 8445 - }, 8446 - "description": "Not Found. The requested resource was not found." 8447 - }, 8448 - "429": { 8449 - "content": { 8450 - "application/json": { 8451 - "schema": { 8452 - "type": "object", 8453 - "properties": { 8454 - "message": { 8455 - "type": "string" 8456 - } 8457 - } 8458 - } 8459 - } 8460 - }, 8461 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 8462 - }, 8463 - "500": { 8464 - "content": { 8465 - "application/json": { 8466 - "schema": { 8467 - "type": "object", 8468 - "properties": { 8469 - "message": { 8470 - "type": "string" 8471 - } 8472 - } 8473 - } 8474 - } 8475 - }, 8476 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 8477 - } 8478 - }, 8479 - "operationId": "setOrganizationActiveTeam", 8480 - "summary": "Set Organization Active Team" 8481 - } 8482 - }, 8483 - "/auth/organization/list-user-teams": { 8484 - "get": { 8485 - "tags": [ 8486 - "Organization Management" 8487 - ], 8488 - "description": "List all teams that the current user is a part of.", 8489 - "security": [ 8490 - { 8491 - "bearerAuth": [] 8492 - } 8493 - ], 8494 - "parameters": [], 8495 - "responses": { 8496 - "200": { 8497 - "description": "Teams retrieved successfully", 8498 - "content": { 8499 - "application/json": { 8500 - "schema": { 8501 - "type": "array", 8502 - "items": { 8503 - "type": "object", 8504 - "description": "The team", 8505 - "$ref": "#/components/schemas/Team" 8506 - }, 8507 - "description": "Array of team objects within the organization" 8508 - } 8509 - } 8510 - } 8511 - }, 8512 - "400": { 8513 - "content": { 8514 - "application/json": { 8515 - "schema": { 8516 - "type": "object", 8517 - "properties": { 8518 - "message": { 8519 - "type": "string" 8520 - } 8521 - }, 8522 - "required": [ 8523 - "message" 8524 - ] 8525 - } 8526 - } 8527 - }, 8528 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 8529 - }, 8530 - "401": { 8531 - "content": { 8532 - "application/json": { 8533 - "schema": { 8534 - "type": "object", 8535 - "properties": { 8536 - "message": { 8537 - "type": "string" 8538 - } 8539 - }, 8540 - "required": [ 8541 - "message" 8542 - ] 8543 - } 8544 - } 8545 - }, 8546 - "description": "Unauthorized. Due to missing or invalid authentication." 8547 - }, 8548 - "403": { 8549 - "content": { 8550 - "application/json": { 8551 - "schema": { 8552 - "type": "object", 8553 - "properties": { 8554 - "message": { 8555 - "type": "string" 8556 - } 8557 - } 8558 - } 8559 - } 8560 - }, 8561 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 8562 - }, 8563 - "404": { 8564 - "content": { 8565 - "application/json": { 8566 - "schema": { 8567 - "type": "object", 8568 - "properties": { 8569 - "message": { 8570 - "type": "string" 8571 - } 8572 - } 8573 - } 8574 - } 8575 - }, 8576 - "description": "Not Found. The requested resource was not found." 8577 - }, 8578 - "429": { 8579 - "content": { 8580 - "application/json": { 8581 - "schema": { 8582 - "type": "object", 8583 - "properties": { 8584 - "message": { 8585 - "type": "string" 8586 - } 8587 - } 8588 - } 8589 - } 8590 - }, 8591 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 8592 - }, 8593 - "500": { 8594 - "content": { 8595 - "application/json": { 8596 - "schema": { 8597 - "type": "object", 8598 - "properties": { 8599 - "message": { 8600 - "type": "string" 8601 - } 8602 - } 8603 - } 8604 - } 8605 - }, 8606 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 8607 - } 8608 - }, 8609 - "operationId": "listOrganizationUserTeams", 8610 - "summary": "List Organization User Teams" 8611 - } 8612 - }, 8613 - "/auth/organization/list-team-members": { 8614 - "get": { 8615 - "tags": [ 8616 - "Organization Management" 8617 - ], 8618 - "description": "List the members of the given team.", 8619 - "security": [ 8620 - { 8621 - "bearerAuth": [] 8622 - } 8623 - ], 8624 - "parameters": [], 8625 - "responses": { 8626 - "200": { 8627 - "description": "Teams retrieved successfully", 8628 - "content": { 8629 - "application/json": { 8630 - "schema": { 8631 - "type": "array", 8632 - "items": { 8633 - "type": "object", 8634 - "description": "The team member", 8635 - "properties": { 8636 - "id": { 8637 - "type": "string", 8638 - "description": "Unique identifier of the team member" 8639 - }, 8640 - "userId": { 8641 - "type": "string", 8642 - "description": "The user ID of the team member" 8643 - }, 8644 - "teamId": { 8645 - "type": "string", 8646 - "description": "The team ID of the team the team member is in" 8647 - }, 8648 - "createdAt": { 8649 - "type": "string", 8650 - "format": "date-time", 8651 - "description": "Timestamp when the team member was created" 8652 - } 8653 - }, 8654 - "required": [ 8655 - "id", 8656 - "userId", 8657 - "teamId", 8658 - "createdAt" 8659 - ] 8660 - }, 8661 - "description": "Array of team member objects within the team" 8662 - } 8663 - } 8664 - } 8665 - }, 8666 - "400": { 8667 - "content": { 8668 - "application/json": { 8669 - "schema": { 8670 - "type": "object", 8671 - "properties": { 8672 - "message": { 8673 - "type": "string" 8674 - } 8675 - }, 8676 - "required": [ 8677 - "message" 8678 - ] 8679 - } 8680 - } 8681 - }, 8682 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 8683 - }, 8684 - "401": { 8685 - "content": { 8686 - "application/json": { 8687 - "schema": { 8688 - "type": "object", 8689 - "properties": { 8690 - "message": { 8691 - "type": "string" 8692 - } 8693 - }, 8694 - "required": [ 8695 - "message" 8696 - ] 8697 - } 8698 - } 8699 - }, 8700 - "description": "Unauthorized. Due to missing or invalid authentication." 8701 - }, 8702 - "403": { 8703 - "content": { 8704 - "application/json": { 8705 - "schema": { 8706 - "type": "object", 8707 - "properties": { 8708 - "message": { 8709 - "type": "string" 8710 - } 8711 - } 8712 - } 8713 - } 8714 - }, 8715 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 8716 - }, 8717 - "404": { 8718 - "content": { 8719 - "application/json": { 8720 - "schema": { 8721 - "type": "object", 8722 - "properties": { 8723 - "message": { 8724 - "type": "string" 8725 - } 8726 - } 8727 - } 8728 - } 8729 - }, 8730 - "description": "Not Found. The requested resource was not found." 8731 - }, 8732 - "429": { 8733 - "content": { 8734 - "application/json": { 8735 - "schema": { 8736 - "type": "object", 8737 - "properties": { 8738 - "message": { 8739 - "type": "string" 8740 - } 8741 - } 8742 - } 8743 - } 8744 - }, 8745 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 8746 - }, 8747 - "500": { 8748 - "content": { 8749 - "application/json": { 8750 - "schema": { 8751 - "type": "object", 8752 - "properties": { 8753 - "message": { 8754 - "type": "string" 8755 - } 8756 - } 8757 - } 8758 - } 8759 - }, 8760 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 8761 - } 8762 - }, 8763 - "operationId": "listOrganizationTeamMembers", 8764 - "summary": "List Organization Team Members" 8765 - } 8766 - }, 8767 - "/auth/organization/add-team-member": { 8768 - "post": { 8769 - "tags": [ 8770 - "Organization Management" 8771 - ], 8772 - "description": "The newly created member", 8773 - "security": [ 8774 - { 8775 - "bearerAuth": [] 8776 - } 8777 - ], 8778 - "parameters": [], 8779 - "requestBody": { 8780 - "required": true, 8781 - "content": { 8782 - "application/json": { 8783 - "schema": { 8784 - "type": "object", 8785 - "properties": { 8786 - "teamId": { 8787 - "type": "string", 8788 - "description": "The team the user should be a member of." 8789 - }, 8790 - "userId": { 8791 - "type": "string", 8792 - "description": "The user Id which represents the user to be added as a member." 8793 - } 8794 - }, 8795 - "required": [ 8796 - "teamId", 8797 - "userId" 8798 - ] 8799 - } 8800 - } 8801 - } 8802 - }, 8803 - "responses": { 8804 - "200": { 8805 - "description": "Team member created successfully", 8806 - "content": { 8807 - "application/json": { 8808 - "schema": { 8809 - "type": "object", 8810 - "description": "The team member", 8811 - "properties": { 8812 - "id": { 8813 - "type": "string", 8814 - "description": "Unique identifier of the team member" 8815 - }, 8816 - "userId": { 8817 - "type": "string", 8818 - "description": "The user ID of the team member" 8819 - }, 8820 - "teamId": { 8821 - "type": "string", 8822 - "description": "The team ID of the team the team member is in" 8823 - }, 8824 - "createdAt": { 8825 - "type": "string", 8826 - "format": "date-time", 8827 - "description": "Timestamp when the team member was created" 8828 - } 8829 - }, 8830 - "required": [ 8831 - "id", 8832 - "userId", 8833 - "teamId", 8834 - "createdAt" 8835 - ] 8836 - } 8837 - } 8838 - } 8839 - }, 8840 - "400": { 8841 - "content": { 8842 - "application/json": { 8843 - "schema": { 8844 - "type": "object", 8845 - "properties": { 8846 - "message": { 8847 - "type": "string" 8848 - } 8849 - }, 8850 - "required": [ 8851 - "message" 8852 - ] 8853 - } 8854 - } 8855 - }, 8856 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 8857 - }, 8858 - "401": { 8859 - "content": { 8860 - "application/json": { 8861 - "schema": { 8862 - "type": "object", 8863 - "properties": { 8864 - "message": { 8865 - "type": "string" 8866 - } 8867 - }, 8868 - "required": [ 8869 - "message" 8870 - ] 8871 - } 8872 - } 8873 - }, 8874 - "description": "Unauthorized. Due to missing or invalid authentication." 8875 - }, 8876 - "403": { 8877 - "content": { 8878 - "application/json": { 8879 - "schema": { 8880 - "type": "object", 8881 - "properties": { 8882 - "message": { 8883 - "type": "string" 8884 - } 8885 - } 8886 - } 8887 - } 8888 - }, 8889 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 8890 - }, 8891 - "404": { 8892 - "content": { 8893 - "application/json": { 8894 - "schema": { 8895 - "type": "object", 8896 - "properties": { 8897 - "message": { 8898 - "type": "string" 8899 - } 8900 - } 8901 - } 8902 - } 8903 - }, 8904 - "description": "Not Found. The requested resource was not found." 8905 - }, 8906 - "429": { 8907 - "content": { 8908 - "application/json": { 8909 - "schema": { 8910 - "type": "object", 8911 - "properties": { 8912 - "message": { 8913 - "type": "string" 8914 - } 8915 - } 8916 - } 8917 - } 8918 - }, 8919 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 8920 - }, 8921 - "500": { 8922 - "content": { 8923 - "application/json": { 8924 - "schema": { 8925 - "type": "object", 8926 - "properties": { 8927 - "message": { 8928 - "type": "string" 8929 - } 8930 - } 8931 - } 8932 - } 8933 - }, 8934 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 8935 - } 8936 - }, 8937 - "operationId": "addOrganizationTeamMember", 8938 - "summary": "Add Organization Team Member" 8939 - } 8940 - }, 8941 - "/auth/organization/remove-team-member": { 8942 - "post": { 8943 - "tags": [ 8944 - "Organization Management" 8945 - ], 8946 - "description": "Remove a member from a team", 8947 - "security": [ 8948 - { 8949 - "bearerAuth": [] 8950 - } 8951 - ], 8952 - "parameters": [], 8953 - "requestBody": { 8954 - "required": true, 8955 - "content": { 8956 - "application/json": { 8957 - "schema": { 8958 - "type": "object", 8959 - "properties": { 8960 - "teamId": { 8961 - "type": "string", 8962 - "description": "The team the user should be removed from." 8963 - }, 8964 - "userId": { 8965 - "type": "string", 8966 - "description": "The user which should be removed from the team." 8967 - } 8968 - }, 8969 - "required": [ 8970 - "teamId", 8971 - "userId" 8972 - ] 8973 - } 8974 - } 8975 - } 8976 - }, 8977 - "responses": { 8978 - "200": { 8979 - "description": "Team member removed successfully", 8980 - "content": { 8981 - "application/json": { 8982 - "schema": { 8983 - "type": "object", 8984 - "properties": { 8985 - "message": { 8986 - "type": "string", 8987 - "description": "Confirmation message indicating successful removal", 8988 - "enum": [ 8989 - "Team member removed successfully." 8990 - ] 8991 - } 8992 - }, 8993 - "required": [ 8994 - "message" 8995 - ] 8996 - } 8997 - } 8998 - } 8999 - }, 9000 - "400": { 9001 - "content": { 9002 - "application/json": { 9003 - "schema": { 9004 - "type": "object", 9005 - "properties": { 9006 - "message": { 9007 - "type": "string" 9008 - } 9009 - }, 9010 - "required": [ 9011 - "message" 9012 - ] 9013 - } 9014 - } 9015 - }, 9016 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 9017 - }, 9018 - "401": { 9019 - "content": { 9020 - "application/json": { 9021 - "schema": { 9022 - "type": "object", 9023 - "properties": { 9024 - "message": { 9025 - "type": "string" 9026 - } 9027 - }, 9028 - "required": [ 9029 - "message" 9030 - ] 9031 - } 9032 - } 9033 - }, 9034 - "description": "Unauthorized. Due to missing or invalid authentication." 9035 - }, 9036 - "403": { 9037 - "content": { 9038 - "application/json": { 9039 - "schema": { 9040 - "type": "object", 9041 - "properties": { 9042 - "message": { 9043 - "type": "string" 9044 - } 9045 - } 9046 - } 9047 - } 9048 - }, 9049 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 9050 - }, 9051 - "404": { 9052 - "content": { 9053 - "application/json": { 9054 - "schema": { 9055 - "type": "object", 9056 - "properties": { 9057 - "message": { 9058 - "type": "string" 9059 - } 9060 - } 9061 - } 9062 - } 9063 - }, 9064 - "description": "Not Found. The requested resource was not found." 9065 - }, 9066 - "429": { 9067 - "content": { 9068 - "application/json": { 9069 - "schema": { 9070 - "type": "object", 9071 - "properties": { 9072 - "message": { 9073 - "type": "string" 9074 - } 9075 - } 9076 - } 9077 - } 9078 - }, 9079 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 9080 - }, 9081 - "500": { 9082 - "content": { 9083 - "application/json": { 9084 - "schema": { 9085 - "type": "object", 9086 - "properties": { 9087 - "message": { 9088 - "type": "string" 9089 - } 9090 - } 9091 - } 9092 - } 9093 - }, 9094 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 9095 - } 9096 - }, 9097 - "operationId": "removeOrganizationTeamMember", 9098 - "summary": "Remove Organization Team Member" 9099 - } 9100 - }, 9101 - "/auth/organization/has-permission": { 9102 - "post": { 9103 - "tags": [ 9104 - "Organization Management" 9105 - ], 9106 - "description": "Check if the user has permission", 9107 - "security": [ 9108 - { 9109 - "bearerAuth": [] 9110 - } 9111 - ], 9112 - "parameters": [], 9113 - "requestBody": { 9114 - "content": { 9115 - "application/json": { 9116 - "schema": { 9117 - "type": "object", 9118 - "properties": { 9119 - "permission": { 9120 - "type": "object", 9121 - "description": "The permission to check", 9122 - "deprecated": true 9123 - }, 9124 - "permissions": { 9125 - "type": "object", 9126 - "description": "The permission to check" 9127 - } 9128 - }, 9129 - "required": [ 9130 - "permissions" 9131 - ] 9132 - } 9133 - } 9134 - } 9135 - }, 9136 - "responses": { 9137 - "200": { 9138 - "description": "Success", 9139 - "content": { 9140 - "application/json": { 9141 - "schema": { 9142 - "type": "object", 9143 - "properties": { 9144 - "error": { 9145 - "type": "string" 9146 - }, 9147 - "success": { 9148 - "type": "boolean" 9149 - } 9150 - }, 9151 - "required": [ 9152 - "success" 9153 - ] 9154 - } 9155 - } 9156 - } 9157 - }, 9158 - "400": { 9159 - "content": { 9160 - "application/json": { 9161 - "schema": { 9162 - "type": "object", 9163 - "properties": { 9164 - "message": { 9165 - "type": "string" 9166 - } 9167 - }, 9168 - "required": [ 9169 - "message" 9170 - ] 9171 - } 9172 - } 9173 - }, 9174 - "description": "Bad Request. Usually due to missing parameters, or invalid parameters." 9175 - }, 9176 - "401": { 9177 - "content": { 9178 - "application/json": { 9179 - "schema": { 9180 - "type": "object", 9181 - "properties": { 9182 - "message": { 9183 - "type": "string" 9184 - } 9185 - }, 9186 - "required": [ 9187 - "message" 9188 - ] 9189 - } 9190 - } 9191 - }, 9192 - "description": "Unauthorized. Due to missing or invalid authentication." 9193 - }, 9194 - "403": { 9195 - "content": { 9196 - "application/json": { 9197 - "schema": { 9198 - "type": "object", 9199 - "properties": { 9200 - "message": { 9201 - "type": "string" 9202 - } 9203 - } 9204 - } 9205 - } 9206 - }, 9207 - "description": "Forbidden. You do not have permission to access this resource or to perform this action." 9208 - }, 9209 - "404": { 9210 - "content": { 9211 - "application/json": { 9212 - "schema": { 9213 - "type": "object", 9214 - "properties": { 9215 - "message": { 9216 - "type": "string" 9217 - } 9218 - } 9219 - } 9220 - } 9221 - }, 9222 - "description": "Not Found. The requested resource was not found." 9223 - }, 9224 - "429": { 9225 - "content": { 9226 - "application/json": { 9227 - "schema": { 9228 - "type": "object", 9229 - "properties": { 9230 - "message": { 9231 - "type": "string" 9232 - } 9233 - } 9234 - } 9235 - } 9236 - }, 9237 - "description": "Too Many Requests. You have exceeded the rate limit. Try again later." 9238 - }, 9239 - "500": { 9240 - "content": { 9241 - "application/json": { 9242 - "schema": { 9243 - "type": "object", 9244 - "properties": { 9245 - "message": { 9246 - "type": "string" 9247 - } 9248 - } 9249 - } 9250 - } 9251 - }, 9252 - "description": "Internal Server Error. This is a problem with the server that you cannot fix." 9253 - } 9254 - }, 9255 - "operationId": "hasOrganizationPermission", 9256 - "summary": "Check Organization Permission" 9257 - } 9258 - } 9259 - }, 9260 - "tags": [ 9261 - { 9262 - "name": "Organization Management" 9263 - } 9264 - ] 9265 - }
+86 -9
apps/web/src/components/activity/comment-editor.tsx
··· 1 1 import type { Editor } from "@tiptap/core"; 2 2 import Image from "@tiptap/extension-image"; 3 + import Link from "@tiptap/extension-link"; 3 4 import Placeholder from "@tiptap/extension-placeholder"; 4 5 import { Table } from "@tiptap/extension-table"; 5 6 import TableCell from "@tiptap/extension-table-cell"; ··· 146 147 url: string; 147 148 top: number; 148 149 left: number; 150 + linkRange?: { from: number; to: number }; 149 151 range?: SlashRange; 150 152 }; 151 153 ··· 550 552 codeBlock: { 551 553 HTMLAttributes: { class: "kaneo-tiptap-codeblock" }, 552 554 }, 553 - link: { 554 - autolink: true, 555 - defaultProtocol: "https", 556 - openOnClick: readOnly, 557 - }, 555 + }), 556 + Link.configure({ 557 + autolink: true, 558 + defaultProtocol: "https", 559 + linkOnPaste: true, 560 + openOnClick: readOnly, 558 561 }), 559 562 Markdown.configure({ 560 563 markedOptions: { ··· 651 654 if (!isYouTubeUrl(url)) return false; 652 655 653 656 event.preventDefault(); 657 + const { from } = view.state.selection; 658 + const linkMark = view.state.schema.marks.link?.create({ href: url }); 659 + const linkText = view.state.schema.text( 660 + url, 661 + linkMark ? [linkMark] : [], 662 + ); 663 + view.dispatch( 664 + view.state.tr 665 + .replaceSelectionWith(linkText, false) 666 + .scrollIntoView(), 667 + ); 654 668 const coords = getOverlayPosition(view, view.state.selection.from); 655 669 setEmbedComposer({ 656 670 mode: "choice", 657 671 url, 658 672 top: coords.top, 659 673 left: coords.left, 674 + linkRange: { from, to: from + url.length }, 660 675 }); 661 676 setEmbedComposerError(""); 662 677 return true; ··· 682 697 void handleAssetFileUpload(droppedFile, editor, dropRange); 683 698 return true; 684 699 }, 700 + handleTextInput: (view, _from, _to, text) => { 701 + if (readOnly || disabled || text !== "`") return false; 702 + 703 + const { state } = view; 704 + const { $from } = state.selection; 705 + if ($from.parent.type.name !== "paragraph") return false; 706 + 707 + const textBefore = $from.parent.textBetween( 708 + 0, 709 + $from.parentOffset, 710 + "\0", 711 + "\0", 712 + ); 713 + 714 + if (!/^\s*``$/.test(textBefore)) return false; 715 + 716 + const paragraphStart = $from.before(); 717 + const codeBlock = state.schema.nodes.codeBlock?.create(); 718 + if (!codeBlock) return false; 719 + 720 + const tr = state.tr.replaceWith( 721 + paragraphStart, 722 + paragraphStart + $from.parent.nodeSize, 723 + codeBlock, 724 + ); 725 + 726 + tr.setSelection( 727 + TextSelection.near(tr.doc.resolve(paragraphStart + 1)), 728 + ); 729 + view.dispatch(tr.scrollIntoView()); 730 + return true; 731 + }, 685 732 handleKeyDown: (_view, event) => { 686 733 if (!readOnly && !disabled && slashMenu) { 687 734 if (event.key === "ArrowDown") { ··· 1132 1179 } 1133 1180 1134 1181 const chain = editor.chain().focus(); 1135 - if (embedComposer.range) { 1182 + if (embedComposer.mode === "choice" && mode === "link") { 1183 + setEmbedComposer(null); 1184 + setEmbedComposerError(""); 1185 + return; 1186 + } 1187 + 1188 + if (embedComposer.linkRange) { 1189 + chain.deleteRange(embedComposer.linkRange); 1190 + } else if (embedComposer.range) { 1136 1191 chain.deleteRange(embedComposer.range); 1137 1192 } 1138 1193 1139 1194 if (mode === "link") { 1140 - chain.insertContent(url).run(); 1195 + chain 1196 + .insertContent({ 1197 + type: "text", 1198 + text: url, 1199 + marks: [ 1200 + { 1201 + type: "link", 1202 + attrs: { 1203 + href: url, 1204 + }, 1205 + }, 1206 + ], 1207 + }) 1208 + .run(); 1141 1209 } else { 1142 1210 if (!isYouTubeUrl(url)) { 1143 1211 setEmbedComposerError("Only YouTube links can be embedded."); ··· 1165 1233 1166 1234 const handleKeyDown = (event: KeyboardEvent) => { 1167 1235 if (!embedComposer) return; 1236 + event.stopPropagation(); 1237 + event.stopImmediatePropagation(); 1168 1238 1169 1239 if (embedComposer.mode === "choice") { 1240 + if (event.key === "ArrowDown" || event.key === "ArrowUp") { 1241 + event.preventDefault(); 1242 + return; 1243 + } 1244 + 1170 1245 if (event.key === "Tab") { 1171 1246 event.preventDefault(); 1172 1247 submitEmbedComposer("embed"); ··· 1175 1250 1176 1251 if (event.key === "Escape") { 1177 1252 event.preventDefault(); 1178 - submitEmbedComposer("link"); 1253 + setEmbedComposer(null); 1254 + setEmbedComposerError(""); 1179 1255 return; 1180 1256 } 1181 1257 ··· 1586 1662 className="kaneo-embed-choice-item" 1587 1663 onMouseDown={(event) => { 1588 1664 event.preventDefault(); 1589 - submitEmbedComposer("link"); 1665 + setEmbedComposer(null); 1666 + setEmbedComposerError(""); 1590 1667 }} 1591 1668 > 1592 1669 <span>Keep as link</span>
+92 -15
apps/web/src/components/task/task-description.tsx
··· 1 1 import type { Editor } from "@tiptap/core"; 2 2 import Image from "@tiptap/extension-image"; 3 + import Link from "@tiptap/extension-link"; 3 4 import Placeholder from "@tiptap/extension-placeholder"; 4 5 import { Table } from "@tiptap/extension-table"; 5 6 import TableCell from "@tiptap/extension-table-cell"; ··· 112 113 url: string; 113 114 top: number; 114 115 left: number; 116 + linkRange?: { from: number; to: number }; 115 117 range?: SlashRange; 116 118 }; 117 119 ··· 524 526 }, 525 527 trailingNode: false, 526 528 heading: { levels: [1, 2, 3] }, 527 - link: { 528 - autolink: true, 529 - defaultProtocol: "https", 530 - openOnClick: false, 531 - }, 529 + }), 530 + Link.configure({ 531 + autolink: true, 532 + defaultProtocol: "https", 533 + linkOnPaste: true, 534 + openOnClick: false, 532 535 }), 533 536 Markdown.configure({ 534 537 markedOptions: { ··· 620 623 if (!isYouTubeUrl(url)) return false; 621 624 622 625 event.preventDefault(); 626 + const { from } = view.state.selection; 627 + const linkMark = view.state.schema.marks.link?.create({ href: url }); 628 + const linkText = view.state.schema.text( 629 + url, 630 + linkMark ? [linkMark] : [], 631 + ); 632 + view.dispatch( 633 + view.state.tr 634 + .replaceSelectionWith(linkText, false) 635 + .scrollIntoView(), 636 + ); 623 637 const coords = getOverlayPosition(view, view.state.selection.from); 624 638 625 639 setEmbedComposer({ ··· 627 641 url, 628 642 top: coords.top, 629 643 left: coords.left, 644 + linkRange: { from, to: from + url.length }, 630 645 }); 631 646 setEmbedComposerError(""); 632 647 return true; ··· 649 664 void handleAssetFileUpload(droppedFile, editor, dropRange); 650 665 return true; 651 666 }, 667 + handleTextInput: (view, _from, _to, text) => { 668 + if (text !== "`") return false; 669 + 670 + const { state } = view; 671 + const { $from } = state.selection; 672 + if ($from.parent.type.name !== "paragraph") return false; 673 + 674 + const textBefore = $from.parent.textBetween( 675 + 0, 676 + $from.parentOffset, 677 + "\0", 678 + "\0", 679 + ); 680 + 681 + if (!/^\s*``$/.test(textBefore)) return false; 682 + 683 + const paragraphStart = $from.before(); 684 + const codeBlock = state.schema.nodes.codeBlock?.create(); 685 + if (!codeBlock) return false; 686 + 687 + const tr = state.tr.replaceWith( 688 + paragraphStart, 689 + paragraphStart + $from.parent.nodeSize, 690 + codeBlock, 691 + ); 692 + 693 + tr.setSelection( 694 + TextSelection.near(tr.doc.resolve(paragraphStart + 1)), 695 + ); 696 + view.dispatch(tr.scrollIntoView()); 697 + return true; 698 + }, 652 699 handleKeyDown: (view, event) => { 653 700 if ( 654 701 !( ··· 937 984 } 938 985 939 986 const chain = editor.chain().focus(); 940 - if (embedComposer.range) { 987 + if (embedComposer.mode === "choice" && mode === "link") { 988 + setEmbedComposer(null); 989 + setEmbedComposerError(""); 990 + return; 991 + } 992 + 993 + if (embedComposer.linkRange) { 994 + chain.deleteRange(embedComposer.linkRange); 995 + } else if (embedComposer.range) { 941 996 chain.deleteRange(embedComposer.range); 942 997 } 943 998 944 999 if (mode === "link") { 945 - chain.insertContent(url).run(); 1000 + chain 1001 + .insertContent({ 1002 + type: "text", 1003 + text: url, 1004 + marks: [ 1005 + { 1006 + type: "link", 1007 + attrs: { 1008 + href: url, 1009 + }, 1010 + }, 1011 + ], 1012 + }) 1013 + .run(); 946 1014 } else { 947 1015 if (!isYouTubeUrl(url)) { 948 1016 setEmbedComposerError("Only YouTube links can be embedded."); ··· 968 1036 useEffect(() => { 969 1037 const handleKeyDown = (event: KeyboardEvent) => { 970 1038 if (embedComposer) { 1039 + event.stopPropagation(); 1040 + event.stopImmediatePropagation(); 1041 + 1042 + if (embedComposer.mode === "choice") { 1043 + if (event.key === "ArrowDown" || event.key === "ArrowUp") { 1044 + event.preventDefault(); 1045 + return; 1046 + } 1047 + } 1048 + 971 1049 if (event.key === "Tab") { 972 1050 event.preventDefault(); 973 1051 submitEmbedComposer("embed"); ··· 975 1053 } 976 1054 if (event.key === "Enter") { 977 1055 event.preventDefault(); 978 - submitEmbedComposer("link"); 1056 + submitEmbedComposer( 1057 + embedComposer.mode === "choice" ? "embed" : "link", 1058 + ); 979 1059 return; 980 1060 } 981 1061 if (event.key === "Escape") { 982 1062 event.preventDefault(); 983 - if (embedComposer.mode === "choice") { 984 - submitEmbedComposer("link"); 985 - } else { 986 - setEmbedComposer(null); 987 - setEmbedComposerError(""); 988 - } 1063 + setEmbedComposer(null); 1064 + setEmbedComposerError(""); 989 1065 } 990 1066 return; 991 1067 } ··· 1578 1654 className="kaneo-embed-choice-item" 1579 1655 onMouseDown={(event) => { 1580 1656 event.preventDefault(); 1581 - submitEmbedComposer("link"); 1657 + setEmbedComposer(null); 1658 + setEmbedComposerError(""); 1582 1659 }} 1583 1660 > 1584 1661 <span>Keep as link</span>
+5 -3
apps/web/src/index.css
··· 868 868 .kaneo-embed-composer { 869 869 position: fixed; 870 870 z-index: 60; 871 - width: min(24rem, calc(100vw - 2rem)); 871 + width: min(16.5rem, calc(100vw - 2rem)); 872 872 border: 1px solid color-mix(in srgb, var(--border) 84%, transparent); 873 873 border-radius: 0.6rem; 874 874 background: var(--popover); ··· 886 886 887 887 .kaneo-embed-choice-menu { 888 888 display: flex; 889 - min-width: 10.5rem; 889 + min-width: 0; 890 890 flex-direction: column; 891 891 gap: 0.2rem; 892 892 } ··· 1106 1106 text-decoration: line-through; 1107 1107 } 1108 1108 1109 - .kaneo-comment-editor-prose a { 1109 + .kaneo-comment-editor-prose a, 1110 + .kaneo-tiptap-prose a { 1110 1111 color: color-mix(in srgb, var(--foreground) 88%, #4c9aff 12%); 1112 + cursor: pointer; 1111 1113 text-decoration: underline; 1112 1114 text-decoration-color: color-mix(in srgb, var(--ring) 44%, transparent); 1113 1115 text-underline-offset: 2px;