Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 106
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-36f9d46890bf3667f5a6529bdb156fe1560834ad8187c4271aa0b0024de1adb5.yml
23 changes: 23 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,29 @@ Methods:
- <code title="post /gitpod.v1.OrganizationService/ListMembers">client.organizations.<a href="./src/gitpod/resources/organizations/organizations.py">list_members</a>(\*\*<a href="src/gitpod/types/organization_list_members_params.py">params</a>) -> <a href="./src/gitpod/types/organization_member.py">SyncMembersPage[OrganizationMember]</a></code>
- <code title="post /gitpod.v1.OrganizationService/SetRole">client.organizations.<a href="./src/gitpod/resources/organizations/organizations.py">set_role</a>(\*\*<a href="src/gitpod/types/organization_set_role_params.py">params</a>) -> <a href="./src/gitpod/types/organization_set_role_response.py">object</a></code>

## DomainVerifications

Types:

```python
from gitpod.types.organizations import (
DomainVerification,
DomainVerificationState,
DomainVerificationCreateResponse,
DomainVerificationRetrieveResponse,
DomainVerificationDeleteResponse,
DomainVerificationVerifyResponse,
)
```

Methods:

- <code title="post /gitpod.v1.OrganizationService/CreateDomainVerification">client.organizations.domain_verifications.<a href="./src/gitpod/resources/organizations/domain_verifications.py">create</a>(\*\*<a href="src/gitpod/types/organizations/domain_verification_create_params.py">params</a>) -> <a href="./src/gitpod/types/organizations/domain_verification_create_response.py">DomainVerificationCreateResponse</a></code>
- <code title="post /gitpod.v1.OrganizationService/GetDomainVerification">client.organizations.domain_verifications.<a href="./src/gitpod/resources/organizations/domain_verifications.py">retrieve</a>(\*\*<a href="src/gitpod/types/organizations/domain_verification_retrieve_params.py">params</a>) -> <a href="./src/gitpod/types/organizations/domain_verification_retrieve_response.py">DomainVerificationRetrieveResponse</a></code>
- <code title="post /gitpod.v1.OrganizationService/ListDomainVerifications">client.organizations.domain_verifications.<a href="./src/gitpod/resources/organizations/domain_verifications.py">list</a>(\*\*<a href="src/gitpod/types/organizations/domain_verification_list_params.py">params</a>) -> <a href="./src/gitpod/types/organizations/domain_verification.py">SyncDomainVerificationsPage[DomainVerification]</a></code>
- <code title="post /gitpod.v1.OrganizationService/DeleteDomainVerification">client.organizations.domain_verifications.<a href="./src/gitpod/resources/organizations/domain_verifications.py">delete</a>(\*\*<a href="src/gitpod/types/organizations/domain_verification_delete_params.py">params</a>) -> <a href="./src/gitpod/types/organizations/domain_verification_delete_response.py">object</a></code>
- <code title="post /gitpod.v1.OrganizationService/VerifyDomain">client.organizations.domain_verifications.<a href="./src/gitpod/resources/organizations/domain_verifications.py">verify</a>(\*\*<a href="src/gitpod/types/organizations/domain_verification_verify_params.py">params</a>) -> <a href="./src/gitpod/types/organizations/domain_verification_verify_response.py">DomainVerificationVerifyResponse</a></code>

## Invites

Types:
Expand Down
53 changes: 53 additions & 0 deletions src/gitpod/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
from ._base_client import BasePage, PageInfo, BaseSyncPage, BaseAsyncPage

__all__ = [
"DomainVerificationsPagePagination",
"SyncDomainVerificationsPage",
"AsyncDomainVerificationsPage",
"EditorsPagePagination",
"SyncEditorsPage",
"AsyncEditorsPage",
Expand Down Expand Up @@ -71,6 +74,56 @@
_T = TypeVar("_T")


class DomainVerificationsPagePagination(BaseModel):
next_token: Optional[str] = FieldInfo(alias="nextToken", default=None)


class SyncDomainVerificationsPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
domain_verifications: List[_T] = FieldInfo(alias="domainVerifications")
pagination: Optional[DomainVerificationsPagePagination] = None

@override
def _get_page_items(self) -> List[_T]:
domain_verifications = self.domain_verifications
if not domain_verifications:
return []
return domain_verifications

@override
def next_page_info(self) -> Optional[PageInfo]:
next_token = None
if self.pagination is not None:
if self.pagination.next_token is not None:
next_token = self.pagination.next_token
if not next_token:
return None

return PageInfo(params={"token": next_token})


class AsyncDomainVerificationsPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
domain_verifications: List[_T] = FieldInfo(alias="domainVerifications")
pagination: Optional[DomainVerificationsPagePagination] = None

@override
def _get_page_items(self) -> List[_T]:
domain_verifications = self.domain_verifications
if not domain_verifications:
return []
return domain_verifications

@override
def next_page_info(self) -> Optional[PageInfo]:
next_token = None
if self.pagination is not None:
if self.pagination.next_token is not None:
next_token = self.pagination.next_token
if not next_token:
return None

return PageInfo(params={"token": next_token})


class EditorsPagePagination(BaseModel):
next_token: Optional[str] = FieldInfo(alias="nextToken", default=None)

Expand Down
14 changes: 14 additions & 0 deletions src/gitpod/resources/organizations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,22 @@
SSOConfigurationsResourceWithStreamingResponse,
AsyncSSOConfigurationsResourceWithStreamingResponse,
)
from .domain_verifications import (
DomainVerificationsResource,
AsyncDomainVerificationsResource,
DomainVerificationsResourceWithRawResponse,
AsyncDomainVerificationsResourceWithRawResponse,
DomainVerificationsResourceWithStreamingResponse,
AsyncDomainVerificationsResourceWithStreamingResponse,
)

__all__ = [
"DomainVerificationsResource",
"AsyncDomainVerificationsResource",
"DomainVerificationsResourceWithRawResponse",
"AsyncDomainVerificationsResourceWithRawResponse",
"DomainVerificationsResourceWithStreamingResponse",
"AsyncDomainVerificationsResourceWithStreamingResponse",
"InvitesResource",
"AsyncInvitesResource",
"InvitesResourceWithRawResponse",
Expand Down
Loading