import type { BaseDocument, DocumentModelInstance, GenericObject, ICollectionRepository, IGetDocumentsOptions } from "./types"; declare class CollectionModel implements ICollectionRepository { [key: string]: any; private name; private originalName; private schema; private defaults; private constraints?; private documents; private count; private hasBeenCounted?; private hasBeenFetched?; constructor(name: string, schema: Partial, defaults: GenericObject); private obtainCount; private obtainDocuments; getName(): string; setSubcollectionName(name: string): void; appendSubcollectionName(name: string): void; getSchema(): Partial; getConstraints(): IGetDocumentsOptions; withConstraints(constraints: IGetDocumentsOptions): this; whereBy(constraint: IGetDocumentsOptions['whereBy']): this; whereOr(constraint: IGetDocumentsOptions['whereOr']): this; orderBy(constraint: IGetDocumentsOptions['orderBy']): this; limit(constraint: IGetDocumentsOptions['limit']): this; getCount(): Promise; private setCount; getDocuments(): Promise; Manager(): DocumentModelInstance>; private setDocuments; } /** * @example * const Users = createRepository('users', { * age: 25, * name: "John Doe", * isActive: true, * address: { * city: "New York", * zip: 10001, * }, * }); * @param name - The name of the collection eg. 'users' or 'posts/postId/comments' * @param schema - A javascript object that represents the schema of the collection * @param defaults - A javascript object that represents the default values of the schema * @returns A new class that extends CollectionModel */ declare function createRepository(name: string, schema: Partial, defaults: GenericObject): new () => ICollectionRepository; export { CollectionModel, type ICollectionRepository, createRepository, }; //# sourceMappingURL=Repository.d.ts.map