import { DropCollectionOptions } from 'couchbase'; import { Model, Query } from '..'; import { FindOptions, ManyQueryResponse } from '../handler'; import { FindByIdOptions, IFindOptions } from '../handler/'; import { IConditionExpr, LogicalWhereExpr } from '../query'; import { CastOptions, MutationFunctionOptions } from '../utils/cast-strategy'; import { CreateModel } from './interfaces/create-model.interface'; import { FindOneAndUpdateOption } from './interfaces/find.interface'; import { ModelMetadata } from './interfaces/model-metadata.interface'; import { UpdateManyOptions } from './interfaces/update-many.interface'; import { ModelTypes, saveOptions, CountOptions, CountOptions as removeOptions } from './model.types'; /** * @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; "__#1@#isNew": boolean; readonly $: ModelMetadata; _getId(): string; _getIdField(): string; save(onlyCreate?: boolean, options?: saveOptions): Promise; remove(options?: import("./model.types").removeOptions): Promise; _populate(fieldsName?: import("./populate.types").PopulateFieldsType | undefined, options?: import("./populate.types").PopulateOptionsType | undefined): Promise; _depopulate(fieldsName: string | string[]): any; _populated(fieldName: string): boolean; _applyData(data: any, strategy?: import("../utils/cast-strategy").ApplyStrategy): any; _validate(): any; toObject(): any; toJSON(): any; $toObject(): any; readonly $isNew: boolean; }; readonly namespace: string; readonly collectionName: string; query(params: IConditionExpr): Query; 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, scopeName?: string, options?: DropCollectionOptions): Promise; count: (filter?: LogicalWhereExpr, options?: CountOptions) => Promise; findById: (id: string, options?: FindByIdOptions) => Promise>; findOne: (filter?: LogicalWhereExpr, options?: FindOptions) => Promise; create: (data: Record, options?: saveOptions) => Promise; createMany: (docs: Record[] | Record, options?: saveOptions) => Promise>; updateById: (id: string, data: any, options?: MutationFunctionOptions) => Promise; replaceById: (id: string, data: any, options?: MutationFunctionOptions) => Promise; removeById: (id: string, options?: removeOptions) => Promise; fromData(data: Record): { [key: string]: any; "__#1@#isNew": boolean; readonly $: ModelMetadata; _getId(): string; _getIdField(): string; save(onlyCreate?: boolean, options?: saveOptions): Promise; remove(options?: import("./model.types").removeOptions): Promise; _populate(fieldsName?: import("./populate.types").PopulateFieldsType | undefined, options?: import("./populate.types").PopulateOptionsType | undefined): Promise; _depopulate(fieldsName: string | string[]): any; _populated(fieldName: string): boolean; _applyData(data: any, strategy?: import("../utils/cast-strategy").ApplyStrategy): any; _validate(): any; toObject(): any; toJSON(): any; $toObject(): any; readonly $isNew: boolean; }; removeMany: (filter?: LogicalWhereExpr, options?: FindOptions) => Promise>; updateMany: (filter: LogicalWhereExpr | undefined, doc: Record, options?: UpdateManyOptions) => Promise>; findOneAndUpdate: (filter: LogicalWhereExpr | undefined, doc: Record, options?: FindOneAndUpdateOption) => Promise; findOneAndRemove: (filter?: LogicalWhereExpr, options?: removeOptions) => Promise; };