import type { BaseDocument, DocumentModelInstance, GenericObject } from "../../../web/database/firestore/types"; import type { IAdminCollectionModel, IDocumentsQueryOptions } from "./types"; declare class CollectionModel implements IAdminCollectionModel { [key: string]: any; private name; private originalName; private defaults; private schema; 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(): IDocumentsQueryOptions; withConstraints(constraints: IDocumentsQueryOptions): this; whereBy(constraint: IDocumentsQueryOptions['whereBy']): this; whereOr(constraint: IDocumentsQueryOptions['whereOr']): this; orderBy(constraint: IDocumentsQueryOptions['orderBy']): this; limit(constraint: IDocumentsQueryOptions['limit']): this; select(constraint: IDocumentsQueryOptions['select']): this; /** * @description Enables fetching subcollections of the documents */ withSubcollections(): 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 * @returns A new class that extends CollectionModel */ declare function createRepository(name: string, schema: Partial, defaults?: GenericObject): new () => IAdminCollectionModel; export { CollectionModel, type IDocumentsQueryOptions, createRepository, }; //# sourceMappingURL=Repository.d.ts.map