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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions packages_generated/iam/src/v1alpha1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ import {
unmarshalSSHKey,
unmarshalUser,
unmarshalValidateUserMFAOTPResponse,
} from './marshalling.gen'
} from './marshalling.gen.js'
import type {
AddGroupMemberRequest,
AddGroupMembersRequest,
Expand Down Expand Up @@ -161,6 +161,7 @@ import type {
UpdateAPIKeyRequest,
UpdateApplicationRequest,
UpdateGroupRequest,
UpdateOrganizationLoginMethodsRequest,
UpdateOrganizationSecuritySettingsRequest,
UpdatePolicyRequest,
UpdateSamlRequest,
Expand All @@ -171,7 +172,7 @@ import type {
User,
ValidateUserMFAOTPRequest,
ValidateUserMFAOTPResponse,
} from './types.gen'
} from './types.gen.js'

const jsonContentHeaders = {
'Content-Type': 'application/json; charset=utf-8',
Expand Down Expand Up @@ -1405,6 +1406,29 @@ export class API extends ParentAPI {
path: `/iam/v1alpha1/organizations/${validatePathParam('organizationId', request.organizationId ?? this.client.settings.defaultOrganizationId)}/migrate-guests`,
})

/**
* Set your Organization's allowed login methods.. Set your Organization's allowed login methods.
*
* @param request - The request {@link UpdateOrganizationLoginMethodsRequest}
* @returns A Promise of Organization
*/
updateOrganizationLoginMethods = (
request: Readonly<UpdateOrganizationLoginMethodsRequest> = {},
) =>
this.client.fetch<Organization>(
{
method: 'PATCH',
path: `/iam/v1alpha1/organizations/${validatePathParam('organizationId', request.organizationId ?? this.client.settings.defaultOrganizationId)}/login-methods`,
urlParams: urlParams(
['login_magic_code_enabled', request.loginMagicCodeEnabled],
['login_oauth2_enabled', request.loginOauth2Enabled],
['login_password_enabled', request.loginPasswordEnabled],
['login_saml_enabled', request.loginSamlEnabled],
),
},
unmarshalOrganization,
)

/**
* Get SAML Identity Provider configuration of an Organization.
*
Expand Down
1 change: 1 addition & 0 deletions packages_generated/iam/src/v1alpha1/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export type {
UpdateAPIKeyRequest,
UpdateApplicationRequest,
UpdateGroupRequest,
UpdateOrganizationLoginMethodsRequest,
UpdateOrganizationSecuritySettingsRequest,
UpdatePolicyRequest,
UpdateSamlRequest,
Expand Down
6 changes: 5 additions & 1 deletion packages_generated/iam/src/v1alpha1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ import type {
User,
ValidateUserMFAOTPRequest,
ValidateUserMFAOTPResponse,
} from './types.gen'
} from './types.gen.js'

export const unmarshalJWT = (data: unknown): JWT => {
if (!isJSONObject(data)) {
Expand Down Expand Up @@ -677,6 +677,10 @@ export const unmarshalOrganization = (data: unknown): Organization => {
return {
alias: data.alias,
id: data.id,
loginMagicCodeEnabled: data.login_magic_code_enabled,
loginOauth2Enabled: data.login_oauth2_enabled,
loginPasswordEnabled: data.login_password_enabled,
loginSamlEnabled: data.login_saml_enabled,
name: data.name,
} as Organization
}
Expand Down
39 changes: 39 additions & 0 deletions packages_generated/iam/src/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1784,6 +1784,22 @@ export interface Organization {
* Alias of the Organization.
*/
alias: string
/**
* Defines whether login with a password is enabled for the Organization.
*/
loginPasswordEnabled: boolean
/**
* Defines whether login with an authentication code is enabled for the Organization.
*/
loginMagicCodeEnabled: boolean
/**
* Defines whether login through OAuth2 is enabled for the Organization.
*/
loginOauth2Enabled: boolean
/**
* Defines whether login through SAML is enabled for the Organization.
*/
loginSamlEnabled: boolean
}

export interface OrganizationSecuritySettings {
Expand Down Expand Up @@ -1953,6 +1969,29 @@ export type UpdateGroupRequest = {
tags?: string[]
}

export type UpdateOrganizationLoginMethodsRequest = {
/**
* ID of the Organization.
*/
organizationId?: string
/**
* Defines whether login with a password is enabled for the Organization.
*/
loginPasswordEnabled?: boolean
/**
* Defines whether login through OAuth2 is enabled for the Organization.
*/
loginOauth2Enabled?: boolean
/**
* Defines whether login with an authentication code is enabled for the Organization.
*/
loginMagicCodeEnabled?: boolean
/**
* Defines whether login through SAML is enabled for the Organization.
*/
loginSamlEnabled?: boolean
}

export type UpdateOrganizationSecuritySettingsRequest = {
/**
* ID of the Organization.
Expand Down
Loading