⚡ 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
docs(api): document invitation project access
Andrejda0d120c19eb
diff --git a/apps/api/src/auth-openapi.ts b/apps/api/src/auth-openapi.tsindex be421d570..a654d5c06 100644--- a/apps/api/src/auth-openapi.ts+++ b/apps/api/src/auth-openapi.ts@@ -10,6 +10,17 @@ import { z } from "./openapi";// 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.+const invitationProjectAccess = {+ projectAccess: z.enum(["all", "selected"]).openapi({+ description:+ '"all" gives access to every project once accepted; "selected" limits the member to projectIds.',+ }),+ projectIds: z.array(z.string()).openapi({+ description:+ 'Projects the invitation grants when projectAccess is "selected". Only projects the viewer can access are listed.',+ }),+};+export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {registry.registerPath({method: "post",@@ -431,6 +442,7 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {organizationName: z.string(),organizationSlug: z.string(),inviterEmail: z.string(),+ ...invitationProjectAccess,}),},},@@ -557,6 +569,7 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {status: z.string(),expiresAt: z.string(),createdAt: z.string(),+ ...invitationProjectAccess,}),},},@@ -613,8 +626,32 @@ export function organizationRoutes(registry: OpenAPIHono["openAPIRegistry"]) {operationId: "listOrganizationInvitations",summary: "List Organization Invitations",description: "List Organization Invitations",+ request: {+ query: z.object({+ organizationId: z.string().optional(),+ }),+ },responses: {- 200: { description: "Success" },+ 200: {+ description: "Success",+ content: {+ "application/json": {+ schema: z.array(+ z.object({+ id: z.string(),+ email: z.string(),+ role: z.string(),+ organizationId: z.string(),+ inviterId: z.string(),+ status: z.string(),+ expiresAt: z.string(),+ createdAt: z.string(),+ ...invitationProjectAccess,+ }),+ ),+ },+ },+ },},});diff --git a/apps/docs/openapi.json b/apps/docs/openapi.jsonindex 8e912b58d..ac279654d 100644--- a/apps/docs/openapi.json+++ b/apps/docs/openapi.json@@ -5869,6 +5869,21 @@},"inviterEmail": {"type": "string"+ },+ "projectAccess": {+ "type": "string",+ "enum": [+ "all",+ "selected"+ ],+ "description": "\"all\" gives access to every project once accepted; \"selected\" limits the member to projectIds."+ },+ "projectIds": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Projects the invitation grants when projectAccess is \"selected\". Only projects the viewer can access are listed."}},"required": [@@ -5881,7 +5896,9 @@"expiresAt","organizationName","organizationSlug",- "inviterEmail"+ "inviterEmail",+ "projectAccess",+ "projectIds"]}}@@ -6081,6 +6098,21 @@},"createdAt": {"type": "string"+ },+ "projectAccess": {+ "type": "string",+ "enum": [+ "all",+ "selected"+ ],+ "description": "\"all\" gives access to every project once accepted; \"selected\" limits the member to projectIds."+ },+ "projectIds": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Projects the invitation grants when projectAccess is \"selected\". Only projects the viewer can access are listed."}},"required": [@@ -6091,7 +6123,9 @@"inviterId","status","expiresAt",- "createdAt"+ "createdAt",+ "projectAccess",+ "projectIds"]}}@@ -6199,9 +6233,82 @@"operationId": "listOrganizationInvitations","summary": "List Organization Invitations","description": "List Organization Invitations",+ "parameters": [+ {+ "schema": {+ "type": "string"+ },+ "required": false,+ "name": "organizationId",+ "in": "query"+ }+ ],"responses": {"200": {- "description": "Success"+ "description": "Success",+ "content": {+ "application/json": {+ "schema": {+ "type": "array",+ "items": {+ "type": "object",+ "properties": {+ "id": {+ "type": "string"+ },+ "email": {+ "type": "string"+ },+ "role": {+ "type": "string"+ },+ "organizationId": {+ "type": "string"+ },+ "inviterId": {+ "type": "string"+ },+ "status": {+ "type": "string"+ },+ "expiresAt": {+ "type": "string"+ },+ "createdAt": {+ "type": "string"+ },+ "projectAccess": {+ "type": "string",+ "enum": [+ "all",+ "selected"+ ],+ "description": "\"all\" gives access to every project once accepted; \"selected\" limits the member to projectIds."+ },+ "projectIds": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Projects the invitation grants when projectAccess is \"selected\". Only projects the viewer can access are listed."+ }+ },+ "required": [+ "id",+ "email",+ "role",+ "organizationId",+ "inviterId",+ "status",+ "expiresAt",+ "createdAt",+ "projectAccess",+ "projectIds"+ ]+ }+ }+ }+ }},"401": {"description": "Missing or invalid credentials"