⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
fix(api): correct route contracts flagged in review
Andrej Acevski6500877b3642
diff --git a/apps/api/src/auth-openapi.ts b/apps/api/src/auth-openapi.tsindex 500d75ea9..6769495a0 100644--- a/apps/api/src/auth-openapi.ts+++ b/apps/api/src/auth-openapi.ts@@ -2,8 +2,14 @@ import type { OpenAPIHono } from "@hono/zod-openapi";import { z } from "./openapi";// Better Auth serves /api/auth/* from its own handler, so these operations have-// no route of ours to document. Generated from its generateOpenAPISchema()-// output; regenerate and diff this file when upgrading Better Auth.+// no route of ours to hang documentation off. They are registered directly on+// the OpenAPI registry instead.+//+// This file is generated from Better Auth's own generateOpenAPISchema() output+// and then reviewed. Declaring it here replaced a runtime call to that+// generator plus ~200 lines of spec rewriting (operationId/summary/tag+// normalization, ref pruning, and a 3.1-to-3.0 downgrade). Regenerate and diff+// this file when upgrading Better Auth.export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {registry.registerPath({method: "post",@@ -61,7 +67,7 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {description:"The user Id which represents the user to be added as a member.",}),- organizationId: z.string().nullable().optional().openapi({+ organizationId: z.string().optional().openapi({description:"The organization ID which the team falls under. If not provided, it will default to the user's active organization.",}),@@ -166,29 +172,23 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {slug: z.string().openapi({ description: "The slug of the organization" }),- userId: z.string().nullable().optional().openapi({+ userId: z.string().optional().openapi({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"',}),logo: z.string()- .nullable().optional().openapi({ description: "The logo of the organization" }),metadata: z- .string()- .nullable()+ .record(z.string(), z.unknown()).optional().openapi({ description: "The metadata of the organization" }),- keepCurrentActiveOrganization: z- .boolean()- .nullable()- .optional()- .openapi({- description:- "Whether to keep the current active organization active after creating a new one. Eg: true",- }),- description: z.string().nullable().optional(),+ keepCurrentActiveOrganization: z.boolean().optional().openapi({+ description:+ "Whether to keep the current active organization active after creating a new one. Eg: true",+ }),+ description: z.string().optional(),}),},},@@ -197,9 +197,7 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {responses: {200: {description: "Success",- content: {- "application/json": { schema: z.record(z.string(), z.unknown()) },- },+ content: { "application/json": { schema: z.unknown() } },},},});@@ -217,17 +215,14 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {content: {"application/json": {schema: z.object({- organizationId: z.string().nullable().optional(),+ organizationId: z.string().optional(),role: z.string().openapi({ description: "The name of the role to create" }),- permission: z.string().openapi({+ permission: z.record(z.string(), z.unknown()).openapi({description: "The permission to assign to the role",}),- additionalFields: z- .record(z.string(), z.unknown())- .nullable()- .optional(),+ additionalFields: z.record(z.string(), z.unknown()).optional(),}),},},@@ -254,7 +249,7 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {name: z.string().openapi({description: 'The name of the team. Eg: "my-team"',}),- organizationId: z.string().nullable().optional().openapi({+ organizationId: z.string().optional().openapi({description:'The organization ID which the team will be created in. Defaults to the active organization. Eg: "organization-id"',}),@@ -325,6 +320,12 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {operationId: "deleteOrganizationRole",summary: "Delete Organization Role",description: "Delete Organization Role",+ request: {+ body: {+ required: true,+ content: { "application/json": { schema: z.unknown() } },+ },+ },responses: {200: { description: "Success" },},@@ -376,9 +377,7 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {responses: {200: {description: "Success",- content: {- "application/json": { schema: z.record(z.string(), z.unknown()) },- },+ content: { "application/json": { schema: z.unknown() } },},},});@@ -392,7 +391,7 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {description: "Get an invitation by ID",request: {query: z.object({- id: z.string(),+ id: z.string().optional(),}),},responses: {@@ -435,7 +434,7 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {path: "/auth/organization/has-permission",tags: ["Organization Management"],operationId: "hasOrganizationPermission",- summary: "Has Organization Permission",+ summary: "Check Organization Permission",description: "Check if the user has permission",request: {body: {@@ -486,18 +485,18 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {email: z.string().openapi({description: "The email address of the user to invite",}),- role: z.string().openapi({+ role: z.union([z.string(), z.array(z.string())]).openapi({description:'The role(s) to assign to the user. It can be `admin`, `member`, owner. Eg: "member"',}),- organizationId: z.string().nullable().optional().openapi({+ organizationId: z.string().optional().openapi({description: "The organization ID to invite the user to",}),- resend: z.boolean().nullable().optional().openapi({+ resend: z.boolean().optional().openapi({description:"Resend the invitation email, if the user is already invited. Eg: true",}),- teamId: z.string(),+ teamId: z.union([z.string(), z.array(z.string())]).optional(),}),},},@@ -718,11 +717,7 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {responses: {200: {description: "Success",- content: {- "application/json": {- schema: z.array(z.record(z.string(), z.unknown())),- },- },+ content: { "application/json": { schema: z.array(z.unknown()) } },},},});@@ -779,7 +774,7 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {memberIdOrEmail: z.string().openapi({description: "The ID or email of the member to remove",}),- organizationId: z.string().nullable().optional().openapi({+ organizationId: z.string().optional().openapi({description:'The ID of the organization to remove the member from. If not provided, the active organization will be used. Eg: "org-id"',}),@@ -823,7 +818,7 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {teamId: z.string().openapi({description: 'The team ID of the team to remove. Eg: "team-id"',}),- organizationId: z.string().nullable().optional().openapi({+ organizationId: z.string().optional().openapi({description:'The organization ID which the team falls under. If not provided, it will default to the user\'s active organization. Eg: "organization-id"',}),@@ -868,7 +863,7 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {userId: z.string().openapi({description: "The user which should be removed from the team.",}),- organizationId: z.string().nullable().optional().openapi({+ organizationId: z.string().optional().openapi({description:"The organization ID which the team falls under. If not provided, it will default to the user's active organization.",}),@@ -907,8 +902,11 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {content: {"application/json": {schema: z.object({- organizationId: z.string().nullable().optional(),- organizationSlug: z.string().nullable().optional().openapi({+ organizationId: z.string().optional().openapi({+ description:+ 'The organization id to set as active. It can be null to unset the active organization. Eg: "org-id"',+ }),+ organizationSlug: z.string().optional().openapi({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"',}),@@ -920,9 +918,7 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {responses: {200: {description: "Success",- content: {- "application/json": { schema: z.record(z.string(), z.unknown()) },- },+ content: { "application/json": { schema: z.unknown() } },},},});@@ -940,7 +936,10 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {content: {"application/json": {schema: z.object({- teamId: z.string().nullable().optional(),+ teamId: z.string().optional().openapi({+ description:+ "The team id to set as active. It can be null to unset the active team",+ }),}),},},@@ -949,9 +948,7 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {responses: {200: {description: "Success",- content: {- "application/json": { schema: z.record(z.string(), z.unknown()) },- },+ content: { "application/json": { schema: z.unknown() } },},},});@@ -970,31 +967,26 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {"application/json": {schema: z.object({data: z.object({- description: z.string().nullable().optional(),+ description: z.string().optional(),name: z.string()- .nullable().optional().openapi({ description: "The name of the organization" }),slug: z.string()- .nullable().optional().openapi({ description: "The slug of the organization" }),logo: z.string()- .nullable().optional().openapi({ description: "The logo of the organization" }),metadata: z- .string()- .nullable()+ .record(z.string(), z.unknown()).optional().openapi({ description: "The metadata of the organization" }),}),organizationId: z.string()- .nullable().optional().openapi({ description: 'The organization ID. Eg: "org-id"' }),}),@@ -1005,9 +997,7 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {responses: {200: {description: "Success",- content: {- "application/json": { schema: z.record(z.string(), z.unknown()) },- },+ content: { "application/json": { schema: z.unknown() } },},},});@@ -1025,7 +1015,7 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {content: {"application/json": {schema: z.object({- role: z.string().openapi({+ role: z.union([z.string(), z.array(z.string())]).openapi({description:'The new role to be applied. This can be a string or array of strings representing the roles. Eg: ["admin", "sale"]',}),@@ -1033,7 +1023,7 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {description:'The member id to apply the role update to. Eg: "member-id"',}),- organizationId: z.string().nullable().optional().openapi({+ organizationId: z.string().optional().openapi({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"',}),@@ -1068,6 +1058,12 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {operationId: "updateOrganizationRole",summary: "Update Organization Role",description: "Update Organization Role",+ request: {+ body: {+ required: true,+ content: { "application/json": { schema: z.unknown() } },+ },+ },responses: {200: { description: "Success" },},@@ -1090,11 +1086,11 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {description: 'The ID of the team to be updated. Eg: "team-id"',}),data: z.object({- id: z.string().nullable().optional(),- name: z.string().nullable().optional(),- organizationId: z.string().nullable().optional(),- createdAt: z.string().nullable().optional(),- updatedAt: z.string().nullable().optional(),+ id: z.string().optional(),+ name: z.string().optional(),+ organizationId: z.string().optional(),+ createdAt: z.string().optional(),+ updatedAt: z.string().optional(),}),}),},diff --git a/apps/api/src/column/index.ts b/apps/api/src/column/index.tsindex 08857f27a..0711ddb95 100644--- a/apps/api/src/column/index.ts+++ b/apps/api/src/column/index.ts@@ -63,6 +63,7 @@ const createColumnRoute = createRoute({403: errorResponse("No workspace access, or missing project:update permission",),+ 409: errorResponse("The slug is reserved, or already used in this project"),},});diff --git a/apps/api/src/discord-integration/index.ts b/apps/api/src/discord-integration/index.tsindex de8cad367..e66897948 100644--- a/apps/api/src/discord-integration/index.ts+++ b/apps/api/src/discord-integration/index.ts@@ -113,7 +113,7 @@ const createDiscordIntegrationRoute = createRoute({tags: ["Discord"],summary: "Create Discord integration",description:- "Create or replace the Discord integration for a project. The webhook URL is verified before it is stored.",+ "Create or replace the Discord integration for a project. The webhook URL is checked for shape only; delivery failures surface later.",middleware: manageAccess,request: {params: projectIdParam,diff --git a/apps/api/src/gitea-integration/index.ts b/apps/api/src/gitea-integration/index.tsindex b68cffe3e..a2a0018a0 100644--- a/apps/api/src/gitea-integration/index.ts+++ b/apps/api/src/gitea-integration/index.ts@@ -122,7 +122,7 @@ const createIntegrationRoute = createRoute({tags: ["Gitea"],summary: "Create Gitea integration",description:- "Link a project to a Gitea repository, creating the webhook Gitea will post events to.",+ "Link a project to a Gitea repository, creating the webhook Gitea will post events to. Use the verify route first to confirm the token really reaches the repository.",middleware: manageAccess,request: {params: projectIdParam,diff --git a/apps/api/src/slack-integration/index.ts b/apps/api/src/slack-integration/index.tsindex 2b4f16057..7d8045dd1 100644--- a/apps/api/src/slack-integration/index.ts+++ b/apps/api/src/slack-integration/index.ts@@ -111,7 +111,7 @@ const createSlackIntegrationRoute = createRoute({tags: ["Slack"],summary: "Create Slack integration",description:- "Create or replace the Slack integration for a project. The webhook URL is verified before it is stored.",+ "Create or replace the Slack integration for a project. The webhook URL is checked for shape only; delivery failures surface later.",middleware: manageAccess,request: {params: projectIdParam,diff --git a/apps/api/src/task-relation/index.ts b/apps/api/src/task-relation/index.tsindex f213f2f29..d90abcdd1 100644--- a/apps/api/src/task-relation/index.ts+++ b/apps/api/src/task-relation/index.ts@@ -133,11 +133,12 @@ const createTaskRelationRoute = createRoute({},responses: {200: jsonResponse("The created relation", taskRelationSchema),- 400: errorResponse("Invalid body, or the relation already exists"),+ 400: errorResponse("Invalid body"),403: errorResponse("No workspace access, or missing task:update permission",),- 404: errorResponse("Source task not found"),+ 404: errorResponse("Source or target task not found"),+ 409: errorResponse("This relation already exists"),},});diff --git a/apps/api/src/task/schema.ts b/apps/api/src/task/schema.tsindex 2d518fc18..a3ae0d563 100644--- a/apps/api/src/task/schema.ts+++ b/apps/api/src/task/schema.ts@@ -1,6 +1,13 @@import { z } from "../openapi";import { VALID_PRIORITIES } from "./validate-task-fields";+const pagingNumber = (min: number, max: number) =>+ z+ .string()+ .regex(/^\d+$/, "Expected a positive integer")+ .transform(Number)+ .pipe(z.number().int().min(min).max(max));+export const taskParam = z.object({ id: z.string() });export const projectIdParam = z.object({ projectId: z.string() });@@ -12,14 +19,9 @@ export const listTasksQuery = z.object({status: z.string().optional(),priority: z.string().optional(),assigneeId: z.string().optional(),- page: z- .string()- .optional()- .transform((v) => (v === undefined ? undefined : Number(v))),- limit: z- .string()- .optional()- .transform((v) => (v === undefined ? undefined : Number(v))),+ // Number("abc") is NaN, which used to reach the limit/offset clause unchecked.+ page: pagingNumber(1, 1_000_000).optional(),+ limit: pagingNumber(1, 200).optional(),sortBy: z.enum(["createdAt", "priority", "dueDate", "position", "title", "number"]).optional(),diff --git a/apps/api/src/telegram-integration/index.ts b/apps/api/src/telegram-integration/index.tsindex cd70cf97c..2c5b3f8f3 100644--- a/apps/api/src/telegram-integration/index.ts+++ b/apps/api/src/telegram-integration/index.ts@@ -79,7 +79,7 @@ const createTelegramIntegrationRoute = createRoute({tags: ["Telegram"],summary: "Create Telegram integration",description:- "Create or replace the Telegram integration for a project. The bot token and chat are verified with Telegram before they are stored.",+ "Create or replace the Telegram integration for a project. The bot token and chat are checked for shape only, not against Telegram.",middleware: manageAccess,request: {params: projectIdParam,diff --git a/apps/api/src/time-entry/response.ts b/apps/api/src/time-entry/response.tsindex 2e1ecc33b..e04b29b67 100644--- a/apps/api/src/time-entry/response.ts+++ b/apps/api/src/time-entry/response.ts@@ -20,4 +20,8 @@ export const timeEntrySchema = z}).openapi("TimeEntry");-export const timeEntryListSchema = z.array(timeEntrySchema);+export const timeEntryListSchema = z.array(+ timeEntrySchema+ .extend({ userName: z.string().nullable() })+ .openapi("TimeEntryWithUser"),+);diff --git a/apps/docs/openapi.json b/apps/docs/openapi.jsonindex 93958fc4f..69ddb7f95 100644--- a/apps/docs/openapi.json+++ b/apps/docs/openapi.json@@ -1205,6 +1205,27 @@"image"]},+ "TimeEntryWithUser": {+ "allOf": [+ {+ "$ref": "#/components/schemas/TimeEntry"+ },+ {+ "type": "object",+ "properties": {+ "userName": {+ "type": [+ "string",+ "null"+ ]+ }+ },+ "required": [+ "userName"+ ]+ }+ ]+ },"TimeEntry": {"type": "object","properties": {@@ -3295,10 +3316,7 @@"description": "The user Id which represents the user to be added as a member."},"organizationId": {- "type": [- "string",- "null"- ],+ "type": "string","description": "The organization ID which the team falls under. If not provided, it will default to the user's active organization."}},@@ -3449,38 +3467,24 @@"description": "The slug of the organization"},"userId": {- "type": [- "string",- "null"- ],+ "type": "string","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\""},"logo": {- "type": [- "string",- "null"- ],+ "type": "string","description": "The logo of the organization"},"metadata": {- "type": [- "string",- "null"- ],+ "type": "object",+ "additionalProperties": {},"description": "The metadata of the organization"},"keepCurrentActiveOrganization": {- "type": [- "boolean",- "null"- ],+ "type": "boolean","description": "Whether to keep the current active organization active after creating a new one. Eg: true"},"description": {- "type": [- "string",- "null"- ]+ "type": "string"}},"required": [@@ -3496,10 +3500,7 @@"description": "Success","content": {"application/json": {- "schema": {- "type": "object",- "additionalProperties": {}- }+ "schema": {}}}},@@ -3525,24 +3526,19 @@"type": "object","properties": {"organizationId": {- "type": [- "string",- "null"- ]+ "type": "string"},"role": {"type": "string","description": "The name of the role to create"},"permission": {- "type": "string",+ "type": "object",+ "additionalProperties": {},"description": "The permission to assign to the role"},"additionalFields": {- "type": [- "object",- "null"- ],+ "type": "object","additionalProperties": {}}},@@ -3584,10 +3580,7 @@"description": "The name of the team. Eg: \"my-team\""},"organizationId": {- "type": [- "string",- "null"- ],+ "type": "string","description": "The organization ID which the team will be created in. Defaults to the active organization. Eg: \"organization-id\""}},@@ -3696,6 +3689,14 @@"operationId": "deleteOrganizationRole","summary": "Delete Organization Role","description": "Delete Organization Role",+ "requestBody": {+ "required": true,+ "content": {+ "application/json": {+ "schema": {}+ }+ }+ },"responses": {"200": {"description": "Success"@@ -3782,10 +3783,7 @@"description": "Success","content": {"application/json": {- "schema": {- "type": "object",- "additionalProperties": {}- }+ "schema": {}}}},@@ -3808,7 +3806,7 @@"schema": {"type": "string"},- "required": true,+ "required": false,"name": "id","in": "query"}@@ -3898,7 +3896,7 @@"Organization Management"],"operationId": "hasOrganizationPermission",- "summary": "Has Organization Permission",+ "summary": "Check Organization Permission","description": "Check if the user has permission","requestBody": {"required": true,@@ -3973,31 +3971,44 @@"description": "The email address of the user to invite"},"role": {- "type": "string",+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ }+ ],"description": "The role(s) to assign to the user. It can be `admin`, `member`, owner. Eg: \"member\""},"organizationId": {- "type": [- "string",- "null"- ],+ "type": "string","description": "The organization ID to invite the user to"},"resend": {- "type": [- "boolean",- "null"- ],+ "type": "boolean","description": "Resend the invitation email, if the user is already invited. Eg: true"},"teamId": {- "type": "string"+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ }+ ]}},"required": ["email",- "role",- "teamId"+ "role"]}}@@ -4373,10 +4384,7 @@"application/json": {"schema": {"type": "array",- "items": {- "type": "object",- "additionalProperties": {}- }+ "items": {}}}}@@ -4464,10 +4472,7 @@"description": "The ID or email of the member to remove"},"organizationId": {- "type": [- "string",- "null"- ],+ "type": "string","description": "The ID of the organization to remove the member from. If not provided, the active organization will be used. Eg: \"org-id\""}},@@ -4543,10 +4548,7 @@"description": "The team ID of the team to remove. Eg: \"team-id\""},"organizationId": {- "type": [- "string",- "null"- ],+ "type": "string","description": "The organization ID which the team falls under. If not provided, it will default to the user's active organization. Eg: \"organization-id\""}},@@ -4610,10 +4612,7 @@"description": "The user which should be removed from the team."},"organizationId": {- "type": [- "string",- "null"- ],+ "type": "string","description": "The organization ID which the team falls under. If not provided, it will default to the user's active organization."}},@@ -4670,16 +4669,11 @@"type": "object","properties": {"organizationId": {- "type": [- "string",- "null"- ]+ "type": "string",+ "description": "The organization id to set as active. It can be null to unset the active organization. Eg: \"org-id\""},"organizationSlug": {- "type": [- "string",- "null"- ],+ "type": "string","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\""}}@@ -4692,10 +4686,7 @@"description": "Success","content": {"application/json": {- "schema": {- "type": "object",- "additionalProperties": {}- }+ "schema": {}}}},@@ -4721,10 +4712,8 @@"type": "object","properties": {"teamId": {- "type": [- "string",- "null"- ]+ "type": "string",+ "description": "The team id to set as active. It can be null to unset the active team"}}}@@ -4736,10 +4725,7 @@"description": "Success","content": {"application/json": {- "schema": {- "type": "object",- "additionalProperties": {}- }+ "schema": {}}}},@@ -4768,46 +4754,29 @@"type": "object","properties": {"description": {- "type": [- "string",- "null"- ]+ "type": "string"},"name": {- "type": [- "string",- "null"- ],+ "type": "string","description": "The name of the organization"},"slug": {- "type": [- "string",- "null"- ],+ "type": "string","description": "The slug of the organization"},"logo": {- "type": [- "string",- "null"- ],+ "type": "string","description": "The logo of the organization"},"metadata": {- "type": [- "string",- "null"- ],+ "type": "object",+ "additionalProperties": {},"description": "The metadata of the organization"}}},"organizationId": {- "type": [- "string",- "null"- ],+ "type": "string","description": "The organization ID. Eg: \"org-id\""}},@@ -4823,10 +4792,7 @@"description": "Success","content": {"application/json": {- "schema": {- "type": "object",- "additionalProperties": {}- }+ "schema": {}}}},@@ -4852,7 +4818,17 @@"type": "object","properties": {"role": {- "type": "string",+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "array",+ "items": {+ "type": "string"+ }+ }+ ],"description": "The new role to be applied. This can be a string or array of strings representing the roles. Eg: [\"admin\", \"sale\"]"},"memberId": {@@ -4860,10 +4836,7 @@"description": "The member id to apply the role update to. Eg: \"member-id\""},"organizationId": {- "type": [- "string",- "null"- ],+ "type": "string","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\""}},@@ -4928,6 +4901,14 @@"operationId": "updateOrganizationRole","summary": "Update Organization Role","description": "Update Organization Role",+ "requestBody": {+ "required": true,+ "content": {+ "application/json": {+ "schema": {}+ }+ }+ },"responses": {"200": {"description": "Success"@@ -4961,34 +4942,19 @@"type": "object","properties": {"id": {- "type": [- "string",- "null"- ]+ "type": "string"},"name": {- "type": [- "string",- "null"- ]+ "type": "string"},"organizationId": {- "type": [- "string",- "null"- ]+ "type": "string"},"createdAt": {- "type": [- "string",- "null"- ]+ "type": "string"},"updatedAt": {- "type": [- "string",- "null"- ]+ "type": "string"}}}@@ -6013,7 +5979,8 @@},{"schema": {- "type": "string"+ "type": "string",+ "pattern": "^\\d+$"},"required": false,"name": "page",@@ -6021,7 +5988,8 @@},{"schema": {- "type": "string"+ "type": "string",+ "pattern": "^\\d+$"},"required": false,"name": "limit",@@ -7583,6 +7551,16 @@}}}+ },+ "409": {+ "description": "The slug is reserved, or already used in this project",+ "content": {+ "text/plain": {+ "schema": {+ "type": "string"+ }+ }+ }}}}@@ -8499,7 +8477,7 @@"schema": {"type": "array","items": {- "$ref": "#/components/schemas/TimeEntry"+ "$ref": "#/components/schemas/TimeEntryWithUser"}}}@@ -10624,7 +10602,7 @@"Gitea"],"summary": "Create Gitea integration",- "description": "Link a project to a Gitea repository, creating the webhook Gitea will post events to.",+ "description": "Link a project to a Gitea repository, creating the webhook Gitea will post events to. Use the verify route first to confirm the token really reaches the repository.","parameters": [{"schema": {@@ -11366,7 +11344,7 @@"Discord"],"summary": "Create Discord integration",- "description": "Create or replace the Discord integration for a project. The webhook URL is verified before it is stored.",+ "description": "Create or replace the Discord integration for a project. The webhook URL is checked for shape only; delivery failures surface later.","parameters": [{"schema": {@@ -11700,7 +11678,7 @@"Slack"],"summary": "Create Slack integration",- "description": "Create or replace the Slack integration for a project. The webhook URL is verified before it is stored.",+ "description": "Create or replace the Slack integration for a project. The webhook URL is checked for shape only; delivery failures surface later.","parameters": [{"schema": {@@ -12034,7 +12012,7 @@"Telegram"],"summary": "Create Telegram integration",- "description": "Create or replace the Telegram integration for a project. The bot token and chat are verified with Telegram before they are stored.",+ "description": "Create or replace the Telegram integration for a project. The bot token and chat are checked for shape only, not against Telegram.","parameters": [{"schema": {@@ -12435,7 +12413,7 @@}},"400": {- "description": "Invalid body, or the relation already exists",+ "description": "Invalid body","content": {"text/plain": {"schema": {@@ -12458,7 +12436,17 @@}},"404": {- "description": "Source task not found",+ "description": "Source or target task not found",+ "content": {+ "text/plain": {+ "schema": {+ "type": "string"+ }+ }+ }+ },+ "409": {+ "description": "This relation already exists","content": {"text/plain": {"schema": {