Skip to content

Commit 6ef8f2a

Browse files
authored
Merge branch 'main' into v1.7129.0
2 parents 1b7a04c + 477d534 commit 6ef8f2a

File tree

5 files changed

+101
-6
lines changed

5 files changed

+101
-6
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/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
}

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

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1784,6 +1784,22 @@ export interface Organization {
17841784
* Alias of the Organization.
17851785
*/
17861786
alias: string
1787+
/**
1788+
* Defines whether login with a password is enabled for the Organization.
1789+
*/
1790+
loginPasswordEnabled: boolean
1791+
/**
1792+
* Defines whether login with an authentication code is enabled for the Organization.
1793+
*/
1794+
loginMagicCodeEnabled: boolean
1795+
/**
1796+
* Defines whether login through OAuth2 is enabled for the Organization.
1797+
*/
1798+
loginOauth2Enabled: boolean
1799+
/**
1800+
* Defines whether login through SAML is enabled for the Organization.
1801+
*/
1802+
loginSamlEnabled: boolean
17871803
}
17881804

17891805
export interface OrganizationSecuritySettings {
@@ -1953,6 +1969,29 @@ export type UpdateGroupRequest = {
19531969
tags?: string[]
19541970
}
19551971

1972+
export type UpdateOrganizationLoginMethodsRequest = {
1973+
/**
1974+
* ID of the Organization.
1975+
*/
1976+
organizationId?: string
1977+
/**
1978+
* Defines whether login with a password is enabled for the Organization.
1979+
*/
1980+
loginPasswordEnabled?: boolean
1981+
/**
1982+
* Defines whether login through OAuth2 is enabled for the Organization.
1983+
*/
1984+
loginOauth2Enabled?: boolean
1985+
/**
1986+
* Defines whether login with an authentication code is enabled for the Organization.
1987+
*/
1988+
loginMagicCodeEnabled?: boolean
1989+
/**
1990+
* Defines whether login through SAML is enabled for the Organization.
1991+
*/
1992+
loginSamlEnabled?: boolean
1993+
}
1994+
19561995
export type UpdateOrganizationSecuritySettingsRequest = {
19571996
/**
19581997
* ID of the Organization.

0 commit comments

Comments
 (0)