Skip to content

Commit ce167ed

Browse files
committed
feat: update generated APIs
1 parent 58cb2aa commit ce167ed

File tree

17 files changed

+1712
-12
lines changed

17 files changed

+1712
-12
lines changed

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import {
2828
marshalUpdateSSHKeyRequest,
2929
marshalUpdateUserPasswordRequest,
3030
marshalUpdateUserRequest,
31+
marshalUpdateUserUsernameRequest,
3132
unmarshalAPIKey,
3233
unmarshalApplication,
3334
unmarshalEncodedJWT,
@@ -129,6 +130,7 @@ import type {
129130
UpdateSSHKeyRequest,
130131
UpdateUserPasswordRequest,
131132
UpdateUserRequest,
133+
UpdateUserUsernameRequest,
132134
User,
133135
} from './types.gen'
134136

@@ -355,6 +357,26 @@ export class API extends ParentAPI {
355357
unmarshalUser,
356358
)
357359

360+
/**
361+
* Update an user's username. Private Beta feature.. Update an user's
362+
* username. Private Beta feature.
363+
*
364+
* @param request - The request {@link UpdateUserUsernameRequest}
365+
* @returns A Promise of User
366+
*/
367+
updateUserUsername = (request: Readonly<UpdateUserUsernameRequest>) =>
368+
this.client.fetch<User>(
369+
{
370+
body: JSON.stringify(
371+
marshalUpdateUserUsernameRequest(request, this.client.settings),
372+
),
373+
headers: jsonContentHeaders,
374+
method: 'POST',
375+
path: `/iam/v1alpha1/users/${validatePathParam('userId', request.userId)}/update-username`,
376+
},
377+
unmarshalUser,
378+
)
379+
358380
/**
359381
* Update an user's password. Private Beta feature.. Update an user's
360382
* password. Private Beta feature.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export type {
9797
UpdateSSHKeyRequest,
9898
UpdateUserPasswordRequest,
9999
UpdateUserRequest,
100+
UpdateUserUsernameRequest,
100101
User,
101102
UserStatus,
102103
UserType,

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ import type {
5757
UpdateSSHKeyRequest,
5858
UpdateUserPasswordRequest,
5959
UpdateUserRequest,
60+
UpdateUserUsernameRequest,
6061
User,
6162
} from './types.gen'
6263

@@ -761,3 +762,10 @@ export const marshalUpdateUserRequest = (
761762
email: request.email,
762763
tags: request.tags,
763764
})
765+
766+
export const marshalUpdateUserUsernameRequest = (
767+
request: UpdateUserUsernameRequest,
768+
defaults: DefaultValues,
769+
): Record<string, unknown> => ({
770+
username: request.username,
771+
})

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,3 +1156,10 @@ export type UpdateUserRequest = {
11561156
/** IAM member email. */
11571157
email?: string
11581158
}
1159+
1160+
export type UpdateUserUsernameRequest = {
1161+
/** ID of the user to update. */
1162+
userId: string
1163+
/** The new username. */
1164+
username: string
1165+
}

packages/clients/src/api/iam/v1alpha1/validation-rules.gen.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,3 +261,11 @@ export const UpdateUserPasswordRequest = {
261261
minLength: 1,
262262
},
263263
}
264+
265+
export const UpdateUserUsernameRequest = {
266+
username: {
267+
maxLength: 64,
268+
minLength: 2,
269+
pattern: /^[a-zA-Z0-9._-]+$/,
270+
},
271+
}

packages/clients/src/api/ipam/v1/api.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ export class API extends ParentAPI {
131131
path: `/ipam/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/ips`,
132132
urlParams: urlParams(
133133
['attached', request.attached],
134+
['ip_ids', request.ipIds],
134135
['is_ipv6', request.isIpv6],
135136
['mac_address', request.macAddress],
136137
['order_by', request.orderBy],

packages/clients/src/api/ipam/v1/types.gen.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,11 @@ export type ListIPsRequest = {
225225
vpcId?: string
226226
/** Defines whether to filter only for IPs which are attached to a resource. */
227227
attached?: boolean
228+
/**
229+
* Attached resource name to filter for, only IPs attached to a resource with
230+
* this string within their name will be returned.
231+
*/
232+
resourceName?: string
228233
/**
229234
* Resource ID to filter for. Only IPs attached to this resource will be
230235
* returned.
@@ -240,6 +245,11 @@ export type ListIPsRequest = {
240245
* will be returned.
241246
*/
242247
resourceType?: ResourceType
248+
/**
249+
* Resource types to filter for. Only IPs attached to these types of resources
250+
* will be returned.
251+
*/
252+
resourceTypes?: ResourceType[]
243253
/**
244254
* MAC address to filter for. Only IPs attached to a resource with this MAC
245255
* address will be returned.
@@ -257,16 +267,8 @@ export type ListIPsRequest = {
257267
organizationId?: string
258268
/** Defines whether to filter only for IPv4s or IPv6s. */
259269
isIpv6?: boolean
260-
/**
261-
* Attached resource name to filter for, only IPs attached to a resource with
262-
* this string within their name will be returned.
263-
*/
264-
resourceName?: string
265-
/**
266-
* Resource types to filter for. Only IPs attached to these types of resources
267-
* will be returned.
268-
*/
269-
resourceTypes?: ResourceType[]
270+
/** IP IDs to filter for. Only IPs with these UUIDs will be returned. */
271+
ipIds?: string[]
270272
}
271273

272274
export interface ListIPsResponse {

packages/clients/src/api/marketplace/v2/types.gen.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ export interface Image {
4343
updatedAt?: Date
4444
/** Expiration date of this image. */
4545
validUntil?: Date
46-
/** Typically an identifier for a distribution (ex. "ubuntu_focal"). */
46+
/**
47+
* Typically an identifier for a distribution (ex. "ubuntu_focal"). This label
48+
* can be used in the image field of the server creation request.
49+
*/
4750
label: string
4851
}
4952

@@ -56,7 +59,7 @@ export interface LocalImage {
5659
arch: string
5760
/** Availability Zone where this local image is available. */
5861
zone: Zone
59-
/** Image label this image belongs to. */
62+
/** This label can be used in the image field of the server creation request. */
6063
label: string
6164
/** Type of this local image. */
6265
type: LocalImageType

packages/clients/src/api/vpcgw/index.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
*/
55

66
export * as v1 from './v1/index.gen'
7+
export * as v2 from './v2/index.gen'

0 commit comments

Comments
 (0)