src/alert/dto/create-alert.dto.ts
Properties |
| alertParams |
Type : AlertParams
|
Decorators :
@IsNotEmpty()
|
|
Defined in src/alert/dto/create-alert.dto.ts:37
|
| category |
Type : AlertCategory
|
Decorators :
@IsNotEmpty()
|
|
Defined in src/alert/dto/create-alert.dto.ts:20
|
| interval |
Type : number
|
Decorators :
@IsNotEmpty()
|
|
Defined in src/alert/dto/create-alert.dto.ts:29
|
| name |
Type : string
|
Decorators :
@IsNotEmpty()
|
|
Defined in src/alert/dto/create-alert.dto.ts:11
|
| projectId |
Type : number
|
Decorators :
@IsNotEmpty()
|
|
Defined in src/alert/dto/create-alert.dto.ts:16
|
| targetFilter |
Type : AlertTarget
|
Decorators :
@IsNotEmpty()
|
|
Defined in src/alert/dto/create-alert.dto.ts:33
|
| type |
Type : AlertType
|
Decorators :
@IsNotEmpty()
|
|
Defined in src/alert/dto/create-alert.dto.ts:24
|
import { ApiProperty } from "@nestjs/swagger";
import { IsEnum, IsNotEmpty, IsNumber, IsString } from "class-validator";
import { AlertCategory, AlertType } from "../entities/alert.entity";
import { AlertTarget } from "../types/alertTargets/alert-target.type";
import { AlertParams } from "../types/alert-params.type";
export class CreateAlertDto {
@IsNotEmpty()
@IsString()
@ApiProperty({ required: true })
name: string;
@IsNotEmpty()
@IsNumber()
@ApiProperty({ required: true })
projectId: number;
@IsNotEmpty()
@IsEnum(AlertCategory, { each: true })
category: AlertCategory;
@IsNotEmpty()
@IsEnum(AlertType, { each: true })
type: AlertType;
@IsNotEmpty()
@IsNumber()
@ApiProperty({ required: true })
interval: number;
@IsNotEmpty()
@ApiProperty({ required: true })
targetFilter: AlertTarget;
@IsNotEmpty()
@ApiProperty({ required: true })
alertParams: AlertParams;
}