Skip to content

Commit 39e3dda

Browse files
authored
feat(iam): add User.mfa and deprecate twoFactorEnabled (#586)
1 parent 7dbbbde commit 39e3dda

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

packages/clients/src/api/iam/v1alpha1/api.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ export class API extends ParentAPI {
228228
method: 'GET',
229229
path: `/iam/v1alpha1/users`,
230230
urlParams: urlParams(
231+
['mfa', request.mfa],
231232
['order_by', request.orderBy ?? 'created_at_asc'],
232233
[
233234
'organization_id',
@@ -261,8 +262,7 @@ export class API extends ParentAPI {
261262
/**
262263
* Get a given user. Retrieve information about a user, specified by the
263264
* `user_id` parameter. The user's full details, including `id`, `email`,
264-
* `organization_id`, `status` and `two_factor_enabled` are returned in the
265-
* response.
265+
* `organization_id`, `status` and `mfa` are returned in the response.
266266
*
267267
* @param request - The request {@link GetUserRequest}
268268
* @returns A Promise of User

packages/clients/src/api/iam/v1alpha1/marshalling.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ export const unmarshalUser = (data: unknown) => {
231231
email: data.email,
232232
id: data.id,
233233
lastLoginAt: unmarshalDate(data.last_login_at),
234+
mfa: data.mfa,
234235
organizationId: data.organization_id,
235236
status: data.status,
236237
twoFactorEnabled: data.two_factor_enabled,

packages/clients/src/api/iam/v1alpha1/types.gen.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,12 @@ export interface User {
429429
lastLoginAt?: Date
430430
/** Type of user. */
431431
type: UserType
432-
/** Whether MFA is enabled. */
433-
twoFactorEnabled: boolean
432+
/** @deprecated Deprecated, use "mfa" instead. */
433+
twoFactorEnabled?: boolean
434434
/** Status of user invitation. */
435435
status: UserStatus
436+
/** Whether MFA is enabled. */
437+
mfa: boolean
436438
}
437439

438440
export type ListSSHKeysRequest = {
@@ -492,6 +494,8 @@ export type ListUsersRequest = {
492494
organizationId?: string
493495
/** Filter by list of IDs. */
494496
userIds?: string[]
497+
/** Filter by MFA status. */
498+
mfa?: boolean
495499
}
496500

497501
export type GetUserRequest = {

0 commit comments

Comments
 (0)