diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5547f83..cda9cbd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.1" + ".": "0.1.2" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 4f2abc7..df3a2f0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 111 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-27f7bd641de1e4657ad8ce84a456fe0c5e8f1e14779bf1f567a4bc8667eba4da.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-0c37e687e2a070abfe49501156af6d906ff166b6eaad779ee6c2b568515f2b7e.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 56fbfe1..52aa5e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.1.2 (2025-02-14) + +Full Changelog: [v0.1.1...v0.1.2](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.1.1...v0.1.2) + +### Features + +* **api:** manual updates ([#39](https://github.com/gitpod-io/gitpod-sdk-python/issues/39)) ([31f6c01](https://github.com/gitpod-io/gitpod-sdk-python/commit/31f6c01e50663c19a4e11808458b4bbd3fb38ead)) +* **api:** Organizations Open API docs ([#37](https://github.com/gitpod-io/gitpod-sdk-python/issues/37)) ([ed6623d](https://github.com/gitpod-io/gitpod-sdk-python/commit/ed6623dbad5cf3605f8d5e3d07450cc30576ad0f)) + ## 0.1.1 (2025-02-14) Full Changelog: [v0.1.0-alpha.3...v0.1.1](https://github.com/gitpod-io/gitpod-sdk-python/compare/v0.1.0-alpha.3...v0.1.1) diff --git a/api.md b/api.md index d6933bf..cc2d93c 100644 --- a/api.md +++ b/api.md @@ -2,8 +2,10 @@ ```python from gitpod.types import ( + ArbitraryData, AutomationTrigger, EnvironmentClass, + ErrorCode, FieldValue, OrganizationRole, Principal, diff --git a/pyproject.toml b/pyproject.toml index e699baf..ec2ef5b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "gitpod-sdk" -version = "0.1.1" +version = "0.1.2" description = "The official Python library for the gitpod API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/gitpod/_exceptions.py b/src/gitpod/_exceptions.py index 9377835..e78213c 100644 --- a/src/gitpod/_exceptions.py +++ b/src/gitpod/_exceptions.py @@ -2,10 +2,16 @@ from __future__ import annotations +from typing import TYPE_CHECKING, Any, Optional, cast from typing_extensions import Literal import httpx +from ._utils import is_dict +from ._models import construct_type +from .types.shared.error_code import ErrorCode +from .types.shared.arbitrary_data import ArbitraryData + __all__ = [ "BadRequestError", "AuthenticationError", @@ -37,12 +43,35 @@ class APIError(GitpodError): If there was no response associated with this error then it will be `None`. """ - def __init__(self, message: str, request: httpx.Request, *, body: object | None) -> None: # noqa: ARG002 + code: Optional[ErrorCode] = None + """ + The status code, which should be an enum value of + [google.rpc.Code][google.rpc.Code]. + """ + detail: Optional[ArbitraryData] = None + """ + Contains an arbitrary serialized message along with a @type that describes the + type of the serialized message. + """ + if TYPE_CHECKING: + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + + def __init__(self, message: str, request: httpx.Request, *, body: object | None) -> None: super().__init__(message) self.request = request self.message = message self.body = body + if is_dict(body): + self.code = cast(Any, construct_type(type_=Optional[ErrorCode], value=body.get("code"))) + self.detail = cast(Any, construct_type(type_=Optional[ArbitraryData], value=body.get("detail"))) + else: + self.code = None + self.detail = None + class APIResponseValidationError(APIError): response: httpx.Response diff --git a/src/gitpod/_version.py b/src/gitpod/_version.py index 5c0267d..b9d4fe7 100644 --- a/src/gitpod/_version.py +++ b/src/gitpod/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "gitpod" -__version__ = "0.1.1" # x-release-please-version +__version__ = "0.1.2" # x-release-please-version diff --git a/src/gitpod/resources/organizations/domain_verifications.py b/src/gitpod/resources/organizations/domain_verifications.py index 079f837..8661f18 100644 --- a/src/gitpod/resources/organizations/domain_verifications.py +++ b/src/gitpod/resources/organizations/domain_verifications.py @@ -67,7 +67,34 @@ def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> DomainVerificationCreateResponse: """ - CreateDomainVerification creates a new domain verification request + Initiates domain verification process to enable organization features. + + Use this method to: + + - Start domain ownership verification + - Enable automatic team joining + - Set up SSO restrictions + - Configure email-based policies + + ### Examples + + - Verify primary domain: + + Starts verification for main company domain. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + domain: "acme-corp.com" + ``` + + - Verify subsidiary domain: + + Adds verification for additional company domain. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + domain: "acme-subsidiary.com" + ``` Args: extra_headers: Send extra headers @@ -105,7 +132,23 @@ def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> DomainVerificationRetrieveResponse: """ - GetDomainVerification retrieves a domain verification request + Retrieves the status of a domain verification request. + + Use this method to: + + - Check verification progress + - View verification requirements + - Monitor domain status + + ### Examples + + - Get verification status: + + Checks the current state of a domain verification. + + ```yaml + domainVerificationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -143,7 +186,37 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncDomainVerificationsPage[DomainVerification]: """ - ListDomainVerifications lists all domain verifications for an organization + Lists and monitors domain verification status across an organization. + + Use this method to: + + - Track verification progress + - View all verified domains + - Monitor pending verifications + - Audit domain settings + + ### Examples + + - List all verifications: + + Shows all domain verifications regardless of status. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + pagination: + pageSize: 20 + ``` + + - List with pagination: + + Retrieves next page of verifications. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + pagination: + pageSize: 20 + token: "next-page-token-from-previous-response" + ``` Args: extra_headers: Send extra headers @@ -193,7 +266,23 @@ def delete( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - DeleteDomainVerification deletes a domain verification request + Removes a domain verification request. + + Use this method to: + + - Cancel pending verifications + - Remove verified domains + - Clean up unused domain records + + ### Examples + + - Delete verification: + + Removes a domain verification request. + + ```yaml + domainVerificationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -228,7 +317,23 @@ def verify( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> DomainVerificationVerifyResponse: """ - VerifyDomain verifies a domain ownership + Verifies domain ownership for an organization. + + Use this method to: + + - Complete domain verification process + - Enable domain-based features + - Validate DNS configuration + + ### Examples + + - Verify domain ownership: + + Verifies ownership after DNS records are configured. + + ```yaml + domainVerificationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -285,7 +390,34 @@ async def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> DomainVerificationCreateResponse: """ - CreateDomainVerification creates a new domain verification request + Initiates domain verification process to enable organization features. + + Use this method to: + + - Start domain ownership verification + - Enable automatic team joining + - Set up SSO restrictions + - Configure email-based policies + + ### Examples + + - Verify primary domain: + + Starts verification for main company domain. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + domain: "acme-corp.com" + ``` + + - Verify subsidiary domain: + + Adds verification for additional company domain. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + domain: "acme-subsidiary.com" + ``` Args: extra_headers: Send extra headers @@ -323,7 +455,23 @@ async def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> DomainVerificationRetrieveResponse: """ - GetDomainVerification retrieves a domain verification request + Retrieves the status of a domain verification request. + + Use this method to: + + - Check verification progress + - View verification requirements + - Monitor domain status + + ### Examples + + - Get verification status: + + Checks the current state of a domain verification. + + ```yaml + domainVerificationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -361,7 +509,37 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[DomainVerification, AsyncDomainVerificationsPage[DomainVerification]]: """ - ListDomainVerifications lists all domain verifications for an organization + Lists and monitors domain verification status across an organization. + + Use this method to: + + - Track verification progress + - View all verified domains + - Monitor pending verifications + - Audit domain settings + + ### Examples + + - List all verifications: + + Shows all domain verifications regardless of status. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + pagination: + pageSize: 20 + ``` + + - List with pagination: + + Retrieves next page of verifications. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + pagination: + pageSize: 20 + token: "next-page-token-from-previous-response" + ``` Args: extra_headers: Send extra headers @@ -411,7 +589,23 @@ async def delete( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - DeleteDomainVerification deletes a domain verification request + Removes a domain verification request. + + Use this method to: + + - Cancel pending verifications + - Remove verified domains + - Clean up unused domain records + + ### Examples + + - Delete verification: + + Removes a domain verification request. + + ```yaml + domainVerificationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -446,7 +640,23 @@ async def verify( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> DomainVerificationVerifyResponse: """ - VerifyDomain verifies a domain ownership + Verifies domain ownership for an organization. + + Use this method to: + + - Complete domain verification process + - Enable domain-based features + - Validate DNS configuration + + ### Examples + + - Verify domain ownership: + + Verifies ownership after DNS records are configured. + + ```yaml + domainVerificationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers diff --git a/src/gitpod/resources/organizations/invites.py b/src/gitpod/resources/organizations/invites.py index 2c080ce..ac39a54 100644 --- a/src/gitpod/resources/organizations/invites.py +++ b/src/gitpod/resources/organizations/invites.py @@ -57,11 +57,27 @@ def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> InviteCreateResponse: - """CreateOrganizationInvite creates an invite for the organization. + """Creates an invite link for joining an organization. Any existing OrganizationInvites are invalidated and can no longer be used. + Use this method to: + + - Generate shareable invite links + - Manage team growth + - Control organization access + + ### Examples + + - Create organization invite: + + Generates a new invite link for the organization. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + ``` + Args: extra_headers: Send extra headers @@ -91,10 +107,8 @@ def retrieve( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> InviteRetrieveResponse: - """GetOrganizationInvite retrieves invite for the organization. - - If no invite - exists, a new one is created. + """ + GetOrganizationInvite Args: extra_headers: Send extra headers @@ -126,8 +140,24 @@ def get_summary( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> InviteGetSummaryResponse: """ - GetOrganizationInviteSummary retrieves a summary of the organization based on an - Invite ID. Used to discover which organization an invite is for. + Retrieves organization details and membership info based on an invite link. + + Use this method to: + + - Preview organization details before joining + - Validate invite link authenticity + - Check organization size and activity + - View team information before accepting + + ### Examples + + - Get invite summary: + + Retrieves organization information from an invite. + + ```yaml + inviteId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -179,11 +209,27 @@ async def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> InviteCreateResponse: - """CreateOrganizationInvite creates an invite for the organization. + """Creates an invite link for joining an organization. Any existing OrganizationInvites are invalidated and can no longer be used. + Use this method to: + + - Generate shareable invite links + - Manage team growth + - Control organization access + + ### Examples + + - Create organization invite: + + Generates a new invite link for the organization. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + ``` + Args: extra_headers: Send extra headers @@ -215,10 +261,8 @@ async def retrieve( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> InviteRetrieveResponse: - """GetOrganizationInvite retrieves invite for the organization. - - If no invite - exists, a new one is created. + """ + GetOrganizationInvite Args: extra_headers: Send extra headers @@ -252,8 +296,24 @@ async def get_summary( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> InviteGetSummaryResponse: """ - GetOrganizationInviteSummary retrieves a summary of the organization based on an - Invite ID. Used to discover which organization an invite is for. + Retrieves organization details and membership info based on an invite link. + + Use this method to: + + - Preview organization details before joining + - Validate invite link authenticity + - Check organization size and activity + - View team information before accepting + + ### Examples + + - Get invite summary: + + Retrieves organization information from an invite. + + ```yaml + inviteId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers diff --git a/src/gitpod/resources/organizations/organizations.py b/src/gitpod/resources/organizations/organizations.py index b7e0957..f5fea4a 100644 --- a/src/gitpod/resources/organizations/organizations.py +++ b/src/gitpod/resources/organizations/organizations.py @@ -116,7 +116,35 @@ def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> OrganizationCreateResponse: """ - CreateOrganization creates a new Organization. + Creates a new organization with the specified name and settings. + + Use this method to: + + - Create a new organization for team collaboration + - Set up automatic domain-based invites for team members + - Join the organization immediately upon creation + + ### Examples + + - Create a basic organization: + + Creates an organization with just a name. + + ```yaml + name: "Acme Corp Engineering" + joinOrganization: true + ``` + + - Create with domain-based invites: + + Creates an organization that automatically invites users with matching email + domains. + + ```yaml + name: "Acme Corp" + joinOrganization: true + inviteAccountsWithMatchingDomain: true + ``` Args: name: name is the organization name @@ -163,7 +191,23 @@ def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> OrganizationRetrieveResponse: """ - GetOrganization retrieves a single Organization. + Gets details about a specific organization. + + Use this method to: + + - Retrieve organization settings and configuration + - Check organization membership status + - View domain verification settings + + ### Examples + + - Get organization details: + + Retrieves information about a specific organization. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + ``` Args: organization_id: organization_id is the unique identifier of the Organization to retreive. @@ -201,7 +245,40 @@ def update( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> OrganizationUpdateResponse: """ - UpdateOrganization updates the properties of an Organization. + Updates an organization's settings including name, invite domains, and member + policies. + + Use this method to: + + - Modify organization display name + - Configure email domain restrictions + - Update organization-wide settings + - Manage member access policies + + ### Examples + + - Update basic settings: + + Changes organization name and invite domains. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + name: "New Company Name" + inviteDomains: + domains: + - "company.com" + - "subsidiary.com" + ``` + + - Remove domain restrictions: + + Clears all domain-based invite restrictions. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + inviteDomains: + domains: [] + ``` Args: organization_id: organization_id is the ID of the organization to update the settings for. @@ -249,7 +326,35 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncOrganizationsPage[Organization]: """ - ListOrganizations lists all organization the caller has access to. + Lists all organizations the caller has access to with optional filtering. + + Use this method to: + + - View organizations you're a member of + - Browse all available organizations + - Paginate through organization results + + ### Examples + + - List member organizations: + + Shows organizations where the caller is a member. + + ```yaml + pagination: + pageSize: 20 + scope: SCOPE_MEMBER + ``` + + - List all organizations: + + Shows all organizations visible to the caller. + + ```yaml + pagination: + pageSize: 50 + scope: SCOPE_ALL + ``` Args: pagination: pagination contains the pagination options for listing organizations @@ -303,7 +408,23 @@ def delete( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - DeleteOrganization deletes the specified organization. + Permanently deletes an organization. + + Use this method to: + + - Remove unused organizations + - Clean up test organizations + - Complete organization migration + + ### Examples + + - Delete organization: + + Permanently removes an organization and all its data. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + ``` Args: organization_id: organization_id is the ID of the organization to delete @@ -340,7 +461,32 @@ def join( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> OrganizationJoinResponse: """ - JoinOrganization lets accounts join an Organization. + Allows users to join an organization through direct ID, invite link, or + domain-based auto-join. + + Use this method to: + + - Join an organization via direct ID or invite + - Join automatically based on email domain + - Accept organization invitations + + ### Examples + + - Join via organization ID: + + Joins an organization directly when you have the ID. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + ``` + + - Join via invite: + + Accepts an organization invitation link. + + ```yaml + inviteId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: invite_id: invite_id is the unique identifier of the invite to join the organization. @@ -382,7 +528,26 @@ def leave( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - LeaveOrganization lets the passed user leave an Organization. + Removes a user from an organization while preserving organization data. + + Use this method to: + + - Remove yourself from an organization + - Clean up inactive memberships + - Transfer project ownership before leaving + - Manage team transitions + + ### Examples + + - Leave organization: + + Removes user from organization membership. + + ```yaml + userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" + ``` + + Note: Ensure all projects and resources are transferred before leaving. Args: extra_headers: Send extra headers @@ -417,7 +582,36 @@ def list_members( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncMembersPage[OrganizationMember]: """ - ListMembers lists all members of the specified organization. + Lists and filters organization members with optional pagination. + + Use this method to: + + - View all organization members + - Monitor member activity + - Manage team membership + + ### Examples + + - List active members: + + Retrieves active members with pagination. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + pagination: + pageSize: 20 + ``` + + - List with pagination: + + Retrieves next page of members. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + pagination: + pageSize: 50 + token: "next-page-token-from-previous-response" + ``` Args: organization_id: organization_id is the ID of the organization to list members for @@ -473,7 +667,36 @@ def set_role( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - SetRole + Manages organization membership and roles by setting a user's role within the + organization. + + Use this method to: + + - Promote members to admin role + - Change member permissions + - Demote admins to regular members + + ### Examples + + - Promote to admin: + + Makes a user an organization administrator. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" + role: ORGANIZATION_ROLE_ADMIN + ``` + + - Change to member: + + Changes a user's role to regular member. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" + role: ORGANIZATION_ROLE_MEMBER + ``` Args: extra_headers: Send extra headers @@ -547,7 +770,35 @@ async def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> OrganizationCreateResponse: """ - CreateOrganization creates a new Organization. + Creates a new organization with the specified name and settings. + + Use this method to: + + - Create a new organization for team collaboration + - Set up automatic domain-based invites for team members + - Join the organization immediately upon creation + + ### Examples + + - Create a basic organization: + + Creates an organization with just a name. + + ```yaml + name: "Acme Corp Engineering" + joinOrganization: true + ``` + + - Create with domain-based invites: + + Creates an organization that automatically invites users with matching email + domains. + + ```yaml + name: "Acme Corp" + joinOrganization: true + inviteAccountsWithMatchingDomain: true + ``` Args: name: name is the organization name @@ -594,7 +845,23 @@ async def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> OrganizationRetrieveResponse: """ - GetOrganization retrieves a single Organization. + Gets details about a specific organization. + + Use this method to: + + - Retrieve organization settings and configuration + - Check organization membership status + - View domain verification settings + + ### Examples + + - Get organization details: + + Retrieves information about a specific organization. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + ``` Args: organization_id: organization_id is the unique identifier of the Organization to retreive. @@ -632,7 +899,40 @@ async def update( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> OrganizationUpdateResponse: """ - UpdateOrganization updates the properties of an Organization. + Updates an organization's settings including name, invite domains, and member + policies. + + Use this method to: + + - Modify organization display name + - Configure email domain restrictions + - Update organization-wide settings + - Manage member access policies + + ### Examples + + - Update basic settings: + + Changes organization name and invite domains. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + name: "New Company Name" + inviteDomains: + domains: + - "company.com" + - "subsidiary.com" + ``` + + - Remove domain restrictions: + + Clears all domain-based invite restrictions. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + inviteDomains: + domains: [] + ``` Args: organization_id: organization_id is the ID of the organization to update the settings for. @@ -680,7 +980,35 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[Organization, AsyncOrganizationsPage[Organization]]: """ - ListOrganizations lists all organization the caller has access to. + Lists all organizations the caller has access to with optional filtering. + + Use this method to: + + - View organizations you're a member of + - Browse all available organizations + - Paginate through organization results + + ### Examples + + - List member organizations: + + Shows organizations where the caller is a member. + + ```yaml + pagination: + pageSize: 20 + scope: SCOPE_MEMBER + ``` + + - List all organizations: + + Shows all organizations visible to the caller. + + ```yaml + pagination: + pageSize: 50 + scope: SCOPE_ALL + ``` Args: pagination: pagination contains the pagination options for listing organizations @@ -734,7 +1062,23 @@ async def delete( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - DeleteOrganization deletes the specified organization. + Permanently deletes an organization. + + Use this method to: + + - Remove unused organizations + - Clean up test organizations + - Complete organization migration + + ### Examples + + - Delete organization: + + Permanently removes an organization and all its data. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + ``` Args: organization_id: organization_id is the ID of the organization to delete @@ -771,7 +1115,32 @@ async def join( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> OrganizationJoinResponse: """ - JoinOrganization lets accounts join an Organization. + Allows users to join an organization through direct ID, invite link, or + domain-based auto-join. + + Use this method to: + + - Join an organization via direct ID or invite + - Join automatically based on email domain + - Accept organization invitations + + ### Examples + + - Join via organization ID: + + Joins an organization directly when you have the ID. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + ``` + + - Join via invite: + + Accepts an organization invitation link. + + ```yaml + inviteId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: invite_id: invite_id is the unique identifier of the invite to join the organization. @@ -813,7 +1182,26 @@ async def leave( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - LeaveOrganization lets the passed user leave an Organization. + Removes a user from an organization while preserving organization data. + + Use this method to: + + - Remove yourself from an organization + - Clean up inactive memberships + - Transfer project ownership before leaving + - Manage team transitions + + ### Examples + + - Leave organization: + + Removes user from organization membership. + + ```yaml + userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" + ``` + + Note: Ensure all projects and resources are transferred before leaving. Args: extra_headers: Send extra headers @@ -848,7 +1236,36 @@ def list_members( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[OrganizationMember, AsyncMembersPage[OrganizationMember]]: """ - ListMembers lists all members of the specified organization. + Lists and filters organization members with optional pagination. + + Use this method to: + + - View all organization members + - Monitor member activity + - Manage team membership + + ### Examples + + - List active members: + + Retrieves active members with pagination. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + pagination: + pageSize: 20 + ``` + + - List with pagination: + + Retrieves next page of members. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + pagination: + pageSize: 50 + token: "next-page-token-from-previous-response" + ``` Args: organization_id: organization_id is the ID of the organization to list members for @@ -904,7 +1321,36 @@ async def set_role( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - SetRole + Manages organization membership and roles by setting a user's role within the + organization. + + Use this method to: + + - Promote members to admin role + - Change member permissions + - Demote admins to regular members + + ### Examples + + - Promote to admin: + + Makes a user an organization administrator. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" + role: ORGANIZATION_ROLE_ADMIN + ``` + + - Change to member: + + Changes a user's role to regular member. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" + role: ORGANIZATION_ROLE_MEMBER + ``` Args: extra_headers: Send extra headers diff --git a/src/gitpod/resources/organizations/sso_configurations.py b/src/gitpod/resources/organizations/sso_configurations.py index 57a8010..68266b7 100644 --- a/src/gitpod/resources/organizations/sso_configurations.py +++ b/src/gitpod/resources/organizations/sso_configurations.py @@ -73,7 +73,40 @@ def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SSOConfigurationCreateResponse: """ - CreateSSOConfiguration creates a new SSO configuration for the organization. + Creates or updates SSO configuration for organizational authentication. + + Use this method to: + + - Configure OIDC-based SSO providers + - Set up built-in providers (Google, GitHub, etc.) + - Define custom identity providers + - Manage authentication policies + + ### Examples + + - Configure built-in Google SSO: + + Sets up SSO using Google Workspace. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + clientId: "012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com" + clientSecret: "GOCSPX-abcdefghijklmnopqrstuvwxyz123456" + issuerUrl: "https://accounts.google.com" + emailDomain: "acme-corp.com" + ``` + + - Configure custom OIDC provider: + + Sets up SSO with a custom identity provider. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + clientId: "acme-corp-gitpod" + clientSecret: "secret-token-value" + issuerUrl: "https://sso.acme-corp.com" + emailDomain: "acme-corp.com" + ``` Args: client_id: client_id is the client ID of the OIDC application set on the IdP @@ -122,7 +155,23 @@ def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SSOConfigurationRetrieveResponse: """ - GetSSOConfiguration returns an SSO configuration. + Retrieves a specific SSO configuration. + + Use this method to: + + - View SSO provider details + - Check configuration status + - Verify SSO settings + + ### Examples + + - Get SSO configuration: + + Retrieves details of a specific SSO configuration. + + ```yaml + ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: sso_configuration_id: sso_configuration_id is the ID of the SSO configuration to get @@ -165,7 +214,36 @@ def update( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - UpdateSSOConfiguration updates the SSO configuration for the organization. + Updates SSO provider settings and authentication rules. + + Use this method to: + + - Rotate client credentials + - Update provider endpoints + - Modify claim mappings + - Change authentication policies + - Toggle SSO enforcement + + ### Examples + + - Update credentials: + + Rotates client ID and secret. + + ```yaml + ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + clientId: "new-client-id" + clientSecret: "new-client-secret" + ``` + + - Update provider status: + + Activates or deactivates SSO provider. + + ```yaml + ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + state: SSO_CONFIGURATION_STATE_ACTIVE + ``` Args: sso_configuration_id: sso_configuration_id is the ID of the SSO configuration to update @@ -223,7 +301,37 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncSSOConfigurationsPage[SSOConfiguration]: """ - ListSSOConfigurations lists all SSO configurations matching provided filters. + Lists and filters SSO configurations for an organization. + + Use this method to: + + - View all SSO providers + - Monitor authentication status + - Audit security settings + - Manage provider configurations + + ### Examples + + - List active configurations: + + Shows all active SSO providers. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + pagination: + pageSize: 20 + ``` + + - List by provider type: + + Shows custom SSO configurations. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + pagination: + pageSize: 20 + token: "next-page-token-from-previous-response" + ``` Args: organization_id: organization_id is the ID of the organization to list SSO configurations for. @@ -275,7 +383,23 @@ def delete( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - DeleteSSOConfiguration deletes an SSO configuration. + Removes an SSO configuration from an organization. + + Use this method to: + + - Disable SSO authentication + - Remove outdated providers + - Clean up unused configurations + + ### Examples + + - Delete SSO configuration: + + Removes a specific SSO configuration. + + ```yaml + ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers @@ -335,7 +459,40 @@ async def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SSOConfigurationCreateResponse: """ - CreateSSOConfiguration creates a new SSO configuration for the organization. + Creates or updates SSO configuration for organizational authentication. + + Use this method to: + + - Configure OIDC-based SSO providers + - Set up built-in providers (Google, GitHub, etc.) + - Define custom identity providers + - Manage authentication policies + + ### Examples + + - Configure built-in Google SSO: + + Sets up SSO using Google Workspace. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + clientId: "012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com" + clientSecret: "GOCSPX-abcdefghijklmnopqrstuvwxyz123456" + issuerUrl: "https://accounts.google.com" + emailDomain: "acme-corp.com" + ``` + + - Configure custom OIDC provider: + + Sets up SSO with a custom identity provider. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + clientId: "acme-corp-gitpod" + clientSecret: "secret-token-value" + issuerUrl: "https://sso.acme-corp.com" + emailDomain: "acme-corp.com" + ``` Args: client_id: client_id is the client ID of the OIDC application set on the IdP @@ -384,7 +541,23 @@ async def retrieve( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SSOConfigurationRetrieveResponse: """ - GetSSOConfiguration returns an SSO configuration. + Retrieves a specific SSO configuration. + + Use this method to: + + - View SSO provider details + - Check configuration status + - Verify SSO settings + + ### Examples + + - Get SSO configuration: + + Retrieves details of a specific SSO configuration. + + ```yaml + ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: sso_configuration_id: sso_configuration_id is the ID of the SSO configuration to get @@ -427,7 +600,36 @@ async def update( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - UpdateSSOConfiguration updates the SSO configuration for the organization. + Updates SSO provider settings and authentication rules. + + Use this method to: + + - Rotate client credentials + - Update provider endpoints + - Modify claim mappings + - Change authentication policies + - Toggle SSO enforcement + + ### Examples + + - Update credentials: + + Rotates client ID and secret. + + ```yaml + ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + clientId: "new-client-id" + clientSecret: "new-client-secret" + ``` + + - Update provider status: + + Activates or deactivates SSO provider. + + ```yaml + ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + state: SSO_CONFIGURATION_STATE_ACTIVE + ``` Args: sso_configuration_id: sso_configuration_id is the ID of the SSO configuration to update @@ -485,7 +687,37 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[SSOConfiguration, AsyncSSOConfigurationsPage[SSOConfiguration]]: """ - ListSSOConfigurations lists all SSO configurations matching provided filters. + Lists and filters SSO configurations for an organization. + + Use this method to: + + - View all SSO providers + - Monitor authentication status + - Audit security settings + - Manage provider configurations + + ### Examples + + - List active configurations: + + Shows all active SSO providers. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + pagination: + pageSize: 20 + ``` + + - List by provider type: + + Shows custom SSO configurations. + + ```yaml + organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" + pagination: + pageSize: 20 + token: "next-page-token-from-previous-response" + ``` Args: organization_id: organization_id is the ID of the organization to list SSO configurations for. @@ -537,7 +769,23 @@ async def delete( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> object: """ - DeleteSSOConfiguration deletes an SSO configuration. + Removes an SSO configuration from an organization. + + Use this method to: + + - Disable SSO authentication + - Remove outdated providers + - Clean up unused configurations + + ### Examples + + - Delete SSO configuration: + + Removes a specific SSO configuration. + + ```yaml + ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" + ``` Args: extra_headers: Send extra headers diff --git a/src/gitpod/types/__init__.py b/src/gitpod/types/__init__.py index 03e376b..2b8a052 100644 --- a/src/gitpod/types/__init__.py +++ b/src/gitpod/types/__init__.py @@ -13,10 +13,12 @@ RunsOn as RunsOn, Subject as Subject, TaskSpec as TaskSpec, + ErrorCode as ErrorCode, Principal as Principal, FieldValue as FieldValue, UserStatus as UserStatus, TaskMetadata as TaskMetadata, + ArbitraryData as ArbitraryData, TaskExecution as TaskExecution, EnvironmentClass as EnvironmentClass, OrganizationRole as OrganizationRole, diff --git a/src/gitpod/types/shared/__init__.py b/src/gitpod/types/shared/__init__.py index ba0e256..b4616dc 100644 --- a/src/gitpod/types/shared/__init__.py +++ b/src/gitpod/types/shared/__init__.py @@ -5,9 +5,11 @@ from .subject import Subject as Subject from .principal import Principal as Principal from .task_spec import TaskSpec as TaskSpec +from .error_code import ErrorCode as ErrorCode from .field_value import FieldValue as FieldValue from .user_status import UserStatus as UserStatus from .task_metadata import TaskMetadata as TaskMetadata +from .arbitrary_data import ArbitraryData as ArbitraryData from .task_execution import TaskExecution as TaskExecution from .environment_class import EnvironmentClass as EnvironmentClass from .organization_role import OrganizationRole as OrganizationRole diff --git a/src/gitpod/types/shared/arbitrary_data.py b/src/gitpod/types/shared/arbitrary_data.py new file mode 100644 index 0000000..de1ead2 --- /dev/null +++ b/src/gitpod/types/shared/arbitrary_data.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, Optional + +from ..._models import BaseModel + +__all__ = ["ArbitraryData"] + + +class ArbitraryData(BaseModel): + debug: Optional[Dict[str, object]] = None + + type: Optional[str] = None + + value: Optional[object] = None + + if TYPE_CHECKING: + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... diff --git a/src/gitpod/types/shared/error_code.py b/src/gitpod/types/shared/error_code.py new file mode 100644 index 0000000..316948a --- /dev/null +++ b/src/gitpod/types/shared/error_code.py @@ -0,0 +1,24 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["ErrorCode"] + +ErrorCode: TypeAlias = Literal[ + "canceled", + "unknown", + "invalid_argument", + "deadline_exceeded", + "not_found", + "already_exists", + "permission_denied", + "resource_exhausted", + "failed_precondition", + "aborted", + "out_of_range", + "unimplemented", + "internal", + "unavailable", + "data_loss", + "unauthenticated", +] diff --git a/tests/api_resources/organizations/test_domain_verifications.py b/tests/api_resources/organizations/test_domain_verifications.py index 2b12ebf..3c2a0c0 100644 --- a/tests/api_resources/organizations/test_domain_verifications.py +++ b/tests/api_resources/organizations/test_domain_verifications.py @@ -27,8 +27,8 @@ class TestDomainVerifications: @parametrize def test_method_create(self, client: Gitpod) -> None: domain_verification = client.organizations.domain_verifications.create( - domain="xxxx", - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain="acme-corp.com", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(DomainVerificationCreateResponse, domain_verification, path=["response"]) @@ -36,8 +36,8 @@ def test_method_create(self, client: Gitpod) -> None: @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.organizations.domain_verifications.with_raw_response.create( - domain="xxxx", - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain="acme-corp.com", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -49,8 +49,8 @@ def test_raw_response_create(self, client: Gitpod) -> None: @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.organizations.domain_verifications.with_streaming_response.create( - domain="xxxx", - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain="acme-corp.com", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -64,7 +64,7 @@ def test_streaming_response_create(self, client: Gitpod) -> None: @parametrize def test_method_retrieve(self, client: Gitpod) -> None: domain_verification = client.organizations.domain_verifications.retrieve( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(DomainVerificationRetrieveResponse, domain_verification, path=["response"]) @@ -72,7 +72,7 @@ def test_method_retrieve(self, client: Gitpod) -> None: @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.organizations.domain_verifications.with_raw_response.retrieve( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert response.is_closed is True @@ -84,7 +84,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.organizations.domain_verifications.with_streaming_response.retrieve( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -98,7 +98,7 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: @parametrize def test_method_list(self, client: Gitpod) -> None: domain_verification = client.organizations.domain_verifications.list( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(SyncDomainVerificationsPage[DomainVerification], domain_verification, path=["response"]) @@ -106,12 +106,12 @@ def test_method_list(self, client: Gitpod) -> None: @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: domain_verification = client.organizations.domain_verifications.list( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", token="token", page_size=0, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(SyncDomainVerificationsPage[DomainVerification], domain_verification, path=["response"]) @@ -120,7 +120,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.organizations.domain_verifications.with_raw_response.list( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -132,7 +132,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.organizations.domain_verifications.with_streaming_response.list( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -146,7 +146,7 @@ def test_streaming_response_list(self, client: Gitpod) -> None: @parametrize def test_method_delete(self, client: Gitpod) -> None: domain_verification = client.organizations.domain_verifications.delete( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, domain_verification, path=["response"]) @@ -154,7 +154,7 @@ def test_method_delete(self, client: Gitpod) -> None: @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.organizations.domain_verifications.with_raw_response.delete( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert response.is_closed is True @@ -166,7 +166,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.organizations.domain_verifications.with_streaming_response.delete( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -180,7 +180,7 @@ def test_streaming_response_delete(self, client: Gitpod) -> None: @parametrize def test_method_verify(self, client: Gitpod) -> None: domain_verification = client.organizations.domain_verifications.verify( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(DomainVerificationVerifyResponse, domain_verification, path=["response"]) @@ -188,7 +188,7 @@ def test_method_verify(self, client: Gitpod) -> None: @parametrize def test_raw_response_verify(self, client: Gitpod) -> None: response = client.organizations.domain_verifications.with_raw_response.verify( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert response.is_closed is True @@ -200,7 +200,7 @@ def test_raw_response_verify(self, client: Gitpod) -> None: @parametrize def test_streaming_response_verify(self, client: Gitpod) -> None: with client.organizations.domain_verifications.with_streaming_response.verify( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -218,8 +218,8 @@ class TestAsyncDomainVerifications: @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: domain_verification = await async_client.organizations.domain_verifications.create( - domain="xxxx", - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain="acme-corp.com", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(DomainVerificationCreateResponse, domain_verification, path=["response"]) @@ -227,8 +227,8 @@ async def test_method_create(self, async_client: AsyncGitpod) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.domain_verifications.with_raw_response.create( - domain="xxxx", - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain="acme-corp.com", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -240,8 +240,8 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.domain_verifications.with_streaming_response.create( - domain="xxxx", - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain="acme-corp.com", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -255,7 +255,7 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: domain_verification = await async_client.organizations.domain_verifications.retrieve( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(DomainVerificationRetrieveResponse, domain_verification, path=["response"]) @@ -263,7 +263,7 @@ async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.domain_verifications.with_raw_response.retrieve( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert response.is_closed is True @@ -275,7 +275,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.domain_verifications.with_streaming_response.retrieve( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -289,7 +289,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: domain_verification = await async_client.organizations.domain_verifications.list( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(AsyncDomainVerificationsPage[DomainVerification], domain_verification, path=["response"]) @@ -297,12 +297,12 @@ async def test_method_list(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: domain_verification = await async_client.organizations.domain_verifications.list( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", token="token", page_size=0, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(AsyncDomainVerificationsPage[DomainVerification], domain_verification, path=["response"]) @@ -311,7 +311,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.domain_verifications.with_raw_response.list( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -323,7 +323,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.domain_verifications.with_streaming_response.list( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -339,7 +339,7 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: domain_verification = await async_client.organizations.domain_verifications.delete( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, domain_verification, path=["response"]) @@ -347,7 +347,7 @@ async def test_method_delete(self, async_client: AsyncGitpod) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.domain_verifications.with_raw_response.delete( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert response.is_closed is True @@ -359,7 +359,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.domain_verifications.with_streaming_response.delete( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -373,7 +373,7 @@ async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> Non @parametrize async def test_method_verify(self, async_client: AsyncGitpod) -> None: domain_verification = await async_client.organizations.domain_verifications.verify( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(DomainVerificationVerifyResponse, domain_verification, path=["response"]) @@ -381,7 +381,7 @@ async def test_method_verify(self, async_client: AsyncGitpod) -> None: @parametrize async def test_raw_response_verify(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.domain_verifications.with_raw_response.verify( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert response.is_closed is True @@ -393,7 +393,7 @@ async def test_raw_response_verify(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_verify(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.domain_verifications.with_streaming_response.verify( - domain_verification_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/organizations/test_invites.py b/tests/api_resources/organizations/test_invites.py index 2b426d6..524b61c 100644 --- a/tests/api_resources/organizations/test_invites.py +++ b/tests/api_resources/organizations/test_invites.py @@ -25,7 +25,7 @@ class TestInvites: @parametrize def test_method_create(self, client: Gitpod) -> None: invite = client.organizations.invites.create( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(InviteCreateResponse, invite, path=["response"]) @@ -33,7 +33,7 @@ def test_method_create(self, client: Gitpod) -> None: @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.organizations.invites.with_raw_response.create( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -45,7 +45,7 @@ def test_raw_response_create(self, client: Gitpod) -> None: @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.organizations.invites.with_streaming_response.create( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -93,7 +93,7 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: @parametrize def test_method_get_summary(self, client: Gitpod) -> None: invite = client.organizations.invites.get_summary( - invite_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + invite_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(InviteGetSummaryResponse, invite, path=["response"]) @@ -101,7 +101,7 @@ def test_method_get_summary(self, client: Gitpod) -> None: @parametrize def test_raw_response_get_summary(self, client: Gitpod) -> None: response = client.organizations.invites.with_raw_response.get_summary( - invite_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + invite_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert response.is_closed is True @@ -113,7 +113,7 @@ def test_raw_response_get_summary(self, client: Gitpod) -> None: @parametrize def test_streaming_response_get_summary(self, client: Gitpod) -> None: with client.organizations.invites.with_streaming_response.get_summary( - invite_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + invite_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -131,7 +131,7 @@ class TestAsyncInvites: @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: invite = await async_client.organizations.invites.create( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(InviteCreateResponse, invite, path=["response"]) @@ -139,7 +139,7 @@ async def test_method_create(self, async_client: AsyncGitpod) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.invites.with_raw_response.create( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -151,7 +151,7 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.invites.with_streaming_response.create( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -199,7 +199,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N @parametrize async def test_method_get_summary(self, async_client: AsyncGitpod) -> None: invite = await async_client.organizations.invites.get_summary( - invite_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + invite_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(InviteGetSummaryResponse, invite, path=["response"]) @@ -207,7 +207,7 @@ async def test_method_get_summary(self, async_client: AsyncGitpod) -> None: @parametrize async def test_raw_response_get_summary(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.invites.with_raw_response.get_summary( - invite_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + invite_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert response.is_closed is True @@ -219,7 +219,7 @@ async def test_raw_response_get_summary(self, async_client: AsyncGitpod) -> None @parametrize async def test_streaming_response_get_summary(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.invites.with_streaming_response.get_summary( - invite_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + invite_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/organizations/test_sso_configurations.py b/tests/api_resources/organizations/test_sso_configurations.py index 09f440f..566d79f 100644 --- a/tests/api_resources/organizations/test_sso_configurations.py +++ b/tests/api_resources/organizations/test_sso_configurations.py @@ -26,11 +26,11 @@ class TestSSOConfigurations: @parametrize def test_method_create(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.create( - client_id="x", - client_secret="x", - email_domain="xxxx", - issuer_url="https://example.com", - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + client_id="012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com", + client_secret="GOCSPX-abcdefghijklmnopqrstuvwxyz123456", + email_domain="acme-corp.com", + issuer_url="https://accounts.google.com", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(SSOConfigurationCreateResponse, sso_configuration, path=["response"]) @@ -38,11 +38,11 @@ def test_method_create(self, client: Gitpod) -> None: @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.organizations.sso_configurations.with_raw_response.create( - client_id="x", - client_secret="x", - email_domain="xxxx", - issuer_url="https://example.com", - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + client_id="012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com", + client_secret="GOCSPX-abcdefghijklmnopqrstuvwxyz123456", + email_domain="acme-corp.com", + issuer_url="https://accounts.google.com", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -54,11 +54,11 @@ def test_raw_response_create(self, client: Gitpod) -> None: @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.organizations.sso_configurations.with_streaming_response.create( - client_id="x", - client_secret="x", - email_domain="xxxx", - issuer_url="https://example.com", - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + client_id="012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com", + client_secret="GOCSPX-abcdefghijklmnopqrstuvwxyz123456", + email_domain="acme-corp.com", + issuer_url="https://accounts.google.com", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -72,7 +72,7 @@ def test_streaming_response_create(self, client: Gitpod) -> None: @parametrize def test_method_retrieve(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.retrieve( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(SSOConfigurationRetrieveResponse, sso_configuration, path=["response"]) @@ -80,7 +80,7 @@ def test_method_retrieve(self, client: Gitpod) -> None: @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.organizations.sso_configurations.with_raw_response.retrieve( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert response.is_closed is True @@ -92,7 +92,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.organizations.sso_configurations.with_streaming_response.retrieve( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -106,7 +106,7 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: @parametrize def test_method_update(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.update( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, sso_configuration, path=["response"]) @@ -114,10 +114,10 @@ def test_method_update(self, client: Gitpod) -> None: @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.update( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", claims={"foo": "string"}, - client_id="x", - client_secret="x", + client_id="new-client-id", + client_secret="new-client-secret", email_domain="xxxx", issuer_url="https://example.com", state="SSO_CONFIGURATION_STATE_UNSPECIFIED", @@ -128,7 +128,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: @parametrize def test_raw_response_update(self, client: Gitpod) -> None: response = client.organizations.sso_configurations.with_raw_response.update( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert response.is_closed is True @@ -140,7 +140,7 @@ def test_raw_response_update(self, client: Gitpod) -> None: @parametrize def test_streaming_response_update(self, client: Gitpod) -> None: with client.organizations.sso_configurations.with_streaming_response.update( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -154,7 +154,7 @@ def test_streaming_response_update(self, client: Gitpod) -> None: @parametrize def test_method_list(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.list( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(SyncSSOConfigurationsPage[SSOConfiguration], sso_configuration, path=["response"]) @@ -162,12 +162,12 @@ def test_method_list(self, client: Gitpod) -> None: @parametrize def test_method_list_with_all_params(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.list( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", token="token", page_size=0, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(SyncSSOConfigurationsPage[SSOConfiguration], sso_configuration, path=["response"]) @@ -176,7 +176,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: @parametrize def test_raw_response_list(self, client: Gitpod) -> None: response = client.organizations.sso_configurations.with_raw_response.list( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -188,7 +188,7 @@ def test_raw_response_list(self, client: Gitpod) -> None: @parametrize def test_streaming_response_list(self, client: Gitpod) -> None: with client.organizations.sso_configurations.with_streaming_response.list( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -202,7 +202,7 @@ def test_streaming_response_list(self, client: Gitpod) -> None: @parametrize def test_method_delete(self, client: Gitpod) -> None: sso_configuration = client.organizations.sso_configurations.delete( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, sso_configuration, path=["response"]) @@ -210,7 +210,7 @@ def test_method_delete(self, client: Gitpod) -> None: @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.organizations.sso_configurations.with_raw_response.delete( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert response.is_closed is True @@ -222,7 +222,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.organizations.sso_configurations.with_streaming_response.delete( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -240,11 +240,11 @@ class TestAsyncSSOConfigurations: @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.create( - client_id="x", - client_secret="x", - email_domain="xxxx", - issuer_url="https://example.com", - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + client_id="012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com", + client_secret="GOCSPX-abcdefghijklmnopqrstuvwxyz123456", + email_domain="acme-corp.com", + issuer_url="https://accounts.google.com", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(SSOConfigurationCreateResponse, sso_configuration, path=["response"]) @@ -252,11 +252,11 @@ async def test_method_create(self, async_client: AsyncGitpod) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.sso_configurations.with_raw_response.create( - client_id="x", - client_secret="x", - email_domain="xxxx", - issuer_url="https://example.com", - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + client_id="012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com", + client_secret="GOCSPX-abcdefghijklmnopqrstuvwxyz123456", + email_domain="acme-corp.com", + issuer_url="https://accounts.google.com", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -268,11 +268,11 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.sso_configurations.with_streaming_response.create( - client_id="x", - client_secret="x", - email_domain="xxxx", - issuer_url="https://example.com", - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + client_id="012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com", + client_secret="GOCSPX-abcdefghijklmnopqrstuvwxyz123456", + email_domain="acme-corp.com", + issuer_url="https://accounts.google.com", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -286,7 +286,7 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.retrieve( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(SSOConfigurationRetrieveResponse, sso_configuration, path=["response"]) @@ -294,7 +294,7 @@ async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.sso_configurations.with_raw_response.retrieve( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert response.is_closed is True @@ -306,7 +306,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.sso_configurations.with_streaming_response.retrieve( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -320,7 +320,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N @parametrize async def test_method_update(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.update( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, sso_configuration, path=["response"]) @@ -328,10 +328,10 @@ async def test_method_update(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.update( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", claims={"foo": "string"}, - client_id="x", - client_secret="x", + client_id="new-client-id", + client_secret="new-client-secret", email_domain="xxxx", issuer_url="https://example.com", state="SSO_CONFIGURATION_STATE_UNSPECIFIED", @@ -342,7 +342,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> @parametrize async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.sso_configurations.with_raw_response.update( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert response.is_closed is True @@ -354,7 +354,7 @@ async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.sso_configurations.with_streaming_response.update( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -368,7 +368,7 @@ async def test_streaming_response_update(self, async_client: AsyncGitpod) -> Non @parametrize async def test_method_list(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.list( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(AsyncSSOConfigurationsPage[SSOConfiguration], sso_configuration, path=["response"]) @@ -376,12 +376,12 @@ async def test_method_list(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.list( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", token="token", page_size=0, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(AsyncSSOConfigurationsPage[SSOConfiguration], sso_configuration, path=["response"]) @@ -390,7 +390,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N @parametrize async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.sso_configurations.with_raw_response.list( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -402,7 +402,7 @@ async def test_raw_response_list(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.sso_configurations.with_streaming_response.list( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -416,7 +416,7 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: sso_configuration = await async_client.organizations.sso_configurations.delete( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert_matches_type(object, sso_configuration, path=["response"]) @@ -424,7 +424,7 @@ async def test_method_delete(self, async_client: AsyncGitpod) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.sso_configurations.with_raw_response.delete( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) assert response.is_closed is True @@ -436,7 +436,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.sso_configurations.with_streaming_response.delete( - sso_configuration_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_organizations.py b/tests/api_resources/test_organizations.py index d869861..62a5503 100644 --- a/tests/api_resources/test_organizations.py +++ b/tests/api_resources/test_organizations.py @@ -29,7 +29,7 @@ class TestOrganizations: @parametrize def test_method_create(self, client: Gitpod) -> None: organization = client.organizations.create( - name="xxx", + name="Acme Corp Engineering", ) assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) @@ -37,7 +37,7 @@ def test_method_create(self, client: Gitpod) -> None: @parametrize def test_method_create_with_all_params(self, client: Gitpod) -> None: organization = client.organizations.create( - name="xxx", + name="Acme Corp Engineering", invite_accounts_with_matching_domain=True, join_organization=True, ) @@ -47,7 +47,7 @@ def test_method_create_with_all_params(self, client: Gitpod) -> None: @parametrize def test_raw_response_create(self, client: Gitpod) -> None: response = client.organizations.with_raw_response.create( - name="xxx", + name="Acme Corp Engineering", ) assert response.is_closed is True @@ -59,7 +59,7 @@ def test_raw_response_create(self, client: Gitpod) -> None: @parametrize def test_streaming_response_create(self, client: Gitpod) -> None: with client.organizations.with_streaming_response.create( - name="xxx", + name="Acme Corp Engineering", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -73,7 +73,7 @@ def test_streaming_response_create(self, client: Gitpod) -> None: @parametrize def test_method_retrieve(self, client: Gitpod) -> None: organization = client.organizations.retrieve( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(OrganizationRetrieveResponse, organization, path=["response"]) @@ -81,7 +81,7 @@ def test_method_retrieve(self, client: Gitpod) -> None: @parametrize def test_raw_response_retrieve(self, client: Gitpod) -> None: response = client.organizations.with_raw_response.retrieve( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -93,7 +93,7 @@ def test_raw_response_retrieve(self, client: Gitpod) -> None: @parametrize def test_streaming_response_retrieve(self, client: Gitpod) -> None: with client.organizations.with_streaming_response.retrieve( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -107,7 +107,7 @@ def test_streaming_response_retrieve(self, client: Gitpod) -> None: @parametrize def test_method_update(self, client: Gitpod) -> None: organization = client.organizations.update( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) @@ -115,7 +115,7 @@ def test_method_update(self, client: Gitpod) -> None: @parametrize def test_method_update_with_all_params(self, client: Gitpod) -> None: organization = client.organizations.update( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", invite_domains={"domains": ["sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB"]}, name="name", ) @@ -125,7 +125,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None: @parametrize def test_raw_response_update(self, client: Gitpod) -> None: response = client.organizations.with_raw_response.update( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -137,7 +137,7 @@ def test_raw_response_update(self, client: Gitpod) -> None: @parametrize def test_streaming_response_update(self, client: Gitpod) -> None: with client.organizations.with_streaming_response.update( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -161,7 +161,7 @@ def test_method_list_with_all_params(self, client: Gitpod) -> None: page_size=0, pagination={ "token": "token", - "page_size": 100, + "page_size": 50, }, scope="SCOPE_UNSPECIFIED", ) @@ -193,7 +193,7 @@ def test_streaming_response_list(self, client: Gitpod) -> None: @parametrize def test_method_delete(self, client: Gitpod) -> None: organization = client.organizations.delete( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(object, organization, path=["response"]) @@ -201,7 +201,7 @@ def test_method_delete(self, client: Gitpod) -> None: @parametrize def test_raw_response_delete(self, client: Gitpod) -> None: response = client.organizations.with_raw_response.delete( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -213,7 +213,7 @@ def test_raw_response_delete(self, client: Gitpod) -> None: @parametrize def test_streaming_response_delete(self, client: Gitpod) -> None: with client.organizations.with_streaming_response.delete( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -233,7 +233,7 @@ def test_method_join(self, client: Gitpod) -> None: @parametrize def test_method_join_with_all_params(self, client: Gitpod) -> None: organization = client.organizations.join( - invite_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + invite_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) assert_matches_type(OrganizationJoinResponse, organization, path=["response"]) @@ -264,7 +264,7 @@ def test_streaming_response_join(self, client: Gitpod) -> None: @parametrize def test_method_leave(self, client: Gitpod) -> None: organization = client.organizations.leave( - user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) assert_matches_type(object, organization, path=["response"]) @@ -272,7 +272,7 @@ def test_method_leave(self, client: Gitpod) -> None: @parametrize def test_raw_response_leave(self, client: Gitpod) -> None: response = client.organizations.with_raw_response.leave( - user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) assert response.is_closed is True @@ -284,7 +284,7 @@ def test_raw_response_leave(self, client: Gitpod) -> None: @parametrize def test_streaming_response_leave(self, client: Gitpod) -> None: with client.organizations.with_streaming_response.leave( - user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -298,7 +298,7 @@ def test_streaming_response_leave(self, client: Gitpod) -> None: @parametrize def test_method_list_members(self, client: Gitpod) -> None: organization = client.organizations.list_members( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(SyncMembersPage[OrganizationMember], organization, path=["response"]) @@ -306,12 +306,12 @@ def test_method_list_members(self, client: Gitpod) -> None: @parametrize def test_method_list_members_with_all_params(self, client: Gitpod) -> None: organization = client.organizations.list_members( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", token="token", page_size=0, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(SyncMembersPage[OrganizationMember], organization, path=["response"]) @@ -320,7 +320,7 @@ def test_method_list_members_with_all_params(self, client: Gitpod) -> None: @parametrize def test_raw_response_list_members(self, client: Gitpod) -> None: response = client.organizations.with_raw_response.list_members( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -332,7 +332,7 @@ def test_raw_response_list_members(self, client: Gitpod) -> None: @parametrize def test_streaming_response_list_members(self, client: Gitpod) -> None: with client.organizations.with_streaming_response.list_members( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -346,8 +346,8 @@ def test_streaming_response_list_members(self, client: Gitpod) -> None: @parametrize def test_method_set_role(self, client: Gitpod) -> None: organization = client.organizations.set_role( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) assert_matches_type(object, organization, path=["response"]) @@ -355,8 +355,8 @@ def test_method_set_role(self, client: Gitpod) -> None: @parametrize def test_method_set_role_with_all_params(self, client: Gitpod) -> None: organization = client.organizations.set_role( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", role="ORGANIZATION_ROLE_UNSPECIFIED", ) assert_matches_type(object, organization, path=["response"]) @@ -365,8 +365,8 @@ def test_method_set_role_with_all_params(self, client: Gitpod) -> None: @parametrize def test_raw_response_set_role(self, client: Gitpod) -> None: response = client.organizations.with_raw_response.set_role( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) assert response.is_closed is True @@ -378,8 +378,8 @@ def test_raw_response_set_role(self, client: Gitpod) -> None: @parametrize def test_streaming_response_set_role(self, client: Gitpod) -> None: with client.organizations.with_streaming_response.set_role( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -397,7 +397,7 @@ class TestAsyncOrganizations: @parametrize async def test_method_create(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.create( - name="xxx", + name="Acme Corp Engineering", ) assert_matches_type(OrganizationCreateResponse, organization, path=["response"]) @@ -405,7 +405,7 @@ async def test_method_create(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.create( - name="xxx", + name="Acme Corp Engineering", invite_accounts_with_matching_domain=True, join_organization=True, ) @@ -415,7 +415,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGitpod) -> @parametrize async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.with_raw_response.create( - name="xxx", + name="Acme Corp Engineering", ) assert response.is_closed is True @@ -427,7 +427,7 @@ async def test_raw_response_create(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.with_streaming_response.create( - name="xxx", + name="Acme Corp Engineering", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -441,7 +441,7 @@ async def test_streaming_response_create(self, async_client: AsyncGitpod) -> Non @parametrize async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.retrieve( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(OrganizationRetrieveResponse, organization, path=["response"]) @@ -449,7 +449,7 @@ async def test_method_retrieve(self, async_client: AsyncGitpod) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.with_raw_response.retrieve( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -461,7 +461,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.with_streaming_response.retrieve( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -475,7 +475,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncGitpod) -> N @parametrize async def test_method_update(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.update( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(OrganizationUpdateResponse, organization, path=["response"]) @@ -483,7 +483,7 @@ async def test_method_update(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.update( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", invite_domains={"domains": ["sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB"]}, name="name", ) @@ -493,7 +493,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) -> @parametrize async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.with_raw_response.update( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -505,7 +505,7 @@ async def test_raw_response_update(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.with_streaming_response.update( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -529,7 +529,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGitpod) -> N page_size=0, pagination={ "token": "token", - "page_size": 100, + "page_size": 50, }, scope="SCOPE_UNSPECIFIED", ) @@ -561,7 +561,7 @@ async def test_streaming_response_list(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_delete(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.delete( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(object, organization, path=["response"]) @@ -569,7 +569,7 @@ async def test_method_delete(self, async_client: AsyncGitpod) -> None: @parametrize async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.with_raw_response.delete( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -581,7 +581,7 @@ async def test_raw_response_delete(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.with_streaming_response.delete( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -601,7 +601,7 @@ async def test_method_join(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_join_with_all_params(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.join( - invite_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + invite_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) assert_matches_type(OrganizationJoinResponse, organization, path=["response"]) @@ -632,7 +632,7 @@ async def test_streaming_response_join(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_leave(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.leave( - user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) assert_matches_type(object, organization, path=["response"]) @@ -640,7 +640,7 @@ async def test_method_leave(self, async_client: AsyncGitpod) -> None: @parametrize async def test_raw_response_leave(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.with_raw_response.leave( - user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) assert response.is_closed is True @@ -652,7 +652,7 @@ async def test_raw_response_leave(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_leave(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.with_streaming_response.leave( - user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -666,7 +666,7 @@ async def test_streaming_response_leave(self, async_client: AsyncGitpod) -> None @parametrize async def test_method_list_members(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.list_members( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert_matches_type(AsyncMembersPage[OrganizationMember], organization, path=["response"]) @@ -674,12 +674,12 @@ async def test_method_list_members(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_list_members_with_all_params(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.list_members( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", token="token", page_size=0, pagination={ "token": "token", - "page_size": 100, + "page_size": 20, }, ) assert_matches_type(AsyncMembersPage[OrganizationMember], organization, path=["response"]) @@ -688,7 +688,7 @@ async def test_method_list_members_with_all_params(self, async_client: AsyncGitp @parametrize async def test_raw_response_list_members(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.with_raw_response.list_members( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) assert response.is_closed is True @@ -700,7 +700,7 @@ async def test_raw_response_list_members(self, async_client: AsyncGitpod) -> Non @parametrize async def test_streaming_response_list_members(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.with_streaming_response.list_members( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -714,8 +714,8 @@ async def test_streaming_response_list_members(self, async_client: AsyncGitpod) @parametrize async def test_method_set_role(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.set_role( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) assert_matches_type(object, organization, path=["response"]) @@ -723,8 +723,8 @@ async def test_method_set_role(self, async_client: AsyncGitpod) -> None: @parametrize async def test_method_set_role_with_all_params(self, async_client: AsyncGitpod) -> None: organization = await async_client.organizations.set_role( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", role="ORGANIZATION_ROLE_UNSPECIFIED", ) assert_matches_type(object, organization, path=["response"]) @@ -733,8 +733,8 @@ async def test_method_set_role_with_all_params(self, async_client: AsyncGitpod) @parametrize async def test_raw_response_set_role(self, async_client: AsyncGitpod) -> None: response = await async_client.organizations.with_raw_response.set_role( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) assert response.is_closed is True @@ -746,8 +746,8 @@ async def test_raw_response_set_role(self, async_client: AsyncGitpod) -> None: @parametrize async def test_streaming_response_set_role(self, async_client: AsyncGitpod) -> None: async with async_client.organizations.with_streaming_response.set_role( - organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", - user_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", + organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", + user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python"