import type { Operation } from '@api-client/json/types.js';
import type { FileBreadcrumb, IFile } from '@api-client/core/models/store/File.js';
import type { IApplication } from '@api-client/core/models/Application.js';
import type { ContextListOptions, ContextListResult, IPatchRevision } from '@api-client/core/events/BaseEvents.js';
import { type IFileCreateOptions, ListFileKind } from '@api-client/core/sdk/FilesSdk.js';
import type { IUser } from '@api-client/core/models/store/User.js';
import type { AccessOperation } from '@api-client/core/models/store/Permission.js';
/**
 * Reads file metadata from the store.
 *
 * @param key The file key
 * @returns THe file metadata
 */
declare function fileRead(key: string, media: false, target?: EventTarget): Promise<IFile>;
/**
 * Reads file contents from the store.
 *
 * @param key The file key
 * @returns THe file contents
 */
declare function fileRead(key: string, media: true, target?: EventTarget): Promise<unknown>;
/**
 * Patches file's meta in the store.
 *
 * @param key The file key
 * @param value The patch to apply.
 */
declare function patchFile(key: string, id: string, value: Operation[], app: IApplication, media: false, target?: EventTarget): Promise<IPatchRevision>;
/**
 * Patches file's content in the store.
 *
 * @param key The file key
 * @param value The patch to apply.
 */
declare function patchFile(key: string, id: string, value: Operation[], app: IApplication, media: true, target?: EventTarget): Promise<IPatchRevision>;
declare const _default: Readonly<{
    File: Readonly<{
        /**
         * Lists files (spaces, projects, etc) in the store.
         *
         * @param kinds the list of kinds to list. Spaces are always included.
         * @param options Optional query options.
         */
        list: (kinds?: ListFileKind[], options?: ContextListOptions, target?: EventTarget) => Promise<ContextListResult<IFile>>;
        /**
         * Lists files that are shared with the user.
         *
         * @param kinds the list of kinds to list. Spaces are always included.
         * @param options Optional query options.
         */
        listShared: (kinds?: ListFileKind[], options?: ContextListOptions, target?: EventTarget) => Promise<ContextListResult<IFile>>;
        /**
         * Creates a file in the store.
         *
         * @param meta The definition of a file that extends the IFile interface.
         * @param media The file content to create with the file meta, if available.
         * @param opts Optional options when creating a file
         * @returns The key of the creates file.
         */
        create: (meta: IFile, media?: unknown, opts?: IFileCreateOptions, target?: EventTarget) => Promise<string>;
        /**
         * A special case of a create file flow.
         * It allow to create a file only from a name and its kind.
         * The store has logic to recognize the file from its `kind` and create a file.
         *
         * This is helpful when creating a new file from the "create" dialog.
         *
         * @param name The name provided by the user.
         * @param kind File kind.
         * @param opts Optional options when creating a file
         * @returns The key of the creates file.
         */
        createDefault: (name: string, kind: string, opts?: IFileCreateOptions, target?: EventTarget) => Promise<string>;
        read: typeof fileRead;
        patch: typeof patchFile;
        /**
         * Deletes the file in the store.
         *
         * @param key The key of the file to delete.
         */
        delete: (key: string, target?: EventTarget) => Promise<string>;
        /**
         * Updates the sharing options of the file.
         *
         * @param key The file key
         * @param id The generated by the client random id. This id is reported back by the server.
         * @param value The patch operation on the file's ACL
         */
        patchUsers: (key: string, id: string, value: AccessOperation[], app: IApplication, target?: EventTarget) => Promise<void>;
        /**
         * Lists the users that have direct permission to the file.
         *
         * @param key The file key
         */
        listUsers: (key: string, target?: EventTarget) => Promise<ContextListResult<IUser>>;
        /**
         * Lists breadcrumbs to the file.
         *
         * @param fileOrFolder The if of the file or folder to query for.
         * @param options Optional query options.
         */
        breadcrumbs: (fileOrFolder: string, target?: EventTarget) => Promise<ContextListResult<FileBreadcrumb>>;
    }>;
    /**
     * Reads the current user.
     */
    User: Readonly<{
        me: (target?: EventTarget) => Promise<IUser>;
        read: (organizationId: string, key: string, target?: EventTarget) => Promise<IUser | undefined>;
        list: (organizationId: string, options?: ContextListOptions, target?: EventTarget) => Promise<ContextListResult<IUser>>;
    }>;
}>;
export default _default;
//# sourceMappingURL=StoreEvents.d.ts.map