Skip to content

Commit 85e8463

Browse files
dobracgithub-actions[bot]
authored andcommitted
chore: sync infra OpenAPI specs
1 parent f623214 commit 85e8463

4 files changed

Lines changed: 5009 additions & 4190 deletions

File tree

spec/openapi.dashboard-api.yaml

Lines changed: 263 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ components:
1010
type: apiKey
1111
in: header
1212
name: X-Admin-Token
13+
# Generated code uses security schemas in the alphabetical order.
14+
# In order to check first the token, and then the team (so we can already use the user),
15+
# there is a 1 and 2 present in the names of the security schemas.
1316
Supabase1TokenAuth:
1417
type: apiKey
1518
in: header
@@ -18,6 +21,16 @@ components:
1821
type: apiKey
1922
in: header
2023
name: X-Supabase-Team
24+
# AuthProviderBearerAuth / AuthProviderTeamAuth: B before T in the name
25+
# so Bearer is validated before Team (same reason as Supabase1/2 above).
26+
AuthProviderBearerAuth:
27+
type: http
28+
scheme: bearer
29+
bearerFormat: access_token
30+
AuthProviderTeamAuth:
31+
type: apiKey
32+
in: header
33+
name: X-Team-ID
2134

2235
parameters:
2336
build_id:
@@ -140,6 +153,12 @@ components:
140153
application/json:
141154
schema:
142155
$ref: "#/components/schemas/Error"
156+
"502":
157+
description: Upstream error
158+
content:
159+
application/json:
160+
schema:
161+
$ref: "#/components/schemas/Error"
143162

144163
schemas:
145164
Error:
@@ -156,6 +175,89 @@ components:
156175
type: string
157176
description: Error message.
158177

178+
AdminAuthProviderProfile:
179+
type: object
180+
required:
181+
- userId
182+
- email
183+
properties:
184+
userId:
185+
type: string
186+
format: uuid
187+
description: Internal E2B user identifier.
188+
email:
189+
type: string
190+
nullable: true
191+
description: Email address from the configured auth provider.
192+
193+
AdminAuthProviderProfilesResponse:
194+
type: object
195+
required:
196+
- profiles
197+
properties:
198+
profiles:
199+
type: array
200+
items:
201+
$ref: "#/components/schemas/AdminAuthProviderProfile"
202+
203+
AdminAuthProviderProfilesResolveRequest:
204+
type: object
205+
required:
206+
- userIds
207+
properties:
208+
userIds:
209+
type: array
210+
minItems: 1
211+
maxItems: 100
212+
uniqueItems: true
213+
items:
214+
type: string
215+
format: uuid
216+
217+
AdminAuthProviderProfilesLookupEmailRequest:
218+
type: object
219+
required:
220+
- email
221+
properties:
222+
email:
223+
type: string
224+
format: email
225+
226+
AdminAuthProviderUserBootstrapRequest:
227+
type: object
228+
required:
229+
- oidc_issuer
230+
- oidc_user_id
231+
- oidc_user_email
232+
properties:
233+
oidc_issuer:
234+
type: string
235+
minLength: 1
236+
oidc_user_id:
237+
type: string
238+
minLength: 1
239+
oidc_user_email:
240+
type: string
241+
format: email
242+
oidc_user_name:
243+
type: string
244+
nullable: true
245+
246+
AdminTeamBootstrapRequest:
247+
type: object
248+
required:
249+
- name
250+
- email
251+
properties:
252+
name:
253+
type: string
254+
minLength: 1
255+
description: Team name.
256+
email:
257+
type: string
258+
format: email
259+
description: Billing/contact email for the team.
260+
159261
BuildStatus:
160262
type: string
161263
description: Build status mapped for dashboard clients.
@@ -438,12 +540,24 @@ components:
438540
- email
439541
- isDefault
440542
- createdAt
543+
- providers
441544
properties:
442545
id:
443546
type: string
444547
format: uuid
445548
email:
446549
type: string
550+
name:
551+
type: string
552+
nullable: true
553+
profilePictureUrl:
554+
type: string
555+
format: uri
556+
nullable: true
557+
providers:
558+
type: array
559+
items:
560+
type: string
447561
isDefault:
448562
type: boolean
449563
addedBy:
@@ -617,6 +731,8 @@ paths:
617731
security:
618732
- Supabase1TokenAuth: []
619733
Supabase2TeamAuth: []
734+
- AuthProviderBearerAuth: []
735+
AuthProviderTeamAuth: []
620736
parameters:
621737
- $ref: "#/components/parameters/build_id_or_template"
622738
- $ref: "#/components/parameters/build_statuses"
@@ -645,6 +761,8 @@ paths:
645761
security:
646762
- Supabase1TokenAuth: []
647763
Supabase2TeamAuth: []
764+
- AuthProviderBearerAuth: []
765+
AuthProviderTeamAuth: []
648766
parameters:
649767
- $ref: "#/components/parameters/build_ids"
650768

