import { IModelDescriptor } from './interfaces.js'; /** * Which side of the wire a model schema describes. `request` is what a client may SEND * ( the model used as `@Body()` ), `response` is what the API hands BACK. */ export type ModelSchemaKind = 'request' | 'response'; /** * Builds a JSON schema from a model's columns, stored on `descriptor.Schema` / * `descriptor.ResponseSchema` at model load. `Ignore` columns are excluded and relations * are omitted. * * The two flavours differ in three ways, all of them facts about what a response IS: * - `descriptor.Hidden` ( the model's `@Hidden()` properties ) is dropped: `dehydrate()` and * `dehydrateWithRelations()` omit those columns unconditionally, so no response can * ever carry them - rbac's User hides `Password`, * - the driver may override a type it returns differently from what it accepts, * - nothing is `required`: a response is partial by construction ( `skipUndefined` * drops columns the query did not select ). * * @param descriptor - the model descriptor to describe * @param kind - which contract to build, defaults to the write one */ export declare function buildModelJsonSchema(descriptor: IModelDescriptor, kind?: ModelSchemaKind): any; //# sourceMappingURL=schema.d.ts.map