@battle-racing/br-common-lib
Version:
Common library for all Battle Racing Repositorios
17 lines (13 loc) • 522 B
text/typescript
import { z } from 'zod';
import { LIGHTS_EFFECT } from './Lights.const';
export const lightsEffectSchema = z.enum(LIGHTS_EFFECT);
export const showLightsColorParamsSchema = z.object({
address: z.union([z.array(z.number()), z.literal('all')]),
timeDuration: z.number().min(1).max(25),
color: z.string(), // Hex RGB
});
export const showLightsEffectParamsSchema = z.object({
addresses: z.union([z.array(z.number()), z.literal('all')]),
effect: lightsEffectSchema,
timeDuration: z.number().min(1).max(25),
});