import { Options, RepoBackend } from './RepoBackend'; import { RepoFrontend } from './RepoFrontend'; import { Handle } from './Handle'; import { PublicMetadata } from './Metadata'; import { Clock } from './Clock'; import { DocUrl, HyperfileUrl, RepoId } from './Misc'; import FileServerClient from './FileServerClient'; import { Swarm, JoinOptions } from './SwarmInterface'; import { Doc, Proxy } from 'automerge'; import { CryptoClient } from './CryptoClient'; export declare class Repo { front: RepoFrontend; back: RepoBackend; id: RepoId; create: (init?: T) => DocUrl; open: (id: DocUrl) => Handle; destroy: (id: DocUrl) => void; /** @deprecated Use addSwarm */ setSwarm: (swarm: Swarm, joinOptions?: JoinOptions) => void; addSwarm: (swarm: Swarm, joinOptions?: JoinOptions) => void; removeSwarm: (swarm: Swarm, joinOptions?: JoinOptions) => void; message: (url: DocUrl, message: any) => void; crypto: CryptoClient; files: FileServerClient; startFileServer: (fileServerPath: string) => void; fork: (url: DocUrl) => DocUrl; watch: (url: DocUrl, cb: (val: Doc, clock?: Clock, index?: number) => void) => Handle; doc: (url: DocUrl, cb?: (val: Doc, clock?: Clock) => void) => Promise>; merge: (url: DocUrl, target: DocUrl) => void; change: (url: DocUrl, fn: (state: Proxy) => void) => void; materialize: (url: DocUrl, seq: number, cb: (val: Doc) => void) => void; meta: (url: DocUrl | HyperfileUrl, cb: (meta: PublicMetadata | undefined) => void) => void; close: () => void; constructor(opts: Options); }