import { JsonEntityStore } from "@tsed/schema"; import { Type } from "@tsed/core"; import mongoose, { Schema, SchemaDefinition, SchemaDefinitionProperty } from "mongoose"; import { MongooseSchemaOptions } from "../interfaces/MongooseSchemaOptions.js"; import { MongooseVirtualRefOptions } from "../interfaces/MongooseVirtualRefOptions.js"; export interface MongooseSchemaMetadata { schema: SchemaDefinition; virtuals: Map; } export declare function createSchema(target: Type, options?: MongooseSchemaOptions): mongoose.Schema; /** * Get a schema already created. If the schema doesn't exists in registry, it'll be created. * @param target * @param options */ export declare function getSchema(target: Type, options?: MongooseSchemaOptions): Schema; export declare function getSchemaToken(target: Type, options?: any): { token: symbol; collectionName: any; }; /** * @ignore */ export declare function buildMongooseSchema(target: any): MongooseSchemaMetadata; /** * @ignore */ export declare function createSchemaTypeOptions(propEntity: JsonEntityStore): SchemaDefinitionProperty;