From b8f517034e7b7b98721cafea85cc975d5a8d4d66 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Wed, 19 Nov 2025 13:53:27 +0000 Subject: [PATCH] feat: update generated APIs --- .../audit_trail/src/v1alpha1/api.gen.ts | 96 +++--- .../audit_trail/src/v1alpha1/index.gen.ts | 4 +- .../src/v1alpha1/marshalling.gen.ts | 315 +++++------------- .../audit_trail/src/v1alpha1/types.gen.ts | 110 +++++- 4 files changed, 228 insertions(+), 297 deletions(-) diff --git a/packages_generated/audit_trail/src/v1alpha1/api.gen.ts b/packages_generated/audit_trail/src/v1alpha1/api.gen.ts index 9a3861a24..ee6057d66 100644 --- a/packages_generated/audit_trail/src/v1alpha1/api.gen.ts +++ b/packages_generated/audit_trail/src/v1alpha1/api.gen.ts @@ -3,11 +3,11 @@ import { API as ParentAPI, enrichForPagination, - toApiLocality, urlParams, validatePathParam, + toApiLocality, } from '@scaleway/sdk-client' -import type { ApiLocality } from '@scaleway/sdk-client' +import type { ApiLocality,} from '@scaleway/sdk-client' import { marshalCreateExportJobRequest, unmarshalExportJob, @@ -47,10 +47,14 @@ export class API extends ParentAPI { * Locality of this API. * type ∈ {'zone','region','global','unspecified'} */ - public static readonly LOCALITY: ApiLocality = toApiLocality({ - regions: ['fr-par', 'nl-ams'], - }) - + public static readonly LOCALITY: ApiLocality = + toApiLocality({ + regions: [ + 'fr-par', + 'nl-ams', + ], + }) + /** * List events. Retrieve the list of Audit Trail events for a Scaleway Organization and/or Project. You must specify the `organization_id` and optionally, the `project_id`. * @@ -65,15 +69,8 @@ export class API extends ParentAPI { urlParams: urlParams( ['method_name', request.methodName], ['order_by', request.orderBy], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], - [ - 'page_size', - request.pageSize ?? this.client.settings.defaultPageSize, - ], + ['organization_id', request.organizationId ?? this.client.settings.defaultOrganizationId], + ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['page_token', request.pageToken], ['principal_id', request.principalId], ['product_name', request.productName], @@ -90,30 +87,22 @@ export class API extends ParentAPI { unmarshalListEventsResponse, ) + /** * List authentication events. Retrieve the list of Audit Trail authentication events for a Scaleway Organization. You must specify the `organization_id`. * * @param request - The request {@link ListAuthenticationEventsRequest} * @returns A Promise of ListAuthenticationEventsResponse */ - listAuthenticationEvents = ( - request: Readonly = {}, - ) => + listAuthenticationEvents = (request: Readonly = {}) => this.client.fetch( { method: 'GET', path: `/audit-trail/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/authentication-events`, urlParams: urlParams( ['order_by', request.orderBy], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], - [ - 'page_size', - request.pageSize ?? this.client.settings.defaultPageSize, - ], + ['organization_id', request.organizationId ?? this.client.settings.defaultOrganizationId], + ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['page_token', request.pageToken], ['recorded_after', request.recordedAfter], ['recorded_before', request.recordedBefore], @@ -122,6 +111,7 @@ export class API extends ParentAPI { unmarshalListAuthenticationEventsResponse, ) + listCombinedEvents = (request: Readonly = {}) => this.client.fetch( { @@ -129,15 +119,8 @@ export class API extends ParentAPI { path: `/audit-trail/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/combined-events`, urlParams: urlParams( ['order_by', request.orderBy], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], - [ - 'page_size', - request.pageSize ?? this.client.settings.defaultPageSize, - ], + ['organization_id', request.organizationId ?? this.client.settings.defaultOrganizationId], + ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['page_token', request.pageToken], ['project_id', request.projectId], ['recorded_after', request.recordedAfter], @@ -148,6 +131,7 @@ export class API extends ParentAPI { unmarshalListCombinedEventsResponse, ) + /** * Retrieve the list of Scaleway resources for which you have Audit Trail events. * @@ -159,14 +143,14 @@ export class API extends ParentAPI { { method: 'GET', path: `/audit-trail/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/products`, - urlParams: urlParams([ - 'organization_id', - request.organizationId ?? this.client.settings.defaultOrganizationId, - ]), + urlParams: urlParams( + ['organization_id', request.organizationId ?? this.client.settings.defaultOrganizationId], + ), }, unmarshalListProductsResponse, ) + /** * Create an export job. Create an export job for a specified organization. This allows you to export audit trail events to a destination, such as an S3 bucket. The request requires the organization ID, a name for the export, and a destination configuration. * @@ -186,20 +170,22 @@ export class API extends ParentAPI { unmarshalExportJob, ) + /** * Delete an export job. Deletes an export job for a specified id. * * @param request - The request {@link DeleteExportJobRequest} */ deleteExportJob = (request: Readonly) => - this.client.fetch({ - method: 'DELETE', - path: `/audit-trail/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/export-jobs/${validatePathParam('exportJobId', request.exportJobId)}`, - }) + this.client.fetch( + { + method: 'DELETE', + path: `/audit-trail/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/export-jobs/${validatePathParam('exportJobId', request.exportJobId)}`, + }, + ) - protected pageOfListExportJobs = ( - request: Readonly = {}, - ) => + + protected pageOfListExportJobs = (request: Readonly = {}) => this.client.fetch( { method: 'GET', @@ -207,22 +193,18 @@ export class API extends ParentAPI { urlParams: urlParams( ['name', request.name], ['order_by', request.orderBy], - [ - 'organization_id', - request.organizationId ?? - this.client.settings.defaultOrganizationId, - ], + ['organization_id', request.organizationId ?? this.client.settings.defaultOrganizationId], ['page', request.page], - [ - 'page_size', - request.pageSize ?? this.client.settings.defaultPageSize, - ], + ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['tags', request.tags], ), }, unmarshalListExportJobsResponse, ) - + listExportJobs = (request: Readonly = {}) => enrichForPagination('exportJobs', this.pageOfListExportJobs, request) + + } + diff --git a/packages_generated/audit_trail/src/v1alpha1/index.gen.ts b/packages_generated/audit_trail/src/v1alpha1/index.gen.ts index fd41a4cab..d7e97fd07 100644 --- a/packages_generated/audit_trail/src/v1alpha1/index.gen.ts +++ b/packages_generated/audit_trail/src/v1alpha1/index.gen.ts @@ -1,6 +1,8 @@ // This file was automatically generated. DO NOT EDIT. // If you have any remark or suggestion do not hesitate to open an issue. -export { API } from './api.gen.js' +export { + API, +} from './api.gen.js' export * from './marshalling.gen.js' export type { AccountOrganizationInfo, diff --git a/packages_generated/audit_trail/src/v1alpha1/marshalling.gen.ts b/packages_generated/audit_trail/src/v1alpha1/marshalling.gen.ts index ca4b9d2d1..ac81be49d 100644 --- a/packages_generated/audit_trail/src/v1alpha1/marshalling.gen.ts +++ b/packages_generated/audit_trail/src/v1alpha1/marshalling.gen.ts @@ -1,21 +1,16 @@ -// This file was automatically generated. DO NOT EDIT. -// If you have any remark or suggestion do not hesitate to open an issue. -import { - isJSONObject, - resolveOneOf, - unmarshalArrayOfObject, - unmarshalDate, -} from '@scaleway/sdk-client' + +import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate, } from '@scaleway/sdk-client' import type { DefaultValues } from '@scaleway/sdk-client' import type { + ExportJobS3, + ExportJobStatus, + ExportJob, AccountOrganizationInfo, AccountProjectInfo, AccountUserInfo, AppleSiliconServerInfo, - AuthenticationEvent, BaremetalServerInfo, BaremetalSettingInfo, - CreateExportJobRequest, EdgeServicesBackendStageInfo, EdgeServicesCacheStageInfo, EdgeServicesDNSStageInfo, @@ -25,11 +20,6 @@ import type { EdgeServicesRouteStageInfo, EdgeServicesTLSStageInfo, EdgeServicesWAFStageInfo, - Event, - EventPrincipal, - ExportJob, - ExportJobS3, - ExportJobStatus, InstanceServerInfo, IpamIpInfo, KeyManagerKeyInfo, @@ -37,12 +27,6 @@ import type { KubernetesClusterInfo, KubernetesNodeInfo, KubernetesPoolInfo, - ListAuthenticationEventsResponse, - ListCombinedEventsResponse, - ListCombinedEventsResponseCombinedEvent, - ListEventsResponse, - ListExportJobsResponse, - ListProductsResponse, LoadBalancerAclInfo, LoadBalancerBackendInfo, LoadBalancerCertificateInfo, @@ -50,12 +34,22 @@ import type { LoadBalancerIpInfo, LoadBalancerLbInfo, LoadBalancerRouteInfo, - Product, - ProductService, - Resource, SecretManagerSecretInfo, SecretManagerSecretVersionInfo, + Resource, + AuthenticationEvent, + ListAuthenticationEventsResponse, + EventPrincipal, + Event, SystemEvent, + ListCombinedEventsResponseCombinedEvent, + ListCombinedEventsResponse, + ListEventsResponse, + ListExportJobsResponse, + ProductService, + Product, + ListProductsResponse, + CreateExportJobRequest, } from './types.gen.js' const unmarshalExportJobS3 = (data: unknown): ExportJobS3 => { @@ -97,9 +91,7 @@ export const unmarshalExportJob = (data: unknown): ExportJob => { createdAt: unmarshalDate(data.created_at), id: data.id, lastRunAt: unmarshalDate(data.last_run_at), - lastStatus: data.last_status - ? unmarshalExportJobStatus(data.last_status) - : undefined, + lastStatus: data.last_status ? unmarshalExportJobStatus(data.last_status) : undefined, name: data.name, organizationId: data.organization_id, s3: data.s3 ? unmarshalExportJobS3(data.s3) : undefined, @@ -107,16 +99,15 @@ export const unmarshalExportJob = (data: unknown): ExportJob => { } as ExportJob } -const unmarshalAccountOrganizationInfo = ( - data: unknown, -): AccountOrganizationInfo => { +const unmarshalAccountOrganizationInfo = (data: unknown): AccountOrganizationInfo => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'AccountOrganizationInfo' failed as data isn't a dictionary.`, ) } - return {} as AccountOrganizationInfo + return { + } as AccountOrganizationInfo } const unmarshalAccountProjectInfo = (data: unknown): AccountProjectInfo => { @@ -144,9 +135,7 @@ const unmarshalAccountUserInfo = (data: unknown): AccountUserInfo => { } as AccountUserInfo } -const unmarshalAppleSiliconServerInfo = ( - data: unknown, -): AppleSiliconServerInfo => { +const unmarshalAppleSiliconServerInfo = (data: unknown): AppleSiliconServerInfo => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'AppleSiliconServerInfo' failed as data isn't a dictionary.`, @@ -184,9 +173,7 @@ const unmarshalBaremetalSettingInfo = (data: unknown): BaremetalSettingInfo => { } as BaremetalSettingInfo } -const unmarshalEdgeServicesBackendStageInfo = ( - data: unknown, -): EdgeServicesBackendStageInfo => { +const unmarshalEdgeServicesBackendStageInfo = (data: unknown): EdgeServicesBackendStageInfo => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'EdgeServicesBackendStageInfo' failed as data isn't a dictionary.`, @@ -198,9 +185,7 @@ const unmarshalEdgeServicesBackendStageInfo = ( } as EdgeServicesBackendStageInfo } -const unmarshalEdgeServicesCacheStageInfo = ( - data: unknown, -): EdgeServicesCacheStageInfo => { +const unmarshalEdgeServicesCacheStageInfo = (data: unknown): EdgeServicesCacheStageInfo => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'EdgeServicesCacheStageInfo' failed as data isn't a dictionary.`, @@ -212,9 +197,7 @@ const unmarshalEdgeServicesCacheStageInfo = ( } as EdgeServicesCacheStageInfo } -const unmarshalEdgeServicesDNSStageInfo = ( - data: unknown, -): EdgeServicesDNSStageInfo => { +const unmarshalEdgeServicesDNSStageInfo = (data: unknown): EdgeServicesDNSStageInfo => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'EdgeServicesDNSStageInfo' failed as data isn't a dictionary.`, @@ -226,9 +209,7 @@ const unmarshalEdgeServicesDNSStageInfo = ( } as EdgeServicesDNSStageInfo } -const unmarshalEdgeServicesPipelineInfo = ( - data: unknown, -): EdgeServicesPipelineInfo => { +const unmarshalEdgeServicesPipelineInfo = (data: unknown): EdgeServicesPipelineInfo => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'EdgeServicesPipelineInfo' failed as data isn't a dictionary.`, @@ -247,12 +228,11 @@ const unmarshalEdgeServicesPlanInfo = (data: unknown): EdgeServicesPlanInfo => { ) } - return {} as EdgeServicesPlanInfo + return { + } as EdgeServicesPlanInfo } -const unmarshalEdgeServicesRouteRulesInfo = ( - data: unknown, -): EdgeServicesRouteRulesInfo => { +const unmarshalEdgeServicesRouteRulesInfo = (data: unknown): EdgeServicesRouteRulesInfo => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'EdgeServicesRouteRulesInfo' failed as data isn't a dictionary.`, @@ -264,9 +244,7 @@ const unmarshalEdgeServicesRouteRulesInfo = ( } as EdgeServicesRouteRulesInfo } -const unmarshalEdgeServicesRouteStageInfo = ( - data: unknown, -): EdgeServicesRouteStageInfo => { +const unmarshalEdgeServicesRouteStageInfo = (data: unknown): EdgeServicesRouteStageInfo => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'EdgeServicesRouteStageInfo' failed as data isn't a dictionary.`, @@ -278,9 +256,7 @@ const unmarshalEdgeServicesRouteStageInfo = ( } as EdgeServicesRouteStageInfo } -const unmarshalEdgeServicesTLSStageInfo = ( - data: unknown, -): EdgeServicesTLSStageInfo => { +const unmarshalEdgeServicesTLSStageInfo = (data: unknown): EdgeServicesTLSStageInfo => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'EdgeServicesTLSStageInfo' failed as data isn't a dictionary.`, @@ -292,9 +268,7 @@ const unmarshalEdgeServicesTLSStageInfo = ( } as EdgeServicesTLSStageInfo } -const unmarshalEdgeServicesWAFStageInfo = ( - data: unknown, -): EdgeServicesWAFStageInfo => { +const unmarshalEdgeServicesWAFStageInfo = (data: unknown): EdgeServicesWAFStageInfo => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'EdgeServicesWAFStageInfo' failed as data isn't a dictionary.`, @@ -337,7 +311,8 @@ const unmarshalKeyManagerKeyInfo = (data: unknown): KeyManagerKeyInfo => { ) } - return {} as KeyManagerKeyInfo + return { + } as KeyManagerKeyInfo } const unmarshalKubernetesACLInfo = (data: unknown): KubernetesACLInfo => { @@ -347,19 +322,19 @@ const unmarshalKubernetesACLInfo = (data: unknown): KubernetesACLInfo => { ) } - return {} as KubernetesACLInfo + return { + } as KubernetesACLInfo } -const unmarshalKubernetesClusterInfo = ( - data: unknown, -): KubernetesClusterInfo => { +const unmarshalKubernetesClusterInfo = (data: unknown): KubernetesClusterInfo => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'KubernetesClusterInfo' failed as data isn't a dictionary.`, ) } - return {} as KubernetesClusterInfo + return { + } as KubernetesClusterInfo } const unmarshalKubernetesNodeInfo = (data: unknown): KubernetesNodeInfo => { @@ -400,9 +375,7 @@ const unmarshalLoadBalancerAclInfo = (data: unknown): LoadBalancerAclInfo => { } as LoadBalancerAclInfo } -const unmarshalLoadBalancerBackendInfo = ( - data: unknown, -): LoadBalancerBackendInfo => { +const unmarshalLoadBalancerBackendInfo = (data: unknown): LoadBalancerBackendInfo => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'LoadBalancerBackendInfo' failed as data isn't a dictionary.`, @@ -415,9 +388,7 @@ const unmarshalLoadBalancerBackendInfo = ( } as LoadBalancerBackendInfo } -const unmarshalLoadBalancerCertificateInfo = ( - data: unknown, -): LoadBalancerCertificateInfo => { +const unmarshalLoadBalancerCertificateInfo = (data: unknown): LoadBalancerCertificateInfo => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'LoadBalancerCertificateInfo' failed as data isn't a dictionary.`, @@ -430,9 +401,7 @@ const unmarshalLoadBalancerCertificateInfo = ( } as LoadBalancerCertificateInfo } -const unmarshalLoadBalancerFrontendInfo = ( - data: unknown, -): LoadBalancerFrontendInfo => { +const unmarshalLoadBalancerFrontendInfo = (data: unknown): LoadBalancerFrontendInfo => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'LoadBalancerFrontendInfo' failed as data isn't a dictionary.`, @@ -470,9 +439,7 @@ const unmarshalLoadBalancerLbInfo = (data: unknown): LoadBalancerLbInfo => { } as LoadBalancerLbInfo } -const unmarshalLoadBalancerRouteInfo = ( - data: unknown, -): LoadBalancerRouteInfo => { +const unmarshalLoadBalancerRouteInfo = (data: unknown): LoadBalancerRouteInfo => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'LoadBalancerRouteInfo' failed as data isn't a dictionary.`, @@ -485,9 +452,7 @@ const unmarshalLoadBalancerRouteInfo = ( } as LoadBalancerRouteInfo } -const unmarshalSecretManagerSecretInfo = ( - data: unknown, -): SecretManagerSecretInfo => { +const unmarshalSecretManagerSecretInfo = (data: unknown): SecretManagerSecretInfo => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'SecretManagerSecretInfo' failed as data isn't a dictionary.`, @@ -500,9 +465,7 @@ const unmarshalSecretManagerSecretInfo = ( } as SecretManagerSecretInfo } -const unmarshalSecretManagerSecretVersionInfo = ( - data: unknown, -): SecretManagerSecretVersionInfo => { +const unmarshalSecretManagerSecretVersionInfo = (data: unknown): SecretManagerSecretVersionInfo => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'SecretManagerSecretVersionInfo' failed as data isn't a dictionary.`, @@ -522,118 +485,44 @@ export const unmarshalResource = (data: unknown): Resource => { } return { - accountOrganizationInfo: data.account_organization_info - ? unmarshalAccountOrganizationInfo(data.account_organization_info) - : undefined, - accountProjectInfo: data.account_project_info - ? unmarshalAccountProjectInfo(data.account_project_info) - : undefined, - accountUserInfo: data.account_user_info - ? unmarshalAccountUserInfo(data.account_user_info) - : undefined, - appleSiliconServerInfo: data.apple_silicon_server_info - ? unmarshalAppleSiliconServerInfo(data.apple_silicon_server_info) - : undefined, - baremetalServerInfo: data.baremetal_server_info - ? unmarshalBaremetalServerInfo(data.baremetal_server_info) - : undefined, - baremetalSettingInfo: data.baremetal_setting_info - ? unmarshalBaremetalSettingInfo(data.baremetal_setting_info) - : undefined, + accountOrganizationInfo: data.account_organization_info ? unmarshalAccountOrganizationInfo(data.account_organization_info) : undefined, + accountProjectInfo: data.account_project_info ? unmarshalAccountProjectInfo(data.account_project_info) : undefined, + accountUserInfo: data.account_user_info ? unmarshalAccountUserInfo(data.account_user_info) : undefined, + appleSiliconServerInfo: data.apple_silicon_server_info ? unmarshalAppleSiliconServerInfo(data.apple_silicon_server_info) : undefined, + baremetalServerInfo: data.baremetal_server_info ? unmarshalBaremetalServerInfo(data.baremetal_server_info) : undefined, + baremetalSettingInfo: data.baremetal_setting_info ? unmarshalBaremetalSettingInfo(data.baremetal_setting_info) : undefined, createdAt: unmarshalDate(data.created_at), deletedAt: unmarshalDate(data.deleted_at), - edgeServicesBackendStageInfo: data.edge_services_backend_stage_info - ? unmarshalEdgeServicesBackendStageInfo( - data.edge_services_backend_stage_info, - ) - : undefined, - edgeServicesCacheStageInfo: data.edge_services_cache_stage_info - ? unmarshalEdgeServicesCacheStageInfo(data.edge_services_cache_stage_info) - : undefined, - edgeServicesDnsStageInfo: data.edge_services_dns_stage_info - ? unmarshalEdgeServicesDNSStageInfo(data.edge_services_dns_stage_info) - : undefined, - edgeServicesPipelineInfo: data.edge_services_pipeline_info - ? unmarshalEdgeServicesPipelineInfo(data.edge_services_pipeline_info) - : undefined, - edgeServicesPlanInfo: data.edge_services_plan_info - ? unmarshalEdgeServicesPlanInfo(data.edge_services_plan_info) - : undefined, - edgeServicesRouteRulesInfo: data.edge_services_route_rules_info - ? unmarshalEdgeServicesRouteRulesInfo(data.edge_services_route_rules_info) - : undefined, - edgeServicesRouteStageInfo: data.edge_services_route_stage_info - ? unmarshalEdgeServicesRouteStageInfo(data.edge_services_route_stage_info) - : undefined, - edgeServicesTlsStageInfo: data.edge_services_tls_stage_info - ? unmarshalEdgeServicesTLSStageInfo(data.edge_services_tls_stage_info) - : undefined, - edgeServicesWafStageInfo: data.edge_services_waf_stage_info - ? unmarshalEdgeServicesWAFStageInfo(data.edge_services_waf_stage_info) - : undefined, + edgeServicesBackendStageInfo: data.edge_services_backend_stage_info ? unmarshalEdgeServicesBackendStageInfo(data.edge_services_backend_stage_info) : undefined, + edgeServicesCacheStageInfo: data.edge_services_cache_stage_info ? unmarshalEdgeServicesCacheStageInfo(data.edge_services_cache_stage_info) : undefined, + edgeServicesDnsStageInfo: data.edge_services_dns_stage_info ? unmarshalEdgeServicesDNSStageInfo(data.edge_services_dns_stage_info) : undefined, + edgeServicesPipelineInfo: data.edge_services_pipeline_info ? unmarshalEdgeServicesPipelineInfo(data.edge_services_pipeline_info) : undefined, + edgeServicesPlanInfo: data.edge_services_plan_info ? unmarshalEdgeServicesPlanInfo(data.edge_services_plan_info) : undefined, + edgeServicesRouteRulesInfo: data.edge_services_route_rules_info ? unmarshalEdgeServicesRouteRulesInfo(data.edge_services_route_rules_info) : undefined, + edgeServicesRouteStageInfo: data.edge_services_route_stage_info ? unmarshalEdgeServicesRouteStageInfo(data.edge_services_route_stage_info) : undefined, + edgeServicesTlsStageInfo: data.edge_services_tls_stage_info ? unmarshalEdgeServicesTLSStageInfo(data.edge_services_tls_stage_info) : undefined, + edgeServicesWafStageInfo: data.edge_services_waf_stage_info ? unmarshalEdgeServicesWAFStageInfo(data.edge_services_waf_stage_info) : undefined, id: data.id, - instanceServerInfo: data.instance_server_info - ? unmarshalInstanceServerInfo(data.instance_server_info) - : undefined, - ipamIpInfo: data.ipam_ip_info - ? unmarshalIpamIpInfo(data.ipam_ip_info) - : undefined, - keyManagerKeyInfo: data.key_manager_key_info - ? unmarshalKeyManagerKeyInfo(data.key_manager_key_info) - : undefined, - keymKeyInfo: data.keym_key_info - ? unmarshalKeyManagerKeyInfo(data.keym_key_info) - : undefined, - kubeAclInfo: data.kube_acl_info - ? unmarshalKubernetesACLInfo(data.kube_acl_info) - : undefined, - kubeClusterInfo: data.kube_cluster_info - ? unmarshalKubernetesClusterInfo(data.kube_cluster_info) - : undefined, - kubeNodeInfo: data.kube_node_info - ? unmarshalKubernetesNodeInfo(data.kube_node_info) - : undefined, - kubePoolInfo: data.kube_pool_info - ? unmarshalKubernetesPoolInfo(data.kube_pool_info) - : undefined, - loadBalancerAclInfo: data.load_balancer_acl_info - ? unmarshalLoadBalancerAclInfo(data.load_balancer_acl_info) - : undefined, - loadBalancerBackendInfo: data.load_balancer_backend_info - ? unmarshalLoadBalancerBackendInfo(data.load_balancer_backend_info) - : undefined, - loadBalancerCertificateInfo: data.load_balancer_certificate_info - ? unmarshalLoadBalancerCertificateInfo( - data.load_balancer_certificate_info, - ) - : undefined, - loadBalancerFrontendInfo: data.load_balancer_frontend_info - ? unmarshalLoadBalancerFrontendInfo(data.load_balancer_frontend_info) - : undefined, - loadBalancerIpInfo: data.load_balancer_ip_info - ? unmarshalLoadBalancerIpInfo(data.load_balancer_ip_info) - : undefined, - loadBalancerLbInfo: data.load_balancer_lb_info - ? unmarshalLoadBalancerLbInfo(data.load_balancer_lb_info) - : undefined, - loadBalancerRouteInfo: data.load_balancer_route_info - ? unmarshalLoadBalancerRouteInfo(data.load_balancer_route_info) - : undefined, + instanceServerInfo: data.instance_server_info ? unmarshalInstanceServerInfo(data.instance_server_info) : undefined, + ipamIpInfo: data.ipam_ip_info ? unmarshalIpamIpInfo(data.ipam_ip_info) : undefined, + keyManagerKeyInfo: data.key_manager_key_info ? unmarshalKeyManagerKeyInfo(data.key_manager_key_info) : undefined, + keymKeyInfo: data.keym_key_info ? unmarshalKeyManagerKeyInfo(data.keym_key_info) : undefined, + kubeAclInfo: data.kube_acl_info ? unmarshalKubernetesACLInfo(data.kube_acl_info) : undefined, + kubeClusterInfo: data.kube_cluster_info ? unmarshalKubernetesClusterInfo(data.kube_cluster_info) : undefined, + kubeNodeInfo: data.kube_node_info ? unmarshalKubernetesNodeInfo(data.kube_node_info) : undefined, + kubePoolInfo: data.kube_pool_info ? unmarshalKubernetesPoolInfo(data.kube_pool_info) : undefined, + loadBalancerAclInfo: data.load_balancer_acl_info ? unmarshalLoadBalancerAclInfo(data.load_balancer_acl_info) : undefined, + loadBalancerBackendInfo: data.load_balancer_backend_info ? unmarshalLoadBalancerBackendInfo(data.load_balancer_backend_info) : undefined, + loadBalancerCertificateInfo: data.load_balancer_certificate_info ? unmarshalLoadBalancerCertificateInfo(data.load_balancer_certificate_info) : undefined, + loadBalancerFrontendInfo: data.load_balancer_frontend_info ? unmarshalLoadBalancerFrontendInfo(data.load_balancer_frontend_info) : undefined, + loadBalancerIpInfo: data.load_balancer_ip_info ? unmarshalLoadBalancerIpInfo(data.load_balancer_ip_info) : undefined, + loadBalancerLbInfo: data.load_balancer_lb_info ? unmarshalLoadBalancerLbInfo(data.load_balancer_lb_info) : undefined, + loadBalancerRouteInfo: data.load_balancer_route_info ? unmarshalLoadBalancerRouteInfo(data.load_balancer_route_info) : undefined, name: data.name, - secmSecretInfo: data.secm_secret_info - ? unmarshalSecretManagerSecretInfo(data.secm_secret_info) - : undefined, - secmSecretVersionInfo: data.secm_secret_version_info - ? unmarshalSecretManagerSecretVersionInfo(data.secm_secret_version_info) - : undefined, - secretManagerSecretInfo: data.secret_manager_secret_info - ? unmarshalSecretManagerSecretInfo(data.secret_manager_secret_info) - : undefined, - secretManagerVersionInfo: data.secret_manager_version_info - ? unmarshalSecretManagerSecretVersionInfo( - data.secret_manager_version_info, - ) - : undefined, + secmSecretInfo: data.secm_secret_info ? unmarshalSecretManagerSecretInfo(data.secm_secret_info) : undefined, + secmSecretVersionInfo: data.secm_secret_version_info ? unmarshalSecretManagerSecretVersionInfo(data.secm_secret_version_info) : undefined, + secretManagerSecretInfo: data.secret_manager_secret_info ? unmarshalSecretManagerSecretInfo(data.secret_manager_secret_info) : undefined, + secretManagerVersionInfo: data.secret_manager_version_info ? unmarshalSecretManagerSecretVersionInfo(data.secret_manager_version_info) : undefined, type: data.type, updatedAt: unmarshalDate(data.updated_at), } as Resource @@ -662,9 +551,7 @@ const unmarshalAuthenticationEvent = (data: unknown): AuthenticationEvent => { } as AuthenticationEvent } -export const unmarshalListAuthenticationEventsResponse = ( - data: unknown, -): ListAuthenticationEventsResponse => { +export const unmarshalListAuthenticationEventsResponse = (data: unknown): ListAuthenticationEventsResponse => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'ListAuthenticationEventsResponse' failed as data isn't a dictionary.`, @@ -701,9 +588,7 @@ export const unmarshalEvent = (data: unknown): Event => { locality: data.locality, methodName: data.method_name, organizationId: data.organization_id, - principal: data.principal - ? unmarshalEventPrincipal(data.principal) - : undefined, + principal: data.principal ? unmarshalEventPrincipal(data.principal) : undefined, productName: data.product_name, projectId: data.project_id, recordedAt: unmarshalDate(data.recorded_at), @@ -738,9 +623,7 @@ const unmarshalSystemEvent = (data: unknown): SystemEvent => { } as SystemEvent } -const unmarshalListCombinedEventsResponseCombinedEvent = ( - data: unknown, -): ListCombinedEventsResponseCombinedEvent => { +const unmarshalListCombinedEventsResponseCombinedEvent = (data: unknown): ListCombinedEventsResponseCombinedEvent => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'ListCombinedEventsResponseCombinedEvent' failed as data isn't a dictionary.`, @@ -754,9 +637,7 @@ const unmarshalListCombinedEventsResponseCombinedEvent = ( } as ListCombinedEventsResponseCombinedEvent } -export const unmarshalListCombinedEventsResponse = ( - data: unknown, -): ListCombinedEventsResponse => { +export const unmarshalListCombinedEventsResponse = (data: unknown): ListCombinedEventsResponse => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'ListCombinedEventsResponse' failed as data isn't a dictionary.`, @@ -764,17 +645,12 @@ export const unmarshalListCombinedEventsResponse = ( } return { - events: unmarshalArrayOfObject( - data.events, - unmarshalListCombinedEventsResponseCombinedEvent, - ), + events: unmarshalArrayOfObject(data.events, unmarshalListCombinedEventsResponseCombinedEvent), nextPageToken: data.next_page_token, } as ListCombinedEventsResponse } -export const unmarshalListEventsResponse = ( - data: unknown, -): ListEventsResponse => { +export const unmarshalListEventsResponse = (data: unknown): ListEventsResponse => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'ListEventsResponse' failed as data isn't a dictionary.`, @@ -787,9 +663,7 @@ export const unmarshalListEventsResponse = ( } as ListEventsResponse } -export const unmarshalListExportJobsResponse = ( - data: unknown, -): ListExportJobsResponse => { +export const unmarshalListExportJobsResponse = (data: unknown): ListExportJobsResponse => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'ListExportJobsResponse' failed as data isn't a dictionary.`, @@ -829,9 +703,7 @@ const unmarshalProduct = (data: unknown): Product => { } as Product } -export const unmarshalListProductsResponse = ( - data: unknown, -): ListProductsResponse => { +export const unmarshalListProductsResponse = (data: unknown): ListProductsResponse => { if (!isJSONObject(data)) { throw new TypeError( `Unmarshalling the type 'ListProductsResponse' failed as data isn't a dictionary.`, @@ -860,14 +732,11 @@ export const marshalCreateExportJobRequest = ( ): Record => ({ name: request.name, organization_id: request.organizationId ?? defaults.defaultOrganizationId, - tags: request.tags, + tags: request.tags, ...resolveOneOf([ - { - param: 's3', - value: - request.s3 !== undefined - ? marshalExportJobS3(request.s3, defaults) - : undefined, + {param: 's3', + value: (request.s3 !== undefined) ? marshalExportJobS3(request.s3, defaults) + : undefined, }, ]), }) diff --git a/packages_generated/audit_trail/src/v1alpha1/types.gen.ts b/packages_generated/audit_trail/src/v1alpha1/types.gen.ts index cba1c7fde..613e16479 100644 --- a/packages_generated/audit_trail/src/v1alpha1/types.gen.ts +++ b/packages_generated/audit_trail/src/v1alpha1/types.gen.ts @@ -1,14 +1,17 @@ // 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 as ScwRegion } from '@scaleway/sdk-client' -import type { CountryCode as StdCountryCode } from '@scaleway/sdk-std' +import type { Region as ScwRegion, } from '@scaleway/sdk-client' +import type {CountryCode as StdCountryCode,} from '@scaleway/sdk-std' + export type AuthenticationEventFailureReason = | 'unknown_failure_reason' | 'invalid_mfa' | 'invalid_password' -export type AuthenticationEventMFAType = 'unknown_mfa_type' | 'totp' +export type AuthenticationEventMFAType = + | 'unknown_mfa_type' + | 'totp' export type AuthenticationEventMethod = | 'unknown_method' @@ -22,9 +25,15 @@ export type AuthenticationEventOrigin = | 'public_api' | 'admin_api' -export type AuthenticationEventResult = 'unknown_result' | 'success' | 'failure' +export type AuthenticationEventResult = + | 'unknown_result' + | 'success' + | 'failure' -export type ExportJobStatusCode = 'unknown_code' | 'success' | 'failure' +export type ExportJobStatusCode = + | 'unknown_code' + | 'success' + | 'failure' export type ListAuthenticationEventsRequestOrderBy = | 'recorded_at_desc' @@ -34,7 +43,9 @@ export type ListCombinedEventsRequestOrderBy = | 'recorded_at_desc' | 'recorded_at_asc' -export type ListEventsRequestOrderBy = 'recorded_at_desc' | 'recorded_at_asc' +export type ListEventsRequestOrderBy = + | 'recorded_at_desc' + | 'recorded_at_asc' export type ListExportJobsRequestOrderBy = | 'name_asc' @@ -98,134 +109,177 @@ export type ResourceType = | 'edge_services_route_rules' | 'edge_services_waf_stage' | 'edge_services_backend_stage' + | 's2s_vpn_gateway' + | 's2s_customer_gateway' + | 's2s_routing_policy' + | 's2s_connection' + +export type SystemEventKind = + | 'unknown_kind' + | 'cron' + | 'notification' -export type SystemEventKind = 'unknown_kind' | 'cron' | 'notification' +export interface AccountOrganizationInfo { +} -export interface AccountOrganizationInfo {} export interface AccountProjectInfo { description: string } + export interface AccountUserInfo { email: string phoneNumber?: string } + export interface AppleSiliconServerInfo { id: string name: string } + export interface BaremetalServerInfo { description: string tags: string[] } + export interface BaremetalSettingInfo { type: string } + export interface EdgeServicesBackendStageInfo { pipelineId?: string } + export interface EdgeServicesCacheStageInfo { pipelineId?: string } + export interface EdgeServicesDNSStageInfo { pipelineId?: string } + export interface EdgeServicesPipelineInfo { name: string } -export interface EdgeServicesPlanInfo {} + +export interface EdgeServicesPlanInfo { +} + export interface EdgeServicesRouteRulesInfo { routeStageId: string } + export interface EdgeServicesRouteStageInfo { pipelineId?: string } + export interface EdgeServicesTLSStageInfo { pipelineId?: string } + export interface EdgeServicesWAFStageInfo { pipelineId?: string } + export interface InstanceServerInfo { name: string } + export interface IpamIpInfo { address: string } -export interface KeyManagerKeyInfo {} -export interface KubernetesACLInfo {} +export interface KeyManagerKeyInfo { +} + + +export interface KubernetesACLInfo { +} + + +export interface KubernetesClusterInfo { +} -export interface KubernetesClusterInfo {} export interface KubernetesNodeInfo { id: string name: string } + export interface KubernetesPoolInfo { id: string name: string } + export interface LoadBalancerAclInfo { frontendId: string } + export interface LoadBalancerBackendInfo { lbId: string name: string } + export interface LoadBalancerCertificateInfo { lbId: string name: string } + export interface LoadBalancerFrontendInfo { lbId: string name: string } + export interface LoadBalancerIpInfo { ipAddress: string lbId?: string } + export interface LoadBalancerLbInfo { name: string } + export interface LoadBalancerRouteInfo { frontendId: string backendId: string } + export interface SecretManagerSecretInfo { path: string keyId?: string } + export interface SecretManagerSecretVersionInfo { revision: number } + export interface Resource { id: string type: ResourceType @@ -234,13 +288,13 @@ export interface Resource { deletedAt?: Date name?: string /** - * @deprecated + * @deprecated * * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', 'keymKeyInfo', 'secretManagerSecretInfo', 'secretManagerVersionInfo', 'keyManagerKeyInfo', 'accountUserInfo', 'accountOrganizationInfo', 'instanceServerInfo', 'appleSiliconServerInfo', 'accountProjectInfo', 'baremetalServerInfo', 'baremetalSettingInfo', 'ipamIpInfo', 'loadBalancerLbInfo', 'loadBalancerIpInfo', 'loadBalancerFrontendInfo', 'loadBalancerBackendInfo', 'loadBalancerRouteInfo', 'loadBalancerAclInfo', 'loadBalancerCertificateInfo', 'edgeServicesPlanInfo', 'edgeServicesPipelineInfo', 'edgeServicesDnsStageInfo', 'edgeServicesTlsStageInfo', 'edgeServicesCacheStageInfo', 'edgeServicesRouteStageInfo', 'edgeServicesRouteRulesInfo', 'edgeServicesWafStageInfo', 'edgeServicesBackendStageInfo' could be set. */ secmSecretInfo?: SecretManagerSecretInfo /** - * @deprecated + * @deprecated * * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', 'keymKeyInfo', 'secretManagerSecretInfo', 'secretManagerVersionInfo', 'keyManagerKeyInfo', 'accountUserInfo', 'accountOrganizationInfo', 'instanceServerInfo', 'appleSiliconServerInfo', 'accountProjectInfo', 'baremetalServerInfo', 'baremetalSettingInfo', 'ipamIpInfo', 'loadBalancerLbInfo', 'loadBalancerIpInfo', 'loadBalancerFrontendInfo', 'loadBalancerBackendInfo', 'loadBalancerRouteInfo', 'loadBalancerAclInfo', 'loadBalancerCertificateInfo', 'edgeServicesPlanInfo', 'edgeServicesPipelineInfo', 'edgeServicesDnsStageInfo', 'edgeServicesTlsStageInfo', 'edgeServicesCacheStageInfo', 'edgeServicesRouteStageInfo', 'edgeServicesRouteRulesInfo', 'edgeServicesWafStageInfo', 'edgeServicesBackendStageInfo' could be set. */ @@ -266,7 +320,7 @@ export interface Resource { */ kubeAclInfo?: KubernetesACLInfo /** - * @deprecated + * @deprecated * * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', 'keymKeyInfo', 'secretManagerSecretInfo', 'secretManagerVersionInfo', 'keyManagerKeyInfo', 'accountUserInfo', 'accountOrganizationInfo', 'instanceServerInfo', 'appleSiliconServerInfo', 'accountProjectInfo', 'baremetalServerInfo', 'baremetalSettingInfo', 'ipamIpInfo', 'loadBalancerLbInfo', 'loadBalancerIpInfo', 'loadBalancerFrontendInfo', 'loadBalancerBackendInfo', 'loadBalancerRouteInfo', 'loadBalancerAclInfo', 'loadBalancerCertificateInfo', 'edgeServicesPlanInfo', 'edgeServicesPipelineInfo', 'edgeServicesDnsStageInfo', 'edgeServicesTlsStageInfo', 'edgeServicesCacheStageInfo', 'edgeServicesRouteStageInfo', 'edgeServicesRouteRulesInfo', 'edgeServicesWafStageInfo', 'edgeServicesBackendStageInfo' could be set. */ @@ -297,7 +351,7 @@ export interface Resource { */ accountOrganizationInfo?: AccountOrganizationInfo /** - * @deprecated + * @deprecated * * One-of ('info'): at most one of 'secmSecretInfo', 'secmSecretVersionInfo', 'kubeClusterInfo', 'kubePoolInfo', 'kubeNodeInfo', 'kubeAclInfo', 'keymKeyInfo', 'secretManagerSecretInfo', 'secretManagerVersionInfo', 'keyManagerKeyInfo', 'accountUserInfo', 'accountOrganizationInfo', 'instanceServerInfo', 'appleSiliconServerInfo', 'accountProjectInfo', 'baremetalServerInfo', 'baremetalSettingInfo', 'ipamIpInfo', 'loadBalancerLbInfo', 'loadBalancerIpInfo', 'loadBalancerFrontendInfo', 'loadBalancerBackendInfo', 'loadBalancerRouteInfo', 'loadBalancerAclInfo', 'loadBalancerCertificateInfo', 'edgeServicesPlanInfo', 'edgeServicesPipelineInfo', 'edgeServicesDnsStageInfo', 'edgeServicesTlsStageInfo', 'edgeServicesCacheStageInfo', 'edgeServicesRouteStageInfo', 'edgeServicesRouteRulesInfo', 'edgeServicesWafStageInfo', 'edgeServicesBackendStageInfo' could be set. */ @@ -409,10 +463,12 @@ export interface Resource { edgeServicesBackendStageInfo?: EdgeServicesBackendStageInfo } + export interface EventPrincipal { id: string } + export interface AuthenticationEvent { /** * ID of the event. @@ -464,6 +520,7 @@ export interface AuthenticationEvent { mfaType?: AuthenticationEventMFAType } + export interface Event { /** * ID of the event. @@ -529,6 +586,7 @@ export interface Event { statusCode: number } + export interface SystemEvent { id: string recordedAt?: Date @@ -542,6 +600,7 @@ export interface SystemEvent { productName: string } + export interface ExportJobS3 { bucket: string /** @@ -552,16 +611,19 @@ export interface ExportJobS3 { projectId?: string } + export interface ExportJobStatus { code: ExportJobStatusCode message?: string } + export interface ProductService { name: string methods: string[] } + export interface ListCombinedEventsResponseCombinedEvent { /** * @@ -580,6 +642,7 @@ export interface ListCombinedEventsResponseCombinedEvent { system?: SystemEvent } + export interface ExportJob { /** * ID of the export job. @@ -617,6 +680,7 @@ export interface ExportJob { lastStatus?: ExportJobStatus } + export interface Product { /** * Product title. @@ -632,6 +696,7 @@ export interface Product { services: ProductService[] } + export type CreateExportJobRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -657,6 +722,7 @@ export type CreateExportJobRequest = { tags?: string[] } + export type DeleteExportJobRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -668,6 +734,7 @@ export type DeleteExportJobRequest = { exportJobId: string } + export type ListAuthenticationEventsRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -681,11 +748,13 @@ export type ListAuthenticationEventsRequest = { pageToken?: string } + export interface ListAuthenticationEventsResponse { events: AuthenticationEvent[] nextPageToken?: string } + export type ListCombinedEventsRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -701,11 +770,13 @@ export type ListCombinedEventsRequest = { pageToken?: string } + export interface ListCombinedEventsResponse { events: ListCombinedEventsResponseCombinedEvent[] nextPageToken?: string } + export type ListEventsRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -764,6 +835,7 @@ export type ListEventsRequest = { sourceIp?: string } + export interface ListEventsResponse { /** * Single page of events matching the requested criteria. @@ -775,6 +847,7 @@ export interface ListEventsResponse { nextPageToken?: string } + export type ListExportJobsRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -797,6 +870,7 @@ export type ListExportJobsRequest = { orderBy?: ListExportJobsRequestOrderBy } + export interface ListExportJobsResponse { /** * Single page of export jobs matching the requested criteria. @@ -808,6 +882,7 @@ export interface ListExportJobsResponse { totalCount: number } + export type ListProductsRequest = { /** * Region to target. If none is passed will use default region from the config. @@ -819,6 +894,7 @@ export type ListProductsRequest = { organizationId?: string } + export interface ListProductsResponse { /** * List of all products integrated with Audit Trail. @@ -829,3 +905,5 @@ export interface ListProductsResponse { */ totalCount: number } + +