major updates to device and links management in admin

This commit is contained in:
user
2026-03-28 15:34:03 +02:00
parent e8c5986df6
commit 6639bcd799
32 changed files with 3304 additions and 496 deletions

View File

@@ -16,9 +16,10 @@ export const deviceSchema = v.object({
version: v.string(),
status: deviceStatusSchema,
isActive: v.boolean(),
containerId: v.nullable(v.string()),
inUse: v.boolean(),
containerId: v.string(),
host: v.string(),
wsPort: v.nullable(v.string()),
wsPort: v.string(),
createdAt: v.date(),
updatedAt: v.date(),
});
@@ -28,8 +29,8 @@ export const createDeviceSchema = v.object({
title: v.pipe(v.string(), v.minLength(1)),
version: v.pipe(v.string(), v.minLength(1)),
host: v.pipe(v.string(), v.minLength(1)),
containerId: v.optional(v.string()),
wsPort: v.optional(v.string()),
containerId: v.pipe(v.string(), v.minLength(1)),
wsPort: v.pipe(v.string(), v.minLength(1)),
isActive: v.optional(v.boolean()),
});
export type CreateDevice = v.InferOutput<typeof createDeviceSchema>;
@@ -39,9 +40,10 @@ export const updateDeviceSchema = v.partial(
title: v.string(),
version: v.string(),
host: v.string(),
containerId: v.nullable(v.string()),
wsPort: v.nullable(v.string()),
containerId: v.string(),
wsPort: v.string(),
isActive: v.boolean(),
inUse: v.boolean(),
status: deviceStatusSchema,
}),
);