1 | import { Type } from '@nestjs/common';
|
2 | import { EnumSchemaAttributes } from '../interfaces/enum-schema-attributes.interface';
|
3 | import { ParameterObject, ReferenceObject, SchemaObject } from '../interfaces/open-api-spec.interface';
|
4 | import { SwaggerEnumType } from '../types/swagger-enum.type';
|
5 | type ParameterOptions = Omit<ParameterObject, 'in' | 'schema' | 'name'>;
|
6 | interface ApiQueryCommonMetadata extends ParameterOptions {
|
7 | type?: Type<unknown> | Function | [Function] | string;
|
8 | isArray?: boolean;
|
9 | enum?: SwaggerEnumType;
|
10 | }
|
11 | export type ApiQueryMetadata = ApiQueryCommonMetadata | ({
|
12 | name: string;
|
13 | } & ApiQueryCommonMetadata & Omit<SchemaObject, 'required'>) | ({
|
14 | name?: string;
|
15 | enumName: string;
|
16 | enumSchema?: EnumSchemaAttributes;
|
17 | } & ApiQueryCommonMetadata);
|
18 | interface ApiQuerySchemaHost extends ParameterOptions {
|
19 | name?: string;
|
20 | schema: SchemaObject | ReferenceObject;
|
21 | }
|
22 | export type ApiQueryOptions = ApiQueryMetadata | ApiQuerySchemaHost;
|
23 | export declare function ApiQuery(options: ApiQueryOptions): MethodDecorator & ClassDecorator;
|
24 | export {};
|