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
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// This file was automatically generated. DO NOT EDIT.
// If you have any remark or suggestion do not hesitate to open an issue.
import type { ServerStatus } from './types.gen'
import type { ServerPrivateNetworkStatus, ServerStatus } from './types.gen'

/** Lists transient statutes of the enum {@link ServerPrivateNetworkStatus}. */
export const SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: ServerPrivateNetworkStatus[] =
['vpc_updating']

/** Lists transient statutes of the enum {@link ServerStatus}. */
export const SERVER_TRANSIENT_STATUSES: ServerStatus[] = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export type {
RebootServerRequest,
ReinstallServerRequest,
Server,
ServerPrivateNetworkStatus,
ServerStatus,
ServerType,
ServerTypeCPU,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export const unmarshalServer = (data: unknown): Server => {
updatedAt: unmarshalDate(data.updated_at),
vncPort: data.vnc_port,
vncUrl: data.vnc_url,
vpcStatus: data.vpc_status,
zone: data.zone,
} as Server
}
Expand Down Expand Up @@ -263,6 +264,7 @@ export const marshalCreateServerRequest = (
request: CreateServerRequest,
defaults: DefaultValues,
): Record<string, unknown> => ({
enable_vpc: request.enableVpc,
name: request.name || randomName('as'),
os_id: request.osId,
project_id: request.projectId ?? defaults.defaultProjectId,
Expand All @@ -287,6 +289,7 @@ export const marshalUpdateServerRequest = (
request: UpdateServerRequest,
defaults: DefaultValues,
): Record<string, unknown> => ({
enable_vpc: request.enableVpc,
name: request.name,
schedule_deletion: request.scheduleDeletion,
})
18 changes: 18 additions & 0 deletions packages/clients/src/api/applesilicon/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ export type ConnectivityDiagnosticDiagnosticStatus =

export type ListServersRequestOrderBy = 'created_at_asc' | 'created_at_desc'

export type ServerPrivateNetworkStatus =
| 'vpc_unknown_status'
| 'vpc_enabled'
| 'vpc_updating'
| 'vpc_disabled'

export type ServerStatus =
| 'unknown_status'
| 'starting'
Expand Down Expand Up @@ -158,6 +164,11 @@ export interface Server {
* using the server status.
*/
delivered: boolean
/**
* Activation status of optional Private Network feature support for this
* server.
*/
vpcStatus: ServerPrivateNetworkStatus
}

export interface ConnectivityDiagnostic {
Expand All @@ -184,6 +195,11 @@ export type CreateServerRequest = {
* induce an extended delivery time.
*/
osId?: string
/**
* Activate the Private Network feature for this server. This feature is
* configured through the Apple Silicon - Private Networks API.
*/
enableVpc: boolean
}

export type DeleteServerRequest = {
Expand Down Expand Up @@ -319,4 +335,6 @@ export type UpdateServerRequest = {
name?: string
/** Specify whether the server should be flagged for automatic deletion. */
scheduleDeletion?: boolean
/** Activate or deactivate Private Network support for this server. */
enableVpc?: boolean
}
Loading