import { IccAuthApi, IccHcpartyApi } from '../icc-api';
import { HealthcareParty } from '../icc-api/model/HealthcareParty';
import * as models from '../icc-api/model/models';
import { AuthenticationProvider } from './auth/AuthenticationProvider';
import { AbstractFilter } from './filters/filters';
import { SubscriptionOptions } from './utils';
import { Connection } from '../icc-api/model/Connection';
import { ListOfIds } from '../icc-api/model/models';
export declare class IccHcpartyXApi extends IccHcpartyApi {
    private readonly authApi;
    hcPartyKeysCache: {
        [key: string]: {
            [key: string]: string;
        };
    };
    hcPartyCache: {
        [key: string]: [number, Promise<HealthcareParty>];
    };
    private CACHE_RETENTION_IN_MS;
    constructor(host: string, headers: {
        [key: string]: string;
    }, authenticationProvider: AuthenticationProvider | undefined, authApi: IccAuthApi, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>);
    private getHcPartyFromCache;
    /**
     * Ensures the healthcare party has consistent name fields. If lastName/name are set but there is no Official
     * PersonName, one is created. Conversely, if an Official PersonName exists but lastName/name are missing, they
     * are populated from the PersonName.
     * @param hcParty the healthcare party whose names should be completed.
     * @return the healthcare party with completed name fields, or undefined if the input was undefined.
     */
    completeNames(hcParty?: models.HealthcareParty): models.HealthcareParty | undefined;
    /**
     * Stores a healthcare party promise in the local cache with a time-to-live.
     * @param key the cache key (typically the healthcare party id).
     * @param hcpPromise the promise resolving to the healthcare party to cache.
     * @return the same promise that was cached.
     */
    putHcPartyInCache(key: string, hcpPromise: Promise<HealthcareParty>): Promise<HealthcareParty>;
    /**
     * Creates a new healthcare party after completing its name fields.
     * @param body the healthcare party to create.
     * @return the created healthcare party.
     */
    createHealthcareParty(body?: HealthcareParty): Promise<HealthcareParty>;
    /**
     * Creates a new healthcare party in the specified group after completing its name fields.
     * @param groupId the id of the group in which to create the healthcare party.
     * @param body the healthcare party to create.
     * @return the created healthcare party.
     */
    createHealthcarePartyInGroup(groupId: string, body?: HealthcareParty): Promise<HealthcareParty>;
    /**
     * Modifies an existing healthcare party after completing its name fields. Evicts the party from the local cache
     * before modifying, and re-caches the updated version upon success.
     * @param body the healthcare party with updated fields.
     * @return the modified healthcare party.
     */
    modifyHealthcareParty(body?: HealthcareParty): Promise<HealthcareParty | any>;
    /**
     * Retrieves a healthcare party by id. Returns a cached version if available and not expired, otherwise fetches
     * from the server and caches the result.
     * @param healthcarePartyId the id of the healthcare party to retrieve.
     * @param bypassCache if true, skips the cache and fetches directly from the server.
     * @return the healthcare party.
     */
    getHealthcareParty(healthcarePartyId: string, bypassCache?: boolean): Promise<HealthcareParty | any>;
    /**
     * Retrieves the full hierarchy of healthcare party ids, from the topmost parent down to the given party.
     * Recursively walks up the parentId chain.
     * @param healthcarePartyId the id of the healthcare party whose hierarchy to retrieve.
     * @param bypassCache if true, bypasses the cache for each party in the hierarchy.
     * @return an array of healthcare party ids ordered from the topmost ancestor to the given party.
     */
    getHealthcarePartyHierarchyIds(healthcarePartyId: string, bypassCache?: boolean): Promise<string[]>;
    /**
     * Retrieves multiple healthcare parties by their ids. Uses the cache where possible, and fetches any missing
     * parties from the server in a single bulk request. Parties not found on the server are filtered out.
     * @param healthcarePartyIds the list of healthcare party ids to retrieve.
     * @return an array of healthcare parties (excluding any that were not found).
     */
    getHealthcareParties(healthcarePartyIds: ListOfIds): Promise<Array<HealthcareParty> | any>;
    /**
     * Retrieves the currently logged-in healthcare party and caches it.
     * @return the current healthcare party.
     */
    getCurrentHealthcareParty(): Promise<HealthcareParty>;
    /**
     * Validates a Belgian CBE (Crossroads Bank for Enterprises) number using the modulo 97 check.
     * @param cbe the CBE number to validate (non-digit characters are stripped).
     * @return true if the CBE number is valid, false otherwise.
     */
    isValidCbe(cbe: string): boolean;
    /**
     * Subscribes to real-time healthcare party 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 healthcare party events trigger the callback.
     * @param eventFired the callback function invoked when a matching healthcare party 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.
     */
    subscribeToHealthcarePartyEvents(eventTypes: ('CREATE' | 'UPDATE' | 'DELETE')[], filter: AbstractFilter<HealthcareParty> | undefined, eventFired: (dataSample: HealthcareParty) => Promise<void>, options?: SubscriptionOptions): Promise<Connection>;
}
