Skip to content

Commit 24dd050

Browse files
authored
Merge branch 'main' into v1.7131.0
2 parents 5a5fbf7 + 518cecd commit 24dd050

File tree

11 files changed

+110
-15
lines changed

11 files changed

+110
-15
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import type {
2121
EventPrincipal,
2222
ExportJob,
2323
ExportJobS3,
24+
ExportJobStatus,
2425
InstanceServerInfo,
2526
IpamIpInfo,
2627
KeyManagerKeyInfo,
@@ -64,6 +65,19 @@ const unmarshalExportJobS3 = (data: unknown): ExportJobS3 => {
6465
} as ExportJobS3
6566
}
6667

68+
const unmarshalExportJobStatus = (data: unknown): ExportJobStatus => {
69+
if (!isJSONObject(data)) {
70+
throw new TypeError(
71+
`Unmarshalling the type 'ExportJobStatus' failed as data isn't a dictionary.`,
72+
)
73+
}
74+
75+
return {
76+
code: data.code,
77+
message: data.message,
78+
} as ExportJobStatus
79+
}
80+
6781
export const unmarshalExportJob = (data: unknown): ExportJob => {
6882
if (!isJSONObject(data)) {
6983
throw new TypeError(
@@ -75,6 +89,9 @@ export const unmarshalExportJob = (data: unknown): ExportJob => {
7589
createdAt: unmarshalDate(data.created_at),
7690
id: data.id,
7791
lastRunAt: unmarshalDate(data.last_run_at),
92+
lastStatus: data.last_status
93+
? unmarshalExportJobStatus(data.last_status)
94+
: undefined,
7895
name: data.name,
7996
organizationId: data.organization_id,
8097
s3: data.s3 ? unmarshalExportJobS3(data.s3) : undefined,

packages_generated/audit_trail/src/v1alpha1/types.gen.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export type AuthenticationEventOrigin =
2424

2525
export type AuthenticationEventResult = 'unknown_result' | 'success' | 'failure'
2626

27+
export type ExportJobStatusCode = 'unknown_code' | 'success' | 'failure'
28+
2729
export type ListAuthenticationEventsRequestOrderBy =
2830
| 'recorded_at_desc'
2931
| 'recorded_at_asc'
@@ -460,6 +462,11 @@ export interface ExportJobS3 {
460462
projectId?: string
461463
}
462464

465+
export interface ExportJobStatus {
466+
code: ExportJobStatusCode
467+
message?: string
468+
}
469+
463470
export interface ProductService {
464471
name: string
465472
methods: string[]
@@ -493,7 +500,7 @@ export interface ExportJob {
493500
*/
494501
organizationId: string
495502
/**
496-
* Name of the export.
503+
* Name of the export job.
497504
*/
498505
name: string
499506
/**
@@ -507,13 +514,17 @@ export interface ExportJob {
507514
*/
508515
createdAt?: Date
509516
/**
510-
* Last export date.
517+
* Last run of export job.
511518
*/
512519
lastRunAt?: Date
513520
/**
514-
* Tags of the export.
521+
* Tags of the export job.
515522
*/
516523
tags: Record<string, string>
524+
/**
525+
* Status of last export job.
526+
*/
527+
lastStatus?: ExportJobStatus
517528
}
518529

519530
export interface Product {

packages_generated/baremetal/src/v1/api.gen.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
validatePathParam,
1111
waitForResource,
1212
} from '@scaleway/sdk-client'
13-
import { SERVER_TRANSIENT_STATUSES as SERVER_TRANSIENT_STATUSES_BAREMETAL } from './content.gen'
13+
import { SERVER_TRANSIENT_STATUSES as SERVER_TRANSIENT_STATUSES_BAREMETAL } from './content.gen.js'
1414
import {
1515
marshalAddOptionServerRequest,
1616
marshalCreateServerRequest,
@@ -42,7 +42,7 @@ import {
4242
unmarshalServerPrivateNetwork,
4343
unmarshalSetServerPrivateNetworksResponse,
4444
unmarshalSetting,
45-
} from './marshalling.gen'
45+
} from './marshalling.gen.js'
4646
import type {
4747
AddOptionServerRequest,
4848
BMCAccess,
@@ -94,7 +94,7 @@ import type {
9494
UpdateServerRequest,
9595
UpdateSettingRequest,
9696
ValidatePartitioningSchemaRequest,
97-
} from './types.gen'
97+
} from './types.gen.js'
9898

9999
const jsonContentHeaders = {
100100
'Content-Type': 'application/json; charset=utf-8',

packages_generated/baremetal/src/v1/content.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type {
44
ServerInstallStatus,
55
ServerPrivateNetworkStatus,
66
ServerStatus,
7-
} from './types.gen'
7+
} from './types.gen.js'
88

99
/** Lists transient statutes of the enum {@link ServerInstallStatus}. */
1010
export const SERVER_INSTALL_TRANSIENT_STATUSES: ServerInstallStatus[] = [

packages_generated/baremetal/src/v1/marshalling.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ import type {
6565
UpdateServerRequest,
6666
UpdateSettingRequest,
6767
ValidatePartitioningSchemaRequest,
68-
} from './types.gen'
68+
} from './types.gen.js'
6969

7070
const unmarshalSchemaPartition = (data: unknown): SchemaPartition => {
7171
if (!isJSONObject(data)) {

packages_generated/baremetal/src/v3/api.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
unmarshalListServerPrivateNetworksResponse,
1616
unmarshalServerPrivateNetwork,
1717
unmarshalSetServerPrivateNetworksResponse,
18-
} from './marshalling.gen'
18+
} from './marshalling.gen.js'
1919
import type {
2020
ListServerPrivateNetworksResponse,
2121
PrivateNetworkApiAddServerPrivateNetworkRequest,
@@ -24,7 +24,7 @@ import type {
2424
PrivateNetworkApiSetServerPrivateNetworksRequest,
2525
ServerPrivateNetwork,
2626
SetServerPrivateNetworksResponse,
27-
} from './types.gen'
27+
} from './types.gen.js'
2828

2929
const jsonContentHeaders = {
3030
'Content-Type': 'application/json; charset=utf-8',

packages_generated/baremetal/src/v3/content.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file was automatically generated. DO NOT EDIT.
22
// If you have any remark or suggestion do not hesitate to open an issue.
3-
import type { ServerPrivateNetworkStatus } from './types.gen'
3+
import type { ServerPrivateNetworkStatus } from './types.gen.js'
44

55
/** Lists transient statutes of the enum {@link ServerPrivateNetworkStatus}. */
66
export const SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: ServerPrivateNetworkStatus[] =

packages_generated/baremetal/src/v3/marshalling.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type {
1313
PrivateNetworkApiSetServerPrivateNetworksRequest,
1414
ServerPrivateNetwork,
1515
SetServerPrivateNetworksResponse,
16-
} from './types.gen'
16+
} from './types.gen.js'
1717

1818
export const unmarshalServerPrivateNetwork = (
1919
data: unknown,

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

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ import {
6767
unmarshalSSHKey,
6868
unmarshalUser,
6969
unmarshalValidateUserMFAOTPResponse,
70-
} from './marshalling.gen'
70+
} from './marshalling.gen.js'
7171
import 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

176177
const 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
*

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ import type {
7878
User,
7979
ValidateUserMFAOTPRequest,
8080
ValidateUserMFAOTPResponse,
81-
} from './types.gen'
81+
} from './types.gen.js'
8282

8383
export const unmarshalJWT = (data: unknown): JWT => {
8484
if (!isJSONObject(data)) {
@@ -677,6 +677,10 @@ export const unmarshalOrganization = (data: unknown): Organization => {
677677
return {
678678
alias: data.alias,
679679
id: data.id,
680+
loginMagicCodeEnabled: data.login_magic_code_enabled,
681+
loginOauth2Enabled: data.login_oauth2_enabled,
682+
loginPasswordEnabled: data.login_password_enabled,
683+
loginSamlEnabled: data.login_saml_enabled,
680684
name: data.name,
681685
} as Organization
682686
}

0 commit comments

Comments
 (0)