import 'reflect-metadata'; import { IRequestContext } from "../../pipeline/common"; /** * Model metadata definition */ export interface ModelDefinition { /** * Model name (default class name) */ name?: string; /** * Inherited type */ extends?: string; /** * Model description */ description?: string; /** * Coerce input data */ coerce?: ((data) => any) | boolean; /** * Validatation function */ validate?: (entity, ctx?: IRequestContext) => string; /** * Storage name (table or collection) - default = model name */ storageName?: string; /** * This model (or its children) has sensible data - Required if you want obfuscate sensible type data */ hasSensibleData?: boolean; inputModel?: boolean; } /** * Declare a data model */ export declare function Model(def?: ModelDefinition): (target: Function) => void; export declare function InputModel(def?: ModelDefinition): (target: Function) => void;