@@ -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.
@@ -438,12 +520,24 @@ components:
438520 - email
439521 - isDefault
440522 - createdAt
523+ - providers
441524 properties :
442525 id :
443526 type : string
444527 format : uuid
445528 email :
446529 type : string
530+ name :
531+ type : string
532+ nullable : true
533+ profilePictureUrl :
534+ type : string
535+ format : uri
536+ nullable : true
537+ providers :
538+ type : array
539+ items :
540+ type : string
447541 isDefault :
448542 type : boolean
449543 addedBy :
@@ -617,6 +711,8 @@ paths:
617711 security :
618712 - Supabase1TokenAuth : []
619713 Supabase2TeamAuth : []
714+ - AuthProviderBearerAuth : []
715+ AuthProviderTeamAuth : []
620716 parameters :
621717 - $ref : " #/components/parameters/build_id_or_template"
622718 - $ref : " #/components/parameters/build_statuses"
@@ -645,6 +741,8 @@ paths:
645741 security :
646742 - Supabase1TokenAuth : []
647743 Supabase2TeamAuth : []
744+ - AuthProviderBearerAuth : []
745+ AuthProviderTeamAuth : []
648746 parameters :
649747 - $ref : " #/components/parameters/build_ids"
650748
@@ -671,6 +769,8 @@ paths:
671769 security :
672770 - Supabase1TokenAuth : []
673771 Supabase2TeamAuth : []
772+ - AuthProviderBearerAuth : []
773+ AuthProviderTeamAuth : []
674774 parameters :
675775 - $ref : " #/components/parameters/build_id"
676776 responses :
@@ -696,6 +796,8 @@ paths:
696796 security :
697797 - Supabase1TokenAuth : []
698798 Supabase2TeamAuth : []
799+ - AuthProviderBearerAuth : []
800+ AuthProviderTeamAuth : []
699801 parameters :
700802 - $ref : " #/components/parameters/sandboxID"
701803 responses :
@@ -721,6 +823,7 @@ paths:
721823 tags : [teams]
722824 security :
723825 - Supabase1TokenAuth : []
826+ - AuthProviderBearerAuth : []
724827 responses :
725828 " 200 " :
726829 description : Successfully returned user teams.
@@ -737,6 +840,7 @@ paths:
737840 tags : [teams]
738841 security :
739842 - Supabase1TokenAuth : []
843+ - AuthProviderBearerAuth : []
740844 requestBody :
741845 required : true
742846 content :
@@ -777,13 +881,117 @@ paths:
777881 " 500 " :
778882 $ref : " #/components/responses/500"
779883
884+ /admin/teams/bootstrap :
885+ post :
886+ summary : Bootstrap team
887+ description : Creates and provisions a team for an admin-authenticated bootstrap workflow.
888+ tags : [admin]
889+ security :
890+ - AdminTokenAuth : []
891+ requestBody :
892+ required : true
893+ content :
894+ application/json :
895+ schema :
896+ $ref : " #/components/schemas/AdminTeamBootstrapRequest"
897+ responses :
898+ " 200 " :
899+ description : Successfully bootstrapped team.
900+ content :
901+ application/json :
902+ schema :
903+ $ref : " #/components/schemas/TeamResolveResponse"
904+ " 400 " :
905+ $ref : " #/components/responses/400"
906+ " 401 " :
907+ $ref : " #/components/responses/401"
908+ " 502 " :
909+ $ref : " #/components/responses/502"
910+ " 500 " :
911+ $ref : " #/components/responses/500"
912+
913+ /admin/user-profiles/resolve :
914+ post :
915+ summary : Resolve user profiles
916+ tags : [admin]
917+ security :
918+ - AdminTokenAuth : []
919+ requestBody :
920+ required : true
921+ content :
922+ application/json :
923+ schema :
924+ $ref : " #/components/schemas/AdminAuthProviderProfilesResolveRequest"
925+ responses :
926+ " 200 " :
927+ description : Successfully resolved profiles.
928+ content :
929+ application/json :
930+ schema :
931+ $ref : " #/components/schemas/AdminAuthProviderProfilesResponse"
932+ " 400 " :
933+ $ref : " #/components/responses/400"
934+ " 401 " :
935+ $ref : " #/components/responses/401"
936+ " 500 " :
937+ $ref : " #/components/responses/500"
938+
939+ /admin/user-profiles/by-email :
940+ post :
941+ summary : Lookup user profiles by email
942+ tags : [admin]
943+ security :
944+ - AdminTokenAuth : []
945+ requestBody :
946+ required : true
947+ content :
948+ application/json :
949+ schema :
950+ $ref : " #/components/schemas/AdminAuthProviderProfilesLookupEmailRequest"
951+ responses :
952+ " 200 " :
953+ description : Successfully found matching profiles.
954+ content :
955+ application/json :
956+ schema :
957+ $ref : " #/components/schemas/AdminAuthProviderProfilesResponse"
958+ " 400 " :
959+ $ref : " #/components/responses/400"
960+ " 401 " :
961+ $ref : " #/components/responses/401"
962+ " 500 " :
963+ $ref : " #/components/responses/500"
964+
965+ /admin/user-profiles/{userId} :
966+ get :
967+ summary : Get user profile
968+ tags : [admin]
969+ security :
970+ - AdminTokenAuth : []
971+ parameters :
972+ - $ref : " #/components/parameters/userId"
973+ responses :
974+ " 200 " :
975+ description : Successfully found profile.
976+ content :
977+ application/json :
978+ schema :
979+ $ref : " #/components/schemas/AdminAuthProviderProfilesResponse"
980+ " 400 " :
981+ $ref : " #/components/responses/400"
982+ " 401 " :
983+ $ref : " #/components/responses/401"
984+ " 500 " :
985+ $ref : " #/components/responses/500"
986+
780987 /teams/resolve :
781988 get :
782989 summary : Resolve team identity
783990 description : Resolves a team slug to the team's identity, validating the user is a member.
784991 tags : [teams]
785992 security :
786993 - Supabase1TokenAuth : []
994+ - AuthProviderBearerAuth : []
787995 parameters :
788996 - $ref : " #/components/parameters/teamSlug"
789997 responses :
@@ -809,6 +1017,8 @@ paths:
8091017 security :
8101018 - Supabase1TokenAuth : []
8111019 Supabase2TeamAuth : []
1020+ - AuthProviderBearerAuth : []
1021+ AuthProviderTeamAuth : []
8121022 parameters :
8131023 - $ref : " #/components/parameters/teamID"
8141024 requestBody :
@@ -840,6 +1050,8 @@ paths:
8401050 security :
8411051 - Supabase1TokenAuth : []
8421052 Supabase2TeamAuth : []
1053+ - AuthProviderBearerAuth : []
1054+ AuthProviderTeamAuth : []
8431055 parameters :
8441056 - $ref : " #/components/parameters/teamID"
8451057 responses :
@@ -861,6 +1073,8 @@ paths:
8611073 security :
8621074 - Supabase1TokenAuth : []
8631075 Supabase2TeamAuth : []
1076+ - AuthProviderBearerAuth : []
1077+ AuthProviderTeamAuth : []
8641078 parameters :
8651079 - $ref : " #/components/parameters/teamID"
8661080 requestBody :
@@ -890,6 +1104,8 @@ paths:
8901104 security :
8911105 - Supabase1TokenAuth : []
8921106 Supabase2TeamAuth : []
1107+ - AuthProviderBearerAuth : []
1108+ AuthProviderTeamAuth : []
8931109 parameters :
8941110 - $ref : " #/components/parameters/teamID"
8951111 - $ref : " #/components/parameters/userId"
@@ -912,6 +1128,7 @@ paths:
9121128 tags : [templates]
9131129 security :
9141130 - Supabase1TokenAuth : []
1131+ - AuthProviderBearerAuth : []
9151132 responses :
9161133 " 200 " :
9171134 description : Successfully returned default templates.
0 commit comments