import { IccUserApi } from '../icc-api/api/IccUserApi';
import { AuthenticationProvider } from './auth/AuthenticationProvider';
import { AbstractFilter } from './filters/filters';
import { User } from '../icc-api/model/User';
import { Connection } from '../icc-api/model/Connection';
import { SubscriptionOptions } from './utils';
import { IccAuthApi } from '../icc-api';
export declare class IccUserXApi extends IccUserApi {
    private readonly authApi;
    fetchImpl: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
    private cachedCurrentUser;
    constructor(host: string, headers: {
        [key: string]: string;
    }, authenticationProvider: AuthenticationProvider | undefined, authApi: IccAuthApi, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>);
    /**
     * Retrieves the currently logged-in user. Uses a cached version by default to avoid redundant API calls.
     * @param bypassCache if true, forces a fresh fetch from the server and updates the cache; otherwise returns the cached user if available.
     * @return the current user.
     */
    getCurrentUser(bypassCache?: boolean): Promise<User>;
    /**
     * Modifies an existing user. If the user being modified is the current user, the local cache is updated accordingly.
     * Handles 409 conflict errors by re-fetching the latest revision and retrying when the only server-side changes
     * are to authenticationTokens or rev.
     * @param body the user with updated fields to persist.
     * @return the modified user as returned by the server.
     */
    modifyUser(body?: User): Promise<User>;
    /**
     * Subscribes to real-time user events using a WebSocket connection.
     * @param eventTypes the types of events to listen for (e.g. 'CREATE', 'UPDATE', 'DELETE').
     * @param filter an optional filter to restrict which user events trigger the callback.
     * @param eventFired the callback function invoked when a matching user event is received.
     * @param options optional subscription configuration such as connection parameters and retry behaviour.
     * @return a connection object that can be used to manage the WebSocket subscription lifecycle.
     */
    subscribeToUserEvents(eventTypes: ('CREATE' | 'UPDATE' | 'DELETE')[], filter: AbstractFilter<User> | undefined, eventFired: (user: User) => Promise<void>, options?: SubscriptionOptions): Promise<Connection>;
    /**
     * Checks whether the given password is valid for the currently logged-in user by attempting authentication.
     * @param password the password to verify.
     * @return true if the password is valid, false otherwise.
     */
    checkPassword(password: string): Promise<boolean>;
    private getGroupAndUserIdFromToken;
}
