src/module/settings/model/ApplicationConfiguration.ts
Properties |
|
Readonly database |
Type : DatabaseConfiguration
|
Decorators :
@Type(undefined)
|
Readonly defaultSettings |
Type : ClientSettingsDTO | undefined
|
Decorators :
@IsOptional()
|
Readonly gotenberg |
Type : GotenbergConfiguration | undefined
|
Decorators :
@IsOptional()
|
Readonly Optional handbookUrl |
Type : string
|
Decorators :
@IsOptional()
|
Readonly Optional prefix |
Type : string
|
Decorators :
@IsOptional()
|
Readonly Optional sessionTimeout |
Type : number
|
Decorators :
@IsOptional()
|
import { Type } from 'class-transformer';
import { IsNumber, IsOptional, IsString, IsUrl, Min, ValidateNested } from 'class-validator';
import { ClientSettingsDTO } from '../settings.dto';
import { DatabaseConfiguration } from './DatabaseConfiguration';
import { GotenbergConfiguration } from './GotenbergConfiguration';
export class ApplicationConfiguration {
@IsOptional()
@IsNumber()
@Min(0)
readonly sessionTimeout?: number;
@IsOptional()
@IsString()
readonly prefix?: string;
@IsOptional()
@IsUrl()
readonly handbookUrl?: string;
@Type(() => DatabaseConfiguration)
@ValidateNested()
readonly database!: DatabaseConfiguration;
@IsOptional()
@Type(() => ClientSettingsDTO)
@ValidateNested()
readonly defaultSettings: ClientSettingsDTO | undefined;
@IsOptional()
@Type(() => GotenbergConfiguration)
@ValidateNested()
readonly gotenberg: GotenbergConfiguration | undefined;
}