update to namespaced protobufs
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
import { IsBoolean, IsEnum, IsInt } from "class-validator";
|
||||
|
||||
import { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class BluetoothValidation
|
||||
implements
|
||||
Omit<Protobuf.Config_BluetoothConfig, keyof Protobuf.native.Message>
|
||||
implements Omit<Protobuf.Config.Config_BluetoothConfig, keyof Message>
|
||||
{
|
||||
@IsBoolean()
|
||||
enabled: boolean;
|
||||
|
||||
@IsEnum(Protobuf.Config_BluetoothConfig_PairingMode)
|
||||
mode: Protobuf.Config_BluetoothConfig_PairingMode;
|
||||
@IsEnum(Protobuf.Config.Config_BluetoothConfig_PairingMode)
|
||||
mode: Protobuf.Config.Config_BluetoothConfig_PairingMode;
|
||||
|
||||
@IsInt()
|
||||
fixedPin: number;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { IsBoolean, IsEnum, IsInt } from "class-validator";
|
||||
|
||||
import { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class DeviceValidation
|
||||
implements Omit<Protobuf.Config_DeviceConfig, keyof Protobuf.native.Message>
|
||||
implements Omit<Protobuf.Config.Config_DeviceConfig, keyof Message>
|
||||
{
|
||||
@IsEnum(Protobuf.Config_DeviceConfig_Role)
|
||||
role: Protobuf.Config_DeviceConfig_Role;
|
||||
@IsEnum(Protobuf.Config.Config_DeviceConfig_Role)
|
||||
role: Protobuf.Config.Config_DeviceConfig_Role;
|
||||
|
||||
@IsBoolean()
|
||||
serialEnabled: boolean;
|
||||
@@ -20,8 +20,8 @@ export class DeviceValidation
|
||||
@IsInt()
|
||||
buzzerGpio: number;
|
||||
|
||||
@IsEnum(Protobuf.Config_DeviceConfig_RebroadcastMode)
|
||||
rebroadcastMode: Protobuf.Config_DeviceConfig_RebroadcastMode;
|
||||
@IsEnum(Protobuf.Config.Config_DeviceConfig_RebroadcastMode)
|
||||
rebroadcastMode: Protobuf.Config.Config_DeviceConfig_RebroadcastMode;
|
||||
|
||||
@IsInt()
|
||||
nodeInfoBroadcastSecs: number;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { IsBoolean, IsEnum, IsInt } from "class-validator";
|
||||
|
||||
import { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class DisplayValidation
|
||||
implements Omit<Protobuf.Config_DisplayConfig, keyof Protobuf.native.Message>
|
||||
implements Omit<Protobuf.Config.Config_DisplayConfig, keyof Message>
|
||||
{
|
||||
@IsInt()
|
||||
screenOnSecs: number;
|
||||
|
||||
@IsEnum(Protobuf.Config_DisplayConfig_GpsCoordinateFormat)
|
||||
gpsFormat: Protobuf.Config_DisplayConfig_GpsCoordinateFormat;
|
||||
@IsEnum(Protobuf.Config.Config_DisplayConfig_GpsCoordinateFormat)
|
||||
gpsFormat: Protobuf.Config.Config_DisplayConfig_GpsCoordinateFormat;
|
||||
|
||||
@IsInt()
|
||||
autoScreenCarouselSecs: number;
|
||||
@@ -20,14 +20,14 @@ export class DisplayValidation
|
||||
@IsBoolean()
|
||||
flipScreen: boolean;
|
||||
|
||||
@IsEnum(Protobuf.Config_DisplayConfig_DisplayUnits)
|
||||
units: Protobuf.Config_DisplayConfig_DisplayUnits;
|
||||
@IsEnum(Protobuf.Config.Config_DisplayConfig_DisplayUnits)
|
||||
units: Protobuf.Config.Config_DisplayConfig_DisplayUnits;
|
||||
|
||||
@IsEnum(Protobuf.Config_DisplayConfig_OledType)
|
||||
oled: Protobuf.Config_DisplayConfig_OledType;
|
||||
@IsEnum(Protobuf.Config.Config_DisplayConfig_OledType)
|
||||
oled: Protobuf.Config.Config_DisplayConfig_OledType;
|
||||
|
||||
@IsEnum(Protobuf.Config_DisplayConfig_DisplayMode)
|
||||
displaymode: Protobuf.Config_DisplayConfig_DisplayMode;
|
||||
@IsEnum(Protobuf.Config.Config_DisplayConfig_DisplayMode)
|
||||
displaymode: Protobuf.Config.Config_DisplayConfig_DisplayMode;
|
||||
|
||||
@IsBoolean()
|
||||
headingBold: boolean;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { IsArray, IsBoolean, IsEnum, IsInt, Max, Min } from "class-validator";
|
||||
|
||||
import { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class LoRaValidation
|
||||
implements Omit<Protobuf.Config_LoRaConfig, keyof Protobuf.native.Message>
|
||||
implements Omit<Protobuf.Config.Config_LoRaConfig, keyof Message>
|
||||
{
|
||||
@IsBoolean()
|
||||
usePreset: boolean;
|
||||
|
||||
@IsEnum(Protobuf.Config_LoRaConfig_ModemPreset)
|
||||
modemPreset: Protobuf.Config_LoRaConfig_ModemPreset;
|
||||
@IsEnum(Protobuf.Config.Config_LoRaConfig_ModemPreset)
|
||||
modemPreset: Protobuf.Config.Config_LoRaConfig_ModemPreset;
|
||||
|
||||
@IsInt()
|
||||
bandwidth: number;
|
||||
@@ -27,8 +27,8 @@ export class LoRaValidation
|
||||
@IsInt()
|
||||
frequencyOffset: number;
|
||||
|
||||
@IsEnum(Protobuf.Config_LoRaConfig_RegionCode)
|
||||
region: Protobuf.Config_LoRaConfig_RegionCode;
|
||||
@IsEnum(Protobuf.Config.Config_LoRaConfig_RegionCode)
|
||||
region: Protobuf.Config.Config_LoRaConfig_RegionCode;
|
||||
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
|
||||
@@ -6,15 +6,12 @@ import {
|
||||
IsString,
|
||||
Length,
|
||||
} from "class-validator";
|
||||
|
||||
import { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class NetworkValidation
|
||||
implements
|
||||
Omit<
|
||||
Protobuf.Config_NetworkConfig,
|
||||
keyof Protobuf.native.Message | "ipv4Config"
|
||||
>
|
||||
Omit<Protobuf.Config.Config_NetworkConfig, keyof Message | "ipv4Config">
|
||||
{
|
||||
@IsBoolean()
|
||||
wifiEnabled: boolean;
|
||||
@@ -33,21 +30,18 @@ export class NetworkValidation
|
||||
@IsBoolean()
|
||||
ethEnabled: boolean;
|
||||
|
||||
@IsEnum(Protobuf.Config_NetworkConfig_AddressMode)
|
||||
addressMode: Protobuf.Config_NetworkConfig_AddressMode;
|
||||
@IsEnum(Protobuf.Config.Config_NetworkConfig_AddressMode)
|
||||
addressMode: Protobuf.Config.Config_NetworkConfig_AddressMode;
|
||||
|
||||
ipv4Config: NetworkValidation_IpV4Config;
|
||||
ipv4Config: NetworkValidationIpV4Config;
|
||||
|
||||
@IsString()
|
||||
rsyslogServer: string;
|
||||
}
|
||||
|
||||
export class NetworkValidation_IpV4Config
|
||||
export class NetworkValidationIpV4Config
|
||||
implements
|
||||
Omit<
|
||||
Protobuf.Config_NetworkConfig_IpV4Config,
|
||||
keyof Protobuf.native.Message
|
||||
>
|
||||
Omit<Protobuf.Config.Config_NetworkConfig_IpV4Config, keyof Message>
|
||||
{
|
||||
@IsIP()
|
||||
@IsOptional()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { IsBoolean, IsInt, IsNumber } from "class-validator";
|
||||
|
||||
import { IsBoolean, IsInt } from "class-validator";
|
||||
import type { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class PositionValidation
|
||||
implements Omit<Protobuf.Config_PositionConfig, keyof Protobuf.native.Message>
|
||||
implements Omit<Protobuf.Config.Config_PositionConfig, keyof Message>
|
||||
{
|
||||
@IsInt()
|
||||
positionBroadcastSecs: number;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { IsBoolean, IsInt, Max, Min } from "class-validator";
|
||||
|
||||
import type { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class PowerValidation
|
||||
implements Omit<Protobuf.Config_PowerConfig, keyof Protobuf.native.Message>
|
||||
implements Omit<Protobuf.Config.Config_PowerConfig, keyof Message>
|
||||
{
|
||||
@IsBoolean()
|
||||
isPowerSaving: boolean;
|
||||
|
||||
Reference in New Issue
Block a user