4141 async_to_raw_response_wrapper ,
4242 async_to_streamed_response_wrapper ,
4343)
44- from ...pagination import SyncRunnersPage , AsyncRunnersPage
44+ from ...pagination import SyncRunnersPage , AsyncRunnersPage , SyncOrganizationsPage , AsyncOrganizationsPage
4545from ..._base_client import AsyncPaginator , make_request_options
4646from ...types .runner import Runner
4747from ...types .runner_kind import RunnerKind
@@ -681,6 +681,8 @@ def list_scm_organizations(
681681 * ,
682682 token : str | Omit = omit ,
683683 page_size : int | Omit = omit ,
684+ pagination : runner_list_scm_organizations_params .Pagination | Omit = omit ,
685+ query : str | Omit = omit ,
684686 runner_id : str | Omit = omit ,
685687 scm_host : str | Omit = omit ,
686688 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -689,7 +691,7 @@ def list_scm_organizations(
689691 extra_query : Query | None = None ,
690692 extra_body : Body | None = None ,
691693 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
692- ) -> RunnerListScmOrganizationsResponse :
694+ ) -> SyncOrganizationsPage [ RunnerListScmOrganizationsResponse ] :
693695 """
694696 Lists SCM organizations the user belongs to.
695697
@@ -709,7 +711,29 @@ def list_scm_organizations(
709711 scmHost: "github.com"
710712 ```
711713
714+ - Search GitLab groups:
715+
716+ Returns the first page of GitLab groups matching the substring.
717+
718+ ```yaml
719+ runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
720+ scmHost: "gitlab.com"
721+ query: "platform"
722+ pagination:
723+ pageSize: 25
724+ ```
725+
712726 Args:
727+ pagination: Pagination parameters. When unset, defaults to the standard PaginationRequest
728+ defaults (page_size 25, max 100). Tokens are opaque and provider-specific.
729+
730+ query: Optional substring filter applied to the organization name.
731+
732+ - GitLab: forwarded to the upstream `search` parameter (server-side,
733+ case-insensitive substring on name/path).
734+ - GitHub and Bitbucket: not implemented as they don't support searching Empty
735+ value means no filter.
736+
713737 scm_host: The SCM host to list organizations from (e.g., "github.com", "gitlab.com")
714738
715739 extra_headers: Send extra headers
@@ -720,10 +744,13 @@ def list_scm_organizations(
720744
721745 timeout: Override the client-level default timeout for this request, in seconds
722746 """
723- return self ._post (
747+ return self ._get_api_list (
724748 "/gitpod.v1.RunnerService/ListSCMOrganizations" ,
749+ page = SyncOrganizationsPage [RunnerListScmOrganizationsResponse ],
725750 body = maybe_transform (
726751 {
752+ "pagination" : pagination ,
753+ "query" : query ,
727754 "runner_id" : runner_id ,
728755 "scm_host" : scm_host ,
729756 },
@@ -742,7 +769,8 @@ def list_scm_organizations(
742769 runner_list_scm_organizations_params .RunnerListScmOrganizationsParams ,
743770 ),
744771 ),
745- cast_to = RunnerListScmOrganizationsResponse ,
772+ model = RunnerListScmOrganizationsResponse ,
773+ method = "post" ,
746774 )
747775
748776 def parse_context_url (
@@ -1505,11 +1533,13 @@ async def create_runner_token(
15051533 cast_to = RunnerCreateRunnerTokenResponse ,
15061534 )
15071535
1508- async def list_scm_organizations (
1536+ def list_scm_organizations (
15091537 self ,
15101538 * ,
15111539 token : str | Omit = omit ,
15121540 page_size : int | Omit = omit ,
1541+ pagination : runner_list_scm_organizations_params .Pagination | Omit = omit ,
1542+ query : str | Omit = omit ,
15131543 runner_id : str | Omit = omit ,
15141544 scm_host : str | Omit = omit ,
15151545 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -1518,7 +1548,7 @@ async def list_scm_organizations(
15181548 extra_query : Query | None = None ,
15191549 extra_body : Body | None = None ,
15201550 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
1521- ) -> RunnerListScmOrganizationsResponse :
1551+ ) -> AsyncPaginator [ RunnerListScmOrganizationsResponse , AsyncOrganizationsPage [ RunnerListScmOrganizationsResponse ]] :
15221552 """
15231553 Lists SCM organizations the user belongs to.
15241554
@@ -1538,7 +1568,29 @@ async def list_scm_organizations(
15381568 scmHost: "github.com"
15391569 ```
15401570
1571+ - Search GitLab groups:
1572+
1573+ Returns the first page of GitLab groups matching the substring.
1574+
1575+ ```yaml
1576+ runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
1577+ scmHost: "gitlab.com"
1578+ query: "platform"
1579+ pagination:
1580+ pageSize: 25
1581+ ```
1582+
15411583 Args:
1584+ pagination: Pagination parameters. When unset, defaults to the standard PaginationRequest
1585+ defaults (page_size 25, max 100). Tokens are opaque and provider-specific.
1586+
1587+ query: Optional substring filter applied to the organization name.
1588+
1589+ - GitLab: forwarded to the upstream `search` parameter (server-side,
1590+ case-insensitive substring on name/path).
1591+ - GitHub and Bitbucket: not implemented as they don't support searching Empty
1592+ value means no filter.
1593+
15421594 scm_host: The SCM host to list organizations from (e.g., "github.com", "gitlab.com")
15431595
15441596 extra_headers: Send extra headers
@@ -1549,10 +1601,13 @@ async def list_scm_organizations(
15491601
15501602 timeout: Override the client-level default timeout for this request, in seconds
15511603 """
1552- return await self ._post (
1604+ return self ._get_api_list (
15531605 "/gitpod.v1.RunnerService/ListSCMOrganizations" ,
1554- body = await async_maybe_transform (
1606+ page = AsyncOrganizationsPage [RunnerListScmOrganizationsResponse ],
1607+ body = maybe_transform (
15551608 {
1609+ "pagination" : pagination ,
1610+ "query" : query ,
15561611 "runner_id" : runner_id ,
15571612 "scm_host" : scm_host ,
15581613 },
@@ -1563,15 +1618,16 @@ async def list_scm_organizations(
15631618 extra_query = extra_query ,
15641619 extra_body = extra_body ,
15651620 timeout = timeout ,
1566- query = await async_maybe_transform (
1621+ query = maybe_transform (
15671622 {
15681623 "token" : token ,
15691624 "page_size" : page_size ,
15701625 },
15711626 runner_list_scm_organizations_params .RunnerListScmOrganizationsParams ,
15721627 ),
15731628 ),
1574- cast_to = RunnerListScmOrganizationsResponse ,
1629+ model = RunnerListScmOrganizationsResponse ,
1630+ method = "post" ,
15751631 )
15761632
15771633 async def parse_context_url (
0 commit comments