Skip to content

Commit 8fe7932

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

4 files changed

Lines changed: 4897 additions & 4190 deletions

File tree

spec/openapi.dashboard-api.yaml

Lines changed: 205 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,69 @@ 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+
AdminTeamBootstrapRequest:
227+
type: object
228+
required:
229+
- name
230+
- email
231+
properties:
232+
name:
233+
type: string
234+
minLength: 1
235+
description: Team name.
236+
email:
237+
type: string
238+
format: email
239+
description: Billing/contact email for the team.
240+
159241
BuildStatus:
160242
type: string
161243
description: Build status mapped for dashboard clients.
@@ -617,6 +699,8 @@ paths:
617699
security:
618700
- Supabase1TokenAuth: []
619701
Supabase2TeamAuth: []
702+
- AuthProviderBearerAuth: []
703+
AuthProviderTeamAuth: []
620704
parameters:
621705
- $ref: "#/components/parameters/build_id_or_template"
622706
- $ref: "#/components/parameters/build_statuses"
@@ -645,6 +729,8 @@ paths:
645729
security:
646730
- Supabase1TokenAuth: []
647731
Supabase2TeamAuth: []
732+
- AuthProviderBearerAuth: []
733+
AuthProviderTeamAuth: []
648734
parameters:
649735
- $ref: "#/components/parameters/build_ids"
650736

@@ -671,6 +757,8 @@ paths:
671757
security:
672758
- Supabase1TokenAuth: []
673759
Supabase2TeamAuth: []
760+
- AuthProviderBearerAuth: []
761+
AuthProviderTeamAuth: []
674762
parameters:
675763
- $ref: "#/components/parameters/build_id"
676764
responses:
@@ -696,6 +784,8 @@ paths:
696784
security:
697785
- Supabase1TokenAuth: []
698786
Supabase2TeamAuth: []
787+
- AuthProviderBearerAuth: []
788+
AuthProviderTeamAuth: []
699789
parameters:
700790
- $ref: "#/components/parameters/sandboxID"
701791
responses:
@@ -721,6 +811,7 @@ paths:
721811
tags: [teams]
722812
security:
723813
- Supabase1TokenAuth: []
814+
- AuthProviderBearerAuth: []
724815
responses:
725816
"200":
726817
description: Successfully returned user teams.
@@ -737,6 +828,7 @@ paths:
737828
tags: [teams]
738829
security:
739830
- Supabase1TokenAuth: []
831+
- AuthProviderBearerAuth: []
740832
requestBody:
741833
required: true
742834
content:
@@ -777,13 +869,117 @@ paths:
777869
"500":
778870
$ref: "#/components/responses/500"
779871

