import { ResourceBase, ResourceBaseConfig, ResourceBaseOptions } from "./ResourceBase"; export declare type ResourceID = string | number; export interface ResourceOptions extends ResourceBaseOptions> { id?: ResourceID; initialValues?: T; onCreate?: (id: ResourceID, values: T) => void; onUpdate?: (values: Partial) => void; onDelete?: (values: T) => void; } export declare type ResourceConfig = ResourceOptions & ResourceBaseConfig; export declare class Resource = ResourceConfig> extends ResourceBase { id?: ResourceID; onCreate?: (id: ResourceID, values: T) => void; onUpdate?: (values: Partial) => void; onDelete?: (values: T) => void; private updatingHash; private patchHash; constructor(config: C); getIfHasID: () => Promise; get: () => Promise; create: (values: T) => Promise; update: (values: T) => Promise; put: (values: T) => Promise; updateValues: (props: { values: Partial; fields?: string[] | undefined; }) => Promise; patch: (values: Partial, props?: { fields?: string[] | undefined; } | undefined) => Promise; delete: () => Promise; isPersisted: () => boolean; save: (values: T) => Promise; }