File

src/histogram/dtos/releases.dto.ts

Extends

PageOptionsDto

Index

Properties

Properties

Readonly Optional contributor
Type : string
Decorators :
@ApiPropertyOptional({description: 'Filter releases on a given actor', type: 'string', example: 'bdougie'})
@IsString()
@IsOptional()
Readonly Optional not_contributor
Type : string
Decorators :
@ApiPropertyOptional({description: 'Filter out releases based on a given actor', type: 'string', example: 'github-actions'})
@IsString()
@IsOptional()
Readonly Optional orderDirection
Type : OrderDirectionEnum
Default value : OrderDirectionEnum.DESC
Decorators :
@ApiPropertyOptional({enum: OrderDirectionEnum, enumName: 'OrderDirectionEnum', default: undefined})
@IsEnum(OrderDirectionEnum)
@IsOptional()
Inherited from PageOptionsDto
Defined in PageOptionsDto:51
Readonly Optional repoIds
Type : string
Decorators :
@ApiPropertyOptional()
@IsString()
@IsOptional()
Readonly Optional repos
Type : string
Decorators :
@ApiPropertyOptional({description: 'Repo, comma delimited names', type: 'string', example: 'open-sauced/app'})
@Type(undefined)
@IsString()
@IsOptional()
Readonly Optional limit
Type : number
Default value : 50
Decorators :
@ApiPropertyOptional({minimum: 1, maximum: 1000, default: 10, type: 'integer'})
@Type(undefined)
@IsInt()
@Min(1)
@Max(10000)
@IsOptional()
Inherited from PageOptionsDto
Defined in PageOptionsDto:30
Readonly Optional page
Type : number
Default value : 1
Decorators :
@ApiPropertyOptional({minimum: 1, default: 1, type: 'integer'})
@Type(undefined)
@IsInt()
@Min(1)
@IsOptional()
Inherited from PageOptionsDto
Defined in PageOptionsDto:17
Readonly Optional prev_days_start_date
Type : number
Default value : 0
Decorators :
@ApiPropertyOptional({description: 'Number of days in the past to start range block', default: 0, type: 'integer'})
@Type(undefined)
@IsIn(['0', '7', '30', '90', '180'])
@IsInt()
@IsOptional()
Inherited from PageOptionsDto
Defined in PageOptionsDto:57
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()
Inherited from PageOptionsDto
Defined in PageOptionsDto:46
import { ApiPropertyOptional } from "@nestjs/swagger";
import { Type } from "class-transformer";
import { IsEnum, IsOptional, IsString } from "class-validator";
import { PageOptionsDto } from "../../common/dtos/page-options.dto";
import { OrderDirectionEnum } from "../../common/constants/order-direction.constant";
import { BaseHistogramDto } from "./base.dto";

export class ReleaseHistogramDto extends BaseHistogramDto {}

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

  @ApiPropertyOptional({
    description: "Filter releases on a given actor",
    type: "string",
    example: "bdougie",
  })
  @IsString()
  @IsOptional()
  readonly contributor?: string;

  @ApiPropertyOptional({
    description: "Filter out releases based on a given actor",
    type: "string",
    example: "github-actions",
  })
  @IsString()
  @IsOptional()
  readonly not_contributor?: string;

  @ApiPropertyOptional()
  @IsString()
  @IsOptional()
  readonly repoIds?: string;

  @ApiPropertyOptional({
    enum: OrderDirectionEnum,
    enumName: "OrderDirectionEnum",
    default: OrderDirectionEnum.DESC,
  })
  @IsEnum(OrderDirectionEnum)
  @IsOptional()
  readonly orderDirection?: OrderDirectionEnum = OrderDirectionEnum.DESC;
}

results matching ""

    No results matching ""