update to namespaced protobufs
This commit is contained in:
@@ -6,24 +6,23 @@ import {
|
||||
IsString,
|
||||
Length,
|
||||
} from "class-validator";
|
||||
|
||||
import { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class ChannelValidation
|
||||
implements Omit<Protobuf.Channel, keyof Protobuf.native.Message | "settings">
|
||||
implements Omit<Protobuf.Channel.Channel, keyof Message | "settings">
|
||||
{
|
||||
@IsNumber()
|
||||
index: number;
|
||||
|
||||
settings: Channel_SettingsValidation;
|
||||
|
||||
@IsEnum(Protobuf.Channel_Role)
|
||||
role: Protobuf.Channel_Role;
|
||||
@IsEnum(Protobuf.Channel.Channel_Role)
|
||||
role: Protobuf.Channel.Channel_Role;
|
||||
}
|
||||
|
||||
export class Channel_SettingsValidation
|
||||
implements
|
||||
Omit<Protobuf.ChannelSettings, keyof Protobuf.native.Message | "psk">
|
||||
implements Omit<Protobuf.Channel.ChannelSettings, keyof Message | "psk">
|
||||
{
|
||||
@IsNumber()
|
||||
channelNum: number;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { IsBoolean, IsInt } from "class-validator";
|
||||
|
||||
import type { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class AmbientLightingValidation
|
||||
implements
|
||||
Omit<
|
||||
Protobuf.ModuleConfig_AmbientLightingConfig,
|
||||
keyof Protobuf.native.Message
|
||||
Protobuf.ModuleConfig.ModuleConfig_AmbientLightingConfig,
|
||||
keyof Message
|
||||
>
|
||||
{
|
||||
@IsBoolean()
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { IsBoolean, IsEnum, IsInt } from "class-validator";
|
||||
|
||||
import { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class AudioValidation
|
||||
implements
|
||||
Omit<Protobuf.ModuleConfig_AudioConfig, keyof Protobuf.native.Message>
|
||||
implements Omit<Protobuf.ModuleConfig.ModuleConfig_AudioConfig, keyof Message>
|
||||
{
|
||||
@IsBoolean()
|
||||
codec2Enabled: boolean;
|
||||
@@ -12,8 +11,8 @@ export class AudioValidation
|
||||
@IsInt()
|
||||
pttPin: number;
|
||||
|
||||
@IsEnum(Protobuf.ModuleConfig_AudioConfig_Audio_Baud)
|
||||
bitrate: Protobuf.ModuleConfig_AudioConfig_Audio_Baud;
|
||||
@IsEnum(Protobuf.ModuleConfig.ModuleConfig_AudioConfig_Audio_Baud)
|
||||
bitrate: Protobuf.ModuleConfig.ModuleConfig_AudioConfig_Audio_Baud;
|
||||
|
||||
@IsInt()
|
||||
i2sWs: number;
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
import { IsBoolean, IsEnum, IsInt, Length } from "class-validator";
|
||||
|
||||
import { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class CannedMessageValidation
|
||||
implements
|
||||
Omit<
|
||||
Protobuf.ModuleConfig_CannedMessageConfig,
|
||||
keyof Protobuf.native.Message
|
||||
>
|
||||
Omit<Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig, keyof Message>
|
||||
{
|
||||
@IsBoolean()
|
||||
rotary1Enabled: boolean;
|
||||
@@ -21,14 +18,14 @@ export class CannedMessageValidation
|
||||
@IsInt()
|
||||
inputbrokerPinPress: number;
|
||||
|
||||
@IsEnum(Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar)
|
||||
inputbrokerEventCw: Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar;
|
||||
@IsEnum(Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar)
|
||||
inputbrokerEventCw: Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar;
|
||||
|
||||
@IsEnum(Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar)
|
||||
inputbrokerEventCcw: Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar;
|
||||
@IsEnum(Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar)
|
||||
inputbrokerEventCcw: Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar;
|
||||
|
||||
@IsEnum(Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar)
|
||||
inputbrokerEventPress: Protobuf.ModuleConfig_CannedMessageConfig_InputEventChar;
|
||||
@IsEnum(Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar)
|
||||
inputbrokerEventPress: Protobuf.ModuleConfig.ModuleConfig_CannedMessageConfig_InputEventChar;
|
||||
|
||||
@IsBoolean()
|
||||
updown1Enabled: boolean;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { IsBoolean, IsInt, Length } from "class-validator";
|
||||
|
||||
import type { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class DetectionSensorValidation
|
||||
implements
|
||||
Omit<
|
||||
Protobuf.ModuleConfig_DetectionSensorConfig,
|
||||
keyof Protobuf.native.Message
|
||||
Protobuf.ModuleConfig.ModuleConfig_DetectionSensorConfig,
|
||||
keyof Message
|
||||
>
|
||||
{
|
||||
@IsBoolean()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { IsBoolean, IsInt } from "class-validator";
|
||||
|
||||
import type { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class ExternalNotificationValidation
|
||||
implements
|
||||
Omit<
|
||||
Protobuf.ModuleConfig_ExternalNotificationConfig,
|
||||
keyof Protobuf.native.Message
|
||||
Protobuf.ModuleConfig.ModuleConfig_ExternalNotificationConfig,
|
||||
keyof Message
|
||||
>
|
||||
{
|
||||
@IsBoolean()
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { IsBoolean, IsString, Length } from "class-validator";
|
||||
|
||||
import type { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class MQTTValidation
|
||||
implements
|
||||
Omit<Protobuf.ModuleConfig_MQTTConfig, keyof Protobuf.native.Message>
|
||||
export class MqttValidation
|
||||
implements Omit<Protobuf.ModuleConfig.ModuleConfig_MQTTConfig, keyof Message>
|
||||
{
|
||||
@IsBoolean()
|
||||
enabled: boolean;
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
import { IsBoolean, IsInt, Length } from "class-validator";
|
||||
|
||||
import { IsBoolean, IsInt } from "class-validator";
|
||||
import type { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class NeighborInfoValidation
|
||||
implements
|
||||
Omit<
|
||||
Protobuf.ModuleConfig_NeighborInfoConfig,
|
||||
keyof Protobuf.native.Message
|
||||
>
|
||||
Omit<Protobuf.ModuleConfig.ModuleConfig_NeighborInfoConfig, keyof Message>
|
||||
{
|
||||
@IsBoolean()
|
||||
enabled: boolean;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { IsBoolean, IsInt } from "class-validator";
|
||||
|
||||
import type { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class RangeTestValidation
|
||||
implements
|
||||
Omit<Protobuf.ModuleConfig_RangeTestConfig, keyof Protobuf.native.Message>
|
||||
Omit<Protobuf.ModuleConfig.ModuleConfig_RangeTestConfig, keyof Message>
|
||||
{
|
||||
@IsBoolean()
|
||||
enabled: boolean;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { IsBoolean, IsEnum, IsInt } from "class-validator";
|
||||
|
||||
import { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class SerialValidation
|
||||
implements
|
||||
Omit<Protobuf.ModuleConfig_SerialConfig, keyof Protobuf.native.Message>
|
||||
Omit<Protobuf.ModuleConfig.ModuleConfig_SerialConfig, keyof Message>
|
||||
{
|
||||
@IsBoolean()
|
||||
enabled: boolean;
|
||||
@@ -18,14 +18,14 @@ export class SerialValidation
|
||||
@IsInt()
|
||||
txd: number;
|
||||
|
||||
@IsEnum(Protobuf.ModuleConfig_SerialConfig_Serial_Baud)
|
||||
baud: Protobuf.ModuleConfig_SerialConfig_Serial_Baud;
|
||||
@IsEnum(Protobuf.ModuleConfig.ModuleConfig_SerialConfig_Serial_Baud)
|
||||
baud: Protobuf.ModuleConfig.ModuleConfig_SerialConfig_Serial_Baud;
|
||||
|
||||
@IsInt()
|
||||
timeout: number;
|
||||
|
||||
@IsEnum(Protobuf.ModuleConfig_SerialConfig_Serial_Mode)
|
||||
mode: Protobuf.ModuleConfig_SerialConfig_Serial_Mode;
|
||||
@IsEnum(Protobuf.ModuleConfig.ModuleConfig_SerialConfig_Serial_Mode)
|
||||
mode: Protobuf.ModuleConfig.ModuleConfig_SerialConfig_Serial_Mode;
|
||||
|
||||
@IsBoolean()
|
||||
overrideConsoleSerialPort: boolean;
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
import { IsBoolean, IsInt } from "class-validator";
|
||||
|
||||
import type { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class StoreForwardValidation
|
||||
implements
|
||||
Omit<
|
||||
Protobuf.ModuleConfig_StoreForwardConfig,
|
||||
keyof Protobuf.native.Message
|
||||
>
|
||||
Omit<Protobuf.ModuleConfig.ModuleConfig_StoreForwardConfig, keyof Message>
|
||||
{
|
||||
@IsBoolean()
|
||||
enabled: boolean;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { IsBoolean, IsInt } from "class-validator";
|
||||
|
||||
import type { Protobuf } from "@meshtastic/js";
|
||||
import type { Message } from "@bufbuild/protobuf";
|
||||
|
||||
export class TelemetryValidation
|
||||
implements
|
||||
Omit<Protobuf.ModuleConfig_TelemetryConfig, keyof Protobuf.native.Message>
|
||||
Omit<Protobuf.ModuleConfig.ModuleConfig_TelemetryConfig, keyof Message>
|
||||
{
|
||||
@IsInt()
|
||||
deviceUpdateInterval: number;
|
||||
|
||||
Reference in New Issue
Block a user