@@ -120,6 +120,30 @@ func (r *AccountService) GetSSOLoginURL(ctx context.Context, body AccountGetSSOL
120120 return
121121}
122122
123+ // Lists organizations that the currently authenticated account can join.
124+ //
125+ // Use this method to:
126+ //
127+ // - Discover organizations associated with the account's email domain.
128+ // - Allow users to join existing organizations.
129+ // - Display potential organizations during onboarding.
130+ //
131+ // ### Examples
132+ //
133+ // - List joinable organizations:
134+ //
135+ // Retrieves a list of organizations the account can join.
136+ //
137+ // ```yaml
138+ // {}
139+ // ```
140+ func (r * AccountService ) ListJoinableOrganizations (ctx context.Context , params AccountListJoinableOrganizationsParams , opts ... option.RequestOption ) (res * AccountListJoinableOrganizationsResponse , err error ) {
141+ opts = append (r .Options [:], opts ... )
142+ path := "gitpod.v1.AccountService/ListJoinableOrganizations"
143+ err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , params , & res , opts ... )
144+ return
145+ }
146+
123147// Lists available login providers with optional filtering.
124148//
125149// Use this method to:
@@ -380,8 +404,11 @@ type Account struct {
380404 // Joda Time's
381405 // [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
382406 // to obtain a formatter capable of generating timestamps in this format.
383- UpdatedAt time.Time `json:"updatedAt,required" format:"date-time"`
384- AvatarURL string `json:"avatarUrl"`
407+ UpdatedAt time.Time `json:"updatedAt,required" format:"date-time"`
408+ AvatarURL string `json:"avatarUrl"`
409+ // joinables is deprecated. Use ListJoinableOrganizations instead.
410+ //
411+ // Deprecated: deprecated
385412 Joinables []JoinableOrganization `json:"joinables"`
386413 Memberships []AccountMembership `json:"memberships"`
387414 // organization_id is the ID of the organization the account is owned by if it's
@@ -552,6 +579,27 @@ func (r accountGetSSOLoginURLResponseJSON) RawJSON() string {
552579 return r .raw
553580}
554581
582+ type AccountListJoinableOrganizationsResponse struct {
583+ JoinableOrganizations []JoinableOrganization `json:"joinableOrganizations"`
584+ JSON accountListJoinableOrganizationsResponseJSON `json:"-"`
585+ }
586+
587+ // accountListJoinableOrganizationsResponseJSON contains the JSON metadata for the
588+ // struct [AccountListJoinableOrganizationsResponse]
589+ type accountListJoinableOrganizationsResponseJSON struct {
590+ JoinableOrganizations apijson.Field
591+ raw string
592+ ExtraFields map [string ]apijson.Field
593+ }
594+
595+ func (r * AccountListJoinableOrganizationsResponse ) UnmarshalJSON (data []byte ) (err error ) {
596+ return apijson .UnmarshalRoot (data , r )
597+ }
598+
599+ func (r accountListJoinableOrganizationsResponseJSON ) RawJSON () string {
600+ return r .raw
601+ }
602+
555603type AccountGetParams struct {
556604 Empty param.Field [bool ] `json:"empty"`
557605}
@@ -579,6 +627,25 @@ func (r AccountGetSSOLoginURLParams) MarshalJSON() (data []byte, err error) {
579627 return apijson .MarshalRoot (r )
580628}
581629
630+ type AccountListJoinableOrganizationsParams struct {
631+ Token param.Field [string ] `query:"token"`
632+ PageSize param.Field [int64 ] `query:"pageSize"`
633+ Empty param.Field [bool ] `json:"empty"`
634+ }
635+
636+ func (r AccountListJoinableOrganizationsParams ) MarshalJSON () (data []byte , err error ) {
637+ return apijson .MarshalRoot (r )
638+ }
639+
640+ // URLQuery serializes [AccountListJoinableOrganizationsParams]'s query parameters
641+ // as `url.Values`.
642+ func (r AccountListJoinableOrganizationsParams ) URLQuery () (v url.Values ) {
643+ return apiquery .MarshalWithSettings (r , apiquery.QuerySettings {
644+ ArrayFormat : apiquery .ArrayQueryFormatComma ,
645+ NestedFormat : apiquery .NestedQueryFormatBrackets ,
646+ })
647+ }
648+
582649type AccountListLoginProvidersParams struct {
583650 Token param.Field [string ] `query:"token"`
584651 PageSize param.Field [int64 ] `query:"pageSize"`
0 commit comments