import type { Message } from "@bufbuild/protobuf"; import { Protobuf } from "@meshtastic/core"; import { IsBoolean, IsEnum, IsInt, IsString } from "class-validator"; export class DeviceValidation implements Omit { @IsEnum(Protobuf.Config.Config_DeviceConfig_Role) role: Protobuf.Config.Config_DeviceConfig_Role; @IsBoolean() serialEnabled: boolean; @IsBoolean() debugLogEnabled: boolean; @IsInt() buttonGpio: number; @IsInt() buzzerGpio: number; @IsEnum(Protobuf.Config.Config_DeviceConfig_RebroadcastMode) rebroadcastMode: Protobuf.Config.Config_DeviceConfig_RebroadcastMode; @IsInt() nodeInfoBroadcastSecs: number; @IsBoolean() doubleTapAsButtonPress: boolean; @IsBoolean() isManaged: boolean; @IsBoolean() disableTripleClick: boolean; @IsBoolean() ledHeartbeatDisabled: boolean; @IsString() tzdef: string; }