/**
 * iCure Data Stack API Documentation
 * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.
 *
 * OpenAPI spec version: v1
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */
import { XHR } from './XHR';
import { AbstractFilterContact } from '../model/AbstractFilterContact';
import { AbstractFilterService } from '../model/AbstractFilterService';
import { Contact } from '../model/Contact';
import { Content } from '../model/Content';
import { DocIdentifier } from '../model/DocIdentifier';
import { FilterChainContact } from '../model/FilterChainContact';
import { FilterChainService } from '../model/FilterChainService';
import { IcureStub } from '../model/IcureStub';
import { LabelledOccurence } from '../model/LabelledOccurence';
import { ListOfIds } from '../model/ListOfIds';
import { PaginatedListContact } from '../model/PaginatedListContact';
import { PaginatedListService } from '../model/PaginatedListService';
import { Service } from '../model/Service';
import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider';
import { EntityBulkShareResult } from '../model/requests/EntityBulkShareResult';
import { MinimalEntityBulkShareResult } from '../model/requests/MinimalEntityBulkShareResult';
import { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams';
import { TimingInfo } from '../model/TimingInfo';
export declare class IccContactApi {
    host: string;
    _headers: Array<XHR.Header>;
    authenticationProvider: AuthenticationProvider;
    fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
    get headers(): Promise<Array<XHR.Header>>;
    constructor(host: string, headers: any, authenticationProvider?: AuthenticationProvider, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>);
    handleError(e: XHR.XHRError): never;
    /**
     * Keys must be delimited by coma
     * @summary Close contacts for Healthcare Party and secret foreign keys.
     * @param hcPartyId
     * @param secretFKeys
     */
    closeForHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise<Array<Contact>>;
    /**
     * Creates a contact with the current user and returns an instance of created contact afterward.
     * @summary Create a contact with the current user
     * @param body
     */
    createContact(body?: Contact): Promise<Contact>;
    /**
     * Returns the modified contacts.
     * @summary Create a batch of contacts
     * @param body
     */
    createContacts(body?: Array<Contact>): Promise<Array<Contact>>;
    /**
     * @summary Deletes a batch of contacts.
     *
     * @param contactIds a ListOfIds containing the ids of the contacts to delete.
     * @return a Promise that will resolve in an array of the DocIdentifiers of the successfully deleted contacts.
     */
    deleteContacts(contactIds: ListOfIds): Promise<Array<DocIdentifier>>;
    /**
     * @summary Deletes a single contact by id.
     *
     * @param contactId the id of the contact to delete.
     */
    deleteContact(contactId: string): Promise<DocIdentifier>;
    /**
     * Returns a list of contacts along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page.
     * @summary List contacts for the current user (HcParty) or the given hcparty in the filter
     * @param body
     * @param startDocumentId A Contact document ID
     * @param limit Number of rows
     * @param collectTiming if true, include server-side filter timing information in the response
     */
    filterContactsBy(startDocumentId?: string, limit?: number, body?: FilterChainContact, collectTiming?: false): Promise<PaginatedListContact>;
    filterContactsBy(startDocumentId?: string, limit?: number, body?: FilterChainContact, collectTiming?: true): Promise<PaginatedListContact & TimingInfo>;
    /**
     * Returns a list of contacts along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page.
     * @summary List services for the current user (HcParty) or the given hcparty in the filter
     * @param body
     * @param startDocumentId A Contact document ID
     * @param limit Number of rows
     * @param collectTiming if true, include server-side filter timing information in the response
     */
    filterServicesBy(startDocumentId?: string, limit?: number, body?: FilterChainService, collectTiming?: false): Promise<PaginatedListService>;
    filterServicesBy(startDocumentId?: string, limit?: number, body?: FilterChainService, collectTiming?: true): Promise<PaginatedListService & TimingInfo>;
    /**
     *
     * @summary Get a list of contacts found by Healthcare Party and form's id.
     * @param hcPartyId
     * @param formId
     */
    findByHCPartyFormId(hcPartyId: string, formId: string): Promise<Array<Contact>>;
    /**
     *
     * @summary Get a list of contacts found by Healthcare Party and form's ids.
     * @param body
     * @param hcPartyId
     */
    findByHCPartyFormIds(hcPartyId: string, body?: ListOfIds): Promise<Array<Contact>>;
    /**
     * Keys must be delimited by coma
     * @deprecated use {@link findContactIdsByDataOwnerPatientOpeningDate} instead.
     * @summary Get a list of contacts found by Healthcare Party and secret foreign keys.
     * @param hcPartyId
     * @param planOfActionsIds
     * @param skipClosedContacts
      @param body
     */
    findByHCPartyPatientSecretFKeysUsingPost(hcPartyId: string, planOfActionsIds?: string, skipClosedContacts?: boolean, body?: Array<string>): Promise<Array<Contact>>;
    /**
     * Keys must be delimited by coma
     * @deprecated use {@link findContactIdsByDataOwnerPatientOpeningDate} instead.
     * @summary Get a list of contacts found by Healthcare Party and secret foreign keys.
     * @param hcPartyId
     * @param secretFKeys
     * @param planOfActionsIds
     * @param skipClosedContacts
     */
    findByHCPartyPatientSecretFKeys(hcPartyId: string, secretFKeys: string, planOfActionsIds?: string, skipClosedContacts?: boolean): Promise<Array<Contact>>;
    /**
     *
     * @summary List contacts found By Healthcare Party and service Id.
     * @param hcPartyId
     * @param serviceId
     */
    findByHCPartyServiceId(hcPartyId: string, serviceId: string): Promise<Array<Contact>>;
    /**
     *
     * @summary List contacts found By externalId.
     * @param externalId
     */
    findContactsByExternalId(externalId: string): Promise<Array<Contact>>;
    /**
     * @deprecated use {@link findContactIdsByDataOwnerPatientOpeningDate} instead.
     * @summary Get a list of contacts found by Healthcare Party and Patient foreign keys.
     * @param body
     * @param hcPartyId
     */
    findContactsByHCPartyPatientForeignKeys(hcPartyId: string, body?: ListOfIds): Promise<Array<Contact>>;
    /**
     * Retrieves the delegation stub of the Contact which ids are passed as parameter.
     * @param contactIds the ids of the contact for which the stub should be retrieved
     */
    findContactsDelegationsStubsByIds(contactIds: []): Promise<IcureStub[]>;
    /**
     * Keys must be delimited by coma
     * @deprecated use {@link findContactsDelegationsStubsByIds} instead.
     * @summary List contacts found By Healthcare Party and secret foreign keys.
     * @param body
     * @param hcPartyId
     */
    findContactsDelegationsStubsByHCPartyPatientForeignKeysUsingPost(hcPartyId: string, body?: Array<string>): Promise<Array<IcureStub>>;
    /**
     * @deprecated use {@link findContactsDelegationsStubsByIds} instead.
     * @summary List contacts found By Healthcare Party and secret foreign keys.
     * @param hcPartyId
     * @param secretFKeys
     */
    findContactsDelegationsStubsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise<Array<IcureStub>>;
    /**
     * Gets a contact based on its id
     * @summary Get a contact
     * @param contactId
     */
    getContact(contactId: string): Promise<Contact>;
    /**
     * Gets a service based on its id
     * @summary Get a service
     * @param serviceId
     */
    getService(serviceId: string): Promise<Service>;
    /**
     * Get a list of contact by ids/keys.
     * @summary Get contacts by batch
     * @param body
     */
    getContacts(body?: ListOfIds): Promise<Array<Contact>>;
    /**
     *
     * @summary Get an empty content
     */
    getEmptyContent(): Promise<Content>;
    /**
     *
     * @summary Get the list of all used codes frequencies in services
     * @param codeType
     * @param minOccurences
     */
    getServiceCodesOccurences(codeType: string, minOccurences: number): Promise<Array<LabelledOccurence>>;
    /**
     * Returns a list of contacts.
     * @summary List contacts bu opening date parties with(out) pagination
     * @param startKey The contact openingDate
     * @param endKey The contact max openingDate
     * @param hcpartyid hcpartyid
     * @param startDocumentId A contact party document ID
     * @param limit Number of rows
     */
    listContactsByOpeningDate(startDate: number, endDate: number, hcpartyid: string, startKey?: string, startDocumentId?: string, limit?: number): Promise<PaginatedListContact>;
    /**
     * Returns a list of services
     * @summary List services with provided ids
     * @param body
     */
    listServices(body?: ListOfIds): Promise<Array<Service>>;
    /**
     * Returns a list of services
     * @summary List services by related association id
     * @param associationId
     */
    listServicesByAssociationId(associationId: string): Promise<Array<Service>>;
    /**
     * Returns the list of services linked to the provided health element id
     * @summary List services linked to a health element
     * @param healthElementId
     * @param hcPartyId hcPartyId
     */
    listServicesByHealthElementId(healthElementId: string, hcPartyId: string): Promise<Array<Service>>;
    /**
     * Returns a list of services
     * @summary List services linked to provided ids
     * @param body
     * @param linkType The type of the link
     */
    listServicesLinkedTo(linkType?: string, body?: ListOfIds): Promise<Array<Service>>;
    /**
     *
     * @summary Get ids of contacts matching the provided filter for the current user (HcParty)
     * @param body
     * @param collectTiming if true, include server-side filter timing information in the response
     */
    matchContactsBy(body?: AbstractFilterContact, collectTiming?: false): Promise<Array<string>>;
    matchContactsBy(body?: AbstractFilterContact, collectTiming?: true): Promise<Array<string> & TimingInfo>;
    /**
     *
     * @summary Get ids of services matching the provided filter for the current user
     * @param body
     * @param collectTiming add timing information to the response
     */
    matchServicesBy(body?: AbstractFilterService, collectTiming?: false): Promise<Array<string>>;
    matchServicesBy(body?: AbstractFilterService, collectTiming?: true): Promise<Array<string> & TimingInfo>;
    /**
     * Returns the modified contact.
     * @summary Modify a contact
     * @param body
     */
    modifyContact(body?: Contact): Promise<Contact>;
    /**
     * Returns the modified contacts.
     * @summary Modify a batch of contacts
     * @param body
     */
    modifyContacts(body?: Array<Contact>): Promise<Array<Contact>>;
    /**
     * @summary List Contact ids by data owner and a set of secret foreign key. The ids will be sorted by Contact openingDate, in ascending or descending
     * order according to the specified parameter value.
     *
     * @param dataOwnerId the data owner id.
     * @param secretFKeys an array of secret foreign keys.
     * @param startDate a timestamp in epoch milliseconds. If undefined, all the contact ids since the beginning of time will be returned.
     * @param endDate a timestamp in epoch milliseconds. If undefined, all the contact ids until the end of time will be returned.
     * @param descending whether to return the ids ordered in ascending or descending order by Contact openingDate
     * @return a promise that will resolve in an Array of Contact ids.
     */
    findContactIdsByDataOwnerPatientOpeningDate(dataOwnerId: string, secretFKeys: string[], startDate?: number, endDate?: number, descending?: boolean): Promise<string[]>;
    /**
     * @internal this method is for internal use only and may be changed without notice
     */
    bulkShareContacts(request: BulkShareOrUpdateMetadataParams): Promise<EntityBulkShareResult<Contact>[]>;
    /**
     * @internal this method is for internal use only and may be changed without notice
     */
    bulkShareContactsMinimal(request: BulkShareOrUpdateMetadataParams): Promise<MinimalEntityBulkShareResult[]>;
}
