Skip to content

Commit 2382ff7

Browse files
committed
feat: update generated APIs
1 parent 630b69f commit 2382ff7

File tree

5 files changed

+32
-100
lines changed

5 files changed

+32
-100
lines changed

packages/clients/src/api/iam/v1alpha1/index.gen.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export type {
7474
ListUsersRequest,
7575
ListUsersRequestOrderBy,
7676
ListUsersResponse,
77+
LocalityType,
7778
LockUserRequest,
7879
Log,
7980
LogAction,
@@ -84,6 +85,7 @@ export type {
8485
PermissionSetScopeType,
8586
Policy,
8687
Quotum,
88+
QuotumLimit,
8789
RemoveGroupMemberRequest,
8890
Rule,
8991
RuleSpecs,

packages/clients/src/api/vpc/v2/api.gen.ts

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ import {
66
urlParams,
77
validatePathParam,
88
} from '../../../bridge'
9-
import type { Region } from '../../../bridge'
9+
import type { Region as ScwRegion } from '../../../bridge'
1010
import {
1111
marshalAddSubnetsRequest,
1212
marshalCreatePrivateNetworkRequest,
1313
marshalCreateRouteRequest,
1414
marshalCreateVPCRequest,
1515
marshalDeleteSubnetsRequest,
16-
marshalMigrateZonalPrivateNetworksRequest,
1716
marshalSetSubnetsRequest,
1817
marshalUpdatePrivateNetworkRequest,
1918
marshalUpdateRouteRequest,
@@ -50,7 +49,6 @@ import type {
5049
ListSubnetsResponse,
5150
ListVPCsRequest,
5251
ListVPCsResponse,
53-
MigrateZonalPrivateNetworksRequest,
5452
PrivateNetwork,
5553
Route,
5654
SetSubnetsRequest,
@@ -73,7 +71,11 @@ const jsonContentHeaders = {
7371
*/
7472
export class API extends ParentAPI {
7573
/** Lists the available regions of the API. */
76-
public static readonly LOCALITIES: Region[] = ['fr-par', 'nl-ams', 'pl-waw']
74+
public static readonly LOCALITIES: ScwRegion[] = [
75+
'fr-par',
76+
'nl-ams',
77+
'pl-waw',
78+
]
7779

7880
protected pageOfListVPCs = (request: Readonly<ListVPCsRequest> = {}) =>
7981
this.client.fetch<ListVPCsResponse>(
@@ -284,30 +286,6 @@ export class API extends ParentAPI {
284286
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`,
285287
})
286288

287-
/**
288-
* Migrate Private Networks from zoned to regional. Transform multiple
289-
* existing zoned Private Networks (scoped to a single Availability Zone) into
290-
* regional Private Networks, scoped to an entire region. You can transform
291-
* one or many Private Networks (specified by their Private Network IDs)
292-
* within a single Scaleway Organization or Project, with the same call.
293-
*
294-
* @param request - The request {@link MigrateZonalPrivateNetworksRequest}
295-
*/
296-
migrateZonalPrivateNetworks = (
297-
request: Readonly<MigrateZonalPrivateNetworksRequest> = {},
298-
) =>
299-
this.client.fetch<void>({
300-
body: JSON.stringify(
301-
marshalMigrateZonalPrivateNetworksRequest(
302-
request,
303-
this.client.settings,
304-
),
305-
),
306-
headers: jsonContentHeaders,
307-
method: 'POST',
308-
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/migrate-zonal`,
309-
})
310-
311289
/**
312290
* Enable DHCP on a Private Network. Enable DHCP managed on an existing
313291
* Private Network. Note that you will not be able to deactivate it

packages/clients/src/api/vpc/v2/index.gen.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export type {
2626
ListVPCsRequest,
2727
ListVPCsRequestOrderBy,
2828
ListVPCsResponse,
29-
MigrateZonalPrivateNetworksRequest,
3029
PrivateNetwork,
3130
Route,
3231
SetSubnetsRequest,

packages/clients/src/api/vpc/v2/marshalling.gen.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import randomName from '@scaleway/random-name'
44
import {
55
isJSONObject,
6-
resolveOneOf,
76
unmarshalArrayOfObject,
87
unmarshalDate,
98
} from '../../../bridge'
@@ -19,7 +18,6 @@ import type {
1918
ListPrivateNetworksResponse,
2019
ListSubnetsResponse,
2120
ListVPCsResponse,
22-
MigrateZonalPrivateNetworksRequest,
2321
PrivateNetwork,
2422
Route,
2523
SetSubnetsRequest,
@@ -250,25 +248,6 @@ export const marshalDeleteSubnetsRequest = (
250248
subnets: request.subnets,
251249
})
252250

253-
export const marshalMigrateZonalPrivateNetworksRequest = (
254-
request: MigrateZonalPrivateNetworksRequest,
255-
defaults: DefaultValues,
256-
): Record<string, unknown> => ({
257-
private_network_ids: request.privateNetworkIds,
258-
...resolveOneOf([
259-
{
260-
default: defaults.defaultOrganizationId,
261-
param: 'organization_id',
262-
value: request.organizationId,
263-
},
264-
{
265-
default: defaults.defaultProjectId,
266-
param: 'project_id',
267-
value: request.projectId,
268-
},
269-
]),
270-
})
271-
272251
export const marshalSetSubnetsRequest = (
273252
request: SetSubnetsRequest,
274253
defaults: DefaultValues,

packages/clients/src/api/vpc/v2/types.gen.ts

Lines changed: 24 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file was automatically generated. DO NOT EDIT.
22
// If you have any remark or suggestion do not hesitate to open an issue.
3-
import type { Region } from '../../../bridge'
3+
import type { Region as ScwRegion } from '../../../bridge'
44

55
export type ListPrivateNetworksRequestOrderBy =
66
| 'created_at_asc'
@@ -43,7 +43,7 @@ export interface PrivateNetwork {
4343
/** Scaleway Project the Private Network belongs to. */
4444
projectId: string
4545
/** Region in which the Private Network is available. */
46-
region: Region
46+
region: ScwRegion
4747
/** Tags of the Private Network. */
4848
tags: string[]
4949
/** Date the Private Network was created. */
@@ -80,7 +80,7 @@ export interface Route {
8080
/** Defines whether the route can be modified or deleted by the user. */
8181
isReadOnly: boolean
8282
/** Region of the Route. */
83-
region: Region
83+
region: ScwRegion
8484
}
8585

8686
export interface VPC {
@@ -93,7 +93,7 @@ export interface VPC {
9393
/** Scaleway Project the VPC belongs to. */
9494
projectId: string
9595
/** Region of the VPC. */
96-
region: Region
96+
region: ScwRegion
9797
/** Tags for the VPC. */
9898
tags: string[]
9999
/** Defines whether the VPC is the default one for its Project. */
@@ -113,7 +113,7 @@ export type AddSubnetsRequest = {
113113
* Region to target. If none is passed will use default region from the
114114
* config.
115115
*/
116-
region?: Region
116+
region?: ScwRegion
117117
/** Private Network ID. */
118118
privateNetworkId: string
119119
/** Private Network subnets CIDR. */
@@ -129,7 +129,7 @@ export type CreatePrivateNetworkRequest = {
129129
* Region to target. If none is passed will use default region from the
130130
* config.
131131
*/
132-
region?: Region
132+
region?: ScwRegion
133133
/** Name for the Private Network. */
134134
name?: string
135135
/** Scaleway Project in which to create the Private Network. */
@@ -147,7 +147,7 @@ export type CreateRouteRequest = {
147147
* Region to target. If none is passed will use default region from the
148148
* config.
149149
*/
150-
region?: Region
150+
region?: ScwRegion
151151
/** Route description. */
152152
description: string
153153
/** Tags of the Route. */
@@ -167,7 +167,7 @@ export type CreateVPCRequest = {
167167
* Region to target. If none is passed will use default region from the
168168
* config.
169169
*/
170-
region?: Region
170+
region?: ScwRegion
171171
/** Name for the VPC. */
172172
name?: string
173173
/** Scaleway Project in which to create the VPC. */
@@ -183,7 +183,7 @@ export type DeletePrivateNetworkRequest = {
183183
* Region to target. If none is passed will use default region from the
184184
* config.
185185
*/
186-
region?: Region
186+
region?: ScwRegion
187187
/** Private Network ID. */
188188
privateNetworkId: string
189189
}
@@ -193,7 +193,7 @@ export type DeleteRouteRequest = {
193193
* Region to target. If none is passed will use default region from the
194194
* config.
195195
*/
196-
region?: Region
196+
region?: ScwRegion
197197
/** Route ID. */
198198
routeId: string
199199
}
@@ -203,7 +203,7 @@ export type DeleteSubnetsRequest = {
203203
* Region to target. If none is passed will use default region from the
204204
* config.
205205
*/
206-
region?: Region
206+
region?: ScwRegion
207207
/** Private Network ID. */
208208
privateNetworkId: string
209209
/** Private Network subnets CIDR. */
@@ -219,7 +219,7 @@ export type DeleteVPCRequest = {
219219
* Region to target. If none is passed will use default region from the
220220
* config.
221221
*/
222-
region?: Region
222+
region?: ScwRegion
223223
/** VPC ID. */
224224
vpcId: string
225225
}
@@ -229,7 +229,7 @@ export type EnableDHCPRequest = {
229229
* Region to target. If none is passed will use default region from the
230230
* config.
231231
*/
232-
region?: Region
232+
region?: ScwRegion
233233
/** Private Network ID. */
234234
privateNetworkId: string
235235
}
@@ -239,7 +239,7 @@ export type EnableRoutingRequest = {
239239
* Region to target. If none is passed will use default region from the
240240
* config.
241241
*/
242-
region?: Region
242+
region?: ScwRegion
243243
/** VPC ID. */
244244
vpcId: string
245245
}
@@ -249,7 +249,7 @@ export type GetPrivateNetworkRequest = {
249249
* Region to target. If none is passed will use default region from the
250250
* config.
251251
*/
252-
region?: Region
252+
region?: ScwRegion
253253
/** Private Network ID. */
254254
privateNetworkId: string
255255
}
@@ -259,7 +259,7 @@ export type GetRouteRequest = {
259259
* Region to target. If none is passed will use default region from the
260260
* config.
261261
*/
262-
region?: Region
262+
region?: ScwRegion
263263
/** Route ID. */
264264
routeId: string
265265
}
@@ -269,7 +269,7 @@ export type GetVPCRequest = {
269269
* Region to target. If none is passed will use default region from the
270270
* config.
271271
*/
272-
region?: Region
272+
region?: ScwRegion
273273
/** VPC ID. */
274274
vpcId: string
275275
}
@@ -279,7 +279,7 @@ export type ListPrivateNetworksRequest = {
279279
* Region to target. If none is passed will use default region from the
280280
* config.
281281
*/
282-
region?: Region
282+
region?: ScwRegion
283283
/** Sort order of the returned Private Networks. */
284284
orderBy?: ListPrivateNetworksRequestOrderBy
285285
/** Page number to return, from the paginated results. */
@@ -333,7 +333,7 @@ export type ListSubnetsRequest = {
333333
* Region to target. If none is passed will use default region from the
334334
* config.
335335
*/
336-
region?: Region
336+
region?: ScwRegion
337337
/** Sort order of the returned subnets. */
338338
orderBy?: ListSubnetsRequestOrderBy
339339
/** Page number to return, from the paginated results. */
@@ -369,7 +369,7 @@ export type ListVPCsRequest = {
369369
* Region to target. If none is passed will use default region from the
370370
* config.
371371
*/
372-
region?: Region
372+
region?: ScwRegion
373373
/** Sort order of the returned VPCs. */
374374
orderBy?: ListVPCsRequestOrderBy
375375
/** Page number to return, from the paginated results. */
@@ -413,38 +413,12 @@ export interface ListVPCsResponse {
413413
totalCount: number
414414
}
415415

416-
export type MigrateZonalPrivateNetworksRequest = {
417-
/**
418-
* Region to target. If none is passed will use default region from the
419-
* config.
420-
*/
421-
region?: Region
422-
/**
423-
* Organization ID to target. The specified zoned Private Networks within this
424-
* Organization will be migrated to regional.
425-
*
426-
* One-of ('scope'): at most one of 'organizationId', 'projectId' could be
427-
* set.
428-
*/
429-
organizationId?: string
430-
/**
431-
* Project to target. The specified zoned Private Networks within this Project
432-
* will be migrated to regional.
433-
*
434-
* One-of ('scope'): at most one of 'organizationId', 'projectId' could be
435-
* set.
436-
*/
437-
projectId?: string
438-
/** IDs of the Private Networks to migrate. */
439-
privateNetworkIds?: string[]
440-
}
441-
442416
export type SetSubnetsRequest = {
443417
/**
444418
* Region to target. If none is passed will use default region from the
445419
* config.
446420
*/
447-
region?: Region
421+
region?: ScwRegion
448422
/** Private Network ID. */
449423
privateNetworkId: string
450424
/** Private Network subnets CIDR. */
@@ -460,7 +434,7 @@ export type UpdatePrivateNetworkRequest = {
460434
* Region to target. If none is passed will use default region from the
461435
* config.
462436
*/
463-
region?: Region
437+
region?: ScwRegion
464438
/** Private Network ID. */
465439
privateNetworkId: string
466440
/** Name for the Private Network. */
@@ -474,7 +448,7 @@ export type UpdateRouteRequest = {
474448
* Region to target. If none is passed will use default region from the
475449
* config.
476450
*/
477-
region?: Region
451+
region?: ScwRegion
478452
/** Route ID. */
479453
routeId: string
480454
/** Route description. */
@@ -494,7 +468,7 @@ export type UpdateVPCRequest = {
494468
* Region to target. If none is passed will use default region from the
495469
* config.
496470
*/
497-
region?: Region
471+
region?: ScwRegion
498472
/** VPC ID. */
499473
vpcId: string
500474
/** Name for the VPC. */

0 commit comments

Comments
 (0)