872+
/admin/teams/bootstrap:
873+
post:
874+
summary: Bootstrap team
875+
description: Creates and provisions a team for an admin-authenticated bootstrap workflow.
876+
tags: [admin]
877+
security:
878+
- AdminTokenAuth: []
879+
requestBody:
880+
required: true
881+
content:
882+
application/json:
883+
schema:
884+
$ref: "#/components/schemas/AdminTeamBootstrapRequest"
885+
responses:
886+
"200":
887+
description: Successfully bootstrapped team.
888+
content:
889+
application/json:
890+
schema:
891+
$ref: "#/components/schemas/TeamResolveResponse"
892+
"400":
893+
$ref: "#/components/responses/400"
894+
"401":
895+
$ref: "#/components/responses/401"
896+
"502":
897+
$ref: "#/components/responses/502"
898+
"500":
899+
$ref: "#/components/responses/500"
900+
901+
/admin/user-profiles/resolve:
902+
post:
903+
summary: Resolve user profiles
904+
tags: [admin]
905+
security:
906+
- AdminTokenAuth: []
907+
requestBody:
908+
required: true
909+
content:
910+
application/json:
911+
schema:
912+
$ref: "#/components/schemas/AdminAuthProviderProfilesResolveRequest"
913+
responses:
914+
"200":
915+
description: Successfully resolved profiles.
916+
content:
917+
application/json:
918+
schema:
919+
$ref: "#/components/schemas/AdminAuthProviderProfilesResponse"
920+
"400":
921+
$ref: "#/components/responses/400"
922+
"401":
923+
$ref: "#/components/responses/401"
924+
"500":
925+
$ref: "#/components/responses/500"
926+
927+
/admin/user-profiles/by-email:
928+
post:
929+
summary: Lookup user profiles by email
930+
tags: [admin]
931+
security:
932+
- AdminTokenAuth: []
933+
requestBody:
934+
required: true
935+
content:
936+
application/json:
937+
schema:
938+
$ref: "#/components/schemas/AdminAuthProviderProfilesLookupEmailRequest"
939+
responses:
940+
"200":
941+
description: Successfully found matching profiles.
942+
content:
943+
application/json:
944+
schema:
945+
$ref: "#/components/schemas/AdminAuthProviderProfilesResponse"
946+
"400":
947+
$ref: "#/components/responses/400"
948+
"401":
949+
$ref: "#/components/responses/401"
950+
"500":
951+
$ref: "#/components/responses/500"
952+
953+
/admin/user-profiles/{userId}:
954+
get:
955+
summary: Get user profile
956+
tags: [admin]
957+
security:
958+
- AdminTokenAuth: []
959+
parameters:
960+
- $ref: "#/components/parameters/userId"
961+
responses:
962+
"200":
963+
description: Successfully found profile.
964+
content:
965+
application/json:
966+
schema:
967+
$ref: "#/components/schemas/AdminAuthProviderProfilesResponse"
968+
"400":
969+
$ref: "#/components/responses/400"
970+
"401":
971+
$ref: "#/components/responses/401"
972+
"500":
973+
$ref: "#/components/responses/500"
974+
780975
/teams/resolve:
781976
get:
782977
summary: Resolve team identity
783978
description: Resolves a team slug to the team's identity, validating the user is a member.
784979
tags: [teams]
785980
security:
786981
- Supabase1TokenAuth: []
982+
- AuthProviderBearerAuth: []
787983
parameters:
788984
- $ref: "#/components/parameters/teamSlug"
789985
responses:
@@ -809,6 +1005,8 @@ paths:
8091005
security:
8101006
- Supabase1TokenAuth: []
8111007
Supabase2TeamAuth: []
1008+
- AuthProviderBearerAuth: []
1009+
AuthProviderTeamAuth: []
8121010
parameters:
8131011
- $ref: "#/components/parameters/teamID"
8141012
requestBody:
@@ -840,6 +1038,8 @@ paths:
8401038
security:
8411039
- Supabase1TokenAuth: []
8421040
Supabase2TeamAuth: []
1041+
- AuthProviderBearerAuth: []
1042+
AuthProviderTeamAuth: []
8431043
parameters:
8441044
- $ref: "#/components/parameters/teamID"
8451045
responses:
@@ -861,6 +1061,8 @@ paths:
8611061
security:
8621062
- Supabase1TokenAuth: []
8631063
Supabase2TeamAuth: []
1064+
- AuthProviderBearerAuth: []
1065+
AuthProviderTeamAuth: []
8641066
parameters:
8651067
- $ref: "#/components/parameters/teamID"
8661068
requestBody:
@@ -890,6 +1092,8 @@ paths:
8901092
security:
8911093
- Supabase1TokenAuth: []
8921094
Supabase2TeamAuth: []
1095+
- AuthProviderBearerAuth: []
1096+
AuthProviderTeamAuth: []
8931097
parameters:
8941098
- $ref: "#/components/parameters/teamID"
8951099
- $ref: "#/components/parameters/userId"
@@ -912,6 +1116,7 @@ paths:
9121116
tags: [templates]
9131117
security:
9141118
- Supabase1TokenAuth: []
1119+
- AuthProviderBearerAuth: []
9151120
responses:
9161121
"200":
9171122
description: Successfully returned default templates.

0 commit comments

Comments
 (0)