import type { HydratedDocument, InferRawDocType, Schema } from 'mongoose'; import { type Model } from 'mongoose'; export type Merge = Omit & N; export type WithTimestamps = TOptions extends { timestamps: true; } ? { createdAt: Schema.Types.Date; updatedAt: Schema.Types.Date; } : TOptions extends { timestamps: false; } ? object : { createdAt: Schema.Types.Date; updatedAt: Schema.Types.Date; }; export type ExtractProperty = T extends { [P in K]: infer R; } ? R : Default; export type GetModelSchemaTypeFromClass = Schema & WithTimestamps>>>, // TRawDocType Model & WithTimestamps>>>, object, // TQueryHelpers ExtractProperty, // TInstanceMethods ExtractProperty>, // TModelType ExtractProperty, // TInstanceMethods object, // TQueryHelpers ExtractProperty, // TVirtuals ExtractProperty, // TStaticMethods ExtractProperty>; export type VirtualType = { [P in keyof T]: T[P] extends { get: () => infer R; } ? R : never; }; export type GetModelTypeFromClass = Model & WithTimestamps>>>, // TRawDocType object, // TQueryHelpers ExtractProperty, // TInstanceMethods ExtractProperty, // TVirtuals HydratedDocument & WithTimestamps>>>, //TRawDocType //TRawDocType VirtualType> & ExtractProperty & { id: string; }, // TVirtuals & TInstanceMethods object, // TQueryHelpers ExtractProperty>, GetModelSchemaTypeFromClass> & ExtractProperty; export type GetModelTypeLiteFromSchema = Model>>>; export declare const defaultOptions: { readonly timestamps: true; readonly minimize: false; }; export type TBaseModel = GetModelTypeFromClass; export declare class BaseModel { static get modelSchema(): {}; static get schemaOptions(): {}; static get modelInstanceMethods(): {}; static get modelVirtuals(): {}; static get modelStatics(): {}; static initHooks(_schema: Schema): void; static initialize(this: T): GetModelTypeFromClass; }