diff --git a/packages_generated/applesilicon/src/v1alpha1/api.gen.ts b/packages_generated/applesilicon/src/v1alpha1/api.gen.ts index 44e13d811..3eaf746b1 100644 --- a/packages_generated/applesilicon/src/v1alpha1/api.gen.ts +++ b/packages_generated/applesilicon/src/v1alpha1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES as SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES_APPLESILICON, SERVER_TRANSIENT_STATUSES as SERVER_TRANSIENT_STATUSES_APPLESILICON, @@ -73,8 +75,13 @@ const jsonContentHeaders = { This API allows you to manage your Apple silicon machines. */ export class API extends ParentAPI { - /** Lists the available zones of the API. */ - public static readonly LOCALITIES: ScwZone[] = ['fr-par-3'] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + zones: ['fr-par-3'], + }) /** * List server types. List all technical details about Apple silicon server types available in the specified zone. Since there is only one Availability Zone for Apple silicon servers, the targeted value is `fr-par-3`. @@ -332,8 +339,13 @@ export class API extends ParentAPI { * Apple silicon - Private Networks API. */ export class PrivateNetworkAPI extends ParentAPI { - /** Lists the available zones of the API. */ - public static readonly LOCALITIES: ScwZone[] = ['fr-par-1', 'fr-par-3'] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + zones: ['fr-par-1', 'fr-par-3'], + }) getServerPrivateNetwork = ( request: Readonly, diff --git a/packages_generated/audit_trail/src/v1alpha1/api.gen.ts b/packages_generated/audit_trail/src/v1alpha1/api.gen.ts index b8001301b..1e60786e5 100644 --- a/packages_generated/audit_trail/src/v1alpha1/api.gen.ts +++ b/packages_generated/audit_trail/src/v1alpha1/api.gen.ts @@ -5,7 +5,8 @@ import { urlParams, validatePathParam, } from '@scaleway/sdk-client' -import type { Region as ScwRegion } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { unmarshalListEventsResponse, unmarshalListProductsResponse, @@ -23,8 +24,13 @@ import type { This API allows you to ensure accountability and security by recording events and changes performed within your Scaleway Organization. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = ['fr-par', 'nl-ams'] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + 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`. diff --git a/packages_generated/baremetal/src/v1/api.gen.ts b/packages_generated/baremetal/src/v1/api.gen.ts index 063922a81..a989cc7c5 100644 --- a/packages_generated/baremetal/src/v1/api.gen.ts +++ b/packages_generated/baremetal/src/v1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { SERVER_TRANSIENT_STATUSES as SERVER_TRANSIENT_STATUSES_BAREMETAL } from './content.gen' import { marshalAddOptionServerRequest, @@ -104,15 +106,20 @@ const jsonContentHeaders = { This API allows you to manage your Elastic Metal servers. */ export class API extends ParentAPI { - /** Lists the available zones of the API. */ - public static readonly LOCALITIES: ScwZone[] = [ - 'fr-par-1', - 'fr-par-2', - 'nl-ams-1', - 'nl-ams-2', - 'pl-waw-2', - 'pl-waw-3', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + zones: [ + 'fr-par-1', + 'fr-par-2', + 'nl-ams-1', + 'nl-ams-2', + 'pl-waw-2', + 'pl-waw-3', + ], + }) protected pageOfListServers = (request: Readonly = {}) => this.client.fetch( @@ -690,8 +697,13 @@ After adding the BMC option, you need to Get Remote Access to get the login/pass * Elastic Metal - Private Network API. */ export class PrivateNetworkAPI extends ParentAPI { - /** Lists the available zones of the API. */ - public static readonly LOCALITIES: ScwZone[] = ['fr-par-2'] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + zones: ['fr-par-2'], + }) /** * Add a server to a Private Network. diff --git a/packages_generated/baremetal/src/v3/api.gen.ts b/packages_generated/baremetal/src/v3/api.gen.ts index a55d42196..7ae7226ad 100644 --- a/packages_generated/baremetal/src/v3/api.gen.ts +++ b/packages_generated/baremetal/src/v3/api.gen.ts @@ -6,7 +6,8 @@ import { urlParams, validatePathParam, } from '@scaleway/sdk-client' -import type { Zone as ScwZone } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { marshalPrivateNetworkApiAddServerPrivateNetworkRequest, marshalPrivateNetworkApiSetServerPrivateNetworksRequest, @@ -32,15 +33,20 @@ const jsonContentHeaders = { * Elastic Metal - Private Networks API. */ export class PrivateNetworkAPI extends ParentAPI { - /** Lists the available zones of the API. */ - public static readonly LOCALITIES: ScwZone[] = [ - 'fr-par-1', - 'fr-par-2', - 'nl-ams-1', - 'nl-ams-2', - 'pl-waw-2', - 'pl-waw-3', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + zones: [ + 'fr-par-1', + 'fr-par-2', + 'nl-ams-1', + 'nl-ams-2', + 'pl-waw-2', + 'pl-waw-3', + ], + }) /** * Add a server to a Private Network. Add an Elastic Metal server to a Private Network. diff --git a/packages_generated/block/src/v1/api.gen.ts b/packages_generated/block/src/v1/api.gen.ts index 117503bd1..71ff06f40 100644 --- a/packages_generated/block/src/v1/api.gen.ts +++ b/packages_generated/block/src/v1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { SNAPSHOT_TRANSIENT_STATUSES as SNAPSHOT_TRANSIENT_STATUSES_BLOCK, VOLUME_TRANSIENT_STATUSES as VOLUME_TRANSIENT_STATUSES_BLOCK, @@ -56,18 +58,23 @@ const jsonContentHeaders = { This API allows you to manage your Block Storage volumes. */ export class API extends ParentAPI { - /** Lists the available zones of the API. */ - public static readonly LOCALITIES: ScwZone[] = [ - 'fr-par-1', - 'fr-par-2', - 'fr-par-3', - 'nl-ams-1', - 'nl-ams-2', - 'nl-ams-3', - 'pl-waw-1', - 'pl-waw-2', - 'pl-waw-3', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + zones: [ + 'fr-par-1', + 'fr-par-2', + 'fr-par-3', + 'nl-ams-1', + 'nl-ams-2', + 'nl-ams-3', + 'pl-waw-1', + 'pl-waw-2', + 'pl-waw-3', + ], + }) protected pageOfListVolumeTypes = ( request: Readonly = {}, diff --git a/packages_generated/block/src/v1alpha1/api.gen.ts b/packages_generated/block/src/v1alpha1/api.gen.ts index b956172b9..c687d44ad 100644 --- a/packages_generated/block/src/v1alpha1/api.gen.ts +++ b/packages_generated/block/src/v1alpha1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { SNAPSHOT_TRANSIENT_STATUSES as SNAPSHOT_TRANSIENT_STATUSES_BLOCK, VOLUME_TRANSIENT_STATUSES as VOLUME_TRANSIENT_STATUSES_BLOCK, @@ -58,18 +60,23 @@ const jsonContentHeaders = { This API allows you to manage your Block Storage volumes. */ export class API extends ParentAPI { - /** Lists the available zones of the API. */ - public static readonly LOCALITIES: ScwZone[] = [ - 'fr-par-1', - 'fr-par-2', - 'fr-par-3', - 'nl-ams-1', - 'nl-ams-2', - 'nl-ams-3', - 'pl-waw-1', - 'pl-waw-2', - 'pl-waw-3', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + zones: [ + 'fr-par-1', + 'fr-par-2', + 'fr-par-3', + 'nl-ams-1', + 'nl-ams-2', + 'nl-ams-3', + 'pl-waw-1', + 'pl-waw-2', + 'pl-waw-3', + ], + }) protected pageOfListVolumeTypes = ( request: Readonly = {}, diff --git a/packages_generated/cockpit/src/v1/api.gen.ts b/packages_generated/cockpit/src/v1/api.gen.ts index 61624b2a8..e57cdb5ef 100644 --- a/packages_generated/cockpit/src/v1/api.gen.ts +++ b/packages_generated/cockpit/src/v1/api.gen.ts @@ -6,7 +6,8 @@ import { urlParams, validatePathParam, } from '@scaleway/sdk-client' -import type { Region as ScwRegion } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { marshalGlobalApiCreateGrafanaUserRequest, marshalGlobalApiResetGrafanaUserPasswordRequest, @@ -386,12 +387,13 @@ Deprecated: retention is now managed at the data source level. The Cockpit API allows you to create data sources and Cockpit tokens to store and query data types such as metrics, logs, and traces. You can also push your data into Cockpit, and send alerts to your contact points when your resources may require your attention, using the regional Alert manager. */ export class RegionalAPI extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) /** * Get the Cockpit configuration. diff --git a/packages_generated/container/src/v1beta1/api.gen.ts b/packages_generated/container/src/v1beta1/api.gen.ts index 944278dd8..f63d8ccab 100644 --- a/packages_generated/container/src/v1beta1/api.gen.ts +++ b/packages_generated/container/src/v1beta1/api.gen.ts @@ -8,7 +8,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { CONTAINER_TRANSIENT_STATUSES as CONTAINER_TRANSIENT_STATUSES_CONTAINER, CRON_TRANSIENT_STATUSES as CRON_TRANSIENT_STATUSES_CONTAINER, @@ -95,12 +97,13 @@ const jsonContentHeaders = { This API allows you to manage your Serverless Containers. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) protected pageOfListNamespaces = ( request: Readonly = {}, diff --git a/packages_generated/dedibox/src/v1/api.gen.ts b/packages_generated/dedibox/src/v1/api.gen.ts index 8579d7a17..1cbbbf44b 100644 --- a/packages_generated/dedibox/src/v1/api.gen.ts +++ b/packages_generated/dedibox/src/v1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { BMC_ACCESS_TRANSIENT_STATUSES as BMC_ACCESS_TRANSIENT_STATUSES_DEDIBOX, RPN_SAN_TRANSIENT_STATUSES as RPN_SAN_TRANSIENT_STATUSES_DEDIBOX, @@ -253,12 +255,13 @@ const jsonContentHeaders = { * Dedibox Phoenix API. */ export class API extends ParentAPI { - /** Lists the available zones of the API. */ - public static readonly LOCALITIES: ScwZone[] = [ - 'fr-par-1', - 'fr-par-2', - 'nl-ams-1', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + zones: ['fr-par-1', 'fr-par-2', 'nl-ams-1'], + }) protected pageOfListServers = (request: Readonly = {}) => this.client.fetch( diff --git a/packages_generated/file/src/v1alpha1/api.gen.ts b/packages_generated/file/src/v1alpha1/api.gen.ts index 491f99ec1..e8e125939 100644 --- a/packages_generated/file/src/v1alpha1/api.gen.ts +++ b/packages_generated/file/src/v1alpha1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { FILE_SYSTEM_TRANSIENT_STATUSES as FILE_SYSTEM_TRANSIENT_STATUSES_FILE } from './content.gen' import { marshalCreateFileSystemRequest, @@ -38,8 +40,13 @@ const jsonContentHeaders = { This API allows you to manage your File Storage resources. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = ['fr-par'] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par'], + }) /** * Get filesystem details. Retrieve all properties and current status of a specific filesystem identified by its ID. diff --git a/packages_generated/flexibleip/src/v1alpha1/api.gen.ts b/packages_generated/flexibleip/src/v1alpha1/api.gen.ts index 0b87cb722..31da4a0a1 100644 --- a/packages_generated/flexibleip/src/v1alpha1/api.gen.ts +++ b/packages_generated/flexibleip/src/v1alpha1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { FLEXIBLE_IP_TRANSIENT_STATUSES as FLEXIBLE_IP_TRANSIENT_STATUSES_FLEXIBLEIP } from './content.gen' import { marshalAttachFlexibleIPRequest, @@ -50,15 +52,20 @@ const jsonContentHeaders = { This API allows you to manage your Elastic Metal servers' flexible public IP addresses. */ export class API extends ParentAPI { - /** Lists the available zones of the API. */ - public static readonly LOCALITIES: ScwZone[] = [ - 'fr-par-1', - 'fr-par-2', - 'nl-ams-1', - 'nl-ams-2', - 'pl-waw-2', - 'pl-waw-3', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + zones: [ + 'fr-par-1', + 'fr-par-2', + 'nl-ams-1', + 'nl-ams-2', + 'pl-waw-2', + 'pl-waw-3', + ], + }) /** * Create a new flexible IP. Generate a new flexible IP within a given zone, specifying its configuration including Project ID and description. diff --git a/packages_generated/function/src/v1beta1/api.gen.ts b/packages_generated/function/src/v1beta1/api.gen.ts index 592eb51c2..0c19e7c73 100644 --- a/packages_generated/function/src/v1beta1/api.gen.ts +++ b/packages_generated/function/src/v1beta1/api.gen.ts @@ -8,7 +8,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { CRON_TRANSIENT_STATUSES as CRON_TRANSIENT_STATUSES_FUNCTION, DOMAIN_TRANSIENT_STATUSES as DOMAIN_TRANSIENT_STATUSES_FUNCTION, @@ -104,12 +106,13 @@ const jsonContentHeaders = { This API allows you to manage your Serverless Functions. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) protected pageOfListNamespaces = ( request: Readonly = {}, diff --git a/packages_generated/inference/src/v1/api.gen.ts b/packages_generated/inference/src/v1/api.gen.ts index b6957c9ae..6193a1706 100644 --- a/packages_generated/inference/src/v1/api.gen.ts +++ b/packages_generated/inference/src/v1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { DEPLOYMENT_TRANSIENT_STATUSES as DEPLOYMENT_TRANSIENT_STATUSES_INFERENCE, MODEL_TRANSIENT_STATUSES as MODEL_TRANSIENT_STATUSES_INFERENCE, @@ -58,8 +60,13 @@ const jsonContentHeaders = { This API allows you to handle your Managed Inference services. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = ['fr-par'] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par'], + }) protected pageOfListDeployments = ( request: Readonly = {}, diff --git a/packages_generated/inference/src/v1beta1/api.gen.ts b/packages_generated/inference/src/v1beta1/api.gen.ts index 810321f83..41236c814 100644 --- a/packages_generated/inference/src/v1beta1/api.gen.ts +++ b/packages_generated/inference/src/v1beta1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { DEPLOYMENT_TRANSIENT_STATUSES as DEPLOYMENT_TRANSIENT_STATUSES_INFERENCE } from './content.gen' import { marshalAddDeploymentACLRulesRequest, @@ -67,8 +69,13 @@ const jsonContentHeaders = { This API allows you to manage your Inference services. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = ['fr-par'] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par'], + }) protected pageOfListDeployments = ( request: Readonly = {}, diff --git a/packages_generated/instance/src/v1/api.gen.ts b/packages_generated/instance/src/v1/api.gen.ts index 6f2bee4a4..98a892f8f 100644 --- a/packages_generated/instance/src/v1/api.gen.ts +++ b/packages_generated/instance/src/v1/api.gen.ts @@ -6,7 +6,8 @@ import { urlParams, validatePathParam, } from '@scaleway/sdk-client' -import type { Zone as ScwZone } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { marshalApplyBlockMigrationRequest, marshalAttachServerFileSystemRequest, @@ -253,18 +254,23 @@ const jsonContentHeaders = { This API allows you to manage your CPU and GPU Instances. */ export class API extends ParentAPI { - /** Lists the available zones of the API. */ - public static readonly LOCALITIES: ScwZone[] = [ - 'fr-par-1', - 'fr-par-2', - 'fr-par-3', - 'nl-ams-1', - 'nl-ams-2', - 'nl-ams-3', - 'pl-waw-1', - 'pl-waw-2', - 'pl-waw-3', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + zones: [ + 'fr-par-1', + 'fr-par-2', + 'fr-par-3', + 'nl-ams-1', + 'nl-ams-2', + 'nl-ams-3', + 'pl-waw-1', + 'pl-waw-2', + 'pl-waw-3', + ], + }) /** * Get availability. Get availability for all Instance types. diff --git a/packages_generated/interlink/src/v1beta1/api.gen.ts b/packages_generated/interlink/src/v1beta1/api.gen.ts index 1a211ddc8..06eeec13e 100644 --- a/packages_generated/interlink/src/v1beta1/api.gen.ts +++ b/packages_generated/interlink/src/v1beta1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { DEDICATED_CONNECTION_TRANSIENT_STATUSES as DEDICATED_CONNECTION_TRANSIENT_STATUSES_INTERLINK, LINK_TRANSIENT_STATUSES as LINK_TRANSIENT_STATUSES_INTERLINK, @@ -76,12 +78,13 @@ const jsonContentHeaders = { This API allows you to manage your Scaleway InterLink, to connect your on-premises infrastructure with your Scaleway VPC. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) protected pageOfListDedicatedConnections = ( request: Readonly = {}, diff --git a/packages_generated/iot/src/v1/api.gen.ts b/packages_generated/iot/src/v1/api.gen.ts index 456a61c3a..b876e7cc9 100644 --- a/packages_generated/iot/src/v1/api.gen.ts +++ b/packages_generated/iot/src/v1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { HUB_TRANSIENT_STATUSES as HUB_TRANSIENT_STATUSES_IOT } from './content.gen' import { marshalCreateDeviceRequest, @@ -107,8 +109,13 @@ const jsonContentHeaders = { This API allows you to manage your IoT hubs and devices. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = ['fr-par'] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par'], + }) protected pageOfListHubs = (request: Readonly = {}) => this.client.fetch( diff --git a/packages_generated/ipam/src/v1/api.gen.ts b/packages_generated/ipam/src/v1/api.gen.ts index 31c88c0c1..9edf70dc5 100644 --- a/packages_generated/ipam/src/v1/api.gen.ts +++ b/packages_generated/ipam/src/v1/api.gen.ts @@ -7,7 +7,8 @@ import { urlParams, validatePathParam, } from '@scaleway/sdk-client' -import type { Region as ScwRegion } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { marshalAttachIPRequest, marshalBookIPRequest, @@ -42,12 +43,13 @@ const jsonContentHeaders = { This API allows you to manage your Scaleway IP addresses with our IP Address Management tool. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) /** * Reserve a new IP. Reserve a new IP from the specified source. Currently IPs can only be reserved from a Private Network. diff --git a/packages_generated/jobs/src/v1alpha1/api.gen.ts b/packages_generated/jobs/src/v1alpha1/api.gen.ts index 561f8cea2..15ad00dc2 100644 --- a/packages_generated/jobs/src/v1alpha1/api.gen.ts +++ b/packages_generated/jobs/src/v1alpha1/api.gen.ts @@ -6,7 +6,8 @@ import { urlParams, validatePathParam, } from '@scaleway/sdk-client' -import type { Region as ScwRegion } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { marshalCreateJobDefinitionRequest, marshalCreateJobDefinitionSecretsRequest, @@ -63,12 +64,13 @@ const jsonContentHeaders = { This API allows you to manage your Serverless Jobs. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) /** * Create a new job definition in a specified Project. diff --git a/packages_generated/k8s/src/v1/api.gen.ts b/packages_generated/k8s/src/v1/api.gen.ts index 3ccbc6807..e48f4a8d4 100644 --- a/packages_generated/k8s/src/v1/api.gen.ts +++ b/packages_generated/k8s/src/v1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { CLUSTER_TRANSIENT_STATUSES as CLUSTER_TRANSIENT_STATUSES_K8S, NODE_TRANSIENT_STATUSES as NODE_TRANSIENT_STATUSES_K8S, @@ -105,12 +107,13 @@ const jsonContentHeaders = { This API allows you to manage Kubernetes Kapsule and Kosmos clusters. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) protected pageOfListClusters = ( request: Readonly = {}, diff --git a/packages_generated/key_manager/src/v1alpha1/api.gen.ts b/packages_generated/key_manager/src/v1alpha1/api.gen.ts index da1795c84..f6eb227b0 100644 --- a/packages_generated/key_manager/src/v1alpha1/api.gen.ts +++ b/packages_generated/key_manager/src/v1alpha1/api.gen.ts @@ -6,7 +6,8 @@ import { urlParams, validatePathParam, } from '@scaleway/sdk-client' -import type { Region as ScwRegion } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { marshalCreateKeyRequest, marshalDecryptRequest, @@ -64,12 +65,13 @@ const jsonContentHeaders = { This API allows you to create, manage and use cryptographic keys in a centralized and secure service. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) /** * Create a key. Create a key in a given region specified by the `region` parameter. Keys only support symmetric encryption. You can use keys to encrypt or decrypt arbitrary payloads, or to generate data encryption keys. **Data encryption keys are not stored in Key Manager**. diff --git a/packages_generated/lb/src/v1/api.gen.ts b/packages_generated/lb/src/v1/api.gen.ts index ed125ba72..4da3efe6e 100644 --- a/packages_generated/lb/src/v1/api.gen.ts +++ b/packages_generated/lb/src/v1/api.gen.ts @@ -7,11 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { - Region as ScwRegion, - Zone as ScwZone, - WaitForOptions, -} from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { CERTIFICATE_TRANSIENT_STATUSES as CERTIFICATE_TRANSIENT_STATUSES_LB, LB_TRANSIENT_STATUSES as LB_TRANSIENT_STATUSES_LB, @@ -232,17 +230,22 @@ const jsonContentHeaders = { This API allows you to manage your Scaleway Load Balancer services. */ export class ZonedAPI extends ParentAPI { - /** Lists the available zones of the API. */ - public static readonly LOCALITIES: ScwZone[] = [ - 'fr-par-1', - 'fr-par-2', - 'nl-ams-1', - 'nl-ams-2', - 'nl-ams-3', - 'pl-waw-1', - 'pl-waw-2', - 'pl-waw-3', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + zones: [ + 'fr-par-1', + 'fr-par-2', + 'nl-ams-1', + 'nl-ams-2', + 'nl-ams-3', + 'pl-waw-1', + 'pl-waw-2', + 'pl-waw-3', + ], + }) protected pageOfListLbs = (request: Readonly = {}) => this.client.fetch( @@ -1362,12 +1365,13 @@ export class ZonedAPI extends ParentAPI { This API allows you to manage your Load Balancers. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) protected pageOfListLbs = (request: Readonly = {}) => this.client.fetch( diff --git a/packages_generated/mnq/src/v1beta1/api.gen.ts b/packages_generated/mnq/src/v1beta1/api.gen.ts index e984146a9..cc21be904 100644 --- a/packages_generated/mnq/src/v1beta1/api.gen.ts +++ b/packages_generated/mnq/src/v1beta1/api.gen.ts @@ -6,7 +6,8 @@ import { urlParams, validatePathParam, } from '@scaleway/sdk-client' -import type { Region as ScwRegion } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { marshalNatsApiCreateNatsAccountRequest, marshalNatsApiCreateNatsCredentialsRequest, @@ -78,8 +79,13 @@ const jsonContentHeaders = { This API allows you to manage Scaleway NATS accounts. */ export class NatsAPI extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = ['fr-par', 'nl-ams'] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams'], + }) /** * Create a NATS account. Create a NATS account associated with a Project. @@ -271,8 +277,13 @@ export class NatsAPI extends ParentAPI { This API allows you to manage your Scaleway Topics and Events. */ export class SnsAPI extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = ['fr-par', 'nl-ams'] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams'], + }) /** * Activate Topics and Events. Activate Topics and Events for the specified Project ID. Topics and Events must be activated before any usage. Activating Topics and Events does not trigger any billing, and you can deactivate at any time. @@ -449,8 +460,13 @@ export class SnsAPI extends ParentAPI { This API allows you to manage your Scaleway Queues. */ export class SqsAPI extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = ['fr-par', 'nl-ams'] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams'], + }) /** * Activate Queues. Activate Queues for the specified Project ID. Queues must be activated before any usage such as creating credentials and queues. Activating Queues does not trigger any billing, and you can deactivate at any time. diff --git a/packages_generated/mongodb/src/v1alpha1/api.gen.ts b/packages_generated/mongodb/src/v1alpha1/api.gen.ts index c908f3f8c..1d92446bc 100644 --- a/packages_generated/mongodb/src/v1alpha1/api.gen.ts +++ b/packages_generated/mongodb/src/v1alpha1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { INSTANCE_TRANSIENT_STATUSES as INSTANCE_TRANSIENT_STATUSES_MONGODB, SNAPSHOT_TRANSIENT_STATUSES as SNAPSHOT_TRANSIENT_STATUSES_MONGODB, @@ -77,8 +79,13 @@ const jsonContentHeaders = { This API allows you to manage your Managed Databases for MongoDB®. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = ['fr-par'] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par'], + }) protected pageOfListNodeTypes = ( request: Readonly = {}, diff --git a/packages_generated/rdb/src/v1/api.gen.ts b/packages_generated/rdb/src/v1/api.gen.ts index 650725375..e6f8ec25f 100644 --- a/packages_generated/rdb/src/v1/api.gen.ts +++ b/packages_generated/rdb/src/v1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { DATABASE_BACKUP_TRANSIENT_STATUSES as DATABASE_BACKUP_TRANSIENT_STATUSES_RDB, INSTANCE_LOG_TRANSIENT_STATUSES as INSTANCE_LOG_TRANSIENT_STATUSES_RDB, @@ -172,12 +174,13 @@ const jsonContentHeaders = { This API allows you to manage your Managed Databases for PostgreSQL and MySQL. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) protected pageOfListDatabaseEngines = ( request: Readonly = {}, diff --git a/packages_generated/redis/src/v1/api.gen.ts b/packages_generated/redis/src/v1/api.gen.ts index 1db67290a..5a98d95ba 100644 --- a/packages_generated/redis/src/v1/api.gen.ts +++ b/packages_generated/redis/src/v1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { CLUSTER_TRANSIENT_STATUSES as CLUSTER_TRANSIENT_STATUSES_REDIS } from './content.gen' import { marshalAddAclRulesRequest, @@ -81,15 +83,20 @@ const jsonContentHeaders = { This API allows you to manage your Managed Databases for Redis™. */ export class API extends ParentAPI { - /** Lists the available zones of the API. */ - public static readonly LOCALITIES: ScwZone[] = [ - 'fr-par-1', - 'fr-par-2', - 'nl-ams-1', - 'nl-ams-2', - 'pl-waw-1', - 'pl-waw-2', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + zones: [ + 'fr-par-1', + 'fr-par-2', + 'nl-ams-1', + 'nl-ams-2', + 'pl-waw-1', + 'pl-waw-2', + ], + }) /** * Create a Redis™ Database Instance. Create a new Redis™ Database Instance (Redis™ cluster). You must set the `zone`, `project_id`, `version`, `node_type`, `user_name` and `password` parameters. Optionally you can define `acl_rules`, `endpoints`, `tls_enabled` and `cluster_settings`. diff --git a/packages_generated/registry/src/v1/api.gen.ts b/packages_generated/registry/src/v1/api.gen.ts index f70fc185a..ed241c5d7 100644 --- a/packages_generated/registry/src/v1/api.gen.ts +++ b/packages_generated/registry/src/v1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { IMAGE_TRANSIENT_STATUSES as IMAGE_TRANSIENT_STATUSES_REGISTRY, NAMESPACE_TRANSIENT_STATUSES as NAMESPACE_TRANSIENT_STATUSES_REGISTRY, @@ -55,12 +57,13 @@ const jsonContentHeaders = { This API allows you to manage your Container Registry resources. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) protected pageOfListNamespaces = ( request: Readonly = {}, diff --git a/packages_generated/secret/src/v1beta1/api.gen.ts b/packages_generated/secret/src/v1beta1/api.gen.ts index 555dae0ed..ed9859c98 100644 --- a/packages_generated/secret/src/v1beta1/api.gen.ts +++ b/packages_generated/secret/src/v1beta1/api.gen.ts @@ -6,7 +6,8 @@ import { urlParams, validatePathParam, } from '@scaleway/sdk-client' -import type { Region as ScwRegion } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { marshalAddSecretOwnerRequest, marshalCreateSecretRequest, @@ -65,12 +66,13 @@ const jsonContentHeaders = { This API allows you to manage your Secret Manager services, for storing, accessing and sharing sensitive data such as passwords, API keys and certificates. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) /** * Create a secret. Create a secret in a given region specified by the `region` parameter. diff --git a/packages_generated/serverless_sqldb/src/v1alpha1/api.gen.ts b/packages_generated/serverless_sqldb/src/v1alpha1/api.gen.ts index dd87cfde6..13ed13a08 100644 --- a/packages_generated/serverless_sqldb/src/v1alpha1/api.gen.ts +++ b/packages_generated/serverless_sqldb/src/v1alpha1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { DATABASE_TRANSIENT_STATUSES as DATABASE_TRANSIENT_STATUSES_SERVERLESS_SQLDB } from './content.gen' import { marshalCreateDatabaseRequest, @@ -44,8 +46,13 @@ const jsonContentHeaders = { This API allows you to manage your Serverless SQL Databases. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = ['fr-par'] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par'], + }) /** * Create a new Serverless SQL Database. You must provide the following parameters: `organization_id`, `project_id`, `name`, `cpu_min`, `cpu_max`. You can also provide `from_backup_id` to create a database from a backup. diff --git a/packages_generated/tem/src/v1alpha1/api.gen.ts b/packages_generated/tem/src/v1alpha1/api.gen.ts index 5acc10114..e176a1abc 100644 --- a/packages_generated/tem/src/v1alpha1/api.gen.ts +++ b/packages_generated/tem/src/v1alpha1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { DOMAIN_TRANSIENT_STATUSES as DOMAIN_TRANSIENT_STATUSES_TEM, EMAIL_TRANSIENT_STATUSES as EMAIL_TRANSIENT_STATUSES_TEM, @@ -99,8 +101,13 @@ const jsonContentHeaders = { This API allows you to manage your Transactional Email services. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = ['fr-par'] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par'], + }) /** * Send an email. You must specify the `region`, the sender and the recipient's information and the `project_id` to send an email from a checked domain. The subject of the email must contain at least 6 characters. diff --git a/packages_generated/vpc/src/v2/api.gen.ts b/packages_generated/vpc/src/v2/api.gen.ts index b9e2dbc5a..29796a0c4 100644 --- a/packages_generated/vpc/src/v2/api.gen.ts +++ b/packages_generated/vpc/src/v2/api.gen.ts @@ -6,7 +6,8 @@ import { urlParams, validatePathParam, } from '@scaleway/sdk-client' -import type { Region as ScwRegion } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { marshalAddSubnetsRequest, marshalCreatePrivateNetworkRequest, @@ -73,12 +74,13 @@ const jsonContentHeaders = { This API allows you to manage your Virtual Private Clouds (VPCs) and Private Networks. */ export class API extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) protected pageOfListVPCs = (request: Readonly = {}) => this.client.fetch( diff --git a/packages_generated/vpcgw/src/v1/api.gen.ts b/packages_generated/vpcgw/src/v1/api.gen.ts index c0ea9746e..4ae1493bf 100644 --- a/packages_generated/vpcgw/src/v1/api.gen.ts +++ b/packages_generated/vpcgw/src/v1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { GATEWAY_NETWORK_TRANSIENT_STATUSES as GATEWAY_NETWORK_TRANSIENT_STATUSES_VPCGW, GATEWAY_TRANSIENT_STATUSES as GATEWAY_TRANSIENT_STATUSES_VPCGW, @@ -109,17 +111,22 @@ const jsonContentHeaders = { This API allows you to manage your Public Gateways. */ export class API extends ParentAPI { - /** Lists the available zones of the API. */ - public static readonly LOCALITIES: ScwZone[] = [ - 'fr-par-1', - 'fr-par-2', - 'nl-ams-1', - 'nl-ams-2', - 'nl-ams-3', - 'pl-waw-1', - 'pl-waw-2', - 'pl-waw-3', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + zones: [ + 'fr-par-1', + 'fr-par-2', + 'nl-ams-1', + 'nl-ams-2', + 'nl-ams-3', + 'pl-waw-1', + 'pl-waw-2', + 'pl-waw-3', + ], + }) protected pageOfListGateways = ( request: Readonly = {}, diff --git a/packages_generated/vpcgw/src/v2/api.gen.ts b/packages_generated/vpcgw/src/v2/api.gen.ts index 1e33603fd..0fc664b81 100644 --- a/packages_generated/vpcgw/src/v2/api.gen.ts +++ b/packages_generated/vpcgw/src/v2/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { GATEWAY_NETWORK_TRANSIENT_STATUSES as GATEWAY_NETWORK_TRANSIENT_STATUSES_VPCGW, GATEWAY_TRANSIENT_STATUSES as GATEWAY_TRANSIENT_STATUSES_VPCGW, @@ -90,17 +92,22 @@ const jsonContentHeaders = { This API allows you to manage your Public Gateways. */ export class API extends ParentAPI { - /** Lists the available zones of the API. */ - public static readonly LOCALITIES: ScwZone[] = [ - 'fr-par-1', - 'fr-par-2', - 'nl-ams-1', - 'nl-ams-2', - 'nl-ams-3', - 'pl-waw-1', - 'pl-waw-2', - 'pl-waw-3', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + zones: [ + 'fr-par-1', + 'fr-par-2', + 'nl-ams-1', + 'nl-ams-2', + 'nl-ams-3', + 'pl-waw-1', + 'pl-waw-2', + 'pl-waw-3', + ], + }) protected pageOfListGateways = ( request: Readonly = {}, diff --git a/packages_generated/webhosting/src/v1/api.gen.ts b/packages_generated/webhosting/src/v1/api.gen.ts index c702a59b6..bc0b7fc97 100644 --- a/packages_generated/webhosting/src/v1/api.gen.ts +++ b/packages_generated/webhosting/src/v1/api.gen.ts @@ -7,7 +7,9 @@ import { validatePathParam, waitForResource, } from '@scaleway/sdk-client' -import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client' +import type { WaitForOptions } from '@scaleway/sdk-client' +import type { ApiLocality } from '../types/locality' +import { toApiLocality } from '../types/locality' import { DOMAIN_TRANSIENT_STATUSES as DOMAIN_TRANSIENT_STATUSES_WEBHOSTING, HOSTING_TRANSIENT_STATUSES as HOSTING_TRANSIENT_STATUSES_WEBHOSTING, @@ -116,12 +118,13 @@ const jsonContentHeaders = { This API allows you to manage your Web Hosting services. */ export class ControlPanelAPI extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) protected pageOfListControlPanels = ( request: Readonly = {}, @@ -159,12 +162,13 @@ export class ControlPanelAPI extends ParentAPI { This API allows you to manage your databases and database users for your Web Hosting services. */ export class DatabaseAPI extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) /** * "Create a new database within your hosting plan". @@ -410,12 +414,13 @@ export class DatabaseAPI extends ParentAPI { This API allows you to manage your Web Hosting services. */ export class DnsAPI extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) /** * Get DNS records. Get the set of DNS records of a specified domain associated with a Web Hosting plan's domain. @@ -548,12 +553,13 @@ export class DnsAPI extends ParentAPI { This API allows you to manage your offer for your Web Hosting services. */ export class OfferAPI extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) protected pageOfListOffers = ( request: Readonly = {}, @@ -592,12 +598,13 @@ export class OfferAPI extends ParentAPI { This API allows you to manage your Web Hosting services. */ export class HostingAPI extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) /** * Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer type required via the `offer_id` parameter. @@ -783,12 +790,13 @@ export class HostingAPI extends ParentAPI { This API allows you to manage your FTP accounts for your Web Hosting services. */ export class FtpAccountAPI extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) /** * Create a new FTP account within your hosting plan.. Create a new FTP account within your hosting plan. @@ -885,12 +893,13 @@ export class FtpAccountAPI extends ParentAPI { This API allows you to manage your mail accounts for your Web Hosting services. */ export class MailAccountAPI extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) /** * Create a new mail account within your hosting plan.. Create a new mail account within your hosting plan. @@ -1001,12 +1010,13 @@ export class MailAccountAPI extends ParentAPI { This API allows you to manage your websites for your Web Hosting services. */ export class WebsiteAPI extends ParentAPI { - /** Lists the available regions of the API. */ - public static readonly LOCALITIES: ScwRegion[] = [ - 'fr-par', - 'nl-ams', - 'pl-waw', - ] + /** + * Locality of this API. + * type ∈ {'zone','region','global','unspecified'} + */ + public static readonly LOCALITY: ApiLocality = toApiLocality({ + regions: ['fr-par', 'nl-ams', 'pl-waw'], + }) protected pageOfListWebsites = ( request: Readonly,