more state changes

This commit is contained in:
Sacha Weatherstone
2023-02-20 21:07:55 +10:00
parent e6d17692da
commit 0894fd76f5
10 changed files with 112 additions and 213 deletions
@@ -7,15 +7,24 @@ import {
Length
} from "class-validator";
import type { Protobuf } from "@meshtastic/meshtasticjs";
import { Protobuf } from "@meshtastic/meshtasticjs";
export class ChannelSettingsValidation
export class ChannelValidation
implements Omit<Protobuf.Channel, keyof Protobuf.native.Message | "settings">
{
@IsNumber()
index: number;
settings: Channel_SettingsValidation;
@IsEnum(Protobuf.Channel_Role)
role: Protobuf.Channel_Role;
}
export class Channel_SettingsValidation
implements
Omit<Protobuf.ChannelSettings, keyof Protobuf.native.Message | "psk">
{
@IsBoolean()
enabled: boolean;
@IsNumber()
channelNum: number;
+9 -1
View File
@@ -1,4 +1,11 @@
import { IsBoolean, IsEnum, IsIP, IsOptional, Length } from "class-validator";
import {
IsBoolean,
IsEnum,
IsIP,
IsOptional,
IsString,
Length
} from "class-validator";
import { Protobuf } from "@meshtastic/meshtasticjs";
@@ -31,6 +38,7 @@ export class NetworkValidation
ipv4Config: NetworkValidation_IpV4Config;
@IsString()
rsyslogServer: string;
}