Files
meshtastic-web/apps/web/src/validation/moduleConfig/cannedMessage.ts
T
AustinandGitHub d2cb51d489 Execute oxfmt (#1166)
Ran
pnpm oxfmt .

This should get the web repo aligned so that we can better enforce oxfmt going forward.
2026-06-16 20:30:08 -04:00

25 lines
773 B
TypeScript

import { Protobuf } from "@meshtastic/sdk";
import { z } from "zod/v4";
const InputEventCharEnum = z.enum(
Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar,
);
export const CannedMessageValidationSchema = z.object({
rotary1Enabled: z.boolean(),
inputbrokerPinA: z.coerce.number().int().min(0),
inputbrokerPinB: z.coerce.number().int().min(0),
inputbrokerPinPress: z.coerce.number().int().min(0),
inputbrokerEventCw: InputEventCharEnum,
inputbrokerEventCcw: InputEventCharEnum,
inputbrokerEventPress: InputEventCharEnum,
updown1Enabled: z.boolean(),
enabled: z.boolean(),
allowInputSource: z.string().max(30),
sendBell: z.boolean(),
});
export type CannedMessageValidation = z.infer<
typeof CannedMessageValidationSchema
>;