src/histogram/dtos/releases.dto.ts
Properties |
|
| Readonly Optional contributor |
Type : string
|
Decorators :
@ApiPropertyOptional({type: 'string', example: 'bdougie'})
|
|
Inherited from
BaseHistogramDto
|
|
Defined in
BaseHistogramDto:54
|
| Readonly Optional orderDirection |
Type : OrderDirectionEnum
|
Default value : OrderDirectionEnum.DESC
|
Decorators :
@ApiPropertyOptional({enum: OrderDirectionEnum, enumName: 'OrderDirectionEnum', default: undefined})
|
|
Inherited from
BaseHistogramDto
|
|
Defined in
BaseHistogramDto:64
|
| 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'})
|
|
Inherited from
BaseHistogramDto
|
|
Defined in
BaseHistogramDto:26
|
| Readonly range |
Type : number
|
Default value : 30
|
Decorators :
@ApiProperty({description: 'Range in days', default: 30, type: 'integer'})
|
|
Inherited from
BaseHistogramDto
|
|
Defined in
BaseHistogramDto:15
|
| Readonly Optional repo |
Type : string
|
Decorators :
@ApiPropertyOptional({description: 'Repo name', type: 'string', example: 'open-sauced/app'})
|
|
Inherited from
BaseHistogramDto
|
|
Defined in
BaseHistogramDto:46
|
| Readonly Optional repoIds |
Type : string
|
Decorators :
@ApiPropertyOptional()
|
|
Inherited from
BaseHistogramDto
|
|
Defined in
BaseHistogramDto:59
|
| Readonly Optional width |
Type : number
|
Default value : 1
|
Decorators :
@ApiPropertyOptional({description: 'Day width of histogram buckets', default: 1, type: 'integer'})
|
|
Inherited from
BaseHistogramDto
|
|
Defined in
BaseHistogramDto:36
|
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;
}