Skip to content

Commit 67dc10f

Browse files
author
Lasim
committed
feat(gateway): add client-specific gateway configuration endpoint
1 parent cb2b329 commit 67dc10f

File tree

9 files changed

+371
-85
lines changed

9 files changed

+371
-85
lines changed

services/backend/api-spec.json

Lines changed: 127 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3663,50 +3663,23 @@
36633663
"preferences": {
36643664
"type": "object",
36653665
"properties": {
3666-
"show_survey_overall": {
3667-
"type": "boolean",
3668-
"description": "Show overall survey"
3669-
},
3670-
"show_survey_company": {
3671-
"type": "boolean",
3672-
"description": "Show company survey"
3673-
},
36743666
"walkthrough_completed": {
3675-
"type": "boolean",
3676-
"description": "Whether walkthrough was completed"
3667+
"type": "boolean"
36773668
},
36783669
"walkthrough_cancelled": {
3679-
"type": "boolean",
3680-
"description": "Whether walkthrough was cancelled"
3681-
},
3682-
"theme": {
3683-
"type": "string",
3684-
"enum": [
3685-
"light",
3686-
"dark",
3687-
"auto"
3688-
],
3689-
"description": "UI theme preference"
3690-
},
3691-
"sidebar_collapsed": {
3692-
"type": "boolean",
3693-
"description": "Sidebar collapsed state"
3670+
"type": "boolean"
36943671
},
36953672
"email_notifications_enabled": {
3696-
"type": "boolean",
3697-
"description": "Email notifications enabled"
3673+
"type": "boolean"
36983674
},
36993675
"browser_notifications_enabled": {
3700-
"type": "boolean",
3701-
"description": "Browser notifications enabled"
3676+
"type": "boolean"
37023677
},
37033678
"notification_acknowledgments": {
3704-
"type": "string",
3705-
"description": "Comma-separated list of acknowledged notification IDs"
3679+
"type": "string"
37063680
},
37073681
"beta_features_enabled": {
3708-
"type": "boolean",
3709-
"description": "Beta features enabled"
3682+
"type": "boolean"
37103683
}
37113684
},
37123685
"additionalProperties": false
@@ -3783,29 +3756,12 @@
37833756
"schema": {
37843757
"type": "object",
37853758
"properties": {
3786-
"show_survey_overall": {
3787-
"type": "boolean"
3788-
},
3789-
"show_survey_company": {
3790-
"type": "boolean"
3791-
},
37923759
"walkthrough_completed": {
37933760
"type": "boolean"
37943761
},
37953762
"walkthrough_cancelled": {
37963763
"type": "boolean"
37973764
},
3798-
"theme": {
3799-
"type": "string",
3800-
"enum": [
3801-
"light",
3802-
"dark",
3803-
"auto"
3804-
]
3805-
},
3806-
"sidebar_collapsed": {
3807-
"type": "boolean"
3808-
},
38093765
"email_notifications_enabled": {
38103766
"type": "boolean"
38113767
},
@@ -19580,6 +19536,127 @@
1958019536
}
1958119537
}
1958219538
},
19539+
"/api/config/{client}": {
19540+
"get": {
19541+
"summary": "Get client-specific gateway configuration",
19542+
"tags": [
19543+
"Gateway Configuration"
19544+
],
19545+
"description": "Returns the appropriate configuration format for connecting the specified MCP client to the local DeployStack Gateway.",
19546+
"parameters": [
19547+
{
19548+
"schema": {
19549+
"type": "string",
19550+
"enum": [
19551+
"claude-desktop",
19552+
"cline",
19553+
"vscode",
19554+
"cursor",
19555+
"windsurf"
19556+
]
19557+
},
19558+
"in": "path",
19559+
"name": "client",
19560+
"required": true,
19561+
"description": "The MCP client type"
19562+
}
19563+
],
19564+
"security": [
19565+
{
19566+
"cookieAuth": []
19567+
},
19568+
{
19569+
"bearerAuth": []
19570+
}
19571+
],
19572+
"responses": {
19573+
"200": {
19574+
"description": "Client-specific gateway configuration",
19575+
"content": {
19576+
"application/json": {
19577+
"schema": {
19578+
"type": "object",
19579+
"description": "Client-specific gateway configuration",
19580+
"additionalProperties": true
19581+
}
19582+
}
19583+
}
19584+
},
19585+
"400": {
19586+
"description": "Bad Request - Invalid client type",
19587+
"content": {
19588+
"application/json": {
19589+
"schema": {
19590+
"type": "object",
19591+
"properties": {
19592+
"success": {
19593+
"type": "boolean",
19594+
"default": false
19595+
},
19596+
"error": {
19597+
"type": "string"
19598+
}
19599+
},
19600+
"required": [
19601+
"success",
19602+
"error"
19603+
],
19604+
"description": "Bad Request - Invalid client type"
19605+
}
19606+
}
19607+
}
19608+
},
19609+
"401": {
19610+
"description": "Unauthorized - Authentication required",
19611+
"content": {
19612+
"application/json": {
19613+
"schema": {
19614+
"type": "object",
19615+
"properties": {
19616+
"success": {
19617+
"type": "boolean",
19618+
"default": false
19619+
},
19620+
"error": {
19621+
"type": "string"
19622+
}
19623+
},
19624+
"required": [
19625+
"success",
19626+
"error"
19627+
],
19628+
"description": "Unauthorized - Authentication required"
19629+
}
19630+
}
19631+
}
19632+
},
19633+
"403": {
19634+
"description": "Forbidden - Insufficient permissions",
19635+
"content": {
19636+
"application/json": {
19637+
"schema": {
19638+
"type": "object",
19639+
"properties": {
19640+
"success": {
19641+
"type": "boolean",
19642+
"default": false
19643+
},
19644+
"error": {
19645+
"type": "string"
19646+
}
19647+
},
19648+
"required": [
19649+
"success",
19650+
"error"
19651+
],
19652+
"description": "Forbidden - Insufficient permissions"
19653+
}
19654+
}
19655+
}
19656+
}
19657+
}
19658+
}
19659+
},
1958319660
"/api/auth/email/register": {
1958419661
"post": {
1958519662
"summary": "User registration via email",

services/backend/api-spec.yaml

Lines changed: 80 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2561,40 +2561,18 @@ paths:
25612561
preferences:
25622562
type: object
25632563
properties:
2564-
show_survey_overall:
2565-
type: boolean
2566-
description: Show overall survey
2567-
show_survey_company:
2568-
type: boolean
2569-
description: Show company survey
25702564
walkthrough_completed:
25712565
type: boolean
2572-
description: Whether walkthrough was completed
25732566
walkthrough_cancelled:
25742567
type: boolean
2575-
description: Whether walkthrough was cancelled
2576-
theme:
2577-
type: string
2578-
enum:
2579-
- light
2580-
- dark
2581-
- auto
2582-
description: UI theme preference
2583-
sidebar_collapsed:
2584-
type: boolean
2585-
description: Sidebar collapsed state
25862568
email_notifications_enabled:
25872569
type: boolean
2588-
description: Email notifications enabled
25892570
browser_notifications_enabled:
25902571
type: boolean
2591-
description: Browser notifications enabled
25922572
notification_acknowledgments:
25932573
type: string
2594-
description: Comma-separated list of acknowledged notification IDs
25952574
beta_features_enabled:
25962575
type: boolean
2597-
description: Beta features enabled
25982576
additionalProperties: false
25992577
required:
26002578
- success
@@ -2644,22 +2622,10 @@ paths:
26442622
schema:
26452623
type: object
26462624
properties:
2647-
show_survey_overall:
2648-
type: boolean
2649-
show_survey_company:
2650-
type: boolean
26512625
walkthrough_completed:
26522626
type: boolean
26532627
walkthrough_cancelled:
26542628
type: boolean
2655-
theme:
2656-
type: string
2657-
enum:
2658-
- light
2659-
- dark
2660-
- auto
2661-
sidebar_collapsed:
2662-
type: boolean
26632629
email_notifications_enabled:
26642630
type: boolean
26652631
browser_notifications_enabled:
@@ -13467,6 +13433,86 @@ paths:
1346713433
- success
1346813434
- error
1346913435
description: Internal Server Error - SMTP configuration or email sending failed
13436+
/api/config/{client}:
13437+
get:
13438+
summary: Get client-specific gateway configuration
13439+
tags:
13440+
- Gateway Configuration
13441+
description: Returns the appropriate configuration format for connecting the
13442+
specified MCP client to the local DeployStack Gateway.
13443+
parameters:
13444+
- schema:
13445+
type: string
13446+
enum:
13447+
- claude-desktop
13448+
- cline
13449+
- vscode
13450+
- cursor
13451+
- windsurf
13452+
in: path
13453+
name: client
13454+
required: true
13455+
description: The MCP client type
13456+
security:
13457+
- cookieAuth: []
13458+
- bearerAuth: []
13459+
responses:
13460+
"200":
13461+
description: Client-specific gateway configuration
13462+
content:
13463+
application/json:
13464+
schema:
13465+
type: object
13466+
description: Client-specific gateway configuration
13467+
additionalProperties: true
13468+
"400":
13469+
description: Bad Request - Invalid client type
13470+
content:
13471+
application/json:
13472+
schema:
13473+
type: object
13474+
properties:
13475+
success:
13476+
type: boolean
13477+
default: false
13478+
error:
13479+
type: string
13480+
required:
13481+
- success
13482+
- error
13483+
description: Bad Request - Invalid client type
13484+
"401":
13485+
description: Unauthorized - Authentication required
13486+
content:
13487+
application/json:
13488+
schema:
13489+
type: object
13490+
properties:
13491+
success:
13492+
type: boolean
13493+
default: false
13494+
error:
13495+
type: string
13496+
required:
13497+
- success
13498+
- error
13499+
description: Unauthorized - Authentication required
13500+
"403":
13501+
description: Forbidden - Insufficient permissions
13502+
content:
13503+
application/json:
13504+
schema:
13505+
type: object
13506+
properties:
13507+
success:
13508+
type: boolean
13509+
default: false
13510+
error:
13511+
type: string
13512+
required:
13513+
- success
13514+
- error
13515+
description: Forbidden - Insufficient permissions
1347013516
/api/auth/email/register:
1347113517
post:
1347213518
summary: User registration via email

services/backend/src/permissions/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export const ROLE_DEFINITIONS = {
4444
'email.test',
4545
'preferences.view',
4646
'preferences.edit',
47+
'gateway.config:read',
4748
],
4849
global_user: [
4950
'profile.view',
@@ -57,6 +58,7 @@ export const ROLE_DEFINITIONS = {
5758
'mcp.categories.view',
5859
'preferences.view',
5960
'preferences.edit',
61+
'gateway.config:read',
6062
],
6163
team_admin: [
6264
'teams.view',

0 commit comments

Comments
 (0)