import { CountOptions, Model } from './model'; import { FindOptions, ManyQueryResponse } from '../handler'; import { CreateModel } from './interfaces/create-model.interface'; import { ModelMetadata } from './interfaces/model-metadata.interface'; import { FindByIdOptions, IFindOptions } from '../handler/'; import { LogicalWhereExpr } from '../query'; import { ModelTypes } from './model.types'; import { UpdateManyOptions } from './interfaces/update-many.interface'; import { FindOneAndUpdateOption } from './interfaces/find.interface'; import { CastOptions, MutationFunctionOptions } from '../utils/cast-strategy'; /** * @ignore */ export declare const createModel: ({ name, schemaDraft, options, ottoman }: CreateModel) => ModelTypes; export declare const _buildModel: (metadata: ModelMetadata) => { new (data: any, options?: CastOptions): { [key: string]: any; readonly $: ModelMetadata; _getId(): string; _getIdField(): string; save(onlyCreate?: boolean): Promise; remove(options?: {}): Promise; _populate(fieldsName?: import("./populate.types").PopulateFieldsType | undefined, deep?: number): Promise; _depopulate(fieldsName: string | string[]): any; _populated(fieldName: string): boolean; _applyData(data: any, strategy?: import("../utils/cast-strategy").ApplyStrategy): void; _validate(): any; toObject(): any; toJSON(): any; $toObject(): any; }; find: (filter?: LogicalWhereExpr, options?: IFindOptions) => Promise; collection: any; /** * dropCollection drops a collection from a scope in a bucket. * @param collectionName * @param scopeName * @param options */ dropCollection(collectionName?: string | undefined, scopeName?: string | undefined, options?: { timeout?: number; }): Promise; count: (filter?: LogicalWhereExpr, options?: CountOptions) => Promise; findById: (id: string, options?: FindByIdOptions) => Promise; findOne: (filter?: LogicalWhereExpr, options?: FindOptions) => Promise; create: (data: Record) => Promise; createMany: (docs: Record[] | Record) => Promise; updateById: (id: string, data: any, options?: MutationFunctionOptions) => Promise<{ [key: string]: any; readonly $: ModelMetadata; _getId(): string; _getIdField(): string; save(onlyCreate?: boolean): Promise; remove(options?: {}): Promise; _populate(fieldsName?: import("./populate.types").PopulateFieldsType | undefined, deep?: number): Promise; _depopulate(fieldsName: string | string[]): any; _populated(fieldName: string): boolean; _applyData(data: any, strategy?: import("../utils/cast-strategy").ApplyStrategy): void; _validate(): any; toObject(): any; toJSON(): any; $toObject(): any; } | undefined>; replaceById: (id: string, data: any, options?: MutationFunctionOptions | undefined) => Promise<{ [key: string]: any; readonly $: ModelMetadata; _getId(): string; _getIdField(): string; save(onlyCreate?: boolean): Promise; remove(options?: {}): Promise; _populate(fieldsName?: import("./populate.types").PopulateFieldsType | undefined, deep?: number): Promise; _depopulate(fieldsName: string | string[]): any; _populated(fieldName: string): boolean; _applyData(data: any, strategy?: import("../utils/cast-strategy").ApplyStrategy): void; _validate(): any; toObject(): any; toJSON(): any; $toObject(): any; } | undefined>; removeById: (id: string) => Promise; fromData(data: Record): { [key: string]: any; readonly $: ModelMetadata; _getId(): string; _getIdField(): string; save(onlyCreate?: boolean): Promise; remove(options?: {}): Promise; _populate(fieldsName?: import("./populate.types").PopulateFieldsType | undefined, deep?: number): Promise; _depopulate(fieldsName: string | string[]): any; _populated(fieldName: string): boolean; _applyData(data: any, strategy?: import("../utils/cast-strategy").ApplyStrategy): void; _validate(): any; toObject(): any; toJSON(): any; $toObject(): any; }; removeMany: (filter?: LogicalWhereExpr, options?: FindOptions) => Promise; updateMany: (filter: LogicalWhereExpr, doc: Record, options?: UpdateManyOptions) => Promise; findOneAndUpdate: (filter: LogicalWhereExpr, doc: Record, options?: FindOneAndUpdateOption) => Promise; };