/** * Created by user on 2019/6/8. */ import { EnumRestClientMetadata } from './http'; import { IParameterDecorator, IPropertyKey } from 'reflect-metadata-util'; export declare const SymParamMap: unique symbol; export interface IParameter { key: K; parameterIndex: number; defaultValue?: V; value?: V | unknown; } export declare function BodyParams(value: T): (target: any, propertyName?: IPropertyKey) => void; export declare function BodyData(value: T): (target: any, propertyName?: IPropertyKey) => void; export declare type IEnumRestClientMetadataParam = EnumRestClientMetadata.PARAM_PATH | EnumRestClientMetadata.PARAM_QUERY | EnumRestClientMetadata.PARAM_DATA | EnumRestClientMetadata.PARAM_BODY | EnumRestClientMetadata.PARAM_HEADER; export declare type IEnumRestClientMetadataParamMap = EnumRestClientMetadata.PARAM_MAP_PATH | EnumRestClientMetadata.PARAM_MAP_QUERY | EnumRestClientMetadata.PARAM_MAP_DATA | EnumRestClientMetadata.PARAM_MAP_BODY | EnumRestClientMetadata.PARAM_MAP_HEADER | EnumRestClientMetadata.PARAM_MAP_AUTO; export declare function ParamBody(defaultValue?: V): (target: object, propertyKey: IPropertyKey, parameterIndex: number) => void; export declare const ParamPath: (key: K, defaultValue?: V) => IParameterDecorator; export declare const ParamQuery: (key: K, defaultValue?: V) => IParameterDecorator; export declare const ParamData: (key: K, defaultValue?: V) => IParameterDecorator; export declare const ParamHeader: (key: K, defaultValue?: V) => IParameterDecorator; export interface IParamMetadata extends IParamMetadata2 { [EnumRestClientMetadata.PARAM_PATH]: IParameter[]; [EnumRestClientMetadata.PARAM_QUERY]: IParameter[]; [EnumRestClientMetadata.PARAM_DATA]: IParameter[]; [EnumRestClientMetadata.PARAM_HEADER]: IParameter[]; [EnumRestClientMetadata.PARAM_BODY]: IParameter; } export interface IParamMetadata2 { [EnumRestClientMetadata.PARAM_MAP_PATH]: IParameter[]; [EnumRestClientMetadata.PARAM_MAP_QUERY]: IParameter[]; [EnumRestClientMetadata.PARAM_MAP_DATA]: IParameter[]; [EnumRestClientMetadata.PARAM_MAP_HEADER]: IParameter[]; [EnumRestClientMetadata.PARAM_MAP_BODY]: IParameter[]; [EnumRestClientMetadata.PARAM_MAP_AUTO]: IParameter[]; } export declare function getParamMetadata(target: object, propertyKey: IPropertyKey): IParamMetadata; export declare function HandleParamMetadata(fn: ((info: { target: T; propertyKey: IPropertyKey; thisArgv: ThisType; argv: any[]; paramMetadata: IParamMetadata; }) => { paramMetadata: IParamMetadata; argv: any[]; })): (target: any, propertyKey: IPropertyKey, descriptor: TypedPropertyDescriptor<(...argv: any[]) => any>) => void; export declare function _habdleParamInfo(info: { argv: any[]; paramMetadata: IParamMetadata; }): IParamMetadata; export declare function _ParamInfoToArgv(data: IParamMetadata, argv: T): T; export declare const ParamMapPath: = any, K extends unknown = keyof V>(defaultValue?: V) => IParameterDecorator; export declare const ParamMapQuery: = any, K extends unknown = keyof V>(defaultValue?: V) => IParameterDecorator; export declare const ParamMapData: = any, K extends unknown = keyof V>(defaultValue?: V) => IParameterDecorator; export declare const ParamMapHeader: = any, K extends unknown = keyof V>(defaultValue?: V) => IParameterDecorator; export declare const ParamMapAuto: = any, K extends unknown = keyof V>(defaultValue?: V) => IParameterDecorator; export declare const ParamMapBody: = any, K extends unknown = keyof V>(defaultValue?: V) => IParameterDecorator;