diff --git a/packages/clients/src/api/audit_trail/v1alpha1/api.gen.ts b/packages/clients/src/api/audit_trail/v1alpha1/api.gen.ts index a0ee8dc34..f12040249 100644 --- a/packages/clients/src/api/audit_trail/v1alpha1/api.gen.ts +++ b/packages/clients/src/api/audit_trail/v1alpha1/api.gen.ts @@ -1,7 +1,7 @@ // This file was automatically generated. DO NOT EDIT. // If you have any remark or suggestion do not hesitate to open an issue. import { API as ParentAPI, urlParams, validatePathParam } from '../../../bridge' -import type { Region } from '../../../bridge' +import type { Region as ScwRegion } from '../../../bridge' import { unmarshalListEventsResponse, unmarshalListProductsResponse, @@ -21,7 +21,7 @@ import type { */ export class API extends ParentAPI { /** Lists the available regions of the API. */ - public static readonly LOCALITIES: Region[] = ['fr-par', 'nl-ams'] + public static readonly LOCALITIES: ScwRegion[] = ['fr-par', 'nl-ams'] /** * List events. Retrieve the list of Audit Trail events for a Scaleway diff --git a/packages/clients/src/api/audit_trail/v1alpha1/index.gen.ts b/packages/clients/src/api/audit_trail/v1alpha1/index.gen.ts index 1c1df0ca0..db5c052e2 100644 --- a/packages/clients/src/api/audit_trail/v1alpha1/index.gen.ts +++ b/packages/clients/src/api/audit_trail/v1alpha1/index.gen.ts @@ -4,6 +4,7 @@ export { API } from './api.gen' export type { Event, EventPrincipal, + KeyManagerKeyInfo, KubernetesACLInfo, KubernetesClusterInfo, KubernetesNodeInfo, diff --git a/packages/clients/src/api/audit_trail/v1alpha1/marshalling.gen.ts b/packages/clients/src/api/audit_trail/v1alpha1/marshalling.gen.ts index c04eea3c8..8a8c1f676 100644 --- a/packages/clients/src/api/audit_trail/v1alpha1/marshalling.gen.ts +++ b/packages/clients/src/api/audit_trail/v1alpha1/marshalling.gen.ts @@ -8,6 +8,7 @@ import { import type { Event, EventPrincipal, + KeyManagerKeyInfo, KubernetesACLInfo, KubernetesClusterInfo, KubernetesNodeInfo, @@ -21,6 +22,16 @@ import type { SecretManagerSecretVersionInfo, } from './types.gen' +const unmarshalKeyManagerKeyInfo = (data: unknown): KeyManagerKeyInfo => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'KeyManagerKeyInfo' failed as data isn't a dictionary.`, + ) + } + + return {} as KeyManagerKeyInfo +} + const unmarshalKubernetesACLInfo = (data: unknown): KubernetesACLInfo => { if (!isJSONObject(data)) { throw new TypeError( @@ -120,6 +131,9 @@ export const unmarshalResource = (data: unknown): Resource => { createdAt: unmarshalDate(data.created_at), deletedAt: unmarshalDate(data.deleted_at), id: data.id, + keymKeyInfo: data.keym_key_info + ? unmarshalKeyManagerKeyInfo(data.keym_key_info) + : undefined, kubeAclInfo: data.kube_acl_info ? unmarshalKubernetesACLInfo(data.kube_acl_info) : undefined, diff --git a/packages/clients/src/api/audit_trail/v1alpha1/types.gen.ts b/packages/clients/src/api/audit_trail/v1alpha1/types.gen.ts index 88adaeb47..40e68d655 100644 --- a/packages/clients/src/api/audit_trail/v1alpha1/types.gen.ts +++ b/packages/clients/src/api/audit_trail/v1alpha1/types.gen.ts @@ -1,6 +1,6 @@ // This file was automatically generated. DO NOT EDIT. // If you have any remark or suggestion do not hesitate to open an issue. -import type { Region } from '../../../bridge' +import type { Region as ScwRegion } from '../../../bridge' export type ListEventsRequestOrderBy = 'recorded_at_desc' | 'recorded_at_asc' @@ -12,6 +12,9 @@ export type ResourceType = | 'kube_pool' | 'kube_node' | 'kube_acl' + | 'keym_key' + +export interface KeyManagerKeyInfo {} export interface KubernetesACLInfo {} @@ -48,40 +51,46 @@ export interface Resource { name?: string /** * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', - * 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo' could be - * set. + * 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', + * 'keymKeyInfo' could be set. */ secmSecretInfo?: SecretManagerSecretInfo /** * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', - * 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo' could be - * set. + * 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', + * 'keymKeyInfo' could be set. */ secmSecretVersionInfo?: SecretManagerSecretVersionInfo /** * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', - * 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo' could be - * set. + * 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', + * 'keymKeyInfo' could be set. */ kubeClusterInfo?: KubernetesClusterInfo /** * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', - * 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo' could be - * set. + * 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', + * 'keymKeyInfo' could be set. */ kubePoolInfo?: KubernetesPoolInfo /** * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', - * 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo' could be - * set. + * 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', + * 'keymKeyInfo' could be set. */ kubeNodeInfo?: KubernetesNodeInfo /** * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', - * 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo' could be - * set. + * 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', + * 'keymKeyInfo' could be set. */ kubeAclInfo?: KubernetesACLInfo + /** + * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', + * 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', + * 'keymKeyInfo' could be set. + */ + keymKeyInfo?: KeyManagerKeyInfo } export interface ProductService { @@ -139,7 +148,7 @@ export type ListEventsRequest = { * Region to target. If none is passed will use default region from the * config. */ - region?: Region + region?: ScwRegion /** (Optional) ID of the Project containing the Audit Trail events. */ projectId?: string /** ID of the Organization containing the Audit Trail events. */ @@ -183,7 +192,7 @@ export type ListProductsRequest = { * Region to target. If none is passed will use default region from the * config. */ - region?: Region + region?: ScwRegion } export interface ListProductsResponse {