Skip to content

Commit 08c24a6

Browse files
fix(iam/v1alpha1): set UpdateOrganizationLoginMethods body (#2508)
Co-authored-by: Jonathan R. <jremy@scaleway.com>
1 parent ef40081 commit 08c24a6

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

packages_generated/iam/src/v1alpha1/api.gen.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import {
2727
marshalUpdateAPIKeyRequest,
2828
marshalUpdateApplicationRequest,
2929
marshalUpdateGroupRequest,
30+
marshalUpdateOrganizationLoginMethodsRequest,
3031
marshalUpdateOrganizationSecuritySettingsRequest,
3132
marshalUpdatePolicyRequest,
3233
marshalUpdateSamlRequest,
@@ -1403,14 +1404,15 @@ export class API extends ParentAPI {
14031404
) =>
14041405
this.client.fetch<Organization>(
14051406
{
1407+
body: JSON.stringify(
1408+
marshalUpdateOrganizationLoginMethodsRequest(
1409+
request,
1410+
this.client.settings,
1411+
),
1412+
),
1413+
headers: jsonContentHeaders,
14061414
method: 'PATCH',
14071415
path: `/iam/v1alpha1/organizations/${validatePathParam('organizationId', request.organizationId ?? this.client.settings.defaultOrganizationId)}/login-methods`,
1408-
urlParams: urlParams(
1409-
['login_magic_code_enabled', request.loginMagicCodeEnabled],
1410-
['login_oauth2_enabled', request.loginOauth2Enabled],
1411-
['login_password_enabled', request.loginPasswordEnabled],
1412-
['login_saml_enabled', request.loginSamlEnabled],
1413-
),
14141416
},
14151417
unmarshalOrganization,
14161418
)

packages_generated/iam/src/v1alpha1/marshalling.gen.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ import type {
6868
UpdateAPIKeyRequest,
6969
UpdateApplicationRequest,
7070
UpdateGroupRequest,
71+
UpdateOrganizationLoginMethodsRequest,
7172
UpdateOrganizationSecuritySettingsRequest,
7273
UpdatePolicyRequest,
7374
UpdateSamlRequest,
@@ -973,6 +974,16 @@ export const marshalUpdateGroupRequest = (
973974
tags: request.tags,
974975
})
975976

977+
export const marshalUpdateOrganizationLoginMethodsRequest = (
978+
request: UpdateOrganizationLoginMethodsRequest,
979+
defaults: DefaultValues,
980+
): Record<string, unknown> => ({
981+
login_magic_code_enabled: request.loginMagicCodeEnabled,
982+
login_oauth2_enabled: request.loginOauth2Enabled,
983+
login_password_enabled: request.loginPasswordEnabled,
984+
login_saml_enabled: request.loginSamlEnabled,
985+
})
986+
976987
export const marshalUpdateOrganizationSecuritySettingsRequest = (
977988
request: UpdateOrganizationSecuritySettingsRequest,
978989
defaults: DefaultValues,

0 commit comments

Comments
 (0)