@@ -671,6 +789,8 @@ paths:
671789
security:
672790
- Supabase1TokenAuth: []
673791
Supabase2TeamAuth: []
792+
- AuthProviderBearerAuth: []
793+
AuthProviderTeamAuth: []
674794
parameters:
675795
- $ref: "#/components/parameters/build_id"
676796
responses:
@@ -696,6 +816,8 @@ paths:
696816
security:
697817
- Supabase1TokenAuth: []
698818
Supabase2TeamAuth: []
819+
- AuthProviderBearerAuth: []
820+
AuthProviderTeamAuth: []
699821
parameters:
700822
- $ref: "#/components/parameters/sandboxID"
701823
responses:
@@ -721,6 +843,7 @@ paths:
721843
tags: [teams]
722844
security:
723845
- Supabase1TokenAuth: []
846+
- AuthProviderBearerAuth: []
724847
responses:
725848
"200":
726849
description: Successfully returned user teams.
@@ -737,6 +860,7 @@ paths:
737860
tags: [teams]
738861
security:
739862
- Supabase1TokenAuth: []
863+
- AuthProviderBearerAuth: []
740864
requestBody:
741865
required: true
742866
content:
@@ -777,13 +901,143 @@ paths:
777901
"500":
778902
$ref: "#/components/responses/500"
779903

