Skip to content

Commit 9f0a4ec

Browse files
scaleway-botprotobuf-ci-cd
andauthored
fix: export locality (#2200)
Co-authored-by: protobuf-ci-cd <[email protected]>
1 parent 8768d24 commit 9f0a4ec

File tree

53 files changed

+2713
-318
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2713
-318
lines changed

packages/client/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ export type { Money, ScwFile, TimeSeries } from './scw/custom-types'
2929
export * as Errors from './scw/errors/standard'
3030
export type { Region, Zone } from './scw/locality'
3131
export * from './internals'
32+
export { toApiLocality } from './scw/locality'
33+
export type { ApiLocality } from './scw/locality'

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

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
import {
44
API as ParentAPI,
55
enrichForPagination,
6+
toApiLocality,
67
urlParams,
78
validatePathParam,
89
waitForResource,
910
} from '@scaleway/sdk-client'
10-
import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client'
11+
import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client'
1112
import {
1213
SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES as SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES_APPLESILICON,
1314
SERVER_TRANSIENT_STATUSES as SERVER_TRANSIENT_STATUSES_APPLESILICON,
@@ -73,8 +74,13 @@ const jsonContentHeaders = {
7374
This API allows you to manage your Apple silicon machines.
7475
*/
7576
export class API extends ParentAPI {
76-
/** Lists the available zones of the API. */
77-
public static readonly LOCALITIES: ScwZone[] = ['fr-par-3']
77+
/**
78+
* Locality of this API.
79+
* type ∈ {'zone','region','global','unspecified'}
80+
*/
81+
public static readonly LOCALITY: ApiLocality = toApiLocality({
82+
zones: ['fr-par-3'],
83+
})
7884

7985
/**
8086
* 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 +338,13 @@ export class API extends ParentAPI {
332338
* Apple silicon - Private Networks API.
333339
*/
334340
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']
341+
/**
342+
* Locality of this API.
343+
* type ∈ {'zone','region','global','unspecified'}
344+
*/
345+
public static readonly LOCALITY: ApiLocality = toApiLocality({
346+
zones: ['fr-par-1', 'fr-par-3'],
347+
})
337348

338349
getServerPrivateNetwork = (
339350
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
@@ -2,10 +2,11 @@
22
// If you have any remark or suggestion do not hesitate to open an issue.
33
import {
44
API as ParentAPI,
5+
toApiLocality,
56
urlParams,
67
validatePathParam,
78
} from '@scaleway/sdk-client'
8-
import type { Region as ScwRegion } from '@scaleway/sdk-client'
9+
import type { ApiLocality } from '@scaleway/sdk-client'
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/audit_trail/src/v1alpha1/marshalling.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ const unmarshalSecretManagerSecretInfo = (
117117
}
118118

119119
return {
120+
keyId: data.key_id,
120121
path: data.path,
121122
} as SecretManagerSecretInfo
122123
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export interface KubernetesPoolInfo {
5151

5252
export interface SecretManagerSecretInfo {
5353
path: string
54+
keyId?: string
5455
}
5556

5657
export interface SecretManagerSecretVersionInfo {

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

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
import {
44
API as ParentAPI,
55
enrichForPagination,
6+
toApiLocality,
67
urlParams,
78
validatePathParam,
89
waitForResource,
910
} from '@scaleway/sdk-client'
10-
import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client'
11+
import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client'
1112
import { SERVER_TRANSIENT_STATUSES as SERVER_TRANSIENT_STATUSES_BAREMETAL } from './content.gen'
1213
import {
1314
marshalAddOptionServerRequest,
@@ -104,15 +105,20 @@ const jsonContentHeaders = {
104105
This API allows you to manage your Elastic Metal servers.
105106
*/
106107
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-
]
108+
/**
109+
* Locality of this API.
110+
* type ∈ {'zone','region','global','unspecified'}
111+
*/
112+
public static readonly LOCALITY: ApiLocality = toApiLocality({
113+
zones: [
114+
'fr-par-1',
115+
'fr-par-2',
116+
'nl-ams-1',
117+
'nl-ams-2',
118+
'pl-waw-2',
119+
'pl-waw-3',
120+
],
121+
})
116122

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

696707
/**
697708
* 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
@@ -3,10 +3,11 @@
33
import {
44
API as ParentAPI,
55
enrichForPagination,
6+
toApiLocality,
67
urlParams,
78
validatePathParam,
89
} from '@scaleway/sdk-client'
9-
import type { Zone as ScwZone } from '@scaleway/sdk-client'
10+
import type { ApiLocality } from '@scaleway/sdk-client'
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: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
import {
44
API as ParentAPI,
55
enrichForPagination,
6+
toApiLocality,
67
urlParams,
78
validatePathParam,
89
waitForResource,
910
} from '@scaleway/sdk-client'
10-
import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client'
11+
import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client'
1112
import {
1213
SNAPSHOT_TRANSIENT_STATUSES as SNAPSHOT_TRANSIENT_STATUSES_BLOCK,
1314
VOLUME_TRANSIENT_STATUSES as VOLUME_TRANSIENT_STATUSES_BLOCK,
@@ -56,18 +57,23 @@ const jsonContentHeaders = {
5657
This API allows you to manage your Block Storage volumes.
5758
*/
5859
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-
]
60+
/**
61+
* Locality of this API.
62+
* type ∈ {'zone','region','global','unspecified'}
63+
*/
64+
public static readonly LOCALITY: ApiLocality = toApiLocality({
65+
zones: [
66+
'fr-par-1',
67+
'fr-par-2',
68+
'fr-par-3',
69+
'nl-ams-1',
70+
'nl-ams-2',
71+
'nl-ams-3',
72+
'pl-waw-1',
73+
'pl-waw-2',
74+
'pl-waw-3',
75+
],
76+
})
7177

7278
protected pageOfListVolumeTypes = (
7379
request: Readonly<ListVolumeTypesRequest> = {},

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

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
import {
44
API as ParentAPI,
55
enrichForPagination,
6+
toApiLocality,
67
urlParams,
78
validatePathParam,
89
waitForResource,
910
} from '@scaleway/sdk-client'
10-
import type { Zone as ScwZone, WaitForOptions } from '@scaleway/sdk-client'
11+
import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client'
1112
import {
1213
SNAPSHOT_TRANSIENT_STATUSES as SNAPSHOT_TRANSIENT_STATUSES_BLOCK,
1314
VOLUME_TRANSIENT_STATUSES as VOLUME_TRANSIENT_STATUSES_BLOCK,
@@ -58,18 +59,23 @@ const jsonContentHeaders = {
5859
This API allows you to manage your Block Storage volumes.
5960
*/
6061
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-
]
62+
/**
63+
* Locality of this API.
64+
* type ∈ {'zone','region','global','unspecified'}
65+
*/
66+
public static readonly LOCALITY: ApiLocality = toApiLocality({
67+
zones: [
68+
'fr-par-1',
69+
'fr-par-2',
70+
'fr-par-3',
71+
'nl-ams-1',
72+
'nl-ams-2',
73+
'nl-ams-3',
74+
'pl-waw-1',
75+
'pl-waw-2',
76+
'pl-waw-3',
77+
],
78+
})
7379

7480
protected pageOfListVolumeTypes = (
7581
request: Readonly<ListVolumeTypesRequest> = {},

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

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
import {
44
API as ParentAPI,
55
enrichForPagination,
6+
toApiLocality,
67
urlParams,
78
validatePathParam,
89
} from '@scaleway/sdk-client'
9-
import type { Region as ScwRegion } from '@scaleway/sdk-client'
10+
import type { ApiLocality } from '@scaleway/sdk-client'
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.
@@ -409,10 +411,7 @@ export class RegionalAPI extends ParentAPI {
409411
)
410412

411413
/**
412-
* Create a data source. You must specify the data source type upon creation. Available data source types include:
413-
- metrics
414-
- logs
415-
- traces
414+
* Create a data source. You must specify the data source name and type (metrics, logs, traces) upon creation.
416415
The name of the data source will then be used as reference to name the associated Grafana data source.
417416
*
418417
* @param request - The request {@link RegionalApiCreateDataSourceRequest}
@@ -450,7 +449,7 @@ The name of the data source will then be used as reference to name the associate
450449
)
451450

452451
/**
453-
* Delete a data source. Delete a given data source, specified by the data source ID. Note that deleting a data source is irreversible, and cannot be undone.
452+
* Delete a data source. Delete a given data source. Note that this action will permanently delete this data source and any data associated with it.
454453
*
455454
* @param request - The request {@link RegionalApiDeleteDataSourceRequest}
456455
*/
@@ -487,7 +486,6 @@ The name of the data source will then be used as reference to name the associate
487486

488487
/**
489488
* List data sources. Retrieve the list of data sources available in the specified region. By default, the data sources returned in the list are ordered by creation date, in ascending order.
490-
You can list data sources by Project, type and origin.
491489
*
492490
* @param request - The request {@link RegionalApiListDataSourcesRequest}
493491
* @returns A Promise of ListDataSourcesResponse
@@ -497,7 +495,7 @@ You can list data sources by Project, type and origin.
497495
) => enrichForPagination('dataSources', this.pageOfListDataSources, request)
498496

499497
/**
500-
* Update a data source. Update a given data source name, specified by the data source ID.
498+
* Update a data source. Update a given data source attributes (name and/or retention_days).
501499
*
502500
* @param request - The request {@link RegionalApiUpdateDataSourceRequest}
503501
* @returns A Promise of DataSource
@@ -519,7 +517,7 @@ You can list data sources by Project, type and origin.
519517
)
520518

521519
/**
522-
* Get data source usage overview. Retrieve the data source usage overview per type for the specified Project.
520+
* Get data source usage overview. Retrieve the volume of data ingested for each of your data sources in the specified project and region.
523521
*
524522
* @param request - The request {@link RegionalApiGetUsageOverviewRequest}
525523
* @returns A Promise of UsageOverview

0 commit comments

Comments
 (0)