/// /// import { IArchives, ArchiveFileInfo, ArchivesConfig, ArchivesSyncStatus, ChangesAfterConfig, DelConfig, FindConfig, GetConfig, GetInfoConfig, MoveFileConfig, SourceConfig, SetConfig, SetLargeFileConfig } from "../IArchives"; export type ArchivesRemoteConfig = { url: string; waitForAccess?: boolean; /** The exact routing-config entry this connection represents, sent with every call so the server picks the matching per-route store (one server hosts one store per route). Instances built from a bare URL fabricate one - it will never match, which only works for calls that don't select a store (internal reads, ROUTING_FILE, getConfig). */ sourceConfig: SourceConfig; }; export declare function parseStorageUrl(url: string): { address: string; port: number; }; export declare function authenticateStorage(config: { address: string; port: number; nodeId: string; }): Promise<{ machineId: string; ip: string; }>; export declare class ArchivesRemote implements IArchives { private config; constructor(config: ArchivesRemoteConfig); private parsed; private account; private bucketName; private nodeId; private controller; private lastDeniedLog; getDebugName(): string; /** The config travels with every request (the server matches it against its own entries to pick the store), so a config change has to land here - otherwise we keep asking for a source description the server no longer recognizes. Only ever called with a config for the SAME endpoint (see sourceIdentity), so the connection, account, and bucket cannot change under us. */ updateSourceConfig(sourceConfig: SourceConfig): void; isConnected(): boolean; ping(): Promise<{}>; private authenticate; private callAuthed; waitingForAccess(): Promise<{ machineId: string; ip: string; reason: string; } | undefined>; hasWriteAccess(): Promise; private registerAccessRequest; private call; get(fileName: string, config?: GetConfig): Promise; get2(fileName: string, config?: GetConfig): Promise<{ data: Buffer; writeTime: number; size: number; } | undefined>; set(fileName: string, data: Buffer, config?: SetConfig): Promise; del(fileName: string, config?: DelConfig): Promise; move(config: MoveFileConfig): Promise; getInfo(fileName: string, config?: GetInfoConfig): Promise<{ writeTime: number; size: number; } | undefined>; findInfo(prefix: string, config?: FindConfig): Promise; find(prefix: string, config?: FindConfig): Promise; getChangesAfter2(config: ChangesAfterConfig): Promise; getConfig(): Promise; getSyncStatus(): Promise; setLargeFile(config: SetLargeFileConfig): Promise; getURL(path: string): Promise; }