904+
/admin/users/bootstrap:
905+
post:
906+
summary: Bootstrap auth provider user
907+
tags: [teams]
908+
security:
909+
- AdminTokenAuth: []
910+
requestBody:
911+
required: true
912+
content:
913+
application/json:
914+
schema:
915+
$ref: "#/components/schemas/AdminAuthProviderUserBootstrapRequest"
916+
responses:
917+
"200":
918+
description: Successfully bootstrapped user.
919+
content:
920+
application/json:
921+
schema:
922+
$ref: "#/components/schemas/TeamResolveResponse"
923+
"400":
924+
$ref: "#/components/responses/400"
925+
"401":
926+
$ref: "#/components/responses/401"
927+
"500":
928+
$ref: "#/components/responses/500"
929+
930+
/admin/teams/bootstrap:
931+
post:
932+
summary: Bootstrap team
933+
description: Creates and provisions a team for an admin-authenticated bootstrap workflow.
934+
tags: [admin]
935+
security:
936+
- AdminTokenAuth: []
937+
requestBody:
938+
required: true
939+
content:
940+
application/json:
941+
schema:
942+
$ref: "#/components/schemas/AdminTeamBootstrapRequest"
943+
responses:
944+
"200":
945+
description: Successfully bootstrapped team.
946+
content:
947+
application/json:
948+
schema:
949+
$ref: "#/components/schemas/TeamResolveResponse"
950+
"400":
951+
$ref: "#/components/responses/400"
952+
"401":
953+
$ref: "#/components/responses/401"
954+
"502":
955+
$ref: "#/components/responses/502"
956+
"500":
957+
$ref: "#/components/responses/500"
958+
959+
/admin/user-profiles/resolve:
960+
post:
961+
summary: Resolve user profiles
962+
tags: [admin]
963+
security:
964+
- AdminTokenAuth: []
965+
requestBody:
966+
required: true
967+
content:
968+
application/json:
969+
schema:
970+
$ref: "#/components/schemas/AdminAuthProviderProfilesResolveRequest"
971+
responses:
972+
"200":
973+
description: Successfully resolved profiles.
974+
content:
975+
application/json:
976+
schema:
977+
$ref: "#/components/schemas/AdminAuthProviderProfilesResponse"
978+
"400":
979+
$ref: "#/components/responses/400"
980+
"401":
981+
$ref: "#/components/responses/401"
982+
"500":
983+
$ref: "#/components/responses/500"
984+
985+
/admin/user-profiles/by-email:
986+
post:
987+
summary: Lookup user profiles by email
988+
tags: [admin]
989+
security:
990+
- AdminTokenAuth: []
991+
requestBody:
992+
required: true
993+
content:
994+
application/json:
995+
schema:
996+
$ref: "#/components/schemas/AdminAuthProviderProfilesLookupEmailRequest"
997+
responses:
998+
"200":
999+
description: Successfully found matching profiles.
1000+
content:
1001+
application/json:
1002+
schema:
1003+
$ref: "#/components/schemas/AdminAuthProviderProfilesResponse"
1004+
"400":
1005+
$ref: "#/components/responses/400"
1006+
"401":
1007+
$ref: "#/components/responses/401"
1008+
"500":
1009+
$ref: "#/components/responses/500"
1010+
1011+
/admin/user-profiles/{userId}:
1012+
get:
1013+
summary: Get user profile
1014+
tags: [admin]
1015+
security:
1016+
- AdminTokenAuth: []
1017+
parameters:
1018+
- $ref: "#/components/parameters/userId"
1019+
responses:
1020+
"200":
1021+
description: Successfully found profile.
1022+
content:
1023+
application/json:
1024+
schema:
1025+
$ref: "#/components/schemas/AdminAuthProviderProfilesResponse"
1026+
"400":
1027+
$ref: "#/components/responses/400"
1028+
"401":
1029+
$ref: "#/components/responses/401"
1030+
"500":
1031+
$ref: "#/components/responses/500"
1032+
7801033
/teams/resolve:
7811034
get:
7821035
summary: Resolve team identity
7831036
description: Resolves a team slug to the team's identity, validating the user is a member.
7841037
tags: [teams]
7851038
security:
7861039
- Supabase1TokenAuth: []
1040+
- AuthProviderBearerAuth: []
7871041
parameters:
7881042
- $ref: "#/components/parameters/teamSlug"
7891043
responses:
@@ -809,6 +1063,8 @@ paths:
8091063
security:
8101064
- Supabase1TokenAuth: []
8111065
Supabase2TeamAuth: []
1066+
- AuthProviderBearerAuth: []
1067+
AuthProviderTeamAuth: []
8121068
parameters:
8131069
- $ref: "#/components/parameters/teamID"
8141070
requestBody:
@@ -840,6 +1096,8 @@ paths:
8401096
security:
8411097
- Supabase1TokenAuth: []
8421098
Supabase2TeamAuth: []
1099+
- AuthProviderBearerAuth: []
1100+
AuthProviderTeamAuth: []
8431101
parameters:
8441102
- $ref: "#/components/parameters/teamID"
8451103
responses:
@@ -861,6 +1119,8 @@ paths:
8611119
security:
8621120
- Supabase1TokenAuth: []
8631121
Supabase2TeamAuth: []
1122+
- AuthProviderBearerAuth: []
1123+
AuthProviderTeamAuth: []
8641124
parameters:
8651125
- $ref: "#/components/parameters/teamID"
8661126
requestBody:
@@ -890,6 +1150,8 @@ paths:
8901150
security:
8911151
- Supabase1TokenAuth: []
8921152
Supabase2TeamAuth: []
1153+
- AuthProviderBearerAuth: []
1154+
AuthProviderTeamAuth: []
8931155
parameters:
8941156
- $ref: "#/components/parameters/teamID"
8951157
- $ref: "#/components/parameters/userId"
@@ -912,6 +1174,7 @@ paths:
9121174
tags: [templates]
9131175
security:
9141176
- Supabase1TokenAuth: []
1177+
- AuthProviderBearerAuth: []
9151178
responses:
9161179
"200":
9171180
description: Successfully returned default templates.

0 commit comments

Comments
 (0)