import { Resource } from './resource'; import { PathBuilder } from './services/path-builder'; import { IParamsCollection, IParamsResource, IAttributes } from './interfaces'; import { DocumentCollection } from './document-collection'; import { Observable, BehaviorSubject, Subject } from 'rxjs'; import { PathCollectionBuilder } from './services/path-collection-builder'; import { ClonedResource } from './cloned-resource'; export declare class Service { type: string; resource: typeof Resource; collections_ttl: number; protected path: string; protected url: string; constructor(); register(): Service | false; /** * @deprecated since 2.2.0. Use new() method. */ newResource(): R; newCollection(): DocumentCollection; new(): R; getPrePath(): string; getPath(): string; private isCacheDisabled; private clearMemoryCacheIfDisabled; getUrl(): string; getClone(id: string, params?: IParamsResource): Observable>; get(id: string, params?: IParamsResource): Observable; private getGetFromLocal; protected getGetFromServer(path: any, resource: R, subject: Subject): void; getService>(): T; getOrCreateCollection(path: PathCollectionBuilder): DocumentCollection; getOrCreateResource(id: string, params?: IParamsResource): R; createResource(id: string): R; /** * deprecated since 2.2 */ clearCacheMemory(): Promise; clearCache(): Promise; parseToServer(attributes: IAttributes): void; parseFromServer(attributes: IAttributes): void; delete(id: string, params?: Object): Observable; all(params?: IParamsCollection): Observable>; private getAllFromLocal; protected getAllFromServer(path: PathBuilder, params: IParamsCollection, temporary_collection: DocumentCollection, subject: BehaviorSubject>): void; }