Skip to content

Commit d3a9926

Browse files
author
Lasim
committed
feat(all): add teams management functionality for global admins
1 parent 09ae873 commit d3a9926

File tree

20 files changed

+1888
-4
lines changed

20 files changed

+1888
-4
lines changed

services/backend/api-spec.json

Lines changed: 377 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27365,7 +27365,384 @@
2736527365
}
2736627366
}
2736727367
},
27368+
"/api/admin/teams": {
27369+
"get": {
27370+
"summary": "List all teams (Global Admin)",
27371+
"tags": [
27372+
"Admin - Teams"
27373+
],
27374+
"description": "Allows global administrators to retrieve a list of all teams in the system.",
27375+
"security": [
27376+
{
27377+
"cookieAuth": []
27378+
}
27379+
],
27380+
"responses": {
27381+
"200": {
27382+
"description": "List of all teams",
27383+
"content": {
27384+
"application/json": {
27385+
"schema": {
27386+
"type": "object",
27387+
"properties": {
27388+
"success": {
27389+
"type": "boolean",
27390+
"description": "Indicates operation success"
27391+
},
27392+
"data": {
27393+
"type": "array",
27394+
"items": {
27395+
"type": "object",
27396+
"properties": {
27397+
"id": {
27398+
"type": "string",
27399+
"description": "Team unique identifier"
27400+
},
27401+
"name": {
27402+
"type": "string",
27403+
"description": "Team name"
27404+
},
27405+
"slug": {
27406+
"type": "string",
27407+
"description": "Team URL slug"
27408+
},
27409+
"description": {
27410+
"type": "string",
27411+
"nullable": true,
27412+
"description": "Team description"
27413+
},
27414+
"owner_id": {
27415+
"type": "string",
27416+
"description": "Team owner user ID"
27417+
},
27418+
"is_default": {
27419+
"type": "boolean",
27420+
"description": "Whether this is the default team"
27421+
},
27422+
"non_http_mcp_limit": {
27423+
"type": "integer",
27424+
"description": "Non-HTTP MCP server limit"
27425+
},
27426+
"created_at": {
27427+
"type": "string",
27428+
"description": "ISO8601 timestamp"
27429+
},
27430+
"updated_at": {
27431+
"type": "string",
27432+
"description": "ISO8601 timestamp"
27433+
}
27434+
},
27435+
"required": [
27436+
"id",
27437+
"name",
27438+
"slug",
27439+
"owner_id",
27440+
"is_default",
27441+
"non_http_mcp_limit",
27442+
"created_at",
27443+
"updated_at"
27444+
]
27445+
}
27446+
}
27447+
},
27448+
"required": [
27449+
"success",
27450+
"data"
27451+
],
27452+
"description": "List of all teams"
27453+
}
27454+
}
27455+
}
27456+
},
27457+
"401": {
27458+
"description": "Unauthorized",
27459+
"content": {
27460+
"application/json": {
27461+
"schema": {
27462+
"type": "object",
27463+
"properties": {
27464+
"success": {
27465+
"type": "boolean",
27466+
"default": false,
27467+
"description": "Indicates operation failure"
27468+
},
27469+
"error": {
27470+
"type": "string",
27471+
"description": "Error message"
27472+
}
27473+
},
27474+
"required": [
27475+
"success",
27476+
"error"
27477+
],
27478+
"description": "Unauthorized"
27479+
}
27480+
}
27481+
}
27482+
},
27483+
"403": {
27484+
"description": "Forbidden - Global admin required",
27485+
"content": {
27486+
"application/json": {
27487+
"schema": {
27488+
"type": "object",
27489+
"properties": {
27490+
"success": {
27491+
"type": "boolean",
27492+
"default": false,
27493+
"description": "Indicates operation failure"
27494+
},
27495+
"error": {
27496+
"type": "string",
27497+
"description": "Error message"
27498+
}
27499+
},
27500+
"required": [
27501+
"success",
27502+
"error"
27503+
],
27504+
"description": "Forbidden - Global admin required"
27505+
}
27506+
}
27507+
}
27508+
},
27509+
"500": {
27510+
"description": "Internal Server Error",
27511+
"content": {
27512+
"application/json": {
27513+
"schema": {
27514+
"type": "object",
27515+
"properties": {
27516+
"success": {
27517+
"type": "boolean",
27518+
"default": false,
27519+
"description": "Indicates operation failure"
27520+
},
27521+
"error": {
27522+
"type": "string",
27523+
"description": "Error message"
27524+
}
27525+
},
27526+
"required": [
27527+
"success",
27528+
"error"
27529+
],
27530+
"description": "Internal Server Error"
27531+
}
27532+
}
27533+
}
27534+
}
27535+
}
27536+
}
27537+
},
2736827538
"/api/admin/teams/{id}": {
27539+
"get": {
27540+
"summary": "Get team by ID (Global Admin)",
27541+
"tags": [
27542+
"Admin - Teams"
27543+
],
27544+
"description": "Allows global administrators to retrieve a specific team by ID.",
27545+
"parameters": [
27546+
{
27547+
"schema": {
27548+
"type": "string"
27549+
},
27550+
"in": "path",
27551+
"name": "id",
27552+
"required": true,
27553+
"description": "Team ID"
27554+
}
27555+
],
27556+
"security": [
27557+
{
27558+
"cookieAuth": []
27559+
}
27560+
],
27561+
"responses": {
27562+
"200": {
27563+
"description": "Team retrieved successfully",
27564+
"content": {
27565+
"application/json": {
27566+
"schema": {
27567+
"type": "object",
27568+
"properties": {
27569+
"success": {
27570+
"type": "boolean",
27571+
"description": "Indicates operation success"
27572+
},
27573+
"message": {
27574+
"type": "string",
27575+
"description": "Success message"
27576+
},
27577+
"data": {
27578+
"type": "object",
27579+
"properties": {
27580+
"id": {
27581+
"type": "string",
27582+
"description": "Team unique identifier"
27583+
},
27584+
"name": {
27585+
"type": "string",
27586+
"description": "Team name"
27587+
},
27588+
"slug": {
27589+
"type": "string",
27590+
"description": "Team URL slug"
27591+
},
27592+
"description": {
27593+
"type": "string",
27594+
"nullable": true,
27595+
"description": "Team description"
27596+
},
27597+
"owner_id": {
27598+
"type": "string",
27599+
"description": "Team owner user ID"
27600+
},
27601+
"is_default": {
27602+
"type": "boolean",
27603+
"description": "Whether this is the default team"
27604+
},
27605+
"non_http_mcp_limit": {
27606+
"type": "integer",
27607+
"description": "Non-HTTP MCP server limit"
27608+
},
27609+
"created_at": {
27610+
"type": "string",
27611+
"description": "ISO8601 timestamp"
27612+
},
27613+
"updated_at": {
27614+
"type": "string",
27615+
"description": "ISO8601 timestamp"
27616+
}
27617+
},
27618+
"required": [
27619+
"id",
27620+
"name",
27621+
"slug",
27622+
"owner_id",
27623+
"is_default",
27624+
"non_http_mcp_limit",
27625+
"created_at",
27626+
"updated_at"
27627+
]
27628+
}
27629+
},
27630+
"required": [
27631+
"success",
27632+
"message",
27633+
"data"
27634+
],
27635+
"description": "Team retrieved successfully"
27636+
}
27637+
}
27638+
}
27639+
},
27640+
"401": {
27641+
"description": "Unauthorized",
27642+
"content": {
27643+
"application/json": {
27644+
"schema": {
27645+
"type": "object",
27646+
"properties": {
27647+
"success": {
27648+
"type": "boolean",
27649+
"default": false,
27650+
"description": "Indicates operation failure"
27651+
},
27652+
"error": {
27653+
"type": "string",
27654+
"description": "Error message"
27655+
}
27656+
},
27657+
"required": [
27658+
"success",
27659+
"error"
27660+
],
27661+
"description": "Unauthorized"
27662+
}
27663+
}
27664+
}
27665+
},
27666+
"403": {
27667+
"description": "Forbidden - Global admin required",
27668+
"content": {
27669+
"application/json": {
27670+
"schema": {
27671+
"type": "object",
27672+
"properties": {
27673+
"success": {
27674+
"type": "boolean",
27675+
"default": false,
27676+
"description": "Indicates operation failure"
27677+
},
27678+
"error": {
27679+
"type": "string",
27680+
"description": "Error message"
27681+
}
27682+
},
27683+
"required": [
27684+
"success",
27685+
"error"
27686+
],
27687+
"description": "Forbidden - Global admin required"
27688+
}
27689+
}
27690+
}
27691+
},
27692+
"404": {
27693+
"description": "Team not found",
27694+
"content": {
27695+
"application/json": {
27696+
"schema": {
27697+
"type": "object",
27698+
"properties": {
27699+
"success": {
27700+
"type": "boolean",
27701+
"default": false,
27702+
"description": "Indicates operation failure"
27703+
},
27704+
"error": {
27705+
"type": "string",
27706+
"description": "Error message"
27707+
}
27708+
},
27709+
"required": [
27710+
"success",
27711+
"error"
27712+
],
27713+
"description": "Team not found"
27714+
}
27715+
}
27716+
}
27717+
},
27718+
"500": {
27719+
"description": "Internal Server Error",
27720+
"content": {
27721+
"application/json": {
27722+
"schema": {
27723+
"type": "object",
27724+
"properties": {
27725+
"success": {
27726+
"type": "boolean",
27727+
"default": false,
27728+
"description": "Indicates operation failure"
27729+
},
27730+
"error": {
27731+
"type": "string",
27732+
"description": "Error message"
27733+
}
27734+
},
27735+
"required": [
27736+
"success",
27737+
"error"
27738+
],
27739+
"description": "Internal Server Error"
27740+
}
27741+
}
27742+
}
27743+
}
27744+
}
27745+
},
2736927746
"put": {
2737027747
"summary": "Update team (Global Admin)",
2737127748
"tags": [

0 commit comments

Comments
 (0)