Skip to content

Commit be4a6e0

Browse files
thomasballingerConvex, Inc.
authored andcommitted
Big brain endpoints for WorkOS integration in the dashboard (#41940)
Plumbing for showing WorkOS AuthKit provisioning integation information in the dashboard. GitOrigin-RevId: 6570fd6da4b9b6450df861e94341c2d5a2c3f78a
1 parent e7a7756 commit be4a6e0

File tree

2 files changed

+323
-38
lines changed

2 files changed

+323
-38
lines changed

management-openapi.json

Lines changed: 196 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,51 @@
5858
}
5959
}
6060
},
61-
"/workos/provision_associated_workos_team": {
62-
"post": {
63-
"description": "Provision a WorkOS team for a Convex team",
64-
"operationId": "provision_associated_workos_team",
65-
"requestBody": {
66-
"content": {
67-
"application/json": {
68-
"schema": {
69-
"$ref": "#/components/schemas/ProvisionWorkOSTeamRequest"
61+
"/workos/available_workos_team_emails": {
62+
"get": {
63+
"description": "Get candidate email addresses to be WorkOS admins.",
64+
"operationId": "get_available_workos_team_emails",
65+
"responses": {
66+
"200": {
67+
"description": "",
68+
"content": {
69+
"application/json": {
70+
"schema": {
71+
"$ref": "#/components/schemas/AvailableWorkOSTeamEmailsResponse"
72+
}
7073
}
7174
}
72-
},
73-
"required": true
74-
},
75-
"responses": {}
75+
}
76+
}
77+
}
78+
},
79+
"/deployments/{deployment_name}/has_associated_workos_team": {
80+
"get": {
81+
"description": "Check if a deployment has an associated WorkOS team",
82+
"operationId": "get_has_associated_workos_team",
83+
"parameters": [
84+
{
85+
"name": "deployment_name",
86+
"in": "path",
87+
"description": "Deployment name",
88+
"required": true,
89+
"schema": {
90+
"type": "string"
91+
}
92+
}
93+
],
94+
"responses": {
95+
"200": {
96+
"description": "",
97+
"content": {
98+
"application/json": {
99+
"schema": {
100+
"$ref": "#/components/schemas/HasAssociatedWorkOSTeamResponse"
101+
}
102+
}
103+
}
104+
}
105+
}
76106
}
77107
},
78108
"/workos/get_or_provision_workos_environment": {
@@ -89,7 +119,18 @@
89119
},
90120
"required": true
91121
},
92-
"responses": {}
122+
"responses": {
123+
"200": {
124+
"description": "",
125+
"content": {
126+
"application/json": {
127+
"schema": {
128+
"$ref": "#/components/schemas/ProvisionEnvironmentResponse"
129+
}
130+
}
131+
}
132+
}
133+
}
93134
}
94135
},
95136
"/workos/has_associated_workos_team": {
@@ -106,19 +147,72 @@
106147
},
107148
"required": true
108149
},
109-
"responses": {}
150+
"responses": {
151+
"200": {
152+
"description": "",
153+
"content": {
154+
"application/json": {
155+
"schema": {
156+
"$ref": "#/components/schemas/HasAssociatedWorkOSTeamResponse"
157+
}
158+
}
159+
}
160+
}
161+
}
110162
}
111163
},
112-
"/workos/available_workos_team_emails": {
113-
"get": {
114-
"description": "Get candidate email addresses to be WorkOS admins.",
115-
"operationId": "get_available_workos_team_emails",
116-
"responses": {}
164+
"/workos/provision_associated_workos_team": {
165+
"post": {
166+
"description": "Provision a WorkOS team for a Convex team",
167+
"operationId": "provision_associated_workos_team",
168+
"requestBody": {
169+
"content": {
170+
"application/json": {
171+
"schema": {
172+
"$ref": "#/components/schemas/ProvisionWorkOSTeamRequest"
173+
}
174+
}
175+
},
176+
"required": true
177+
},
178+
"responses": {
179+
"200": {
180+
"description": "",
181+
"content": {
182+
"application/json": {
183+
"schema": {
184+
"$ref": "#/components/schemas/ProvisionWorkOSTeamResponse"
185+
}
186+
}
187+
}
188+
}
189+
}
117190
}
118191
}
119192
},
120193
"components": {
121194
"schemas": {
195+
"AvailableWorkOSTeamEmailsResponse": {
196+
"type": "object",
197+
"required": [
198+
"availableEmails",
199+
"usedEmails"
200+
],
201+
"properties": {
202+
"availableEmails": {
203+
"type": "array",
204+
"items": {
205+
"type": "string"
206+
}
207+
},
208+
"usedEmails": {
209+
"type": "array",
210+
"items": {
211+
"type": "string"
212+
}
213+
}
214+
}
215+
},
122216
"GetOrProvisionEnvironmentRequest": {
123217
"type": "object",
124218
"required": [
@@ -141,6 +235,42 @@
141235
}
142236
}
143237
},
238+
"HasAssociatedWorkOSTeamResponse": {
239+
"type": "object",
240+
"required": [
241+
"hasAssociatedWorkosTeam",
242+
"teamId"
243+
],
244+
"properties": {
245+
"adminConvexEmail": {
246+
"type": [
247+
"string",
248+
"null"
249+
],
250+
"description": "Email of Convex team member who created the WorkOS account.\nThis field should always be present when has_associated_workos_team is\ntrue."
251+
},
252+
"adminEmail": {
253+
"type": [
254+
"string",
255+
"null"
256+
],
257+
"description": "Email address used to provision the WorkOS account. This field should\nalways be present if has_associated_workos_team is true."
258+
},
259+
"adminName": {
260+
"type": [
261+
"string",
262+
"null"
263+
],
264+
"description": "Name of Convex team member who created the WorkOS account.\nThis field is optional even when has_associated_workos_team is true."
265+
},
266+
"hasAssociatedWorkosTeam": {
267+
"type": "boolean"
268+
},
269+
"teamId": {
270+
"$ref": "#/components/schemas/TeamId"
271+
}
272+
}
273+
},
144274
"MemberId": {
145275
"type": "integer",
146276
"format": "int64",
@@ -201,6 +331,33 @@
201331
"ProjectSlug": {
202332
"type": "string"
203333
},
334+
"ProvisionEnvironmentResponse": {
335+
"type": "object",
336+
"required": [
337+
"environmentId",
338+
"environmentName",
339+
"clientId",
340+
"apiKey",
341+
"newlyProvisioned"
342+
],
343+
"properties": {
344+
"apiKey": {
345+
"type": "string"
346+
},
347+
"clientId": {
348+
"type": "string"
349+
},
350+
"environmentId": {
351+
"type": "string"
352+
},
353+
"environmentName": {
354+
"type": "string"
355+
},
356+
"newlyProvisioned": {
357+
"type": "boolean"
358+
}
359+
}
360+
},
204361
"ProvisionWorkOSTeamRequest": {
205362
"type": "object",
206363
"required": [
@@ -218,6 +375,25 @@
218375
}
219376
}
220377
},
378+
"ProvisionWorkOSTeamResponse": {
379+
"type": "object",
380+
"required": [
381+
"workosTeamId",
382+
"workosTeamName",
383+
"adminEmail"
384+
],
385+
"properties": {
386+
"adminEmail": {
387+
"type": "string"
388+
},
389+
"workosTeamId": {
390+
"type": "string"
391+
},
392+
"workosTeamName": {
393+
"type": "string"
394+
}
395+
}
396+
},
221397
"ReferralCode": {
222398
"type": "string"
223399
},

0 commit comments

Comments
 (0)