File

src/user-lists/dtos/contributions-by-project.dto.ts

Index

Properties

Properties

Readonly Optional range
Type : number
Default value : 30
Decorators :
@ApiPropertyOptional({description: 'Range in days', default: 30, type: 'integer'})
@Type(undefined)
@IsIn(['7', '30', '90', '180', '360'])
@IsInt()
@IsOptional()
Readonly Optional repos
Type : string
Decorators :
@ApiPropertyOptional({description: 'Repo, comma delimited names', type: 'string', example: 'open-sauced/app'})
@Type(undefined)
@IsString()
@IsOptional()
import { ApiPropertyOptional } from "@nestjs/swagger";
import { Type } from "class-transformer";
import { IsIn, IsInt, IsOptional, IsString } from "class-validator";

export class ContributionsByProjectDto {
  @ApiPropertyOptional({
    description: "Range in days",
    default: 30,
    type: "integer",
  })
  @Type(() => Number)
  @IsIn([7, 30, 90, 180, 360])
  @IsInt()
  @IsOptional()
  readonly range?: number = 30;

  @ApiPropertyOptional({
    description: "Repo, comma delimited names",
    type: "string",
    example: "open-sauced/app",
  })
  @Type(() => String)
  @IsString()
  @IsOptional()
  readonly repos?: string;
}

results matching ""

    No results matching ""