UNPKG

972 BTypeScriptView Raw
1import { Type } from '@nestjs/common';
2import { EnumSchemaAttributes } from '../interfaces/enum-schema-attributes.interface';
3import { SchemaObjectMetadata } from '../interfaces/schema-object-metadata.interface';
4export type ApiPropertyCommonOptions = SchemaObjectMetadata & {
5 'x-enumNames'?: string[];
6 link?: () => Type<unknown> | Function;
7};
8export type ApiPropertyOptions = ApiPropertyCommonOptions | (ApiPropertyCommonOptions & {
9 enumName: string;
10 enumSchema?: EnumSchemaAttributes;
11});
12export declare function ApiProperty(options?: ApiPropertyOptions): PropertyDecorator;
13export declare function createApiPropertyDecorator(options?: ApiPropertyOptions, overrideExisting?: boolean): PropertyDecorator;
14export declare function ApiPropertyOptional(options?: ApiPropertyOptions): PropertyDecorator;
15export declare function ApiResponseProperty(options?: Pick<ApiPropertyOptions, 'type' | 'example' | 'format' | 'deprecated' | 'enum'>): PropertyDecorator;