From 113f609c2c9a6797929d91dcea2b83b4d9a82f70 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Tue, 29 Jul 2025 20:42:53 +0000 Subject: [PATCH] feat: update generated APIs --- .../audit_trail/src/v1alpha1/index.gen.ts | 1 + .../audit_trail/src/v1alpha1/marshalling.gen.ts | 14 ++++++++++++++ .../audit_trail/src/v1alpha1/types.gen.ts | 12 ++++++++++++ 3 files changed, 27 insertions(+) diff --git a/packages_generated/audit_trail/src/v1alpha1/index.gen.ts b/packages_generated/audit_trail/src/v1alpha1/index.gen.ts index ea1c0d1f7..20725cd78 100644 --- a/packages_generated/audit_trail/src/v1alpha1/index.gen.ts +++ b/packages_generated/audit_trail/src/v1alpha1/index.gen.ts @@ -11,6 +11,7 @@ export type { BaremetalSettingInfo, Event, EventPrincipal, + EventSystem, InstanceServerInfo, KeyManagerKeyInfo, KubernetesACLInfo, diff --git a/packages_generated/audit_trail/src/v1alpha1/marshalling.gen.ts b/packages_generated/audit_trail/src/v1alpha1/marshalling.gen.ts index 67e2a6253..38f54bd12 100644 --- a/packages_generated/audit_trail/src/v1alpha1/marshalling.gen.ts +++ b/packages_generated/audit_trail/src/v1alpha1/marshalling.gen.ts @@ -14,6 +14,7 @@ import type { BaremetalSettingInfo, Event, EventPrincipal, + EventSystem, InstanceServerInfo, KeyManagerKeyInfo, KubernetesACLInfo, @@ -217,6 +218,18 @@ const unmarshalEventPrincipal = (data: unknown): EventPrincipal => { } as EventPrincipal } +const unmarshalEventSystem = (data: unknown): EventSystem => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'EventSystem' failed as data isn't a dictionary.`, + ) + } + + return { + name: data.name, + } as EventSystem +} + export const unmarshalResource = (data: unknown): Resource => { if (!isJSONObject(data)) { throw new TypeError( @@ -311,6 +324,7 @@ export const unmarshalEvent = (data: unknown): Event => { serviceName: data.service_name, sourceIp: data.source_ip, statusCode: data.status_code, + system: data.system ? unmarshalEventSystem(data.system) : undefined, userAgent: data.user_agent, } as Event } diff --git a/packages_generated/audit_trail/src/v1alpha1/types.gen.ts b/packages_generated/audit_trail/src/v1alpha1/types.gen.ts index 09c82dc02..cc5fd679f 100644 --- a/packages_generated/audit_trail/src/v1alpha1/types.gen.ts +++ b/packages_generated/audit_trail/src/v1alpha1/types.gen.ts @@ -89,6 +89,10 @@ export interface EventPrincipal { id: string } +export interface EventSystem { + name: string +} + export interface Resource { id: string type: ResourceType @@ -206,8 +210,16 @@ export interface Event { locality: string /** * User or IAM application at the origin of the event. + * + * One-of ('source'): at most one of 'principal', 'system' could be set. */ principal?: EventPrincipal + /** + * The Scaleway system that performed an action on behalf of the client. + * + * One-of ('source'): at most one of 'principal', 'system' could be set. + */ + system?: EventSystem /** * Organization ID containing the event. */