@@ -67,7 +67,7 @@ import {
6767 unmarshalSSHKey ,
6868 unmarshalUser ,
6969 unmarshalValidateUserMFAOTPResponse ,
70- } from './marshalling.gen'
70+ } from './marshalling.gen.js '
7171import type {
7272 AddGroupMemberRequest ,
7373 AddGroupMembersRequest ,
@@ -161,6 +161,7 @@ import type {
161161 UpdateAPIKeyRequest ,
162162 UpdateApplicationRequest ,
163163 UpdateGroupRequest ,
164+ UpdateOrganizationLoginMethodsRequest ,
164165 UpdateOrganizationSecuritySettingsRequest ,
165166 UpdatePolicyRequest ,
166167 UpdateSamlRequest ,
@@ -171,7 +172,7 @@ import type {
171172 User ,
172173 ValidateUserMFAOTPRequest ,
173174 ValidateUserMFAOTPResponse ,
174- } from './types.gen'
175+ } from './types.gen.js '
175176
176177const jsonContentHeaders = {
177178 'Content-Type' : 'application/json; charset=utf-8' ,
@@ -1405,6 +1406,29 @@ export class API extends ParentAPI {
14051406 path : `/iam/v1alpha1/organizations/${ validatePathParam ( 'organizationId' , request . organizationId ?? this . client . settings . defaultOrganizationId ) } /migrate-guests` ,
14061407 } )
14071408
1409+ /**
1410+ * Set your Organization's allowed login methods.. Set your Organization's allowed login methods.
1411+ *
1412+ * @param request - The request {@link UpdateOrganizationLoginMethodsRequest}
1413+ * @returns A Promise of Organization
1414+ */
1415+ updateOrganizationLoginMethods = (
1416+ request : Readonly < UpdateOrganizationLoginMethodsRequest > = { } ,
1417+ ) =>
1418+ this . client . fetch < Organization > (
1419+ {
1420+ method : 'PATCH' ,
1421+ path : `/iam/v1alpha1/organizations/${ validatePathParam ( 'organizationId' , request . organizationId ?? this . client . settings . defaultOrganizationId ) } /login-methods` ,
1422+ urlParams : urlParams (
1423+ [ 'login_magic_code_enabled' , request . loginMagicCodeEnabled ] ,
1424+ [ 'login_oauth2_enabled' , request . loginOauth2Enabled ] ,
1425+ [ 'login_password_enabled' , request . loginPasswordEnabled ] ,
1426+ [ 'login_saml_enabled' , request . loginSamlEnabled ] ,
1427+ ) ,
1428+ } ,
1429+ unmarshalOrganization ,
1430+ )
1431+
14081432 /**
14091433 * Get SAML Identity Provider configuration of an Organization.
14101434 *
0 commit comments