From 6601cccbc582496ddd48b18005097722ece6fcc0 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Wed, 2 Jul 2025 14:18:24 +0000 Subject: [PATCH] feat: update generated APIs --- .../product_catalog/src/v2alpha1/index.gen.ts | 1 + .../src/v2alpha1/marshalling.gen.ts | 19 ++++++++++++++ .../product_catalog/src/v2alpha1/types.gen.ts | 25 ++++++++++++++++--- 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/packages_generated/product_catalog/src/v2alpha1/index.gen.ts b/packages_generated/product_catalog/src/v2alpha1/index.gen.ts index 51dd007d7..e367a7bf8 100644 --- a/packages_generated/product_catalog/src/v2alpha1/index.gen.ts +++ b/packages_generated/product_catalog/src/v2alpha1/index.gen.ts @@ -12,6 +12,7 @@ export type { PublicCatalogProductPrice, PublicCatalogProductProperties, PublicCatalogProductPropertiesAppleSilicon, + PublicCatalogProductPropertiesBlockStorage, PublicCatalogProductPropertiesDedibox, PublicCatalogProductPropertiesElasticMetal, PublicCatalogProductPropertiesHardware, diff --git a/packages_generated/product_catalog/src/v2alpha1/marshalling.gen.ts b/packages_generated/product_catalog/src/v2alpha1/marshalling.gen.ts index e5760aa20..86c6021fe 100644 --- a/packages_generated/product_catalog/src/v2alpha1/marshalling.gen.ts +++ b/packages_generated/product_catalog/src/v2alpha1/marshalling.gen.ts @@ -14,6 +14,7 @@ import type { PublicCatalogProductPrice, PublicCatalogProductProperties, PublicCatalogProductPropertiesAppleSilicon, + PublicCatalogProductPropertiesBlockStorage, PublicCatalogProductPropertiesDedibox, PublicCatalogProductPropertiesElasticMetal, PublicCatalogProductPropertiesHardware, @@ -163,6 +164,21 @@ const unmarshalPublicCatalogProductPropertiesAppleSilicon = ( } as PublicCatalogProductPropertiesAppleSilicon } +const unmarshalPublicCatalogProductPropertiesBlockStorage = ( + data: unknown, +): PublicCatalogProductPropertiesBlockStorage => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'PublicCatalogProductPropertiesBlockStorage' failed as data isn't a dictionary.`, + ) + } + + return { + maxVolumeSize: data.max_volume_size, + minVolumeSize: data.min_volume_size, + } as PublicCatalogProductPropertiesBlockStorage +} + const unmarshalPublicCatalogProductPropertiesDedibox = ( data: unknown, ): PublicCatalogProductPropertiesDedibox => { @@ -296,6 +312,9 @@ const unmarshalPublicCatalogProductProperties = ( appleSilicon: data.apple_silicon ? unmarshalPublicCatalogProductPropertiesAppleSilicon(data.apple_silicon) : undefined, + blockStorage: data.block_storage + ? unmarshalPublicCatalogProductPropertiesBlockStorage(data.block_storage) + : undefined, dedibox: data.dedibox ? unmarshalPublicCatalogProductPropertiesDedibox(data.dedibox) : undefined, diff --git a/packages_generated/product_catalog/src/v2alpha1/types.gen.ts b/packages_generated/product_catalog/src/v2alpha1/types.gen.ts index 17990733f..fc082ecdd 100644 --- a/packages_generated/product_catalog/src/v2alpha1/types.gen.ts +++ b/packages_generated/product_catalog/src/v2alpha1/types.gen.ts @@ -185,6 +185,17 @@ export interface PublicCatalogProductPropertiesAppleSilicon { range: string } +export interface PublicCatalogProductPropertiesBlockStorage { + /** + * The minimum size of storage volume for this product in bytes. + */ + minVolumeSize: number + /** + * The maximum size of storage volume for this product in bytes. + */ + maxVolumeSize: number +} + export interface PublicCatalogProductPropertiesDedibox { /** * The range of the Dedibox server. @@ -284,27 +295,33 @@ export interface PublicCatalogProductProperties { /** * The properties of Dedibox products. * - * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance' could be set. + * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage' could be set. */ dedibox?: PublicCatalogProductPropertiesDedibox /** * The properties of Elastic Metal products. * - * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance' could be set. + * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage' could be set. */ elasticMetal?: PublicCatalogProductPropertiesElasticMetal /** * The properties of Apple Silicon products. * - * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance' could be set. + * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage' could be set. */ appleSilicon?: PublicCatalogProductPropertiesAppleSilicon /** * The properties of Instance products. * - * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance' could be set. + * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage' could be set. */ instance?: PublicCatalogProductPropertiesInstance + /** + * The properties of Block Storage products. + * + * One-of ('properties'): at most one of 'dedibox', 'elasticMetal', 'appleSilicon', 'instance', 'blockStorage' could be set. + */ + blockStorage?: PublicCatalogProductPropertiesBlockStorage } export interface PublicCatalogProductUnitOfMeasure {