Skip to content

Commit

Permalink
Add class SecurityValidation
Browse files Browse the repository at this point in the history
  • Loading branch information
KomelT committed Aug 20, 2024
1 parent f64b965 commit d3836a7
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions src/validation/config/security.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import type { Message } from "@bufbuild/protobuf";
import type { Protobuf } from "@meshtastic/js";
import { IsBoolean, IsString } from "class-validator";

export class SecurityValidation
implements Omit<Protobuf.Config.Config_SecurityConfig, keyof Message | "adminKey" | "privateKey" | "publicKey">
{
@IsBoolean()
adminChannelEnabled: boolean;

@IsString()
adminKey: string;

@IsBoolean()
bluetoothLoggingEnabled: boolean;

@IsBoolean()
debugLogApiEnabled: boolean;

@IsBoolean()
isManaged: boolean;

@IsString()
privateKey: string;

@IsString()
publicKey: string;

@IsBoolean()
serialEnabled: boolean;
}

0 comments on commit d3836a7

Please sign in to comment.