|
58 | 58 | } |
59 | 59 | } |
60 | 60 | }, |
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 | + } |
70 | 73 | } |
71 | 74 | } |
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 | + } |
76 | 106 | } |
77 | 107 | }, |
78 | 108 | "/workos/get_or_provision_workos_environment": { |
|
89 | 119 | }, |
90 | 120 | "required": true |
91 | 121 | }, |
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 | + } |
93 | 134 | } |
94 | 135 | }, |
95 | 136 | "/workos/has_associated_workos_team": { |
|
106 | 147 | }, |
107 | 148 | "required": true |
108 | 149 | }, |
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 | + } |
110 | 162 | } |
111 | 163 | }, |
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 | + } |
117 | 190 | } |
118 | 191 | } |
119 | 192 | }, |
120 | 193 | "components": { |
121 | 194 | "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 | + }, |
122 | 216 | "GetOrProvisionEnvironmentRequest": { |
123 | 217 | "type": "object", |
124 | 218 | "required": [ |
|
141 | 235 | } |
142 | 236 | } |
143 | 237 | }, |
| 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 | + }, |
144 | 274 | "MemberId": { |
145 | 275 | "type": "integer", |
146 | 276 | "format": "int64", |
|
201 | 331 | "ProjectSlug": { |
202 | 332 | "type": "string" |
203 | 333 | }, |
| 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 | + }, |
204 | 361 | "ProvisionWorkOSTeamRequest": { |
205 | 362 | "type": "object", |
206 | 363 | "required": [ |
|
218 | 375 | } |
219 | 376 | } |
220 | 377 | }, |
| 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 | + }, |
221 | 397 | "ReferralCode": { |
222 | 398 | "type": "string" |
223 | 399 | }, |
|
0 commit comments