src/user/dto/filter-user.dto.ts
Properties |
|
| Optional _id |
Type : literal type
|
Decorators :
@ApiProperty()
|
|
Defined in src/user/dto/filter-user.dto.ts:43
|
| Optional email |
Type : string
|
Decorators :
@ApiProperty()
|
|
Defined in src/user/dto/filter-user.dto.ts:21
|
| Optional instrumentId |
Type : string
|
Decorators :
@ApiProperty()
|
|
Defined in src/user/dto/filter-user.dto.ts:37
|
| Optional limit |
Type : number
|
Decorators :
@ApiProperty()
|
|
Defined in src/user/dto/filter-user.dto.ts:57
|
| Optional onboardByEmail |
Type : string
|
Decorators :
@ApiProperty()
|
|
Defined in src/user/dto/filter-user.dto.ts:26
|
| Optional orderDirection |
Type : OrderDirection
|
Decorators :
@ApiProperty({enumName: 'orderDirection', enum: undefined})
|
|
Defined in src/user/dto/filter-user.dto.ts:51
|
| Optional selectors |
Type : string[]
|
Decorators :
@ApiProperty()
|
|
Defined in src/user/dto/filter-user.dto.ts:32
|
| Optional skip |
Type : number
|
Decorators :
@ApiProperty()
|
|
Defined in src/user/dto/filter-user.dto.ts:63
|
import { PartialType } from "@nestjs/mapped-types";
import {
ArrayNotEmpty,
IsArray,
IsEmail,
IsEnum,
IsNumber,
IsOptional,
IsString,
} from "class-validator";
import { CreateUserDto } from "./create-user.dto";
import { ApiProperty } from "@nestjs/swagger";
import { Type } from "class-transformer";
import { OrderDirection } from "src/common/interfaces";
export class FilterUserDto extends PartialType(CreateUserDto) {
@ApiProperty()
@IsEmail()
@IsOptional()
email?: string;
@ApiProperty()
@IsEmail()
@IsOptional()
onboardByEmail?: string;
@ApiProperty()
@IsOptional()
@IsArray()
@ArrayNotEmpty()
selectors?: string[];
@ApiProperty()
@IsString()
@IsOptional()
instrumentId?: string;
@ApiProperty()
@IsOptional()
@IsArray()
@ArrayNotEmpty()
_id?: { $in: string[] };
@ApiProperty({
enumName: "orderDirection",
enum: ["asc", "desc"],
})
@IsOptional()
@IsEnum(OrderDirection)
orderDirection?: OrderDirection;
@ApiProperty()
@IsNumber()
@IsOptional()
@Type(() => Number)
limit?: number;
@ApiProperty()
@Type(() => Number)
@IsOptional()
@IsNumber()
skip?: number;
}