UNPKG

@battle-racing/br-common-lib

Version:

Common library for all Battle Racing Repositorios

24 lines (18 loc) 691 B
import { z } from 'zod'; import { colorNameSchema } from '../../color'; import { kartEffectSchema } from '../../hardware/kart-effect'; import { RGB_STATUS, RGB_ACTION_COMMANDS } from './RGB.const'; export const rgbStatusSchema = z.enum(RGB_STATUS); export const rgbActionCommandSchema = z.enum(RGB_ACTION_COMMANDS); export const rgbModuleStatusSchema = z.object({ rgbStatus: rgbStatusSchema, kartColor: colorNameSchema, }); export const rgbConfigurationOptionsSchema = z.object({ kartColor: colorNameSchema, brightness: z.number().min(0).max(100), effectTime: z.number().min(1).max(25), }); export const rgbShowEffectOptionsSchema = z.object({ effect: kartEffectSchema, });