From e99bcb564be3f9ec9ead3215186fd07d675041a0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 09:44:54 +0000 Subject: [PATCH] feat(api): Organizations Open API docs --- .stats.yml | 2 +- .../organizations/domain-verifications.ts | 115 ++++++++- src/resources/organizations/invites.ts | 41 ++- src/resources/organizations/organizations.ts | 241 +++++++++++++++++- .../organizations/sso-configurations.ts | 134 +++++++++- .../domain-verifications.test.ts | 26 +- .../organizations/invites.test.ts | 8 +- .../organizations/organizations.test.ts | 34 +-- .../organizations/sso-configurations.test.ts | 42 +-- 9 files changed, 563 insertions(+), 80 deletions(-) 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/src/resources/organizations/domain-verifications.ts b/src/resources/organizations/domain-verifications.ts index 08c5798..3f6428a 100644 --- a/src/resources/organizations/domain-verifications.ts +++ b/src/resources/organizations/domain-verifications.ts @@ -7,7 +7,34 @@ import { RequestOptions } from '../../internal/request-options'; export class DomainVerifications extends APIResource { /** - * 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" + * ``` */ create( body: DomainVerificationCreateParams, @@ -17,7 +44,23 @@ export class DomainVerifications extends APIResource { } /** - * 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" + * ``` */ retrieve( body: DomainVerificationRetrieveParams, @@ -27,7 +70,37 @@ export class DomainVerifications extends APIResource { } /** - * 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" + * ``` */ list( params: DomainVerificationListParams, @@ -42,14 +115,46 @@ export class DomainVerifications extends APIResource { } /** - * 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" + * ``` */ delete(body: DomainVerificationDeleteParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/DeleteDomainVerification', { body, ...options }); } /** - * 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" + * ``` */ verify( body: DomainVerificationVerifyParams, diff --git a/src/resources/organizations/invites.ts b/src/resources/organizations/invites.ts index 60f2d63..b8f3540 100644 --- a/src/resources/organizations/invites.ts +++ b/src/resources/organizations/invites.ts @@ -6,24 +6,55 @@ import { RequestOptions } from '../../internal/request-options'; export class Invites extends APIResource { /** - * CreateOrganizationInvite creates an invite for the organization. Any existing + * 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" + * ``` */ create(body: InviteCreateParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/CreateOrganizationInvite', { body, ...options }); } /** - * GetOrganizationInvite retrieves invite for the organization. If no invite - * exists, a new one is created. + * GetOrganizationInvite */ retrieve(body: InviteRetrieveParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/GetOrganizationInvite', { body, ...options }); } /** - * 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" + * ``` */ getSummary(body: InviteGetSummaryParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/GetOrganizationInviteSummary', { diff --git a/src/resources/organizations/organizations.ts b/src/resources/organizations/organizations.ts index ee9f2b5..bdba148 100644 --- a/src/resources/organizations/organizations.ts +++ b/src/resources/organizations/organizations.ts @@ -65,14 +65,58 @@ export class Organizations extends APIResource { ); /** - * 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 + * ``` */ create(body: OrganizationCreateParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/CreateOrganization', { body, ...options }); } /** - * 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" + * ``` */ retrieve( body: OrganizationRetrieveParams, @@ -82,14 +126,75 @@ export class Organizations extends APIResource { } /** - * 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: [] + * ``` */ update(body: OrganizationUpdateParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/UpdateOrganization', { body, ...options }); } /** - * 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 + * ``` */ list( params: OrganizationListParams, @@ -104,28 +209,117 @@ export class Organizations extends APIResource { } /** - * 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" + * ``` */ delete(body: OrganizationDeleteParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/DeleteOrganization', { body, ...options }); } /** - * 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" + * ``` */ join(body: OrganizationJoinParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/JoinOrganization', { body, ...options }); } /** - * 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. */ leave(body: OrganizationLeaveParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/LeaveOrganization', { body, ...options }); } /** - * 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" + * ``` */ listMembers( params: OrganizationListMembersParams, @@ -140,7 +334,36 @@ export class Organizations extends APIResource { } /** - * 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 + * ``` */ setRole(body: OrganizationSetRoleParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/SetRole', { body, ...options }); diff --git a/src/resources/organizations/sso-configurations.ts b/src/resources/organizations/sso-configurations.ts index 588e09c..83e5205 100644 --- a/src/resources/organizations/sso-configurations.ts +++ b/src/resources/organizations/sso-configurations.ts @@ -7,7 +7,40 @@ import { RequestOptions } from '../../internal/request-options'; export class SSOConfigurations extends APIResource { /** - * 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" + * ``` */ create( body: SSOConfigurationCreateParams, @@ -17,7 +50,23 @@ export class SSOConfigurations extends APIResource { } /** - * 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" + * ``` */ retrieve( body: SSOConfigurationRetrieveParams, @@ -27,14 +76,73 @@ export class SSOConfigurations extends APIResource { } /** - * 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 + * ``` */ update(body: SSOConfigurationUpdateParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/UpdateSSOConfiguration', { body, ...options }); } /** - * 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" + * ``` */ list( params: SSOConfigurationListParams, @@ -49,7 +157,23 @@ export class SSOConfigurations extends APIResource { } /** - * 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" + * ``` */ delete(body: SSOConfigurationDeleteParams, options?: RequestOptions): APIPromise { return this._client.post('/gitpod.v1.OrganizationService/DeleteSSOConfiguration', { body, ...options }); diff --git a/tests/api-resources/organizations/domain-verifications.test.ts b/tests/api-resources/organizations/domain-verifications.test.ts index 3c66d36..aa5b7e4 100644 --- a/tests/api-resources/organizations/domain-verifications.test.ts +++ b/tests/api-resources/organizations/domain-verifications.test.ts @@ -11,8 +11,8 @@ describe('resource domainVerifications', () => { // skipped: tests are disabled for the time being test.skip('create: only required params', async () => { const responsePromise = client.organizations.domainVerifications.create({ - domain: 'xxxx', - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + domain: 'acme-corp.com', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -26,15 +26,15 @@ describe('resource domainVerifications', () => { // skipped: tests are disabled for the time being test.skip('create: required and optional params', async () => { const response = await client.organizations.domainVerifications.create({ - domain: 'xxxx', - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + domain: 'acme-corp.com', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', }); }); // skipped: tests are disabled for the time being test.skip('retrieve: only required params', async () => { const responsePromise = client.organizations.domainVerifications.retrieve({ - domainVerificationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -48,14 +48,14 @@ describe('resource domainVerifications', () => { // skipped: tests are disabled for the time being test.skip('retrieve: required and optional params', async () => { const response = await client.organizations.domainVerifications.retrieve({ - domainVerificationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', }); }); // skipped: tests are disabled for the time being test.skip('list: only required params', async () => { const responsePromise = client.organizations.domainVerifications.list({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -69,17 +69,17 @@ describe('resource domainVerifications', () => { // skipped: tests are disabled for the time being test.skip('list: required and optional params', async () => { const response = await client.organizations.domainVerifications.list({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', token: 'token', pageSize: 0, - pagination: { token: 'token', pageSize: 100 }, + pagination: { token: 'token', pageSize: 20 }, }); }); // skipped: tests are disabled for the time being test.skip('delete: only required params', async () => { const responsePromise = client.organizations.domainVerifications.delete({ - domainVerificationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -93,14 +93,14 @@ describe('resource domainVerifications', () => { // skipped: tests are disabled for the time being test.skip('delete: required and optional params', async () => { const response = await client.organizations.domainVerifications.delete({ - domainVerificationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', }); }); // skipped: tests are disabled for the time being test.skip('verify: only required params', async () => { const responsePromise = client.organizations.domainVerifications.verify({ - domainVerificationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -114,7 +114,7 @@ describe('resource domainVerifications', () => { // skipped: tests are disabled for the time being test.skip('verify: required and optional params', async () => { const response = await client.organizations.domainVerifications.verify({ - domainVerificationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + domainVerificationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', }); }); }); diff --git a/tests/api-resources/organizations/invites.test.ts b/tests/api-resources/organizations/invites.test.ts index 381656c..8d2dbb3 100644 --- a/tests/api-resources/organizations/invites.test.ts +++ b/tests/api-resources/organizations/invites.test.ts @@ -11,7 +11,7 @@ describe('resource invites', () => { // skipped: tests are disabled for the time being test.skip('create: only required params', async () => { const responsePromise = client.organizations.invites.create({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -25,7 +25,7 @@ describe('resource invites', () => { // skipped: tests are disabled for the time being test.skip('create: required and optional params', async () => { const response = await client.organizations.invites.create({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', }); }); @@ -53,7 +53,7 @@ describe('resource invites', () => { // skipped: tests are disabled for the time being test.skip('getSummary: only required params', async () => { const responsePromise = client.organizations.invites.getSummary({ - inviteId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + inviteId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -67,7 +67,7 @@ describe('resource invites', () => { // skipped: tests are disabled for the time being test.skip('getSummary: required and optional params', async () => { const response = await client.organizations.invites.getSummary({ - inviteId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + inviteId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', }); }); }); diff --git a/tests/api-resources/organizations/organizations.test.ts b/tests/api-resources/organizations/organizations.test.ts index db75850..f88e6bd 100644 --- a/tests/api-resources/organizations/organizations.test.ts +++ b/tests/api-resources/organizations/organizations.test.ts @@ -10,7 +10,7 @@ const client = new Gitpod({ describe('resource organizations', () => { // skipped: tests are disabled for the time being test.skip('create: only required params', async () => { - const responsePromise = client.organizations.create({ name: 'xxx' }); + const responsePromise = client.organizations.create({ name: 'Acme Corp Engineering' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -23,7 +23,7 @@ describe('resource organizations', () => { // skipped: tests are disabled for the time being test.skip('create: required and optional params', async () => { const response = await client.organizations.create({ - name: 'xxx', + name: 'Acme Corp Engineering', inviteAccountsWithMatchingDomain: true, joinOrganization: true, }); @@ -32,7 +32,7 @@ describe('resource organizations', () => { // skipped: tests are disabled for the time being test.skip('retrieve: only required params', async () => { const responsePromise = client.organizations.retrieve({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -46,14 +46,14 @@ describe('resource organizations', () => { // skipped: tests are disabled for the time being test.skip('retrieve: required and optional params', async () => { const response = await client.organizations.retrieve({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', }); }); // skipped: tests are disabled for the time being test.skip('update: only required params', async () => { const responsePromise = client.organizations.update({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -67,7 +67,7 @@ describe('resource organizations', () => { // skipped: tests are disabled for the time being test.skip('update: required and optional params', async () => { const response = await client.organizations.update({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', inviteDomains: { domains: ['sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB'] }, name: 'name', }); @@ -88,7 +88,7 @@ describe('resource organizations', () => { // skipped: tests are disabled for the time being test.skip('delete: only required params', async () => { const responsePromise = client.organizations.delete({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -102,7 +102,7 @@ describe('resource organizations', () => { // skipped: tests are disabled for the time being test.skip('delete: required and optional params', async () => { const response = await client.organizations.delete({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', }); }); @@ -120,7 +120,7 @@ describe('resource organizations', () => { // skipped: tests are disabled for the time being test.skip('leave: only required params', async () => { - const responsePromise = client.organizations.leave({ userId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }); + const responsePromise = client.organizations.leave({ userId: 'f53d2330-3795-4c5d-a1f3-453121af9c60' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -132,13 +132,13 @@ describe('resource organizations', () => { // skipped: tests are disabled for the time being test.skip('leave: required and optional params', async () => { - const response = await client.organizations.leave({ userId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }); + const response = await client.organizations.leave({ userId: 'f53d2330-3795-4c5d-a1f3-453121af9c60' }); }); // skipped: tests are disabled for the time being test.skip('listMembers: only required params', async () => { const responsePromise = client.organizations.listMembers({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -152,18 +152,18 @@ describe('resource organizations', () => { // skipped: tests are disabled for the time being test.skip('listMembers: required and optional params', async () => { const response = await client.organizations.listMembers({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', token: 'token', pageSize: 0, - pagination: { token: 'token', pageSize: 100 }, + pagination: { token: 'token', pageSize: 20 }, }); }); // skipped: tests are disabled for the time being test.skip('setRole: only required params', async () => { const responsePromise = client.organizations.setRole({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - userId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + userId: 'f53d2330-3795-4c5d-a1f3-453121af9c60', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -177,8 +177,8 @@ describe('resource organizations', () => { // skipped: tests are disabled for the time being test.skip('setRole: required and optional params', async () => { const response = await client.organizations.setRole({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', - userId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', + userId: 'f53d2330-3795-4c5d-a1f3-453121af9c60', role: 'ORGANIZATION_ROLE_UNSPECIFIED', }); }); diff --git a/tests/api-resources/organizations/sso-configurations.test.ts b/tests/api-resources/organizations/sso-configurations.test.ts index 661d6c1..06c24ee 100644 --- a/tests/api-resources/organizations/sso-configurations.test.ts +++ b/tests/api-resources/organizations/sso-configurations.test.ts @@ -11,11 +11,11 @@ describe('resource ssoConfigurations', () => { // skipped: tests are disabled for the time being test.skip('create: only required params', async () => { const responsePromise = client.organizations.ssoConfigurations.create({ - clientId: 'x', - clientSecret: 'x', - emailDomain: 'xxxx', - issuerUrl: 'https://example.com', - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + clientId: '012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com', + clientSecret: 'GOCSPX-abcdefghijklmnopqrstuvwxyz123456', + emailDomain: 'acme-corp.com', + issuerUrl: 'https://accounts.google.com', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -29,18 +29,18 @@ describe('resource ssoConfigurations', () => { // skipped: tests are disabled for the time being test.skip('create: required and optional params', async () => { const response = await client.organizations.ssoConfigurations.create({ - clientId: 'x', - clientSecret: 'x', - emailDomain: 'xxxx', - issuerUrl: 'https://example.com', - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + clientId: '012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com', + clientSecret: 'GOCSPX-abcdefghijklmnopqrstuvwxyz123456', + emailDomain: 'acme-corp.com', + issuerUrl: 'https://accounts.google.com', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', }); }); // skipped: tests are disabled for the time being test.skip('retrieve: only required params', async () => { const responsePromise = client.organizations.ssoConfigurations.retrieve({ - ssoConfigurationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -54,14 +54,14 @@ describe('resource ssoConfigurations', () => { // skipped: tests are disabled for the time being test.skip('retrieve: required and optional params', async () => { const response = await client.organizations.ssoConfigurations.retrieve({ - ssoConfigurationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', }); }); // skipped: tests are disabled for the time being test.skip('update: only required params', async () => { const responsePromise = client.organizations.ssoConfigurations.update({ - ssoConfigurationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -75,10 +75,10 @@ describe('resource ssoConfigurations', () => { // skipped: tests are disabled for the time being test.skip('update: required and optional params', async () => { const response = await client.organizations.ssoConfigurations.update({ - ssoConfigurationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', claims: { foo: 'string' }, - clientId: 'x', - clientSecret: 'x', + clientId: 'new-client-id', + clientSecret: 'new-client-secret', emailDomain: 'xxxx', issuerUrl: 'https://example.com', state: 'SSO_CONFIGURATION_STATE_UNSPECIFIED', @@ -88,7 +88,7 @@ describe('resource ssoConfigurations', () => { // skipped: tests are disabled for the time being test.skip('list: only required params', async () => { const responsePromise = client.organizations.ssoConfigurations.list({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -102,17 +102,17 @@ describe('resource ssoConfigurations', () => { // skipped: tests are disabled for the time being test.skip('list: required and optional params', async () => { const response = await client.organizations.ssoConfigurations.list({ - organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + organizationId: 'b0e12f6c-4c67-429d-a4a6-d9838b5da047', token: 'token', pageSize: 0, - pagination: { token: 'token', pageSize: 100 }, + pagination: { token: 'token', pageSize: 20 }, }); }); // skipped: tests are disabled for the time being test.skip('delete: only required params', async () => { const responsePromise = client.organizations.ssoConfigurations.delete({ - ssoConfigurationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -126,7 +126,7 @@ describe('resource ssoConfigurations', () => { // skipped: tests are disabled for the time being test.skip('delete: required and optional params', async () => { const response = await client.organizations.ssoConfigurations.delete({ - ssoConfigurationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', + ssoConfigurationId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68', }); }); });