Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions packages/clients/src/api/iam/v1alpha1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
marshalUpdateGroupRequest,
marshalUpdatePolicyRequest,
marshalUpdateSSHKeyRequest,
marshalUpdateUserPasswordRequest,
marshalUpdateUserRequest,
unmarshalAPIKey,
unmarshalApplication,
Expand Down Expand Up @@ -116,6 +117,7 @@ import type {
UpdateGroupRequest,
UpdatePolicyRequest,
UpdateSSHKeyRequest,
UpdateUserPasswordRequest,
UpdateUserRequest,
User,
} from './types.gen'
Expand Down Expand Up @@ -343,6 +345,19 @@ export class API extends ParentAPI {
unmarshalUser,
)

updateUserPassword = (request: Readonly<UpdateUserPasswordRequest>) =>
this.client.fetch<User>(
{
body: JSON.stringify(
marshalUpdateUserPasswordRequest(request, this.client.settings),
),
headers: jsonContentHeaders,
method: 'POST',
path: `/iam/v1alpha1/users/${validatePathParam('userId', request.userId)}/update-password`,
},
unmarshalUser,
)

protected pageOfListApplications = (
request: Readonly<ListApplicationsRequest> = {},
) =>
Expand Down
1 change: 1 addition & 0 deletions packages/clients/src/api/iam/v1alpha1/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export type {
UpdateGroupRequest,
UpdatePolicyRequest,
UpdateSSHKeyRequest,
UpdateUserPasswordRequest,
UpdateUserRequest,
User,
UserStatus,
Expand Down
9 changes: 9 additions & 0 deletions packages/clients/src/api/iam/v1alpha1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import type {
UpdateGroupRequest,
UpdatePolicyRequest,
UpdateSSHKeyRequest,
UpdateUserPasswordRequest,
UpdateUserRequest,
User,
} from './types.gen'
Expand Down Expand Up @@ -684,6 +685,14 @@ export const marshalUpdateSSHKeyRequest = (
name: request.name,
})

export const marshalUpdateUserPasswordRequest = (
request: UpdateUserPasswordRequest,
defaults: DefaultValues,
): Record<string, unknown> => ({
password: request.password,
send_email: request.sendEmail,
})

export const marshalUpdateUserRequest = (
request: UpdateUserRequest,
defaults: DefaultValues,
Expand Down
44 changes: 25 additions & 19 deletions packages/clients/src/api/iam/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,25 @@ export type UserStatus = 'unknown_status' | 'invitation_pending' | 'activated'

export type UserType = 'unknown_type' | 'guest' | 'owner' | 'member'

export interface JWT {
/** JWT ID. */
jti: string
/** ID of the user who issued the JWT. */
issuerId: string
/** ID of the user targeted by the JWT. */
audienceId: string
/** Creation date of the JWT. */
createdAt?: Date
/** Last update date of the JWT. */
updatedAt?: Date
/** Expiration date of the JWT. */
expiresAt?: Date
/** IP address used during the creation of the JWT. */
ip: string
/** User-agent used during the creation of the JWT. */
userAgent: string
}

export interface RuleSpecs {
/** Names of permission sets bound to the rule. */
permissionSetNames?: string[]
Expand Down Expand Up @@ -121,25 +140,6 @@ export interface CreateUserRequestMember {
password: string
}

export interface JWT {
/** JWT ID. */
jti: string
/** ID of the user who issued the JWT. */
issuerId: string
/** ID of the user targeted by the JWT. */
audienceId: string
/** Creation date of the JWT. */
createdAt?: Date
/** Last update date of the JWT. */
updatedAt?: Date
/** Expiration date of the JWT. */
expiresAt?: Date
/** IP address used during the creation of the JWT. */
ip: string
/** User-agent used during the creation of the JWT. */
userAgent: string
}

export interface APIKey {
/** Access key of the API key. */
accessKey: string
Expand Down Expand Up @@ -1070,6 +1070,12 @@ export type UpdateSSHKeyRequest = {
disabled?: boolean
}

export type UpdateUserPasswordRequest = {
userId: string
password: string
sendEmail: boolean
}

export type UpdateUserRequest = {
/** ID of the user to update. */
userId: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,10 @@ export const UpdateSSHKeyRequest = {
maxLength: 1000,
},
}

export const UpdateUserPasswordRequest = {
password: {
maxLength: 72,
minLength: 1,
},
}