### File

`src/core/domain/dtos/request.dto.ts`

### Description

Request object, which contains query parameters and Elasticsearch query object

### Index

###### Properties
Optional es_query query

### Constructor

`constructor(query: SearchQueryDto, es_query: EsQueryDto)`
Defined in src/core/domain/dtos/request.dto.ts:34
Constructs an object with provided parameters Parameters :
Name | Type | Optional
query | `SearchQueryDto` | No
es_query | `EsQueryDto` | No

### Properties

Optional es_query
Type : `EsQueryDto`
Decorators : `@IsOptional() @ApiProperty({description: '', example: undefined})`
Defined in src/core/domain/dtos/request.dto.ts:34
Elasticsearch query object

query
Type : `SearchQueryDto`
Decorators : `@IsDefined() @IsNotEmpty() @ApiProperty({description: '', example: undefined})`
Defined in src/core/domain/dtos/request.dto.ts:24
Query parameters object

    import { ApiProperty } from "@nestjs/swagger";
    import { IsDefined, IsIn, IsInt, IsNotEmpty, IsOptional, IsString } from "class-validator";
    import { EsQueryDto } from "./es-query.dto";
    import { SearchQueryDto } from "./search-q.dto";

    /**
     * List of allowed properties in this DTO
     */
    const allowedProperties = ['query', 'es_query'];

    /**
     * Request object, which contains query parameters and Elasticsearch query object
     */
    export class RequestDto {
        /**
         * Query parameters object
         */
        @IsDefined()
        @IsNotEmpty()
        @ApiProperty({
            description: '',
            example: {}
        })
        query: SearchQueryDto;

        /**
         * Elasticsearch query object
         */
        @IsOptional()
        @ApiProperty({
            description: '',
            example: {},
        })
        es_query?: EsQueryDto;

         /**
          * Constructs an object with provided parameters
          * @param query
          * @param es_query
          */
         constructor(query: SearchQueryDto, es_query: EsQueryDto) {
            this.query = query;
            this.es_query = es_query;
         }
    }

# results matching ""

# No results matching ""