From 4630aba225fcc81542ad038dad76500afe3d69ad Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Tue, 15 Jul 2025 14:57:18 +0000 Subject: [PATCH] feat: update generated APIs --- .../baremetal/src/v1/api.gen.ts | 21 ++++++++++--------- .../baremetal/src/v1/marshalling.gen.ts | 18 +++++++++------- .../baremetal/src/v1/types.gen.ts | 12 +++++++++++ .../baremetal/src/v3/api.gen.ts | 5 +++-- .../baremetal/src/v3/marshalling.gen.ts | 3 ++- 5 files changed, 39 insertions(+), 20 deletions(-) diff --git a/packages_generated/baremetal/src/v1/api.gen.ts b/packages_generated/baremetal/src/v1/api.gen.ts index 2213555ba..d9cd13009 100644 --- a/packages_generated/baremetal/src/v1/api.gen.ts +++ b/packages_generated/baremetal/src/v1/api.gen.ts @@ -1,14 +1,15 @@ // This file was automatically generated. DO NOT EDIT. // If you have any remark or suggestion do not hesitate to open an issue. + +import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client' import { - API as ParentAPI, enrichForPagination, + API as ParentAPI, toApiLocality, urlParams, validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client' import { SERVER_TRANSIENT_STATUSES as SERVER_TRANSIENT_STATUSES_BAREMETAL } from './content.gen' import { marshalAddOptionServerRequest, @@ -26,16 +27,16 @@ import { unmarshalBMCAccess, unmarshalGetServerMetricsResponse, unmarshalIP, - unmarshalListOSResponse, unmarshalListOffersResponse, unmarshalListOptionsResponse, + unmarshalListOSResponse, unmarshalListServerEventsResponse, unmarshalListServerPrivateNetworksResponse, unmarshalListServersResponse, unmarshalListSettingsResponse, - unmarshalOS, unmarshalOffer, unmarshalOption, + unmarshalOS, unmarshalSchema, unmarshalServer, unmarshalServerPrivateNetwork, @@ -50,20 +51,20 @@ import type { DeleteServerRequest, GetBMCAccessRequest, GetDefaultPartitioningSchemaRequest, - GetOSRequest, GetOfferRequest, GetOptionRequest, + GetOSRequest, GetServerMetricsRequest, GetServerMetricsResponse, GetServerRequest, - IP, InstallServerRequest, - ListOSRequest, - ListOSResponse, + IP, ListOffersRequest, ListOffersResponse, ListOptionsRequest, ListOptionsResponse, + ListOSRequest, + ListOSResponse, ListServerEventsRequest, ListServerEventsResponse, ListServerPrivateNetworksResponse, @@ -72,9 +73,9 @@ import type { ListSettingsRequest, ListSettingsResponse, MigrateServerToMonthlyOfferRequest, - OS, Offer, Option, + OS, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiDeleteServerPrivateNetworkRequest, PrivateNetworkApiListServerPrivateNetworksRequest, @@ -209,7 +210,7 @@ export class API extends ParentAPI { ) /** - * Update an Elastic Metal server. Update the server associated with the ID. You can update parameters such as the server's name, tags and description. Any parameters left null in the request body are not updated. + * Update an Elastic Metal server. Update the server associated with the ID. You can update parameters such as the server's name, tags, description and protection flag. Any parameters left null in the request body are not updated. * * @param request - The request {@link UpdateServerRequest} * @returns A Promise of Server diff --git a/packages_generated/baremetal/src/v1/marshalling.gen.ts b/packages_generated/baremetal/src/v1/marshalling.gen.ts index 9a48aff5b..52f6fc4e6 100644 --- a/packages_generated/baremetal/src/v1/marshalling.gen.ts +++ b/packages_generated/baremetal/src/v1/marshalling.gen.ts @@ -1,5 +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 type { DefaultValues } from '@scaleway/sdk-client' import { isJSONObject, resolveOneOf, @@ -8,33 +10,32 @@ import { unmarshalMoney, unmarshalTimeSeries, } from '@scaleway/sdk-client' -import type { DefaultValues } from '@scaleway/sdk-client' import type { AddOptionServerRequest, BMCAccess, - CPU, CertificationOption, + CPU, CreateServerRequest, CreateServerRequestInstall, Disk, - GPU, GetServerMetricsResponse, - IP, + GPU, InstallServerRequest, + IP, LicenseOption, - ListOSResponse, ListOffersResponse, ListOptionsResponse, + ListOSResponse, ListServerEventsResponse, ListServerPrivateNetworksResponse, ListServersResponse, ListSettingsResponse, Memory, - OS, - OSOSField, Offer, OfferOptionOffer, Option, + OS, + OSOSField, PersistentMemory, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, @@ -582,6 +583,7 @@ export const unmarshalServer = (data: unknown): Server => { organizationId: data.organization_id, pingStatus: data.ping_status, projectId: data.project_id, + protected: data.protected, rescueServer: data.rescue_server ? unmarshalServerRescueServer(data.rescue_server) : undefined, @@ -881,6 +883,7 @@ export const marshalCreateServerRequest = ( name: request.name, offer_id: request.offerId, option_ids: request.optionIds, + protected: request.protected, tags: request.tags, ...resolveOneOf([ { @@ -961,6 +964,7 @@ export const marshalUpdateServerRequest = ( ): Record => ({ description: request.description, name: request.name, + protected: request.protected, tags: request.tags, }) diff --git a/packages_generated/baremetal/src/v1/types.gen.ts b/packages_generated/baremetal/src/v1/types.gen.ts index ffd84be44..0bb50ff92 100644 --- a/packages_generated/baremetal/src/v1/types.gen.ts +++ b/packages_generated/baremetal/src/v1/types.gen.ts @@ -814,6 +814,10 @@ export interface Server { * Configuration of rescue boot. */ rescueServer?: ServerRescueServer + /** + * If enabled, the server can not be deleted. + */ + protected: boolean } export interface Setting { @@ -914,6 +918,10 @@ export type CreateServerRequest = { * IDs of options to enable on server. */ optionIds?: string[] + /** + * If enabled, the server can not be deleted. + */ + protected: boolean } export type DeleteOptionServerRequest = { @@ -1500,6 +1508,10 @@ export type UpdateServerRequest = { * Tags associated with the server, not updated if null. */ tags?: string[] + /** + * If enabled, the server can not be deleted. + */ + protected?: boolean } export type UpdateSettingRequest = { diff --git a/packages_generated/baremetal/src/v3/api.gen.ts b/packages_generated/baremetal/src/v3/api.gen.ts index 8af542d30..c8acc954b 100644 --- a/packages_generated/baremetal/src/v3/api.gen.ts +++ b/packages_generated/baremetal/src/v3/api.gen.ts @@ -1,13 +1,14 @@ // This file was automatically generated. DO NOT EDIT. // If you have any remark or suggestion do not hesitate to open an issue. + +import type { ApiLocality } from '@scaleway/sdk-client' import { - API as ParentAPI, enrichForPagination, + API as ParentAPI, toApiLocality, urlParams, validatePathParam, } from '@scaleway/sdk-client' -import type { ApiLocality } from '@scaleway/sdk-client' import { marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, diff --git a/packages_generated/baremetal/src/v3/marshalling.gen.ts b/packages_generated/baremetal/src/v3/marshalling.gen.ts index 3cec32cca..76d5565e5 100644 --- a/packages_generated/baremetal/src/v3/marshalling.gen.ts +++ b/packages_generated/baremetal/src/v3/marshalling.gen.ts @@ -1,11 +1,12 @@ // This file was automatically generated. DO NOT EDIT. // If you have any remark or suggestion do not hesitate to open an issue. + +import type { DefaultValues } from '@scaleway/sdk-client' import { isJSONObject, unmarshalArrayOfObject, unmarshalDate, } from '@scaleway/sdk-client' -import type { DefaultValues } from '@scaleway/sdk-client' import type { ListServerPrivateNetworksResponse, PrivateNetworkApiAddServerPrivateNetworkRequest,