import type Cwa from '#cwa/cwa'; import type { CwaResourcesStoreInterface } from '#cwa/storage/stores/resources/resources-store'; import type { CwaResource } from '#cwa/resources/resource-utils'; import type { RemoteUser } from '#cwa/resources/model-editors'; export declare const CLIENT_ID_HEADER = "X-CWA-Client-Id"; export interface RemoteChangeEvent { resource: CwaResource; user?: RemoteUser; changedFields: string[]; accept: () => void; } export type RemoteChangeHandler = (event: RemoteChangeEvent) => void; export declare function subscribeToRemoteChanges($cwa: Cwa, iri: () => string | undefined, handler: RemoteChangeHandler): () => void; export declare class RemoteChanges { private readonly $cwa; private readonly store; private readonly conflicts; private readonly latest; constructor($cwa: Cwa, store: CwaResourcesStoreInterface); get clientId(): string; connect(): void; disconnect(): void; isOwnEcho(resource: CwaResource): boolean; receive(resource: CwaResource, path: string | undefined): Promise; private get writeHeaders(); private stored; private sameResource; private editorsOf; private saveInPlace; private refused; private apply; private raise; private clearConflicts; private resolve; private acceptAll; private removed; }