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
16 changes: 8 additions & 8 deletions eshtek/server-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import {
} from "./server";

import { vMSHealthSchema } from "./vms-schema";
const appsHealthSchema = z.any();


export const serverUserTypeSchema = z.nativeEnum(ServerUserType);

Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion ts-to-zod.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = [
{
name: "apps",
name: "vms",
input: "eshtek/vms.ts",
output: "eshtek/vms-schema.ts",
},
Expand Down