import type { PatchInfo } from '../../patch/types.js';
import { type IPatchRevision } from '../../events/BaseEvents.js';
import { type IHttpHistory, Kind as HttpHistoryKind } from '../HttpHistory.js';
import { Kind as ProjectExecutionKind } from '../ProjectExecution.js';
import type { IFile } from './File.js';
import type { IPermission } from './Permission.js';
import type { IRevision } from './Revision.js';
/**
 * @deprecated
 */
export declare enum BackendCommandType {
    observe = 0,
    unobserve = 1
}
/**
 * @deprecated
 */
export declare const BackendCommandKind = "Core#BackendCommand";
/**
 * @deprecated
 */
export interface IBackendCommand {
    kind: typeof BackendCommandKind;
    cmd: BackendCommandType;
}
/**
 * @deprecated
 */
export interface IBackendObserveCommand extends IBackendCommand {
    path: string;
}
/**
 * @deprecated
 */
export interface BroadcastEvent {
    type: 'event';
    operation: string;
    kind: string;
    key: string;
    path: string;
    organization: string;
}
/**
 * @deprecated
 */
export interface BackendErrorEvent {
    type: 'error';
    cause: string;
    time: number;
}
/**
 * @deprecated
 */
export interface ClearedBroadcastEvent {
    type: 'event';
    operation: 'cleared';
    name: string;
    organization: string;
    path: string;
}
/**
 * @deprecated
 */
export interface BroadcastFileData {
    parent?: string;
}
/**
 * @deprecated
 */
export interface BroadcastCreatedEvent extends BroadcastEvent {
    operation: 'created';
    data: unknown;
}
/**
 * @deprecated
 */
export interface FileCreatedBroadcastEvent extends BroadcastCreatedEvent, BroadcastFileData {
}
/**
 * @deprecated
 */
export interface FileMetaCreatedBroadcastEvent extends FileCreatedBroadcastEvent {
    data: IFile;
    alt: 'meta';
}
/**
 * @deprecated
 */
export interface FileMediaCreatedBroadcastEvent extends FileCreatedBroadcastEvent {
    alt: 'media';
}
/**
 * @deprecated
 */
export interface HistoryCreatedBroadcastEvent extends BroadcastCreatedEvent {
    project: string;
    request: string;
    app: string;
    kind: typeof HttpHistoryKind;
    data: IHttpHistory;
}
/**
 * @deprecated
 */
export interface FileRevisionCreatedBroadcastEvent extends BroadcastCreatedEvent, BroadcastFileData {
    parent: string;
    data: IRevision;
}
/**
 * @deprecated
 */
export interface ProjectExecutionCreatedBroadcastEvent extends BroadcastCreatedEvent {
    project: string;
    kind: typeof ProjectExecutionKind;
}
/**
 * @deprecated
 */
export interface BroadcastPatchEvent extends BroadcastEvent {
    operation: 'patch';
    data: IPatchRevision;
}
/**
 * @deprecated
 */
export interface FilePatchBroadcastEvent extends BroadcastPatchEvent, BroadcastFileData {
}
/**
 * @deprecated
 */
export interface AccessBroadcastEvent extends BroadcastEvent {
    operation: 'access-granted' | 'access-removed';
    data?: IPermission;
}
/**
 * @deprecated
 */
export interface FileAccessBroadcastEvent extends AccessBroadcastEvent {
    parent?: string;
}
/**
 * @deprecated
 */
export interface DeletedBroadcastEvent extends BroadcastEvent {
    operation: 'deleted';
}
/**
 * @deprecated
 */
export interface FileDeletedBroadcastEvent extends DeletedBroadcastEvent, BroadcastFileData {
    /**
     * The key of the created trash entry for the deleted object.
     * This is **always** populated when the file alt is `meta`.
     */
    trash?: string;
}
/**
 * @deprecated
 */
export interface ProjectExecutionDeleteBroadcastEvent extends DeletedBroadcastEvent {
    project: string;
}
/**
 * @deprecated
 */
export interface HistoryDeletedBroadcastEvent extends DeletedBroadcastEvent {
    project: string;
    request: string;
}
export interface ServerEvent {
    kind: string;
}
/**
 * A broadcast event dispatched by the server when an object was patched.
 */
export interface ServerPatchEvent extends ServerEvent {
    /**
     * Describes this event.
     */
    kind: 'patch';
    /**
     * Whether the object meta data were patched or the media (the content).
     * Note, folders are always meta.
     */
    type: 'media' | 'meta';
    /**
     * The patch information. The exact type depends on the `type` property.
     */
    value: PatchInfo;
    /**
     * The id of the user who patched the document.
     */
    uid: string;
}
/**
 * A broadcast event dispatched by the server when an object was deleted.
 */
export interface ServerDeleteEvent extends ServerEvent {
    /**
     * Describes this event.
     */
    kind: 'delete';
    /**
     * The id of the user deleting the object.
     */
    uid: string;
}
//# sourceMappingURL=Backend.d.ts.map