@@ -138,11 +138,42 @@ func (r *AccountService) GetSSOLoginURL(ctx context.Context, body AccountGetSSOL
138138// ```yaml
139139// {}
140140// ```
141- func (r * AccountService ) ListJoinableOrganizations (ctx context.Context , params AccountListJoinableOrganizationsParams , opts ... option.RequestOption ) (res * AccountListJoinableOrganizationsResponse , err error ) {
141+ func (r * AccountService ) ListJoinableOrganizations (ctx context.Context , params AccountListJoinableOrganizationsParams , opts ... option.RequestOption ) (res * pagination.JoinableOrganizationsPage [JoinableOrganization ], err error ) {
142+ var raw * http.Response
142143 opts = slices .Concat (r .Options , opts )
144+ opts = append ([]option.RequestOption {option .WithResponseInto (& raw )}, opts ... )
143145 path := "gitpod.v1.AccountService/ListJoinableOrganizations"
144- err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , params , & res , opts ... )
145- return
146+ cfg , err := requestconfig .NewRequestConfig (ctx , http .MethodPost , path , params , & res , opts ... )
147+ if err != nil {
148+ return nil , err
149+ }
150+ err = cfg .Execute ()
151+ if err != nil {
152+ return nil , err
153+ }
154+ res .SetPageConfig (cfg , raw )
155+ return res , nil
156+ }
157+
158+ // Lists organizations that the currently authenticated account can join.
159+ //
160+ // Use this method to:
161+ //
162+ // - Discover organizations associated with the account's email domain.
163+ // - Allow users to join existing organizations.
164+ // - Display potential organizations during onboarding.
165+ //
166+ // ### Examples
167+ //
168+ // - List joinable organizations:
169+ //
170+ // Retrieves a list of organizations the account can join.
171+ //
172+ // ```yaml
173+ // {}
174+ // ```
175+ func (r * AccountService ) ListJoinableOrganizationsAutoPaging (ctx context.Context , params AccountListJoinableOrganizationsParams , opts ... option.RequestOption ) * pagination.JoinableOrganizationsPageAutoPager [JoinableOrganization ] {
176+ return pagination .NewJoinableOrganizationsPageAutoPager (r .ListJoinableOrganizations (ctx , params , opts ... ))
146177}
147178
148179// Lists available login providers with optional filtering.
@@ -224,6 +255,29 @@ func (r *AccountService) ListLoginProvidersAutoPaging(ctx context.Context, param
224255 return pagination .NewLoginProvidersPageAutoPager (r .ListLoginProviders (ctx , params , opts ... ))
225256}
226257
258+ // ListSSOLogins
259+ func (r * AccountService ) ListSSOLogins (ctx context.Context , params AccountListSSOLoginsParams , opts ... option.RequestOption ) (res * pagination.LoginsPage [AccountListSSOLoginsResponse ], err error ) {
260+ var raw * http.Response
261+ opts = slices .Concat (r .Options , opts )
262+ opts = append ([]option.RequestOption {option .WithResponseInto (& raw )}, opts ... )
263+ path := "gitpod.v1.AccountService/ListSSOLogins"
264+ cfg , err := requestconfig .NewRequestConfig (ctx , http .MethodPost , path , params , & res , opts ... )
265+ if err != nil {
266+ return nil , err
267+ }
268+ err = cfg .Execute ()
269+ if err != nil {
270+ return nil , err
271+ }
272+ res .SetPageConfig (cfg , raw )
273+ return res , nil
274+ }
275+
276+ // ListSSOLogins
277+ func (r * AccountService ) ListSSOLoginsAutoPaging (ctx context.Context , params AccountListSSOLoginsParams , opts ... option.RequestOption ) * pagination.LoginsPageAutoPager [AccountListSSOLoginsResponse ] {
278+ return pagination .NewLoginsPageAutoPager (r .ListSSOLogins (ctx , params , opts ... ))
279+ }
280+
227281type Account struct {
228282 ID string `json:"id,required" format:"uuid"`
229283 // A Timestamp represents a point in time independent of any time zone or local
@@ -580,24 +634,29 @@ func (r accountGetSSOLoginURLResponseJSON) RawJSON() string {
580634 return r .raw
581635}
582636
583- type AccountListJoinableOrganizationsResponse struct {
584- JoinableOrganizations []JoinableOrganization `json:"joinableOrganizations"`
585- JSON accountListJoinableOrganizationsResponseJSON `json:"-"`
637+ type AccountListSSOLoginsResponse struct {
638+ // provider is the provider used by this login method, e.g. "github", "google",
639+ // "custom"
640+ DisplayName string `json:"displayName,required"`
641+ // login_url is the URL to redirect the user to for SSO login
642+ LoginURL string `json:"loginUrl,required"`
643+ JSON accountListSSOLoginsResponseJSON `json:"-"`
586644}
587645
588- // accountListJoinableOrganizationsResponseJSON contains the JSON metadata for the
589- // struct [AccountListJoinableOrganizationsResponse]
590- type accountListJoinableOrganizationsResponseJSON struct {
591- JoinableOrganizations apijson.Field
592- raw string
593- ExtraFields map [string ]apijson.Field
646+ // accountListSSOLoginsResponseJSON contains the JSON metadata for the struct
647+ // [AccountListSSOLoginsResponse]
648+ type accountListSSOLoginsResponseJSON struct {
649+ DisplayName apijson.Field
650+ LoginURL apijson.Field
651+ raw string
652+ ExtraFields map [string ]apijson.Field
594653}
595654
596- func (r * AccountListJoinableOrganizationsResponse ) UnmarshalJSON (data []byte ) (err error ) {
655+ func (r * AccountListSSOLoginsResponse ) UnmarshalJSON (data []byte ) (err error ) {
597656 return apijson .UnmarshalRoot (data , r )
598657}
599658
600- func (r accountListJoinableOrganizationsResponseJSON ) RawJSON () string {
659+ func (r accountListSSOLoginsResponseJSON ) RawJSON () string {
601660 return r .raw
602661}
603662
@@ -611,6 +670,8 @@ func (r AccountGetParams) MarshalJSON() (data []byte, err error) {
611670
612671type AccountDeleteParams struct {
613672 AccountID param.Field [string ] `json:"accountId,required" format:"uuid"`
673+ // reason is an optional field for the reason for account deletion
674+ Reason param.Field [string ] `json:"reason"`
614675}
615676
616677func (r AccountDeleteParams ) MarshalJSON () (data []byte , err error ) {
@@ -631,7 +692,8 @@ func (r AccountGetSSOLoginURLParams) MarshalJSON() (data []byte, err error) {
631692type AccountListJoinableOrganizationsParams struct {
632693 Token param.Field [string ] `query:"token"`
633694 PageSize param.Field [int64 ] `query:"pageSize"`
634- Empty param.Field [bool ] `json:"empty"`
695+ // pagination contains the pagination options for listing joinable organizations
696+ Pagination param.Field [AccountListJoinableOrganizationsParamsPagination ] `json:"pagination"`
635697}
636698
637699func (r AccountListJoinableOrganizationsParams ) MarshalJSON () (data []byte , err error ) {
@@ -647,6 +709,20 @@ func (r AccountListJoinableOrganizationsParams) URLQuery() (v url.Values) {
647709 })
648710}
649711
712+ // pagination contains the pagination options for listing joinable organizations
713+ type AccountListJoinableOrganizationsParamsPagination struct {
714+ // Token for the next set of results that was returned as next_token of a
715+ // PaginationResponse
716+ Token param.Field [string ] `json:"token"`
717+ // Page size is the maximum number of results to retrieve per page. Defaults to 25.
718+ // Maximum 100.
719+ PageSize param.Field [int64 ] `json:"pageSize"`
720+ }
721+
722+ func (r AccountListJoinableOrganizationsParamsPagination ) MarshalJSON () (data []byte , err error ) {
723+ return apijson .MarshalRoot (r )
724+ }
725+
650726type AccountListLoginProvidersParams struct {
651727 Token param.Field [string ] `query:"token"`
652728 PageSize param.Field [int64 ] `query:"pageSize"`
@@ -671,6 +747,8 @@ func (r AccountListLoginProvidersParams) URLQuery() (v url.Values) {
671747
672748// filter contains the filter options for listing login methods
673749type AccountListLoginProvidersParamsFilter struct {
750+ // email is the email address to filter SSO providers by
751+ Email param.Field [string ] `json:"email"`
674752 // invite_id is the ID of the invite URL the user wants to login with
675753 InviteID param.Field [string ] `json:"inviteId" format:"uuid"`
676754}
@@ -692,3 +770,41 @@ type AccountListLoginProvidersParamsPagination struct {
692770func (r AccountListLoginProvidersParamsPagination ) MarshalJSON () (data []byte , err error ) {
693771 return apijson .MarshalRoot (r )
694772}
773+
774+ type AccountListSSOLoginsParams struct {
775+ // email is the email the user wants to login with
776+ Email param.Field [string ] `json:"email,required" format:"email"`
777+ Token param.Field [string ] `query:"token"`
778+ PageSize param.Field [int64 ] `query:"pageSize"`
779+ // pagination contains the pagination options for listing SSO logins
780+ Pagination param.Field [AccountListSSOLoginsParamsPagination ] `json:"pagination"`
781+ // return_to is the URL the user will be redirected to after login
782+ ReturnTo param.Field [string ] `json:"returnTo" format:"uri"`
783+ }
784+
785+ func (r AccountListSSOLoginsParams ) MarshalJSON () (data []byte , err error ) {
786+ return apijson .MarshalRoot (r )
787+ }
788+
789+ // URLQuery serializes [AccountListSSOLoginsParams]'s query parameters as
790+ // `url.Values`.
791+ func (r AccountListSSOLoginsParams ) URLQuery () (v url.Values ) {
792+ return apiquery .MarshalWithSettings (r , apiquery.QuerySettings {
793+ ArrayFormat : apiquery .ArrayQueryFormatComma ,
794+ NestedFormat : apiquery .NestedQueryFormatBrackets ,
795+ })
796+ }
797+
798+ // pagination contains the pagination options for listing SSO logins
799+ type AccountListSSOLoginsParamsPagination struct {
800+ // Token for the next set of results that was returned as next_token of a
801+ // PaginationResponse
802+ Token param.Field [string ] `json:"token"`
803+ // Page size is the maximum number of results to retrieve per page. Defaults to 25.
804+ // Maximum 100.
805+ PageSize param.Field [int64 ] `json:"pageSize"`
806+ }
807+
808+ func (r AccountListSSOLoginsParamsPagination ) MarshalJSON () (data []byte , err error ) {
809+ return apijson .MarshalRoot (r )
810+ }
0 commit comments