/** * 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 { AbstractFilterHealthElement } from '../model/AbstractFilterHealthElement'; import { DocIdentifier } from '../model/DocIdentifier'; import { FilterChainHealthElement } from '../model/FilterChainHealthElement'; import { HealthElement } from '../model/HealthElement'; import { IcureStub } from '../model/IcureStub'; import { ListOfIds } from '../model/ListOfIds'; import { PaginatedListHealthElement } from '../model/PaginatedListHealthElement'; 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'; import { ConflictResolutionRequest } from '../model/ConflictResolutionRequest'; import { ConflictResolutionResult } from '../model/ConflictResolutionResult'; import { ConflictResolutionStrategy } from '../model/ConflictResolutionStrategy'; import { MergeResult } from '../model/MergeResult'; export declare class IccHelementApi { host: string; _headers: Array; authenticationProvider: AuthenticationProvider; fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise; get headers(): Promise>; constructor(host: string, headers: any, authenticationProvider?: AuthenticationProvider, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise); setHeaders(h: Array): void; handleError(e: XHR.XHRError): never; /** * Returns an instance of created healthcare element. * @summary Create a healthcare element with the current user * @param body */ createHealthElement(body?: HealthElement): Promise; /** * Returns the created healthcare elements. * @summary Create a batch of healthcare elements * @param body */ createHealthElements(body?: Array): Promise>; /** * @summary Delete healthcare elements by batch. * * @param healthElementIds a ListOfIds containing the ids of the health elements to delete. * @return a Promise that will resolve in an Array containing the DocIdentifiers of the successfully delete documents. */ deleteHealthElements(healthElementIds: ListOfIds): Promise>; /** * @summary Deletes a single health element by id. * * @param healthElementId the id of the health element to delete. * @return a Promise that will resolve in the DocIdentifier of the deleted health element. */ deleteHealthElement(healthElementId: string): Promise; /** * Returns a list of health elements along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page. * @summary Filter health elements for the current user (HcParty) * @param body * @param startDocumentId A HealthElement document ID * @param limit Number of rows * @param collectTiming if true, include server-side filter timing information in the response */ filterHealthElementsBy(startDocumentId?: string, limit?: number, body?: FilterChainHealthElement, collectTiming?: false): Promise; filterHealthElementsBy(startDocumentId?: string, limit?: number, body?: FilterChainHealthElement, collectTiming?: true): Promise; /** * @summary List healthcare elements found By Healthcare Party and secret foreign keys. * @deprecated use {@link findHealthElementIdsByDataOwnerPatientOpeningDate} instead. * @param body * @param hcPartyId */ findHealthElementsByHCPartyPatientForeignKeysUsingPost(hcPartyId: string, body?: Array): Promise>; /** * Keys must be delimited by commas. * @deprecated use {@link findHealthElementIdsByDataOwnerPatientOpeningDate} instead. * @summary List healthcare elements found By Healthcare Party and secret foreign keys. * @param hcPartyId * @param secretFKeys */ findHealthElementsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise>; /** * @summary List HealthElement ids by data owner and a set of secret foreign key. The ids will be sorted by HealthElement 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 health element ids since the beginning of time will be returned. * @param endDate a timestamp in epoch milliseconds. If undefined, all the health element ids until the end of time will be returned. * @param descending whether to return the ids ordered in ascending or descending order by HealthElement openingDate * @return a promise that will resolve in an Array of HealthElement ids. */ findHealthElementIdsByDataOwnerPatientOpeningDate(dataOwnerId: string, secretFKeys: string[], startDate?: number, endDate?: number, descending?: boolean): Promise; /** * @deprecated use {@link findHealthElementsDelegationsStubsByIds} instead. * @summary List helement stubs found By Healthcare Party and secret foreign keys. * @param body * @param hcPartyId */ findHealthElementsDelegationsStubsByHCPartyPatientForeignKeysUsingPost(hcPartyId: string, body?: Array): Promise>; /** * Keys must be delimited by coma * @deprecated use {@link findHealthElementsDelegationsStubsByIds} instead. * @summary List helement stubs found By Healthcare Party and secret foreign keys. * @param hcPartyId * @param secretFKeys */ findHealthElementsDelegationsStubsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise>; findHealthElementsDelegationsStubsByIds(healthElementIds: string[]): Promise>; /** * * @summary Get a healthcare element * @param healthElementId */ getHealthElement(healthElementId: string): Promise; /** * Get a list of healthElement by ids/keys. * @summary Get healthElements by batch * @param body */ getHealthElements(body?: ListOfIds): Promise>; /** * * @summary Get ids of health element matching the provided filter for the current user (HcParty) * @param body * @param collectTiming if true, include server-side filter timing information in the response */ matchHealthElementsBy(body?: AbstractFilterHealthElement, collectTiming?: false): Promise>; matchHealthElementsBy(body?: AbstractFilterHealthElement, collectTiming?: true): Promise & TimingInfo>; /** * Returns the modified healthcare element. * @summary Modify a healthcare element * @param body */ modifyHealthElement(body?: HealthElement): Promise; /** * Returns the modified healthcare elements. * @summary Modify a batch of healthcare elements * @param body */ modifyHealthElements(body?: Array): Promise>; /** * @internal this method is for internal use only and may be changed without notice */ bulkShareHealthElements(request: BulkShareOrUpdateMetadataParams): Promise[]>; /** * @internal this method is for internal use only and may be changed without notice */ bulkShareHealthElementsMinimal(request: BulkShareOrUpdateMetadataParams): Promise; /** * Retrieves the ids of all the health elements that currently have conflicting revisions and therefore need to * be resolved. * @summary List the ids of the health elements that have conflicts. * @return the ids of the health elements with unresolved conflicts. */ getConflictingEntitiesIds(): Promise>; /** * Retrieves all the conflicting revisions of the health element with the given id (the current revision is not * included). The returned entities are still encrypted. * @summary Get the conflicting revisions of a health element. * @param entityId the id of the health element to retrieve the conflicts for. * @return the conflicting revisions of the health element. */ getConflictsForEntity(entityId: string): Promise>; /** * Resolves a conflict by declaring which revision of the health element should be kept as winner and which * conflicting revisions should be purged. The provided document must already be encrypted. * @summary Declare the winning revision of a conflicting health element. * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge. * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved. */ declareConflictWinner(body: ConflictResolutionRequest): Promise>; /** * Like {@link getConflictingEntitiesIds} but targets the entities of the group with the given id. * @summary List the ids of the health elements that have conflicts, in the given group. * @param groupId the id of the group to look into. * @return the ids of the health elements with unresolved conflicts in the group. */ getConflictingEntitiesIdsInGroup(groupId: string): Promise>; /** * Like {@link getConflictsForEntity} but targets the entity of the group with the given id. * @summary Get the conflicting revisions of a health element, in the given group. * @param groupId the id of the group the health element belongs to. * @param entityId the id of the health element to retrieve the conflicts for. * @return the conflicting revisions of the health element. */ getConflictsForEntityInGroup(groupId: string, entityId: string): Promise>; /** * Like {@link declareConflictWinner} but targets the entity of the group with the given id. * @summary Declare the winning revision of a conflicting health element, in the given group. * @param groupId the id of the group the health element belongs to. * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge. * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved. */ declareConflictWinnerInGroup(groupId: string, body: ConflictResolutionRequest): Promise>; /** * Automatically resolves the conflicting revisions of the health elements with the given ids, according to the provided * {@link ConflictResolutionStrategy}. * @summary Automatically solve the conflicts of the health elements with the given ids. * @param entityIds the ids of the health elements to solve the conflicts for. * @param strategy the {@link ConflictResolutionStrategy} to use to resolve the conflicts. Defaults to `FullMergeability`. * @return the {@link MergeResult} of the conflict resolution for each requested entity. */ autoSolveConflicts(entityIds: Array, strategy?: ConflictResolutionStrategy): Promise>; /** * Like {@link autoSolveConflicts} but targets the entities of the group with the given id. * @summary Automatically solve the conflicts of the health elements with the given ids, in the given group. * @param groupId the id of the group to look into. * @param entityIds the ids of the health elements to solve the conflicts for. * @param strategy the {@link ConflictResolutionStrategy} to use to resolve the conflicts. Defaults to `FullMergeability`. * @return the {@link MergeResult} of the conflict resolution for each requested entity. */ autoSolveConflictsInGroup(groupId: string, entityIds: Array, strategy?: ConflictResolutionStrategy): Promise>; }