Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/clients/src/api/instance/v1/api.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export class InstanceV1UtilsAPI extends API {
zone: request.zone,
}).then(res => validateNotUndefined(res.server?.volumes))

const newVolumes: Record<string, { id: string; name: string }> = {}
const newVolumes: Record<string, { id: string; name: string | undefined }> = {}
for (const [key, server] of Object.entries(volumes)) {
newVolumes[key] = { id: server.id, name: server.name }
}
Expand Down Expand Up @@ -322,7 +322,7 @@ export class InstanceV1UtilsAPI extends API {
.then(res => validateNotUndefined(res.server))

// Remove volume.
const newVolumes: Record<string, { id: string; name: string }> = {}
const newVolumes: Record<string, { id: string; name: string | undefined }> = {}
for (const [key, volume] of Object.entries(server.volumes)) {
if (volume.id !== request.volumeId) {
newVolumes[key] = { id: volume.id, name: volume.name }
Expand Down
2 changes: 1 addition & 1 deletion packages/clients/src/api/instance/v1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ const unmarshalVolumeServer = (data: unknown): VolumeServer => {
project: data.project,
server: data.server ? unmarshalServerSummary(data.server) : undefined,
size: data.size,
state: data.state,
state: data.state ? data.state : undefined,
volumeType: data.volume_type,
zone: data.zone,
} as VolumeServer
Expand Down
10 changes: 5 additions & 5 deletions packages/clients/src/api/instance/v1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,17 +316,17 @@ export interface ServerMaintenance {

export interface VolumeServer {
id: string
name: string
name?: string
/** @deprecated */
exportUri?: string
organization: string
organization?: string
server?: ServerSummary
size: number
size?: number
volumeType: VolumeServerVolumeType
creationDate?: Date
modificationDate?: Date
state: VolumeServerState
project: string
state?: VolumeServerState
project?: string
boot: boolean
/** Zone to target. If none is passed will use default zone from the config. */
zone: Zone
Expand Down
Loading