import { Service } from './service'; import { IDocumentResource, ICacheableDocumentResource } from './interfaces/data-object'; import { IAttributes, IParamsResource, ILinks } from './interfaces'; import { ICacheable } from './interfaces/cacheable'; import { Observable } from 'rxjs'; import { IRelationships } from './interfaces/relationship'; import { SourceType } from './document'; export declare class Resource implements ICacheable { id: string; type: string; attributes: IAttributes; relationships: IRelationships; links: ILinks; meta: { [key: string]: any; }; is_new: boolean; is_saving: boolean; is_loading: boolean; loaded: boolean; source: SourceType; cache_last_update: number; ttl: number; private originalAttributes; get IsDirty(): boolean; resetDirtyAttributes(): void; reset(): void; toObject(params?: IParamsResource): IDocumentResource; fill(data_object: IDocumentResource | ICacheableDocumentResource): boolean; addRelationship(resource: T, type_alias?: string): void; addRelationships(resources: Array, type_alias: string): void; removeRelationship(type_alias: string, id: string): boolean; hasManyRelated(resource: string): boolean; hasOneRelated(resource: string): boolean; restore(params?: IParamsResource): Observable; getService(): Service; delete(): Observable; save(params?: IParamsResource): Observable; setLoaded(value: boolean): void; setLoadedAndPropagate(value: boolean): void; /** @todo generate interface */ setSource(value: SourceType): void; setSourceAndPropagate(value: SourceType): void; setCacheLastUpdate(value?: number): void; rollbackAttributes(): void; }