From a86b857253c587870476ae57cacf3e17738d9e99 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Thu, 9 Oct 2025 14:47:30 +0000 Subject: [PATCH] feat: update generated APIs --- .../iam/src/v1alpha1/api.gen.ts | 28 ++++++++++++- .../iam/src/v1alpha1/index.gen.ts | 1 + .../iam/src/v1alpha1/marshalling.gen.ts | 6 ++- .../iam/src/v1alpha1/types.gen.ts | 39 +++++++++++++++++++ 4 files changed, 71 insertions(+), 3 deletions(-) diff --git a/packages_generated/iam/src/v1alpha1/api.gen.ts b/packages_generated/iam/src/v1alpha1/api.gen.ts index 7ad301374..3be7ddb72 100644 --- a/packages_generated/iam/src/v1alpha1/api.gen.ts +++ b/packages_generated/iam/src/v1alpha1/api.gen.ts @@ -67,7 +67,7 @@ import { unmarshalSSHKey, unmarshalUser, unmarshalValidateUserMFAOTPResponse, -} from './marshalling.gen' +} from './marshalling.gen.js' import type { AddGroupMemberRequest, AddGroupMembersRequest, @@ -161,6 +161,7 @@ import type { UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, + UpdateOrganizationLoginMethodsRequest, UpdateOrganizationSecuritySettingsRequest, UpdatePolicyRequest, UpdateSamlRequest, @@ -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', @@ -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 = {}, + ) => + this.client.fetch( + { + 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. * diff --git a/packages_generated/iam/src/v1alpha1/index.gen.ts b/packages_generated/iam/src/v1alpha1/index.gen.ts index 8022dc2da..20a11431a 100644 --- a/packages_generated/iam/src/v1alpha1/index.gen.ts +++ b/packages_generated/iam/src/v1alpha1/index.gen.ts @@ -124,6 +124,7 @@ export type { UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, + UpdateOrganizationLoginMethodsRequest, UpdateOrganizationSecuritySettingsRequest, UpdatePolicyRequest, UpdateSamlRequest, diff --git a/packages_generated/iam/src/v1alpha1/marshalling.gen.ts b/packages_generated/iam/src/v1alpha1/marshalling.gen.ts index 1428ded0f..78b4c981b 100644 --- a/packages_generated/iam/src/v1alpha1/marshalling.gen.ts +++ b/packages_generated/iam/src/v1alpha1/marshalling.gen.ts @@ -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)) { @@ -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 } diff --git a/packages_generated/iam/src/v1alpha1/types.gen.ts b/packages_generated/iam/src/v1alpha1/types.gen.ts index 1b65e5f2c..832e019eb 100644 --- a/packages_generated/iam/src/v1alpha1/types.gen.ts +++ b/packages_generated/iam/src/v1alpha1/types.gen.ts @@ -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 { @@ -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.