@@ -120,6 +120,30 @@ func (r *AccountService) GetSSOLoginURL(ctx context.Context, body AccountGetSSOL
120
120
return
121
121
}
122
122
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
+
123
147
// Lists available login providers with optional filtering.
124
148
//
125
149
// Use this method to:
@@ -380,8 +404,11 @@ type Account struct {
380
404
// Joda Time's
381
405
// [`ISODateTimeFormat.dateTime()`](<http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()>)
382
406
// 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
385
412
Joinables []JoinableOrganization `json:"joinables"`
386
413
Memberships []AccountMembership `json:"memberships"`
387
414
// 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 {
552
579
return r .raw
553
580
}
554
581
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
+
555
603
type AccountGetParams struct {
556
604
Empty param.Field [bool ] `json:"empty"`
557
605
}
@@ -579,6 +627,25 @@ func (r AccountGetSSOLoginURLParams) MarshalJSON() (data []byte, err error) {
579
627
return apijson .MarshalRoot (r )
580
628
}
581
629
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
+
582
649
type AccountListLoginProvidersParams struct {
583
650
Token param.Field [string ] `query:"token"`
584
651
PageSize param.Field [int64 ] `query:"pageSize"`
0 commit comments