diff --git a/eshtek/server-schema.ts b/eshtek/server-schema.ts index e0463ea..4bb5206 100644 --- a/eshtek/server-schema.ts +++ b/eshtek/server-schema.ts @@ -27,8 +27,6 @@ import { } from "./server"; import { vMSHealthSchema } from "./vms-schema"; -const appsHealthSchema = z.any(); - export const serverUserTypeSchema = z.nativeEnum(ServerUserType); @@ -137,12 +135,6 @@ export const serverSystemDataSystemDeviceDataSchema = z.object({ networking: z.array(serverSystemDataSystemDeviceSchema).optional(), }); -export const serverSystemDataApplicationsSchema = - serverStatusBasicsSchema.extend({ - type: z.literal(ServerStatusType.APPLICATIONS), - health: appsHealthSchema, - }); - export const serverSystemDataVirtualizationSchema = serverStatusBasicsSchema.extend({ type: z.literal(ServerStatusType.VIRTUALIZATION), @@ -228,6 +220,8 @@ const fileTypeSchema = z.any(); const topologyItemStatusSchema = z.any(); +const appsHealthSchema = z.any(); + const networkInterfaceTypeSchema = z.any(); export const serverPoolBasicsSchema = z.object({ @@ -322,6 +316,12 @@ export const serverSystemDataStorageSchema = serverStatusBasicsSchema.extend({ }), }); +export const serverSystemDataApplicationsSchema = + serverStatusBasicsSchema.extend({ + type: z.literal(ServerStatusType.APPLICATIONS), + health: appsHealthSchema, + }); + export const serverSystemDataSchema = z.union([ serverSystemDataSystemSchema, serverSystemDataStorageSchema, diff --git a/ts-to-zod.config.js b/ts-to-zod.config.js index e02bcdf..4a9c3e9 100644 --- a/ts-to-zod.config.js +++ b/ts-to-zod.config.js @@ -1,6 +1,6 @@ module.exports = [ { - name: "apps", + name: "vms", input: "eshtek/vms.ts", output: "eshtek/vms-schema.ts", },