Skip to content

Commit 98ef0a6

Browse files
committed
feat: update generated APIs
1 parent f04a200 commit 98ef0a6

File tree

8 files changed

+65
-2
lines changed

8 files changed

+65
-2
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* This file is automatically generated from /scripts/generate.js PLEASE DO NOT
3+
* EDIT HERE
4+
*/
5+
6+
export * as v1alpha1 from './v1alpha1/index.gen'
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// This file was automatically generated. DO NOT EDIT.
2+
// If you have any remark or suggestion do not hesitate to open an issue.
3+
export { API } from './api.gen'
4+
export type {
5+
Event,
6+
EventPrincipal,
7+
KubernetesClusterInfo,
8+
KubernetesNodeInfo,
9+
KubernetesPoolInfo,
10+
ListEventsRequest,
11+
ListEventsRequestOrderBy,
12+
ListEventsResponse,
13+
ListProductsRequest,
14+
ListProductsResponse,
15+
Product,
16+
Resource,
17+
ResourceType,
18+
SecretManagerSecretInfo,
19+
SecretManagerSecretVersionInfo,
20+
} from './types.gen'
21+
export * as ValidationRules from './validation-rules.gen'

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import * as Account from './account/index.gen'
77
import * as Applesilicon from './applesilicon/index.gen'
8+
import * as AuditTrail from './audit_trail/index.gen'
89
import * as Baremetal from './baremetal/index.gen'
910
import * as Billing from './billing/index.gen'
1011
import * as Block from './block/index.gen'
@@ -46,6 +47,7 @@ import * as Webhosting from './webhosting/index.gen'
4647
export {
4748
Account,
4849
Applesilicon,
50+
AuditTrail,
4951
Baremetal,
5052
Billing,
5153
Block,

packages/clients/src/api/instance/v1/api.gen.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import type { Zone } from '../../../bridge'
1010
import {
1111
marshalApplyBlockMigrationRequest,
1212
marshalAttachServerVolumeRequest,
13+
marshalCheckBlockMigrationOrganizationQuotasRequest,
1314
marshalCreateImageRequest,
1415
marshalCreateIpRequest,
1516
marshalCreatePlacementGroupRequest,
@@ -103,6 +104,7 @@ import type {
103104
ApplyBlockMigrationRequest,
104105
AttachServerVolumeRequest,
105106
AttachServerVolumeResponse,
107+
CheckBlockMigrationOrganizationQuotasRequest,
106108
CreateImageRequest,
107109
CreateImageResponse,
108110
CreateIpRequest,
@@ -1588,4 +1590,19 @@ export class API extends ParentAPI {
15881590
method: 'POST',
15891591
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/block-migration/apply`,
15901592
})
1593+
1594+
checkBlockMigrationOrganizationQuotas = (
1595+
request: Readonly<CheckBlockMigrationOrganizationQuotasRequest> = {},
1596+
) =>
1597+
this.client.fetch<void>({
1598+
body: JSON.stringify(
1599+
marshalCheckBlockMigrationOrganizationQuotasRequest(
1600+
request,
1601+
this.client.settings,
1602+
),
1603+
),
1604+
headers: jsonContentHeaders,
1605+
method: 'POST',
1606+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/block-migration/check-organization-quotas`,
1607+
})
15911608
}

packages/clients/src/api/instance/v1/api.utils.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,8 @@ export class InstanceV1UtilsAPI extends API {
266266
zone: request.zone,
267267
}).then(res => validateNotUndefined(res.server?.volumes))
268268

269-
const newVolumes: Record<string, { id: string; name: string | undefined }> = {}
269+
const newVolumes: Record<string, { id: string; name: string | undefined }> =
270+
{}
270271
for (const [key, server] of Object.entries(volumes)) {
271272
newVolumes[key] = { id: server.id, name: server.name }
272273
}
@@ -322,7 +323,8 @@ export class InstanceV1UtilsAPI extends API {
322323
.then(res => validateNotUndefined(res.server))
323324

324325
// Remove volume.
325-
const newVolumes: Record<string, { id: string; name: string | undefined }> = {}
326+
const newVolumes: Record<string, { id: string; name: string | undefined }> =
327+
{}
326328
for (const [key, volume] of Object.entries(server.volumes)) {
327329
if (volume.id !== request.volumeId) {
328330
newVolumes[key] = { id: volume.id, name: volume.name }

packages/clients/src/api/instance/v1/index.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export type {
1010
AttachServerVolumeResponse,
1111
BootType,
1212
Bootscript,
13+
CheckBlockMigrationOrganizationQuotasRequest,
1314
CreateImageRequest,
1415
CreateImageResponse,
1516
CreateIpRequest,

packages/clients/src/api/instance/v1/marshalling.gen.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import type {
1414
AttachServerVolumeRequest,
1515
AttachServerVolumeResponse,
1616
Bootscript,
17+
CheckBlockMigrationOrganizationQuotasRequest,
1718
CreateImageRequest,
1819
CreateImageResponse,
1920
CreateIpRequest,
@@ -1624,6 +1625,13 @@ export const marshalAttachServerVolumeRequest = (
16241625
volume_type: request.volumeType,
16251626
})
16261627

1628+
export const marshalCheckBlockMigrationOrganizationQuotasRequest = (
1629+
request: CheckBlockMigrationOrganizationQuotasRequest,
1630+
defaults: DefaultValues,
1631+
): Record<string, unknown> => ({
1632+
organization: request.organization ?? defaults.defaultOrganizationId,
1633+
})
1634+
16271635
const marshalVolumeTemplate = (
16281636
request: VolumeTemplate,
16291637
defaults: DefaultValues,

packages/clients/src/api/instance/v1/types.gen.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,12 @@ export interface AttachServerVolumeResponse {
801801
server?: Server
802802
}
803803

804+
export type CheckBlockMigrationOrganizationQuotasRequest = {
805+
/** Zone to target. If none is passed will use default zone from the config. */
806+
zone?: Zone
807+
organization?: string
808+
}
809+
804810
export type CreateImageRequest = {
805811
/** Zone to target. If none is passed will use default zone from the config. */
806812
zone?: Zone

0 commit comments

Comments
 (0)