export declare type FileChangeType = 'modified' | 'added' | 'removed' | 'unchanged'; /** Describes single object’s data, can be text with specified encoding or binary data. */ export declare type ObjectData = null | { value: string; encoding: string; } | { value: Uint8Array; encoding: undefined; }; /** Maps a set of object paths to respective data. */ export interface ObjectDataset { [objectPath: string]: ObjectData; } /** Maps a set of object paths to object’s change status. */ export interface ObjectChangeStatusSet { [objectPath: string]: FileChangeType; } /** Describes a query to retrieve which objects exist without knowing their paths. */ export interface ObjectQuery { pathPrefix: string; contentSubstring?: string; } /** Describes a query to get object data for specified object paths. */ export declare type ObjectDataRequest = Record; /** * Describes a change made to a single object. * * For data consistency, users must provide `oldValue` to indicate which value should be replaced; * if preexisting value is different from `oldValue` then there was likely a race condition * (object data changed e.g. by another user), the new value should not be written * and user should be informed about a conflict. * * `encoding` is not expected to change through the lifetime of an object. */ export declare type ObjectChange = { newValue: string | null; encoding: string; oldValue?: string | null; } | { newValue: Uint8Array | null; encoding: undefined; oldValue?: Uint8Array | null; }; /** Maps object data changes to object paths. */ export interface ObjectChangeset { [objectPath: string]: ObjectChange; } /** The result of applying an ObjectChangeset. */ export interface CommitOutcome { newCommitHash?: string; conflicts?: { [objectPath: string]: true; }; }