Skip to content

Commit db0bb9c

Browse files
authored
Merge branch 'main' into v1.5872.0
2 parents f2b9eb6 + 348b536 commit db0bb9c

File tree

18 files changed

+1725
-2
lines changed

18 files changed

+1725
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export type {
1414
ListProductsRequest,
1515
ListProductsResponse,
1616
Product,
17+
ProductService,
1718
Resource,
1819
ResourceType,
1920
SecretManagerSecretInfo,

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import type {
1515
ListEventsResponse,
1616
ListProductsResponse,
1717
Product,
18+
ProductService,
1819
Resource,
1920
SecretManagerSecretInfo,
2021
SecretManagerSecretVersionInfo,
@@ -186,6 +187,19 @@ export const unmarshalListEventsResponse = (
186187
} as ListEventsResponse
187188
}
188189

190+
const unmarshalProductService = (data: unknown): ProductService => {
191+
if (!isJSONObject(data)) {
192+
throw new TypeError(
193+
`Unmarshalling the type 'ProductService' failed as data isn't a dictionary.`,
194+
)
195+
}
196+
197+
return {
198+
methods: data.methods,
199+
name: data.name,
200+
} as ProductService
201+
}
202+
189203
const unmarshalProduct = (data: unknown): Product => {
190204
if (!isJSONObject(data)) {
191205
throw new TypeError(
@@ -195,6 +209,7 @@ const unmarshalProduct = (data: unknown): Product => {
195209

196210
return {
197211
name: data.name,
212+
services: unmarshalArrayOfObject(data.services, unmarshalProductService),
198213
title: data.title,
199214
} as Product
200215
}

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ export interface Resource {
8484
kubeAclInfo?: KubernetesACLInfo
8585
}
8686

87+
export interface ProductService {
88+
name: string
89+
methods: string[]
90+
}
91+
8792
export interface Event {
8893
/** ID of the event. */
8994
id: string
@@ -122,6 +127,11 @@ export interface Product {
122127
title: string
123128
/** Product name. */
124129
name: string
130+
/**
131+
* Specifies the API versions of the products integrated with Audit Trail.
132+
* Each version defines the methods logged by Audit Trail.
133+
*/
134+
services: ProductService[]
125135
}
126136

127137
export type ListEventsRequest = {

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/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)