Skip to content

Commit 1ff187c

Browse files
committed
feat: update generated APIs
1 parent 8768d24 commit 1ff187c

File tree

34 files changed

+499
-303
lines changed

34 files changed

+499
-303
lines changed

packages_generated/applesilicon/src/v1alpha1/api.gen.ts

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import {
77
validatePathParam,
88
waitForResource,
99
} from '@scaleway/sdk-client'
10-
import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client'
10+
import type { WaitForOptions } from '@scaleway/sdk-client'
11+
import type { ApiLocality } from '../types/locality'
12+
import { toApiLocality } from '../types/locality'
1113
import {
1214
SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES as SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES_APPLESILICON,
1315
SERVER_TRANSIENT_STATUSES as SERVER_TRANSIENT_STATUSES_APPLESILICON,
@@ -73,8 +75,13 @@ const jsonContentHeaders = {
7375
This API allows you to manage your Apple silicon machines.
7476
*/
7577
export class API extends ParentAPI {
76-
/** Lists the available zones of the API. */
77-
public static readonly LOCALITIES: ScwZone[] = ['fr-par-3']
78+
/**
79+
* Locality of this API.
80+
* type ∈ {'zone','region','global','unspecified'}
81+
*/
82+
public static readonly LOCALITY: ApiLocality = toApiLocality({
83+
zones: ['fr-par-3'],
84+
})
7885

7986
/**
8087
* 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 {
332339
* Apple silicon - Private Networks API.
333340
*/
334341
export class PrivateNetworkAPI extends ParentAPI {
335-
/** Lists the available zones of the API. */
336-
public static readonly LOCALITIES: ScwZone[] = ['fr-par-1', 'fr-par-3']
342+
/**
343+
* Locality of this API.
344+
* type ∈ {'zone','region','global','unspecified'}
345+
*/
346+
public static readonly LOCALITY: ApiLocality = toApiLocality({
347+
zones: ['fr-par-1', 'fr-par-3'],
348+
})
337349

338350
getServerPrivateNetwork = (
339351
request: Readonly<PrivateNetworkApiGetServerPrivateNetworkRequest>,

packages_generated/audit_trail/src/v1alpha1/api.gen.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import {
55
urlParams,
66
validatePathParam,
77
} from '@scaleway/sdk-client'
8-
import type { Region as ScwRegion } from '@scaleway/sdk-client'
8+
import type { ApiLocality } from '../types/locality'
9+
import { toApiLocality } from '../types/locality'
910
import {
1011
unmarshalListEventsResponse,
1112
unmarshalListProductsResponse,
@@ -23,8 +24,13 @@ import type {
2324
This API allows you to ensure accountability and security by recording events and changes performed within your Scaleway Organization.
2425
*/
2526
export class API extends ParentAPI {
26-
/** Lists the available regions of the API. */
27-
public static readonly LOCALITIES: ScwRegion[] = ['fr-par', 'nl-ams']
27+
/**
28+
* Locality of this API.
29+
* type ∈ {'zone','region','global','unspecified'}
30+
*/
31+
public static readonly LOCALITY: ApiLocality = toApiLocality({
32+
regions: ['fr-par', 'nl-ams'],
33+
})
2834

2935
/**
3036
* 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`.

packages_generated/baremetal/src/v1/api.gen.ts

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import {
77
validatePathParam,
88
waitForResource,
99
} from '@scaleway/sdk-client'
10-
import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client'
10+
import type { WaitForOptions } from '@scaleway/sdk-client'
11+
import type { ApiLocality } from '../types/locality'
12+
import { toApiLocality } from '../types/locality'
1113
import { SERVER_TRANSIENT_STATUSES as SERVER_TRANSIENT_STATUSES_BAREMETAL } from './content.gen'
1214
import {
1315
marshalAddOptionServerRequest,
@@ -104,15 +106,20 @@ const jsonContentHeaders = {
104106
This API allows you to manage your Elastic Metal servers.
105107
*/
106108
export class API extends ParentAPI {
107-
/** Lists the available zones of the API. */
108-
public static readonly LOCALITIES: ScwZone[] = [
109-
'fr-par-1',
110-
'fr-par-2',
111-
'nl-ams-1',
112-
'nl-ams-2',
113-
'pl-waw-2',
114-
'pl-waw-3',
115-
]
109+
/**
110+
* Locality of this API.
111+
* type ∈ {'zone','region','global','unspecified'}
112+
*/
113+
public static readonly LOCALITY: ApiLocality = toApiLocality({
114+
zones: [
115+
'fr-par-1',
116+
'fr-par-2',
117+
'nl-ams-1',
118+
'nl-ams-2',
119+
'pl-waw-2',
120+
'pl-waw-3',
121+
],
122+
})
116123

117124
protected pageOfListServers = (request: Readonly<ListServersRequest> = {}) =>
118125
this.client.fetch<ListServersResponse>(
@@ -690,8 +697,13 @@ After adding the BMC option, you need to Get Remote Access to get the login/pass
690697
* Elastic Metal - Private Network API.
691698
*/
692699
export class PrivateNetworkAPI extends ParentAPI {
693-
/** Lists the available zones of the API. */
694-
public static readonly LOCALITIES: ScwZone[] = ['fr-par-2']
700+
/**
701+
* Locality of this API.
702+
* type ∈ {'zone','region','global','unspecified'}
703+
*/
704+
public static readonly LOCALITY: ApiLocality = toApiLocality({
705+
zones: ['fr-par-2'],
706+
})
695707

696708
/**
697709
* Add a server to a Private Network.

packages_generated/baremetal/src/v3/api.gen.ts

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import {
66
urlParams,
77
validatePathParam,
88
} from '@scaleway/sdk-client'
9-
import type { Zone as ScwZone } from '@scaleway/sdk-client'
9+
import type { ApiLocality } from '../types/locality'
10+
import { toApiLocality } from '../types/locality'
1011
import {
1112
marshalPrivateNetworkApiAddServerPrivateNetworkRequest,
1213
marshalPrivateNetworkApiSetServerPrivateNetworksRequest,
@@ -32,15 +33,20 @@ const jsonContentHeaders = {
3233
* Elastic Metal - Private Networks API.
3334
*/
3435
export class PrivateNetworkAPI extends ParentAPI {
35-
/** Lists the available zones of the API. */
36-
public static readonly LOCALITIES: ScwZone[] = [
37-
'fr-par-1',
38-
'fr-par-2',
39-
'nl-ams-1',
40-
'nl-ams-2',
41-
'pl-waw-2',
42-
'pl-waw-3',
43-
]
36+
/**
37+
* Locality of this API.
38+
* type ∈ {'zone','region','global','unspecified'}
39+
*/
40+
public static readonly LOCALITY: ApiLocality = toApiLocality({
41+
zones: [
42+
'fr-par-1',
43+
'fr-par-2',
44+
'nl-ams-1',
45+
'nl-ams-2',
46+
'pl-waw-2',
47+
'pl-waw-3',
48+
],
49+
})
4450

4551
/**
4652
* Add a server to a Private Network. Add an Elastic Metal server to a Private Network.

packages_generated/block/src/v1/api.gen.ts

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import {
77
validatePathParam,
88
waitForResource,
99
} from '@scaleway/sdk-client'
10-
import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client'
10+
import type { WaitForOptions } from '@scaleway/sdk-client'
11+
import type { ApiLocality } from '../types/locality'
12+
import { toApiLocality } from '../types/locality'
1113
import {
1214
SNAPSHOT_TRANSIENT_STATUSES as SNAPSHOT_TRANSIENT_STATUSES_BLOCK,
1315
VOLUME_TRANSIENT_STATUSES as VOLUME_TRANSIENT_STATUSES_BLOCK,
@@ -56,18 +58,23 @@ const jsonContentHeaders = {
5658
This API allows you to manage your Block Storage volumes.
5759
*/
5860
export class API extends ParentAPI {
59-
/** Lists the available zones of the API. */
60-
public static readonly LOCALITIES: ScwZone[] = [
61-
'fr-par-1',
62-
'fr-par-2',
63-
'fr-par-3',
64-
'nl-ams-1',
65-
'nl-ams-2',
66-
'nl-ams-3',
67-
'pl-waw-1',
68-
'pl-waw-2',
69-
'pl-waw-3',
70-
]
61+
/**
62+
* Locality of this API.
63+
* type ∈ {'zone','region','global','unspecified'}
64+
*/
65+
public static readonly LOCALITY: ApiLocality = toApiLocality({
66+
zones: [
67+
'fr-par-1',
68+
'fr-par-2',
69+
'fr-par-3',
70+
'nl-ams-1',
71+
'nl-ams-2',
72+
'nl-ams-3',
73+
'pl-waw-1',
74+
'pl-waw-2',
75+
'pl-waw-3',
76+
],
77+
})
7178

7279
protected pageOfListVolumeTypes = (
7380
request: Readonly<ListVolumeTypesRequest> = {},

packages_generated/block/src/v1alpha1/api.gen.ts

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import {
77
validatePathParam,
88
waitForResource,
99
} from '@scaleway/sdk-client'
10-
import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client'
10+
import type { WaitForOptions } from '@scaleway/sdk-client'
11+
import type { ApiLocality } from '../types/locality'
12+
import { toApiLocality } from '../types/locality'
1113
import {
1214
SNAPSHOT_TRANSIENT_STATUSES as SNAPSHOT_TRANSIENT_STATUSES_BLOCK,
1315
VOLUME_TRANSIENT_STATUSES as VOLUME_TRANSIENT_STATUSES_BLOCK,
@@ -58,18 +60,23 @@ const jsonContentHeaders = {
5860
This API allows you to manage your Block Storage volumes.
5961
*/
6062
export class API extends ParentAPI {
61-
/** Lists the available zones of the API. */
62-
public static readonly LOCALITIES: ScwZone[] = [
63-
'fr-par-1',
64-
'fr-par-2',
65-
'fr-par-3',
66-
'nl-ams-1',
67-
'nl-ams-2',
68-
'nl-ams-3',
69-
'pl-waw-1',
70-
'pl-waw-2',
71-
'pl-waw-3',
72-
]
63+
/**
64+
* Locality of this API.
65+
* type ∈ {'zone','region','global','unspecified'}
66+
*/
67+
public static readonly LOCALITY: ApiLocality = toApiLocality({
68+
zones: [
69+
'fr-par-1',
70+
'fr-par-2',
71+
'fr-par-3',
72+
'nl-ams-1',
73+
'nl-ams-2',
74+
'nl-ams-3',
75+
'pl-waw-1',
76+
'pl-waw-2',
77+
'pl-waw-3',
78+
],
79+
})
7380

7481
protected pageOfListVolumeTypes = (
7582
request: Readonly<ListVolumeTypesRequest> = {},

packages_generated/cockpit/src/v1/api.gen.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import {
66
urlParams,
77
validatePathParam,
88
} from '@scaleway/sdk-client'
9-
import type { Region as ScwRegion } from '@scaleway/sdk-client'
9+
import type { ApiLocality } from '../types/locality'
10+
import { toApiLocality } from '../types/locality'
1011
import {
1112
marshalGlobalApiCreateGrafanaUserRequest,
1213
marshalGlobalApiResetGrafanaUserPasswordRequest,
@@ -386,12 +387,13 @@ Deprecated: retention is now managed at the data source level.
386387
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.
387388
*/
388389
export class RegionalAPI extends ParentAPI {
389-
/** Lists the available regions of the API. */
390-
public static readonly LOCALITIES: ScwRegion[] = [
391-
'fr-par',
392-
'nl-ams',
393-
'pl-waw',
394-
]
390+
/**
391+
* Locality of this API.
392+
* type ∈ {'zone','region','global','unspecified'}
393+
*/
394+
public static readonly LOCALITY: ApiLocality = toApiLocality({
395+
regions: ['fr-par', 'nl-ams', 'pl-waw'],
396+
})
395397

396398
/**
397399
* Get the Cockpit configuration.

packages_generated/container/src/v1beta1/api.gen.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import {
88
validatePathParam,
99
waitForResource,
1010
} from '@scaleway/sdk-client'
11-
import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client'
11+
import type { WaitForOptions } from '@scaleway/sdk-client'
12+
import type { ApiLocality } from '../types/locality'
13+
import { toApiLocality } from '../types/locality'
1214
import {
1315
CONTAINER_TRANSIENT_STATUSES as CONTAINER_TRANSIENT_STATUSES_CONTAINER,
1416
CRON_TRANSIENT_STATUSES as CRON_TRANSIENT_STATUSES_CONTAINER,
@@ -95,12 +97,13 @@ const jsonContentHeaders = {
9597
This API allows you to manage your Serverless Containers.
9698
*/
9799
export class API extends ParentAPI {
98-
/** Lists the available regions of the API. */
99-
public static readonly LOCALITIES: ScwRegion[] = [
100-
'fr-par',
101-
'nl-ams',
102-
'pl-waw',
103-
]
100+
/**
101+
* Locality of this API.
102+
* type ∈ {'zone','region','global','unspecified'}
103+
*/
104+
public static readonly LOCALITY: ApiLocality = toApiLocality({
105+
regions: ['fr-par', 'nl-ams', 'pl-waw'],
106+
})
104107

105108
protected pageOfListNamespaces = (
106109
request: Readonly<ListNamespacesRequest> = {},

packages_generated/dedibox/src/v1/api.gen.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import {
77
validatePathParam,
88
waitForResource,
99
} from '@scaleway/sdk-client'
10-
import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client'
10+
import type { WaitForOptions } from '@scaleway/sdk-client'
11+
import type { ApiLocality } from '../types/locality'
12+
import { toApiLocality } from '../types/locality'
1113
import {
1214
BMC_ACCESS_TRANSIENT_STATUSES as BMC_ACCESS_TRANSIENT_STATUSES_DEDIBOX,
1315
RPN_SAN_TRANSIENT_STATUSES as RPN_SAN_TRANSIENT_STATUSES_DEDIBOX,
@@ -253,12 +255,13 @@ const jsonContentHeaders = {
253255
* Dedibox Phoenix API.
254256
*/
255257
export class API extends ParentAPI {
256-
/** Lists the available zones of the API. */
257-
public static readonly LOCALITIES: ScwZone[] = [
258-
'fr-par-1',
259-
'fr-par-2',
260-
'nl-ams-1',
261-
]
258+
/**
259+
* Locality of this API.
260+
* type ∈ {'zone','region','global','unspecified'}
261+
*/
262+
public static readonly LOCALITY: ApiLocality = toApiLocality({
263+
zones: ['fr-par-1', 'fr-par-2', 'nl-ams-1'],
264+
})
262265

263266
protected pageOfListServers = (request: Readonly<ListServersRequest> = {}) =>
264267
this.client.fetch<ListServersResponse>(

packages_generated/file/src/v1alpha1/api.gen.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import {
77
validatePathParam,
88
waitForResource,
99
} from '@scaleway/sdk-client'
10-
import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client'
10+
import type { WaitForOptions } from '@scaleway/sdk-client'
11+
import type { ApiLocality } from '../types/locality'
12+
import { toApiLocality } from '../types/locality'
1113
import { FILE_SYSTEM_TRANSIENT_STATUSES as FILE_SYSTEM_TRANSIENT_STATUSES_FILE } from './content.gen'
1214
import {
1315
marshalCreateFileSystemRequest,
@@ -38,8 +40,13 @@ const jsonContentHeaders = {
3840
This API allows you to manage your File Storage resources.
3941
*/
4042
export class API extends ParentAPI {
41-
/** Lists the available regions of the API. */
42-
public static readonly LOCALITIES: ScwRegion[] = ['fr-par']
43+
/**
44+
* Locality of this API.
45+
* type ∈ {'zone','region','global','unspecified'}
46+
*/
47+
public static readonly LOCALITY: ApiLocality = toApiLocality({
48+
regions: ['fr-par'],
49+
})
4350

4451
/**
4552
* Get filesystem details. Retrieve all properties and current status of a specific filesystem identified by its ID.

0 commit comments

Comments
 (0)