/** * 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 { RelatedPerson } from '../model/RelatedPerson'; import { ListOfIds } from '../model/ListOfIds'; import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'; import { EntityBulkShareResult } from '../model/requests/EntityBulkShareResult'; import { FilterChainRelatedPerson } from '../model/FilterChainRelatedPerson'; import { PaginatedListRelatedPerson } from '../model/PaginatedListRelatedPerson'; import { AbstractFilterRelatedPerson } from '../model/AbstractFilterRelatedPerson'; import { TimingInfo } from '../model/TimingInfo'; import { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams'; import { ConflictResolutionRequest } from '../model/ConflictResolutionRequest'; import { ConflictResolutionResult } from '../model/ConflictResolutionResult'; import { ConflictResolutionStrategy } from '../model/ConflictResolutionStrategy'; import { MergeResult } from '../model/MergeResult'; export declare class IccRelatedPersonApi { 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; /** * * @summary Gets a related person * @param relatedPersonId */ getRelatedPerson(relatedPersonId: string): Promise; /** * @summary Get a list of related persons by ids * @param body */ getRelatedPersons(body: ListOfIds): Promise>; /** * Returns an instance of created related person. * @summary Create a related person * @param body */ createRelatedPerson(body: RelatedPerson): Promise; /** * Returns the instances of the created related persons. * @summary Create a batch of related persons * @param body */ createRelatedPersons(body: Array): Promise>; /** * Returns the modified related person. * @summary Modify a related person * @param body */ modifyRelatedPerson(body: RelatedPerson): Promise; /** * Returns the modified related persons. * @summary Modify a batch of related persons * @param body */ modifyRelatedPersons(body: Array): Promise>; /** * @summary Deletes a related person by id. * * @param relatedPersonId the id of the related person to delete * @return a Promise that will resolve in the DocIdentifier of the deleted related person. */ deleteRelatedPerson(relatedPersonId: string): Promise; /** * Response is a set containing the ID's of deleted related persons. * @summary Delete related persons. * @param body */ deleteRelatedPersons(body: ListOfIds): Promise>; /** * @internal this method is for internal use only and may be changed without notice */ bulkShareRelatedPersons(request: BulkShareOrUpdateMetadataParams): Promise[]>; /** * Returns a list of related persons along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page. * @summary List related persons for the current user (HcParty) or the given data owner in the filter * @param body * @param startDocumentId A related person document ID * @param limit Number of rows * @param collectTiming if true, include server-side filter timing information in the response */ filterRelatedPersonsBy(body: FilterChainRelatedPerson, startDocumentId?: string, limit?: number, collectTiming?: false): Promise; filterRelatedPersonsBy(body: FilterChainRelatedPerson, startDocumentId?: string, limit?: number, collectTiming?: true): Promise; /** * * @summary Get ids of related persons matching the provided filter for the current user (HcParty) * @param body * @param collectTiming if true, include server-side filter timing information in the response */ matchRelatedPersonsBy(body: AbstractFilterRelatedPerson, collectTiming?: false): Promise>; matchRelatedPersonsBy(body: AbstractFilterRelatedPerson, collectTiming?: true): Promise & TimingInfo>; /** * Retrieves the ids of all the related persons that currently have conflicting revisions and therefore need to * be resolved. * @summary List the ids of the related persons that have conflicts. * @return the ids of the related persons with unresolved conflicts. */ getConflictingEntitiesIds(): Promise>; /** * Retrieves all the conflicting revisions of the related person with the given id (the current revision is not * included). The returned entities are still encrypted. * @summary Get the conflicting revisions of a related person. * @param entityId the id of the related person to retrieve the conflicts for. * @return the conflicting revisions of the related person. */ getConflictsForEntity(entityId: string): Promise>; /** * Resolves a conflict by declaring which revision of the related person 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 related person. * @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 related persons that have conflicts, in the given group. * @param groupId the id of the group to look into. * @return the ids of the related persons 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 related person, in the given group. * @param groupId the id of the group the related person belongs to. * @param entityId the id of the related person to retrieve the conflicts for. * @return the conflicting revisions of the related person. */ 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 related person, in the given group. * @param groupId the id of the group the related person 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 related persons with the given ids, according to the provided * {@link ConflictResolutionStrategy}. * @summary Automatically solve the conflicts of the related persons with the given ids. * @param entityIds the ids of the related persons 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 related persons with the given ids, in the given group. * @param groupId the id of the group to look into. * @param entityIds the ids of the related persons 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>; }