/**
 * 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 { DocIdentifier } from '../model/DocIdentifier';
import { ListOfIds } from '../model/ListOfIds';
import { Message } from '../model/Message';
import { MessagesReadStatusUpdate } from '../model/MessagesReadStatusUpdate';
import { PaginatedListMessage } from '../model/PaginatedListMessage';
import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider';
import { EntityBulkShareResult } from '../model/requests/EntityBulkShareResult';
import { FilterChainMessage } from '../model/FilterChainMessage';
import { AbstractFilterMessage } from '../model/AbstractFilterMessage';
import { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams';
import { TimingInfo } from '../model/TimingInfo';
export declare class IccMessageApi {
    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>);
    setHeaders(h: Array<XHR.Header>): void;
    handleError(e: XHR.XHRError): never;
    /**
     * @summary Creates a message
     * @param body
     */
    createMessage(body?: Message): Promise<Message>;
    /**
     * @summary Deletes a batch of messages.
     *
     * @param messageIds a ListOfIds containing the ids of the messages to delete.
     * @return a Promise that will resolve in an array of DocIdentifiers of the messages successfully deleted
     */
    deleteMessages(messageIds: ListOfIds): Promise<Array<DocIdentifier>>;
    /**
     * @summary Deletes a single message by id.
     *
     * @param messageId the id of the message to delete.
     * @return a Promise that will resolve in the DocIdentifier of the deleted message.
     */
    deleteMessage(messageId: string): Promise<DocIdentifier>;
    /**
     *
     * @summary Get all messages (paginated) for current HC Party
     * @param startKey
     * @param startDocumentId
     * @param limit
     */
    findMessages(startKey?: string, startDocumentId?: string, limit?: number): Promise<PaginatedListMessage>;
    /**
     *
     * @summary Get all messages (paginated) for current HC Party and provided from address
     * @param fromAddress
     * @param startKey
     * @param startDocumentId
     * @param limit
     * @param hcpId
     */
    findMessagesByFromAddress(fromAddress?: string, startKey?: string, startDocumentId?: string, limit?: number, hcpId?: string): Promise<PaginatedListMessage>;
    /**
     * @deprecated use {@link listMessageIdsByDataOwnerPatientSentDate} instead.
     * @summary List messages found By Healthcare Party and secret foreign keys.
     * @param body
     */
    findMessagesByHCPartyPatientForeignKeysUsingPost(body?: Array<string>): Promise<Array<Message>>;
    /**
     * Keys must be delimited by commas.
     * @deprecated use {@link listMessageIdsByDataOwnerPatientSentDate} instead.
     * @summary List messages found By Healthcare Party and secret foreign keys.
     * @param secretFKeys
     */
    findMessagesByHCPartyPatientForeignKeys(secretFKeys: string): Promise<Array<Message>>;
    /**
     * @summary List Message ids by data owner and a set of secret foreign key. The ids will be sorted by Message sent, 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 message ids since the beginning of time will be returned.
     * @param endDate a timestamp in epoch milliseconds. If undefined, all the message ids until the end of time will be returned.
     * @param descending whether to return the ids ordered in ascending or descending order by Message sent.
     * @return a promise that will resolve in an Array of Message ids.
     */
    listMessageIdsByDataOwnerPatientSentDate(dataOwnerId: string, secretFKeys: string[], startDate?: number, endDate?: number, descending?: boolean): Promise<string[]>;
    /**
     *
     * @summary Get all messages (paginated) for current HC Party and provided to address
     * @param toAddress
     * @param startKey
     * @param startDocumentId
     * @param limit
     * @param reverse
     * @param hcpId
     */
    findMessagesByToAddress(toAddress?: string, startKey?: string, startDocumentId?: string, limit?: number, reverse?: boolean, hcpId?: string): Promise<PaginatedListMessage>;
    /**
     *
     * @summary Get all messages (paginated) for current HC Party and provided transportGuid
     * @param transportGuid
     * @param received
     * @param startKey
     * @param startDocumentId
     * @param limit
     * @param hcpId
     */
    findMessagesByTransportGuid(transportGuid?: string, received?: boolean, startKey?: string, startDocumentId?: string, limit?: number, hcpId?: string): Promise<PaginatedListMessage>;
    /**
     *
     * @summary Get all messages starting by a prefix between two date
     * @param transportGuid
     * @param from
     * @param to
     * @param startKey
     * @param startDocumentId
     * @param limit
     * @param hcpId
     */
    findMessagesByTransportGuidSentDate(transportGuid?: string, from?: number, to?: number, startKey?: string, startDocumentId?: string, limit?: number, hcpId?: string): Promise<PaginatedListMessage>;
    /**
     *
     * @summary Get children messages of provided message
     * @param messageId
     */
    getChildrenMessages(messageId: string): Promise<Array<Message>>;
    /**
     *
     * @summary Get children messages of provided message
     * @param body
     */
    getChildrenMessagesOfList(body?: ListOfIds): Promise<Array<Message>>;
    /**
     * @summary Gets a message
     * @param messageId
     */
    getMessage(messageId: string): Promise<Message>;
    /**
     * @summary Gets batch of messages by their ids.
     * @param messageIds the ids of the messages
     */
    getMessages(messageIds: ListOfIds): Promise<Message[]>;
    /**
     *
     * @summary Get children messages of provided message
     * @param body
     */
    listMessagesByInvoiceIds(body?: ListOfIds): Promise<Array<Message>>;
    /**
     *
     * @summary Get all messages for current HC Party and provided transportGuids
     * @param body
     * @param hcpId
     */
    listMessagesByTransportGuids(hcpId: string, body?: ListOfIds): Promise<Array<Message>>;
    /**
     *
     * @summary Updates a message
     * @param body
     */
    modifyMessage(body?: Message): Promise<Message>;
    /**
     *
     * @summary Set read status for given list of messages
     * @param body
     */
    setMessagesReadStatus(body?: MessagesReadStatusUpdate): Promise<Array<Message>>;
    /**
     *
     * @summary Set status bits for given list of messages
     * @param body
     * @param status
     */
    setMessagesStatusBits(status: number, body?: ListOfIds): Promise<Array<Message>>;
    /**
     * @internal this method is for internal use only and may be changed without notice
     */
    bulkShareMessages(request: BulkShareOrUpdateMetadataParams): Promise<EntityBulkShareResult<Message>[]>;
    /**
     * Returns a list of messages along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page.
     * @summary List messages for the current user (HcParty) or the given hcparty in the filter
     * @param body
     * @param startDocumentId A Message document ID
     * @param limit Number of rows
     * @param collectTiming if true, include server-side filter timing information in the response
     */
    filterMessagesBy(body: FilterChainMessage, startDocumentId?: string, limit?: number, collectTiming?: false): Promise<PaginatedListMessage>;
    filterMessagesBy(body: FilterChainMessage, startDocumentId?: string, limit?: number, collectTiming?: true): Promise<PaginatedListMessage & TimingInfo>;
    /**
     *
     * @summary Get ids of messages matching the provided filter for the current user (HcParty)
     * @param body
     * @param collectTiming if true, include server-side filter timing information in the response
     */
    matchMessagesBy(body: AbstractFilterMessage, collectTiming?: false): Promise<Array<string>>;
    matchMessagesBy(body: AbstractFilterMessage, collectTiming?: true): Promise<Array<string> & TimingInfo>;
}
