process/supplier-agent: beautify validation file format

This commit is contained in:
vchikalkin 2023-03-10 09:33:14 +03:00
parent 630b6733ed
commit d86c7f360f

View File

@ -1,3 +1,4 @@
/* eslint-disable zod/require-strict */
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable complexity */
import type { ValidationContext } from '../types';
@ -146,7 +147,10 @@ const SumsSchema = ValuesSchema.pick({
export function createValidationSchema(context: ValidationContext) {
const { apolloClient } = context;
return AgentsSchema.merge(ConditionsSchema)
return z
.object({})
.merge(AgentsSchema)
.merge(ConditionsSchema)
.merge(SumsSchema)
.superRefine(async (values, ctx) => {
const {