import { Injector } from '@angular/core'; import { AngularFireDatabase } from '@angular/fire/compat/database'; import firebase from 'firebase/compat/app'; import { Observable } from 'rxjs'; import { Entity } from '../../model/entity-model'; import { Flatten } from '../../util/type-util'; import { CacheStrategy, LocalStorageCache } from '../cache'; export declare class CrudApi { protected injector: Injector; protected path: string; protected cacheStrategy: CacheStrategy; afd: AngularFireDatabase; cache: LocalStorageCache; constructor(injector: Injector, path: string, cacheStrategy?: CacheStrategy); get(id: string): Observable; getMany(ids: string[]): Observable; push(value: T): string; createPushId(): string; getRecord(): Observable | null>; getAll(): Observable; getPage(limit: number, startAtId?: string, queryFn?: (query: firebase.database.Query) => firebase.database.Query): Observable; getProperty(id: string, property: K1): Observable; getProperty(id: string, k1: K1, k2: K2): Observable; setProperty(value: T[K1], id: string, property: K1): Observable; setProperty(value: T[K1][K2], id: string, property: K1, propertyId: K2): Observable; removeProperty(id: string, property: K1): Observable; removeProperty(id: string, property: K1, propertyId: K2): Observable; pushProperty(value: Flatten, id: string, property: K): Observable; update(id: string, entity: Partial): Observable; set(id: string, entity: T): Observable; delete(id: string): Observable; protected getPath(id: string): string; protected getPropertyPath(id: string, ...properties: (keyof T)[]): string; }