Remove legacy consumer API
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const createProjectSchema = z.object({
|
||||
name: z.string().min(1),
|
||||
singlePhaseVoltageV: z.number().positive().optional(),
|
||||
threePhaseVoltageV: z.number().positive().optional(),
|
||||
});
|
||||
|
||||
export const updateProjectSettingsSchema = z.object({
|
||||
singlePhaseVoltageV: z.number().positive(),
|
||||
threePhaseVoltageV: z.number().positive(),
|
||||
});
|
||||
|
||||
export const createDistributionBoardSchema = z.object({
|
||||
name: z.string().min(1),
|
||||
});
|
||||
|
||||
export const createFloorSchema = z.object({
|
||||
name: z.string().min(1),
|
||||
});
|
||||
|
||||
export const createRoomSchema = z.object({
|
||||
floorId: z.string().min(1).optional(),
|
||||
roomNumber: z.string().min(1),
|
||||
roomName: z.string().min(1),
|
||||
});
|
||||
|
||||
export type CreateProjectInput = z.infer<typeof createProjectSchema>;
|
||||
export type UpdateProjectSettingsInput = z.infer<
|
||||
typeof updateProjectSettingsSchema
|
||||
>;
|
||||
export type CreateDistributionBoardInput = z.infer<
|
||||
typeof createDistributionBoardSchema
|
||||
>;
|
||||
export type CreateFloorInput = z.infer<typeof createFloorSchema>;
|
||||
export type CreateRoomInput = z.infer<typeof createRoomSchema>;
|
||||
Reference in New Issue
Block a user