forked from jappel/leistungsbilanz-ts
Persist project settings updates
This commit is contained in:
parent
d00ae30bda
commit
b2763f72d5
21 changed files with 569 additions and 33 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { z } from "zod";
|
||||
import { expectedProjectRevisionSchema } from "./project-command.schemas.js";
|
||||
|
||||
export const createProjectSchema = z.object({
|
||||
name: z.string().min(1),
|
||||
|
|
@ -6,10 +7,13 @@ export const createProjectSchema = z.object({
|
|||
threePhaseVoltageV: z.number().positive().optional(),
|
||||
});
|
||||
|
||||
export const updateProjectSettingsSchema = z.object({
|
||||
singlePhaseVoltageV: z.number().positive(),
|
||||
threePhaseVoltageV: z.number().positive(),
|
||||
});
|
||||
export const updateProjectSettingsSchema = z
|
||||
.object({
|
||||
expectedRevision: expectedProjectRevisionSchema,
|
||||
singlePhaseVoltageV: z.number().positive(),
|
||||
threePhaseVoltageV: z.number().positive(),
|
||||
})
|
||||
.strict();
|
||||
|
||||
export const createDistributionBoardSchema = z.object({
|
||||
name: z.string().min(1),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue