Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/next/lib/api/schema/compute/get-log.ts
Views: 688
import { z } from "../../framework";12import { FailedAPIOperationSchema } from "../common";34import { ProjectIdSchema } from "../projects/common";5import { AccountIdSchema } from "../accounts/common";67import { ComputeServerIdSchema } from "./common";89// OpenAPI spec10//11export const GetComputeServerLogInputSchema = z12.object({13id: ComputeServerIdSchema,14})15.describe("Get event log for a particular compute server.");1617export const GetComputeServerLogOutputSchema = z.union([18FailedAPIOperationSchema,19z.array(20z21.object({22account_id: AccountIdSchema,23project_id: ProjectIdSchema,24id: z.string().uuid().describe("Event id."),25time: z.string().describe("ISO 8601 event timestamp."),26event: z27.object({28server_id: ComputeServerIdSchema,29event: z.string().describe("Event name (e.g., `compute-server`"),30action: z.string().describe("Event action (e.g., `configuration`"),31changes: z32.record(33z.string(),34z.object({35to: z.any().describe("Previous state."),36from: z.any().describe("New state."),37}),38)39.describe("Changes made to the compute server."),40})41.describe("Detailed event data."),42})43.describe("A list of compute server events."),44),45]);4647export type GetComputeServerLogInput = z.infer<48typeof GetComputeServerLogInputSchema49>;50export type GetComputeServerLogOutput = z.infer<51typeof GetComputeServerLogOutputSchema52>;535455