src/alert/dto/update-alert.dto.ts
Properties |
|
| Optional alertParams |
Type : AlertParams
|
Decorators :
@IsOptional()
|
|
Defined in src/alert/dto/update-alert.dto.ts:31
|
| Optional interval |
Type : number
|
Decorators :
@IsOptional()
|
|
Defined in src/alert/dto/update-alert.dto.ts:21
|
| Optional name |
Type : string
|
Decorators :
@IsOptional()
|
|
Defined in src/alert/dto/update-alert.dto.ts:16
|
| Optional status |
Type : AlertStatus
|
Decorators :
@IsOptional()
|
|
Defined in src/alert/dto/update-alert.dto.ts:27
|
| type |
Type : AlertType
|
Decorators :
@IsOptional()
|
|
Defined in src/alert/dto/update-alert.dto.ts:36
|
import { ApiProperty } from "@nestjs/swagger";
import {
IsEnum,
IsNumber,
IsOptional,
IsString,
NotEquals,
} from "class-validator";
import { AlertStatus, AlertType } from "../entities/alert.entity";
import { AlertParams } from "../types/alert-params.type";
export class UpdateAlertDto {
@IsOptional()
@IsString()
@ApiProperty({ required: false })
name?: string;
@IsOptional()
@IsNumber()
@ApiProperty({ required: false })
interval?: number;
@IsOptional()
@IsEnum(AlertStatus, { each: true })
@NotEquals(AlertStatus.INPROGRESS)
@NotEquals(AlertStatus.TRIGGERED)
status?: AlertStatus;
@IsOptional()
@ApiProperty({ required: false })
alertParams?: AlertParams;
@IsOptional()
@ApiProperty({ required: false })
@IsEnum(AlertType, { each: true })
type: AlertType;
}