Skip to content

Commit 3c2fa28

Browse files
committed
feat: update generated APIs
1 parent 630b69f commit 3c2fa28

File tree

3 files changed

+71
-4
lines changed

3 files changed

+71
-4
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/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 {

0 commit comments

Comments
 (0)