format
This commit is contained in:
@@ -10,7 +10,8 @@ import {
|
||||
} from "class-validator";
|
||||
|
||||
export class ChannelValidation
|
||||
implements Omit<Protobuf.Channel.Channel, keyof Message | "settings"> {
|
||||
implements Omit<Protobuf.Channel.Channel, keyof Message | "settings">
|
||||
{
|
||||
@IsNumber()
|
||||
index: number;
|
||||
|
||||
@@ -21,7 +22,8 @@ export class ChannelValidation
|
||||
}
|
||||
|
||||
export class Channel_SettingsValidation
|
||||
implements Omit<Protobuf.Channel.ChannelSettings, keyof Message | "psk"> {
|
||||
implements Omit<Protobuf.Channel.ChannelSettings, keyof Message | "psk">
|
||||
{
|
||||
@IsNumber()
|
||||
channelNum: number;
|
||||
|
||||
|
||||
@@ -2,11 +2,13 @@ import type { Message } from "@bufbuild/protobuf";
|
||||
import { Protobuf } from "@meshtastic/core";
|
||||
import { IsBoolean, IsEnum, IsInt } from "class-validator";
|
||||
|
||||
export class BluetoothValidation implements
|
||||
Omit<
|
||||
Protobuf.Config.Config_BluetoothConfig,
|
||||
keyof Message | "deviceLoggingEnabled"
|
||||
> {
|
||||
export class BluetoothValidation
|
||||
implements
|
||||
Omit<
|
||||
Protobuf.Config.Config_BluetoothConfig,
|
||||
keyof Message | "deviceLoggingEnabled"
|
||||
>
|
||||
{
|
||||
@IsBoolean()
|
||||
enabled: boolean;
|
||||
|
||||
|
||||
@@ -4,11 +4,13 @@ import { IsArray, IsBoolean, IsEnum, IsInt } from "class-validator";
|
||||
|
||||
const DeprecatedPositionValidationFields = ["gpsEnabled", "gpsAttemptTime"];
|
||||
|
||||
export class PositionValidation implements
|
||||
Omit<
|
||||
Protobuf.Config.Config_PositionConfig,
|
||||
keyof Message | (typeof DeprecatedPositionValidationFields)[number]
|
||||
> {
|
||||
export class PositionValidation
|
||||
implements
|
||||
Omit<
|
||||
Protobuf.Config.Config_PositionConfig,
|
||||
keyof Message | (typeof DeprecatedPositionValidationFields)[number]
|
||||
>
|
||||
{
|
||||
@IsInt()
|
||||
positionBroadcastSecs: number;
|
||||
|
||||
|
||||
@@ -2,11 +2,13 @@ import type { Message } from "@bufbuild/protobuf";
|
||||
import type { Protobuf } from "@meshtastic/core";
|
||||
import { IsBoolean, IsString } from "class-validator";
|
||||
|
||||
export class SecurityValidation implements
|
||||
Omit<
|
||||
Protobuf.Config.Config_SecurityConfig,
|
||||
keyof Message | "adminKey" | "privateKey" | "publicKey"
|
||||
> {
|
||||
export class SecurityValidation
|
||||
implements
|
||||
Omit<
|
||||
Protobuf.Config.Config_SecurityConfig,
|
||||
keyof Message | "adminKey" | "privateKey" | "publicKey"
|
||||
>
|
||||
{
|
||||
@IsBoolean()
|
||||
adminChannelEnabled: boolean;
|
||||
|
||||
|
||||
@@ -2,11 +2,13 @@ import type { Message } from "@bufbuild/protobuf";
|
||||
import type { Protobuf } from "@meshtastic/core";
|
||||
import { IsBoolean, IsInt } from "class-validator";
|
||||
|
||||
export class AmbientLightingValidation implements
|
||||
Omit<
|
||||
Protobuf.ModuleConfig.ModuleConfig_AmbientLightingConfig,
|
||||
keyof Message
|
||||
> {
|
||||
export class AmbientLightingValidation
|
||||
implements
|
||||
Omit<
|
||||
Protobuf.ModuleConfig.ModuleConfig_AmbientLightingConfig,
|
||||
keyof Message
|
||||
>
|
||||
{
|
||||
@IsBoolean()
|
||||
ledState: boolean;
|
||||
|
||||
|
||||
@@ -4,10 +4,8 @@ import { IsBoolean, IsEnum, IsInt, Length } from "class-validator";
|
||||
|
||||
export class CannedMessageValidation
|
||||
implements
|
||||
Omit<
|
||||
Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig,
|
||||
keyof Message
|
||||
> {
|
||||
Omit<Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig, keyof Message>
|
||||
{
|
||||
@IsBoolean()
|
||||
rotary1Enabled: boolean;
|
||||
|
||||
@@ -21,16 +19,13 @@ export class CannedMessageValidation
|
||||
inputbrokerPinPress: number;
|
||||
|
||||
@IsEnum(Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar)
|
||||
inputbrokerEventCw:
|
||||
Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar;
|
||||
inputbrokerEventCw: Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar;
|
||||
|
||||
@IsEnum(Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar)
|
||||
inputbrokerEventCcw:
|
||||
Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar;
|
||||
inputbrokerEventCcw: Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar;
|
||||
|
||||
@IsEnum(Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar)
|
||||
inputbrokerEventPress:
|
||||
Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar;
|
||||
inputbrokerEventPress: Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar;
|
||||
|
||||
@IsBoolean()
|
||||
updown1Enabled: boolean;
|
||||
|
||||
@@ -2,11 +2,13 @@ import type { Message } from "@bufbuild/protobuf";
|
||||
import type { Protobuf } from "@meshtastic/core";
|
||||
import { IsBoolean, IsInt, Length } from "class-validator";
|
||||
|
||||
export class DetectionSensorValidation implements
|
||||
Omit<
|
||||
Protobuf.ModuleConfig.ModuleConfig_DetectionSensorConfig,
|
||||
keyof Message
|
||||
> {
|
||||
export class DetectionSensorValidation
|
||||
implements
|
||||
Omit<
|
||||
Protobuf.ModuleConfig.ModuleConfig_DetectionSensorConfig,
|
||||
keyof Message
|
||||
>
|
||||
{
|
||||
@IsBoolean()
|
||||
enabled: boolean;
|
||||
|
||||
|
||||
@@ -2,11 +2,13 @@ import type { Message } from "@bufbuild/protobuf";
|
||||
import type { Protobuf } from "@meshtastic/core";
|
||||
import { IsBoolean, IsInt } from "class-validator";
|
||||
|
||||
export class ExternalNotificationValidation implements
|
||||
Omit<
|
||||
Protobuf.ModuleConfig.ModuleConfig_ExternalNotificationConfig,
|
||||
keyof Message
|
||||
> {
|
||||
export class ExternalNotificationValidation
|
||||
implements
|
||||
Omit<
|
||||
Protobuf.ModuleConfig.ModuleConfig_ExternalNotificationConfig,
|
||||
keyof Message
|
||||
>
|
||||
{
|
||||
@IsBoolean()
|
||||
enabled: boolean;
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@ import { IsBoolean, IsInt } from "class-validator";
|
||||
|
||||
export class NeighborInfoValidation
|
||||
implements
|
||||
Omit<Protobuf.ModuleConfig.ModuleConfig_NeighborInfoConfig, keyof Message> {
|
||||
Omit<Protobuf.ModuleConfig.ModuleConfig_NeighborInfoConfig, keyof Message>
|
||||
{
|
||||
@IsBoolean()
|
||||
enabled: boolean;
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@ import { IsBoolean, IsInt } from "class-validator";
|
||||
|
||||
export class PaxcounterValidation
|
||||
implements
|
||||
Omit<Protobuf.ModuleConfig.ModuleConfig_PaxcounterConfig, keyof Message> {
|
||||
Omit<Protobuf.ModuleConfig.ModuleConfig_PaxcounterConfig, keyof Message>
|
||||
{
|
||||
@IsBoolean()
|
||||
enabled: boolean;
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@ import { IsBoolean, IsEnum, IsInt } from "class-validator";
|
||||
|
||||
export class SerialValidation
|
||||
implements
|
||||
Omit<Protobuf.ModuleConfig.ModuleConfig_SerialConfig, keyof Message> {
|
||||
Omit<Protobuf.ModuleConfig.ModuleConfig_SerialConfig, keyof Message>
|
||||
{
|
||||
@IsBoolean()
|
||||
enabled: boolean;
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@ import { IsBoolean, IsInt } from "class-validator";
|
||||
|
||||
export class TelemetryValidation
|
||||
implements
|
||||
Omit<Protobuf.ModuleConfig.ModuleConfig_TelemetryConfig, keyof Message> {
|
||||
Omit<Protobuf.ModuleConfig.ModuleConfig_TelemetryConfig, keyof Message>
|
||||
{
|
||||
@IsInt()
|
||||
deviceUpdateInterval: number;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user