Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | import { ApiProperty } from '@nestjs/swagger'; import { Type } from 'class-transformer'; import { IsBoolean, IsEnum, IsNotEmpty, IsOptional, IsUUID, ValidateNested } from 'class-validator'; import { CalculationType, type CalculationRequest } from '@amalia/core/types'; import { DataConnectorObjectsNameDto } from '@amalia/data-capture/imports/core'; export class CreateCalculationDto implements Omit<CalculationRequest, 'trigger'> { @ApiProperty() @IsNotEmpty() @IsUUID('4') public readonly periodId!: string; @ApiProperty({ isArray: true }) @IsOptional() @IsUUID('4', { each: true }) public readonly userIds?: string[]; @ApiProperty({ isArray: true }) @IsOptional() @IsUUID('4', { each: true }) public readonly teamIds?: string[]; @ApiProperty({ isArray: true }) @IsOptional() @IsUUID('4', { each: true }) public readonly planIds?: string[]; @ApiProperty() @IsEnum(CalculationType) @IsOptional() public readonly type?: CalculationType; @ApiProperty() @ValidateNested({ each: true }) @Type(() => DataConnectorObjectsNameDto) @IsOptional() public readonly dataConnectorObjectsNames?: DataConnectorObjectsNameDto[]; @ApiProperty() @IsBoolean() @IsOptional() public readonly shouldComputeForecast?: boolean; } |