import type { IFile } from '@api-client/core/models/store/File.js';
import { Model } from '../core/Model.js';
import type SdkService from '../services/SdkService.js';
import type { AccessOperation, IPermission } from '@api-client/core/models/store/Permission.js';
import type { IUser } from '@api-client/core/models/store/User.js';
/**
 * TODO: add caching of the user list. When querying for users, each user should be cached
 *       and the next time the user is queried, it should be fetched from the cache.
 *       This will prevent multiple requests to the server for the same user.
 *       This should also work when fetching a list of users by their IDs.
 *       Cached users should not be queried again.
 *       Note, the cache should have a TTL of 5 minutes or so, to ensure that the user list is not stale.
 * @fires users - Fired when the list of users is updated.
 */
export default class FileShareModel extends Model<IFile[]> {
    #private;
    /**
     * The organization ID.
     */
    oid?: string;
    /**
     * The list of file ids to process in this request.
     */
    ids?: string[];
    /**
     * A reference to the SDK service.
     */
    sdk: SdkService;
    /**
     * A flag indicating whether the model is currently loading data.
     */
    loading: boolean;
    constructor(sdk: SdkService);
    read(oid: string, ids: string[]): Promise<IFile[]>;
    /**
     * Lists permissions that are common across multiple files.
     * A permission is considered common if, for a given `granteeId`, the same `type` and `role`
     * combination exists in every file provided. The returned permissions are the
     * actual `IPermission` instances from the first file in the input array that meet this criterion.
     *
     * @param files An array of `IFile` objects.
     * @returns An array of `IPermission` objects that are common to all provided files.
     *          Returns an empty array if fewer than two files are provided, if the first
     *          file has no permissions, or if no common permissions are found.
     */
    static findCommonPermissions(files: IFile[]): IPermission[];
    searchUsers(ignore: string[], query?: string): Promise<void>;
    /**
     * Fetches a bulk of users by their IDs.
     * @param oid The organization ID.
     * @param ids An array of user IDs to fetch.
     * @returns A promise that resolves to an array of IUser objects.
     */
    getUsersBulk(oid: string, ids: string[]): Promise<IUser[]>;
    commit(operations: AccessOperation[]): Promise<IFile>;
}
//# sourceMappingURL=FileShareModel.d.ts.map