Path: blob/master/src/packages/next/lib/api/schema/compute/get-servers.ts
1451 views
import { z } from "../../framework";12import { FailedAPIOperationSchema } from "../common";34import { ProjectIdSchema } from "../projects/common";56import { ComputeServerIdSchema, ComputeServerTitleSchema } from "./common";78// OpenAPI spec9//10export const GetComputeServersInputSchema = z11.object({12id: ComputeServerIdSchema.optional(),13project_id: ProjectIdSchema.optional(),14})15.describe("Parameters that restrict compute servers to get.");1617export const GetComputeServersOutputSchema = z.union([18FailedAPIOperationSchema,19z.array(20z.object({21id: ComputeServerIdSchema,22title: ComputeServerTitleSchema,23}),24),25]);2627export type GetComputeServersInput = z.infer<28typeof GetComputeServersInputSchema29>;30export type GetComputeServersOutput = z.infer<31typeof GetComputeServersOutputSchema32>;333435