Skip to content

Commit ca47ab7

Browse files
authored
Merge branch 'main' into v1.6042.0
2 parents 9808594 + fb7fa97 commit ca47ab7

File tree

7 files changed

+137
-57
lines changed

7 files changed

+137
-57
lines changed

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import type {
4343
PermissionSet,
4444
Policy,
4545
Quotum,
46+
QuotumLimit,
4647
RemoveGroupMemberRequest,
4748
Rule,
4849
RuleSpecs,
@@ -200,6 +201,22 @@ export const unmarshalPolicy = (data: unknown): Policy => {
200201
} as Policy
201202
}
202203

204+
const unmarshalQuotumLimit = (data: unknown): QuotumLimit => {
205+
if (!isJSONObject(data)) {
206+
throw new TypeError(
207+
`Unmarshalling the type 'QuotumLimit' failed as data isn't a dictionary.`,
208+
)
209+
}
210+
211+
return {
212+
global: data.global,
213+
limit: data.limit,
214+
region: data.region,
215+
unlimited: data.unlimited,
216+
zone: data.zone,
217+
} as QuotumLimit
218+
}
219+
203220
export const unmarshalQuotum = (data: unknown): Quotum => {
204221
if (!isJSONObject(data)) {
205222
throw new TypeError(
@@ -210,6 +227,8 @@ export const unmarshalQuotum = (data: unknown): Quotum => {
210227
return {
211228
description: data.description,
212229
limit: data.limit,
230+
limits: unmarshalArrayOfObject(data.limits, unmarshalQuotumLimit),
231+
localityType: data.locality_type,
213232
name: data.name,
214233
prettyName: data.pretty_name,
215234
unit: data.unit,

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

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +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 as ScwRegion, Zone as ScwZone } from '../../../bridge'
34

45
export type BearerType = 'unknown_bearer_type' | 'user' | 'application'
56

@@ -76,6 +77,8 @@ export type ListUsersRequestOrderBy =
7677
| 'username_asc'
7778
| 'username_desc'
7879

80+
export type LocalityType = 'global' | 'region' | 'zone'
81+
7982
export type LogAction = 'unknown_action' | 'created' | 'updated' | 'deleted'
8083

8184
export type LogResourceType =
@@ -96,6 +99,42 @@ export type UserStatus = 'unknown_status' | 'invitation_pending' | 'activated'
9699

97100
export type UserType = 'unknown_type' | 'guest' | 'owner' | 'member'
98101

102+
export interface QuotumLimit {
103+
/**
104+
* Whether or not the limit is applied globally.
105+
*
106+
* One-of ('locality'): at most one of 'global', 'region', 'zone' could be
107+
* set.
108+
*/
109+
global?: boolean
110+
/**
111+
* The region on which the limit is applied.
112+
*
113+
* One-of ('locality'): at most one of 'global', 'region', 'zone' could be
114+
* set.
115+
*/
116+
region?: ScwRegion
117+
/**
118+
* The zone on which the limit is applied.
119+
*
120+
* One-of ('locality'): at most one of 'global', 'region', 'zone' could be
121+
* set.
122+
*/
123+
zone?: ScwZone
124+
/**
125+
* Maximum locality limit.
126+
*
127+
* One-of ('value'): at most one of 'limit', 'unlimited' could be set.
128+
*/
129+
limit?: number
130+
/**
131+
* Whether or not the quota per locality is unlimited.
132+
*
133+
* One-of ('value'): at most one of 'limit', 'unlimited' could be set.
134+
*/
135+
unlimited?: boolean
136+
}
137+
99138
export interface JWT {
100139
/** JWT ID. */
101140
jti: string
@@ -345,15 +384,15 @@ export interface Quotum {
345384
/** Name of the quota. */
346385
name: string
347386
/**
348-
* Maximum limit of the quota.
387+
* @deprecated Maximum limit of the quota.
349388
*
350-
* One-of ('value'): at most one of 'limit', 'unlimited' could be set.
389+
* One-of ('value'): at most one of 'limit', 'unlimited' could be set.
351390
*/
352391
limit?: number
353392
/**
354-
* Defines whether or not the quota is unlimited.
393+
* @deprecated Defines whether or not the quota is unlimited.
355394
*
356-
* One-of ('value'): at most one of 'limit', 'unlimited' could be set.
395+
* One-of ('value'): at most one of 'limit', 'unlimited' could be set.
357396
*/
358397
unlimited?: boolean
359398
/** A human-readable name for the quota. */
@@ -362,6 +401,13 @@ export interface Quotum {
362401
unit: string
363402
/** Details about the quota. */
364403
description: string
404+
/**
405+
* Whether this quotum is applied on at the zone level, region level, or
406+
* globally.
407+
*/
408+
localityType: LocalityType
409+
/** Limits per locality. */
410+
limits: QuotumLimit[]
365411
}
366412

367413
export interface Rule {

packages/clients/src/api/interlink/v1beta1/api.gen.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ 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
marshalAttachRoutingPolicyRequest,
1212
marshalAttachVpcRequest,
@@ -66,7 +66,11 @@ const jsonContentHeaders = {
6666
*/
6767
export class API extends ParentAPI {
6868
/** Lists the available regions of the API. */
69-
public static readonly LOCALITIES: Region[] = ['fr-par', 'nl-ams', 'pl-waw']
69+
public static readonly LOCALITIES: ScwRegion[] = [
70+
'fr-par',
71+
'nl-ams',
72+
'pl-waw',
73+
]
7074

7175
protected pageOfListPartners = (
7276
request: Readonly<ListPartnersRequest> = {},

packages/clients/src/api/interlink/v1beta1/marshalling.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const unmarshalLink = (data: unknown): Link => {
3636
bgpV4Status: data.bgp_v4_status,
3737
bgpV6Status: data.bgp_v6_status,
3838
createdAt: unmarshalDate(data.created_at),
39+
disapprovedReason: data.disapproved_reason,
3940
enableRoutePropagation: data.enable_route_propagation,
4041
id: data.id,
4142
name: data.name,

packages/clients/src/api/interlink/v1beta1/types.gen.ts

Lines changed: 29 additions & 24 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 BgpStatus = 'unknown_bgp_status' | 'up' | 'down'
66

@@ -75,8 +75,13 @@ export interface Link {
7575
updatedAt?: Date
7676
/** Used to identify a link from a user or partner's point of view. */
7777
pairingKey: string
78+
/**
79+
* Reason given by partner to explain why they did not approve the request for
80+
* a hosted link.
81+
*/
82+
disapprovedReason?: string
7883
/** Region of the link. */
79-
region: Region
84+
region: ScwRegion
8085
}
8186

8287
export interface Partner {
@@ -118,7 +123,7 @@ export interface Pop {
118123
*/
119124
availableLinkBandwidthsMbps: number[]
120125
/** Region of the PoP. */
121-
region: Region
126+
region: ScwRegion
122127
}
123128

124129
export interface RoutingPolicy {
@@ -144,15 +149,15 @@ export interface RoutingPolicy {
144149
/** Last modification date of the routing policy. */
145150
updatedAt?: Date
146151
/** Region of the routing policy. */
147-
region: Region
152+
region: ScwRegion
148153
}
149154

150155
export type AttachRoutingPolicyRequest = {
151156
/**
152157
* Region to target. If none is passed will use default region from the
153158
* config.
154159
*/
155-
region?: Region
160+
region?: ScwRegion
156161
/** ID of the link to attach a routing policy to. */
157162
linkId: string
158163
/** ID of the routing policy to be attached. */
@@ -164,7 +169,7 @@ export type AttachVpcRequest = {
164169
* Region to target. If none is passed will use default region from the
165170
* config.
166171
*/
167-
region?: Region
172+
region?: ScwRegion
168173
/** ID of the link to attach VPC to. */
169174
linkId: string
170175
/** ID of the VPC to attach. */
@@ -176,7 +181,7 @@ export type CreateLinkRequest = {
176181
* Region to target. If none is passed will use default region from the
177182
* config.
178183
*/
179-
region?: Region
184+
region?: ScwRegion
180185
/** ID of the Project to create the link in. */
181186
projectId?: string
182187
/** Name of the link. */
@@ -230,7 +235,7 @@ export type CreateRoutingPolicyRequest = {
230235
* Region to target. If none is passed will use default region from the
231236
* config.
232237
*/
233-
region?: Region
238+
region?: ScwRegion
234239
/** ID of the Project to create the routing policy in. */
235240
projectId?: string
236241
/** Name of the routing policy. */
@@ -251,7 +256,7 @@ export type DeleteLinkRequest = {
251256
* Region to target. If none is passed will use default region from the
252257
* config.
253258
*/
254-
region?: Region
259+
region?: ScwRegion
255260
/** ID of the link to delete. */
256261
linkId: string
257262
}
@@ -261,7 +266,7 @@ export type DeleteRoutingPolicyRequest = {
261266
* Region to target. If none is passed will use default region from the
262267
* config.
263268
*/
264-
region?: Region
269+
region?: ScwRegion
265270
/** ID of the routing policy to delete. */
266271
routingPolicyId: string
267272
}
@@ -271,7 +276,7 @@ export type DetachRoutingPolicyRequest = {
271276
* Region to target. If none is passed will use default region from the
272277
* config.
273278
*/
274-
region?: Region
279+
region?: ScwRegion
275280
/** ID of the link to detach a routing policy from. */
276281
linkId: string
277282
}
@@ -281,7 +286,7 @@ export type DetachVpcRequest = {
281286
* Region to target. If none is passed will use default region from the
282287
* config.
283288
*/
284-
region?: Region
289+
region?: ScwRegion
285290
/** ID of the link to detach the VPC from. */
286291
linkId: string
287292
}
@@ -291,7 +296,7 @@ export type DisableRoutePropagationRequest = {
291296
* Region to target. If none is passed will use default region from the
292297
* config.
293298
*/
294-
region?: Region
299+
region?: ScwRegion
295300
/** ID of the link on which to disable route propagation. */
296301
linkId: string
297302
}
@@ -301,7 +306,7 @@ export type EnableRoutePropagationRequest = {
301306
* Region to target. If none is passed will use default region from the
302307
* config.
303308
*/
304-
region?: Region
309+
region?: ScwRegion
305310
/** ID of the link on which to enable route propagation. */
306311
linkId: string
307312
}
@@ -311,7 +316,7 @@ export type GetLinkRequest = {
311316
* Region to target. If none is passed will use default region from the
312317
* config.
313318
*/
314-
region?: Region
319+
region?: ScwRegion
315320
/** ID of the link to get. */
316321
linkId: string
317322
}
@@ -321,7 +326,7 @@ export type GetPartnerRequest = {
321326
* Region to target. If none is passed will use default region from the
322327
* config.
323328
*/
324-
region?: Region
329+
region?: ScwRegion
325330
/** ID of partner to get. */
326331
partnerId: string
327332
}
@@ -331,7 +336,7 @@ export type GetPopRequest = {
331336
* Region to target. If none is passed will use default region from the
332337
* config.
333338
*/
334-
region?: Region
339+
region?: ScwRegion
335340
/** ID of PoP to get. */
336341
popId: string
337342
}
@@ -341,7 +346,7 @@ export type GetRoutingPolicyRequest = {
341346
* Region to target. If none is passed will use default region from the
342347
* config.
343348
*/
344-
region?: Region
349+
region?: ScwRegion
345350
/** ID of the routing policy to get. */
346351
routingPolicyId: string
347352
}
@@ -351,7 +356,7 @@ export type ListLinksRequest = {
351356
* Region to target. If none is passed will use default region from the
352357
* config.
353358
*/
354-
region?: Region
359+
region?: ScwRegion
355360
/** Order in which to return results. */
356361
orderBy?: ListLinksRequestOrderBy
357362
/** Page number to return. */
@@ -398,7 +403,7 @@ export type ListPartnersRequest = {
398403
* Region to target. If none is passed will use default region from the
399404
* config.
400405
*/
401-
region?: Region
406+
region?: ScwRegion
402407
/** Order in which to return results. */
403408
orderBy?: ListPartnersRequestOrderBy
404409
/** Page number to return. */
@@ -421,7 +426,7 @@ export type ListPopsRequest = {
421426
* Region to target. If none is passed will use default region from the
422427
* config.
423428
*/
424-
region?: Region
429+
region?: ScwRegion
425430
/** Order in which to return results. */
426431
orderBy?: ListPopsRequestOrderBy
427432
/** Page number to return. */
@@ -453,7 +458,7 @@ export type ListRoutingPoliciesRequest = {
453458
* Region to target. If none is passed will use default region from the
454459
* config.
455460
*/
456-
region?: Region
461+
region?: ScwRegion
457462
/** Order in which to return results. */
458463
orderBy?: ListRoutingPoliciesRequestOrderBy
459464
/** Page number to return. */
@@ -480,7 +485,7 @@ export type UpdateLinkRequest = {
480485
* Region to target. If none is passed will use default region from the
481486
* config.
482487
*/
483-
region?: Region
488+
region?: ScwRegion
484489
/** ID of the link to update. */
485490
linkId: string
486491
/** Name of the link. */
@@ -494,7 +499,7 @@ export type UpdateRoutingPolicyRequest = {
494499
* Region to target. If none is passed will use default region from the
495500
* config.
496501
*/
497-
region?: Region
502+
region?: ScwRegion
498503
/** ID of the routing policy to update. */
499504
routingPolicyId: string
500505
/** Name of the routing policy. */

0 commit comments

Comments
 (0)